Преглед изворни кода

Intercept READ(6) to allow CHECK CONDITION when blocksize != 2048

saybur пре 2 година
родитељ
комит
785e66c4cb
1 измењених фајлова са 11 додато и 0 уклоњено
  1. 11 0
      src/BlueSCSI_cdrom.cpp

+ 11 - 0
src/BlueSCSI_cdrom.cpp

@@ -1709,6 +1709,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)