From 14f78f3cbeea57c2cff17cd2ae8d5387c0b1a7c3 Mon Sep 17 00:00:00 2001 From: SDD Date: Fri, 16 Oct 2026 16:56:24 +0300 Subject: [PATCH] plan: the network provider must be selected per device (interface=-1 is none); index 0 = taptun on this build; NVRAM must not be isolated --- .../plans/2026-10-16-lance-ethernet.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/superpowers/plans/2026-10-16-lance-ethernet.md b/docs/superpowers/plans/2026-10-16-lance-ethernet.md index 85ca92b..cb9b819 100644 --- a/docs/superpowers/plans/2026-10-16-lance-ethernet.md +++ b/docs/superpowers/plans/2026-10-16-lance-ethernet.md @@ -597,3 +597,32 @@ delivered, which is the prerequisite for the crash work. The emulated side needs Attaching the physical NIC to the bridge as well would give the emulated terminal real LAN access, which the LAT/announcement work might want — not required for font delivery, which is host-local. + +--- + +## Which network provider, and how to select it + +Recorded 2026-10-16 after the first end-to-end attempt failed. + +**`-networkprovider taptun` is not sufficient.** It says which module *may* be used; +it does **not** choose an interface for a device. MAME stores that choice **per +device** in `cfg/.cfg`, and the default is `interface="-1"` — i.e. **none**. +With nothing selected, MAME opens no tap, silently, with no verbose output at all. +This was verified directly: an empty cfg directory produces no tap. + +The provider index is build-dependent (it is an index into the provider list, so it +shifts if `pcap` is available), which is why the choice belongs in MAME's UI: + +``` +Tab -> Network Devices -> the LANCE (:lance) -> taptun +``` + +For **this** build the index is **0** (`none.cpp` and `taptun.cpp` present; `pcap.cpp` +in the tree but not usable), determined empirically: `interface="0"` gives the tap +carrier at t+1s, while `1` and `2` give nothing. `run.sh net` therefore uses a +private `-cfg_directory harness/mame/cfg-net/` which holds that selection and +persists across runs — it is gitignored, and a fresh clone must set it once in the UI. + +**The NVRAM is separate and must not be isolated:** the terminal's TCP/IP settings +live there, so the harness keeps the default `-nvram_directory`. Any *test* run +should point somewhere else so it cannot clobber the configured address.