Hi all,
as some might recall I am still working on a complete disassembly and commentation of the Vortext F1-X Module Rom (V 2.11-X). It is not an easy task without an running CPU really executing code. So I now used some 3 days to create my own tool with the help of Claude.
I’d like to introduce CPC X-Ray, an open-source tool (GPL-3.0) I have been building to take apart CPC code: ROMs, programs, anything that runs on a 464, 664 or 6128.
What it is for
CPC X-Ray is an analysis tool that happens to contain an emulator, not the other way round. Its job is to help you disassemble and understand existing code and turn it into a commented sjasmplus source that assembles back to the original bytes - checked byte for byte. It runs the real firmware, BASIC, AMSDOS and expansion ROMs and lets you watch everything the code does:
- Breakpoints of ten types - PC, M1, memory read/write/access, I/O in/out, ROM select, interrupt - with ranges, port masks and paging conditions
- An instruction trace with call depth and changed registers, so after a stop you can go back and see how the code got there
- A bus trace of every access (M1, read, write, I/O), explained: which firmware variable was touched, what was pushed to the stack, what a port write does
- Memory views coloured by the firmware and AMSDOS variables, the paging, the stack, firmware names for all three machines
- An analysis of a ROM or RAM range: code vs. data, code copied to RAM and run there, RST calls with inline data - which becomes the source
- Decoding of scrambled ROMs (the Vortex X-module scheme, where opcode fetches and data reads are decoded differently)
It also has an MCP server, so Claude Code (Anthropic’s AI coding assistant) can drive the whole machine: boot it, type, set breakpoints, step, read memory and traces and run the analysis. In practice you work through a ROM together - it watches what the code really does at run time and helps you name routines and variables and write the comments.
What it is not
It is not a general-purpose emulator, and it is not trying to compete with WinAPE, ACE, CPCEC and friends - use those to play games and run demos. CPC X-Ray deliberately cuts corners wherever they don’t matter for code analysis:
- The Z80 is instruction-level: every bus access in the right order with the right signals, and it passes ZEXALL and the 1.6 M SingleStepTests - but there are no T-states inside an instruction
- The CRTC is just its registers, with no raster timing; interrupt and VSYNC follow a simplified model
- No sound, no cassette, no printer; the PPI/PSG are only what the keyboard and VSYNC need
- It runs at about real time - slower with the analysis and traces switched on
The firmware, BASIC, AMSDOS and disk access all work. Raster tricks, mid-line splits and anything that relies on exact cycle timing do not, and that won’t change - it’s a design decision, not a to-do list.
Getting it
Release 0.9.0 (beta) has a Python package and ready-made programs for Windows and Linux; the standard Amstrad ROMs are included:
The code is complete for what I planned for 1.0; what it needs now is real-world use. Feedback, bug reports and ideas are very welcome - here or on the GitHub issue tracker.
Okay use it for what it is - but do not think it is any competition to any other emulator, as it has not implemented a lot of the hardware - not even the CRTC or gatearray.
For instance the screen is not rendered by the Gatearray it is rendered by a renderer that just reads the screen ram and puts it into a normal RGB frame so that it can be displayed.

