Skip to content

SASI FORMAT opcode fix, SASI segfault fix, added SASI INQUIRY/READ CAPACITY, 512 bytes per sector SASI drives#724

Merged
akuker merged 24 commits intodevelopfrom
fix_sasi_format_opcode
Mar 6, 2022
Merged

SASI FORMAT opcode fix, SASI segfault fix, added SASI INQUIRY/READ CAPACITY, 512 bytes per sector SASI drives#724
akuker merged 24 commits intodevelopfrom
fix_sasi_format_opcode

Conversation

@uweseimet
Copy link
Copy Markdown
Contributor

@uweseimet uweseimet commented Mar 5, 2022

Summary of SASI changes:

  • Fixed two segfaults
  • Added SASI INQUIRY and READ CAPACITY
  • Support for 512 bytes per sector
  • Removed duplicate code
  • ICD compatiblity is now only supported for SCSI but not for SASI drives. ICD compatibility means full SCSI command set, which contradicts SASI

My Atari can now boot from a SASI drive, and can correctly read data and execute programs loaded from the drive. I cannot test the SASI error handling with my setup because RaSCSI appears to implement an old SASI flavor of REQUEST SENSE, where the error status is encoded differently than with newer SASI standards, where errors are reported very similar to SCSI. From the logfile the error handling appears to be correct.

@uweseimet uweseimet requested a review from rdmark March 5, 2022 21:16
@uweseimet uweseimet linked an issue Mar 5, 2022 that may be closed by this pull request
@uweseimet uweseimet changed the title Fixed SASI FORMAT opcode (must be 0x04, not 0x06) Fixed SASI FORMAT opcode (must be 0x04, not 0x06) and SASI segfault Mar 5, 2022
@uweseimet uweseimet linked an issue Mar 5, 2022 that may be closed by this pull request
eCmdRezero = 0x01,
eCmdRequestSense = 0x03,
eCmdFormat = 0x06,
eCmdFormat = 0x04,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uweseimet - As a side note: In the original RaSCSI code, both 0x04 and 0x06 were treated as Format commands for SASI devices. If we remove the SASI support, this really doesn't matter. But, something to consider if we're keeping SASI support.

		// FORMAT UNIT
		case 0x04:
			CmdFormat();
			return;

		// FORMAT UNIT
		case 0x06:
			CmdFormat();
			return;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose that we keep SASI support around for at least this next release. Could you add an eCmdFormat06 value that is handled the same way as eCmdFormat?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do that, but the SASI specification clearly says 0x04. Why would a SASI device violate the SASI specification and use 0x06? We also don't add 0x06 to SCSI, do we? ;-)
I suggest to discard SASI after the next release, making 22.03 the last release with SASI support.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@uweseimet uweseimet linked an issue Mar 6, 2022 that may be closed by this pull request
@uweseimet
Copy link
Copy Markdown
Contributor Author

I added support for 512 bytes per sector because SASI supports that, see #727.

@uweseimet uweseimet changed the title Fixed SASI FORMAT opcode (must be 0x04, not 0x06) and SASI segfault SASI FORMAT opcode fix, SASI segfault fix, support for 512 bytes per sector SASI drives Mar 6, 2022
@uweseimet uweseimet linked an issue Mar 6, 2022 that may be closed by this pull request
@uweseimet uweseimet changed the title SASI FORMAT opcode fix, SASI segfault fix, support for 512 bytes per sector SASI drives SASI FORMAT opcode fix, SASI segfault fix, added SASI INQUIRY, 512 bytes per sector SASI drives Mar 6, 2022
@uweseimet uweseimet changed the title SASI FORMAT opcode fix, SASI segfault fix, added SASI INQUIRY, 512 bytes per sector SASI drives SASI FORMAT opcode fix, SASI segfault fix, added SASI INQUIRY/READ CAPACITY, 512 bytes per sector SASI drives Mar 6, 2022
@uweseimet uweseimet linked an issue Mar 6, 2022 that may be closed by this pull request
@akuker akuker merged commit 9099d72 into develop Mar 6, 2022
@akuker akuker deleted the fix_sasi_format_opcode branch March 6, 2022 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants