Page 1 of 1

ZX-ECUTOR for the SAM Coupe

Posted: Mon Mar 09, 2020 11:29 am
by Quazar
Hi!

This is the most recent piece of Z80 assembly programming I've done in a couple of years, for a project that combines both hardware and software - to make an interface on the SAM Coupe that let's it run ZX ROM Cartridges that were produced way back in 1983 for the ZX Spectrum.

The ROM Cartridges were an ill-fated idea by Sinclair Research, with only 10 commercial titles produced on cartridge in 1983. An extra interface was required for your ZX Spectrum to use it and although the port was added to 4 (I think) different interfaces from several companies it really did not take off, however the cartridges are a bit of a curiosity which is why I wanted to add support to the SAM.

Image

What my code does is display a splash screen so you can select how to run the ROM cartridge - either directly, where the SAM will access it as uncontended memory at it's full 6MHz speed, or copy the cartridge to RAM and run it from there (as we're in the ZX Spectrum screen mode - MODE 1 - there's extra contention automatically added to slow the Z80 down closer to the speed of a ZX Spectrum, it works out about 3.8MHz).

The title screen is using some tricks, I use the line interrupt register to trigger interrupts at various vertical points on the screen display to change some of the palette colours. This achieves a border effect for the colour strips at different positions in the left and right border areas, as well as cycling the colours on the selected option on screen to create the multicoloured thin stripes, which scroll upwards a pixel every frame.

Image

Once selected it'll clear the screen, set up the memory, palette and screen mode to configure the SAM to effectively be like a ZX Spectrum, then run the cartridge code.

This code runs from a flash memory chip on my little interface that adds the cartridge port. I still program 'old school', using an assembler on the SAM itself. (COMET Assembler), none of this modern PC cross-assembler m'larky ;)

Image

Colin.

Re: ZX-ECUTOR for the SAM Coupe

Posted: Mon Mar 09, 2020 3:59 pm
by matibee
Really impressive Colin. To build the interface for a 'foreign' machine and then code the magic to make it run deserves a special applause. I'm in awe! And to still code on original hardware.. I really admire that (I haven't been able to bring myself to do it since someone *ahem* packaged up a shit load of emulators, compilers and notepad++ for Windows :-P
I'd never heard of speccy cartridges (or I don't remember hearing about them at the time). They must be a real collectors item by now.
This line really made me chuckle though;
An extra interface was required for your ZX Spectrum to use it
as that pretty much goes for any thing on the speccy, ever :mrgreen: such as this... one coffee spill away from utter devastation and probable death... :o
https://projectspeccy.com/wp-content/up ... kplane.jpg

Once again, I'm really impressed!
Cheers!

Re: ZX-ECUTOR for the SAM Coupe

Posted: Mon Mar 09, 2020 5:41 pm
by Quazar
The image you link to - I still have that issue of Your Spectrum magazine kicking around somewhere!

I bought it on one of my birthdays as a kid, along with Jetset Willy II - as the game was mapped and POKE'd to pieces in that very issue!

Re: ZX-ECUTOR for the SAM Coupe

Posted: Tue Mar 10, 2020 11:49 am
by akuyou
Fascinating stuff!

The 'Hardware side of things' is totally outside my ability, so it's very impressive to hear of such a project.

As I'm sure you know, I do all my development via emulators, so again it's fascinating to hear of people using the 'classic assemblers'