<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sl0pboy.git/web/gbhub.js, branch master</title>
<subtitle>sl0pboy - a Game Boy Color emulator (companion to the gbos OS)</subtitle>
<id>https://git.sl0p.foo/sl0pboy.git/atom/web/gbhub.js?h=master</id>
<link rel='self' href='https://git.sl0p.foo/sl0pboy.git/atom/web/gbhub.js?h=master'/>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/'/>
<updated>2026-09-23T14:12:03Z</updated>
<entry>
<title>web: refresh the demo ROM story - gbos now serves IRC and HTTP</title>
<updated>2026-09-23T14:12:03Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-09-23T14:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=de20598590151591faad089f74009d44452a919f'/>
<id>urn:sha1:de20598590151591faad089f74009d44452a919f</id>
<content type='text'>
gbos picked up an IRC server (and httpd before it), which is a much better
advert for the lab than `ls`: one Game Boy runs the daemon, another connects
over the virtual switch. Verified on the live site end to end - GB0 `ircd &amp;`,
GB1 `irc 10.0.0.2 gb1`, `/join #gb`, and the message lands:
`&lt;gb1&gt; hello from sl0p.foo`. The header now suggests exactly that, plus the
httpd/wget pair.

Two display fixes fell out of running it:

  - irc(1) is a colour client, so the console mirror was printing raw CSI
    sequences as "[44m[37m..." - the decoder dropped the ESC byte but kept
    the rest. It now tracks ESC / CSI state and discards the whole sequence.
    The LCD still renders the colours; only the plain-text mirror strips them.
  - the LCD is 40 columns, so full-width output (irc's status bar) arrives
    space-padded. The mirror isn't column-aligned, so it squeezes runs of
    whitespace and drops lines that were nothing but padding.

The ROM itself isn't vendored here (it's a build artifact of ~/dev/gbos that
deploy.sh ships), so this commit is the page copy and the decoder.
</content>
</entry>
<entry>
<title>web: network lab - several Game Boys on a virtual switch, in the page</title>
<updated>2026-09-22T17:50:10Z</updated>
<author>
<name>gbc dev</name>
<email>gbc@localhost</email>
</author>
<published>2026-09-22T17:50:10Z</published>
<link rel='alternate' type='text/html' href='https://git.sl0p.foo/sl0pboy.git/commit/?id=c1ce018c20c8b9f10b849c1b10c6862b666ea2f6'/>
<id>urn:sha1:c1ce018c20c8b9f10b849c1b10c6862b666ea2f6</id>
<content type='text'>
/net.html plugs Game Boys into a switch that leases them addresses and routes
between them: add one, add another, and they ping each other. Unplug either
and its address goes back to the pool for the next one.

web/gbhub.js is tools/gbhub (gbos) ported to the browser - SLIP framing, DHCP
OFFER/ACK, unicast routing, broadcast flooding and ICMP echo for the gateway.
It deliberately has no uplink: NAT needs a TUN device and a tab has no raw
sockets, so packets addressed off-net are dropped and logged as "no route"
rather than pretending.

web/gbcore.js wraps one wasm instantiation as a GameBoy object. Several Game
Boys are several instantiations of the same compiled Module - the core keeps
its machine in a static, so each gets its own linear memory and is isolated
for free. Measured 12.3x realtime per instance, so the page caps at 6.

Each card gets a text input, because unframed link bytes are console I/O: it
lands on the shell's stdin like tools/gbtype, so you can run `ping 10.0.0.3`
without the on-screen keyboard.

Verified headless (node, two Game Boys through the hub: 2/2 leases, ping
4/4 received) and in headless Chrome against the live site: 4 Game Boys at
60fps each, leases .2-.5, typing into a card's console pings another, unplug
frees the address and a replug reclaims it, no exceptions.
</content>
</entry>
</feed>
