8 ms·
Documented and annotated source code for Elite on the Commodore 64
- lyu07282 2y agoYouTube video/documentary about the game: "The game that couldn't be written" - https://youtu.be/lC4YLMLar5I https://youtu.be/lC4YLMLar5I
- mcraiha 2y agoMaybe someone can now fix the following bug? "if you started the auto-dock on the wrong side of the station, it would crash into it instead"
- teddyh 2y agoYou aren’t allowed to make any changes. Under GitHub's rules, you have the right to read and fork this repository... but that's it. No other use is permitted, I'm afraid. — README.md
- _flux 2y agoIt seems though the person who did this repo already violated the copyright by adding these annotations to the source code, correct? It wouldn't be a reason or validation for others doing the same, of course. However, whatever one would choose to do, it's best not to do it in GitHub..
- jfim 2y agoThe creator of the repository does mention it: > My hope is that the educational and non-profit intentions of this repository will enable it to stay hosted and available, but the original copyright holders do have the right to ask for it to be taken down, in which case I will comply without hesitation. I do hope, though, that along with the various other disassemblies and commentaries of this source, it will remain viable.
- glimshe 2y agoLong copyrights are a cancer in our society. Just notice the fear in his writing - "without hesitation". We're talking about a ~40 year piece of work here. Patents last 20 years and people keep filing them in the millions. We remain an inventive species. Obviously the protection works. Why do we need to protect copyrights for near a century?
- danielbln 2y agoTwo reasons: lobbying and the Mouse.
- ddingus 2y agoThe Mouse has not come back for a third round. Yet.
- MarkMoxon 2y agoThat's not fear, it's an indication of the respect in which I hold the original authors (whom I believe are still the copyright holders). If Bell or Braben asked me to take it this down, I'd roll with it. Same if Geoff Crammond asked me to take down my Aviator and Revs analyses; of course I'd comply. It's their code. I have copyright content out there in the world (including the commentary aspects of this project), and I'd want to be able to control what happens to that too. Seems fair to me.
- glimshe 2y agoI admire your integrity. At the same time, these "rights" come from flawed laws. The code should no longer be "theirs". I won't write a long and boring critique of the current copyright length, but this work should be in the public domain at this point - nobody should be entitled to ask you to take it down. It should belong to you as much as it does to them. Like Algebra and Hamlet. It in fact belongs to humanity, as the creation of the work itself was built on top of everything that came before it.
- Pannoniae 2y agoThat is true, but that doesn't mean that someone can't do it anyway. Copyright is a right, not an obligation (unlike trademarks where enforcement is required to preserve the trademark) If someone makes a patch and publishes it, the rightsholders do have a case against whoever published it, but that requires enforcement in the form of a C&D or a lawsuit. The rightsholder might very well decide to not do anything about it, which happens fairly commonly. This is not a substantial barrier for making a patch like that.
- tialaramex 2y ago> unlike trademarks where enforcement is required to preserve the trademark That's a myth. It suits trademark lawyers and aggressive owners to pretend this is obligatory but it isn't.
- teddyh 2y agoReally? <https://en.wikipedia.org/w/index.php?title=Generic_trademark&oldid=1247959381#Avoiding_genericization https://en.wikipedia.org/w/index.php?title=Generic_trademark...>
- tialaramex 2y agoYes, genericization is not actually a risk that aggressive lawyers can help you with, except in the sense that if they bankrupt you now it's not a problem any more. Genericization occurs when more or less everybody uses your word mark instead of a generic product class. But you can't actually sue everybody. And if you chase say, popular media, it just becomes a joke - Stephen Colbert can't use the word literally everybody you know uses because his bosses will get sued, ha ha, but it doesn't stop you and it won't stop genericization from happening. Notice you won't find any courts checking that you spent enough on legal fees as otherwise you lose for inadequate enforcement. They only care that ordinary people, who you wouldn't sue anyway, used this word in a generic way. Beyond that, it's not at all obvious that this is a problem you'd want to prevent. Why are Kleenex and Xerox so well known? It's surely not because they're unsuccessful!
- taneliv 2y agoIs it perhaps as easy as adding the check on https://github.com/markmoxon/elite-source-code-commodore-64/blob/main/1-source-files/main-sources/elite-source.asm#L4182 https://github.com/markmoxon/elite-source-code-commodore-64/... ?
- MarkMoxon 2y agoUnfortunately it isn't that simple. Check 3 only looks to see if we are moving backwards into the station slot. This is a bit pointless to calculate as falling backwards would mean that a number of the other checks (e.g. angle of approach) will already be failing. This is why check 3 is omitted from later versions of Elite, including the C64 version; it isn't needed. Lots of information on the docking checks here: https://elite.bbcelite.com/deep_dives/docking_checks.html https://elite.bbcelite.com/deep_dives/docking_checks.html Besides, is this a bug or a feature? Elite lore says that machine intelligence is banned in the galaxy, so I like to think of this as fitting in with that. Docking computers can kill you in Elite - and it's the same in Elite Dangerous. :-)
- voidUpdate 2y agoPretty much the first time I ever tried to dock, the docking computer set me down squarely on top of another player's ship. After trying my best to cancel the docking, I ended up losing my docking request, which meant I wasn't allowed to be there, and got the space police after me. I've not really played it much since
- MarkMoxon 2y agoYup. "Never fly without a rebuy", as they say!
- another2another 2y agoWell that is some well documented code, and no mistake. It keeps mentioning a Cougar ship type, but I don't remember them in the game?
- MarkMoxon 2y agoIt is in-game, but it is astonishingly rare. Specifically, there is a 0.011% chance of spawning a Cougar during each ship spawning routine, which is around 1 in 9000 ship spawnings And it's got a cloaking device so it doesn't appear on your scanner. Anyone who has genuinely seen one of these in-game is a really lucky commander! Lots of details here: https://elite.bbcelite.com/deep_dives/the_elusive_cougar.html https://elite.bbcelite.com/deep_dives/the_elusive_cougar.htm...
- another2another 2y agoHmm, I wonder if that's what the second mission was to find? I played it on the CBM64, and seem to remember being given a mission to find a stealth ship. Flew around loads, but never found it as far as I can remember.
- MarkMoxon 2y agoNo, the Cougar is nothing to do with missions (in the 6502 versions, anyway - the other platforms have different mission code). It's just a rarely called part of the random spawning routine. Very rarely called. The mission-related ship is the Constrictor, which you only bump into at the end of that mission. Obligatory link: https://elite.bbcelite.com/deep_dives/the_constrictor_mission.html https://elite.bbcelite.com/deep_dives/the_constrictor_missio...
- qsi 2y agoJust scanned some files and I see a lot of NOPs, sometimes a few consecutively. Any idea why?
- MarkMoxon 2y agoAll NOPs should be explained in the commentary, apart from the ones in the fast loader routine in the elite-gma1.asm file. Are these the ones you mean? If so, I haven't documented the fast loader as it's not really a feature of Elite, but I think the NOPs there are for timing when talking to the CIA1. The fast loader is documented in the Elite Harmless project, here, which might help: https://github.com/Kroc/elite-harmless/blob/kroc/src/boot/gma/stage1.asm https://github.com/Kroc/elite-harmless/blob/kroc/src/boot/gm... The long string of NOPs in the elite-firebird.asm source are padding to ensure the vector overrides align with the correct addresses, as described in the commentary. Most other NOPs are commenting out the checksums if that feature is disabled by the build; again, they should be explained in situ. If you're wondering about any others, I'd be happy to explain!
- FrustratedMonky 2y agoHas anybody done something similar, but converted to a modern language?
- MarkMoxon 2y agoYes. The original Elite was reverse-engineered into C by Christian Pinder as part of the Elite: The New Kind project. The source is out there. It's a brilliant bit of work.
- tialaramex 2y agoAlthough C probably counted as a modern language back then (after all it's not B) today I think "modern" probably means at least Java and likely something from this century like Rust or Typescript.
- MarkMoxon 2y agoOolite is normally quoted at this point. I think it's in Objective C? But exactly how much it relates to the original game's code, I don't know. https://github.com/OoliteProject/oolite https://github.com/OoliteProject/oolite
- FrustratedMonky 2y agoanything would be great. Oolite does look like Mac, done in COCO? Even Mac/Coco looks dated. Not the screens, they actual look is great. A Rust version would be cool.
- astrobe_ 2y ago"Modern" means "we fixed the deficiencies of the old project and introduced our own". When I read "modern" I understand it's likely to be a variation of the second system effect [1]. When it's not just advertisement/PR BS. When it's part of a request, it generally means "I don't know tech XYZ but I'm pretty sure I could enjoy it and contribute if it was using a tech I know". Which is generally a form of procrastination. I dislike Javascript and I don't know Objective-C, and it didn't prevent me to tinker with Oolite, which uses both, because I like the game (now, tbh assembly is "hardcore" so OP's request is legitimate). [1] https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ https://www.joelonsoftware.com/2000/04/06/things-you-should-...
- Koshcheiushko 2y agoThis is really good resource for someone, who wants to learn assembly. Can somebody please share this good or closer documented source code in other languages such as C++, C or any other.
- MarkMoxon 2y agoThe original Elite was reverse-engineered into C by Christian Pinder as part of the Elite: The New Kind project. The source is out there. It's a brilliant bit of work. You can use a search engine to find it.
- WillAdams 2y agoThat would be the domain of "Literate Programming": http://literateprogramming.com/ http://literateprogramming.com/ esp. see: http://literateprogramming.com/adventure.pdf http://literateprogramming.com/adventure.pdf
- mgkimsal 2y agoVery curious how Mark Moxon was able to understand and comment so much of the code. Just... a very big fan with a lot of free time? No idea how this will be formatted, but the level of understanding in the comments is quite deep for just having access to the original source. Or did the original source have this level of comments as well? How long does a project like this take to comment? .QQ22 SKIP 2 ; The two hyperspace countdown counters ; ; Before a hyperspace jump, both QQ22 and QQ22+1 are ; set to 15 ; ; QQ22 is an internal counter that counts down by 1 ; each time TT102 is called, which happens every ; iteration of the main game loop. When it reaches ; zero, the on-screen counter in QQ22+1 gets ; decremented, and QQ22 gets set to 5 and the countdown ; continues (so the first tick of the hyperspace counter ; takes 15 iterations to happen, but subsequent ticks ; take 5 iterations each) ; ; QQ22+1 contains the number that’s shown on-screen ; during the countdown. It counts down from 15 to 1, and ; when it hits 0, the hyperspace engines kick in
- MarkMoxon 2y agoThis should answer your question: https://elite.bbcelite.com/about_site/about_this_project.html https://elite.bbcelite.com/about_site/about_this_project.htm... Some parts of Elite were documented prior to my project, particularly the procedural generation and ship data blocks. But none of it was documented to this level; it's taken time, lots of it! I love this game, and I figured it deserved a proper homage. Or, to put it another way, this is a labour of love. :-)
- WillAdams 2y agoHave you considered turning this into a book? If you used Literate Programming principles: http://literateprogramming.com/ http://literateprogramming.com/ then it could become a seamless narrative which could be very expressive.
- david_bai 2y ago[dead]
- robertlagrant 2y agoI loved Elite on the BBC B as a kid. It was before my time, but we had inexpensive tastes in our personal computing growing up. I absolutely loved it, and I can definitely understand someone spending this much time on it.