Last week I was made aware of this post on RS DesignSpark about a project, currently in the very early planning stage, to build a Sinclair Spectrum on an FPGA. As it happens I have a similar project well under way, and I have promised to write it up…
Several years ago I implemented most of the ULA in VHDL on a MAX7000 CPLD, mainly as an exercise to brush up on my HDL. I didn’t have enough space to fit the keyboard interface so it was pretty useless, but it did boot! The complete system used a pair of SRAMs, real Z80 and the Sinclair ROM in flash.
Back at the beginning of this year I decided to brush up on my HDL again and I bought myself an Altera DE1 development kit. The heart of this board is a Cyclone II FPGA with a range of support hardware including 512KB SRAM, 8MB SDRAM, 4MB flash, an I2S audio codec, VGA port and the usual switches, LEDs and buttons. I would highly recommend it for anyone looking for a relatively cheap way to play with FPGAs.
This time I decided to put as much as possible into the FPGA. All the core ULA logic is in there along with a Z80 soft-core (T80 from opencores), the ROM, proper bus routing (the real Spectrum used a lot of tricks that simply aren’t an option in an FPGA), VGA scan-doubling for the video output, logic to drive the I2S audio codec, plus a PS/2 keyboard interface. Apart from the audio codec, which is absolute overkill and only used because it is already on the board, the only other key part external to the FPGA is the SRAM. This is used for both contended and non-contended memory regions by a method which I will cover in a later installment.
A full write-up will follow, along with better pictures, video and full VHDL for the project once it has been cleaned up a bit. In the meantime here are a couple of photos of the thing in action (click for bigger, and yes I did load that from a real tape!)