Seven years into the AGC rabbit hole
Somewhere around episode 8 of Curious Marc’s (and Mike’s) Apollo Guidance Computer series, like seven years ago, I decided to try to understand the system better. I’ve been writing code to implement the internals (Block II), with help from Frank O’Brien’s book and a ton of work by others on preserving the AGC and explaining how some of the more obscure components work.
I suspect I have some parts of it wrong, but to better visualize and push my understanding further, I realized the TUI from my CROSSWOZ multi-vintage CPU interface would be a good way to figure out where I might be going wrong on the internals.
So after a couple of weeks of wiring up my old AGC code to the TUI, I have a pretty good way to watch the whole thing run.
There’s a TUI DSKY, rope loader, real-time visualizer of registers and memory locations, built-in help, single step and breakpoint modes, real-time disassembly of running code, and more.
I borrowed a lot of my own code, so it was nice not to have to start the TUI from scratch. The speed is simulated (ish) since it’s running on a Mac terminal.
This is entirely for me to understand how the AGC works, so zero lines of this were done by an LLM (didn’t exist when I started the project anyway).
There’s still a lot of work to do. I don’t think some of my CPU internals are correct. I should probably start writing tests… (sigh)
And before you ask, I won’t be releasing this. This is a learning project for me. A sort of document for myself by implementing a project. Some of it is spaghetti code, and that’s fine with me. If you want to be a good engineer, there are no shortcuts. Do. The. Reps.