diff options
| author | user <user@clank> | 2026-07-17 12:15:09 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-07-17 12:15:09 +0200 |
| commit | d102366e6808f74ef98044374d744e453efdbefa (patch) | |
| tree | 6f35b79e4e0fb01c432262fbb5254f39331717ad /Makefile | |
| parent | net: real routed IP via SLIP<->TUN bridge (you can *ping* a Game Boy) (diff) | |
| download | gbos-d102366e6808f74ef98044374d744e453efdbefa.tar.gz gbos-d102366e6808f74ef98044374d744e453efdbefa.tar.xz gbos-d102366e6808f74ef98044374d744e453efdbefa.zip | |
net: ping - GB-originated ICMP echo (a Game Boy pings the real internet)
New `ping [A.B.C.D]` program (PROG_PING=27, bank 29): builds and sends ICMP
echo requests from 10.0.0.2, then reads replies off the link port. It keeps
reading SLIP frames until it finds *our* echo reply, skipping the IGMP/mDNS/
SSDP multicast noise that shares 10.0.0.0/24. Reply wait uses a generous
srecv_nb spin budget since the emulator runs uncapped (no timer syscall yet).
Verified over the tunbridge (with NAT):
/# ping 10.0.0.1 -> 4/4 received, ttl=64 (the SLIP peer/host)
/# ping 1.1.1.1 -> 4/4 received, ttl=56 (Cloudflare, real net!)
ttl=56 is a real internet round trip (64 minus the hops). Combined with the
host being able to ping the GB, the Game Boy is now a full two-way ICMP host.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -20,7 +20,7 @@ $(BUILD)/%.o: src/%.asm | $(BUILD) # C programs: compiled with SDCC into ROM-bank blobs and INCBIN'd by programs.asm CBLOBS := c/chello.bin c/echo.bin c/true.bin c/false.bin c/uname.bin \ c/pid.bin c/cat.bin c/wc.bin c/head.bin c/args.bin \ - c/ls.bin c/save.bin c/rm.bin c/sh.bin c/ps.bin c/kill.bin c/spin.bin c/blk.bin c/mkdir.bin c/count.bin c/ptest.bin c/necho.bin c/wget.bin c/chat.bin c/netd.bin + c/ls.bin c/save.bin c/rm.bin c/sh.bin c/ps.bin c/kill.bin c/spin.bin c/blk.bin c/mkdir.bin c/count.bin c/ptest.bin c/necho.bin c/wget.bin c/chat.bin c/netd.bin c/ping.bin $(BUILD)/programs.o: $(CBLOBS) # C programs also depend on the shared libc sources |
