@@ -366,55 +366,55 @@ static int cdvdman_read(u32 lsn, u32 sectors, u16 sector_size, void *buf)
366366 offset = 12 ; // head - sub - data(2048) -- edc-ecc
367367
368368 buf = (void * )PHYSADDR (buf );
369- if ((u32 )(buf ) & 3 || (sector_size != 2048 )) {
370- // For transfers to unaligned buffers, a double-copy is required to avoid stalling the device's DMA channel.
371- WaitSema (cdvdman_searchfilesema );
372-
373- u32 nsectors , nbytes ;
374- u32 rpos = lsn ;
375-
376- while (sectors > 0 ) {
377- nsectors = sectors ;
378- if (nsectors > CDVDMAN_BUF_SECTORS )
379- nsectors = CDVDMAN_BUF_SECTORS ;
380-
381- // For other sizes we can only read one sector at a time.
382- // There are only very few games (CDDA games, EA Tiburon) that will be affected
383- if (sector_size != 2048 )
384- nsectors = 1 ;
385-
386- cdvdman_read_sectors (rpos , nsectors , cdvdman_buf );
387-
388- rpos += nsectors ;
389- sectors -= nsectors ;
390- nbytes = nsectors * sector_size ;
391-
392- // Copy the data for buffer.
393- // For any sector other than 2048 one sector at a time is copied.
394- memcpy ((void * )((u32 )buf + offset ), cdvdman_buf , nbytes );
395-
396- // For these custom sizes we need to manually fix the header.
397- // For 2340 we have 12bytes. 4 are position.
398- if (sector_size == 2340 ) {
399- u8 * header = (u8 * )buf ;
400- // position.
401- sceCdlLOCCD p ;
402- sceCdIntToPos (rpos - 1 , & p ); // to get current pos.
403- header [0 ] = p .minute ;
404- header [1 ] = p .second ;
405- header [2 ] = p .sector ;
406- header [3 ] = 0 ; // p.track for cdda only non-zero
407-
408- // Subheader and copy of subheader.
409- header [4 ] = header [8 ] = 0 ;
410- header [5 ] = header [9 ] = 0 ;
411- header [6 ] = header [10 ] = 0x8 ;
412- header [7 ] = header [11 ] = 0 ;
413- }
414- buf = (void * )((u8 * )buf + nbytes );
415- }
416- SignalSema (cdvdman_searchfilesema );
417- } else
369+ // if ((u32)(buf) & 3 || (sector_size != 2048)) {
370+ // // For transfers to unaligned buffers, a double-copy is required to avoid stalling the device's DMA channel.
371+ // WaitSema(cdvdman_searchfilesema);
372+
373+ // u32 nsectors, nbytes;
374+ // u32 rpos = lsn;
375+
376+ // while (sectors > 0) {
377+ // nsectors = sectors;
378+ // if (nsectors > CDVDMAN_BUF_SECTORS)
379+ // nsectors = CDVDMAN_BUF_SECTORS;
380+
381+ // // For other sizes we can only read one sector at a time.
382+ // // There are only very few games (CDDA games, EA Tiburon) that will be affected
383+ // if (sector_size != 2048)
384+ // nsectors = 1;
385+
386+ // cdvdman_read_sectors(rpos, nsectors, cdvdman_buf);
387+
388+ // rpos += nsectors;
389+ // sectors -= nsectors;
390+ // nbytes = nsectors * sector_size;
391+
392+ // // Copy the data for buffer.
393+ // // For any sector other than 2048 one sector at a time is copied.
394+ // memcpy((void *)((u32)buf + offset), cdvdman_buf, nbytes);
395+
396+ // // For these custom sizes we need to manually fix the header.
397+ // // For 2340 we have 12bytes. 4 are position.
398+ // if (sector_size == 2340) {
399+ // u8 *header = (u8 *)buf;
400+ // // position.
401+ // sceCdlLOCCD p;
402+ // sceCdIntToPos(rpos - 1, &p); // to get current pos.
403+ // header[0] = p.minute;
404+ // header[1] = p.second;
405+ // header[2] = p.sector;
406+ // header[3] = 0; // p.track for cdda only non-zero
407+
408+ // // Subheader and copy of subheader.
409+ // header[4] = header[8] = 0;
410+ // header[5] = header[9] = 0;
411+ // header[6] = header[10] = 0x8;
412+ // header[7] = header[11] = 0;
413+ // }
414+ // buf = (void *)((u8 *)buf + nbytes);
415+ // }
416+ // SignalSema(cdvdman_searchfilesema);
417+ // } else
418418 cdvdman_read_sectors (lsn , sectors , buf );
419419
420420 ReadPos = 0 ; /* Reset the buffer offset indicator. */
0 commit comments