Small compatibility improvements, and added scsi2sd-monitor test program
[SCSI2SD.git] / software / include / scsi2sd.h
index c611288a301695330a8ca36ef363dace29601234..3e8cf47f8e05d7b92e0206927040954b964b8786 100755 (executable)
@@ -91,9 +91,16 @@ typedef enum
 {
        CONFIG_FIXED,
        CONFIG_REMOVEABLE,
-       CONFIG_OPTICAL
+       CONFIG_OPTICAL,
+       CONFIG_FLOPPY_14MB
 } CONFIG_TYPE;
 
+typedef enum
+{
+       CONFIG_QUIRKS_NONE,
+       CONFIG_QUIRKS_APPLE
+} CONFIG_QUIRKS;
+
 typedef struct __attribute__((packed))
 {
        uint8_t deviceType;
@@ -111,7 +118,7 @@ typedef struct __attribute__((packed))
 
        uint8_t deviceType; // CONFIG_TYPE
        uint8_t flags; // CONFIG_FLAGS
-       uint8_t pad0;
+       uint8_t deviceTypeModifier; // Used in INQUIRY response.
 
        uint32_t sdSectorStart;
        uint32_t scsiSectors;
@@ -130,7 +137,9 @@ typedef struct __attribute__((packed))
        char revision[4];
        char serial[16];
 
-       uint8_t reserved[962]; // Pad out to 1024 bytes for main section.
+       uint16_t quirks; // CONFIG_QUIRKS
+
+       uint8_t reserved[960]; // Pad out to 1024 bytes for main section.
 
        uint8_t vpd[3072]; // Total size is 4k.
 } TargetConfig;
@@ -165,7 +174,21 @@ typedef enum
        // Command content:
        // uint8_t CONFIG_REBOOT
        // Response: None.
-       CONFIG_REBOOT
+       CONFIG_REBOOT,
+
+       // Command content:
+       // uint8_t CONFIG_INFO
+       // Response:
+       // uint8_t[16] CSD
+       // uint8_t[16] CID
+       CONFIG_SDINFO,
+
+       // Command content:
+       // uint8_t CONFIG_SCSITEST
+       // Response:
+       // CONFIG_STATUS
+       // uint8_t result code (0 = passed)
+       CONFIG_SCSITEST
 } CONFIG_COMMAND;
 
 typedef enum