plan: the network provider must be selected per device (interface=-1 is none); index 0 = taptun on this build; NVRAM must not be isolated

This commit is contained in:
SDD committed 2026-10-16 16:56:24 +03:00
1 parent b65d9ef670
commit 14f78f3cbe
1 file changed
+29
@@ -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/<game>.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.