

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
474LVC245AD
SOIC-20-300mil-40℃~+125℃ 1 1.65V~3.6V 2.9ns@3.3V,50pF 24mA 40uA 74LVC 8 Bidirectional Schmitt trigger Tri-State SOIC-20-300mil Buffers, Drivers, Receivers, Transceivers ROHSNexperiaBuffer/Driver/Transceiver74HCT138D
SO-16-40℃~+125℃ 160uA 20ns@4.5V,50pF 3/8 4.5V~5.5V 4mA 4mA 74HCT Decoder Single Supply SOIC-16 Signal Switches, Multiplexers, Decoders ROHSNexperiaSignal Switches / Encoders & Decoders / Multiplexers74HCT00D
SO-14-40℃~+125℃ 100mV、400mV 12ns@4.5V,50pF 2 2V 3.7V、4.4V 4 4.5V~5.5V 40uA 4mA 4mA 74HCT Series 800mV NAND Gate Overvoltage-tolerant input TTL Compatible CMOS SO-14 Logic Gates ROHSNexperiaLogic Gates74HCT32D
SO-14-40℃~+125℃ 2 24ns@4.5V,50pF 2V 2uA 3.7V、4.4V 4 4.5V~5.5V 400mV 4mA 4mA 74HCT Series 800mV OR Gate SOIC-14 Logic Gates ROHSNexperiaGates
README
README.mdAmstrad-CPC-IO-Logger
[!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).
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.
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.
- 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 commands.
| Debug | Value | Log Header |
|---|---|---|
| PRINT_REG_BUFFER | 50 | REGBF |
| TOGGLE_PRINT_CRTC_INDEX | 51 | CRTCI |
| TOGGLE_PRINT_CRTC_DATA | 52 | CRTCD |
| TOGGLE_GA_PEN | 53 | GAPEN |
| TOGGLE_GA_COL | 54 | GACOL |
| TOGGLE_GA_RMR | 55 | GARMR |
| TOGGLE_GA_MMR | 56 | GAMMR |
| TOGGLE_GA_RMR2 | 57 | GARM2 |
| TOGGLE_IO_LOG | 58 | IOLOG |
| TOGGLE_CRTC_DATA_TIMING_V1 | 59 | |
| TOGGLE_CRTC_DATA_TIMING_V2 | 60 |
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.
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.
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
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 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| Qty | Value | Footprint | References |
|---|---|---|---|
| 7 | 100nF | Capacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mm | C1, C2, C3, C4, C5, C6, C7 |
| 3 | 74LVC245 | Package_DIP:DIP-20_W7.62mm_Socket_LongPads | U2, U3, U4 |
| 2 | 74HCT138 | Package_DIP:DIP-16_W7.62mm_Socket_LongPads | U6, U8 |
| 2 | Conn_02x02_Odd_Even | Connector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_Vertical | J2, J3 |
| 1 | clipboard:ebb3ee9a-570f-4b0c-ad82-8a87958112c0 | ||
| 1 | 1N5819 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1 |
| 1 | 74HCT00 | Package_DIP:DIP-14_W7.62mm_Socket_LongPads | U5 |
| 1 | 74HCT32 | Package_DIP:DIP-14_W7.62mm_Socket_LongPads | U7 |
| 1 | Conn_02x25_Odd_Even | Connector_IDC:IDC-Header_2x25_P2.54mm_Horizontal | J1 |
| 1 | Pico | KiCad-RP-Pico:RPi_Pico_SMD_TH | U1 |
| 1 | SW_Push | Button_Switch_THT:SW_PUSH_6mm | SW1 |
Similar boards
- 2 layers297.2 × 180.3 mm

- 2 layers200 × 150 mm

- 2 layers100 × 80 mm

Mini8085Ext
skiselev/minimax8085-apu-ext
Arithmetic Processor and Extension Board for MiniMax 8085 SBC
42 parts13 - 2 layers101.6 × 50.8 mm

- 2 layers88.9 × 88.9 mm

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 mm

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 mm

- 4 layers161.1 × 82.9 mm

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).