Thursday, 26 June 2025

A Z180 Freebee

When I was young, I read byte. I was a weird kid. One of my favourite columns was Steve Garcia's Circuit Cellar, because he had a really good hardware focus. A machine I thought was incredibly cool was a HD64180 single-board-computer that he featured in the September 1985 edition.

Now I've got the Freebee going quite nicely, I'd like to continue exploring where I can go with it. Top of the list is to get it to run ROMWBW, which is an unencumbered CP/M install. My brother has a cool Z180 board that runs ROMWBW, so I figure we can make a machine that is zero effort to adapt ROMWBW to, plus has the same degree of Microbee compatibility as the Freebee, plus has more modern I/O, making it easier to play with.

So the spec is:

  • Z180 CPU in 68 pin PLCC package, running 3.375MHz and up to 27 MHz. 3.375 MHz is needed for Bee compatibility.
  • 512K on-board flash ROM to store ROMWBW and whatever else, plus a 512K SRAM (not all used, as I need 64K for a potential Microbee coreboard and video RAM.
  • Shared serial port with Z180 serial and Microbee PIO bit-banged serial, allowing use with both ROMWBW and Microbee software.
  • SD card interface using Z180 synchronous serial, for full ROMWBW compatibility.
  • The whole video and keyboard logic from Freebee Premium.
  • A USB host mass-storage interface based on the CH376. Some of the guys on MSPP have done a FAT based driver for this, and it's very cool.

The CH376 is SMD, and SD card receptacles are also. I think that's a good excuse to swap most of the logic to SMD as well. I'll stick with the easiest SMD parts I can.

The CPU does a lot of heavy lifting. It has a wait state generator that simplifies a lot of things, plus a very cool memory management unit that allows me to put whatever I want wherever I want it in the Z80 address space. In a hardware sense, I simply have ROM from 00000-7FFFF, RAM from 80000-EFFFF, and video memory from FF000-FFFFF. I gate the MREQ signal for the coreboard such that it is only active from F0000-FFFFF, maining a Microbee or Freebee coreboard can simply live alongside the enormous on-board memory. I also do all the decode for banked video RAM from the DRAM/CF coreboard on the mainboard, this way I don't need lots of confusing jumpers. Also there's no boot mode any more. The machine starts up with ROM throughout the Z80 address space, and you have to program the MMU if you want something different.

So some schematics. These are very early, and not yet annotated. I have a lot of work to go yet to put this on a board, so this stuff _will_ change.