It’s a shame that the source code isn’t commented and documented more. At the very least, I would see it being helpful to add some documentation for every CPU op code being emulated.
Probably better to look at a human-authored emulator if you want comments containing accurate information anyway.
If you let it, Claude Code will write a comment for almost every single line of code.
Forbidding LLM to write comments and docstrings (preferrably enforced by build and commit hook) is one of the best "hacks" for using that thing. LLM cannot help itself but emit poisonous comments.