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

Plextor d8h vendor cmd #387

Merged
merged 6 commits into from
Mar 2, 2024
Merged

Plextor d8h vendor cmd #387

merged 6 commits into from
Mar 2, 2024

Conversation

morio
Copy link
Collaborator

@morio morio commented Feb 22, 2024

Add support for Plextor CD-ROM drives' 0xD8 SCSI vendor command.
This is enabled by adding

[SCSIx]
VendorExtensions = 1

where x is the SCSI ID for the drive
This feature was requested in issue: #258

This is a CD data read that is mainly for Plextor CDROM drives.
It is a vendor CD Data read used mainly in duplicating CDs.
It support reading more raw data then the other CD Read commands
for better CD cloning.

This is an attempt to address issue #258
The code  now fetches data from the SD card aligned on 512 byte
boundaries. This means prefetching and post-fetching from the SD card
so the unaligned 2352 byte CD sector size can properly fit in the
buffer. To be written over the SCSI bus.

The end case where the last CD sector is read hasn't been addressed yet,
so in theory the buffering code could attempt to read past the end
of the SD card.
Currently the only setting is specific to CD-ROM drives.
Setting `VendorExtensions = 1` under a device heading e.g. `[SCSI3]`
in the `zuluscsi.ini` file will add Plextor's 0xD8 SCSI vendor command.

This enables CD-ROM drives to act as certain models of Plextor's SCSI
CD-ROM drives. This command reads raw CD sectors that are 2352 bytes in
length. It start two sectors before the end of the TOC and since
ZuluSCSI doesn't support images with raw TOC data the sector offset
must start at 2 otherwise it will emit an error message.
The Plextor vendor command doReadD8 now calls doReadCD to save buffer
space in SRAM. doReadCD now internally checks VendorExtensions to
properly output the data over the SCSI bus.
The Pico DaynaPORT build failed to build because it ran out of SRAM.
Decreasing the prefetch buffer by 512B fixed the build issue.

Also updated the GitHub workflow to the new version.
@morio morio marked this pull request as ready for review March 2, 2024 00:01
@aperezbios aperezbios merged commit c90e69b into main Mar 2, 2024
2 checks passed
@aperezbios aperezbios deleted the plextor-d8h-vendor-cmd branch March 2, 2024 00:02
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.

2 participants