Fix invalid CDROM READ TOC responses (thanks Simon Gander) master
authorMichael McMaster <michael@codesrc.com>
Thu, 19 Dec 2019 08:58:40 +0000 (18:58 +1000)
committerMichael McMaster <michael@codesrc.com>
Thu, 19 Dec 2019 08:58:40 +0000 (18:58 +1000)
CHANGELOG
software/SCSI2SD/src/cdrom.c

index a5d92e0..6b05105 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+2020XXXX               XXXXX
+       - Fix for invalid CDROM READ TOC responses (Thanks Simon Gander)
+
 20191202               4.8.4
        - Fix to prevent sending floppy geometry mode page when not configured as
        a floppy (Thanks Landon Rodgers)
index 11f0609..9b40859 100755 (executable)
@@ -169,14 +169,14 @@ static void doReadTOC(int MSF, uint8_t track, uint16_t allocationLength)
                // Replace start of leadout track
                if (MSF)
                {
-                       LBA2MSF(capacity, scsiDev.data + 0x0E);
+                       LBA2MSF(capacity, scsiDev.data + 0x10);
                }
                else
                {
-                       scsiDev.data[0x0E] = capacity >> 24;
-                       scsiDev.data[0x0F] = capacity >> 16;
-                       scsiDev.data[0x10] = capacity >> 8;
-                       scsiDev.data[0x11] = capacity;
+                       scsiDev.data[0x10] = capacity >> 24;
+                       scsiDev.data[0x11] = capacity >> 16;
+                       scsiDev.data[0x12] = capacity >> 8;
+                       scsiDev.data[0x13] = capacity;
                }
 
                if (len > allocationLength)