Page 1 of 4

Prototype Z80 board

Posted: Wed Mar 04, 2026 11:21 pm
by epaell
First attempt at getting a Z80 CPU running on the MECB bus:
mecb_z80.jpg
It's currently running the SCM monitor (https://smallcomputercentral.com/small- ... r-monitor/) and tested a simple memory test program (the monitor allows loading of Intel hex format files) which checks the memory banking functionality i.e. the memory map has 4 x 16KB banks - each of which can be switched with any of 32 x 16 KB ROM pages or 32 x 16 KB RAM pages - I was curious as to how paging worked so this was a basic implementation of this. The SCM monitor also provides Microsoft Z80 BASIC - which also appears to work. The SCM monitor has a lot of nice functionality and it is closely tied in with RC2014 Z80 systems (and associated hardware) so if any of the RC2014 modules (https://rc2014.co.uk) are mapped across to MECB e.g. SD FLASH, etc they could conceivably work with this to do things like boot to CP/M. The one thing I didn't like about SCM is that it has to be compiled with a very clunky purpose-built compiler that only runs under windows (though I managed to find a simple way to run this on my Mac via WINE).

So far I've only tested the memory, ROM and serial I/O. I need to see how Interrupts work on the Z80 - so still need to test that. Ideally I should also test a few other cards/devices e.g. the 6840 timer, OLED card, and perhaps the 9958 VDP. Though, I'm struggling a bit with Z80 programming - despite a reasonable number of registers it's instructions are very tied in to specific registers and I often find myself shuffling things around to get really basic things done (the memory test program took me way longer to write than it should have ... though part of the challenge there was getting my head around the paging so that it doesn't break the monitor or the program I'm running e.g. inadvertently switching out the part of RAM that has the stack or the actively running code in it).

I had a few errors in my v0.1 design but happy to at least get it running to this point. Once I've done a bit more testing I'll update my GitHub with the design in case anyone else is interested.

Re: Prototype Z80 board

Posted: Wed Mar 04, 2026 11:56 pm
by djrm
Hi, very nice to see a paged memory z 80 system, hopefully able to run ROM wbw on it to open lots of possibilities. I'm not fan of the z80 instruction set but there's loads of software using it. Kook forward to seeing what you make of it. I have a rc2014 and sc126 systems here but not used them much since getting my mecb systems rubbing. Best regards, David

Re: Prototype Z80 board

Posted: Thu Mar 05, 2026 12:13 am
by epaell
I "think" it should be possible to get ROMwbw on there but I'm not 100% sure how to adjust it appropriately for the MECB system e.g. there is only the one ACIA (and it is on a different port), the paging system is based on a RC2014 design I saw so I think it should work (but I was a bit confused that SCM didn't seem to know of this so I'm not sure if the same is true for the ROMwbw set up). I'm also not sure if it needs any other hardware e.g. clocks, timers, etc. When I get some time off work I'll have a look into it (it's unlikely that I can simply just burn some pre-prepared ROMS).

Re: Prototype Z80 board

Posted: Fri Mar 06, 2026 4:00 am
by epaell
Tested the 6840 timer and that seems to work, also tested it with an interrupt service routine and that worked with the Z80 Interrupt Mode 1. Also tested the VDP and that too seems to work. So far, it looks like it is running OK. Most of my issues so have been with compiling (I had a lot of trouble getting the VDP test running because I inadvertently mixed my hex definitions i.e. for example I had some as 080h and others had others as $80 ... the weird thing is that 080h converted to 50 hex for some reason. I switched it all to using Motorola-style definitions and then it seemed to work again.

Re: Prototype Z80 board

Posted: Fri Mar 06, 2026 8:52 am
by djrm
Sounds like good progress.
Your hex definitions problem reminds me of a rookie mistake I made years ago where I 'tidied' a column of number definitions by adding 0s to the front to make everything line up. this caused the interpreter to treat some of the numbers as octal, clearly not the problem you have there though.
Have you a means to switch out the boot rom to load code into its memory space, this seems to be the way cp/m is initialised on many systems - it may even be a requirement, I dont know.
D

Re: Prototype Z80 board

Posted: Fri Mar 06, 2026 8:44 pm
by epaell
Yes, any 16 KB page can be switched to any of the 32 x 16 KB RAM or 32 x 16 KB ROM pages - so it is possible to have the entire memory map replaced with RAM. I'd have to admit that one thing I like with the Intel/Zilog processors is the separate I/O port as you no longer have to break up the memory map to include it.

Re: Prototype Z80 board

Posted: Sat Mar 07, 2026 10:36 pm
by epaell
Managed to get RomWBW running on the MECB Z80 board! I cheated (a bit) by reprogramming the I/O PLD to shift the ACIA to $80 (where the RC2014 board expects it), the page switching is consistent with what was designed for the RC2014 so that should work. The only side effect of this hack is that the RC2014 normally sets the ACIA to divide the clock by 64 to get 115 KBAUD, so with the default crystal on the MECB I/O board, with the way the clock division works, this results in a 19200 BAUD serial. One I work out how to compile RomWBW this should be an easy change. Anyway, it was nice to get to a point where CP/M is running ... now I just need to work out how to use it.
IMG_8771.jpg

Re: Prototype Z80 board

Posted: Sun Mar 08, 2026 8:18 am
by epaell
I managed to work out how to compile it and also create a new configuration for the MECB version. That now has the ACIA working in the usual ACIA location for MECB.

Re: Prototype Z80 board

Posted: Sun Mar 08, 2026 9:03 am
by djrm
That's great Emily, well done.

If you haven't seen it there is an alternative to the rc2015 group here: https://groups.google.com/g/retro-comp

It would be good to show your work there at some point. D

Re: [P] MECB Z80 CPU Card

Posted: Sat Mar 21, 2026 12:12 am
by epaell
Running Zork 1 on the MECB Z80 via CP/M loaded up using an early prototype of the Compact FLASH to IDE adapter and via the MECB IDE interface card :-)

The ROMWBW software provides access to a crazy amount of software including PASCAL, BASIC, FORTRAN, COBOL, word processors and games just to mention a few. Despite me not being a huge fan of the Z80 processor I'd have to say that ROMWBW is a fantastic approach to making this system incredibly powerful.
IMG_8791.jpg