Explorar el Código

Merge pull request #352 from ZuluSCSI/cdrom-img-fix

Fix device type for IMG0-9
Alex Perez hace 1 año
padre
commit
703a752acd
Se han modificado 4 ficheros con 10 adiciones y 3 borrados
  1. 2 1
      lib/SCSI2SD/include/scsi2sd.h
  2. 1 1
      src/ZuluSCSI_config.h
  3. 6 0
      src/ZuluSCSI_disk.cpp
  4. 1 1
      src/ZuluSCSI_settings.cpp

+ 2 - 1
lib/SCSI2SD/include/scsi2sd.h

@@ -77,7 +77,8 @@ typedef enum
 	S2S_CFG_FLOPPY_14MB = 3,
 	S2S_CFG_MO = 4,
 	S2S_CFG_SEQUENTIAL = 5,
-	S2S_CFG_NETWORK = 6
+	S2S_CFG_NETWORK = 6,
+	S2S_CFG_NOT_SET = 255
 
 } S2S_CFG_TYPE;
 

+ 1 - 1
src/ZuluSCSI_config.h

@@ -28,7 +28,7 @@
 #include <ZuluSCSI_platform.h>
 
 // Use variables for version number
-#define FW_VER_NUM      "23.11.28"
+#define FW_VER_NUM      "23.12.04"
 #define FW_VER_SUFFIX   "dev"
 #define ZULU_FW_VERSION FW_VER_NUM "-" FW_VER_SUFFIX
 

+ 6 - 0
src/ZuluSCSI_disk.cpp

@@ -296,6 +296,12 @@ bool scsiDiskOpenHDDImage(int target_idx, const char *filename, int scsi_id, int
             logmsg("---- WARNING: file ", filename, " is not contiguous. This will increase read latency.");
         }
 
+        S2S_CFG_TYPE setting_type = (S2S_CFG_TYPE) g_scsi_settings.getDevice(target_idx)->deviceType;
+        if ( setting_type != S2S_CFG_NOT_SET)
+        {
+            type = setting_type;
+        }
+
         if (type == S2S_CFG_FIXED)
         {
             logmsg("---- Configuring as disk drive drive");

+ 1 - 1
src/ZuluSCSI_settings.cpp

@@ -281,7 +281,7 @@ scsi_system_settings_t *ZuluSCSISettings::initSystem(const char *presetName)
     cfgSys.useFATAllocSize = false;
     
     // setting set for all or specific devices
-    cfgDev.deviceType = 0;
+    cfgDev.deviceType = S2S_CFG_NOT_SET;
     cfgDev.deviceTypeModifier = 0;
     cfgDev.sectorsPerTrack = 63;
     cfgDev.headsPerCylinder = 255;