Skip to content

48k ZX Spectrum Interface using an Arduino for loading from SD card

Notifications You must be signed in to change notification settings

titmouse001/ZX-Spectrum-48k-Arduino-Interface

Repository files navigation

ZX Spectrum 48k Arduino Interface - 48k .sna Game Loader

This project aims to load .SNA files into the 48k ZX Spectrum using a low-cost hardware interface built around an Arduino.

Interface Features

The Snapshot Game Interface for the ZX Spectrum 48K includes an SD card slot (hidden at the back) for loading .SNA snapshots directly from an SD card. An OLED display provides basic status information, while the game list is shown on the ZX Spectrum's screen. It also features a port for a Kempston joystick.

The ZX Spectrum display shows 24 games per page, scrollable via the joystick or interface buttons, with full game loading taking about half a second using the forward, backward, and play file selector buttons.

Pressing the play button during a game will return you to the game selection screen.

Currently, games must be in .sna format and placed in the root directory of a FAT32-formatted SD card.

Additional Features

The interface offers some additional features. If you hold down the left button on power-up, it will display all the .SCR files on the SD card. (.SCR files are screen dumps from the ZX Spectrum)

.SNA files, on the other hand, are snapshot files that capture the entire state of the ZX Spectrum’s memory and registers at a specific moment allowing you to resume a game from the exact point it was saved. Currently, the interface cannot save to .SNA files.

Additionally, the interface can start up in the standard Spectrum ROM if you hold down the middle play button during power-up.

PCB Created With EasyEDA

Back Photo view Front

I've been using JLCPCB with EasyEDA for my PCB design and fabrication, as EasyEDA is a free and simple-to-use circuit designer

Hardware Design (Ver 0.14)

Circuit Diagram The hardware design uses a minimal chip count. It includes a 27C256 EPROM, which holds the Z80 machine code for accepting data and restoring the snapshot state. The Arduino manages data transfer to the ZX Spectrum, coordinating the interface. The interface primarily utilizes the data bus, with glue logic enabling the external ROM’s function.

To address issues caused by returning to the original internal ROM at game start, the setup uses a duplicated Spectrum ROM. The first half of the external EPROM contains the .SNA loading and launch code, allowing the ZX Spectrum to use the external ROM during startup. Once a game is loaded, the second half of the EPROM provides the stock ROM for normal operation. The Arduino Nano, with its limited pin count, employs a 74HC165D shift register to support a joystick. The 74HC245D transceiver allows the interface to enter a high-impedance (Z) state to avoid conflicts between the Arduino and the data bus. The 74HC32 provides the necessary glue logic to manage and monitor I/O signals.

https://oshwlab.com/titmouse001/zx-spectrum-interface

Initial Prototypes...

Prototype Evolving...

Next Step - The ROM

Warning: No EPROMs were harmed in the making of this project… but they were definitely burned a few times!

Making Progress ROM On Stripboard

First PCB - Mistakes Were Made!

Releases

No releases published

Packages

No packages published

Languages