Skip to content

Commit

Permalink
Intercept READ(6) to allow CHECK CONDITION when blocksize != 2048
Browse files Browse the repository at this point in the history
  • Loading branch information
saybur committed May 19, 2023
1 parent 3a6abfe commit fcac5ae
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ZuluSCSI_cdrom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1708,6 +1708,17 @@ extern "C" int scsiCDRomCommand()

doReadSubchannel(time, subq, parameter, track_number, allocationLength);
}
else if (command == 0x08)
{
// READ(6) for CDs (may need sector translation for cue file handling)
uint32_t lba =
(((uint32_t) scsiDev.cdb[1] & 0x1F) << 16) +
(((uint32_t) scsiDev.cdb[2]) << 8) +
scsiDev.cdb[3];
uint32_t blocks = scsiDev.cdb[4];

doReadCD(lba, blocks, 0, 0x10, 0, true);
}
else if (command == 0x28)
{
// READ(10) for CDs (may need sector translation for cue file handling)
Expand Down

0 comments on commit fcac5ae

Please sign in to comment.