A new fully annotated disassembly of Elite (BBC Micro versions)

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.)

elite-source.asm

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.

4 Likes

Update! Mark now has a companion site derived from the repo, which is much more browseable:
BBC Micro Elite source code

(There are three colour schemes to choose from…)

4 Likes

Flagged for apparent GitHub criticism! :slight_smile:

bbcelite.com just made the top link on HN.
Discussion: Fully documented source code for Elite on the BBC Micro | Hacker News

From the comments:

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.

2 Likes

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:

1 Like

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.

How the 6502 Second Processor version of Elite talks over the Tube

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

As a consequence of some of this work, we see a contribution of a new combination:
Second Processor Elite for the Electron - stardot.org.uk

and also a back port of improved line drawing tactics, in
Flicker-free Elite on the BBC Micro (like the BBC Master)

and
A definitive comparison of Elite versions

1 Like

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:

Making room for the modifications
How Angus Duggan found enough spare memory for Elite-A’s modifications

Buying and flying ships in Elite-A
What it’s like to save up for and fly your dream ship in Elite-A

Ship blueprints in Elite-A
The enhanced logic behind Elite-A’s sophisticated ship blueprints system

The Encyclopedia Galactica
Inside the encyclopedia, Elite-A’s most recognisable modification

The I.F.F. system
Friend or foe? Adding ship information to the 3D scanner

Special cargo missions
Procedurally generating delivery missions and tracking progress

Delta 14b joystick support
All the controls of Elite in one single handset - the future is here!

Tube communication in Elite-A
How the 6502 Second Processor version of Elite-A talks over the Tube

2 Likes