The goal of this project is to build a fully functioning Z80 based computer. This repository acts a a meta repository that contains all the different sub-projects, split into several different catergories:
-
firmware: The firmware that allows the computer to operate
- bootloader: I2C Bootloader for the STM32F103
- controller: Main controlling microcontroller
- hdmi: FPGA based graphics card
- keyboard: Allows PS/2 keyboards to be used as an input device
- twiboot: I2C bootloader for ATMega based chips
-
hardware: The schematic and PCB design files for the different components
-
software: The software that actually runs on the Z80 processor
- cpm: Source code for CP/M and the BIOS
- crt: Custom C runtime implementation, not based on the standard
- loader: Bootloader that loads the rest of CP/M
- monitor: ROM program that contains simple routines including reading and writing disks
- putsys: Write CP/M from memory to disk (Might be outdated)
- tetris: Simple tetris clone written in C as a way of testing various systems
-
tools: Various tools to aid in the development
- convert-font: Convert a font image to verilog code for easy inclusion in the gpu
- emulator: An emulator to allow for easier software development for the computer
- setup: Setup scripts that builds various required tools
- upload: A tool for uploading firmware to the computer
This sections outlines how to get started with development on this project.
In order to properly clone this repos the tool meta is required, this can be installed using the following command:
$ npm i -g meta
The repository can then be cloned using:
$ meta git clone https://git.mtgames.nl/z80/z80
Some repositories rely on submodules, after navigating into the newly created directory, the following command ensures that these are cloned:
$ meta exec "git submodule update --init --recursive"
The repository should now be ready for development.
In order to update all sub-projects to the latest version the following command can be used:
$ meta git pull
During development each of the repositories can be viewed as individual git repositories.
On an Arch Linux the following command will ensure that all the required packages are installed.
$ sudo pacman -S base-devel npm git arm-none-eabi-gcc arm-none-eabi-newlib avr-gcc avr-libc sdcc python3 sdl2 sdl2_image
The microblaze compiler is also required to be installed, a script to build this compiler is provided in tools/setup. This compiler will automatically get build if you execute the command in the next section.
(You will also need to manually install zasm, this will however change in the near future, see: z80/cpm#1, z80/loader#1, z80/monitor#2, z80/putsys#1 .)
The following command will make sure that the different tools are available in $PATH:
$ source source.sh
As stated in the last section, this will also make sure that the microblaze compiler is build and in the path.
In order to prevent unneeded changes from getting commited when working on schematics the following commands can be used:
$ git config --global filter.kicad_project.clean "sed -E 's/^update=.*$/update=Date/'"
$ git config --global filter.kicad_project.smudge cat
$ git config --global filter.kicad_sch.clean "sed -E 's/#(PWR|FLG)[0-9]+/#\1?/'"
$ git config --global filter.kicad_sch.smudge cat
(Based on this blog post.)
Each of the sub-projects contains a Makefile that allows the project to be build, this is the preferred method during development on a singe sub-project. After navigating to the sub-projects directory the follwoing command will build it:
$ make
If instead you want to build all the projects running the same command in the main directory will ensure that each of the sub-projects gets build. (This does currently exclude the firmware/hdmi as it requires some additional setup, see z80/z80#4 .)