Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,17 @@ image) where the guest test suites showed they differed:
earlier keeps its `threads = 1` until **Automatic** is ticked.
- The CI tab's **Ping** and the CI self-test reach the configured CI socket.
- The **Use built-in PROM** button no longer leaves a `prom` iris refuses.
- The stopped-machine summary lists NVMe and Fibre Channel disks, names SCSI
targets on a second bus as `controller:id` (also in the missing-disk prompt),
leaves out the Origin 3200's unused SCSI map and shows an unplugged or
stream Ethernet.
- The New machine dialog names the machine after the chosen model (`o2`,
`octane`) until a name is typed, and asks for a motherboard EEPROM only on
the Indigo2, as the settings editor now does.
- The summary shows the machine folder and paths relative to it, cut to the
panel's width; coloured buttons (Start, Stop, Create, …) have white text;
the status footer says "No network" instead of a network light on a machine
with networking off, and names a stream network.

## October 2026

Expand Down
1 change: 1 addition & 0 deletions clanker/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ Host GL pass-through for guest GL programs (`iris-hostgl`).
| [cdrom-hot-insert-remount.md](gui/cdrom-hot-insert-remount.md) | rule | GUI CD-ROM insert must hot-load + remount /CDROM |
| [cmd-q-bypasses-close-intercept-fold-on-poweroff.md](gui/cmd-q-bypasses-close-intercept-fold-on-poweroff.md) | rule | macOS Cmd+Q bypasses the close-intercept — fold CHD overlays on power-off, not just quit |
| [cycles-ptr-must-be-cleared-before-dropping-the-machine.md](gui/cycles-ptr-must-be-cleared-before-dropping-the-machine.md) | rule | iris-gui: clear the cached `CyclesPtr` before dropping the Machine |
| [summary-and-disk-preflight-live-in-summary-rs.md](gui/summary-and-disk-preflight-live-in-summary-rs.md) | rule | iris-gui summary and missing-disk preflight are per-profile, in `summary.rs` |
| [removed-config-keys-must-be-folded-not-deleted.md](gui/removed-config-keys-must-be-folded-not-deleted.md) | rule | Retired MachineConfig keys: keep + fold in `fold_deprecated`, or old gui.json locks the GUI |
| [egui-default-font-glyph-coverage-avoid-tofu.md](gui/egui-default-font-glyph-coverage-avoid-tofu.md) | rule | egui default fonts: which glyphs render, which are tofu |
| [gfxdisplay-is-generic-new-boards-need-no-gui-wiring.md](gui/gfxdisplay-is-generic-new-boards-need-no-gui-wiring.md) | design | A new graphics board needs no `iris-gui` capture wiring |
Expand Down
26 changes: 26 additions & 0 deletions clanker/gui/summary-and-disk-preflight-live-in-summary-rs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# The stopped-machine summary and the missing-disk preflight live in `summary.rs`

Status: rule, 2026-11.

**Symptom (issue 304).** On an O2 the summary and the Start preflight looked
Indy-only: the summary listed `[scsi]` and nothing else, the missing-disk
modal named an O2 external-bus target by its raw `[scsi.KEY]` key, which reads like an internal-bus target or a
number the Disks tab never shows, and an
Origin 3200 listed the `[scsi]` map it never uses. The original report (an
O2 summary showing the Indy's PROM, memory and disks, and Start stopping at
"missing disk" until a `[scsi.N]` existed) dates from when the O2 kept its
own `o2.prom`/`o2.disks`/... keys. Those are now deprecated and folded into
the shared keys by `MachineConfig::fold_deprecated`, so reading the shared
keys is right for every profile, as long as the file goes through
`from_toml_str` (`gui-reads-configs-through-core-parse.md`).

**Rule.**
- Work out what the summary lists and what the preflight checks in
`iris-gui/src/summary.rs` (`drives`, `network`, `missing_disks`,
`expansion_paths`), from the config alone, so tests need no window.
- Name SCSI targets with `extra_ui::scsi_name` (controller:id), never the
`[scsi.KEY]` key; keep the key only for detaching.
- A new place disks can live (another expansion card, another machine's own
map) goes into `drives` and, if a missing image would make `Machine::new`
exit, into `missing_disks` or `expansion_paths`.
- The IP35 bricks take no `[scsi]` disks; both functions skip that map there.
17 changes: 13 additions & 4 deletions iris-gui-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ cargo tree -p iris | grep -E 'egui|eframe|rfd' # should print nothing
When no machine TOML files exist, the **New machine** dialog opens
automatically. You'll be asked for:

