From a835e7a1d36776fe570518677aec317cc040b14c Mon Sep 17 00:00:00 2001 From: Michael McMaster Date: Mon, 9 Dec 2013 12:16:24 +1000 Subject: [PATCH] Added MODE SELECT stub to enable Apple HD SC Setup formatting. Thanks dougg3!. --- software/SCSI2SD/SCSI2SD.cydsn/mode.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/software/SCSI2SD/SCSI2SD.cydsn/mode.c b/software/SCSI2SD/SCSI2SD.cydsn/mode.c index 6549f16e..cb6d7f4b 100755 --- a/software/SCSI2SD/SCSI2SD.cydsn/mode.c +++ b/software/SCSI2SD/SCSI2SD.cydsn/mode.c @@ -327,6 +327,21 @@ int scsiModeCommand() scsiDev.cdb[8]; doModeSense(0, dbd, pc, pageCode, allocLength); } + else if (command == 0x15) + { + // MODE SELECT(6) + int len = scsiDev.cdb[4]; + if (len == 0) len = 256; + scsiDev.dataLen = len; + scsiDev.phase = DATA_OUT; + } + else if (command == 0x55) + { + // MODE SELECT(10) + int allocLength = (((uint16) scsiDev.cdb[7]) << 8) + scsiDev.cdb[8]; + scsiDev.dataLen = allocLength; + scsiDev.phase = DATA_OUT; + } else { commandHandled = 0; -- 2.38.5