ZX Raspberry Version 2

In which our hero downsizes radically

A couple of months ago we held the first in the ‘regeneration’ of the Milton Keynes Raspberry Jam. I took along my ZX Raspberry for all to see and wonder over. One eager and Sinclair-experienced attendee soon put me in my place. “Shame it’s so laggy”, he said. Ah. A brief defence of the necessary compromises in design ensued but I had to admit he was right, it was laggy; too laggy to be of any real use if you finally want that Jetpac high-score.

A couple of weeks later, in one of those classic ‘shower’ moments, I realised that the build was vastly overcomplicated. Recent Raspberry Pis have more than enough GPIO inputs for the ZX Spectrum’s keyboard matrix (13) and my experiences with the Atarpi project had shown me that handling keyboard inputs in Raspian had come a long way.

So here’s the original ZX Raspberry:

And here’s our version 2:

Keep it simple, right? This version takes all the keyboard lines direct to the GPIO (with a switch for handling keyboard modes) and uses a Python script to scan the keyboard for presses which uses the python-uinput module to inject those keypresses into the kernel. Did I think Python would work? Not for a second. It did. Brilliantly. The new ZX Raspberry v2 is significantly more responsive and the Raspberry Pi Zero W has plenty of horsepower to run everything.

I also decided to move to RetroPie as the OS for this project as it is just so good and refined. Setup was a breeze and Fuse works perfectly. I’ve finally got rid of that dratted mouse pointer too. As a bonus, the bluetooth capabilities of the Zero W mean I could pair a PS3 controller and use it as a Kempston joystick. Again, never expected it to work. Again, worked perfectly.

My ZX Raspberry v2 made its debut at the second Milton Keynes Raspberry Jam last weekend. There were no complaints*.

* Ok, one. “Have you got Chuckie Egg?” “Does this look like a BBC to you?”

UPDATE: After many requests, I’ve made the Python keyboard scanning script available on Github along with some notes to get you started.

Leave a Reply

Your email address will not be published. Required fields are marked *