Skip to content

Commit

Permalink
Merge pull request #199 from BlueSCSI/eric/NeXT
Browse files Browse the repository at this point in the history
NeXT improvements
  • Loading branch information
erichelgeson authored Oct 26, 2024
2 parents c1bfe3a + bd481b1 commit c45bfd2
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static bool isValidMacintoshImage(image_config_t *img)
return result;
}

// Called from BlueSCSI_disk after image is initalized.
// Called from BlueSCSI_disk after image is initialized.
void platformConfigHook(image_config_t *img)
{
if(ini_getbool("SCSI", "DisableConfigHook", false, CONFIGFILE))
Expand All @@ -94,7 +94,7 @@ void platformConfigHook(image_config_t *img)
debuglog("---- Valid Macintosh Device Image detected.");
}
}
// Macintosh hosts reserve ID 7, so warn the user this configuration wont work
// Macintosh hosts reserve ID 7, so warn the user this configuration won't work
if((img->scsiId & S2S_CFG_TARGET_ID_BITS) == 7)
{
log("---- WARNING: Quirks set to Apple so can not use SCSI ID 7!");
Expand Down
2 changes: 1 addition & 1 deletion lib/SCSI2SD/src/firmware/inquiry.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void s2s_scsiInquiry()
allocationLength = 254;
}

// "real" hard drives send back exactly allocationLenth bytes, padded
// "real" hard drives send back exactly allocationLength bytes, padded
// with zeroes. This only seems to happen for Inquiry responses, and not
// other commands that also supply an allocation length such as Mode Sense or
// Request Sense.
Expand Down
2 changes: 1 addition & 1 deletion lib/SCSI2SD/src/firmware/scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ void scsiInit()
// won't respond properly to
// LOGICAL_UNIT_NOT_READY_INITIALIZING_COMMAND_REQUIRED sense
// code
scsiDev.targets[i].started = 1;
scsiDev.targets[i].started = true;
}
firstInit = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/SCSI2SD/src/firmware/scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ typedef struct
uint8_t syncOffset;
uint8_t syncPeriod;

uint8_t started; // Controlled by START STOP UNIT
bool started; // Controlled by START STOP UNIT
} TargetState;

typedef struct
Expand Down
6 changes: 3 additions & 3 deletions src/BlueSCSI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ bool findHDDImages()
{
log("== Opening ", fullname, " for ID: ", id, " LUN: ", lun);

imageReady = scsiDiskOpenHDDImage(id, fullname, id, lun, blk, type);
imageReady = scsiDiskOpenHDDImage(fullname, id, lun, blk, type);
if(imageReady)
{
foundImage = true;
Expand Down Expand Up @@ -430,7 +430,7 @@ bool findHDDImages()

if (cfg->deviceType == S2S_CFG_NETWORK)
{
log("* ID: ", (int)(cfg->scsiId & 7),
log("* ID: ", (int)(cfg->scsiId & S2S_CFG_TARGET_ID_BITS),
", Type: ", typeToChar((int)cfg->deviceType),
", Quirks: ", quirksToChar((int)cfg->quirks));
}
Expand Down Expand Up @@ -536,7 +536,7 @@ static void reinitSCSI()
{
#if RAW_FALLBACK_ENABLE
log("No images found, enabling RAW fallback partition");
scsiDiskOpenHDDImage(RAW_FALLBACK_SCSI_ID, "RAW:0:0xFFFFFFFF", RAW_FALLBACK_SCSI_ID, 0,
scsiDiskOpenHDDImage("RAW:0:0xFFFFFFFF", RAW_FALLBACK_SCSI_ID, 0,
RAW_FALLBACK_BLOCKSIZE);
#else
log("No valid image files found!");
Expand Down
6 changes: 3 additions & 3 deletions src/BlueSCSI_cdrom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ bool cdromValidateCueSheet(image_config_t &img)
/* Ejection and image switching logic */
/**************************************/

// Close CDROM tray and note media change event
// Close CD-ROM tray and note media change event
void cdromCloseTray(image_config_t &img)
{
if (img.ejected)
Expand All @@ -1167,7 +1167,7 @@ void cdromCloseTray(image_config_t &img)
}
}

// Eject CDROM tray if closed, close if open
// Eject CD-ROM tray if closed, close if open
// Switch image on ejection.
void cdromPerformEject(image_config_t &img)
{
Expand All @@ -1189,7 +1189,7 @@ void cdromPerformEject(image_config_t &img)
}
}

// Reinsert any ejected CDROMs on reboot
// Reinsert any ejected CD-ROMs on reboot
void cdromReinsertFirstImage(image_config_t &img)
{
if (img.image_index > 0)
Expand Down
1 change: 1 addition & 0 deletions src/BlueSCSI_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

// Configuration and log file paths
#define CONFIGFILE "bluescsi.ini"
#define CONFIGFILE_BAD "bluescsi.ini.txt"
#define LOGFILE "log.txt"
#define CRASHFILE "err.txt"

Expand Down
Loading

0 comments on commit c45bfd2

Please sign in to comment.