Close

G8PP+Z80 Part 2

A project log for Generic 8-bit Processors Prototype (G8PP)

Generic prototyping of processors from 1970's and 1980's

plasmodePlasmode 02/05/2019 at 05:170 Comments

CP/M is a well known operating system in 1970's and 1980's.  It was designed for many different processor family, e.g., Z80, 808x, 68000 and others.  Running CP/M is the end goal for many of the processors prototyped with G8PP because that demonstrates the hardware has reached a meaningful level of complexity and functionalities.

To run CP/M, the computer needs a mass storage, serial port, and RAM memory.  This is exactly what G8PP has.  CP/M 3 works best with banked memory, the 512K RAM on G8PP can be split into 32 banks of 16K each to support CP/M 3.  There are many literature on Internet that describe the process of porting CP/M 2 & 3 to Z80.  I won't get into these details here.  To support CP/M, additional commands are added to the bootstrap monitor so the CF disk can be formatted and CP/M2.2 CCP/BDOS/BIOS can be installed and retrieved from designated area in CF disk.

This is the steps for installing CP/M into a new CF disk:

  1. Format the new CF disk using the format command of the bootstrap monitor,
  2. Install CCP/BDOS/BIOS in designated sectors in CF disk using the copy CP/M command of the bootstrap monitor,
  3. Load XMODEM.COM into memory starting from 0x100 using the bootstrap monitor,
  4. Boot into CP/M using the boot CP/M command of the bootstrap monitor,
  5. It is now in the CP/M environment, type "SAVE 17 XMODEM.COM" to save the memory content as XMODEM.COM.  This is the first file created in CP/M directory
  6. Use XMODEM.COM to bring in the remaining CP/M files.  Instead of XMODEM each files individually, I use 'arj.exe' in PC to compress a set of CP/M files and then use 'unarj.com' to decompress them in CP/M.

There are several important tests to run when in CP/M:

Once CP/M 2.2 is running, it can be used to build CP/M 3 and boot CP/M 3 with 'CPMLDR' command.  

The design is quite robust.  I'm able to overclock the Z80 to 29.5MHz and verify its functionalities with ZEXALL.COM instruction test.  The CF interface is also very stable.  I've tested it with 20 different brands and sizes of CF disks and they all worked.

Discussions