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:
- Format the new CF disk using the format command of the bootstrap monitor,
- Install CCP/BDOS/BIOS in designated sectors in CF disk using the copy CP/M command of the bootstrap monitor,
- Load XMODEM.COM into memory starting from 0x100 using the bootstrap monitor,
- Boot into CP/M using the boot CP/M command of the bootstrap monitor,
- 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
- 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:
- PIP B:=A:*.*[V], which copy with verify the content of drive A to drive B. It is a good CF read/write/verify test to make sure CF disk can read and write without errors.
- ZEXALL.COM, this is a thorough Z80 instruction test that takes about 35 minutes to run with 22MHz CPU clock. It should pass 100% thus verify Z80 is functioning correctly at 22MHz.
- MBASIC80 ASCIIART.TXT to run the ASCII mandelbrot benchmark which should take 52 seconds to run.
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
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.