This repository is a clean-room reimplementation of the C64/C65/MEGA65 system ROMs, written primarily in 6502 assembly. It produces binary ROM images (e.g., `mega65_orfont.rom`, Kernal/BASIC ROMs) that can be flashed to hardware or used in emulators. The codebase is organized as a firmware source tree rather than a runtime application: `src/` contains the ROM source, `tools/` contains C/C++ utilities for verification and constant generation, and `testsuite/` contains TAP/D64 disk and tape images used as regression fixtures. The build is driven by platform-specific `config_*.s` files that select memory models and feature sets. It implements standard system software: a Kernal jump table, BASIC interpreter, machine-code monitor, keyboard scanner with debounce/repeat, tape/disk I/O, and a Z80 VM for CP/M compatibility. The project uses clean-room methodology: a similarity tool compares the new ROMs against original ROMs to detect accidental copying, and floating-point constants are generated from documented values rather than disassembled code. The test suite validates tape loading and disk access using standard `.tap` and `.d64` formats. Maintenance is active, but the codebase shows some internal drift: many `config_*.s` flags are not always consistent, and some modules carry WIP markers. The project is highly specialized to 6502-based retro platforms; most source is not portable outside that niche. However, several tools and patterns (binary similarity checking, code generation from specs, jump-table APIs, self-contained monitor) are reusable in other firmware or emulation projects.