aboutsummaryrefslogtreecommitdiffstats
path: root/include/gbos.inc
diff options
context:
space:
mode:
authoruser <user@clank>2026-07-17 03:01:58 +0200
committeruser <user@clank>2026-07-17 03:01:58 +0200
commit0e5889c7dd431d7cb4cdaacea2702065fd96839f (patch)
treec6cf8b15ad4529511f1574553ee7bcd42c101858 /include/gbos.inc
parentnet: IP stack milestone B - UDP echo (pseudo-header checksum) (diff)
downloadgbos-0e5889c7dd431d7cb4cdaacea2702065fd96839f.tar.gz
gbos-0e5889c7dd431d7cb4cdaacea2702065fd96839f.tar.xz
gbos-0e5889c7dd431d7cb4cdaacea2702065fd96839f.zip
net: real routed IP via SLIP<->TUN bridge (you can *ping* a Game Boy)
tunbridge.py opens a TUN device (gbtun0, 10.0.0.1/24), NATs 10.0.0.0/24 out to the internet, spawns the emulator, and bridges raw IP packets on the TUN to/from SLIP frames on the link serial. The Game Boy (10.0.0.2) becomes a genuine routed IP host: the host kernel routes its packets for real, so the host's own `ping` command reaches it and netd answers. Verified: `sudo python3 tools/tunbridge.py netd --test` 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.61 ms 4 packets transmitted, 4 received, 0% packet loss Two hard-won gotchas baked in: - Under sudo, ~ expands to /root, so resolve EMU/ROM via $SUDO_USER's home. - Only start feeding host->GB packets AFTER netd is running; raw packet bytes delivered to gbos's shell (before netd claims the serial) corrupt the shell and crash the emulator. gb->host draining starts immediately. Requires /dev/net/tun (on Proxmox LXC: allow cgroup2 device c 10:200 rwm + bind-mount /dev/net/tun into the container).
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions