CDROM: allow to boot from MacOS 7.6 CDROM
authorLaurent Vivier <laurent@vivier.eu>
Thu, 24 Sep 2015 22:45:58 +0000 (00:45 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 24 Sep 2015 22:45:58 +0000 (00:45 +0200)
Reading one sector from the CDROM is always reading several (4)
from the SD card, so always set multBlock to one in this case.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
software/SCSI2SD/src/disk.c

index edda97e..7a59939 100755 (executable)
@@ -244,7 +244,7 @@ static void doRead(uint32 lba, uint32 blocks)
                scsiDev.phase = DATA_IN;\r
                scsiDev.dataLen = 0; // No data yet\r
 \r
-               if ((blocks == 1) ||\r
+               if ((blocks * SDSectorsPerSCSISector(scsiDev.target->liveCfg.bytesPerSector) == 1) ||\r
                        unlikely(((uint64) lba) + blocks == capacity)\r
                        )\r
                {\r