Support inserting and ejecting CD-ROMs - #222
Merged
Merged
Conversation
Make backing-image lifetime explicit and reset generic transfer state when an image is detached. Keep device-specific media behavior in callers.
Keep START STOP UNIT decoding in ScsiBlockCmds while letting devices override only the eject action. The default behavior is unchanged.
Let empty CD-ROM drives accept image insertion events and report the change to the guest. Guest eject requests now detach the backing image, and insertion is rejected while media is still present. SDL handles dropped files through the shared event path. The macOS bundle also registers ISO and Toast images for app-icon drops.
mihaip
force-pushed
the
upstream-insert-cdrom2
branch
from
August 31, 2026 01:10
672e757 to
448bac1
Compare
|
oh cool, a really essential part of a Mac emulator! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Includes device-level support for inserting disks (and clearing the image when ejecting) and a SDL "UI" (drag and drop) for triggering insertions.
Take 2 of #221, with the following differences:
MachineBase::insert_cdrom_imagewe use an event for CD-ROM insertion, which matches the host -> device communication mechanism for mouse and keyboard input.BlockStorageDevice/ScsiBlockCmds/ScsiCdromCmdslevels. The lowest level (BlockStorageDevice) no longer knows about media changes.