Mark Moxon has published a very well-annotated disassembly of Bell and Braben’s Elite - the original version, for the 32k 2MHz BBC Micro from Acorn.
The source code is peppered with a number of “deep dives”, each of which goes into an aspect of the game in more detail. You find deep dives in the source files by simply searching for Deep dive:
For example you’ll see the explanation and usage of Marvin Minsky’s circle hack in the Deep dive: Rolling and pitching section. (You will need to open and search the source file manually: github’s search is not cooperating and won’t even show the main source file as it’s too large.)
See also some terminology introduced in the loader source: elite-loader.asm
There are, at time of writing, some 43 Deep Dive sections in the source.
There’s a discussion thread on stardot here, where Kroc Camen, author of the Commodore 64 disassembly of Elite, comes in to thank Mark and to take away from details for his own disassembly of the C64 version: Elite Harmless.
Mark’s disassembly starting point was Kieran Connell’s conversion of the original source to BeebASM. (There are so many assemblers in the land of 6502, BeebASM being a modern standalone open source portable assembler bringing some of the features of Acorn’s integrated assembler in BBC Basic.)
The original sources have long been published and available online on Ian Bell’s website, but they are terse in the extreme, because of the difficulty of assembling large projects on a small machine. There are even some compromises because some was originally written on Acorn’s Atom - even smaller and less featureful.
The level of detail and quality of writing in this is unbelievable. I can follow it really clearly, and I don’t know anything about assembly on the BBC Micro.
Direct link to the most interesting file (which is 1.5MB so sadly doesn’t open in GitHub’s regular web interface): https://raw.githubusercontent.com/markmoxon/elite-beebasm/master/sources/elite-source.asm
The source code commenting and discipline is really remarkable.
Oh that commenter has gone off-piste by going to the raw files on github. Surely the syntax highlighted and cross-linked web version is the place to be:
More Elite annotations and disassembly incoming. In particular a nice description of the use of the Tube in… Tube Elite. This is a dual-processor version of the game, and perhaps the only arcade-style game to make good use of the second processor option.
The parasite does all the complicated vector mathematics with its faster processor, and it sends the results to the I/O processor as relatively small bundles of coordinate data, which the BBC Micro then draws on-screen. It’s a perfect fit for the Tube-based system
Another substantial update from Mark Moxon, this time covering and explaining the improvements made by Angus Duggan to make the disk-based Elite-A version. Elite-A deep dives and source code - stardot.org.uk
In particular our attention is drawn to these deep-dive sections of the write-up: