Close
0%
0%

Z80 + RP2350B ZX-compatible homebrew retrocomputer

ZX Spectrum-compatible homemade retrocomputer based on Z80 CPU + discrete RAM and ROM + Raspberry RP2350B as ULA/chipset

Similar projects worth following
This is a retrocomputer compatible with ZX Spectrum and based on real Z80 + discrete RAM/ROM + rp2350b to cover ULA functionality programmatically. Specification: CPU: Z84C00AB6 Z80A CPU DIP-40 ROM: W27c512-45z DIP-28 RAM: 2xHM62256ALP-10 DIP-28 ULA: WeAct RP2350B Core board Video: - VGA (DE-15) 720x576p emulating Spectrum PAL resolution - HDMI (not implemented yet). Audio: Speaker on board Cassette interface: Jack 3.5mm for smartphone headset jack Keyboard: Handmade Joystick: - Retro DA-15 GamePort joystick interface connected to expansion connector, emulating Kempston port 1F. - Sinclair Joystick 1 in parallel to keyboard 6-0 (connector not soldered yet).

This is not a cycle-perfect zx spectrum compatible computer and, to be honest, it is not perfect at all. But it works and was able to run all games I've already tried. The intention was to create a computer using mostly technologies of years 1980-1990 so all components are THT except USB-C connector and jack connectors. And, of course, WeACT rp2350b Core board, but it is also kind of THT :) 

No SD cards, no other speed-loading methods. You can only use your cassette recorder or smartphone to load/save programs via audio cable.

However, the video output is VGA and HDMI. VGA output uses 720x576p on 50Hz, horizontal lines are doubled to emulate ZX Spectrum video resolution. 576 lines is less than 625 PAL lines so I had to reduce bottom border to 48 lines instead of original 56.

HDMI is still in progress.

Note that almost everything Spectrum-specific is implemented programmatically in rp2350b firmware. In general you have classic Z80 computer with 16K ROM out of 64K 27c512 chip switchable by DIP-switches, 32K static RAM dedicated to Z80 and 16K static RAM shared between rp2350b and Z80. You can write your own ROM and your own rp2350b firmware to implement any kind of a video controller and input/output functionality. For example it may be a good challenge to use all 16K of shared RAM as a video memory and emulate CGA video modes like 320x200 etc. Also there is an expansion connector having all Z80 signals. I used it to connect kempston-like interface for old-style GamePort joystick but it can be used for any external device.  

Software sources and KiCAD projects can be found in my git repository https://github.com/kysilv/z80-rp2350b-zx-compatible

The project is in progress. Initially I made several mistakes in schematic and even in PCB so first version of working device doesn't look very nice. KiCAD projects have been fixed but fixed version is not implemented "in metal" yet.

Hardware

(software/firmware description added below)

Current schematic:

The ROM/RAM part is quite simple:

Here is 32K static RAM chip HM62256 and 64K EEPROM 27c512 sliced to 16K banks that can be switched using DIP-switches. /ROMCS signal exposed to an expansion connector and can be overwritten by external device.

Video RAM and rp2350b playing "ULA" role are here:

I've tried to separate "ULA" data bus and CPU data bus by resistors only, same as in original ZX Spectrum and it works perfectly. To separate address bus and RD/WR control signals I used buffers 74ls541 controlled by rp2350 software. After some timings adjustment it works too...

CPU clock signal is generated by rp2350b according to the memory contention scheme and amplified by transistor s9018 identically to the original ZX Spectrum schematic. 

CPU RESET is initially controlled by rp2350b GPIO15 during startup but also there is a button for manual reset afterwards.

Connectors j6 KB1 and j7 KB2 are for keyboard. J5 Joystick is for Sinclair joystick 1 which is just parallel to keys 6,7,8,9,0. I intentionally selected some 9-pin d-sub connector footprint to get the pads on PCB and decide later on actual pin mapping for some physical joystick that I don't have yet.

There are two 5V power connectors just for convenience so you can use USB-C or barrel jack whatever power supply you have.

Video outputs VGA and HDMI:

