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
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.pio
.vscode
.DS_Store
13 changes: 13 additions & 0 deletions src/ZuluSCSI_disk.cpp
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.

Original file line number Diff line number Diff line change
Expand Up @@ -1947,6 +1947,19 @@ int scsiDiskCommand()
commandHandled = scsiModeCommand();
blockDev.state &= ~DISK_WP;
}
else if (unlikely(command == 0xE0))
{
// RAM Diagnostic
// XEBEC S1410 controller
// http://bitsavers.informatik.uni-stuttgart.de/pdf/xebec/104524C_S1410Man_Aug83.pdf
// Stub, return success
}
else if (unlikely(command == 0xE4))
{
// Drive Diagnostic
// XEBEC S1410 controller
// Stub, return success
}
else
{
commandHandled = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/ZuluSCSI_log_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

default: return "Unknown";
}
}
Expand Down
Loading