Fix invalid CDROM READ TOC responses (thanks Simon Gander)

This commit is contained in:
Michael McMaster 2019-12-19 18:58:40 +10:00
parent 1d57ede2e7
commit 18a627221d
2 changed files with 8 additions and 5 deletions

View File

@ -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)

View File

@ -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)