Skip to content

Commit

Permalink
Merge pull request #352 from ZuluSCSI/cdrom-img-fix
Browse files Browse the repository at this point in the history
Fix device type for IMG0-9
  • Loading branch information
aperezbios authored Dec 4, 2023
2 parents 03d870d + a935a96 commit 703a752
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/SCSI2SD/include/scsi2sd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/ZuluSCSI_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions src/ZuluSCSI_disk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/ZuluSCSI_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 703a752

Please sign in to comment.