porting SCMonitor

116 views
Skip to first unread message

Henrique

unread,
Oct 14, 2021, 9:37:52 PM10/14/21
to retro...@googlegroups.com
Hello,

it is technically possible to port SCMonitor to ZX Spectrum 48K?

I'm not referring loading it to RAM but from ROM instead (0x0000) so no API features are lost.

thanks in advance.


Steve Cousins

unread,
Oct 15, 2021, 3:29:06 AM10/15/21
to retro-comp
Yes, it should be possible. SCM has very few requirements. As long as it has use of 0x0000 to 0x00FF then everything else can be moved.

Porting info here:

You will probably have to use my homegrown and somewhat flaky development tools.

Steve

shadow 338

unread,
Oct 15, 2021, 8:28:33 AM10/15/21
to retro-comp
thanks Steve. I guess all HW currently detected and/or
supported by SCM does not apply to the speccy however (and pardon my lack of knowledge here)
SCM still should be able to display text on the tv/monitor as that part is handled by the zx
itself correct as it does have have a serial port right?

thanks.

Steve Cousins

unread,
Oct 15, 2021, 8:42:04 AM10/15/21
to retro-comp
You are correct, SCM knows nothing of Speccy specific hardware. As far as I know there have been no ports of SCM that would help you.

In theory, you can use any input and output devices for SCM's console I/O, including the speccy's hardware (screen and keyboard). However, to achieve this there must be SCM compatible drivers for those devices. If the speccy's normal firmware could co-exist with SCM it would just be a simple code shim to transition from SCM device driver format to speccy format. I'm guessing you will not be able to have them co-exist, so you would need to create SCM drivers with all the functionality required to control the speccy hardware directly. If you have to do this from scratch it would be a big job. If you have source code to support this functionality it should be quite manageable.

If you could add a 6850 or Z80 SIO based serial port from the RC2014 range then you could get this working by just assembling SCM with an appropriate RAM address for SCM's workspace, or possibly without any modifications. Once you have SCM running through a serial port you can use SCM to help you write and test drivers for the Speccy screen and keyboard.

I would be interested to know how you get on.

Steve

Alan Cox

unread,
Oct 15, 2021, 9:40:57 AM10/15/21
to Henrique, retro-comp


On Fri, 15 Oct 2021 at 02:37, Henrique <henrique...@gmail.com> wrote:
Hello,

it is technically possible to port SCMonitor to ZX Spectrum 48K?

I'm not referring loading it to RAM but from ROM instead (0x0000) so no API features are lost.

For the 48K machine you need something that asserts \ROMDIS in a way you can control. An interface II compatible slot with a 16K EPROM works fine and you can get cartridge PCBs - in fact they are trivial, nothing more than the lines from the connector to the EPROM and an OR gate for A14/A15 to /OE on the EPROM. The other devices that can assert ROMDIS tend to be a lot hairier to handle because they have more complex ROM paging triggers involving specific address matches and memory layouts where some of it is pinned. Some of the DivIDE/DivMMC devices can do what you want.

For the Timex systems there is a different cartridge slot and on the 128K machine or many of the soviet clones you can just page out the ROM and it's far simpler.

Alan

Alan Cox

unread,
Oct 15, 2021, 9:51:36 AM10/15/21
to Steve Cousins, retro-comp
On Fri, 15 Oct 2021 at 13:42, Steve Cousins <steve...@gmail.com> wrote:
You are correct, SCM knows nothing of Speccy specific hardware. As far as I know there have been no ports of SCM that would help you.

In theory, you can use any input and output devices for SCM's console I/O, including the speccy's hardware (screen and keyboard). However, to achieve this there must be SCM compatible drivers for those devices. If the speccy's normal firmware could co-exist with SCM it would just be a simple code shim to transition from SCM device driver format to speccy format. I'm guessing you will not be able to have them co-exist, so you would need to create SCM drivers with all the functionality required to control the speccy hardware directly. If you have to do this from scratch it would be a big job. If you have source code to support this functionality it should be quite manageable.

It's actually really trivial. There are only two software jobs involved. The first is the keyboard matrix decode and the second is the video. The code for all of that is already available in Z88DK and a native implementation of a basic ADM3A terminal even without that is only a few hundred lines of code plus a font. The ROM disassembly is also available.

If you could add a 6850 or Z80 SIO based serial port from the RC2014 range then you could get this working by just assembling SCM with an appropriate RAM address for SCM's workspace, or possibly without any modifications. Once you have SCM running through a serial port you can use SCM to help you write and test drivers for the Speccy screen and keyboard.

The ZX Spectrum shortcuts all the I/O decodes to save gates so you'll have to change all the addresses and probably use a 16bit decode for that. There are Z80 SIO designs for the ZX Spectrum. There's also some deeply weird rules on which addresses you use in order to avoid bogus wait states.

Alan

shadow 338

unread,
Oct 15, 2021, 12:54:48 PM10/15/21
to retro-comp
thank you for all the valuable info so far. I believe this is already a good start.
Reply all
Reply to author
Forward
0 new messages