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

index c16aa75..8328ca4 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+2020XXXX               XXXXX
+       - Fix for invalid CDROM READ TOC responses (Thanks Simon Gander)
+
 20191208               6.2.9
        - Fix to prevent sending floppy geometry mode page when not configured as
        a floppy (Thanks Landon Rodgers)
index 220389a..c2dc148 100755 (executable)
@@ -170,14 +170,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)