Skip to the content
2 layers89.1 × 74.7 mmAmstrad CPC IO Logger, the printed circuit board in 3D

Amstrad CPC IO Logger

rabs664/Amstrad-CPC-IO-Logger

A Pico Based IO Logger for the Amstrad CPC

Size
89.1 × 74.7 mm
Copper layers
2
Thickness
1.6 mm
Parts
21
Nets
123
Pads
288
Tracks, vias
841, 16
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
2 Apr 2026
Updated
24 Jul 2026

Overview

Amstrad CPC IO Logger is an open-source printed circuit board by rabs664, from the rabs664/Amstrad-CPC-IO-Logger repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 89.1 × 74.7 mm with 21 parts on 123 nets, routed with 841 tracks and 16 vias.

It is built around the 74LVC245AD, 74HCT138D and 74HCT00D, with the 74HCT32D among its other parts. Its parts include 8 ICs, 7 capacitors, 3 connectors, 1 diode and 1 switch. It belongs with the RP2040 boards of this library.

Main components

4

README

README.md

Amstrad-CPC-IO-Logger

V2_0

[!CAUTION] USE AT YOUR OWN RISK. There is always the risk that this Amstrad CPC IO Logger could cause harm to your CPC. Although I have tested the Amstrad CPC IO Logger, there is no guarantee that it will work properly under all circumstances.

[!WARNING] This project is still in development and has only been made public to share the ideas and solicit feedback. I am no expert in this area and the project should not be used as a baseline example but more an idea of what can be done with the Pico.

Outline

This Amstrad CPC IO Logger is an external device which allows values written to the Gate Array and the CRTC to be retrieved. This can be useful, for example, for a debugger that exposes the state of these chips in a dedicated UI section.

Port &7F is used by the Gate Array and is write-only. On a standard Amstrad CPC, there is no ability to read back the values sent to the Gate Array (video mode, pen colours, ROM/RAM configuration, etc.). The firmware keeps a shadow copy of all written values in RAM for its own internal use, but many programs bypass the firmware entirely for such operations.

Port &BF can be used to read values from the CRTC, but only on certain CRTC types, and even then, only a subset of registers is readable. The firmware only maintains a shadow copy of R12–R13 (display start address). The remaining registers cannot be read back reliably across all machines, as behaviour varies depending on the CRTC type installed.

Summary

The Amstrad CPC only uses the top 8 address lines, A8-A15, to address standard IO devices, as illustrated below. For more information please refer to the CPC Wiki Default IO Port Summary page. To see a list of all known ports please refer to the CPC Wiki IO Port Summary page. This Amstrad CPC IO logger then captures A8-A15 and D0-D7 associated with any IO Write that occurs (i.e. a Z80 OUT instruction). Any IO Writes associated with the Gate Array or CRTC are captured and can be retrieved at any point with a series of simple IO Reads to the Amstrad CPC IO logger (i.e. a Z80 IN instruction).

Amstrad CPC IO Addressing

Design Summary

The discrete 74 series logic associated with Amstrad CPC IO Logger PCB presents two signals* to the Pico;

  • IOWR: Active low on an IO Write instruction from the Amstrad CPC
  • CSRD: Active low when on an IO read instruction from the Amstrad CPC for the Amstrad CPC IO Logger IO Address.

Amstrad CPC IO Logger Design

Capture

When IOWR goes low, State Machine 1 (SM1) will push the contents of A8-A15** and D0-D7 onto its RX FIFO. DMA1 detects this and places the data into a Capture Buffer. Note that the Capture buffer is configured as a Rig Buffer.

**A0-A1 are also capture but are not used.

The contents of the Capture Buffer is decoded and the CRTC and Gate Array Register write values are placed into a Register Buffer.

Timing

When data is placed into the Capture Buffer it is timed stamped in the Timing Buffer with time since start in micro seconds.

Retrieve

