Add hotswappable CD-ROM mode with runtime disc switching#47
Open
GenSayer wants to merge 2 commits into
Open
Conversation
Introduces a `hotswappable` flag for CD-ROM devices that enables on-the-fly disc switching via keyboard shortcuts (RCtrl+F12 native, Ctrl+F12 GUI) without pre-configuring a changer queue or restarting the emulator. Fixes three bugs in legacy changer mode: - load_disc() accumulated discs at index 0 instead of replacing - eject through IRIX failed when hotswappable=true (len guard) New features: - hotswappable = true per-drive config (iris.toml + GUI checkbox) - Runtime disc loading via file picker (RCtrl+F12 / Ctrl+F12) - Empty tray on startup when path omitted (hotswappable only) - GUI config editor: browse button loads discs immediately - GUI: "Extra changer discs" hidden when hotswappable=true Validation: - Errors when hotswappable=false + empty path (suggests enabling, cleaner error message than before) - Errors when hotswappable=true + discs list (mutually exclusive) - Ctrl+F12 disabled with helpful message when hotswappable=false Console logging: - "CD-ROM hotswap: ejected '<path>', tray empty" (hotswappable eject) - "CD-ROM changer: switched to '<path>'" (legacy changer cycle) - "SCSI SGI_EJECT: tray emptied" (hotswappable SGI eject) Config example: [scsi.4] cdrom = true hotswappable = true # path optional — start with empty tray Changes: 13 files, 699 lines - Core: config.rs, scsi.rs, wd33c93a.rs, machine.rs, main.rs, ui.rs - GUI: config_ui.rs, main.rs, handle.rs, scsi_menu.rs, dialogs/new_machine.rs - Docs: iris.toml - Build: Cargo.toml (added rfd for file picker)
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.
Introduces a
hotswappableflag for CD-ROM devices that enables on-the-fly disc switching via keyboard shortcuts (RCtrl+F12 native, Ctrl+F12 GUI) without pre-configuring a changer queue or restarting the emulator.New features:
Validation:
Console logging:
Config example:
[scsi.4] cdrom = true hotswappable = true # path optional — start with empty tray
Changes: 13 files, 699 lines