Skip to main content

ZX Spectrum Emulator Runs on Raspberry Pi Pico

The emulator's main menu
(Image credit: Fruit-Bat)

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)

A Raspberry Pi Pico resting on the top edge of a ZX Spectrum

(Image credit: Raspberry Pi Foundation/Bill Bertram)

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.

Ian Evenden
Freelance News Writer

Ian Evenden is a UK-based news writer for Tom’s Hardware US. He’ll write about anything, but stories about Raspberry Pi and DIY robots seem to find their way to him.

  • Roland Of Gilead
    Deadly!! :D Brings me back to my first computer. Played Bruce Lee and Jetpac until my fingers bled.
    Reply
  • TheDane
    "Everybody knows the ZX Spectrum was better than the Commodore 64 "

    I really hope that was sarcasm. Otherwise you should re-educate yourself about the 80s microcomputers....
    Reply
  • splus
    TheDane said:
    "Everybody knows the ZX Spectrum was better than the Commodore 64 "

    I really hope that was sarcasm. Otherwise you should re-educate yourself about the 80s microcomputers....
    That was the best bit of the article! And yeah, everybody knows it.
    Sure, Commodore had a better keyboard and hardware (just a tiny bit faster CPU and, I'll admit, a much better audio). But it only looked as a more professional computer. Spectrum had a much better overall experience and was easier and more fun to use. Those who claim otherwise haven't used it. It's a bit like iPhone users who have never tried Android phones, but think of them as inferior smartphones for the masses.
    Reply
  • NTNLabs
    TheDane said:
    "Everybody knows the ZX Spectrum was better than the Commodore 64 "

    I really hope that was sarcasm. Otherwise you should re-educate yourself about the 80s microcomputers....

    I really hope You're just joking. ZX is indeed better than C64.
    Reply
  • david germain
    Kempston joystick- i can smell the module .
    also how do i spell that tape loading noise.
    eeeeeeeeeeooooooooiuuuuuuuuuuuuuuwwwwwwweeeeeeeeeeeeeeeee

    *nailed it
    Reply