Tag: pico-8
16 posts tagged with "pico-8".
Same bytes, different song
Celeste's soundtrack sounded wrong on the console, so I diffed the cart against the BBS: byte-identical. Two synth bugs later - a music clock that cut bars to a quarter, and a noise fit that matched the wrong metric - the envelope correlation went from 0.49 to 0.94.
The shell, the stack and the secret palette
Two days building the console's v2 shell: a SPLORE-souled library, a crash hunt that ended eight kilobytes from a stack floor, and PICO-8's hidden palette arriving over an 8-bit wire.
Nine FPS under the clouds
Cattle Crisis opened its first level at 9 FPS on the H753. One day of hardware A/Bs later it holds 58, Dank Tomb stopped dying of OOM, and the biggest single win was a compiler flag I should have set weeks ago.
The cart is the artwork
The cartridge shell got redesigned around the PICO-8 label: a flush sticker pocket, the proper chamfered corner, hidden pins - and the whole thing test-fitted virtually, sticker against pocket, before printing a single gram or sheet.
What all the wires are for
A guided tour of Rusty Nail as it stands: the little OS on screen, the four breakout boards doing the real work, and the Game Boy cartridge shell hiding a 16 MiB SPI flash chip.
Three by three, and the heap that lied
The HDMI picture was pixel-perfect and still looked soft. Fixing that took one good idea (a 3x full-resolution palette scanout) and one long afternoon of being framed by a heap that only sometimes existed.
The Cartridge That Killed Its Own Soundtrack
The morning after deleting the old Lua core: 32,000 lines gone, everything played - and then the speakers started clicking. Two wrong fixes, one command trace, and the crossfade every PICO-8 reimplementation eventually learns it needs.
The Default Flips
Stage 9: the fixed-point core becomes THE runtime. Getting there took an executor split, a clock experiment, two optimisations executed for measuring zero, a one-byte regression that cost 19 carts, and a PLL trick that ended the night at 59fps on jumper wires.
The Ghost, the Ladder, and the Cartridge
One evening, three fronts: a haunted iterator that cloned the player, a link clock ladder re-measured rung by rung, and a physical cartridge that finally keeps its saves.
The Swap, Measured
z8lua lands behind a flag: a bug class from a C port, an allocator caught red-handed on the pad, a licensed PICO-8 pressed into service as an oracle, and a compatibility matrix instead of a feeling.
Measure First: the Runtime Baseline
Before any z8lua code lands, Stage 1 of the runtime migration: a permanent benchmark instrument, input tapes recorded from real play, and the numbers the new VM has to beat.
Why I Didn't Replace the PICO-8 Runtime
I sat down to decide whether the homegrown PICO-8 runtime should be replaced with an existing emulator. Twenty-one test cartridges, four codebase teardowns and two cross-compiles later, the answer was: keep everything, swap one organ.
It was never the password
Rusty Nail can now download PICO-8 carts over WiFi and run them from a pop-up launcher. Getting there meant a reason-15 rabbit hole that turned out to be my own off-by-one, a GPIO pin that genuinely died on the bench, and a coexistence crash I caused myself.
16 megabytes for a 32-kilobyte game
I want to dock a physical cartridge into the fantasy console, so I picked the flash chip, mapped the firmware, and found most of the work was already done. None of it is built yet - this is the plan.
A divide per pixel
Once the SPI panel was off the critical path, the frame became the cart's own Lua and the slow part moved inside it. A missing string builtin, then the real prize: a stretched-sprite blit doing an integer divide per pixel on a chip with no fast divide. The profiler found it; the obvious guess was wrong. About 41fps to about 58fps.
Running real PICO-8 Lua on a Cortex-M7
Vendoring Lua 5.4 into a bare-metal firmware, the 64-bit integer bug that printed 42 minus two-to-the-32, and why a hardware watchdog beat an instruction-count hook for stopping runaway carts.