ZX Spectrum Games on the RC2014

762 views
Skip to first unread message

Sir Isaac

unread,
Mar 4, 2017, 1:18:41 PM3/4/17
to RC2014-Z80
This might seem like a really dumb question. What would it take to run ZX Spectrum games on the RC2014?
I'm eagerly waiting on my RC2014 in the mail and researching projects to work on.

Kipper Klank

unread,
Mar 4, 2017, 1:30:08 PM3/4/17
to RC2014-Z80
In ZX Spectrum ROM games there's a lot of information in there that has to do with video processing and screen refresh rates. sadly there's not much video processing in the RC 2014 at the moment.

Here's a kit that is basically a completely faithful reproduction of the ZX Spectrum. ( except that it uses composite out instead of radio frequency.)

https://www.tindie.com/products/tynemouthsw/minstrel-zx80-clone/?pt=full_prod_search

If you look at how this thing is put together and the integrated circuits being used, you could possibly use what materials you have already of the RC 2014 and work from there.

Point being ROMs for a ZX Spectrum are very specific about the architecture of the computer itself if it's not exactly the same it probably won't work

Kipper Klank

unread,
Mar 4, 2017, 1:32:26 PM3/4/17
to RC2014-Z80
Someone please correct me on any mistakes I have made for the sake of legitimacy!

*I'm still learning aka a noob*

Spencer Owen

unread,
Mar 4, 2017, 1:46:44 PM3/4/17
to rc201...@googlegroups.com
Just to clarify;

On 4 March 2017 at 18:30, Kipper Klank <delph...@gmail.com> wrote:
In ZX Spectrum ROM games there's a lot of information in there that has to do with video processing and screen refresh rates. sadly there's not much video processing in the RC 2014 at the moment.

With the exception of about 10 games, ZX Spectrum games are loaded from tape in to RAM, not ROM 

Here's a kit that is basically a completely faithful reproduction of the ZX Spectrum. ( except that it uses composite out instead of radio frequency.)

https://www.tindie.com/products/tynemouthsw/minstrel-zx80-clone/?pt=full_prod_search

That is not a ZX Spectrum.  It's a ZX80.  The clue is in the name.  They are different machines and a game from one will not load on the other. 


If you look at how this thing is put together and the integrated circuits being used, you could possibly use what materials you have already of the RC 2014 and work from there.

Yeah, the CPU is the same.  That's about it. 

Point being ROMs for a ZX Spectrum are very specific about the architecture of the computer itself if it's not exactly the same it probably won't work

Fundamentally, though, the answer about the video processing being different is close.  The rest of the architecture, such as keyboard interaction, memory allocation, sound, and the specific ZX Spectrum ROM are different between that and an RC2014.  However, the CPU is the same, so any raw machine code written for the Spectrum will run on the RC2014 - although if it behaves the same will depend if it relies on the Spectrum hardware or not.  Also, the Spectrum has Sinclair BASIC in ROM, and the RC2014 has Microsoft BASIC in ROM.  These are fundamentally a similar thing, so if there are BASIC programs in a magazine listing, for example, they will probably work or can be adapted to work on a RC2014 - although, again, the caveat about relying on Spectrum hardware stands.  

So, if your goal is to play Manic Miner on your RC2014 then you are sadly out of luck.  But if you want to run simple machine code routines or BASIC programs for the Spectrum on your RC2014 then you stand a fair chance.

Hope that helps :-)

Spencer

Kipper Klank

unread,
Mar 4, 2017, 1:54:38 PM3/4/17
to RC2014-Z80
One word, ZORK.

Sir Isaac

unread,
Mar 4, 2017, 1:58:01 PM3/4/17
to RC2014-Z80
Awesome, Thanks for such quick replies. I figured the video processing would be one of the biggest issues.  Are there any plans for implementing video processing of any kind?  

A A

unread,
Mar 4, 2017, 9:53:22 PM3/4/17
to RC2014-Z80


On Saturday, March 4, 2017 at 11:30:08 AM UTC-7, Kipper Klank wrote:

Point being ROMs for a ZX Spectrum are very specific about the architecture of the computer itself if it's not exactly the same it probably won't work


If you want to run actual spectrum games you will have to match the spectrum display hardware exactly or as a subset of whatever the complete project is.

The spectrum's display is really simple.  The display file that holds pixel and colour information is mapped into the cpu's memory space so that the z80 can read and write directly to it with fast instructions.  The device that generates the picture reads the same memory area simultaneously as the picture is drawn.  Arbitration is performed by giving the display device priority over the z80 and pausing the z80 whenever there is a conflict.

