SC111 Z180 CPU + SC119 Memory Module in Z80 Replacement mode problem

179 views
Skip to first unread message

Jez

unread,
Jan 26, 2021, 7:05:23 AM1/26/21
to RC2014-Z80
Hi,
I've built Stephens excellent SC111 Z180 CPU and SC119  Z180 Memory Module to experiment and learn a bit more.

The set up didn't quite work first time.  There was no output on port A FTDI.  The clock PHI was running, albeit at half speed, which from the documentation states that is correct at switch on and then the firmware turns that off so PHI is equal to the on board crystal.

After a few hours of fault-finding which included trying different crystals, reseating chips etc the whole thing burst into life.  Great but a little frustrating as I didn't find out why it wouldn't initially fire up. (I did power the boards via a suitable bench power supply)

Now to the current problem:  
I wanted to experiment with the z180 in Z80 replacement mode.  I understand this required a different SCM build, SCM S4 on the SC119 board.
I downloaded and programmed the supplied SST39SF040 that had the SCM S5 build on it with SCM S4.  This is where I've hit a problem.  On power up I get the continuous sweeping lights on the Status LEDs which indicates FAILED RAM?
Interestingly with the jumper set to ROMWBW the two boards work fine but I guess that is because ROMWBW is working in Native mode.

Here's what I've tried so far:
- Reprogrammed the SST39SF040 back to SCM S5 - System works fine, both SCM & ROMWBW
- Removed the SC119 512k ram and replaced with a spare - Same error
- Tried the SCM S4 build again - Same error
- Read though lots of Stephens documentation - Nope still no idea

I bet there is something silly I have overlooked.  sometimes you cant see the wood for the trees....

Any pointer/ideas would be much appreciated.



karlab

unread,
Jan 26, 2021, 7:25:22 AM1/26/21
to RC2014-Z80
Hi Jez

What do you mean with replacement mode?

With your setup, you are using linear memory and the integrated memory manager in the Z180.
You can run the same system with banked memory module like the RC2014 512 RAM/ROM module or my #65 Ram module.
You need a different ROM image, eg. ROMWBW Z180ext. 

Karl

Steve Cousins

unread,
Jan 26, 2021, 11:42:56 AM1/26/21
to RC2014-Z80
Hi Jez,

Yes, frustrating when something doesn't work and then suddenly starts working without you being able to find out why. My guess is it is mechanical, such as a solder joint problem.

The problem with the SCM S4 build is this: 

The Z180 CPU module (SC111) and the Z180 memory module (SC119) are designed to work together in Z180 "native" mode. This mode uses the "native" versions of the RomWBW and SCM, with "native" referring primarily to the memory management hardware. The Z180 CPU includes a memory manager to map the physical 1024k of memory (on SC119) to the 64k address space of the Z80 family instruction set. By comparison, the RC2014's Z80 implementation of RomWBW has memory management hardware on the 512 ROM +512k RAM memory module.

The Z180 CPU module (SC111) can be used in "legacy" mode, where it simply replaces a standard Z80 module. Here, the CPU needs to be configured NOT to do anything fancy with its memory management unit - it acts as a standard Z80 CPU. To support this you require the legacy mode firmware. In the case of SCM (configuration S4) it expects a more typical RC2014 style ROM/RAM setup, such as the RC2014 pageable ROM module plus the RC2014 64k RAM module. The native version of RomWBW (RCZ180_ext - "ext" for external memory management) expects the RC2014 512 ROM +512k RAM memory module.

In short, the S4 configuration is designed to run on a typical RC2014 (eg. Pro) with the RC2014 Z80 CPU module replaced with the SC111 Z180 CPU module - thus the "Z80 replacement mode" you refer to. The SCM S4 firmware is a 32k ROM that can be installed in a ROM module, such as RC2014 pageable ROM module. It will not work in the 1Mbyte SC119 module (which requires the Z180 memory management unit to map the memory to the 64k space.

I've just reviewed my documentation to see why this was not clear. Most of the information is there, but it does not clearly state that SCM S4 does NOT work on an SC119 Z180 memory module. I will correct that oversight. 

The "Z80 Replacement Mode" is documented here.

The SCM S4 version can be found here. This page contains the link to download the ROM image and also lists the supported modules. Under memory, it only lists RC2014 64k RAM module and the RC2014 pageable ROM module. It does not go as far as to say "NOT compatible with SC119 memory module". I will add a note to say that. This page states the ROM image is for 32k ROM (27C256) but does not go as far as to say "NOT for an SST39SF040 FLASH".

I can see why all this is not obvious. It is difficult to balance the desire for a lot of detailed documentation with the need to ensure key points get noticed. I'll see if I can improve it soon.

I suspect very few people use the Z180 CPU module (SC111) simply as a Z80 replacement. I think it is almost always used in native mode with SC119 providing the memory.

Just to complete the story it is worth noting the only reasons I can think of for using legacy mode are these:
  • You can run the Z180 at a lower clock speed to improve compatibility with other modules. In native mode, the clock needs to be 18.432MHz to provide the documented baud rates.
  • You don't need to get a Z180 specific memory module, such as SC119.

I hope that helps.

Steve

Jez

unread,
Jan 26, 2021, 3:43:30 PM1/26/21
to RC2014-Z80
Hi Steve

Many thanks for the comprehensive update.   I understand much more now.  

When I made the post I wondered if people might be thinking 'why on earth would I be trying to throttle your a Z180 module when it offers so much more?'.  The simple answer is, after reading your documentation it mentioned it could be used as a drop in replacement for the standard Z80 and I thought I'd give it a 'quick' go.  It didn't work and now I know why.  Every day is a school day and experimenting with more and more modules teaches me two things. 1) How little I know or have forgotten over the years about Z80 computers and 2) I'm learning so much more by having a go and failing but ultimately achieving through the help of this forum.

Its all good stuff.  Keep up the new module production.  

Jez
Reply all
Reply to author
Forward
0 new messages