Added MODE SELECT stub to enable Apple HD SC Setup formatting. Thanks dougg3!.
authorMichael McMaster <michael@codesrc.com>
Mon, 9 Dec 2013 02:16:24 +0000 (12:16 +1000)
committerMichael McMaster <michael@codesrc.com>
Mon, 9 Dec 2013 02:16:24 +0000 (12:16 +1000)
software/SCSI2SD/SCSI2SD.cydsn/mode.c

index 6549f16..cb6d7f4 100755 (executable)
@@ -327,6 +327,21 @@ int scsiModeCommand()
                        scsiDev.cdb[8];\r
                doModeSense(0, dbd, pc, pageCode, allocLength);\r
        }\r
+       else if (command == 0x15)\r
+       {\r
+               // MODE SELECT(6)\r
+               int len = scsiDev.cdb[4];\r
+               if (len == 0) len = 256;\r
+               scsiDev.dataLen = len;\r
+               scsiDev.phase = DATA_OUT;\r
+       }\r
+       else if (command == 0x55)\r
+       {\r
+               // MODE SELECT(10)\r
+               int allocLength = (((uint16) scsiDev.cdb[7]) << 8) + scsiDev.cdb[8];\r
+               scsiDev.dataLen = allocLength;\r
+               scsiDev.phase = DATA_OUT;\r
+       }\r
        else\r
        {\r
                commandHandled = 0;\r