Skip to content

launcher: add the A2065 Ethernet board to the I/O Ports tab#251

Merged
LinuxJedi merged 2 commits into
mainfrom
feature/launcher-a2065-ethernet
Jul 22, 2026
Merged

launcher: add the A2065 Ethernet board to the I/O Ports tab#251
LinuxJedi merged 2 commits into
mainfrom
feature/launcher-a2065-ethernet

Conversation

@LinuxJedi

Copy link
Copy Markdown
Owner

The machine-configuration screen gains an Ethernet: section on the I/O Ports tab with an A2065 board picker: Not fitted / Isolated / Loopback / NAT. The setting is emitted as [a2065] net through the existing to_raw/from_raw pipeline, so saved files match the hand-written schema ("not fitted" emits nothing; fitted-but-isolated is net = "none"). NAT is only offered when the userspace NAT is compiled in (the net-nat feature), following the serial tcp-connect filter pattern.

Selecting NAT draws a warning under the rows: inbound traffic follows the host clock, so input recordings and save-state replays are not byte-identical while it flows. The loopback backend echoes frames on the emulated clock and an isolated or absent NIC never sees traffic, so only NAT warns. Save states stay enabled with a fitted board: the board state already serializes and the backend is a host resource rebuilt on load (in-flight frames drop; the guest's TCP retransmits).

Also adds net_config_name() as the inverse of parse_net_config(), a launcher-ethernet-warning UI preview render, launcher tests for the cycle order, both round trips, and the warning predicate, and updates the launcher/config/Zorro docs.

Preview (COPPERLINE_UI_PREVIEW=1) with NAT selected:

  • Ethernet: section after Serial:/Parallel: with the [<] NAT [>] stepper
  • accent-colored warning plus two explanation lines under the rows

Unit suite (1720 tests), clippy, and fmt --check are clean.

The machine-configuration screen gains an Ethernet: section with an
A2065 board picker (Not fitted / Isolated / Loopback / NAT), emitted as
[a2065] net through the existing config pipeline so saved files match
the hand-written schema. NAT is only offered when the userspace NAT is
compiled in (the net-nat feature); without it the choice would fit a
board that never connects.

Selecting NAT draws a warning under the rows: inbound traffic follows
the host clock, so input recordings and save-state replays are not
byte-identical while it flows. The loopback backend echoes frames on
the emulated clock and an isolated or absent NIC never sees traffic,
so only NAT warns. Save states already handle a fitted board (the
backend is a host resource rebuilt on load), so snapshotting stays
enabled.

net_config_name() joins parse_net_config() as its inverse for emitting
the backend name from the launcher.
Copilot AI review requested due to automatic review settings July 22, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds launcher UI support for configuring the A2065 Ethernet board from the I/O Ports tab, including config round-tripping and documentation updates, with an in-UI warning when NAT is selected.

Changes:

  • Add an Ethernet: section to the launcher’s I/O Ports tab with an A2065 backend picker (Not fitted / Isolated / Loopback / NAT, with NAT feature-gated).
  • Emit/parse the A2065 net backend through the existing to_raw/from_raw pipeline, including a new net_config_name() inverse helper.
  • Add UI preview rendering for the NAT warning and update relevant documentation.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/video/ui.rs Renders the NAT non-determinism warning in the launcher UI and adds a UI preview render case.
src/video/launcher.rs Adds the Ethernet launcher field/rows, cycles available backends, and serializes the A2065 config.
src/net/mod.rs Adds net_config_name() as the canonical spelling for emitting launcher configs.
docs/zorro.md Documents launcher picker parity and warning behavior for NAT.
docs/guide/ui.md Updates UI guide to include Ethernet section and NAT warning.
docs/guide/configuration.md Notes the launcher Ethernet picker alongside the existing --a2065-net and config schema.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/video/launcher.rs
Comment thread src/video/launcher.rs Outdated
The NAT backend needs the net-nat feature and never comes up on wasm32
(make_backend's cfg gating), but the Ethernet picker filtered the
choice on the feature alone and the determinism warning ignored the
build entirely, so a wasm32 build could offer a NAT that never
connects and a NAT-naming config could warn in a build where the NIC
is actually left isolated (and the run deterministic).

Export the condition as net::NAT_AVAILABLE next to make_backend and
key the picker filter, the warning predicate, and the tests off it so
the three sites cannot drift from what make_backend will do.
@LinuxJedi
LinuxJedi merged commit eac9ae0 into main Jul 22, 2026
14 checks passed
@LinuxJedi
LinuxJedi deleted the feature/launcher-a2065-ethernet branch July 22, 2026 09:44
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.

2 participants