launcher: add the A2065 Ethernet board to the I/O Ports tab#251
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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_rawpipeline, including a newnet_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.
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.
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.
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] netthrough the existingto_raw/from_rawpipeline, so saved files match the hand-written schema ("not fitted" emits nothing; fitted-but-isolated isnet = "none"). NAT is only offered when the userspace NAT is compiled in (thenet-natfeature), 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 ofparse_net_config(), alauncher-ethernet-warningUI 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 afterSerial:/Parallel:with the[<] NAT [>]stepperUnit suite (1720 tests), clippy, and
fmt --checkare clean.