aboutsummaryrefslogtreecommitdiffstats
path: root/web/deploy.sh (follow)
Commit message (Collapse)AuthorAge
* web: the switch builds itself a small network on arrivalgbc dev2026-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | An empty switch is a blank page. The lab now stands up a four-machine demo by itself: one Game Boy runs ircd, one runs httpd, and two more use them - an irc client that joins #gb and says hello, and a web client that wgets the server and pings it. Cards carry a role badge so the shape is readable at a glance. Nothing is faked: every step is a command typed into a real shell over the link port, which is why you can take it over afterwards and keep typing. New controls: "restart demo" and "empty the switch"; "+ plug in a Game Boy" still works the same. Booting four machines at real speed would be a minute of watching banners, so each one is fast-forwarded (6 frames per tick) until it has a lease, then drops back to real time for the part worth watching. Only one is ever boosted at a time - the scenario is sequential - which keeps the total inside the ~12x-realtime budget a single thread has. Whole thing is ready in ~22s. deploy.sh now also refreshes the gitignored web/roms/gbos.gb dev copy. That copy had silently gone stale by two gbos releases, and a local demo run kept reporting "ircd: not found" for a program that was plainly in the ROM - the page was fine, the ROM behind it was from before ircd existed. Verified against the live site: 4/4 leases, roles .2-.5, 60fps each, ircd logs "<gbchat> hello from the other Game Boy", httpd logs "200 /", wget prints the HTML and ping gets 4/4, no exceptions.
* web: network lab - several Game Boys on a virtual switch, in the pagegbc dev2026-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | /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.
* web: boot a demo ROM on arrival, and a deploy script for gbc.sl0p.foogbc dev2026-09-22
The page fetched nothing on its own, so a visitor met an empty canvas and a file picker. It now loads roms/gbos.gb on arrival - gbos being a Unix-ish microkernel for the GBC, which shows off rather more of the emulator than a title screen - with a note pointing at SELECT for its on-screen keyboard and warning that its networking rides a link cable a browser tab doesn't have. Dropping your own ROM still replaces it (and hides the blurb). web/deploy.sh builds the wasm, stages index + wasm + the demo ROM, rsyncs to /opt/sl0p/gbc and curls the three URLs back. The ROM is a build artifact of ~/dev/gbos and deliberately not vendored here; if it's missing the page falls back to "drop in a ROM" on the 404, so the deploy still works. Also fixes a save-path bug that would have bitten the first 128KB cart: String.fromCharCode(...sram) throws RangeError on a spread that big, killing the autosave. Chunked, and the whole thing is wrapped for quota errors.