- **Name** — names the machine folder and its TOML file. Conflicts get a
- **Name** — names the machine folder and its TOML file. Until you type
one it follows the model (`indy`, `o2`, `octane`, …). Conflicts get a
numeric suffix (`indy`, `indy-2`, …). Names cannot contain path separators
or reserved filename characters.
- **Machine model** — any of the twelve profiles listed below. **Processor**
Expand Down Expand Up @@ -137,15 +138,23 @@ work.

The window is split into a **control column** on the left and the **emulator
screen** on the right. The screen shows the live framebuffer once a machine is
running (with an overlay while it is powered off). The **VM screen** scale in
running (with an overlay while it is powered off); while the machine is
stopped it shows a summary of the selected machine: its folder, platform,
processor, PROM, NVRAM, memory, drives and network. Paths in the machine
folder are shown relative to it; a path too long for the panel is cut short,
and its tooltip shows it whole. The drives are the ones that machine starts
with: SCSI targets by controller and ID (`1:3` is ID 3 on the second bus, such
as the O2's external connector), the NVMe card and Fibre Channel disks. The
Origin 3200 and Onyx 3000 show no SCSI targets, as they take none. The **VM screen** scale in
the View menu is the maximum draw scale: a larger window (fullscreen, maximised,
resized) centres the picture at that scale, and only a smaller window shrinks it
to fit.

The control column holds, top to bottom: the drop-down menus, the capture
button and hint, the configuration editor, and a status footer (run state,
machine name, MIPS, kernel tick **Hz**, graphics FIFO depth, and the **NET**
light for the internal network).
light for the internal network, or "No network" on a machine with
`[network] mode = "off"`).

### Menus

Expand Down Expand Up @@ -409,7 +418,7 @@ guards every reachable exit:

| Exit site | When | iris-gui guard |
| --- | --- | --- |
| SCSI attach failure in `Machine::new` | configured image file missing | **Pre-flight**: `App::missing_disks()` runs before sending `Cmd::Start`. If any image is missing, a modal lists them with **Cancel / Edit Disks tab / Detach missing & start**. |
| SCSI attach failure in `Machine::new` | configured image file missing | **Pre-flight**: `summary::missing_disks()` runs before sending `Cmd::Start`, on the selected machine's SCSI targets (none on the IP35 bricks). If any image is missing, a modal lists them by controller and ID with **Cancel / Edit Disks tab / Detach missing & start**. An unreadable NVMe or Fibre Channel image stops the start with a message instead. |
| PowerOff handler (`machine.rs`) | IRIX `halt` finishes | iris-gui sets **`IRIS_NO_EXIT_ON_POWEROFF=1`** in `main()`. iris skips the `exit(0)`; the machine is still stopped cleanly. |
| CI socket `quit` (`ci.rs`) | CI tab enabled | Same env-var guard. |
| Anywhere a `Machine` method panics | such as a bad image or a parse failure | **Worker thread `catch_unwind`** in `handle.rs` around `Machine::new`/`start`/`stop`. The worker stays alive and emits `Evt::Error` instead. |
Expand Down
15 changes: 14 additions & 1 deletion iris-gui/locales/en/main.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ status-net-nat-active-tip = NAT networking. The guest is sending traffic.
status-net-nat-idle-tip = NAT networking. No traffic from the guest yet. It may have no IP address, or one outside the NAT subnet.
status-net-nat-off-tip = NAT networking. The machine isn't running.
status-net-off-tip = The machine isn't running.
status-net-stream = Stream
status-net-stream-active-tip = Stream networking. The guest is sending traffic.
status-net-stream-idle-tip = Stream networking. No traffic from the guest yet.
status-net-unplugged = No network
status-net-unplugged-tip = This machine has no Ethernet connection ([network] mode = "off").
status-net-check = Check
status-net-check-tip = Diagnose guest networking.
# $scale is a number such as 1 or 1.25.
Expand Down Expand Up @@ -413,6 +418,7 @@ welcome-unsaved = Unsaved
welcome-machine = Machine: { $name } ({ $profile })
welcome-autosave-pending-subtitle =
welcome-summary = Summary
welcome-folder = Folder
welcome-platform = Platform
welcome-processor = Processor
welcome-processor-running = Processor (running)
Expand All @@ -423,15 +429,22 @@ welcome-nvram = NVRAM
welcome-memory = Memory
welcome-memory-running = Memory (running)
welcome-drives = Drives
# $id is the SCSI ID.
# $id is the SCSI target: its ID, or controller:ID on a second bus.
welcome-drive-daynaport = SCSI { $id }: DaynaPort Ethernet adapter
welcome-drive-cdrom = SCSI { $id }: CD-ROM, { $path }
welcome-drive-disk = SCSI { $id }: disk, { $path }
welcome-drive-cdrom-empty = SCSI { $id }: CD-ROM, tray empty
welcome-drive-disk-no-image = SCSI { $id }: disk, no image chosen
welcome-drive-nvme = NVMe: disk, { $path }
# $id is the disk's loop ID.
welcome-drive-fc = Fibre Channel { $id }: disk, { $path }
welcome-drives-subtitle =
welcome-network = Network
welcome-network-bridged = Bridged to { $iface }
welcome-network-nat = NAT on { $subnet }
welcome-network-nat-default = NAT on 192.168.0.0/24 (default)
welcome-network-off = Off (no Ethernet)
welcome-network-stream = Stream segment to { $peer }
welcome-start = ▶ Start

