FPGA mSpectrum
In 2008 I started learning about field-programmable gate arrays (FPGAs). The mSpectrum is a long-running FPGA project that gave me hands-on experience with FPGAs while also allowing me to recreate a piece of childhood joy.
During the late 1980s, FPGAs were not part of the electronics master’s curriculum at Twente University. I designed chips by laying out layers of metal and semiconductor material, which at the time was both exciting and extremely complex. Many years later, I found the idea of creating hardware “simply” using a hardware description language (HDL) very intriguing, so I ordered a couple of Xilinx Spartan FPGA development boards and started learning.

First steps with Xilinx Spartan 3E
I started by extending some VGA example code to recreate the ZX Spectrum video system. The ZX Spectrum was the home computer of my youth and still brings back warm memories. I loaded the on-chip FPGA RAM with the loading screen of one of my favorite games and started coding. The next step was optimizing the implementation to support the native resolution of VGA monitors and achieve nice crisp images, with the ultimate goal of reaching full HD (1080p) resolution on the limited Spartan 3 hardware.

To create a minimal working ZX Spectrum in FPGA, I added the open source Z80 core (T80), a copy of the ZX Spectrum ROM, RAM, and a PS/2 keyboard module. Over time I added sound support, a supervisory CPU (based on the Xilinx Spartan 3 PicoBlaze), and firmware to load and save data from SD cards, along with various other features. I also added support for the ZX Spectrum 128K with an AY-3-8912 sound chip core, pushing the Spartan 3 boards close to their limits.

Stepping up to the Spartan 6
The project lay dormant for about five years, and in 2016 I became interested in upgrading to the Spartan 6 FPGA. This was motivated not only by the additional capacity and performance of the chip, but also by the desire to support HDMI in addition to VGA. Around that time I was also improving my electronics design skills and wanted to develop my own FPGA board.
During the second half of 2016 I designed the “mSpectrum Spartan 6 edition” board and adapted the VHDL mSpectrum source code to support both Spartan 3 and Spartan 6 devices. The Spartan 6 board features a single 512 KB SRAM chip with an interface very similar to the PSRAM memory available on the Nexys 2 Spartan 3E board. The PicoBlaze supervisory CPU was also upgraded to the Spartan 6 variant.

mJTAG programmer
To program my own Spartan 6 board, I designed and built a JTAG programmer called “mJTAG”, heavily based on the Bus Blaster project from Dangerous Prototypes.

Larger capacity Spartan 6 boards
My own Spartan 6 board is based on the LX9 version of the chip, which is the largest capacity available in a TQFP-144 package. Larger chips (LX16 and beyond) are only available in ball grid array (BGA) packages and are therefore much more difficult to use in hobbyist designs.
A company called QMTECH offers very affordable Spartan 6 modules containing either LX16 or LX25 chips, with either SDRAM or DDR3 memory onboard. I designed an mSpectrum motherboard for these modules, providing PS/2 keyboard, SD card, sound, VGA, and HDMI connectors.

Supporting Altera / Intel Cyclone V
To broaden my experience with other FPGA vendors, I bought a DE10-Nano board containing an Altera / Intel Cyclone V FPGA. Components such as HDMI rely on vendor-specific code and had to be completely rewritten for the Cyclone V family. Other cores, such as onboard ROM and RAM, had to be rewritten into generic VHDL that could be synthesized by different vendor toolchains

The PicoBlaze supervisory CPU is designed specifically for the Xilinx FPGA fabric and is not written in generic HDL. Although compatible PicoBlaze implementations in generic HDL exist, I chose to move to a new supervisory CPU design: another Z80 CPU based on the T80 core. The firmware was rewritten from PicoBlaze assembly into C code, which is translated into Z80 assembly and machine code using the SDCC cross-compiler.
ZX Spectrum Next
The latest installment arrived in November 2020 in the form of a four-layer motherboard containing two 512 KB SRAM chips for use with the QMTECH boards. This made it possible to run both the popular ZX Spectrum Next core and the mSpectrum core on the same hardware.
