瀏覽代碼

Added MODE SELECT stub to enable Apple HD SC Setup formatting. Thanks dougg3!.

Michael McMaster 12 年之前
父節點
當前提交
ecc31ca2e5
共有 1 個文件被更改,包括 15 次插入0 次删除
  1. 15 0
      lib/SCSI2SD/software/SCSI2SD/SCSI2SD.cydsn/mode.c

+ 15 - 0
lib/SCSI2SD/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;