When CSRD goes low after an IN instruction (i.e. after INP(&F9E0) from BASIC), SM2 places a transfer count of 1 on it's RX FIFO. DMA2 detects this and places this value into the Transfer Count Trigger of DMA3. DMA3 detects this and then places the next register value from the Register Buffer onto the TX FIFO of SM2. This is then returned back to the Amstrad CPC. Repeated IN instructions will return the next value in the Register Buffer.

Register Buffer

The Register Buffer is a sequential list of register values written to the CRTC and Gate Array. Each IN instruction to the Amstrad CPC IO Logger will return the next value in the Register Buffer. An OUT instruction of 0 (i.e. OUT &F9E0,0 from BASIC) will reset the sequence back to the first value in the Register Buffer (i.e. CRTC R0). Equally an OUT instruction of 0 to 43 will set the position in the Register Buffer from which the next IN instruction will retrieve data. Note the Register Buffer is 64 bytes in size and a Ring Buffer, so values past 43 (the ERR Register) will return an uninitialized value until the retrieval position wraps.

Register Buffer V2

  • LR is the last CRTC Register written to.
  • LP is the last GA Pen written to.
  • P16 is the Border Pen
  • ERR is a decode error flag generated by the Amstrad CPC IO Logger (still under development).

Please refer to the CPC Wiki CRTC page and CPC Wiki Gate Array page for more information.

Pen Colour Values

The Pen Colour values returned do not include the 3 bit command value 010. See INKR Values in the Info folder.

Debug

Debug output to a console (i.e. putty) can be enabled within the code and controlled from the Amstrad CPC with an OUT instruction between 50 and 57 (i.e. OUT &F9E0,50 will print the contents of the Register Buffer to the console). See the main code for more information.

Debug

Debug commands.

DebugValueLog Header
PRINT_REG_BUFFER50REGBF
TOGGLE_PRINT_CRTC_INDEX51CRTCI
TOGGLE_PRINT_CRTC_DATA52CRTCD
TOGGLE_GA_PEN53GAPEN
TOGGLE_GA_COL54GACOL
TOGGLE_GA_RMR55GARMR
TOGGLE_GA_MMR56GAMMR
TOGGLE_GA_RMR257GARM2
TOGGLE_IO_LOG58IOLOG
TOGGLE_CRTC_DATA_TIMING_V159
TOGGLE_CRTC_DATA_TIMING_V260

CRTC Register Logging

IO Writes to the CRTC Register Logging can be enabled using OUT &F9E0,60 (OUT &F9E0,60 again will disable the logging).

When enabled the time stamped writes to the CRTC Registered will be loggged over USB. The logging includes a time since last write in micro seconds, the register number, the value written (in hex) and a "lag-o-meter".

The "lag-o-meter" is a value from 1 to 10 indicating the decode lag behind the capture. A value of 1 is no lag and a value of 10 implies the decode has been overrun and data may be lost.

CRTC Register Logging

Debug Command Logging

The logging of debug Commands sent to the CPC IO Logger from the CPC using OUT &F9E0 can be enabled using OUT &F9E0,58.

Testing

Only first pass testing has so far been completed on an Amstrad CPC 6128 but the concept is working. More comprehensive testing, including error conditions is still to be completed.

Below is the output from the sample BASIC program in the repository.

Example BASIC program

IO Address

By default the IO address used in the repository is set to F9E0. The following IO Address can be selected

  • F8E0
  • F8F0
  • F9E0
  • F9F0
Address Jumper Settings

Project History

06 June 2026

Removed V1.1 of the PCB

17 April 2026

CRTC Register Logging

26 June 2026

Found a small problem with the IO Address Selection when sending Debug Commands to the Pico. see Issue 2 V2.0 in progress

24 July 2026

Updated V2.0 of the PCB

