Skip to content

Support inserting and ejecting CD-ROMs - #222

Merged
dingusdev merged 4 commits into
dingusdev:masterfrom
mihaip:upstream-insert-cdrom2
Sep 1, 2026
Merged

Support inserting and ejecting CD-ROMs#222
dingusdev merged 4 commits into
dingusdev:masterfrom
mihaip:upstream-insert-cdrom2

Conversation

@mihaip

@mihaip mihaip commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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:

  • Instead of MachineBase::insert_cdrom_image we use an event for CD-ROM insertion, which matches the host -> device communication mechanism for mouse and keyboard input.
  • Cleaner separation of the changes at the BlockStorageDevice/ScsiBlockCmds/ScsiCdromCmds levels. The lowest level (BlockStorageDevice) no longer knows about media changes.

mihaip added 4 commits August 30, 2026 17:50
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
mihaip force-pushed the upstream-insert-cdrom2 branch from 672e757 to 448bac1 Compare August 31, 2026 01:10
@unknownindividualpersonnel

Copy link
Copy Markdown

oh cool, a really essential part of a Mac emulator!

@dingusdev
dingusdev merged commit 21a6b16 into dingusdev:master Sep 1, 2026
7 checks passed
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.

3 participants