I have been working on regenerating the (long-lost) source code for Nodes of Yesod, a game I wrote for the Sinclair ZX Spectrum in 1985. I have been picking away at this Z80 disassembly for nearly 20 years, starting with IDA and later moving to Ghidra.

While the project has been technically complete for some time (it reassembles to a binary identical to the shipped game), my goal is to release a fully documented codebase that is actually readable for future developers and historians.

To that end, this weekend, I compared the Claude Code CLI and the Gemini CLI for the specific task of identifying and defining symbols for methods, labels, and constants. In the past, I've run into context memory issues with the web interfaces, but the CLI tools seem to handle this single 30K+ line file very well.

Here is the breakdown:

Claude Code CLI: It is faster and understands the Z80 context with very few mistakes. However, it is significantly more expensive for this volume of work, running into Pro plan rate limits relatively quickly.

Gemini CLI: This allows me to work much longer before hitting rate limits on the Pro plan. It requires more iteration to get the output right, but it is a great workhorse.

The screenshots below show an example of the results, including some ASCII art Claude generated directly from the raw sprite bitmap data, and a section of code constants where both the name and comments were determined or augmented by Claude.

#SinclairSpectrum #OdinComputerGraphics #OldDogNewTricks #RetroDev #RetroGames #ReverseEngineering #SoftwarePreservation #ClaudeCodeCLI #GeminiCLI

This work continues. I have found that Codex seems to perform quite well; it is not as polished as Claude Code, but it is probably a bit better than Gemini CLI. I am toggling among the 3 as I explore this wild frontier.

I did find Codex a bit argumentative. I was trying to document a data structure, and it became very insistent in its point of view, to the point where I had Claude prepare a rebuttal, and so back and forth we went. Fascinating.

I'm tracking changes in Git now, not least because Claude copied over the work-in-progress file in a mistaken attempt to revert a change it made. That cost me a day or so of work. :(

I now have a verification loop in place where, after each change, the agents run the assembler to build the code, compare the binary with the "pristine" (less polished) source code version, ensure there are no errors, and then perform a binary comparison to confirm the output is the same. I also placed some "anchor" symbols in the code, and the verification step compares the values of the symbols against the map file from the original.

Attached is a screenshot of the Markdown file that the agents collectively maintain regarding the format and usage of one of the data structures.

I'll continue to post on progress.

Here's an example interaction with Codex (in this case). I prompted, "suggest appropriate names for SCB_FLAG_2, SCB_FLAG_3, SCB_FLAG_4". The attached screenshot is the initial response.
One more post on this today. The attached screenshot captures my response and the agent output log based on the above.
@stevewetherill That’s quite impressive

@stevewetherill That's pretty cool. I never did Z80 myself, but do you have a public repo for it so I can browse?

Did try looking on your website, but it seems to be down.

@stevewetherill Site works now, I was following the link in your Mastodon bio which goes to the root domain, nothing there. Found the blog link.
@ryanoneill1970 my site is on Lightsail and the instance keeps becoming unresponsive. I don't know why, haven't had time to investigate, but I've done as I have been doing and restarted the instance. It is annoying.
@ryanoneill1970 I will publish this when I am satisfied that it is "done". The game runs fine; it is a matter of augmenting and polishing the disassembly.
@stevewetherill Depending on the licence I'd like to see if a C# port would be viable (for fun).

@ryanoneill1970 yeah I don't have that but I've published (closed source) versions in Flash, Java, ObjectiveC++, and probably others I am forgetting. The iOS version was published in 2010 but disappeared when the 64-bt mandate came around. The tvOS version is still live though I think.

https://apps.apple.com/us/app/nodes-of-yesod-30th-anniversary-edition/id1080170918

Nodes Of Yesod 30th Anniversary Edition App - App Store

Download Nodes Of Yesod 30th Anniversary Edition by Uztek Games, Inc. on the App Store. See screenshots, ratings and reviews, user tips, and more games like…

App Store
@stevewetherill This is super interesting as a concept, I’m following your progress keenly! We’ve talked about this use case at work a lot, but mostly I want it to disassemble old Speccy games so I could rewrite little bits for a Next version with minor QOL improvements.
@RobeeShepherd yeah that is a similar use case for me, though I have hours and hours of IDA and Ghidra time into this as a baseline. There is an interface now for Ghidra to allow these LLM agents to interface directly with the disassembly. I have not investigated that yet.