
What was done
nick-hill-dev used Claude to reconstruct the Amstrad CPC464 firmware ROM as commented Rust. Differential tests run the original ROM in a Z80 emulator beside the port and compare RAM and port writes.
This repo is a readable Rust reconstruction of the lower ROM of the Amstrad CPC464 home computer (firmware v1.0, 16 KiB). The only commit says it is a port of the ROM via Claude. Each routine becomes a Rust function that names its ROM address, and firmware variables keep their original RAM addresses.
How it was done
It is a hand-reconstructed behavioural port, not a mechanical translation. Registers became parameters and return values, flags became booleans or options, and hardware access goes through a Hardware trait. The ROM map and module table are in the library source.
The check is differential. The tests run the original ROM in a small Z80 emulator next to the Rust port from the same starting state, then compare all RAM and every hardware port write. You supply the ROM yourself, so the repo does not ship it.
Results
The README lists parts verified byte for byte on random and edge-case inputs, including boot, text and graphics output, sound, the maths package, the line editor, keyboard handling, interrupts and the kernel event system. Cassette pulse timing is only approximate, and some paths, such as far calls and the cassette file routines, are not differentially tested. Only one ROM is done so far.