ZXFLASH compiles ZX Spectrum BASIC straight to Flash SWF bytecode running in Ruffle
danbri · x · 2026-10-24
- danbri released ZXFLASH: type a ZX Spectrum BASIC program in the browser and JavaScript compiles it directly to an uncompressed .swf, which the open-source Flash player Ruffle executes. Nothing is interpreted in the browser — the BASIC really runs inside the Flash movie.
- Implementation: the Spectrum ROM font becomes sprite glyphs, a bank of square-wave DefineSounds provides BEEP, and the program is compiled to AVM1 (ActionScript 1) bytecode with a small runtime; every edit rebuilds and reloads the movie.
- Supports line numbers, multi-statement lines, PRINT/AT/TAB/INK/PAPER, INPUT, IF/THEN/ELSE, FOR/NEXT, GO TO/GO SUB, plus extensions like REPEAT/UNTIL, arbitrary #RRGGBB colors, RECT, and Emoji-sprite support.
- The author's motivation: this is basically Flash live-coding, but the best game demo in the original was ZX81's 3D Monster Maze, so he built a version with cheery sprites and silly music.
More from coding & agent
- Developer Gets Muse Model Collaborating Inside Zed's DeltaDB Thread — SubtleGradient · 2026-10-24
- AgentGUI at EMNLP 2026: a pixel-art interface for observing and steering AI agents — Michael_D_Moor · 2026-10-24
- Cisco's Antares: a security analyst agent that never leaves your laptop — aminkarbasi · 2026-10-24
- Chromium contributor asks why Claude Code and Codex don't use a headless browser — Kuprel · 2026-10-24
- 5 YC startups building infra for coding agents: Boxes, Caveman, Rystic, Simulithic — KlausCodes · 2026-10-24
- OpenAI DevEx lead to keynote BoxWorks Dev Summit on tools, memory and agentic work — OpenAIDevs · 2026-10-24