Porting Small Computer Monitor

84 views
Skip to first unread message

Matt Butch

unread,
Jul 8, 2019, 10:42:46 AM7/8/19
to retro-comp
I want to port SCM to the RetroShieldZ80: http://www.8bitforce.com/projects/retroshield/ 


I've read through the docs a bit, but I wanted to ask if anybody (Hint Hint Steve Cousins) had any advice before I started. For example, the default code emulates a 8251, but I didn't see that option in the SCM code. Should I change what the RSZ80 emulates, or add code in SCM to talk to that?

This will also serve as a thread for me to document my process. 

Richard Lewis

unread,
Jul 8, 2019, 11:25:05 AM7/8/19
to retro...@googlegroups.com
Hi Matt,

As far as I'm aware, the SCM only supports ACIA (68B50) and Zilog SIO UARTS. There is a version of SCM (S2) that bit bangs serial at 9600 baud on one of the Z80 ports. You could probably start with that first. To support the 8251 you will need to add a module for that. For reference the SCM doc for version S2 is here: SCM S2

Although it's best to defer to Steve on this one :-)

-Richard

Steve Cousins

unread,
Jul 8, 2019, 12:50:59 PM7/8/19
to retro-comp
Hi Matt,

Sounds a good project.

I've had a quick look at the links you provided.

SCM doesn't currently support the 8251 UART, however, the example project code you linked to looks virtually identical the 68B50 code in SCM. It looks like you only need to substitute the correct bits and bytes in the I/O instructions. 

I don't know how hard it would be to change the RSZ80 to emulate a 68B50, but if you could be confident of doing that reliably I think you might be able to run SCM unmodifed. SCM only really needs a UART, 8k of ROM starting at 0x0000, and about 1k of RAM from 0xFC00 to 0xFFFF. 

If the RSZ80 can emulate a simple output port at I/O address 0x00, equivalent to the RC2014 digital I/O module's LED output port, you could try the unmodified SCM code. The first thing it does is a self-test which shows a light sequence on the LED output port.

If you decide to port SCM by replacing the 68B50 support with 8251 support, I suggest you remove the SIO support and the code to test what UART is present. Just get it to assume the existence of the 8251. This will reduce the complexity and thus increase the chance of success.

I suggest you start with SCM configuration R1 as this does not include any extra features, such as BASIC and CP/M loader.

I am part way through a tidy up of the monitor code to better separate the hardware specific code. Unfortunately, I currently only have the Z180 version in the new format. When I get around to it, I'll move all the variants of SCM to this new layout and write some proper documentation to help people port it to other hardware. Sadly, it is not there yet.

I assume you've had a good look at all the documentation here and found the assembler by Francis Piérot. SCM was written with my own rather flaky development environment and has a unique assembler format.

Please, keep us informed of progress.

Steve

John Kennedy

unread,
Jul 8, 2019, 12:52:20 PM7/8/19
to retro-comp
I can't add much at this point other than "yeah! can I have a copy when it's working?" :-)


On Monday, July 8, 2019 at 7:42:46 AM UTC-7, Matt Butch wrote:

Alan Cox

unread,
Jul 8, 2019, 1:37:25 PM7/8/19
to retro-comp
It might make sense to change the emulation in the device to an ACIA. Whilst the 8251 is not hard to program and fix in SCM the SCM doesn't provide the CP/M BIOS hooks and CP/M therefore also needs the BIOS updating.


may also be useful.


Matt Butch

unread,
Jul 8, 2019, 10:03:22 PM7/8/19
to retro-comp
Thanks! I figured I'd have to switch, that makes sense. 


--

Matthew Butch

"fiat justicia ruat colelum"
(let justice be done though the heavens may fall)

Sent with Mac OS X High Sierra Mail 11.4 (3445.8.2)





On Jul 8, 2019, at 11:25, Richard Lewis <richa...@gmail.com> wrote:

Hi Matt,

As far as I'm aware, the SCM only supports ACIA (68B50) and Zilog SIO UARTS. There is a version of SCM (S2) that bit bangs serial at 9600 baud on one of the Z80 ports. You could probably start with that first. SCM S2

Although it's best to defer to Steve on this one :-)

-Richard

On Monday, July 8, 2019 at 7:42:46 AM UTC-7, Matt Butch wrote:
I want to port SCM to the RetroShieldZ80: http://www.8bitforce.com/projects/retroshield/ 


I've read through the docs a bit, but I wanted to ask if anybody (Hint Hint Steve Cousins) had any advice before I started. For example, the default code emulates a 8251, but I didn't see that option in the SCM code. Should I change what the RSZ80 emulates, or add code in SCM to talk to that?

This will also serve as a thread for me to document my process. 

--
You received this message because you are subscribed to the Google Groups "retro-comp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-comp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/retro-comp/895f02ac-5fe8-44a5-8e41-83e44ecd276f%40googlegroups.com.

Matt Butch

unread,
Jul 8, 2019, 10:06:39 PM7/8/19
to retro-comp
Thanks for all the insights Steve!

I think changing the UART should be too bad at all. I probably could make it configurable in code to make switching easier. 

I do want to interface to the LCD (if available) so maybe I could translate the LED output to that...

I did look over all the documentation, and did see that assembler as well. Its nice to see everything so well documented!

I'll let you know how it goes.


--
You received this message because you are subscribed to the Google Groups "retro-comp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to retro-comp+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages