konCePCja is an Amstrad CPC emulator based on Caprice32.
© 1997–2015 Ulrich Doewich · © 2016–2025 Colin Pitrat (Caprice32)
© 2024–2026 the konCePCja contributors
konCePCja is free software, distributed under the terms of the GNU General Public License, version 2 (GPLv2), included with the source as COPYING.txt. This manual is distributed with konCePCja under the same terms.
Amstrad, CPC, CPC464, CPC664, CPC6128, and CPC6128+ are trademarks of their respective owners. This is an independent project and is not affiliated with, nor endorsed by, the trademark holders.
Illustrations, diagrams, and screenshots © 2026 Cezar “ikari” Pokorski, ikari.press.
Font credits: Rokkitt (OFL), TeX Gyre Schola (GUST), OCR-B by Matthew Skala, JuliaMono (OFL), Cascadia Code (OFL), and “Amstrad CPC correct” by Damien Guard (CC-BY-SA 3.0). See manual/fonts/LICENSES.md.
About This Manual
This manual is a guide to using konCePCja, from first launch through to its power-user features. It assumes you know roughly what an Amstrad CPC is, but not how the emulator’s internals work.
Early chapters cover installation, loading software, the interface, and configuration. Later chapters document the emulated hardware and peripherals, the developer tools, and the scripting interfaces — the IPC debugging protocol (e.g. mem read 0x4000 16), the telnet console, and the M4 Board’s web interface — for technically inclined readers.
Conventions used throughout: function keys appear as F12 menu paths as configuration keys as system.model I/O ports as &FD06 and Z80 registers as HL.
This chapter takes you from nothing to a running Amstrad CPC: what konCePCja is, what you need, how to build it on your platform, and how to load your first piece of software. If you have already built and launched the emulator, skip ahead to Loading Software on page 1.
konCePCja is an emulator of the Amstrad CPC range of 8-bit home computers. It is built on the well-established Caprice32 emulator core, extended with a modern SDL3 video and audio backend and a Dear ImGui developer interface.
It runs on macOS, Linux, and Windows (the latter via the MinGW toolchain), and emulates the whole classic CPC line as well as the Plus range:
What sets konCePCja apart from other CPC emulators is its emphasis on inspection and automation: a full developer-tools panel (see F12), a scriptable TCP debugging interface, a telnet console, and an emulated M4 Board with a web file manager. These power-user features are documented in the later chapters.
konCePCja is lightweight by modern standards. The emulated machine is an 8-bit computer; the host requirements come almost entirely from the build toolchain and the windowing layer.
konCePCja is built from source. The build needs a C++17 compiler, plus SDL3 (vendored as a git submodule or supplied by your package manager), FreeType, zlib, libPNG, and CMake. Always clone with submodules:
Install the dependencies with Homebrew, build the vendored SDL3, then build the emulator:
To produce a double-clickable application bundle (.dmg), run make ARCH=macos macos_bundle.
Install the build dependencies, then build SDL3 and the emulator:
If your distribution already ships SDL3 (Ubuntu 25.04 and later), you can skip the submodule build:
Useful build options: make debug (or DEBUG=TRUE) for a debug build, WITHOUT_GL=TRUE to build without OpenGL.
Install MSYS2 from msys2.org and build from a MinGW shell. konCePCja’s continuous integration builds both the MINGW32 and MINGW64 targets, so either works.
Launch konCePCja with no arguments and it boots straight to the default machine — a CPC 6128 with 128 KB of RAM:
You are greeted by the CPC firmware sign-on and the Locomotive BASIC prompt:
The word Ready followed by a flashing cursor means the machine is waiting for a BASIC command. This is a fully working CPC: type PRINT “HELLO” and press RETURN to see it respond.
Press F1 at any time to open the in-emulator menu (it pauses emulation), or F12 to open the developer tools. The complete function-key reference is in Chapter 2.
To start on a different machine — for example the Plus — override the model on the command line (model 3 is the 6128+):
konCePCja loads the standard CPC media formats. The quickest way is to pass a file on the command line, or drag it onto the window; both also work through .
The most common format. Load and auto-run a disc in one step with the –autocmd (-a) option:
Or load it and run by hand from BASIC with run"game.
Insert a tape image, then in BASIC select the tape, issue LOAD"", and start playback with F4 (tape play/pause):
Cartridges are a Plus-range feature. Pass a .cpr file on a 6128+ machine (system.model = 3) and it boots directly from the cartridge.
A snapshot is a frozen machine state — RAM, registers, and hardware — that resumes instantly. Load one from the command line or via save the current state with Shift+F3.
konCePCja can also open a .zip archive containing CPC media (DSK, CDT, or SNA) and load the appropriate file from inside it, so you do not have to unpack downloads by hand.
Run koncepcja –help for the full list. The options you will reach for most:
| Option | Effect |
| -a, --autocmd=<cmd> | Run a BASIC command once the CPC has booted |
| -c, --cfg_file=<file> | Use a specific configuration file |
| -i, --inject=<file> | Inject a binary into memory after boot |
| -o, --offset=<addr> | Injection address (default 0x6000) |
| -O, --override=<opt=val> | Override one config option (repeatable) |
| -s, --sym_file=<file> | Load symbols for the disassembler |
| -v, --verbose | Verbose logging |
| -V, --version | Show the version and exit |
So, for example, to boot a 6128+, inject a loader at 0x4000, and auto-run a disc:
The build fails immediately, complaining about SDL. You almost certainly cloned without submodules. Either re-clone with git clone –recurse-submodules, or fetch them in place with git submodule update –init –recursive, then build the vendored SDL3 as shown above (or install your distribution’s libsdl3-dev).
On macOS, a crash dialog mentions “reopening windows” at startup. This is stale macOS saved-application state, not a konCePCja bug. Clear it:
The window is black or OpenGL fails to start. Build or run with WITHOUT_GL=TRUE for the software-render fallback; this also lets konCePCja run on machines and remote sessions without a usable GPU.
A disc or tape image is rejected. Malformed images are refused rather than crashing the emulator; run with –verbose and look for an ERROR line naming the problem.
konCePCja wraps the emulated machine in a thin modern interface: a menu bar, a set of function-key shortcuts, an on-screen display, and a virtual keyboard. This chapter is your map to the controls.
The window shows the live CPC display. The emulated machine runs continuously; you interact with it by typing (the host keyboard maps to the CPC keyboard) and through the menu and function keys described below.
Along the top of the window is a toolbar: the button, the status of each disc drive and the tape, transport controls for tape playback, and a speed indicator showing the current frame rate and emulation speed. It stays visible while the machine runs, so the drive and tape state are always in view.
Press F1 to open the in-emulator menu, which pauses emulation while it is open. From here you can load media, save and load snapshots, reach the settings dialog, and open the developer tools.
The function keys are the quickest way to drive the emulator:
| Key | Action |
| F1 | Open the menu (pauses emulation) |
| F2 | Toggle fullscreen |
| F3 | Take a screenshot |
| F4 | Tape play / pause |
| F5 | Reset the CPC |
| F6 | Multiface II stop button |
| F7 | Toggle joystick emulation |
| F8 | Toggle the FPS display |
| F9 | Toggle the speed limiter |
| F10 | Exit konCePCja |
| F12 | Toggle the developer tools |
| Shift+F1 | Virtual keyboard |
| Shift+F3 | Save a snapshot |
Some CPC keys have no obvious host equivalent. Press Shift+F1 for an on-screen CPC keyboard you can click, showing the true CPC layout including the numeric keypad and the COPY key.
Brief status messages — a snapshot saved, the speed limiter toggled — appear as a transient on-screen display overlaid on the CPC picture.
Press F3 to save a PNG screenshot of the current CPC display.
For quick access to any action without hunting through menus, press Ctrl+K (or Cmd+K on macOS) to open the command palette. Start typing and it filters a searchable list of every command — each shown with its description and keyboard shortcut — and runs the one you choose. It is the fastest route to a feature whose menu location you have forgotten.
A configuration profile is a named bundle of machine settings — model, RAM size, clock speed, frame-skip, screen scale and scanlines, the sound options, and the joystick and keyboard modes. Save the current settings as a named profile and switch between profiles in one step, rather than changing options one at a time. This is convenient for keeping, say, a “464 with tape” setup and a “6128+ with sound” setup side by side.
Chapter 1 showed the quickest way to load a single file. This chapter covers the media system in more depth: the two disc drives, the tape deck, and the snapshot system for saving and resuming machine state.
The CPC has two 3-inch disc drives, A and B. Insert a .dsk image into a drive by dragging it onto the window, choosing , or naming it on the command line. With a disc in drive A, run a program from BASIC:
konCePCja reads and writes both standard and extended .dsk images. Write protection is honoured, so software that checks for it behaves correctly.
A standard .dsk stores decoded sector data — every sector on a track the same size, no gaps or sync marks. An extended .dsk (EDSK) adds variable sector sizes and per-sector status bytes, which lets it reproduce deliberately malformed sectors and most copy protection. konCePCja picks the right reader automatically from the file’s header.
The 3-inch discs themselves come in a few standard layouts, all 40 tracks, single-sided, 512-byte sectors:
| Format | Sectors/track | First sector ID | Capacity | Notes |
| DATA | 9 | &C1 | 178 KB | The usual format for software and your own files |
| SYSTEM | 9 | &41 | 169 KB | Reserves tracks 0–1 for a CP/M boot loader |
| IBM | 8 | &01 | 160 KB | CP/M-compatible 8-sector layout |
You rarely need to think about which is which — AMSDOS reads all three — but it explains why a “180 KB” disc holds a little less once formatted, and why the disc tools (Chapter 7) report sectors numbered from &C1 rather than 1.
On a 464 (or any machine with the tape firmware), select the tape, ask BASIC to load, and press F4 to start playback:
F4 toggles tape play and pause at any time. Both .cdt and .voc tape images are supported.
Cartridge (.cpr) images are a Plus-range feature. On a 6128+ (system.model = 3), loading a cartridge boots the machine directly from it.
A snapshot freezes the entire machine — memory, registers, and hardware state — into a .sna file that resumes instantly. Save the current state with Shift+F3 load one through or on the command line. Snapshots are ideal for resuming a game exactly where you left it, or for sharing a precise machine state.
Much CPC software is distributed as .zip archives. konCePCja can open a ZIP directly: it reads the archive’s directory, finds a file with a recognised CPC extension (.dsk, .cdt, or .sna) inside, and loads it — so you do not have to unpack downloads by hand before running them.
Some heavily copy-protected discs are preserved in the .ipf (Interchangeable Preservation Format) rather than .dsk. konCePCja loads .ipf images into a drive just like ordinary disc images, reproducing the original protection so the software runs as it did from the real disc.
konCePCja reads its settings from a plain-text configuration file and from command-line arguments. This chapter covers where that file lives, the options you are most likely to change, and how to override any setting without editing the file.
konCePCja looks for a file named koncepcja.cfg in the following locations, in order of precedence (the first one found wins):
koncepcja.cfg in the current working directory;$XDG_CONFIG_HOME/koncepcja.cfg (or ~/.config/koncepcja.cfg); /.koncepcja.cfg/etc/koncepcja.cfg.The file is divided into [section] headings, each containing key=value lines.
The system.model option selects which machine to emulate. The default, 2, is the CPC 6128; 3 is the 6128+ (needed for cartridges and ASIC features).
Any configuration option can be overridden for a single run with –override (-O), without touching the file. The argument is section.key=value, and the flag may be repeated:
This is the quickest way to try a different machine or disable sound for one session. A full reference of every configuration option is given in Appendix C.
konCePCja emulates the complete Amstrad CPC: the Z80 processor and every custom chip around it. You do not need any of this to play games, but the developer tools (Chapter 7) expose all of it, and understanding the machine helps when you write or debug CPC code. This chapter covers both the system as a whole — its memory, screen modes, and I/O — and the individual chips.
At the centre is a Zilog Z80A running at 4 MHz. konCePCja implements the full documented and undocumented instruction set, including the shadow register bank and the interrupt modes. The developer tools can breakpoint, step, and disassemble it (Chapter 7).
The Z80 sees a 64 KB address space, divided into four 16 KB banks. Two of those banks can show ROM instead of RAM:
ROM is an overlay: when a ROM is paged in, reads from its range return ROM, but writes still go to the RAM underneath. This is how the firmware lives at &0000 and &C000 while the program’s variables occupy the same addresses in RAM.
The 6128′s extra 64 KB (and the up-to-4 MB Yarek-style expansion) is reached by bank switching: a control register pages 16 KB blocks of the extra RAM into the &4000–&7FFF window (and others), so the 8-bit Z80 can use far more than 64 KB.
The seven standard banking configurations (selected by writing &C0–&C7 to the Gate Array’s RAM-config register at &7Fxx) rearrange which physical 16 KB blocks appear in each window. The most common use is double-buffering: draw the next frame into a hidden bank, then page it into the screen window in one write, so the display never tears. The developer tools’ memory viewer (Chapter 7) always shows the currently-paged view; to inspect a bank that is not currently visible, page it in first.
The CPC has three screen modes, each trading colour for resolution. All three use 80 bytes per scan line:
| Mode | Resolution | Colours | Typical use |
| 0 | 160 × 200 | 16 inks | Games — chunky, colourful pixels |
| 1 | 320 × 200 | 4 inks | The default — text and general use |
| 2 | 640 × 200 | 2 inks | High-resolution text and word processing |
Switch modes from BASIC with MODE 0, MODE 1, or MODE 2. A mode can even be changed partway down the screen for split-screen effects.
The CPC can show 27 distinct hardware colours. Each mode draws from a palette of inks — 16 in mode 0, 4 in mode 1, 2 in mode 2 — and any ink can be assigned any of the 27 colours, plus a separate border colour. Changing an ink updates every pixel drawn in that ink at once, which is the basis of many colour-cycling effects. The Plus machines widen this to 4096 colours.
The custom chips are reached through Z80 OUT and IN instructions. Because the CPC decodes I/O addresses only partially, each device responds to a range of ports identified by the upper address bits:
| Port range | Device |
&7Fxx | Gate Array (mode, palette, ROM paging) and RAM banking |
&BCxx–&BFxx | CRTC register select, write, and read |
&DFxx | Upper-ROM bank select |
&EFxx | Printer port |
&F4xx–&F7xx | PPI 8255 (keyboard, PSG control, tape) |
&FB7E–&FB7F | Floppy disc controller |
Note that the Gate Array is write-only — software cannot read back the current mode or palette and must remember what it set. The developer tools, however, show the live state directly (Chapter 7).
The display refreshes at 50 Hz. The Gate Array raises a Z80 interrupt every 52 CRTC scan lines — six times per frame, every 3 milliseconds — which the firmware uses for the keyboard scan, sound, and timing. Because the interrupt is tied to the raster position, demo code can synchronise palette and mode changes to exact points on the screen.
Gate Array. Amstrad’s custom video and memory controller — it holds the palette, selects the screen mode, pages the ROMs, and generates the raster interrupt described above.
CRTC. The Cathode Ray Tube Controller generates video timing. The CPC shipped with several variants, and konCePCja emulates all four types — the HD6845S (0), UM6845R (1), MC6845 (2), and the AMS40489 (3) in the Plus machines — each with its own register-level quirks, so timing-sensitive software runs correctly when the matching type is selected.
PPI 8255. The general-purpose I/O chip: it reads the keyboard matrix, controls the PSG, and drives the cassette motor.
PSG AY-3-8912. Three channels of square-wave tone plus a noise generator and a hardware envelope generator. Its state is visible in the audio developer tools and can be captured to a YM file (Chapter 12).
FDC uPD765A. The floppy disc controller, reading and writing both standard and extended .dsk images, including copy-protected formats.
ASIC. On the 6128+ (system.model = 3) a single ASIC replaces the Gate Array and CRTC and adds hardware sprites, the 4096-colour palette, programmable raster interrupts, and DMA sound channels, all inspectable through the ASIC developer-tools window.
Beyond the core machine, konCePCja emulates a range of expansion hardware that was sold for the CPC over the years — sound add-ons, real-time clocks, mice, a multi-function interface board, and a light gun. Each is enabled through configuration (Chapter 4) or the menu, and is listed here with the I/O it uses.
Peripherals are off by default. Most are switched on with a configuration key (Chapter 4): for a single session use the -O override, or set it in koncepcja.cfg to make it permanent. For example, to start with both the AMX mouse and the Symbiface II board active:
The light gun (phaser) is toggled at runtime with its function key instead. Each section below names the I/O ports its device uses — which the developer tools (Chapter 7) can watch with an I/O breakpoint when you are debugging peripheral software.
A simple 8-bit digital-to-analogue converter on the printer port. konCePCja feeds the printer-port value through a level table and mixes the result into the sound output, reproducing sampled-audio playback software.
An 8-bit DAC drum machine on port &FFxx (the uncontested I/O space where all upper address bits are high). It mixes into the audio output the same way as the Digiblaster.
A Dallas DS1216 phantom real-time clock that sits in the upper ROM socket. It intercepts ROM reads using a recognition pattern and returns the host system time in BCD form, so CPC software that expects the SmartWatch reads the correct date and time.
A mouse that connects to the joystick port and appears on keyboard-matrix row 9. Movement is reported as direction pulses (“mickeys”) and the buttons map onto the joystick fire lines. Enable it with input.amx_mouse = 1.
A multi-function expansion board providing three devices:
&FD06–&FD0F, backed by a raw .img file — supports reading, writing, and IDENTIFY DEVICE.&FD14 / &FD15, with 14 time registers from the host clock plus 50 bytes of CMOS NVRAM.&FD10 / &FD18, using a multiplexed FIFO protocol.Enable it with peripheral.symbiface = 1.
A virtual-filesystem expansion that exposes a host directory to the CPC as a storage device, with an embedded web file manager. It is covered in full in Chapter 11.
A ROM-based debugging and snapshot interface. Press F6 to trigger its stop button and enter its menu, as on real hardware.
A light gun emulated by intercepting the CRTC registers. Aim with the mouse pointer over the display; the trigger maps to a fire button.
For atmosphere, konCePCja can mix in procedurally generated floppy-drive motor hum and head-seek clicks, and tape loading hiss, alongside the emulated audio.
konCePCja includes a full suite of developer tools — a debugger, memory inspector, disassembler, and more — modelled on modern emulator debug environments. Press F12 to open them. This chapter tours the windows you will use most.
The developer tools open as a set of dockable windows over the CPC display. Core windows open automatically the first time you press F12 the rest are reached from the DevTools toolbar.
The registers window shows the live Z80 register file — AF, BC, DE, HL, the index registers, PC, and SP — together with the individual flag bits. Values update as the machine runs and can be edited while paused.
The disassembly window decodes memory into Z80 mnemonics around the program counter, follows jumps and calls, and shows symbol labels when a symbol file is loaded. Breakpoints can be toggled directly in the listing.
A hex/ASCII viewer over the full 64 KB address space, with search and direct editing (poke).
The stack window shows the bytes around SP, so you can watch calls and returns as they happen.
Set execution breakpoints (optionally conditional, with pass counts), memory watchpoints, and I/O breakpoints on port reads and writes. When one fires, emulation pauses and the registers and disassembly update to the breakpoint location.
Load a symbol file (with –sym_file) to show labels in the disassembler and to refer to addresses by name.
Dedicated windows expose the live state of the video hardware (Gate Array palette, CRTC registers, screen mode) and the audio hardware (the three PSG channels, the envelope generator, and any active DAC peripherals).
The toolbar also opens windows for the data-area map, disassembly export, the ASIC (on Plus machines), the disc tools, the silicon-disc expansion, and session recording (Chapter 12). The integrated Z80 assembler has its own chapter (Chapter 8).
The graphics finder decodes raw memory as CPC pixels, so you can locate sprites, fonts, and screen data by eye. Point it at an address, set the screen mode (0, 1, or 2) and the width in bytes, and it renders that region as a zoomable image. It can also encode edits back into memory, making it a simple in-memory pixel editor.
&C000The memory search tool scans the full address space for a pattern. You can search for hex byte sequences, text strings, or assembly (matching decoded instructions), with wildcards for unknown bytes. Each hit is reported with its address and surrounding context — the disassembled instruction for an assembly search, or a hex dump otherwise.
The pokes system applies game cheats from .pok files. A poke file lists named cheats (for example “infinite lives”), each a set of memory writes. Apply a cheat to patch the running game and un-apply it to restore the original bytes. Where a cheat needs a value you choose — a number of lives, say — konCePCja prompts you for it.
To see how the windows work together, here is a typical investigation — finding where a program writes to the screen.
First, pause the machine (the menu, or pause over IPC) and open the disassembly and memory windows. Suppose you want to catch every write to screen memory, which lives at &C000. Add a watchpoint on that range, set to trigger on writes:
Resume. The moment the program writes to the screen, emulation pauses, the registers window shows the exact PC of the writing instruction, and the disassembly window centres on it. The stack window shows who called the routine. From there you can single-step (F12 tools, or step) to watch the write happen byte by byte, edit a register or memory value to test a hypothesis, and set a permanent breakpoint to return to this spot later.
The same loop — pause, set a breakpoint or watchpoint, run, inspect, step — is the heart of debugging on the CPC. Conditional breakpoints (Chapter 9) narrow it further: break only when a register holds a particular value, or only on the hundredth time a routine runs. Everything available in these windows is also available over the IPC interface, so an investigation you do by hand can be turned into a repeatable script.
konCePCja includes an integrated Z80 assembler, so you can write machine code and assemble it straight into the emulated machine’s memory without leaving the emulator — ideal for patching a game, trying an idea, or learning Z80 by watching code run.
Open the assembler window from the developer-tools toolbar (F12). Type or paste Z80 source into the editor and assemble it; the resulting bytes are written directly into CPC memory at the addresses your source specifies. Assembly happens in two passes — the first builds the symbol table and measures each instruction, the second emits the bytes — so labels can be referenced before they are defined. Errors are reported with line numbers, and the symbol table from a successful assembly is available for inspection and for the disassembler.
&4000: source on the left with syntax highlighting, and the toolbar to assemble, check, format, load, and saveThe assembler accepts standard Z80 mnemonics, labels, directives, and an expression evaluator.
| Element | Form |
| Label | name: at the start of a line; referenced by name |
| Origin | org <addr> sets the assembly address |
| Define bytes | db / defb — one or more byte values or a string |
| Define words | dw / defw — 16-bit values |
| Define space | ds / defs <n> — reserve n bytes |
| Constant | name equ <value> |
| Comment | ; to end of line |
In expressions, & (or #) introduces a hexadecimal number and % a binary one; the usual arithmetic and bitwise operators are available.
The assembler is also scriptable through the IPC interface (Chapter 9), so a build script can assemble code into the machine and read back the results:
| Command | Description |
| asm text <source> | Set the source buffer |
| asm load <file> | Load source from a file |
| asm assemble | Assemble into memory |
| asm errors | Read back any assembly errors |
| asm symbols | Read the resulting symbol table |
| asm source | Read the current source buffer |
Because assembled symbols feed straight into the disassembler and the IPC sym commands, you can assemble a routine, breakpoint one of its labels by name, and step through it — a complete edit-assemble-debug loop inside the emulator.
konCePCja exposes a TCP control interface that lets external scripts and tools drive and inspect the emulated machine in depth: pause and step the processor, read and write memory and every hardware register, set conditional breakpoints and watchpoints, search memory, inject input, and hash state for regression testing. This chapter is the working reference.
The server listens on localhost:6543. The protocol is plain text: one command per line, newline-terminated. Every response begins with OK (followed by any result) or ERR ‹code› ‹reason›. Any tool that speaks TCP works:
Numbers may be given in decimal, hexadecimal (0x, #, or & prefix), or binary (0b or % prefix) throughout.
| Command | Description |
| ping | Replies OK pong |
| version | Version string |
| help | List all commands |
| pause / run | Pause or resume emulation |
| reset | Hard reset the CPC |
| quit [code] | Exit the emulator (default code 0) |
| load <path> | Load by extension: .dsk (drive A), .sna, .cpr, or .bin (loaded at 0x6000) |
Read or write the Z80 register file, and read the custom chips’ live state:
| Command | Description |
| regs | Dump all Z80 registers (A, F, … PC, plus IM and HALT) |
| reg get <name> | One register — A…L, AF…SP, the shadow set AF'…HL', I, R, IM, IFF1, IFF2 |
| reg set <name> <value> | Write a register |
| regs crtc | CRTC registers R0–R17 and internal counters |
| regs ga | Gate Array state — mode, pen, all 17 inks, ROM/RAM config |
| regs psg | AY-3-8912 registers R0–R15 |
| Command | Description |
| mem read <addr> <len> [ascii] | Read memory through Z80 banking |
| mem write <addr> <hex> | Write a hex byte string |
| mem fill <addr> <len> <hex> | Fill with a repeating pattern |
| mem compare <a1> <a2> <len> | Compare two regions; lists up to 64 differences |
By default reads see the standard Z80 view, with ROM overlaid at 0x0000. Two options change that: --view=write exposes the underlying RAM beneath the ROM, and --bank=N reads a raw physical 16 KB bank, ignoring the current mapping — useful for inspecting paged-out memory.
Execution breakpoints can be plain, conditional, or counted:
| Command | Description |
| bp add <addr> [if <expr>] [pass <N>] | Add a breakpoint, optionally conditional and/or skipping its first N−1 hits |
| bp del <addr> / bp clear | Remove one or all |
| bp list | List breakpoints with their conditions and hit counts |
Watchpoints break on memory access rather than execution:
| Command | Description |
| wp add <addr> [len] [r|w|rw] [if <expr>] | Watch a range for read, write, or both (default: 1 byte, rw) |
| wp del <index> / wp clear | Remove one or all |
| wp list | List watchpoints |
A watchpoint condition can use the special variables address, value, and previous to inspect the access that triggered it:
Break on Z80 IN/OUT to a port. Because the CPC decodes I/O addresses incompletely, ports are matched through a mask; the X shorthand wildcards a nibble:
| Shorthand | Matches |
| BCXX | Gate Array register select (0xBC00, mask 0xFF00) |
| FBXX | FDC data register |
| F5XX | Printer port |
Conditional breakpoints, watchpoints, and I/O breakpoints share a WinAPE-inspired expression language. All arithmetic is 32-bit signed; comparisons return −1 for true and 0 for false.
| Category | Tokens |
| Operators (low→high) | or, xor, and, comparisons (< <= = >= > <>), + -, * / mod, unary not |
| Numbers | decimal 42, hex #FF/&FF/0xFF, binary %10110/0b10110 |
| Registers | A…L, AF…SP, IXh/IXl, shadows AF'…HL' |
| Context | address, value, previous, mode |
| Functions | peek(addr), byte/hibyte/word/hiword(v), ay(reg), crtc(reg), timer_start/stop(id) |
| Command | Description |
| step [N] | Single-step N instructions |
| step over [N] | Step, skipping over CALL/RST |
| step out | Run until the current routine returns |
| step to <addr> | Run until PC reaches an address |
| step frame [N] | Advance N complete video frames |
| wait pc <addr> [ms] | Resume, block until PC reaches addr, then pause |
| wait mem <addr> <val> [mask] [ms] | Block until memory matches |
| wait bp [ms] | Block until any breakpoint fires |
| wait vbl <count> [ms] | Wait N vertical blanks ( 20 ms each) |
The wait commands resume emulation, block until their condition or a timeout (default 5000 ms, then ERR 408 timeout), and pause again — the building block for deterministic test scripts.
| Command | Description |
| disasm <addr> <count> [--symbols] | Disassemble N instructions |
| disasm follow <addr> | Recursive disassembly following jumps and calls |
| disasm refs <addr> | Find all instructions targeting an address |
| stack [depth] | Walk the call stack from SP, marking likely return addresses [call] |
| mem find hex <start> <end> <pat> | Search bytes (?? = wildcard) |
| mem find text <start> <end> <str> | Search ASCII text |
| mem find asm <start> <end> <pat> | Search instructions (* = operand wildcard) |
| sym load/add/del/list/lookup | Manage and query the symbol table |
Keyboard, joystick, and mouse input are all driveable (keys take a friendly name or a single character):
For continuous integration, CRC32 hashes turn machine state into a single comparable value:
| Command | Description |
| hash vram | CRC32 of the visible screen |
| hash mem <addr> <len> | CRC32 of a memory range |
| hash regs | CRC32 of the packed register state |
Type and run a one-line BASIC program, wait for it to settle, then assert on the result by hashing the screen:
Run the emulator headless (no window) for CI with the –headless flag; the protocol is identical in headless and windowed modes. A Python test harness built on these commands lives in the project’s test/integrated directory.
Alongside the binary IPC protocol, konCePCja offers a human-friendly text console: a remote terminal for the emulated CPC that mirrors everything the machine prints and accepts your keystrokes in return.
The console listens on port 6544 (one higher than the IPC port). Connect with any terminal client:
Only one client is served at a time; a new connection replaces the previous one.
Output works in two ways at once. Under AMSDOS, konCePCja hooks the firmware text-output routine, so every character the CPC prints to the screen is echoed to your terminal. Under CP/M it hooks the BDOS console-output call, so CP/M programs are mirrored too — no configuration needed.
Anything you type is fed to the CPC as keyboard input. Printable characters pass straight through, and the common terminal control sequences are translated to their CPC equivalents:
| You type | CPC key | Notes |
| Arrow keys (ESC [ A…D) | Cursor Up/Down/Left/Right | Standard ANSI cursor sequences |
| ESC (alone) | ESC | Bare escape |
| Backspace / DEL | DEL | 0x7F or 0x08 |
| Tab | TAB | |
| Ctrl+C | ESC | Common telnet interrupt |
| Return / Enter | RETURN | CR and LF both map to RETURN |
| Printable ASCII | the matching key | Direct pass-through |
Connect, and you are talking to the CPC’s BASIC prompt directly:
Press Ctrl+C (sent as ESC) to break the running program.
The console is ideal for driving a CPC BASIC or CP/M session from a script or an SSH session, copying text in and out of the emulated machine, or watching its output without the graphical window. It pairs naturally with the IPC interface (Chapter 9): use IPC to set up the machine deterministically, then the telnet console to interact with it as text. Note that the port probes forward (up to +10) if 6544 is already taken, so the actual port is reported in the log on startup.
The M4 Board is a popular real-world expansion that gives the CPC a network connection and SD-card storage. konCePCja emulates it, backing the virtual SD card with a directory on your host and serving the same web file manager the real board provides.
The emulated M4 Board exposes a host directory to the CPC as a storage device through a command/response protocol. CPC software builds a command by writing its bytes one at a time to &FE00, then writes &FC00 to execute it; the board places its reply in a ROM overlay at &E800 for the CPC to read back. A path-traversal guard keeps CPC software confined to the host directory it is given. The board is compatible with the cpcxfer tool and the M4 Board Android app.
An embedded HTTP server provides a browser-based file manager for the virtual SD card. By default it listens on port 8080:
From the browser you can list directories, upload and delete files, create folders, and remotely run a file on the CPC. The endpoints mirror the real M4 Board’s config.cgi interface, so existing M4 tooling works unchanged:
| Request | Action |
| GET / | The file-browser web page |
| GET /config.cgi?ls=<path> | List a directory |
| GET /config.cgi?cd=<path> | Change the CPC’s current directory |
| GET /config.cgi?run2=<path> | Run a file on the CPC |
| GET /config.cgi?rm=<path> | Delete a file |
| GET /config.cgi?mkdir=<path> | Create a directory |
| GET /sd/<path> | Download a file from the virtual SD card |
| GET /status | Status as JSON |
| POST / | Upload a file (multipart form) |
| POST /reset / POST /pause | Reset or pause the CPC (deferred to the main thread) |
The HTTP server and its port mappings are managed through IPC (Chapter 9):
Operations that change the CPC’s state (such as a reset triggered from the web interface) are deferred to the emulator’s main thread, so the board is safe to drive from a browser while emulation runs.
The board is configured in the [peripheral] section:
konCePCja can capture what happens on the emulated machine in several formats: video, animated images, chiptune audio, and complete replayable sessions. This chapter covers each, and when to reach for which.
The recording controls live in the developer tools (F12); single screenshots and frame dumps also have function-key shortcuts (F3 for a screenshot). At a glance:
| Format | Output | Best for |
| AVI | .avi (video + audio) | Full gameplay or demo capture with sound |
| GIF / PNG | .gif or numbered .png | Short clips, documentation, sharing a moment |
| YM | .ym chiptune | Preserving the music exactly as the PSG plays it |
| Session | input + state log | Deterministic replay, bug reports, regression tests |
Record the CPC display and sound together to an .avi video file — useful for capturing gameplay or a demo with synchronised audio.
For short clips and screenshots, konCePCja can save an animated GIF (LZW-compressed) of the display, or a sequence of numbered PNG frames. These are ideal for documentation and for sharing a moment of a game without a full video file.
Rather than recording sampled audio, the YM recorder captures the actual register writes to the PSG sound chip and saves them as a .ym chiptune file. The result is a compact, authentic record of the music that can be replayed in YM players, exactly as the CPC produced it.
A session recording captures the machine’s input and state over time so that an entire run can be replayed deterministically — the same inputs producing the same result every time. This is valuable for demonstrations, for bug reports (a recording reproduces the problem exactly), and as the basis for automated regression testing alongside the IPC interface (Chapter 9).
The CPC keyboard differs from a modern PC keyboard in a few places. Most keys map directly; the table below lists the ones worth knowing. When a key has no obvious host equivalent, use the virtual keyboard (Shift+F1).
| CPC key | Notes |
| RETURN / ENTER | The large RETURN key, and the small ENTER on the numeric keypad — distinct keys on the CPC |
| DEL | Delete (backspace) |
| CLR | Clear — forward delete |
| COPY | Copy-cursor key, used with the arrow keys to copy screen text |
| ESC | Escape; also breaks a running program with CTRL |
| CTRL | Control |
| SHIFT | Shift |
| CAPS LOCK | Caps lock |
| Arrow keys | Cursor movement |
| Numeric keypad | The CPC has a dedicated keypad (f0–f9 and .) |
Internally the CPC identifies each key by a number (0–79), not by its character. These are the numbers the firmware’s KM routines use, and the same numbers the keyboard matrix is wired in. They matter when you drive the machine programmatically — injecting key presses over the IPC interface (Chapter 9), or reading the matrix in your own code — because there the key is addressed by number, independent of which character it would type.
A quick reference to the IPC commands (Chapter 9). Connect to port 6543 and send one command per line.
| Command | Description |
ping | Test the connection (replies OK pong) |
version | Report version and port |
help | List all commands |
pause / run | Pause or resume emulation |
reset | Reset the CPC |
regs | Dump all Z80 registers |
reg get <R> / reg set <R> <V> | Read or write one register |
mem read <addr> <len> | Read memory (add ascii for text) |
mem write <addr> <hex> | Write bytes to memory |
bp add/del/list/clear | Manage execution breakpoints |
step [n] | Step N instructions |
wait pc <addr> | Block until PC reaches an address |
wait mem <addr> <val> | Block until a memory value |
wait bp [timeout] | Block until a breakpoint fires |
wait vbl <n> | Wait N vertical blanks |
disasm <addr> <count> | Disassemble |
input keydown/keyup/key | Keyboard input |
input type <text> | Type literal text |
input joy <n> <dir> | Joystick input |
input mouse move/button/buttons | Mouse input (needs a mouse device) |
autotype <text> | Queue text with WinAPE ~KEY~ syntax |
screenshot [path] | Save a screenshot |
snapshot save/load <path> | Save or load machine state |
load <path> | Load a .dsk / .sna / .cpr / .bin |
asm text/assemble/errors/symbols | Drive the assembler |
m4 http <status|start|stop> | Control the M4 web server |
devtools | Open the developer tools |
The options in koncepcja.cfg (Chapter 4), by section. Any of these can also be set for one run with -O section.key=value.
| Key | Meaning |
model | 0 = 464, 1 = 664, 2 = 6128, 3 = 6128+ |
ram_size | RAM in KB (up to 4096 with expansion) |
speed | Clock speed in MHz |
| Key | Meaning |
scr_scale | Window scale factor |
scr_style | Rendering style (0–11) |
vsync | 1 = VSYNC on (default), 0 = off |
| Key | Meaning |
snd_enabled | Enable sound |
snd_playback_rate | 0 = 11025, 1 = 22050, 2 = 44100, 3 = 48000, 4 = 96000 Hz |
| Key | Meaning |
m4_http_port | M4 Board web-server port (default 8080) |
m4_bind_ip | M4 bind address |
symbiface | Enable the Symbiface II board |
| Key | Meaning |
amx_mouse | Enable the AMX mouse |
| Extension | Format |
| .dsk | Disc image (standard and extended) |
| .ipf | Copy-protected disc preservation format |
| .cdt | Tape image (CPC tape data) |
| .voc | Tape image (alternative) |
| .cpr | Cartridge image (Plus range only) |
| .sna | Snapshot — full machine state |
| .zip | Archive containing any of the above |
| .pok | Pokes / cheat file |
| .bin | Raw binary, injected into memory |
| .ym | PSG chiptune recording (output) |
| .avi | Video recording (output) |
| .gif / .png | Animated or still screen capture (output) |
A summary of the emulated machine. See Chapter 5 for what each part does.
| Component | Specification |
| CPU | Zilog Z80A at 4 MHz |
| RAM | 64 KB (464/664), 128 KB (6128/6128+), expandable to 4 MB |
| Video controller | CRTC types 0–3, plus ASIC on the 6128+ |
| Screen modes | Mode 0 (160×200, 16 colours), Mode 1 (320×200, 4 colours), Mode 2 (640×200, 2 colours) |
| Palette | 27 colours (4096 on the Plus) |
| Sound | AY-3-8912 PSG — 3 tone channels, 1 noise, hardware envelopes |
| Disc | uPD765A FDC, 3-inch discs, standard and extended formats |
| Refresh | 50 Hz |
The CPC’s disc operating system, layered over BASIC, providing disc file commands.
The custom chip in the Plus machines that replaces the discrete Gate Array and CRTC and adds sprites, an enhanced palette, and DMA sound.
Cathode Ray Tube Controller — the chip that generates video timing. The CPC shipped with several types, all emulated.
Amstrad’s custom video and memory-management chip.
The TCP control interface konCePCja exposes on port 6543 for scripting and debugging (Chapter 9).
One unit of mouse movement, as reported by the AMX Mouse.
Programmable Sound Generator (the AY-3-8912) — the CPC’s sound chip.
A saved copy of the entire machine state, in a .sna file, that resumes instantly.
A network and storage expansion, emulated with a web file manager (Chapter 11).