ZX Spectrum inside CPLD

I found an old ZX Spectrum clone made in Soviet Union in the 90’s. It was my computer, I wrote several programs on it and also, I wrote drivers for Epson printer on this hardware. This model has Soviet chip КР580ВВ55А (Intel i8255) and I used this port for the LPT interface and some custom hardware.
I powered it and without results- old crappy Soviet chips are dead. At least 3 chips were bad and the quality of PCB prevented me from full repair.
Soviet ZX Spectrum clone

After some analysis of this computer, I decided that it is very simple, and I can write it in Verilog hardware description language even with my amateur knowledge. Also, I have several trashed PCBs with Altera MAX chip (CPLD). And these boards are populated with small fast SRAM chip (32K only, but 12ns speed).
ZX Spectrum clone in CPLD VGA mode

Here is my first version of the ZX Spectrum clone in CPLDs. I’ve used two boards as I didn’t want to use an external RAM chip. I added CPU and ROM only. And my main idea is to build computer from scratch by myself. Another goal- VGA connection, not TV.

This is not very informative schematics, all stuff is plain System Verilog:
Intel Altera Quartus screenshot of ZX Spectrum clone

First run of the system. Basic is working and there is only a small bug in the left side of the screen. It took about a week to find it and it was completely in another place of code.
ZX basic is working- small bugs in leftmost pixel

I think I made an error in the interpretation of the BRIGHT command- I think that the PAPER attribute is not affected with this bit.
All color modes and VGA monitor screen

My system is made from a programmer’s point of view and I was not aware that ZX slows down CPU when accessing video RAM- my system with 12ns RAM is completely transparent for CPU. Time arbiter is slotting CPU and VGA controller access to RAM in such a way, that there is no collision and WAIT cycles. I was wondering if this will not conflict with the tape interface, but everything is OK. Old commercial software is loading and some programs are too fast.
Tape loading is OK

Tape interface is much better than in original speccy:
improved ZX spectrum tape interface
Using fast comparator and self zeroing circuit made tape loading much more stable than I remembered from old times.

About Administrator

I am owner of this site.
This entry was posted in Anything, FPGA, MCU and tagged , , , , . Bookmark the permalink.

Leave a Reply

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