Custom Z80 Computer
Overview
I started building this computer in late 2017. I first built the CPU/memory board and the UART board. I was inspired by jpkiwigeek's videos on YouTube of his breadboard z80. I originally followed his netlist for his board as described on his website. One I built it and got it to execute NOPs and send a character to the UART, I put it away until late 2019. When Ben Eater released the first part of his excellent video series on a simple 6502 computer, I was inspired to get my computer working and actually do some programming in assembly.
As of now I have a ROM monitor written for it. CP/M boots off an IDE hard disk. Future plans are getting a floppy controller made for it and using a period correct 8 inch floppy drive.
Hardware
CPU / Memory Board
UART Board
PIO Board
IDE / Floppy Board
Clock Board
Logic Analyzer Interface Board
LCD Board
The computer is a Z80 CPU with a 16c550 UART. When it boots, there is 16k of ROM at $0000-$3FFF and 48k of RAM from $4000-$FFFF. The first thing the computer does when starting is copy the ROM monitor up into RAM at $4000, disables the ROM, and then copies it back to $0000. This gets us ready to run CP/M by default, and allows us to modify variables in the ROM memory space.
Base addresses:
$0x - UART
$3x - FDD
$4x - IDE
$5x - PIO
$70 - Disable ROM. Send bit 0=1 to disable rom. Currently, a reboot is needed to reset. eventually I will add a software re-enable.
Software
https://github.com/nsafran1217/z80-asm
Disclaimer - I am not good at assembly
Commands:Most commands will save the last address used and automatically increment to the next address. All entered values are in hexadecimal.
:L [$xxxx] [$xxxx] | Load data from COM to [address]{$4000} len [bytes]{$1000}
Load data from the serial port. I use this to upload software to test it. :D [$xxxx] [$xxxx] | Dump [address] of len [bytes]{$0100}. Next addr default
Dump data to display. Also displays ascii values for each byte.:W $xx [$xxxx] | Write (value) to [address]. Write next address by default
:R [$xxxx] | Read value at [address]. Read next address by default
:G [$xxxx] | Jump execution to [address]{address from L cmd}
Default address if not specified is the address entered for the Load command.:O $xx $xx | Write (value) to (IO Port)
:I $xx | Read value from (IO Port)
:B | Enter Boot Menu
:Q | Ring Bell