Everybody knows the ZX Spectrum was better than the Commodore 64, but what’s even better is Spectrum emulation on the RP2040 chip, better known as the Raspberry Pi Pico, with video output that suits modern screens.
Brought to our attention by the official Raspberry Pi Twitter account (opens in new tab), the emulator is the work of the wonderfully named Fruit-Bat on Github (opens in new tab), where they have also ported MAME to the Pi (opens in new tab).
The software has some advantages over the original 48k and 128k ZX hardware: quick-save slots, compatibility with USB keyboards and joysticks, an on-screen menu system and the ability to load from .z80 snapshot files and .tap tape images. The whole thing is still a work in progress, with Sinclair and Kempston joystick compatibility added just a few days ago.
The project recently moved over to Pimoroni’s FatFS (opens in new tab) MicroPython library from no-OS-FatFS-SD-SPI-RPi-Pico due to a problem with SD card pins, and supports hardware from simple breadboards to the Pico-based RetroVGA (opens in new tab) universal computer emulator by bobricius.
Despite being at a relatively advanced stage, there are still issues with the emulation. There are currently many audio filters on GitHub, trying different treatments for the sound output, with the plea that if anyone discovers a particularly nice sounding one, they submit it. Our memories of the Spectrum are that it wasn’t a particularly nice sounding device, especially when loading games, but it will be good to see what the community comes up with. There's also an issue with the emulated Z80 processor being interrupted at the end of each 60 Hz frame. This is because the original machine sent frames at 50 Hz, but increasing the processor speed to 4 MHz (from 3.5 MHz) helps.
All the code for the emulator is available on Github, with complete instructions for building your own, and Fruit-Bat has posted a screenshot of it running the new ZX Spectrum game The Swarm is Coming (opens in new tab) without a rubber keyboard in sight, in case you were wondering what to do with it once you’ve compiled it.