# Building a Z80 and ZX Spectrum Emulator with Claude Code

DevFeed: [Building a Z80 and ZX Spectrum Emulator with Claude Code](<https://devfeed.tech/articles/implementing-a-clear-room-z80-zx-spectrum-emulator-with-claude-code-20651.md>)

Original publisher: [Read original article](<http://antirez.com/news/160>)

Published: 2026-02-24T17:58:02Z

Content type: opinion

Language: en

Sources: [Antirez](<https://devfeed.tech/sources/antirez.md>)

Topics: [Emulator](<https://devfeed.tech/topics/emulator.md>), [ZX Spectrum](<https://devfeed.tech/topics/zx-spectrum.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [AI-assisted coding](<https://devfeed.tech/topics/ai-assisted-coding.md>)

Tags: [claude-code](<https://devfeed.tech/tags/claude-code.md>), [coding-agents](<https://devfeed.tech/tags/coding-agents.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [rust](<https://devfeed.tech/tags/rust.md>), [zx-spectrum](<https://devfeed.tech/tags/zx-spectrum.md>)

## AI overview

The author describes an experiment using Claude Code to build a Z80 emulator, followed by a ZX Spectrum emulator, under a proposed clean-room setup. The article compares this experiment with Anthropic's C compiler experiment and discusses how coding agents are steered in practice.

## Source excerpt

Anthropic recently released a blog post with the description of an experiment in which the last version of Opus, the 4.6, was instructed to write a C compiler in Rust, in a "clean room" setup. The experiment methodology left me dubious about the kind of point they wanted to make. Why not provide the agent with the ISA documentation? Why Rust? Writing a C compiler is exactly a giant graph manipulation exercise: the kind of program that is harder to write in Rust. Also, in a clean room experiment, the agent should have access to all the information about well established computer science progresses related to optimizing compilers: there are a number of papers that could be easily synthesized in a number of markdown files. SSA, register allocation, instructions selection and scheduling. Those things needed to be researched *first*, as a prerequisite, and the implementation would still be "clean room". Not allowing the agent to access the Internet, nor any other compiler source code, was certainly the right call. Less understandable is the almost-zero steering principle, but this is coherent with a certain kind of experiment, if the goal was showcasing the completely autonomous writing of a large project. Yet, we all know how this is not how coding agents are used in practice, most of the time. Who uses coding agents extensively knows very well how, even never touching the code, a few hits here and there completely changes the quality of the result. # The Z80 experiment I thought it was time to try a similar experiment myself, one that would take one or two hours at max, and that was compatible with my Claude Code Max plan: I decided to write a Z80 emulator, and then a ZX Spectrum emulator (and even more, a CP/M emulator, see later) in a condition that I believe makes a more sense as "clean room" setup. The result can be found here: https://github.com/antirez/ZOT. # The process I used 1. I wrote a markdown file with the specification of what I wanted to do. Just English