universeodon.com is part of the decentralized social network powered by Mastodon.
Be one with the #fediverse. Join millions of humans building, creating, and collaborating on Mastodon Social Network. Supports 1000 character posts.

Administered by:

Server stats:

3.5K
active users

Learn more

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 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!

@markmoxon Oh wow! Wow. and so cleanly and clearly done too! I love it :ablobmeltsoblove:

@Crazypedia Thank you, that’s good to hear! I tried hard to make it easy to read, so even people who don’t know 6502 assembly can follow along. Or that’s the idea, anyway… 😀

@markmoxon Congrats :) I was just looking at this today, and sorry to nitpick but I wanted to explain this bit: github.com/markmoxon/elite-sou
The first two bytes of RAM are the 6510 Processor Port, one of the things that separates a 6510 from an ordinary 6502. It manages the memory map and tape port. A very thorough description of its workings is available here: c64os.com/post/6510procport

@Kroc Ha, yes, that probably needs updating. I copied that comment from the Master version, which also skips those bytes, but they are genuinely unused in the Master). I’ll reword it to point out it’s the 6510 control bits, which I explain multiple times elsewhere in the commentary (it’s kinda hard not to understand those two bytes when doing a disassembly like this!).

@markmoxon That's very strange for the Master to skip those too! An early start at the C64 port being folded back into the Master version perhaps?

@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?

@markmoxon Thanks for that pointer! I overlooked it in my quick skim of the repo.

@markmoxon
This is from my youth. Thank you.

@baglodush Lovely, those original big box versions of Elite are things of rare beauty! 🤩

@markmoxon Ideal comments, perfect ones, like all assembler source code should be commented.

@stman Thank you, that’s really good to hear!

@markmoxon It's the way I comment my assembler code too myself, and all my life I've been complaining about all those who don't write such kind of comments, with same quality, and regularity, when coding in assembler. It's absolutely essential, including for one as a coder, because it's a way to double check your own code when writing a comment, and I found a lot of bugs I did thanks to that.

@stman Absolutely! The only issue is if you change the code and forget to update the comments - I’ve made that mistake more than once! - but that isn’t a problem when analysing a game like Elite, as the code doesn’t change. Anyway, glad to hear from someone else who likes comments; I don’t really believe in self-documenting code…

@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:

elite.bbcelite.com/deep_dives/

@markmoxon dude, that’s a book by itself!! I need to print it! Looks like you wrote a great piece of CS archeology!

@markmoxon

I remember playing that game on my C64.

I now feel very old.

@csstrowbridge The good thing about feeling old? It means you can relive your youth.

Welcome to my 8-bit Elite project from 1985. 🤣

@markmoxon what an impressive feat! Thank you for your work, I'd never thought I'd ever be able to take a look at how this fascinating game actually works.

@markmoxon a magical game which I never ever mastered but I'm fascinated with. Have it on the "lets try again list for 2025" on PC ;)

@panda It’s definitely worth a go. It’s pretty unforgiving and a challenge to master, but I still fire it up regularly, and it still holds up. The flight model is such a delight - what a masterpiece!

@markmoxon Aye, I think I played Frontier First Encouters back then - until running into some serious trouble.
With the current game I didn't manage to get the flying license, I but I guess I should try again with a controller. While I like flying, exploring and trading, I don't like battle.

@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:

github.com/stardot/beebasm?tab

GitHubGitHub - stardot/beebasm: A portable 6502 assembler with BBC Micro style syntaxA portable 6502 assembler with BBC Micro style syntax - stardot/beebasm

@markmoxon So many happy memories of playing this game.

@joegaffey Ha! 🤣 Perfect comment, well done. 🫡

@markmoxon I played Elite on a Sinclair ZX Spectrum. Loved it. Posts like this are making me look at getting Elite Dangerous & reliving those days.

@pasavito Elite Dangerous is great fun! It has a really similar feel to the original, but the learning curve is just as steep - it’s not a perfect game, but in VR in particular it’s astonishing. If you’re on a PC it’s always going on sale on Steam - definitely worth a punt when it’s discounted. And it’s still being developed, which is impressive after a whole decade.

@markmoxon and I found out it’s not on macos. I’ll dig out an old PC over Christmas & hope it’s got enough oomph to run Elite.

@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!

@dbolli I’ve also had success with vasm. Lots to choose from! But for trying to stick to the original Beeb source as closely as possible, BeebAsm is pretty hard to beat. 😀 Especially when populating lookup tables - it’s almost cut-and-paste from BBC BASIC , which is great!

@markmoxon There was a fairy. His name was "Nuff". Fairy Nuff 🙂 👍

@markmoxon Ooh, thanks, I must investigate and test on some of Tricky's (Richard Broadhurst) 6502 Beeb code 👍