Close

Almost standing on it's own

A project log for Z80 overpowered computer

I am building a computer with a 4MHz Z80, 32KiB EEPROM, 32KiB RAM, IDE interface and UART.

Dylan BrophyDylan Brophy 04/06/2019 at 03:070 Comments

While away from HaD I added a keyboard and 64KiB of extra EEPROM.

For a computer to be reasonably usable it needs a keyboard, monitor, and permanent storage.  I finally have all three!

I got that graphics card working from the previous log, and have given it it's own project #uPD7220 Graphics (and VGA hack).  For the keyboard and EEPROM, I figured out how to connect an ATMega328p to the Z80 and to the peripherals.  The ATMega's serial port is also accessible from the Z80's programs.  Now the computer can load programs from the EEPROM, and I can write to it via a serial port.  (Instead of pulling out the EEPROM, programming it, and plugging it back in)

Here is a program in EEPROM that reads keyboard presses and prints them on the screen:

The font and character rendering isn't the best, but I don't want to be forced to use a modern computer and serial terminal every time I use my Z80 computer.  Besides, I will be able to render graphics as well.

The computer's new boot sequence looks something like this:

  1. Initialize basic devices (not graphics cards or extra devices) and software
  2. Check to see if block device zero's first sector ends with "ye"
  3. If the first sector does end in "ye", then it is bootable.  Execute it.  Otherwise...
  4. Start the 'flash program'

The flash program is like a monitor program except it is controlled by a python script.  It's just for writing memory, testing programs, and installing OSes for the first time.

I designed the boot sequence like this because I am far too familiar with the x86 boot sequence, and because it allows me to easily modify the memory.  The parallel eeprom chip cannot be written by the Z80, so I have to remove it for programming.

Here is a picture of what the computer looks like now:

The card on the left has the ATmega.  The other card is the graphics card from #uPD7220 Graphics (and VGA hack).

I have different ideas about how the motherboard should be designed now too, so I would like to make a new one.  This one has a limited number of expansion slots, many unneeded or broken features, and *should* support banked memory expansions, but I want that feature to be built into the motherboard.

Here is what I have done since last time:

Discussions