ZX-ECUTOR for the SAM Coupe

Made something in Assembly? Show it off, and tell us how it works...
Absolute beginners welcome... we want to see what you've done!
Forum rules
There is a special rule on this forum...
This forum is intended to offer equal amounts encouragement and constructive feedback...
Therefore, if you say 2 negative things about someones work, you must think of 2 or more equally positive things...

Eg: "Great first effort, the idea is absolutely fascinating... However I noticed a few bugs, and maybe the graphics could be improved..."

If you can't think of anything good to say, then don't say anything!

If we don't encourage newbie programmers they won't have the confidence and motivation to stick at it and become great programmers! *speaking from experience*
Post Reply
Quazar
Posts: 2
Joined: Tue Dec 31, 2019 12:00 pm

ZX-ECUTOR for the SAM Coupe

Post by Quazar » Mon Mar 09, 2020 11:29 am

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.

matibee
Posts: 19
Joined: Mon Feb 17, 2020 6:09 pm

Re: ZX-ECUTOR for the SAM Coupe

Post by matibee » Mon Mar 09, 2020 3:59 pm

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!
Hobbyist coder for over 37 years! Last 20 years: C/C++, Windows, DirectX, OpenGL, Newton, JUCE, Godot.
Current collection: Atari; 2600, 800xl, 130xe, XEGS, 520stfm, 1040stfm, Lynx. SNES. Megadrive. GBA. PSP. 48k Speccy. C64, Amiga 500+. PS1, 2 & 3

Quazar
Posts: 2
Joined: Tue Dec 31, 2019 12:00 pm

Re: ZX-ECUTOR for the SAM Coupe

Post by Quazar » Mon Mar 09, 2020 5:41 pm

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!

User avatar
akuyou
Posts: 563
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: ZX-ECUTOR for the SAM Coupe

Post by akuyou » Tue Mar 10, 2020 11:49 am

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'
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

Post Reply

Return to “Show and Tell”