The good thing about having a display file in the cpu's memory space is that this is the fastest way for the z80 to manipulate the display.  The bad thing is a region of memory can't be used for programs or data so you have < 64k available.  Someone may opt to have several memory banks available in which case the display file can be put in a bank so that the z80 can swap it in whenever it wants to.

Other possibilities are using some sort of graphics chip to do the display.  In the 80s one widely available one was the TMS9918 series as used in the msx, sega master system and a number of other systems.  It owns the display file which is not directly accessible to the cpu which is good in that the cpu can have the whole 64k.  It's bad in that the cpu can no longer quickly update the display file itself.  Instead you have to rely on the 9918 functions to do what needs to be done quickly.  This difference in games can be seen in the spectrum and msx, eg.  The spectrum has a number of titles that scroll smoothly where the msx does not as the msx cannot push enough data to do the same thing.  Conversely, the spectrum display file had to be smaller so that the cpu was fast enough to do this which reduced colour resolution relative to the msx.

Philip mentioned another more modern solution which I hadn't looked at before.  It's a few posts back.  This is a graphics processor where again the z80 does not have direct access to the display memory but the graphics processor is structured like an OpenGL implementation with 3d graphics & transformations and whatnot so it is possible to do a lot more than what the z80 could do at 7MHz with direct display file access.

I'll mention that z88dk contains a number of game engines that do software sprites for memory mapped display files.  It might be possible to adapt at least one of them to a hypothetical memory mapped display on the rc2014.

Kipper Klank

unread,
Mar 4, 2017, 10:19:51 PM3/4/17
to RC2014-Z80

Samster

unread,
Aug 14, 2023, 12:31:51 PM8/14/23
to RC2014-Z80

I recently noticed the surface mount ZX Spectrum Z80/SRAM and ULA replacement modules on eBay and it made me wonder what other components/logic would be needed to make a "Trigger's broom" Spectrum. I figured I could try a similar exercise using RC2014 stock modules and found a few projects to bring together a minimal implementation that will LOAD "" and play a game. There’s an additional challenge of no longer owning a display that supports component, SCART or VGA, but that turned out to make things simpler by combining a couple of projects into the same CPLD.


RC2014 modules:

ZX Spectrum projects raided for snippets to combine onto single PCB:

I used an ATF15XX-DK3-U dev board to prototype but this had a few quirks like random keypresses and noisy clock signal (used an 74HC393 clock divider as per stock Dual Clock card as a reference). However, all were resolved when the circuit was laid out onto PCB. 

 

I saved some routing effort by paying five dollars more for a 4 layer PBC which is first time I've used more than double sided. I left routing the decoupling capacitors to last so switched their footprints to 0805 surface mount to avoid rerouting existing traces. This was also my first attempt at soldering SMD components. It's not immediately obvious if decoupling capacitors are working or not but I'm going to assume it was successful even if not the neatest job.


IMG_9710.jpg


Possible improvements/changes on next revision:

  • Make more use of SMT assembly service - one surface of PCB can be populated cheaply with SMT "Basic Components" - seems limited to capacitors/resistors, each semiconductors/connecter part attracts a fee for an operator to change reels on the assembly machine
  • 2 layer board - CPLD pin choice can better optimise for routing the GPIO and RC2014 headers but this depends on their relative placements on the board, so not something I wanted to invest time on if the first revision was flawed. The JTAG connector is the most inconvenient component - it might be better placed on the reverse side in the centre of the CPLD as an SMD, or just omitted altogether and assume the CPLD is programmed externally
  • Supervisory circuit IC (which supports a switch) for reset, e.g. DS1813, replaces RC circuit
  • CPU VRAM contention wait logic - VRAM access timing is not accurate to ZX Spectrum ULA. Currently clock is not suspended and rainbow graphics programs will not run as intended - should be straightforward to re-instate the ULA Verilog
  • Kempston joystick port - seems a trivial addition since both address and data bus are routed to CPLD, however there may insufficient pins to keep JTAG interface. An octal buffer IC be used as that would only need a single CPLD output pin to its drive output enable.

Features that would take more effort:

  • RPI Zero could also sniff the speaker bit in the Spectrum I/O port to play audio on the TV speakers - however the audio interface over HDMI seems non-trivial, especially for a bare metal implementation
  • Some kind of SAVE mechanism, a direct serial line from the CPLD instead of audio circuitry
  • interface to interface 2 ROM cartridges
  • DVI interface to replace RPI Zero - I've no idea how complex this would be, but expect it would require an FPGA (apparently this is easy according to https://www.fpga4fun.com/HDMI.html)

Spencer Owen

unread,
Aug 14, 2023, 1:31:45 PM8/14/23
to rc201...@googlegroups.com
That is awesome! I love it!

Spencer 

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/b64f563b-27c4-4966-88a7-e508062cd8fcn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages