I'm really proud to present my fully documented source code for Elite on the Commodore 64.
This is the original 1985 source, recently released by Ian Bell, with every single line of code explained.
It’s a thing of beauty. Enjoy!
I'm really proud to present my fully documented source code for Elite on the Commodore 64.
This is the original 1985 source, recently released by Ian Bell, with every single line of code explained.
It’s a thing of beauty. Enjoy!
Here's some more information.
I've taken the original, extremely terse source files from the BBC Micro disc images on Ian Bell’s site, and have converted them into a fully buildable source with a full and detailed commentary.
That's 67,000 lines of heavily commented 6502 assembly that explain how this classic game works.
The C64 commentary comes to 246,255 words. The epic novel "Crime and Punishment" contains 211,591 words.
That's an awful lot of commentary; it's a complex game!
And this isn't AI slop or generated comments - it's 100% handcrafted technical analysis. It is a labour of love, and I hope it shows.
My next step will be to add the commentary to my https://elite.bbcelite.com/ website, to sit alongside the Acorn and NES commentaries I've already done.
I'll also write some deep dives into the C64 version, before turning my attention to the Apple II sources that Ian also released.
Right on, Commanders!
Fully documented source code for Elite on the 6502 (BBC Micro, Acorn Electron, Commodore 64, Apple II, NES), with more than 100 deep dive articles explaining how every aspect of this iconic game works.
@Kroc Turns out the Master version is based on the C64 and Apple II versions. The sources very clearly go BBC Micro cassette -> BBC Micro disc -> 6502 Second Processor -> C64 -> Apple II -> BBC Master -> NES, with the Electron branching off the BBC Micro disc and merging into the C64 version. It’s fascinating - I’ll be writing a deep dive at some point.
Incidentally, I have updated that comment to talk about the 6510. Thanks for that! 👍
@markmoxon This is great, thank you for the huge amount of work it must've been!
There's no license on the repo, so it's automatically "all rights reserved." Is that your intention?
@vmbrasseur It is, yes, because I have no choice! This is explained here in the repo README:
Not much I can do about that, but it’s up to you how much notice you take of the legalities, of course.
@markmoxon that’s an impressive job! 🤯 such dedication is admirable!
any hope to see it becoming something like @fabynou ”Doom Engine Black Book”? That would be fantastic!
@jak Well, it isn’t exactly the Black Book, but my series of deep dives attempts to explain the coding challenges (and solutions) that the Elite authors had to face. Almost all of these apply to the Commodore 64 version, and I’ll be adding some C64-specific dives soon:
@csstrowbridge The good thing about feeling old? It means you can relive your youth.
Welcome to my 8-bit Elite project from 1985. 🤣
@markmoxon I'm curious about the SKIP <bytes> directive which I've not seen before. e.g.
.RAND
SKIP 4
Is that defining a 4 byte global variable (.RAND), which is then allocated to the memory location wherever the counter happened to be on the zero page at compile time? Thus not having to hard code memory addresses?
@pauld Yes, that’s exactly what it does; SKIP reserves space by simply moving the assembly address on by that many bytes. You can also do the same with multiple EQUB 0 directives to insert the correct number of zeroes, but SKIP is more flexible.
I tend to use SKIP for memory addresses outside of binary files, and EQUBs for memory addresses that get saved as part of binary files (as one is skipping memory while the other explicitly sets a value) but when the value is zero, they do the same thing.
You can see how it fits in with the other BeebAsm directives here:
https://github.com/stardot/beebasm?tab=readme-ov-file#6-ASSEMBLER-DIRECTIVES
@pasavito Yeah, it was on macOS originally but they dropped it some years ago. That’s how I got started with E:D.
I think the PC requirements are pretty modest, so fingers crossed!