feat(static): Pocket Static — one TypeScript game, three cartridges (GBA/GB/NES), starring BOARDROOM#121
Draft
doodlewind wants to merge 6 commits into
Draft
feat(static): Pocket Static — one TypeScript game, three cartridges (GBA/GB/NES), starring BOARDROOM#121doodlewind wants to merge 6 commits into
doodlewind wants to merge 6 commits into
Conversation
… runtime E2E green - spec/isa.ts single source of truth: stack-VM ISA, text tokens, debug block, per-target table; gen-c.ts emits runtime/gen/spec_gen.h - vm/ref.ts reference interpreter + strict semantics tests (14) - compiler: real expression compiler over generator ASTs (locals, control flow, short-circuit, switch, CALL subroutines, macro inlining with static binding + for...of unroll, FMT text interpolation) (23 tests) - rpg category: DSL, model builder, linker, portable C engine (vm.c/rpg.c) - GBA: packager + HAL + libmgba harness; smoke-game E2E 35/35 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… with GBA - sdcc/SM83 bare-metal runtime (own crt0, no GBDK): window-layer textbox, STAT-gated VRAM write queue, HRAM OAM DMA, MBC5 blob banking - targets/gb.ts packager: DMG 2bpp shade LUTs, banked data emission, makebin + rgbfix drive - portable-core hardening: sdcc 4.6 SM83 miscompiles some u8*u8 multiply frames (__muluchar) — engine arithmetic rewritten as accumulation/shifts - vblank-budget lesson: writes past mode 1 are silently dropped on DMG; the queue drains max 12 cells per vblank behind a STAT+LY gate Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…105/105) - cc65/ca65 runtime with custom crt0: NMI-owned OAM DMA + VRAM write ring (single + fill-8 entries), CHR-RAM upload, UNROM bus-conflict-safe bank latch, attribute-row-aligned textbox (rows 24-29, subpal 3) - targets/nes.ts: planar 2bpp + NES master-palette reduction, generated ld65 config + iNES header, per-bank data segments - jsnes harness paces scenarios on the debug block's tick counter, so cc65's multi-frame ticks keep scenarios tick-accurate - nes maps cap at 32x24 (attr granularity): closing the box restores fills Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Five days in November 2023, playable: the Vegas call, the guest badge, Shear's 72 hours, the Microsoft feint, 743 signatures, Ilya's flip, and a final negotiation battle against THE BOARD (rpg/battle.ts — a whole battle system as compiler macros, zero new runtime). - games/boardroom: game.ts + deterministic pixel-people art + dossier.md (verified quotes/dates; original parody dialogue) - rpg/battle.ts: reusable battle DSL library (macro inlining + static unroll + FMT damage lines) - compiler: helper macros importable across modules; registry survives cached asset modules - story E2E: the reference VM plays the whole beat list and its event log becomes the console input script — 17 checkpoints x 3 consoles, 51/51 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…product line - remove aot/ (superseded by static/; PR #52's multi-target prototype is re-implemented fresh there) - tsconfig: @pocketjs/static path aliases; include static/ - site: /aot/ product page + docs -> /static/ (new copy, 6 fresh doc pages, E2E captures as the demo slideshow), home targets card updated - skills: release + imagegen notes point at Pocket Static - static/README.md: the product face; static/docs/*.png site captures Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gba/gb open in the Homebrew mGBA.app; nes serves a local jsnes web player (same core as the E2E harness), so seeing the NES build needs no installs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Pocket Static (
static/,@pocketjs/static) — a new static game compiler that replaces@pocketjs/aot: you write a game as one TypeScript module (build-time declarations + generator scripts that never execute), and the compiler partially evaluates it into real cartridges for GBA, Game Boy, and NES. Supersedes #52's prototype with a fresh implementation, and ships a launch game: BOARDROOM, the November 2023 OpenAI board crisis as a five-day RPG.How
script(function* (s, v, f) {...})bodies lower from their ASTs to a stack VM: locals, i16 expressions with folding,if/while/for/switch, short-circuit&&/||,break/continue, subroutineCALLs, and macro inlining with static binding (for...ofunrolls, staticiffolds,returnvalues).${...}interpolation compiles to scratch-var stores + textbox format tokens. 23 compiler tests run against a TypeScript reference VM — no emulator in the loop.rnd(); a fixed-layout debug block mirrored at a per-console address; headless harnesses (libmgba for GBA+GB, jsnes for NES) drive identical scenarios and hold every console to the reference VM's answers. For the story suite, the reference VM plays the whole game first and its event log becomes the console input script.rpg/battle.ts: a complete turn-based battle system written as compiler macros — zero bespoke runtime; each encounter compiles to specialized bytecode.static/games/boardroom/): the Vegas call, the guest badge, three CEOs in three days, the Microsoft feint, 743 signatures, Ilya's flip, and a final negotiation battle vs THE BOARD. Every quoted line pinned to the public record indossier.md; the rest is labeled parody. Cast art is a deterministic pixel-person generator in the declaration zone.aot/: tsconfig aliases, the site product page + docs (now/static/, 6 fresh pages, E2E captures as the demo), and skills updated;site/build.tsgreen end-to-end.Testing
ROM sizes: BOARDROOM ≈ 28.5 KB (.gba), 32 KB (.gb, MBC5), 32 KB (.nes, UNROM+CHR-RAM). Headers are flashcart-correct; real-hardware runs not yet attempted.
Follow-ups (not in this PR): codex/PixelLab imagegen sheet upgrade for the cast (the deterministic art is the fallback by design), VN/platformer categories, cjk16 text mode, NES scrolling.
🤖 Generated with Claude Code