Skip to the content
2 layers100 × 100 mmTemplate, the printed circuit board in 3D

Another DIY Z80 Computer With CP/M

Size
100 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
2
Nets
68
Pads
128
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 6 (file 20211014)
Created
29 Sep 2022
Updated
10 Mar 2023

Overview

Template is an open-source printed circuit board by michalin, from the michalin/ZX2022 repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 100 × 100 mm with 2 parts on 68 nets.

README

README.md

ZX 2022

Yet another homebuilt Z80 Computer, but this one works without any FPGAs or Microcontrollers, but components that were available at the time when the Z80 processor was state of the art. It can run historic CP/M programs like Multiplan, Wordstar and MBasic, as well as some games. This is a reminiscense to the Sinclair ZX81 computer. In contrast to its predecessor, the ZX2020, this one uses a 32 kilobyte EE Prom to reliably store the CP/M BDOS and BIOS. Furthermore a PS/2, or PS/2 compatible USB keyboard can be connected. With an optional TMS99x8 based video card, a TV or monitor can also be used. This repository contains gerber files for both the ZX2022 and the video card. So it can now be easily replicated.

Features

  • Zilog Z80 processor @6MHz, higher clock rates might also work.
  • 128 Kilobytes of static RAM, can be switched in banks of 32k
  • 32 Kilobytes of EEprom
  • 2 Serial UART ports 187.5 kBaud (Clock freqency/32):
    • Terminal emulation, (Putty works best)
    • File transfer. Files in a special folder on the PC show up as drive B>
  • EEprom provides 15 Kilobytes of file memory (drive A>). CP/M executables are started automatically after reset or power on
  • IDE (PATA) interface. Provides 4x16 Kilobyte organized as drives C>..F>
  • CP/M 3.0
  • 64-Pin connector for up to 6 Extension modules
  • Optional graphics card with TMS99x8.
    • 256x192 pixels and 15 colors
    • 32 Sprites (8x8, 16x16 or 32x32 upscaled)
    • NTSC (TMS9918) or PAL (TMS9928)
  • Supports PS/2 or PS/2 compatible USB keyboards. New USB keyboards or wireless keyboards may NOT work.
  • Now programmable in C using SDCC (Small Device C Compiler)

To build the ZX 2022, do the following

  • Wire the parts on a breadboard or prototype board according to the schematic.
  • OR: Make or order a PCB based on the gerber files ./Schematic/Mainboard/gerber-main.zip (Recommended)
  • Load the Arduino Sketch loader/loader.ino into an Arduino Mega
  • Plug the Arduino Mega on the Bus connector, where it is marked on the silkscreen
  • Connect the TxB and RxB pins of the DART with Pin 0 (TX0) and 1 (RX0) of your Arduino Mega
  • Start a serial terminal emulation, for example "Putty", set 187500 Baud, 8 Bit, 1 Stopbit, no parity
  • On Windows, run the tool bin/loader.exe. Click on "ROM Image" and select the file CPM/rom.img
  • When a welcome message and the CP/M prompt "B>" appears on your terminal emulation, the ZX2020 is ready to use. If you have a PATA compatible hard drive connected, you need to format it under CP/M with the "mkdsk.com" tool before you can use it. Note that all data on the disk will be lost.

Using The Serial Disk Drive

Connect RX0 of the Arduino with TxB and TX0 with RxB of the ZX2022. It is not necessary to plug the Arduino into the pin header. Instead of an Arduino, a USB to serial converter may be used here as well. Select the serial port in the drop down menu and check the "Connect" check box to establish the serial connection. After a reset, the serial disk drive can be accessed as drive B>.

The folder CPM/serdisk contains the CP/M programs in up to 16 user folders numbered from 0 to 15. If any of these files have changed, click the "Reload" Button to apply the changes. To access the files from CP/M, type B, followed by the user number 1-15 and a colon. For example B5: gives access to the files under CPM/serdisk/5

Connecting a Hard Drive

IDE (PATA) hard drives can be connected through a 40-Pin connector. I recommend using a CompactFlash with a CF to IDE adapter. Best suitable are adapters that support power supply over pin 20 like this one: https://amzn.to/3SFdIag. call ´mkdsk.com´ on the serial disk drive B> to format the drive.