Resistor/diodes networks schematic I found here: https://github.com/fruit-bat/pico-zxspectrum

My initial idea was to automatically detect what connector the monitor is connected to and load corresponding PIO ASM code to support VGA or HDMI. Hopefully it will be possible to detect monitor using ADC of rp2350b. Currently only VGA is implemented.

HDMI is still under investigation.

Couple photos:

I can't recall if black color should be changed by BRIGHT command to grey... If yes, then this is an issue to think and fix..

Cassette/audio interface is probably the worst part of the schematic:

... Read more »

  • 1 × Z84C00AB6 Z80A CPU DIP-40 Microprocessors, Microcontrollers, DSPs / Microprocessors (MPUs)
  • 1 × W27c512-45z ROM 64K DIP-28 Memory ICs / EEPROMs
  • 2 × HM62256ALP-10 RAM 32K DIP-28 Memory ICs / Static RAM (SRAM)
  • 2 × SN74LS541 Buffer Logic ICs / Buffers, Drivers, Transceivers
  • 1 × SN74LS32 OR logic gate

View all 8 components

  • HDMI - another idea

    Vlad2 days ago 0 comments

    Thanks to comments on Jenny's article, another idea came into my mind - VGA to HDMI adapter. I have digital RGB/Bright/VSYNC/HSYNC signals out from my "ULA" rp2350b and only need to translate them to TMDS. There are some specialized chips like tfp410 for this purpose but probably much easier would be using another Raspberry mcu  and do it in software. Looks like something like rp2040-Zero must be good for this task:

    The task is to catch VGA output from "ULA" GPIOs:

    and translate them into TMDS for HDMI output. Looks like it should be possible to put the Zero board "instead" of resistors R49 - R51 on existing PCB:

    The resistors still have to be installed somewhere though.

    To be continued...

  • HDMI/DVI

    Vlad6 days ago 0 comments

    Well, I investigated HDMI/DVI stuff a bit. For 720x576x50 progressive video mode, which works perfectly via analog VGA, the calculations doesn't look optimistic. Pixel rate in this mode is 27MHz which means bit rate 270MHz. To implement it in this project I have to do the following:

    1. Overclock rp2350b deep enough to handle 270MHz bit rate. It looks possible. At least there are a lot of projects doing this, especially for HDMI/DVI support.
    2. Recalculate some timings and delays in existing software. Not a big deal.
    3. Implement the functionality itself to support DVI. This is the challenge. However, there are successful implementations can be found in the net.

    The real obstacle to move forward with this implementation is probably current PCB design. I'm not sure if it will work for 270MHz bit rate. First of all, rp2350b is located on WeAct board which connected to PCB with a connector. Then HDMI and VGA networks are messed up a bit on the PCB itself. Unfortunately, I didn't take into account DVI timings when designed the PCB.

    For now it looks like there is no sense to even try implementing HDMI/DVI output with the current schematic and design.

  • Joystick adapter

    Vlad07/08/2026 at 16:23 0 comments

    Initially I planned to find some cheap used joystick on flea market and just install switches instead of whatever it has on its axis to connect it as Sinclair joystick 1. But then I realized that there are still analog joysticks with DA-15 GamePort connector available even new on marketplaces so I found one for only $3.5. Ok, it took another $4 for delivery.. :)

    These joysticks use analog potentiometers for X and Y axis and switches for buttons:

    I decided to design an adapter to use the joystick as is and connect it as Kempson interface to appear on port 1Fh.

    Circuit diagram of the adapter:

    I used LM324 op-amp to translate analog potentiometers resistance to digital On/Off signal. Thresholds to switch Up/Down/Left/Right bits On or Off can be set using RV1 - RV4. 

    Button signal must be inverted so I used 74LS00 for all needed logic here. Another option would be using buffer with inverted outputs in place of 74LS541 and set up op-amps network accordingly. I guess it would be less natural so it doesn't worth it.

    Prototype of the PCB:

    KiCAD project includes PCB design. I'm continuing to use the prototype, it works perfectly.

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates