13 ms·
Fully documented source code for Elite on the BBC Micro
- firecall 6y agoCan anyone tell from the source code what it took to become Elite? I got this game when it came out in the UK! I was 11 at the time! I never got beyond Deadly from memory. But boy did I sink hours into this game on our BBC model B with those cool analogue joysticks you dont see any more!
- delibes 6y ago6400 [edit: kills] - http://wiki.alioth.net/index.php/Elite_Rating http://wiki.alioth.net/index.php/Elite_Rating This isn't new knowledge. I remember reading about that goal and the number 6400 in a magazine, probably BBC Micro User. Right on Commander!
- duncanawoods 6y agoI loved the monthly articles about Elite that let slip various secrets. They were so exciting. I'm not sure many players would have found the missions without them. It's hilarious how anti-user classic games were! Were there actually any generation ships?
- LeoPanthera 6y agoNo, but they can be found in Oolite, and Elite Dangerous.
- UncleSlacky 6y agoI always thought you had to complete the missions to get to Elite, maybe that was added on later conversions (I played the Spectrum version)?
- richrichardsson 6y ago> I played the Spectrum version Oh that Lenslok[1] was a massive pain in the arse! [1] https://en.wikipedia.org/wiki/Lenslok https://en.wikipedia.org/wiki/Lenslok
- UncleSlacky 6y agoIt sure was! Luckily I used a fairly standard 14 inch colour TV with it so it was about the right size for the Lenslok.
- richrichardsson 6y agoI had one of those Ferguson 11.5" B&W sets[1] that were common in the UK in the 80s, it was very hit and miss. [1] https://i.ebayimg.com/images/g/s4UAAOSwmTVfUWyM/s-l1600.jpg https://i.ebayimg.com/images/g/s4UAAOSwmTVfUWyM/s-l1600.jpg
- duncanawoods 6y agoA lot of vipers died to make me Elite. Its one of my proudest achievements but in truth, I sat outside a space-station and leant a book on one of the buttons of the analogue joystick!
- 72deluxe 6y agoThat's a genius method. Pity you can't do it now in Elite Dangerous as there's a no-fire zone around stations.
- LeoPanthera 6y agoI believe that I have the longest-lived still-played savegame, of possibly any game. I started playing Elite in 1985, and my savegame has survived to this day. I transferred it from the original 5¼" disk to a disk image a few years ago, and occasionally still load it up under emulation. I am indeed rated "Elite", although I was very disappointed to learn that only kills are tracked to determine this rating. I had hoped that trading, distance travelled, or galaxies jumped would help as well, but it doesn't.
- DrBazza 6y agoLots of kills. I even sent off to Acornsoft and received a badge through the post. Or, there was the hack where you could just rewrite the save file which was published in The Micro User. You could even tweak the missiles, power of the laser and a few other bits IIRC.
- jlarcombe 6y agoHere you go: https://www.bbcelite.com/tape/workspaces/workspace_t_per_cent.html#tally https://www.bbcelite.com/tape/workspaces/workspace_t_per_cen... Used here to calculate the current tier: https://www.bbcelite.com/tape/status/subroutine_status.html https://www.bbcelite.com/tape/status/subroutine_status.html Elite is 6400 kills. This website is such a tremendous piece of work!
- MarkMoxon 6y agoGlad you like the site. It’s been a labour of love, no doubt about it! (Site author here, incidentally.)
- deleted 6y ago[deleted]
- abraxas 6y agoHere's an excellent long read for those who need the background. Well worth your time to read even if you didn't grow up playing Elite: https://www.theguardian.com/books/2003/oct/18/features.weekend https://www.theguardian.com/books/2003/oct/18/features.weeke...
- oska 6y ago> Braben was studying natural sciences, Bell was on the maths course. Neither went anywhere near the computer science department, which they had arrogantly but accurately decided offered them nothing useful. They're talking about Cambridge in 1982. Was the computer science dept. really useless at that time? I doubt it. Obviously, I respect their DIY ethos and their genius for invention but they might have picked up some ideas for further invention if they had done some CS courses.
- frabcus 6y agoCertainly ten years later it was too abstract. Lots about compiler theory. Computer science is sometimes useful for software engineering, but only occasionally.
- neilwilson 6y agoAvoiding going to Cambridge for that reason. The Poly's offered far better Computer Science courses at that time and we got an upgrade to a university degree anyway.
- collyw 6y agoBefore then computer science was the only course really offered. Around that time some universities seemed to start offering other related courses such as "Information Technology" (I remember they had slightly lower entry requirements as "computer science" was a relatively hard course to get onto in a decent University in the UK as it was popular.)
- 082349872349872 6y ago> There were only 150,000 or so BBC Micros in the world at that point, so the ratio was almost 1:1, one copy of Elite for every computer that could run it. Now I'm curious. How many players who made it to Elite Elite are currently members of the anorak elite?
- mrlonglong 6y agoWow, this is like gold dust. I've had a look but I don't seem to know this also has code to handle the 6502 tube co processor?
- LeoPanthera 6y agoNo, this is not the "tube" version of Elite. The tube version was incredibly rare, and held a near mythical existence back in the 80s and 90s. It's much easier to find today.
- 72deluxe 6y agoWhen people were chucking out their old computers in the mid to late 90s, we managed to get an old 6502 second processor and played Elite on it. I was still useless at the game.
- mrlonglong 6y agoI'm still using BeebEm on Linux, this can emulate several different co processors. Fun times.
- MarkMoxon 6y agoI’m planning to analyse the 6502 second processor version next - the source files are on Ian Bell’s site, so hopefully I’ll be able to give it the same lavish treatment. I really want to know how the code for the “full” docking computer works... the tape one is just an instant-dock, which isn’t half as interesting.
- mrlonglong 6y agoExcellent news, I'm quite interested in how they did so much more with the tube co processor.
- currymj 6y agothe original creator of Elite made a new version of the game, called Elite: Dangerous. It's the same essential game, but online and with modern, realistic graphics: https://www.youtube.com/watch?v=uoUJVRCbTxI https://www.youtube.com/watch?v=uoUJVRCbTxI The really cool thing about it is that it's set in a 1:1 scale model of the Milky Way. Most known stars are in there, approximating to a large extent their true astronomical properties. Whatever isn't known is procedurally generated in a way that's motivated by real science. They even put in the TRAPPIST exoplanets, which you can go visit. If you liked any of the old Elites or are a space nerd, you really ought to consider playing it.
- spacedcowboy 6y agoMy cousin is one of the directors of the company. One Xmas I got a signed copy from David :) Elite on the Beeb was the game that started me coding, all those years ago, and now I work in R&D at Apple.
- pmuk 6y ago> Elite on the Beeb was the game that started me coding Same for me! Not that I could read the code, but my desire to try to cheat in the game led me to learning BASIC and then a career in software engineering.
- 72deluxe 6y agoHow does he cope with the acidic community? They seem to be crying out for new features and can be very critical, particularly over the "slow" development of Elite and buggy/patched releases. Many of those on the forums demand various features without an understanding of the work involved (typical for software, after all!). Personally I find Elite Dangerous to be tremendous fun, and extremely good value for money considering how little I paid for it and how many hours of gameplay I got out of it. Having played the original, I am looking forward to the updates! One of the reviews of the company (glassdoor?) mentions the mess of the codebase, and I can imagine that contributes to the slow releases, but I guess that's true of any legacy giant codebase; having worked somewhere where the code was 20+ years old and a few key architects were the only ones who knew/understood how anything worked, they became the bottleneck to development whilst the rest of the team were under constant pressure to produce output whilst being devoid of understanding of the code. With the "gatekeepers of knowledge" being the only ones that could help the rest of the team, they were too busy to educate others as they were producing 80% of the output to keep the business operating; I wondered from an outside perspective if this was what happens at Frontier a bit?
- jlokier 6y agoHehe. When I was about 12, I printed out the entire disassembly for the Disk version of Elite on the BBC, on a dot matrix printer. Because dot matrix paper is continuous with perforations, the printout filled much of my room, and I pored over it, writing notes and getting to learn all the little tricks and algorithms! So I had my own fully documented source code for Elite back in the day :-)
- quickthrower2 6y agoThat's crazy. When I was 12 I tried to learn assembler on BBC from a book and just didn't get it at all, even the basics. How did you even grok a printout like that?
- jlokier 6y agoI didn't have many books, but I did have the BBC Advanced User Guide. That's the one with all those VDU codes and ∗FX commands. Near the back there was a two page table containing a dense opcode map (the byte values) of the 6502, its mnemonics, and a tiny notation hinting what they might do. I've just looked it up. It's the "old" book of that name, not the "new" one. See pages 502-503 of this scan: http://bbc.nvg.org/doc/BBCUserGuide-1.00.pdf http://bbc.nvg.org/doc/BBCUserGuide-1.00.pdf Poorly scanned, but I recognise the table. I stared at that table, intrigued, not really knowing what it was, until I started guessing what the mnemonics stood for. Gradually it made sense - after months! Eventually I was able to guess enough to write 6502 inside BBC Basic, and some time after that I was able to disassemble binaries in 6502 and Z80 (I had a Z80 second processor), and eventually graduated to hacking games to modify them, give them infinite lives, change the keys, things like that. No doubt there was the occasional bit of assembly language in magazine listings to provide a guide to the syntax. I don't remember having a 6502 disassembler, but I don't remember writing one either. I did receive a lot of games and utilities so I might have received a disassembler too. Hacking games that don't want to be hacked required a fair amount of dedication though, so I might have written one among the other tools needed for hacking; I don't remember. My favourite BBC Micro hacks were: - Poking the ULA with a non-standard palette bit pattern, allowing me to produce a 7-colour mode in high resolution (contradicting the received wisdom about what was possible to pack into the pixel bytes), and similar colour graphics quality to a ZX Spectrum. I ported a game from the Spectrum using this technique, but never published it. - Pixel-smooth vertical scrolling by poking the CRTC on timed interrupts to modify the character height dynamically, so as to squash a row at the top and expand a row at the bottom to shift the image with pixel precision (contradicting the received wisdom that the CRTC could only scroll character cells). - "Super mode 7", running the Teletext mode with the pixel clock set to double frequency like in mode 0. This caused the Teletext character generator to process 80 characters per line instead of 40. But instead of showing 80 characters, it showed every alternate character, while still updating the colours or other attributes from the hidden characters. This allowed clean coloured text to be displayed without gaps between different colours as Teletext normally required. Proper syntax highlighting :-) - Mixing graphics and Teletext on different rows using timed interrupts, so as to render something like a text editor with pixel graphics in between blocks of text. This is a variation of the technique used by Elite to show a colourful status area with a higher-resolution main 3d area. - Modulating the volume on the sound channel at high speed, to turn the sound chip into a DAC, and therefore any audio waveform we wanted. I miss those fun days, where we could prod and poke at things and all sorts of useful magic happened.
- simonw 6y agoThe 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 https://raw.githubusercontent.com/markmoxon/elite-beebasm/ma...
- aidenn0 6y ago1.5 MB would take about 5 hours to load from cassette on the micro...
- forinti 6y agoIf only you had enough RAM to load it into.
- IncRnd 6y agoIndeed! This is very well documented, not necessarily by the comments per line but the explanatory information. It's a shame that most people nowadays write self-documenting code.
- jacquesm 6y agoI still write exactly like that today, and as the years progress I've found more often than not that this is what keeps code fresh and re-usable, it also helps that be able to read the code when re-entering a portion that was untouched for a while.
- MarkMoxon 6y agoAbsolutely this - I’ve tried to explain things clearly in the commentary, not least so I can understand them again when I revisit bits of the code. I’ve got about 15 new deep dives that I'm going to be writing next, now that I've done the website, so that part of the site should get more interesting over time. This is version 1.0, really. There’s an awful lot more to say about this game - it’s endlessly fascinating.
- FpUser 6y agoOMG. I want to go back in time when things were pure and clear. Thanks for sharing. That is what my code looked like in the beginning of time but for a different comp. Sheds a tear and pours himself a drink.
- fit2rule 6y agoElite was one of those games that got ported to the other machines. Except, it wasn't ported to the Oric Atmos, which wasn't considered worth the effort. Until a few years ago, that is, when Chema and his crew made a pretty good version for the Oric: https://defence-force.org/index.php?page=games&game=1337 https://defence-force.org/index.php?page=games&game=1337 Old computers never die - their users do!
- forinti 6y agoWow, that's an excellent port; the Oric only has a 1MHz 6502.
- Tepix 6y agoAccording to Wikipedia its 6502 runs at 1.75 MHz. The BBC Micro runs at 2Mhz. Elite was also available on the C64 running at 1Mhz on a 6510.
- forinti 6y agoI've played also the MSX version (3.58MHz Z80), but no version I've seen runs as fast as the Beeb version. Still, they are all quite impressive.
- NCG_Mike 6y agoRight On Commander!
- arde 6y agoGet your iron ass over to Errius.
- Scapeghost 6y agoWhen I was a kid, discovering "complicated" games like Elite in my uncle's library was almost like digging into the adults' secret porn stash, things you weren't supposed to know about :)
- DrBazza 6y agoI can remember spending, many, many hours looking for non-existent space dredges (or whatever they were called), that was mentioned in the marketing blurb.
- JasonBlack555 6y agoI had so much fun with this game and it's great that people still talk about it 36 years later !
- Theodores 6y agoIt took Braben and Bell just over two years to write Elite. I imagine it would take me a lot longer than two years to document their code, putting it in a website as pleasing as this one. When Elite was new it was good enough to spend two years playing it! Plenty did. Out of those players not many got as far as becoming Elite and not many did missions or anything else that got you anywhere near completing the game. Then there were those that actually bothered to look at the code and hack the game or learn from the programming techniques. You would need to get a long way playing the game before taking it apart. This 'let's take it apart' idea didn't come to the minds of most of the experienced players. So it was a tiny minority into hacking the game. The thing I like about computer games is this ratio between those that write the game and those that waste their lives playing it! It is like real world sports where you have the eleven players on the team on the pitch, then the grandstands filled with thousands watching. Games wouldn't work if everyone was so inclined to hack it and write their own. You have got to have audience, those people happy to spend all their free time playing the game rather than wanting to be the next developer.
- Tepix 6y agoElite was written by Ian Bell and David Braben. Ian Bell has a homepage with nice old Elite stuff free to download at http://www.iancgbell.clara.net/ http://www.iancgbell.clara.net/ A chap called Christian Pinder reverse engineered the BBC version of Elite (written in Assembly) and faithfully reimplemented it as documented C code. It was called "Elite: The New Kind" and was even ported to IRIX! Unfortunately he was then contacted by David Braben and asked to no longer spread this version.
- 082349872349872 6y agoTIL about the pagoshamanic reclamation of divine colour. (currently a ἅπαξ λεγόμενον)
- Tepix 6y agoLooks like the documented C code is at https://cryptpad.fr/file/#/2/file/vlHMKIzr5g1ISSpQhIKDzWGc/ https://cryptpad.fr/file/#/2/file/vlHMKIzr5g1ISSpQhIKDzWGc/
- cptnapalm 6y agoChristian Pinder translated the assembly into C; that version is called Elite: New Kind. Unfortunately, it also requires an older version of Allegro (3, I think).
- freediver 6y agoWhat an aamzing work of art, mad props to Bell and Braben.
- JdeBP 6y agoIf you want to see Elite running on a second processor, see https://www.youtube.com/watch?v=mP7fiaync5E https://www.youtube.com/watch?v=mP7fiaync5E . And that's where that video starts out. It later gets to the point of showing GEM, running on top of DR-DOS, on a 80286, emulated by a Rasberry Pi, connected via the Tube to a BBC Master doing all of the I/O.
- bsdooby 6y agoI could not find the famous Fibonacci sequence method mentioned to seed the planetary systems generator (at first glance); might look harder...maybe someone spotted it in the code or is willing to explain the method?