## Status footer: machine
Expand Down
6 changes: 3 additions & 3 deletions iris-gui/src/config_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ fn show_general(ui: &mut Ui, cfg: &mut MachineConfig, mem_ctx: MemoryUiContext)
path_row(ui, "octane_flash", &mut flash, Pick::SaveFile, &nvram_filters());
cfg.octane.flash = if flash.is_empty() { None } else { Some(flash) };
ui.end_row();
} else if crate::extra_ui::mc_machine(cfg.machine.profile) {
// The O2's NVRAM is its own PROM flash, already covered by `nvram`
// above; it has no separate motherboard EEPROM.
} else if crate::extra_ui::has_nveeprom(cfg.machine.profile) {
// Only the Indigo2 has a motherboard EEPROM: the Indy's PROM
// environment is in the NVRAM, the O2's in its flash (`nvram`).
ui.label(t!("config-nveeprom"))
.tip(t!("config-nveeprom-tip"));
path_row(ui, "nveeprom", &mut cfg.nveeprom, Pick::SaveFile, &nvram_filters());
Expand Down
3 changes: 1 addition & 2 deletions iris-gui/src/dialogs/create_disk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ impl CreateDiskDialog {
ui.add_space(6.0);
ui.horizontal(|ui| {
if ui.button(t!("common-cancel")).clicked() { close = true; }
if ui.add_enabled(!exists || self.overwrite, egui::Button::new(t!("dialog-create-disk-create"))
.fill(Color32::from_rgb(60, 110, 60))).clicked()
if ui.add_enabled(!exists || self.overwrite, crate::extra_ui::filled_button(t!("dialog-create-disk-create"), Color32::from_rgb(60, 110, 60))).clicked()
{
// Create file on disk now (making the parent dir first,
// e.g. the managed <machine dir>/disks on first use).
Expand Down
50 changes: 42 additions & 8 deletions iris-gui/src/dialogs/new_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl Default for NewMachineDialog {
fn default() -> Self {
Self {
open: false,
name: "indy".into(),
name: default_name(MachineProfile::default()).into(),
profile: MachineProfile::default(),
cpu: &parts::R4400_150,
graphics: iris::config::GraphicsBoard::Newport,
Expand All @@ -62,6 +62,13 @@ impl Default for NewMachineDialog {
}
}

/// The name a new machine of `profile` gets until the user types one:
/// the profile's name up to its board number (`o2`, `octane`, `indigo2`).
pub fn default_name(profile: MachineProfile) -> &'static str {
let name = profile.name();
name.split_once('_').map_or(name, |(model, _)| model)
}

/// Fill the profile's banks largest first, without gaps.
pub fn distribute_ram(total: u32, profile: MachineProfile) -> [u32; iris::config::MAX_BANKS] {
let mut remaining = total;
Expand Down Expand Up @@ -118,6 +125,11 @@ impl NewMachineDialog {
}
});
if self.profile != profile_before {
// A name the user has not changed follows the model.
let name = self.name.trim();
if name.is_empty() || name == default_name(profile_before) {
self.name = default_name(self.profile).into();
}
self.cpu = self.profile.cpus()[0];
self.graphics = if self.profile.ip28() { iris::config::GraphicsBoard::SolidImpact } else { iris::config::GraphicsBoard::default_for(self.profile) };
self.use_embedded_prom = true;
Expand Down Expand Up @@ -204,9 +216,9 @@ impl NewMachineDialog {
});
ui.end_row();

// The O2's NVRAM is its own PROM flash, already asked for
// above; it has no separate motherboard EEPROM.
if crate::extra_ui::mc_machine(self.profile) {
// Only the Indigo2 has a motherboard EEPROM; the Indy keeps
// its PROM environment in the NVRAM, the O2 in its flash.
if crate::extra_ui::has_nveeprom(self.profile) {
ui.label(t!("dialog-new-machine-eeprom"))
.tip(t!("dialog-new-machine-eeprom-tip"));
ui.horizontal(|ui| {
Expand Down Expand Up @@ -338,11 +350,10 @@ impl NewMachineDialog {
ui.add_space(6.0);
ui.horizontal(|ui| {
if ui.button(t!("common-cancel")).clicked() { close = true; }
let name = if self.name.trim().is_empty() { "indy" } else { self.name.trim() };
let name = if self.name.trim().is_empty() { default_name(self.profile) } else { self.name.trim() };
let valid = crate::machines::validate_name(name);
if let Err(e) = &valid { ui.colored_label(Color32::from_rgb(230, 140, 70), e); }
if ui.add_enabled(valid.is_ok(), egui::Button::new(RichText::new(t!("dialog-new-machine-create")).strong())
.fill(Color32::from_rgb(60, 110, 60))).clicked()
if ui.add_enabled(valid.is_ok(), crate::extra_ui::filled_button(RichText::new(t!("dialog-new-machine-create")).strong(), Color32::from_rgb(60, 110, 60))).clicked()
{
let mut cfg = MachineConfig::default();
cfg.machine.profile = self.profile;
Expand Down Expand Up @@ -385,7 +396,7 @@ impl NewMachineDialog {
..Default::default()
});
}
let name = if self.name.trim().is_empty() { "indy".to_string() } else { self.name.trim().to_string() };
let name = if self.name.trim().is_empty() { default_name(self.profile) } else { self.name.trim() }.to_string();
self.result = Some(NewMachineResult { name, cfg });
close = true;
}
Expand All @@ -395,6 +406,29 @@ impl NewMachineDialog {
}
}

#[cfg(test)]
mod name_tests {
use super::{default_name, MachineProfile};
use crate::extra_ui::has_nveeprom;

#[test]
fn default_names_follow_the_model() {
assert_eq!(default_name(MachineProfile::IndyIp24), "indy");
assert_eq!(default_name(MachineProfile::O2Ip32), "o2");
assert_eq!(default_name(MachineProfile::OctaneIp30), "octane");
assert_eq!(default_name(MachineProfile::Indigo2Ip28), "indigo2");
for p in MachineProfile::ALL {
assert!(crate::machines::validate_name(default_name(p)).is_ok(), "{p:?}");
}
}

#[test]
fn only_the_indigo2_has_a_motherboard_eeprom() {
let with: Vec<_> = MachineProfile::ALL.into_iter().filter(|&p| has_nveeprom(p)).collect();
assert_eq!(with, vec![MachineProfile::Indigo2Ip22, MachineProfile::Indigo2Ip28]);
}
}

#[cfg(test)]
mod ram_tests {
use super::{distribute_ram, MachineProfile};
Expand Down
13 changes: 13 additions & 0 deletions iris-gui/src/extra_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ pub fn mc_machine(profile: MachineProfile) -> bool {
matches!(profile, MachineProfile::IndyIp24 | MachineProfile::Indigo2Ip22 | MachineProfile::Indigo2Ip28)
}

/// A button filled with `fill` (the green Start, the red Stop, the blue
/// confirm buttons). Its text is white: the theme's text colour is dark grey
/// in light mode, which can hardly be read on these fills.
pub fn filled_button<'a>(text: impl Into<egui::RichText>, fill: egui::Color32) -> egui::Button<'a> {
egui::Button::new(text.into().color(egui::Color32::WHITE)).fill(fill)
}

/// Whether `profile` has the Indigo2's motherboard EEPROM (`nveeprom`). The
/// Indy keeps its PROM environment in the NVRAM, the O2 in its flash.
pub fn has_nveeprom(profile: MachineProfile) -> bool {
matches!(profile, MachineProfile::Indigo2Ip22 | MachineProfile::Indigo2Ip28)
}

/// Whether `cfg.prom` runs the PROM built into iris: `(embedded)`, an empty
/// value the GUI writes as `(embedded)` before a start, or the default name
/// with neither it nor the machine's release file name in the machine
Expand Down
Loading