-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Xebec Support #379
Added Xebec Support #379
Conversation
Added Xebec support by porting code from SCSI2SD V5 firmware. This code supports the First Class Peripherals Sider hard disk for Apple II
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peclark1
Here are some suggestions for changes to the pull request.
I don't have a system to test them with, but if you do, could you verify they work?
src/ZuluSCSI_log_trace.cpp
Outdated
@@ -100,6 +100,8 @@ static const char *getCommandName(uint8_t cmd) | |||
case 0xA8: return "Read12"; | |||
case 0xC0: return "OMTI-5204 DefineFlexibleDiskFormat"; | |||
case 0xC2: return "OMTI-5204 AssignDiskParameters"; | |||
case 0xE0: return "RAM Diagnostic"; | |||
case 0xE4: return "Drive Diagnostic"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peclark1
I think prefixing these string with Xebec
would make them more inline with the two Xebec commands listed above.
ZuluSCSI-firmware/src/ZuluSCSI_log_trace.cpp
Lines 52 to 53 in 8671a0b
case 0x0C: return "Xebec InitializeDriveCharacteristics"; | |
case 0x0F: return "Xebec WriteSectorBuffer"; |
"Xebec RAM Diagnostic"
"Xebec Drive Diagnostic"
src/ZuluSCSI_disk.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peclark1
Does it work with a Xebec controller if you move these to vendor.c after here:
ZuluSCSI-firmware/lib/SCSI2SD/src/firmware/vendor.c
Lines 75 to 82 in 8671a0b
else if (command == 0x0F && | |
scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_XEBEC) | |
{ | |
// XEBEC S1410, WD100x: "Write Sector Buffer" | |
scsiDev.dataLen = scsiDev.target->liveCfg.bytesPerSector; | |
scsiDev.phase = DATA_OUT; | |
scsiDev.postDataOutHook = doWriteBuffer; | |
} |
Like this:
else if (command == 0x0F &&
scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_XEBEC)
{
// XEBEC S1410, WD100x: "Write Sector Buffer"
scsiDev.dataLen = scsiDev.target->liveCfg.bytesPerSector;
scsiDev.phase = DATA_OUT;
scsiDev.postDataOutHook = doWriteBuffer;
}
else if (command == 0xE0 &&
scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_XEBEC)
{
// RAM Diagnostic
// XEBEC S1410 controller
// http://bitsavers.informatik.uni-stuttgart.de/pdf/xebec/104524C_S1410Man_Aug83.pdf
// Stub, return success
}
else if (command == 0xE4 &&
scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_XEBEC)
{
// Drive Diagnostic
// XEBEC S1410 controller
// Stub, return success
}
That way they would be in the same place with the other Xebec commands.
If you have a system to verify the code changes with, that would be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'll build and give it a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally missed the SCSI2SD source under the lib directory - feel like an idiot. I'll move my changes over there.
Adding handling for SASI E0 and E4 commands as used by Xebec controller and Sider Hard Disk (First Class Peripherals)
Adding handling for SASI E0 and E4 commands as used by Xebec controller and Sider Hard Disk (First Class Peripherals)
Ok, changed made as requested. Tested both Initializing/Formatting new hard disk, as well as accessing partitions (prodos and dos). |
@peclark1 thanks for the great work! |
Added Xebec support by porting code from SCSI2SD V5 firmware. This code supports the First Class Peripherals Sider hard disk for Apple II