Close

Installing a Spectrum Emulator on the Raspberry Pi

A project log for ZX Keyboard

An Arduino based project to convert an old broken ZX Spectrum computer in to a USB keyboard.

Alistair MacDonaldAlistair MacDonald 08/10/2014 at 17:141 Comment

As the origins of this project was to use the keyboard with a Spectrum emulator running on the Raspberry Pi I decided it was time to actually do this. I have tested the keyboard with the Pi, but until now have not installed an emulator on it.

Some good news is the Spectrum emulator Fuse has already been ported to the Raspberry Pi and is easy to install if you are using Raspbian. To install the Fuse “SDL” version (that will run in full screen from the command lane) just log in and from the command line run the following command...

sudo apt-get install fuse-emulator-common fuse-emulator-sdl fuse-emulator-utils spectrum-roms

Next we should make it start in full screen. From the console type in “fuse-sdl” and the emulator will start. Next press F1 (yes, sorry, the ZX keyboard does not have an F1 key so you will need to use another keyboard for now), select “Options”, and “Full Screen”. To make this the default press F1 and select “Options” again, then select “Save”. To exit use the F10 key.

Now I think we will need a good old game to play. The best place to look for Spectrum games that are distributed legally is at http://www.worldofspectrum.org/ . The simple way to load a game using the ZX Keyboard is from the command line. For example we can load Manic Miner (assuming we downloaded the game and extracted it to the working directory) with the following command.

fuse-sdl --tape "Manic Miner.tzx"

Annoyingly I have come across one problem with Fuse and the ZX Keyboard. Fuse maps each key to a Spectrum key, letter to letter, number to number, shift becomes Caps Shift, and Ctrl become Symbol Shift. All other keys are ignored. This is a problem as we are interpreting and translating the symbols already. For example the Symbol Shift P as a double quote (a shifted 2), but the emulator treats this as the Caps Lock being pressed. We could make the ZX Keyboard work flawlessly by turning off our translation, but we would lose compatibility with PC software. I might look at building in a way to changing modes but we will have to cope with this for now.

Discussions

Gavin wrote 08/26/2014 at 13:23 point
I am doing something very similar based on the build from here: http://blog.tynemouthsoftware.co.uk/2013/04/arduino-leonardo-based-zx81-usb-keyboard.html

I have modified it to also allow for the "symbol shifted" symbols and I am using an Arduino Pro Micro.

I think I have the same issue you have identified in your last paragraph. My code works great on a regular PC and my raspberry PI but does not work at all inside the emulator. Can you expand on the issue for me and any solutions because it is exceeding my level of knowledge to know why a simple press of the letter p on my spectrum keyboard does nothing but the same press on a "proper" keyboard works fine?

  Are you sure? yes | no