MiST ZX Spectrum 48K

Although I loved the others, too, still ZX Spectrum was my real computer in the 80’s. From the hardware point of view it was a relatively simple machine, comparable to its main competitor, the C64. Spectrum's sound was poor next to the SID chip, the ULA could not draw sprites, the “famous” attribute clash effect was visible everywhere. Who knows why, millions of people loved this machine anyway. I was one of them. I am.
I had several implementations for an FPGA, that I created earlier. Some other developers also worked on a spectrum recreation, so no surprise, it finally it ended with an usable ULA Verilog module on the opencores.org website. The widely used T80 core (Z80 softcore) implementation is also available, and this version is as close as possible to the original CPU in terms of timing. Almost 100% compatible. Almost. There is a slight difference in the I/O cycles, and sometimes it’s visible, but the majority of the ZX Spectrum programs will run just as on the original hardware. So this is the combination I have chosen for the real reimplementation of the ZX Spectrum model 48K (which is identical to the 16K model, only has more RAM).

I put these parts together along with the MiST modules (SDRAM controller, OSD display, USERIO and DATAIO modules), so my MiST version started to work.I know that there is a feature-rich version already published for the MiST, but try to understand, I HAD TO create my own. :-)

I did not care about extra hardware. All I wanted is a real ZX Spectrum 48K. Now my version can load the widely supported .SNA snapshot files and produce RGB+Sync signals compatible with the PAL video timing. You need a Euro Scart cable for this core. As it uses RGB signals, the picture quality as good as it gets. For loading the .SNA files I had to patch the Spectrum ROM a bit, so the original LOAD routines are replaced with a small Z80 assembly program, that loads the .SNA and execute it.

The hardware also needed some minor changes. In order to load the SNA file, a small RAM space is needed which does not interfere the main RAM area where the snapshot is loading in. For this I opened a small RAM window (16 bytes at $04B0..$04BF) inside the ROM. There was a forgotten ZX81 subroutine called "program name" at the address $04AA, unused by the spectrum. This area is used now by the assembly program placed at the address $0556, where the original LOAD routine seated before. A couple of temporary bytes and the CPU stack is in this window while the snapshot is loading.

The video memory (same way as in my other cores) is inside the FPGA. However contention would not be necessary here, in order to maintain the original timing, it is implemented. The upper 32k of the spectrum memory and the SNA buffer placed in the MiST SDRAM. When the user selects an SNA file on the OSD menu, the hardware loads the entire SNA content into the SDRAM just above the first 64K. Then the SNA loaded gets the bytes from there.

Some extra features will be added to the original hardware. I can't tell why (probably nobody shall use these), just doing it for fun.
Plans for the future:
Images:

The simplest memory test is to print out the value of the USR "a". I should be around 64K, at the end of the memory.
In case of a 16K spectrum, this value would be around 32K.

Testing the border timing with a simple basic program. The program itself and the result.

Manic Mincer and Jet Set Willy. 100% Spectrum.

More games, please. Jetpac loading screen and the Lode Runner in game screen.

Testing if timing is perfect. The games Aquaplane and Dark Star use border effects. They seem perfect.

Testing Starion. Now you can see that half cycle differnce in the I/O cycles I mentioned above.
Although the full screen numbers look great, the left side of the border effect has some issues.

I love Ms.Pac-man, so took a pic about it, too. Then see how the MiST OSD works.

Finally, this is the screen of the developer environment called Quartus.

Downloads:
ZX48.RBF /no VGA support jet, only for Scart cable/
ZX48.ROM
Some games

Thanks to: ... and a bigger list will be coming here, but I was in a hurry to publish what I have done so far.

Links and references:

[Home | FPGA development]