Simple board based on Z80 CPU and 'modern' Arduino board
Click here to have a look at the videos about variants
This project has a few purpouses:
- learn old assembly language for Intel 8080
- learn the features for z80
- replace ROM with bootloader based on Arduino
- use Arduino as app loader for RAM area
- use Arduino as simple serial IO for CPU
Project is making step by step from simplest minimal to more complicated.
All files for each variant you can find in directory variants
directory | Memory | Brief | Ready |
---|---|---|---|
test | 1B | For testing CPU buses | Y |
minimal_16B | 16B | Minimum to see how CPU work with Memory and IO | Y |
minimal_32B | 32B | Minimum for learn assembly language | Y |
multiplex | 2KB | Minimal with commutator | N |
shift_32k | 32KB | Half memory system (shift registers) | N |
shift_64k | 64KB | Half memory system (shift registers) | N |
Variant difference
Option | test | minimal_16B | minimal_32B | multiplex | shift |
---|---|---|---|---|---|
Memory | 0B | 16B | 32B, 64B | 1K, 2K | 32K,64K |
Mem type | none | mocked | mocked | mocked | real |
IO | none | mocked | mocked | real | real |
CPU Freq | 20Hz | 20Hz | 100Hz | 100Hz | 1Mhz |
add. chips | - | - | - | cd4017 | 74htc595, 8286, 8282 |
Each variant has own directories:
arduino
- for arduino scketches (with preloaded Z80 binary)Assm
- assembly files and binaresdoc
- some useful instructions
Also each project has Kicad schematics and Readme with requirements for that variant.
Clone this repository
git clone https://github.com/maks-ushakov/z80-simple-board.git
Choose variant you want to use.
Load Arduino sketch
Use Variant readme to change preloaded memory. Change Memory array with z80 C-style-array code you want to be loaded to z80 memory
Load sketch to arduino
You can use any file extensions for sourse and binary files. Common extensions for sourses are .s
, '.asm', 'z80', for binary are .bin
or none, lst
for listing files.
I use .z80
for assembly source and bin
for binary.
If you have z80asm
z80asm --output=<file_name>.bin <file_name>.z80
If you use VASM
vasmz80_oldstyle -Fbin -o <file_name>.bin -Lall -L <file_name>.lst <file_name>.z80
vasmz80_std -Fbin -o <file_name>.bin -Lall -L <file_name>.lst <file_name>.z80
Online
By asm80 or ORG IDE
xxd -g 1 <file_name>.bin
xxd -i <file_name>.bin
Minicom
minicom -b 9600 -D /dev/ttyUSB0
Screen
screen /dev/ttyUSB0 9600
If you do not have access to ttyUSB0 (Arduino or terminal app still connect to /dev/ttyUSB0)
fuser -k /dev/ttyUSB0
use command P
or M
to load values started by address
> P <addr> <data> <data> <data> ...
> m <addr> <data> <data> <data> ...
to check memory use command D
> D <start_addr> <end_addr>
// TODO
Test. First run.
Arduino Nano as Clock generator and Buffer.
Resources: variants/test
Arduino as Memory and IO port. Minimal System. 16B memory. Any IO port is Arduino Arduino as universal chipset.
Resources:variants/minimal_16B
Arduino as Memory loader and simple OS Minimal System, 32B memory. Arduino has command line interface to load code
Resources: `variants/minimal_32_64B`
-
More memory 32B or 64B. Arduino Console
-
LCD as IO port. Bus Buffering (in progress)
-
Mocked memory with multiplexer/commutator (in progress)
-
32k RAM chip. DMA. CPU give acces to bus (featured)
-
Block load XMODEM (featured)
-
Monitor (BIOS) via Arduino Serial (featured)
-
PPA 8255. Address detector. (featured)
-Timer 8253 and Interrupt controller (featured)
Links:
z80 info - a lot of information about z80, his perioferial chips instruction sets and tutorials
VASM - portable assembler for different CPUs
ORG IDE - online z80 IDE
asm80 - online IDE and emulator
Other z80 projects when I get some ideas, shematic principles and code examples:
Grant Searl z80 system some boards has CP/M and BASIC, they used serial terminal
Wichit Sirichote z80 kit has z80 binary for Monitor(BIOS)
Wichit Sirichote i8085 kit has Assembly source code for Monitor(BIOS)
Books (some books you can find on z80 info Books):
Build your own Z80 computer. Design guidelines and application notes. Ciarcia, S. 1981
Programming the Z80. Zaks Rodnay, 1981
From homemade devices on logic elements to microcomputers. USSR. Bartenev V., Alginin B. 1993 (About i8080)
Simplest micro-ECM. USSR. Bureev L.N. 1989 (About i8080 with simplest BIOS)