Amstrad CPC#
Open 8bitworkshop IDE
Click here to program the Amstrad CPC in the 8bitworkshop IDE now!
Amstrad CPC Specifications#
- Lifespan
1984-1990
- Media
Cassette tape, floppy disk (6128), ROM cartridge (464)
- CPU
Zilog Z80A @ 4 MHz
- Memory
64K RAM (6128), 34K RAM (464); 16K video RAM
- Display
160x200 (16 colors), 320x200 (4 colors), 640x200 (2 colors); 27 colors total
- Sound
General Instrument AY-3-8912 PSG (3 channels + noise)
- Input
Keyboard, joystick (via Kempston/Amstrad interface)
- Best-selling game
The system was popular in Europe, with a large game library

History#
The Amstrad CPC (Colour Personal Computer) was released by Amstrad in 1984, initially as the CPC 464. It was designed to be a complete home computer: the 464 model had a built-in cassette deck and monitor, and the 6128 model had a built-in floppy disk drive.
The CPC was popular in Europe, especially in the UK, France, and Spain, where it competed with the ZX Spectrum and Commodore 64. Its library included many notable games such as R-Type, Elite, Chase HQ, and Rick Dangerous.
The CPC line included the 464 (cassette), 664 (disk), and 6128 (64K RAM with disk). The 8bitworkshop IDE supports the 6128 model.
Hardware#
The CPC is based on the Z80 CPU and a custom Gate Array chip that generates video timing and memory management:
CPU : Zilog Z80A @ 4 MHz
Video : Gate Array + Motorola 6845 CRTC
Sound : General Instrument AY-3-8912 PSG
ROM : 48K (16K BASIC + 16K AMSDOS + 16K firmware/OS) on 6128, 32K (16K BASIC + 16K firmware/OS) on 464
RAM : 64K (6128) / 34K (464)
Video RAM : 16K (part of main RAM)
Video#
The CPC video system is built around the Motorola 6845 CRTC (Cathode Ray Tube Controller) and the Gate Array. It supports three text/graphics modes:
Mode 0 - 160x200 pixels, 16 colors (4 bits per pixel)
Mode 1 - 320x200 pixels, 4 colors (2 bits per pixel)
Mode 2 - 640x200 pixels, 2 colors (1 bit per pixel)
The color palette consists of 27 colors (3 bits each for red, green, and blue intensity - though one combination is missing). Each mode selects its colors from this palette via the Gate Array’s ink registers.
The video memory is interleaved: each 8-pixel row of a character is stored at
a memory address that skips by 0x800 bytes per line, a layout designed to
simplify the 6845’s refresh timing. The screen base address is $C000 in
main memory.
Sound#
The AY-3-8912 PSG provides:
3 square wave tone channels
1 noise channel
2 8-bit I/O ports (used for the keyboard and joystick)
The sound is output through the monitor’s built-in speaker on the 464, or through the TV/monitor on the 6128.
Controllers#
The CPC keyboard is a full QWERTY keyboard with 74 keys. The joystick is supported through the AY-3-8912’s I/O ports. The 8bitworkshop IDE maps keyboard and joystick input through the emulated hardware.
Memory Map#
Address Range |
Description |
|---|---|
|
ROM (BASIC + AMSDOS) |
|
RAM (bank switchable on 6128) |
|
Video RAM (screen buffer) |
|
RAM (bank switchable on 6128) |
On the 6128, the RAM is divided into 4 banks of 16K, switchable via the Gate
Array’s memory management register. Video RAM is always accessible at
$C000-$FFFF in the “normal” configuration.
I/O Ports#
The CPC uses the Z80’s I/O space for hardware control:
Port |
Function |
|---|---|
|
Gate Array: palette, border, mode, memory management |
|
Gate Array (read): status |
|
CRTC 6845 registers |
|
AY-3-8912 PSG (register select) |
|
AY-3-8912 PSG (data) |
|
PPI 8255 (keyboard, ROM/RAM select) |
Programming#
The 8bitworkshop IDE supports Amstrad CPC development in Z80 assembly language (with the ZMAC assembler) and C (using the SDCC compiler with the CPCtelera library).
CPCtelera Library#
The CPCtelera library provides a comprehensive API for CPC development, including sprite management, tilemaps, and sound. It is used by the example programs. See the CPCtelera documentation for details.