Skip to navigation

Elite on the BBC Micro and NES

To-do list

I have documented every byte of the Elite game code, but that doesn't mean that I've fully understood every byte (though it's close). Almost every single aspect of the code is explained, but there are a few issues that could benefit from another look.

This page lists all of the outstanding issues of which I am aware. These are the notes I made as I analysed the source, so they are fairly terse and might not be terribly clear.

Pitch and roll angles, signs
----------------------------

  • STARS1: What is pitch calculation 7? And the explanation of the projection maths is shaky
  • STARS2: Roll calculations (up/down), I've no idea what the algorithm is all about
  • MV40: Don't understand the sign stuff for result 3, particularly EOR at .MV2
  • TACTICS (Part 4 of 7): Pitch and roll counter signs mean what, and how does it affect tactics? (44 * 1/16 radians = 2.75 radians = 158 degrees). Also check TACTICS on disc for more pitch/roll calculations
  • PIXEL2: Stardust plotting, what's with making the x-coordinate -X1? Could it be a -128+128 thing like in SLIDE?

Vector calculations
-------------------

  • Main flight loop (Part 15 of 16): Q doesn't get set to 0 for altitude calc - why isn't this a problem?
  • WARP: What is &81-based maths to make the jump, is it -1 while preserving sign? (DEX works)
  • MVEIT (Part 5 of 9): Minksy is applied to x-coord not z here. Why is this different to MVS40?

Maths
-----

  • ADD: If result is positive but overflows, can sign bit still be wrong?
  • MULT1, FMLTU, MLTU2, MULT3: Don't fully understand algorithms - would unrolling help?
  • LL5: Try to understand the linked square root algorithm and put into comments

Other
-----

  • IRQ1: The exact maths behind the split-screen timer value isn't clear
  • IRQ1: Why do we read an unused value, e.g. LDA VIA+&41, before RTI?
  • BPRNT: Meaning of U is still confusing me, also see SVE and competition number
  • KYTB: Why do important flight keys have the top bit set? Works OK without it
  • Main game loop (Part 5 of 6): What's with the delay by 8/50s? And what about QQ11 and PATG?
  • TT18: Why switch the view to 1, only to have it switch back to the space view?
  • Ghy: We jump in at (96,96), but where is this converted to the nearest system?
  • TACTICS (Part 7 of 7): Magnitude of AI flag = aggression, where else is it set bar Thargoids?
  • LOIN: Logic for not plotting end points is confusing
  • LL9 (Part 3 of 12): Division code to normalise orientation vectors is unclear
  • Elite loader (Part 4 of 6): What's the keyboard bit about if we have checksums enabled?

Enhanced versions
-----------------

  • SHIP_SPLINTER: Why do we need to add 24 to the Faces data offset (low)? Do splinters work properly in 6502 SP, disc, Master Elite?
  • Old INWK+32 needs clarifying in 6502/disc/Master versions (e.g. check comments in ANGRY, main game loop 1/6, NWSPS). See "Elite/Documenting Elite/Universe/INWK-32 notes.txt"
    • Bit 7 of old AI flag +32 must be different for stations now - it used to mean hostile, but see NWSPS and ISDK?
    • Bit 6, does the old hostile flag still work? In TA18, missiles are checked for this flag (INWK+32 bit 6), but traders have it set in main game loop 1 and that makes no sense? Or is this now just top bit of aggression level, and has it always been? (Think the latter)

BBC Master version
------------------

  • RUTOK: How to trigger the galaxy 16 system description? Hint: you can't
  • Dials part 1: what's the STA &DDEB for?
  • IRQ1: Don't really understand VIA+&18 and VIA+&19 for joysticks
  • TT17: Unsure of the -4 to +4 TJS1 routine
  • NOISE, SOINT, SFXBT, SFXVC, SOFLG: etc. How does any of this work? See this page

Disc version
------------

6502 Second Processor version
-----------------------------

  • DOFE21: Energy bomb effect doesn't appear to work?
  • DOCKIT: K3+10 - what on earth is this check for?
  • HATB: Ship hanger, Viper/Krait is repeated - test this against reality
  • HANGER: Why is S 60 rather than 15 for yaw rotations?
  • newosrdch: Why is key press 21 allowed through?
  • Elite loader: Machine detection logic is very odd
  • DEATH: The logic behind showing plates on death seems weird
  • DEATH: The number of canisters shown doesn't seem to match what the code says
  • DOKEY: Why is the roll key "pressing" logic different to pitch?
  • DVID4: This returns different values to cassette?
  • FMLTU: Explanation of logs is... dodgy throughout all log routines
  • TACTICS (Part 7 of 7): RAT, RAT2, CNT2 logic is a bit unclear, see part 3 as well
  • B% variable: Why is register 7 set using &87?
  • Inventory is one line higher in Tube version only - why? JSR INCYC in TTX69?

Elite-A
-------

  • CATS: The mode in &0355 gets set to 1 before *CAT, then reset afterwards: why?
  • Source discs: B.SHIP vs B.FILES, where does S.T come from, how do CSV ship files get converted to assembly?