Hello r/MiSTerFPGA!
I just released the 1.0 version of P8, 1Retro's PICO-8 core. It plays PICO-8 carts (.p8 or .p8.png) straight from the SD card, on your TV, with your controllers.
Demo video: https://youtu.be/sutLdo-J3-k
How it works
This is not a hybrid core and not an emulator running on the ARM (unlike the existing PICO-8 core, which runs zepto8 there). The whole console is in the FPGA:
- a soft RISC-V CPU at 100 MHz with extensions to speed up Lua,
- a hardware blitter for the drawing functions,
- a hardware audio unit that synthesises the oscillators, noise, the sfx filters and the effects.
When you load a cart, the BIOS compiles its Lua to native code on the core itself, with a progress bar, and then runs it. No SDRAM module needed; it runs on a stock MiSTer.
Install
Add the Downloader database once, and Update All keeps the core and the BIOS up to date:
wget -O /media/fat/downloader_p8.ini https://raw.githubusercontent.com/one-retro/P8_MiSTer/db/downloader_p8.ini
Then run Update All. The core appears under Console. Put your carts in games/P8/ and load them from the OSD (F12 → Load Cart).
Features
- Joystick and PICO-8 keyboard controls for 2 players; mouse and keyboard for carts that use them
- The cart's pause menu with the cart's own items, also reachable from the OSD
- Cart saves (high scores, progress) and 4 save state slots (Alt+F1–F4 / F1–F4)
- Multi-cart games;
.p8c files bundle a game's carts into one
- Show FPS overlay
What to expect
I tested about 700 carts from the PICO-8 BBS in a cycle-accurate simulator of the core: every cart compiles, about nine in ten play 600 frames of random input without an error, and about two thirds never drop a frame. I also played over 100 carts by hand on the MiSTer (I like PICO-8 games, eh). For the sound, I recorded PICO-8 playing a set of test notes and fitted P8's synthesizer to it.
Not there yet: the 0x5f40 slowdown effect and waveform instruments. Save states only load on the same core version. Launcher carts can't fetch carts from the BBS (no network); load the cart they ask for from the OSD.
If a cart misbehaves, please open an issue with its name, BBS link and what happened: https://github.com/one-retro/P8_MiSTer/issues
Release notes and source (GPL-3.0): https://github.com/one-retro/P8_MiSTer
MiSTerFPGA forum post: https://misterfpga.org/viewtopic.php?t=11204
Disclaimers:
PICO-8 is made by Lexaloffle Games; P8 is not affiliated with or endorsed by them. If you enjoy these carts, buy PICO-8 and support the people who make them.
AI helped write the core and the compiler. I know RISC-V, compilers and FPGAs well, but credit where credit is due: AI helped a lot.