aboutsummaryrefslogtreecommitdiffstats
path: root/.gitignore (follow)
Commit message (Collapse)AuthorAge
* 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.
* wasm: run the emulator in a browsergbc dev2026-09-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `make wasm` builds the core to WebAssembly (~44KB stripped) and web/ is a front-end for it: drag-drop a ROM, pixelated canvas at any zoom, keyboard mapped like the native build, battery saves in localStorage. Built with zig cc, which carries its own wasm backend, linker and wasi-libc - so no emscripten dependency, just zig on PATH. Only the portable core goes in; render/kitty/control/main are terminal- and POSIX-bound and stay out. src/wasm.c is the browser's whole host layer: no terminal, no sockets, no files, and no frame pacing (the page's requestAnimationFrame owns that). The machine is static, the RGB888 -> RGBA conversion for putImageData happens in wasm, and nothing allocates per frame. The entire host interface is four WASI fd_* imports, pulled in by the cart info banner's fprintf; the page shims them to console.log in ~20 lines. Cartridge RAM *is* the save file here, so it's exported for the page to persist per cart title (every 5s and on unload). Because both builds now advance on the same frame boundary, the port is checked byte-for-byte against the native binary rather than by eyeballing a canvas - tools/wasm_check.mjs runs N frames in node and diffs the framebuffer against a --shot PPM: cgb-acid2 @60, dmg-acid2 @60, cpu_instrs @600, mem_timing-2 @700, pky.gbc @400 with an imported .sav, cgb-acid2 @120 through the full CGB BIOS boot animation -> all pixel-identical Also smoke-tested in headless chromium over CDP: core instantiates, ROM loads through the file input, canvas animates (7 distinct frames over 5.6s), keyboard reaches the joypad, 60fps, and a 32KB save lands in localStorage. No audio: the APU is still stubbed.
* tools: mk_sl0pboy_bios.py - fork the CGB boot ROM's GAME BOY -> SL0PBOYgbc dev2026-07-18
| | | | | | | | | | | | | The stock CGB boot ROM draws its GAME BOY wordmark from a 192-byte blob at $0607 (routine $03F0 copies it to VRAM tiles $08-$37: 48 tiles, 4 bytes each, every byte a row doubled vertically). This re-encodes that blob with a bold-italic SL0PBOY bitmap of the same size and patches it in place over a local bios/gbc_bios.bin -> bios/sl0pboy_bios.bin. No code moves; the cart's own Nintendo logo ($104) is untouched so the integrity check still passes and the boot hands off normally. bios/ stays gitignored (copyrighted boot ROM); run this to produce the fork locally. Verified end to end: logo drop + color + chime -> gbos.
* main: options-first CLI with --help, and wire up display/boot flagsgbc dev2026-07-17
| | | | | | | | | | | | - Rewrite argument handling: the ROM is now the final argument and options precede it (parsed in argv[1..argc-2] so optional-value flags never swallow the ROM). Add grouped --help/-h, unknown-option errors, and clear 'missing value'/'no ROM' diagnostics. - Add --chrome, --palette/--green, and --bios flags; set the display/capture options before the --shot and recording paths so screenshots and recordings honor them. Make --shot dump the composited capture frame. - gbctl: pass the ROM last when spawning the emulator. - gitignore the (copyrighted) bios/ directory; document all new flags.
* scaffolding: build system, cartridge loader with MBC1/2/3/5, core typesgbc dev2026-07-04