Acknowledgements

  • NoRecess for the inspiration and support on this project.
  • RHD members for support and encouragement.
  • Petersfield Men's Shed IT and Electronics Group members for support and encouragement.
  • CPC Wiki for the great information.
  • TinWhisker for the Simple Pico CDC example

Parts

21
QtyValueFootprintReferences
7100nFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC1, C2, C3, C4, C5, C6, C7
374LVC245Package_DIP:DIP-20_W7.62mm_Socket_LongPadsU2, U3, U4
274HCT138Package_DIP:DIP-16_W7.62mm_Socket_LongPadsU6, U8
2Conn_02x02_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_VerticalJ2, J3
1clipboard:ebb3ee9a-570f-4b0c-ad82-8a87958112c0
11N5819Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1
174HCT00Package_DIP:DIP-14_W7.62mm_Socket_LongPadsU5
174HCT32Package_DIP:DIP-14_W7.62mm_Socket_LongPadsU7
1Conn_02x25_Odd_EvenConnector_IDC:IDC-Header_2x25_P2.54mm_HorizontalJ1
1PicoKiCad-RP-Pico:RPi_Pico_SMD_THU1
1SW_PushButton_Switch_THT:SW_PUSH_6mmSW1

Similar boards

  • 2 layers297.2 × 180.3 mm8bit computer, the printed circuit board in 3D

    8bit computer

    vascofazza/8bit-cpu

    Schematics & code for my 74LS-based 8-bit MK1 CPU

    377 parts317MIT
  • 2 layers200 × 150 mmMSX ONE, the printed circuit board in 3D

    MSX ONE

    jdgabbard/MSX-ONE-Computer

    MSX 1 Computer from discrete parts

    114 parts28GPL-3.0
  • 2 layers100 × 80 mmMini8085Ext, the printed circuit board in 3D

    Mini8085Ext

    skiselev/minimax8085-apu-ext

    Arithmetic Processor and Extension Board for MiniMax 8085 SBC

    42 parts13
  • 2 layers101.6 × 50.8 mmRc2014 monitor, the printed circuit board in 3D

    Rc2014 monitor

    Hyiger-Designs/rc2014_monitor

    Monitor Board for the RC2014

    62 parts2OSL-3.0
  • 2 layers88.9 × 88.9 mmAmstrad CPC-8255-PIO, the printed circuit board in 3D

    Amstrad CPC-8255-PIO

    rabs664/Amstrad-CPC-8255-PIO

    Simple 8255 PIO board compatible with the Amstrad CPC and MX4 connector.

    14 parts2GPL-3.0
  • 2 layers88.9 × 88.9 mmAmstrad CPC Z80-CTC DART V1-0, the printed circuit board in 3D

    Amstrad CPC Z80-CTC DART V1-0

    rabs664/Amstrad-CPC-CTC-DART

    Simple Z80 CTC and DART board compatible with the Amstrad CPC and MX4 connector

    18 parts2GPL-3.0
  • 2 layers368.3 × 215.9 mmTTL 6510 Computer fab, the printed circuit board in 3D

    TTL 6510 Computer fab

    StefansAI/TTL-6510-Computer

    Yet another CPU made from TTL chips

    330 parts1
  • 4 layers161.1 × 82.9 mmAll in one smc, the printed circuit board in 3D

    All in one smc

    nojan1/project-wrass

    The purpose of Project Wrass is to develop the Wrass 1.

    150 parts

Questions

How big is the Amstrad CPC IO Logger PCB?

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

What parts does the Amstrad CPC IO Logger use?

21 parts, built around the 74LVC245AD, 74HCT138D, 74HCT00D and 74HCT32D. 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 Amstrad CPC IO Logger KiCad files?

From the rabs664/Amstrad-CPC-IO-Logger repository on GitHub, at the commit this page was made from: the board is KiCad/Amstrad-CPC-IO-Logger.kicad_pcb and its schematic KiCad/Amstrad-CPC-IO-Logger.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Amstrad CPC IO Logger 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).