Skip to main content
Topic: ZX Spectrum on FPGA (Read 7231 times) previous topic - next topic

ZX Spectrum on FPGA

It is boring today here on the forum. So ... i decided to share some project i have been up to

Last month I have been digging through my stuff, and found this ZX Spectrum! Cool little computer, even cooler games. After a bit of googling I found FPGA implementation of ZX spectrum. In that moment I knew I WANT IT :).
So i had this sparkfun FPGA board laying around. I needed to build some ram and interface boards to make it work. In mean time (while gathering all the ideas), my friend gave me TFT-LCD display from an old notebook. (1024x768x18bit 15inch) ...

The longer story ... ill probably post on my blog one day.

Short story:
If you put all the pieces together, add some wires, PCBs, loads of time, you will end up with ZX spectrum with TFT display :-).

The VHDL code is not that big, and would easily fit into Logic sniffer, problem is with not enough ram in the fpga. I have the spectrum rom, and dualport videoram inside the fpga, and it takes about 60% BRAM.

Project is originaly zxgate: http://sourceforge.net/projects/zxgate/

With some minor changes and improvements, addidions (like rom inside fpga, LCD panel driver, 48k ram... etc).

Re: ZX Spectrum on FPGA

Reply #1
Very cool, I'm posting this up now :)

Is that a bigger Spartan 3? 144pin and 500K maybe? How much resources does it need?
Got a question? Please ask in the forum for the fastest answers.

Re: ZX Spectrum on FPGA

Reply #2
It's Spartan 3E 500k in pq208 package. The design uses 25ish% of the logic and 80% of BRAM, 2 DCMs for clock generation.

LCD panel is connected through LVDS to a LVDS transmitter (sn65lvds84a). This chip needs to be fed data @65Mhz, 6bit for each color and some control lines. Good thing about these panels is, that they don't need H/V sync signal, and just use one Data Enable signal - so called DE-mode. I am not sure if the FPGA can drive the LVDS panel directly, It should be able, but I don't feel like routing 450mbit/s lines, not with the sparkfun's board. The LVDS transmitter transmits 21 bits over 3 pairs each clock cycle. Some math on that: 65Mhz * 7bit/pair = 455mbits/s/pair. I am pretty amazed by these numbers. The FPGA spits 170megabytes of data each second.

I am planing to remove the "internal" rom, and have it read from the SPI flash instead. Also have the programs loaded from spi flash. This would speed up things, save some BRAM, speedup loading, and add some coolness :)

One thing i have not yet been able to do is (first 2 lines):
http://www.worldofspectrum.org/faq/refe ... InterfaceI
You need to hook on the processor and watch closely for instruction fetching. I just need more time on that.

Re: ZX Spectrum on FPGA

Reply #3
Very cool indeed!

Any chance of publishing updated sources and ISE Webpack project files?

Re: ZX Spectrum on FPGA

Reply #4
In a week I'll be back in Prague, and then I can publish the code. You just need to wait until then..

Re: ZX Spectrum on FPGA

Reply #5
Good stuff :)

Re: ZX Spectrum on FPGA

Reply #6
I have uploaded the files to:

http://robot.mysteria.cz/zxspectrum.tar.bz2

It should also contain the rom files somewhere compiled in :), if you ran into problem, let me know. I should also make note that this spectrum does not use original firmware, but "Gosh wonderful rom". (which is a bit more intuitive while typing commands)

Re: ZX Spectrum on FPGA

Reply #7
Thank you!

Re: ZX Spectrum on FPGA

Reply #8
Seem to be missing:

C:homerobotdevel-vhdlzxromgw03.coe
C:homerobotdevel-vhdlzxromif1-2.coe

Are these important?

Re: ZX Spectrum on FPGA

Reply #9
Yes, those are the roms :-) .... you will need the gw03.coe. I have uploaded it in zip.

http://robot.mysteria.cz/roms.zip

If-0x is my experiment with implementing of ZX spectrums interface 1, but was not successful.

Re: ZX Spectrum on FPGA

Reply #10
Thank you :)

 

Re: Re: ZX Spectrum on FPGA

Reply #11
Speccy2010 - is FPGA based platform, for emulate ZX Spectrum



 Features:
- FPGA: EP2C8Q208C8N
- ARM: STR755FV2T6 (or STR750FV2T6)
- Memory: SDRAM 16 Mb K4S281632J-UC75 (or 32 Mb K4S561632J-UC75)
- Timer: DS1338Z-33+
- 1 slot for SD/MMC
- 2 PS/2 ports (keyboard, mouse)
- 2 port for joysticks (normal or SEGA)
- 1 USB - virtual com for debugging and programming the MCU 
- VIDEO 3 R-2R matrix, at 8 bit (jacks: RGB, Composite, S-Video, VGA)
- AUDIO TDA1543 or 2 R-2R matrix, at 8 bit
- POWER SUPPLY 5V, 1А

Binary for ARM load via  USB virtual com.
Binary for fpga directly load from SD/MMC card.

http://zx.pk.ru/showthread.php?t=12425