Skip to content
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

Merged
merged 7 commits into from
Feb 13, 2024
Merged

Added Xebec Support #379

merged 7 commits into from
Feb 13, 2024

Conversation

peclark1
Copy link
Contributor

Added Xebec support by porting code from SCSI2SD V5 firmware. This code supports the First Class Peripherals Sider hard disk for Apple II

Added Xebec support by porting code from SCSI2SD V5 firmware.   This code supports the First Class Peripherals Sider hard disk for Apple II
@aperezbios aperezbios requested a review from morio February 12, 2024 17:27
Copy link
Collaborator

@morio morio left a 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?

@@ -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";
Copy link
Collaborator

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.

case 0x0C: return "Xebec InitializeDriveCharacteristics";
case 0x0F: return "Xebec WriteSectorBuffer";

"Xebec RAM Diagnostic"
"Xebec Drive Diagnostic"

Copy link
Collaborator

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:

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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)
@peclark1
Copy link
Contributor Author

Ok, changed made as requested. Tested both Initializing/Formatting new hard disk, as well as accessing partitions (prodos and dos).

@morio
Copy link
Collaborator

morio commented Feb 13, 2024

@peclark1 thanks for the great work!

@morio morio merged commit bb2a0f6 into ZuluSCSI:main Feb 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants