Repository navigation
Create empty CD-ROM drives for SCSI-based machines - #227
Conversation
Includes dingusdev/dingusppc#227 which fixes mounting of CD-ROMs on the 7300 and other SCSI-based machines. For #237 and #219
|
Related to c3737bb |
|
Regarding 4d3322b |
|
We want to be able to not add a CD-ROM drive. Therefore, my suggestion would be to enable the We want to be able to add multiple empty CD-ROM drives, so allow These features already exist in my fork. More notes: For
A machine sub-device list includes a device If a default hard disk is specified but an In my fork, I have a method For the main fork, we can change the ATI bus and devices to work like the SCSI devices. |
4d3322b to
bf8c14b
Compare
|
Thanks for the feedback @maximumspatium and @joevt. I've reworked this a bit:
|
AFAIK, the only commands that can be issued without any media are INQUIRY and REQUEST_SENSE. |
|
Keep in mind that READ CD is about to be moved to |
bf8c14b to
d9f3264
Compare
|
@maximumspatium I did another pass on this, |
|
If I read your changes correctly, |
|
@maximumspatium yes, the pre-command check for media being present means that the TEST_UNIT_READY handler never runs directly when there is no media, but the refactored logic The current behavior/implementation is because I was trying to follow your feedback to centralize the media present checks. If you'd like, I can go back to the original implementation (c3737bb) or a variant of it, where we more explicitly check for media insertion on CD-ROM reads only. |
Well, my intention was to minimize code. Theoretically, no SCSI CD-ROM or block device command will work without media so we'd need to check for media presence in every command. I suggest you check for This way, I also suggest to move
Because |
The 7300 ROM tries to read from an empty CD-ROM drive during boot. We would try to transfer data from an unallocated buffer and crash. Return NOT READY / MEDIUM NOT PRESENT for reads, capacity requests, and TOC requests. Also covers the separate ATAPI READ CD path. This matches the behavior described in ATAPI 2.6 section 8.5 and the per-command error tables: https://www.grix.it/UserFiles/marco.c/INF-8020.pdf
We only created SCSI CD-ROM drives when an image was supplied at startup, so later insertion requests had no drive to go to. The Beige G3 already worked because its ATAPI drive is always created. Extend the ATAPI approach (where a `cdr_config` property defines the bus where a CD-ROM drive should be attached) for SCSI-based machines too. Use it to define default drive on the appropriate bus for PDM, TNT, Catalyst, Alchemy, Gazelle, and Pippin. Supplying images at startup still uses the existing drive allocation behavior.
d9f3264 to
92b956e
Compare
|
Thanks for the feedback, I think it's cleaner now (except for the special-casing in |
|
LGTM |
Follow-up to #222, to support inserting CD-ROMs on more machines.
We only created SCSI CD-ROM drives when an image was supplied at startup, so insertion requests had no drive to go to. The Beige G3 already worked because its ATAPI drive is always created. Enable a default drive on the appropriate bus for SCSI-based machines.
Creating an empty drive exposed another issue: the 7300 ROM tries to read from it during boot. We would try to transfer data from an unallocated buffer and crash. The first commit fixes this by returning NOT READY / MEDIUM NOT PRESENT for reads, and other requests. This matches the behavior described in ATAPI 2.6, section 8.5 and the per-command error tables.