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