The Autostart Feature

Clicking the File button in the loader app uploads an executable CP/M file (*.com) that is executed after each power-on or reboot. The loader app detects when there is a new version of this "autostart program" and restarts the ZX2022 with this new version. This function is particularly useful for writing new software.

Connecting a PS/2 Keyboard

Connect a PS/2 Keyboard like shown below:

PS/2 Keyboard Connection

Connecting a USB Keyboard

USB Keyboards can also be connected if they support the PS/2 protocol. Most older keyboards do so, but newer or wireless keyboards often don't. These will not work. I recommend to make an adapter cable from an USB extension cable as shown below:

USB Keyboard Connection

Changing the keyboard layout

This is only necessary with PS/2 or USB keyboards. With terminal connections, the settings of the Windows-OS apply. To change the keyboard layout, set the KBLAYOUT variable in the file CPM/SYSCFG.LIB either to DE or EN (default) and rebuild the CP/M rom image.

Using With the TMS9918 Video Card

You find the schematic and gerber files in Schematic/Video/. Set a jumper or solder a bridge at the position IO2 on the pin header J3. This configures the card for IO addresses starting at 20h. This setting must match the p$vdp constant in CPM/SYSCFG.LIB

The TMS9918 can only display 40 columns, while terminals display 80 columns. This CP/M version is built for 80 columns, but it can be changed to 40 columns. To do this, open the file gencpm.dat, change the constant PAGWID to 28 (Which is 40 in hex) and rebuild the CP/M rom image.

Parts

2
QtyValueFootprintReferences
1Bus inzx2022:PinHeader_2x32_P2.54mm_VerticalJ1
1Bus outzx2022:PinHeader_2x32_P2.54mm_VerticalJ2

More from michalin/ZX2022

2
  • 2 layers100 × 100 mmZx2022, the printed circuit board in 3D

    Zx2022

    michalin/ZX2022

    Another DIY Z80 Computer With CP/M

    34 parts41GPL-3.0
  • 2 layers100 × 100 mmTMS9918, the printed circuit board in 3D

    TMS9918

    michalin/ZX2022

    Another DIY Z80 Computer With CP/M

    20 parts41GPL-3.0

Similar boards

  • 2 layers37 × 19 mmPassive rpi hub75-adapter, the printed circuit board in 3D

    Passive rpi hub75-adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    2 parts4.4kGPL-2.0
  • 2 layersDiode template, the printed circuit board in 3D

    Diode template

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    2 parts547GPL-3.0
  • 2 layers20.3 × 15.2 mmL0 button, the printed circuit board in 3D

    L0 button

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    2 parts546MIT
  • 2 layers35.1 × 46.8 mmSDEX2M2 Breakout Board, the printed circuit board in 3D

    SDEX2M2 Breakout Board

    NVNTLabs/switch2-SDEX2M2

    Micro SD Express to M.2 NVME Adapter for Nintendo Switch 2

    2 parts542GPL-3.0
  • 2 layers59.3 × 36.6 mmExpansionBoardTemplate, the printed circuit board in 3D

    ExpansionBoardTemplate

    BlueSCSI/BlueSCSI-v2

    BlueSCSI v2/Ultra - an open source, open hardware, SCSI emulator using the Pi Pico PR2040 and Pico 2 RP2350

    2 parts459GPL-3.0
  • 2 layersAlpha.9mm.wire, the printed circuit board in 3D

    Alpha.9mm.wire

    ohmtech-rdi/eurorack-blocks

    Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust

    2 parts410
  • 2 layers26.7 × 64 mmGpu power, the printed circuit board in 3D

    Gpu power

    dennisss/dacha

    Monorepo for awesome tools/projects/libraries

    2 parts397Apache-2.0

Questions

How big is the Template PCB?

It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Template use?

2 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Template KiCad files?

From the michalin/ZX2022 repository on GitHub, at the commit this page was made from: the board is Schematic/template/template.kicad_pcb and its schematic Schematic/Mainboard/zx2022.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Template design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).