This page contains a map of all the routines, variables and macros in the original source files for the BBC Micro cassette version of Elite, in the order in which they appear in the original source. The source files are structured like this:
- The Loader, which displays the loading screen, implements the copy protection and sets things up for the main game
- The main game source, which consists of Workspaces, Text tokens, Elite A, Elite B, Elite C, Elite D, Elite E, Elite F, Elite G and Ship blueprints
- The Big Code File, which concatenates the files produced by the above and adds a bit more copy protection
You can click on the links above to jump to the relevant part of the map.
Loader
------
Category | Details |
---|---|
Workspaces | Important variables used by the loader |
Loader | Subroutine: Elite loader (Part 1 of 6) (Loader) Include binaries for recursive tokens, Python blueprint and images |
Drawing the screen | VDU commands for setting the square mode 4 screen |
Sound | Sound envelope definitions |
Copy protection | Resets the machine if the copy protection detects a problem |
Utility routines | A convenience routine for calling OSBYTE with Y = 0 |
Copy protection | Variable: Authors' names (Loader) The authors' names, buried in the code |
Utility routines | Contains the address of OSCLIV, for executing OS commands |
Copy protection | Address used as part of the stack-based decryption loop |
Copy protection | Address pointer to the start of the 6502 stack |
Copy protection | Routine to self-modify the loader code |
Copy protection | Used to set one of the vectors in the copy protection code |
Copy protection | Part of the multi-jump obfuscation code in PROT1 |
Sound | Macro definition for defining a sound envelope |
Loader | Subroutine: Elite loader (Part 2 of 6) (Loader) Perform a number of OS calls, set up sound, push routines on stack |
Loader | Subroutine: Elite loader (Part 3 of 6) (Loader) Move and decrypt recursive tokens, Python blueprint and images |
Loader | Subroutine: Elite loader (Part 4 of 6) (Loader) Copy more code onto stack, decrypt TUT block, set up IRQ1 handler |
Drawing planets | Subroutine: PLL1 (Part 1 of 3) (Loader) Draw Saturn on the loading screen (draw the planet) |
Drawing planets | Subroutine: PLL1 (Part 2 of 3) (Loader) Draw Saturn on the loading screen (draw the stars) |
Drawing planets | Subroutine: PLL1 (Part 3 of 3) (Loader) Draw Saturn on the loading screen (draw the rings) |
Maths (Arithmetic) | Generate random numbers |
Maths (Arithmetic) | Calculate (A P) = A * A |
Drawing pixels | Draw a single pixel at a specific coordinate |
Drawing pixels | Ready-made single-pixel character row bytes for mode 4 |
Drawing planets | A counter for use in drawing Saturn's planetary body |
Drawing planets | A counter for use in drawing Saturn's background stars |
Drawing planets | A counter for use in drawing Saturn's rings |
Maths (Arithmetic) | Calculate ZP = SQRT(ZP(1 0)) |
Copy protection | Single-byte decryption and copying routine, run on the stack |
Copy protection | Multi-byte decryption and copying routine, run on the stack |
Workspaces | Marker for a block that is moved as part of the obfuscation |
Copy protection | Checksum for the validity of the UU% workspace |
Copy protection | Two checksums for the decryption header and text token table |
Copy protection | Part of the AFOOL roundabout obfuscation routine |
Copy protection | The address of the LBL routine in the decryption header |
Drawing the screen | Palette data for the two dashboard colour scheme |
Drawing the screen | Palette data for the space part of the screen |
Text | Print a character at the text cursor (WRCHV points here) |
Utility routines | Print a character |
Utility routines | Execute an OS command |
Utility routines | Contains an OS command string for loading the main game code |
Loader | Subroutine: Elite loader (Part 5 of 6) (Loader) Load main game code, decrypt it, move it to the correct location |
Utility routines | Used for testing the 6522 System VIA status byte in IRQ1 |
Drawing the screen | The loader's screen-mode interrupt handler (IRQ1V points here) |
Copy protection | Addresses for the obfuscated jumps that use RTS not JMP |
Loader | Subroutine: Elite loader (Part 6 of 6) (Loader) Set up interrupt vectors, calculate checksums, run main game code |
Copy protection | Run checksum checks on tokens, loader and tape block count |
Text | The x-coordinate of the text cursor |
Text | The y-coordinate of the text cursor |
Workspaces
----------
Category | Details |
---|---|
Workspaces | Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here |
Workspaces | Temporary storage space for complex calculations |
Workspaces | Current commander data and stardust data blocks |
Text tokens
-----------
Category | Details |
---|---|
Text | Macro definition for characters in the recursive token table |
Text | Macro definition for two-letter tokens in the token table |
Text | Macro definition for control codes in the recursive token table |
Text | Macro definition for recursive tokens in the recursive token table |
Text | The recursive token table for tokens 0-148 |
Workspaces
----------
Category | Details |
---|---|
Workspaces | Ship data blocks and ship line heaps |
Workspaces | Ship slots, variables |
Elite A
-------
Category | Details |
---|---|
Workspaces | Vector addresses, compass colour and configuration settings |
Main loop | Subroutine: Main flight loop (Part 1 of 16) Seed the random number generator |
Main loop | Subroutine: Main flight loop (Part 2 of 16) Calculate the alpha and beta angles from the current pitch and roll of our ship |
Main loop | Subroutine: Main flight loop (Part 3 of 16) Scan for flight keys and process the results |
Main loop | Subroutine: Main flight loop (Part 4 of 16) For each nearby ship: Copy the ship's data block from K% to the zero-page workspace at INWK |
Main loop | Subroutine: Main flight loop (Part 5 of 16) For each nearby ship: If an energy bomb has been set off, potentially kill this ship |
Main loop | Subroutine: Main flight loop (Part 6 of 16) For each nearby ship: Move the ship in space and copy the updated INWK data block back to K% |
Main loop | Subroutine: Main flight loop (Part 7 of 16) For each nearby ship: Check whether we are docking, scooping or colliding with it |
Main loop | Subroutine: Main flight loop (Part 8 of 16) For each nearby ship: Process us potentially scooping this item |
Main loop | Subroutine: Main flight loop (Part 9 of 16) For each nearby ship: If it is a space station, check whether we are successfully docking with it |
Main loop | Subroutine: Main flight loop (Part 10 of 16) For each nearby ship: Remove if scooped, or process collisions |
Main loop | Subroutine: Main flight loop (Part 11 of 16) For each nearby ship: Process missile lock and firing our laser |
Main loop | Subroutine: Main flight loop (Part 12 of 16) For each nearby ship: Draw the ship, remove if killed, loop back |
Main loop | Subroutine: Main flight loop (Part 13 of 16) Show energy bomb effect, charge shields and energy banks |
Main loop | Subroutine: Main flight loop (Part 14 of 16) Spawn a space station if we are close enough to the planet |
Main loop | Subroutine: Main flight loop (Part 15 of 16) Perform altitude checks with the planet and sun and process fuel scooping if appropriate |
Main loop | Subroutine: Main flight loop (Part 16 of 16) Process laser pulsing, E.C.M. energy drain, call stardust routine |
Maths (Geometry) | Add an orientation vector coordinate to an INWK coordinate |
Maths (Geometry) | Calculate a cap on the maximum distance to the planet or sun |
Maths (Arithmetic) | Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block |
Moving | Subroutine: MVEIT (Part 1 of 9) Move current ship: Tidy the orientation vectors |
Moving | Subroutine: MVEIT (Part 2 of 9) Move current ship: Call tactics routine, remove ship from scanner |
Moving | Subroutine: MVEIT (Part 3 of 9) Move current ship: Move ship forward according to its speed |
Moving | Subroutine: MVEIT (Part 4 of 9) Move current ship: Apply acceleration to ship's speed as a one-off |
Moving | Subroutine: MVEIT (Part 5 of 9) Move current ship: Rotate ship's location by our pitch and roll |
Moving | Subroutine: MVEIT (Part 6 of 9) Move current ship: Move the ship in space according to our speed |
Moving | Subroutine: MVEIT (Part 7 of 9) Move current ship: Rotate ship's orientation vectors by pitch/roll |
Moving | Subroutine: MVEIT (Part 8 of 9) Move current ship: Rotate ship about itself by its own pitch/roll |
Moving | Subroutine: MVEIT (Part 9 of 9) Move current ship: Redraw on scanner, if it hasn't been destroyed |
Moving | Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) |
Moving | Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1) |
Moving | Apply pitch and roll to an orientation vector |
Moving | Apply a 3.6 degree pitch or roll to an orientation vector |
Moving | Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) |
Moving | Rotate the planet or sun's location in space by the amount of pitch and roll of our ship |
Elite B
-------
Category | Details |
---|---|
Save and load | The data block for the last saved commander |
Save and load | Second checksum byte for the saved commander data file |
Save and load | First checksum byte for the saved commander data file |
Universe | Table of pointers to the local universe's ship data blocks |
Drawing pixels | Ready-made single-pixel character row bytes for mode 4 |
Drawing pixels | Ready-made double-pixel character row bytes for mode 4 |
Drawing pixels | Ready-made single-pixel character row bytes for mode 5 |
Drawing lines | Subroutine: LOIN (Part 1 of 7) Draw a line: Calculate the line gradient in the form of deltas |
Drawing lines | Subroutine: LOIN (Part 2 of 7) Draw a line: Line has a shallow gradient, step right along x-axis |
Drawing lines | Subroutine: LOIN (Part 3 of 7) Draw a shallow line going right and up or left and down |
Drawing lines | Subroutine: LOIN (Part 4 of 7) Draw a shallow line going right and down or left and up |
Drawing lines | Subroutine: LOIN (Part 5 of 7) Draw a line: Line has a steep gradient, step up along y-axis |
Drawing lines | Subroutine: LOIN (Part 6 of 7) Draw a steep line going up and left or down and right |
Drawing lines | Subroutine: LOIN (Part 7 of 7) Draw a steep line going up and right or down and left |
Drawing lines | Print a title and draw a horizontal line at row 19 to box it in |
Drawing lines | Draw a horizontal line at pixel row 19 to box in a title |
Drawing lines | Draw a horizontal line at pixel row 23 to box in a title |
Drawing lines | Draw a screen-wide horizontal line at the pixel row in A |
Drawing lines | Remove a line from the sun line heap and draw it on-screen |
Drawing lines | Draw a horizontal line from (X1, Y1) to (X2, Y1) |
Drawing lines | Ready-made character rows for the left end of a horizontal line in mode 4 |
Drawing lines | Ready-made character rows for the right end of a horizontal line in mode 4 |
Drawing pixels | Plot a single pixel at (X, Y) within a character block |
Maths (Arithmetic) | Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle |
Drawing pixels | Draw a stardust particle relative to the screen centre |
Drawing pixels | Draw a 1-pixel dot, 2-pixel dash or 4-pixel square |
Drawing circles | Draw a circle segment and add it to the ball line heap |
Stardust | Reflect the stardust particles in the screen diagonal and redraw the stardust field |
Stardust | The main routine for processing the stardust |
Stardust | Process the stardust for the front view |
Stardust | Process the stardust for the rear view |
Equipment | Equipment prices |
Status | Show the Status Mode screen (red key f8) |
Text | Print text followed by a newline and indent of 6 characters |
Text | A constant used when printing large numbers in BPRNT |
Text | Print an 8-bit number, left-padded to 3 digits, and optional point |
Text | Print a 16-bit number, left-padded to n digits, and optional point |
Text | Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point |
Sound | Make a standard system beep |
Text | Print a character at the text cursor by poking into screen memory |
Dashboard | Subroutine: DIALS (Part 1 of 4) Update the dashboard: speed indicator |
Dashboard | Subroutine: DIALS (Part 2 of 4) Update the dashboard: pitch and roll indicators |
Dashboard | Subroutine: DIALS (Part 3 of 4) Update the dashboard: four energy banks |
Dashboard | Subroutine: DIALS (Part 4 of 4) Update the dashboard: shields, fuel, laser & cabin temp, altitude |
Dashboard | Fetch the current dashboard colours, to support flashing |
Dashboard | Update a bar-based indicator on the dashboard |
Dashboard | Update the roll or pitch indicator on the dashboard |
Drawing the screen | Palette data for space and the two dashboard colour schemes |
Drawing the screen | The main screen-mode interrupt handler (IRQ1V points here) |
Flight | Launch our escape pod |
Elite C
-------
Category | Details |
---|---|
Tactics | Subroutine: TACTICS (Part 1 of 7) Apply tactics: Process missiles, both enemy missiles and our own |
Tactics | Subroutine: TACTICS (Part 2 of 7) Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate |
Tactics | Subroutine: TACTICS (Part 3 of 7) Apply tactics: Calculate dot product to determine ship's aim |
Tactics | Subroutine: TACTICS (Part 4 of 7) Apply tactics: Check energy levels, maybe launch escape pod if low |
Tactics | Subroutine: TACTICS (Part 5 of 7) Apply tactics: Consider whether to launch a missile at us |
Tactics | Subroutine: TACTICS (Part 6 of 7) Apply tactics: Consider firing a laser at us, if aim is true |
Tactics | Subroutine: TACTICS (Part 7 of 7) Apply tactics: Set pitch, roll, and acceleration |
Maths (Arithmetic) | Calculate K3 = (x_sign x_hi x_lo) - V(1 0) |
Tactics | Work out if the ship in INWK is in our crosshairs |
Tactics | Launch a ship straight ahead of us, below the laser sights |
Tactics | Fire a missile from our ship |
Tactics | Make a ship hostile |
Tactics | Display the "missile jammed" message |
Flight | Spawn an escape pod from the current (parent) ship |
Universe | Spawn a child ship from the current (parent) ship |
Moving | Move a ship in space along one of the coordinate axes |
Drawing circles | Make the hyperspace sound and draw the hyperspace tunnel |
Drawing circles | Make the launch sound and draw the launch tunnel |
Drawing circles | Draw the launch or hyperspace tunnel |
Stardust | Process the stardust for the left or right view |
Maths (Geometry) | Sine/cosine table |
Maths (Arithmetic) | Set K(3 2 1 0) = (A A A A) and clear the C flag |
Maths (Arithmetic) | Calculate K(3 2 1 0) = (A P+1 P) * Q |
Maths (Arithmetic) | Calculate (S R) = XX(1 0) and (A P) = A * ALP1 |
Maths (Arithmetic) | Calculate (A P) = ALP1 * A |
Maths (Arithmetic) | Clear bit 7 of A and calculate (A P) = A * A |
Maths (Arithmetic) | Calculate (A P) = A * A |
Maths (Arithmetic) | Copy X into P and A, and clear the C flag |
Maths (Arithmetic) | Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust |
Maths (Arithmetic) | Calculate (A P) = |A| * Q |
Maths (Arithmetic) | Calculate (A P) = P * Q |
Maths (Arithmetic) | Calculate (A P) = P * X |
Maths (Arithmetic) | Set P(1 0) = (A A) |
Maths (Arithmetic) | Calculate A = K * sin(A) |
Maths (Arithmetic) | Calculate A = A * Q / 256 |
Maths (Arithmetic) | Subroutine: Unused duplicate of MULTU An unused duplicate of the MULTU routine |
Maths (Arithmetic) | Calculate (A P+1 P) = (A ~P) * Q |
Maths (Arithmetic) | An unused routine that does the same as MUT2 |
Maths (Arithmetic) | Calculate (S R) = XX(1 0) and (A P) = Q * A |
Maths (Arithmetic) | Calculate R = XX and (A P) = Q * A |
Maths (Arithmetic) | Calculate (A P) = Q * A |
Maths (Arithmetic) | Calculate (S R) = Q * A |
Maths (Geometry) | Calculate the dot product of XX15 and an orientation vector |
Maths (Arithmetic) | Calculate (A X) = Q * A + (S R) |
Maths (Arithmetic) | Calculate (A X) = (A P) + (S R) |
Maths (Arithmetic) | Calculate (A ?) = (-X * A + (S R)) / 96 |
Maths (Arithmetic) | Calculate (P R) = 256 * DELTA / z_hi |
Maths (Arithmetic) | Calculate (P R) = 256 * DELTA / A |
Maths (Arithmetic) | Calculate (P R) = 256 * A / Q |
Maths (Arithmetic) | Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) |
Dashboard | Apply damping to the pitch or roll dashboard indicator |
Dashboard | Bump up the value of the pitch or roll dashboard indicator |
Dashboard | Reduce the value of the pitch or roll dashboard indicator |
Maths (Geometry) | Calculate A = arctan(P / Q) |
Maths (Geometry) | Arctan table |
Flight | Perform an in-system jump |
Drawing lines | Draw the laser lines for when we fire our lasers |
Flight | Flip the coordinate axes for the four different views |
Flight | Initialise the space view |
Flight | Draw the laser crosshairs |
Drawing the screen | Clear the screen and set the current view type |
Drawing the screen | Clear the top part of the screen and draw a white border |
Utility routines | Wait for a specified time, in 1/50s of a second |
Charts | Select the closest system and redraw the chart crosshairs |
Drawing the screen | Clear the bottom three text rows of the mode 4 screen |
Drawing the screen | Clear most of a row of pixels |
Dashboard | Display the current ship on the scanner |
Drawing the screen | Wait for the vertical sync |
Elite D
-------
Category | Details |
---|---|
Market | Work out if we have space for a specific amount of cargo |
Universe | Twist the selected system's seeds four times |
Universe | Twist the selected system's seeds |
Universe | Print the distance to the selected system in light years |
Text | Print a text token and a paragraph break |
Text | Print a paragraph break |
Text | Set Sentence Case and print a newline |
Text | Print a newline |
Universe | Display "MAINLY " and jump to TT72 |
Text | Print a text token followed by a space |
Universe | Show the Data on System screen (red key f6) |
Universe | Calculate system data from the system seeds |
Charts | Show the Long-range Chart (red key f4) |
Drawing lines | Draw a set of crosshairs |
Drawing circles | Draw a circle with crosshairs on a chart |
Drawing circles | Draw a circle on a chart |
Market | Show the Buy Cargo screen (red key f1) |
Market | Get a number from the keyboard |
Market | Show the Sell Cargo screen (red key f2) |
Market | Show a list of current cargo in our hold, optionally to sell |
Market | Show the Inventory screen (red key f9) |
Keyboard | Ask a question with a "Y/N?" prompt and return the response |
Charts | Move the crosshairs on a chart |
Charts | Draw a small set of crosshairs on a chart |
Charts | Move galactic coordinates by a signed delta |
Charts | Draw crosshairs on the Short-range Chart, with clipping |
Charts | Show the Short-range Chart (red key f5) |
Universe | Set the selected system's seeds to those of system 0 |
Universe | Set the current system to the nearest system to a point |
Flight | Print a message to say there is no hyperspacing allowed inside the station |
Flight | Start the hyperspace process |
Flight | Start a hyperspace countdown |
Flight | Perform a galactic hyperspace jump |
Universe | Set the current system to the selected system |
Flight | Print the hyperspace countdown in the top-left of the screen |
Text | Print 16-bit number, left-padded to 5 digits, no point |
Text | Print a 16-bit number, left-padded to 5 digits, and optional point |
Flight | Print an error when a system is out of hyperspace range |
Text | Print a text token followed by a question mark |
Market | Print the name, price and availability of a market item |
Market | Print the unit ("t", "kg" or "g") for a market item |
Text | Print a space |
Market | Print "t" (for tonne) and a space |
Market | Print "kg" (for kilograms) |
Market | Print "g" (for grams) |
Market | Print the headers for the table of market prices |
Market | Show the Market Price screen (red key f7) |
Market | Calculate QQ19+3 = economy * |economic_factor| |
Universe | Process a jump to the system closest to (QQ9, QQ10) |
Universe | Calculate the availability of market items |
Universe | Spawn a Thargoid ship and a Thargon companion |
Flight | Process a mis-jump into witchspace |
Flight | Try to initiate a jump into hyperspace |
Flight | Launch from a station or show the front space view |
Charts | Display either the Long-range or Short-range Chart |
Maths (Arithmetic) | Subtract an amount of cash from the cash pot |
Maths (Arithmetic) | Add an amount of cash to the cash pot |
Maths (Arithmetic) | Calculate (Y X) = P * Q * 4 |
Maths (Arithmetic) | Calculate (Y X) = (A P) * 4 |
Equipment | Show the Equip Ship screen (red key f3) |
Market | Print the amount of money we have left in the cash pot, then make a short, high beep and delay for 1 second |
Text | Make a short, high beep and delay for 1 second |
Equipment | Subtract the price of equipment from the cash pot |
Equipment | Return the price of a piece of equipment |
Equipment | Print a menu of the four space views, for buying lasers |
Elite E
-------
Category | Details |
---|---|
Copy protection | The authors' names and a copyright notice, buried in the code |
Universe | Print the selected system name |
Status | Print the commander's name |
Universe | Print the current system name |
Universe | Print the current galaxy number |
Status | Print fuel and cash levels |
Status | Print the current amount of cash |
Text | Print a text token followed by a newline |
Text | Print a text token followed by a colon |
Text | Print a colon |
Text | Print a text token |
Text | Print a letter in lower case |
Text | Print a letter according to Sentence Case |
Text | Print a recursive token in the range 128-145 |
Text | Tab to column 21 and print a colon |
Text | Print a letter in lower case |
Text | Print a character and switch to capitals |
Text | Print a character |
Text | Print a two-letter token or recursive token 0-95 |
Text | Print a recursive token |
Drawing ships | Draw an exploding ship |
Universe | Update the missile indicators, set up the planet data block |
Universe | Set up various aspects of arriving in a new system |
Stardust | Initialise the stardust field |
Stardust | Create a random cloud of stardust |
Dashboard | Clear the scanner, reset the ball line and sun line heaps |
Drawing suns | Reset the sun line heap |
Drawing the screen | Show or hide the dashboard (for when we die) |
Flight | Charge a shield and drain some energy from the energy banks |
Flight | Drain some energy from the energy banks |
Dashboard | Update the compass |
Maths (Arithmetic) | Calculate (Y X) = A / 10 |
Maths (Geometry) | Calculate the vector to the space station |
Dashboard | Draw the space station on the compass |
Dashboard | Draw a dot on the compass, given the planet/station vector |
Dashboard | Draw a dash on the compass |
Drawing pixels | Draw a double-height dot on the dashboard |
Drawing pixels | Draw a single-height dash on the dashboard |
Flight | Take some damage |
Maths (Geometry) | Copy a space coordinate from the K% block into K3 |
Universe | Fetch the address of a ship's data block into INF |
Universe | Add a new space station to our local bubble of universe |
Universe | Add a new ship to our local bubble of universe |
Universe | Flip the sign and double an INWK byte |
Dashboard | Disarm missiles and update the dashboard indicators |
Dashboard | Set/unset the lock target for a missile and update the dashboard |
Dashboard | Start up the E.C.M. (light up the indicator, start the countdown and make the E.C.M. sound) |
Dashboard | Light up the E.C.M. indicator bulb ("E") on the dashboard |
Dashboard | Light up the space station indicator ("S") on the dashboard |
Dashboard | Draw an indicator bulb on the dashboard |
Dashboard | The character bitmap for the E.C.M. indicator bulb |
Dashboard | The bitmap definition for the space station indicator bulb |
Dashboard | Draw a specific indicator in the dashboard's missile bar |
Maths (Geometry) | Project the current ship or planet onto the screen |
Drawing planets | Remove the planet or sun from the screen |
Drawing planets | Draw the planet or sun |
Drawing planets | Draw the planet, with either an equator and meridian, or a crater |
Drawing planets | Draw the planet's equator and meridian |
Drawing planets | Draw the planet's crater |
Drawing planets | Calculate (Y A) = nosev_x / z |
Drawing planets | Draw a half-ellipse |
Drawing planets | Draw an ellipse or half-ellipse |
Drawing suns | Draw the sun: Set up all the variables needed to draw the sun |
Drawing suns | Draw the sun: Start from the bottom of the screen and erase the old sun line by line |
Drawing suns | Draw the sun: Continue to move up the screen, drawing the new sun line by line |
Drawing suns | Draw the sun: Continue to the top of the screen, erasing the old sun line by line |
Drawing circles | Draw a circle for the planet |
Drawing circles | Draw a circle (for the planet or chart) |
Drawing planets | Remove the planet from the screen |
Drawing planets | Reset the ball line heap |
Drawing suns | Remove the sun from the screen |
Drawing lines | Draw a horizontal line given a centre and a half-width |
Drawing circles | Check whether any part of a circle appears on the extended screen |
Drawing planets | Return from a planet/sun-drawing routine with a failure flag |
Drawing planets | Calculate (Y A P) = 222 * roofv_x / z |
Drawing planets | Calculate CNT2 = arctan(P / A) / 4 |
Drawing planets | Calculate roofv_x / z and roofv_y / z |
Drawing planets | Calculate (X K) = (A P) / (z_sign z_hi z_lo) |
Keyboard | Scan the keyboard for cursor key or joystick movement |
Universe | Set the selected system to the current system |
Elite F
-------
Category | Details |
---|---|
Universe | Set the SLSP ship line heap pointer after shuffling ship slots |
Universe | Remove the current ship from our local bubble of universe |
Universe | Remove the space station and replace it with the sun |
Universe | Check the local bubble for missiles with target lock |
Universe | Remove a ship from our local bubble of universe |
Sound | Sound data |
Start and end | Reset most variables |
Start and end | Reset a number of flight variables and workspaces |
Universe | Reset the INWK workspace and orientation vectors |
Dashboard | Display the dashboard's missile indicators in green |
Flight | Remove an in-flight message from the space view |
Universe | Initialise the INWK workspace to a hostile ship |
Maths (Arithmetic) | Generate random numbers |
Main loop | Subroutine: Main game loop (Part 1 of 6) Spawn a trader (a peaceful Cobra Mk III) |
Main loop | Subroutine: Main game loop (Part 2 of 6) Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister |
Main loop | Subroutine: Main game loop (Part 3 of 6) Potentially spawn a cop, particularly if we've been bad |
Main loop | Subroutine: Main game loop (Part 4 of 6) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates |
Main loop | Subroutine: Main game loop (Part 5 of 6) Cool down lasers, make calls to update the dashboard |
Main loop | Subroutine: Main game loop (Part 6 of 6) Process non-flight key presses (red function keys, docked keys) |
Keyboard | Process function key, save key, hyperspace and chart key presses and update the hyperspace counter |
Status | Calculate how bad we have been |
Maths (Geometry) | Compare x_hi, y_hi and z_hi with 224 |
Maths (Geometry) | Compare x_hi, y_hi and z_hi with A |
Maths (Geometry) | Calculate a cap on the maximum distance to a ship |
Start and end | Display the death screen |
Start and end | Reset most of the game and restart from the title screen |
Start and end | Main entry point for the Elite game code |
Start and end | Show the "Load New Commander (Y/N)?" screen and start the game |
Start and end | Reset the current commander data block to the last saved commander |
Start and end | Show the "Press Fire or Space, Commander" screen and start the game |
Status | Go to the docking bay (i.e. show the Status Mode screen) |
Start and end | Display a title screen with a rotating ship and prompt |
Save and load | Calculate the checksum for the last saved commander data block |
Save and load | Copy the last saved commander's name from INWK to NA% |
Save and load | Copy the last saved commander's name from NA% to INWK |
Save and load | Fetch the name of a commander file to save or load |
Text | The OSWORD configuration block used to fetch a line of text from the keyboard |
Utility routines | Zero-fill pages &9, &A, &B, &C and &D |
Utility routines | Zero-fill the page whose number is in X |
Utility routines | Zero-fill a specific page |
Save and load | Save the commander file |
Save and load | Save or load the commander file |
Save and load | Load a commander file |
Utility routines | Set the behaviour of the ESCAPE and BREAK keys |
Maths (Geometry) | Calculate the vector to the planet and store it in XX15 |
Maths (Geometry) | Normalise the three-coordinate vector in K3 |
Maths (Geometry) | Normalise the three-coordinate vector in XX15 |
Keyboard | Scan the keyboard for key presses |
Sound | Switch off the E.C.M. |
Sound | Make an explosion sound |
Tactics | Add an enemy missile to our local bubble of universe |
Status | Process us making a kill |
Sound | Make the sound of a laser strike or ship explosion |
Sound | Make a short, high beep |
Sound | Make the sound whose number is in A |
Sound | Make a sound from a prepared sound block |
Sound | Prepare a sound block |
Keyboard | Lookup table for in-flight keyboard controls |
Keyboard | Scan the keyboard for a flight key |
Keyboard | Scan the keyboard to see if CTRL is currently pressed |
Keyboard | Scan the keyboard to see if a specific key is being pressed |
Keyboard | Read the joystick position |
Keyboard | Toggle a configuration setting and emit a beep |
Keyboard | Read joystick and flight controls |
Keyboard | Clear the key logger |
Keyboard | Scan for the seven primary flight controls |
Keyboard | Scan for pause, configuration and secondary flight keys |
Keyboard | Scan the keyboard until a key is pressed |
Flight | Erase an old in-flight message and display a new one |
Flight | Display "E.C.M.SYSTEM DESTROYED" as an in-flight message |
Flight | Display "FUEL SCOOPS DESTROYED" as an in-flight message |
Flight | Display an in-flight message |
Flight | Print a text token, possibly followed by " DESTROYED" |
Flight | Potentially lose cargo or equipment following damage |
Text | The two-letter token lookup table |
Market | Macro definition for the market prices table |
Market | Market prices table |
Maths (Geometry) | Orthonormalise the orientation vectors for a ship |
Maths (Arithmetic) | Calculate A = A / Q |
Maths (Arithmetic) | Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 |
Maths (Arithmetic) | Calculate (P+1 A) = (A P) / Q |
Elite G
-------
Category | Details |
---|---|
Drawing ships | Draw a distant ship as a point rather than a full wireframe |
Maths (Arithmetic) | Calculate Q = SQRT(R Q) |
Maths (Arithmetic) | Calculate R = 256 * A / Q |
Maths (Arithmetic) | Calculate (S A) = (S R) + (A Q) |
Maths (Geometry) | Calculate the dot product of XX15 and XX16 |
Drawing ships | Subroutine: LL9 (Part 1 of 12) Draw ship: Check if ship is exploding, check if ship is in front |
Drawing ships | Subroutine: LL9 (Part 2 of 12) Draw ship: Check if ship is in field of view, close enough to draw |
Drawing ships | Subroutine: LL9 (Part 3 of 12) Draw ship: Set up orientation vector, ship coordinate variables |
Drawing ships | Subroutine: LL9 (Part 4 of 12) Draw ship: Set visibility for exploding ship (all faces visible) |
Drawing ships | Subroutine: LL9 (Part 5 of 12) Draw ship: Calculate the visibility of each of the ship's faces |
Drawing ships | Subroutine: LL9 (Part 6 of 12) Draw ship: Calculate the visibility of each of the ship's vertices |
Maths (Arithmetic) | Calculate (U R) = 256 * A / Q |
Maths (Arithmetic) | Calculate 128 - (U R) |
Drawing ships | Subroutine: LL9 (Part 7 of 12) Draw ship: Calculate the visibility of each of the ship's vertices |
Drawing ships | Subroutine: LL9 (Part 8 of 12) Draw ship: Calculate the screen coordinates of visible vertices |
Drawing ships | Subroutine: LL9 (Part 9 of 12) Draw ship: Draw laser beams if the ship is firing its laser at us |
Drawing ships | Subroutine: LL9 (Part 10 of 12) Draw ship: Calculate the visibility of each of the ship's edges |
Drawing ships | Subroutine: LL9 (Part 11 of 12) Draw ship: Add all visible edges to the ship line heap |
Drawing ships | Subroutine: LL9 (Part 12 of 12) Draw ship: Draw all the visible edges from the ship line heap |
Drawing lines | Move a point along a line until it is on-screen |
Maths (Arithmetic) | Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 |
Maths (Arithmetic) | Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 |
Maths (Arithmetic) | Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| |
Drawing lines | Subroutine: LL145 (Part 1 of 4) Clip line: Work out which end-points are on-screen, if any |
Drawing lines | Subroutine: LL145 (Part 2 of 4) Clip line: Work out if any part of the line is on-screen |
Drawing lines | Subroutine: LL145 (Part 3 of 4) Clip line: Calculate the line's gradient |
Drawing lines | Subroutine: LL145 (Part 4 of 4) Clip line: Call the routine in LL188 to do the actual clipping |
Copy protection | Checksum for the entire main game code |
Ship blueprints
---------------
Category | Details |
---|---|
Drawing ships | Ship blueprints lookup table |
Drawing ships | Macro definition for adding vertices to ship blueprints |
Drawing ships | Macro definition for adding edges to ship blueprints |
Drawing ships | Macro definition for adding faces to ship blueprints |
Drawing ships | Ship blueprint for a Sidewinder |
Drawing ships | Ship blueprint for a Viper |
Drawing ships | Ship blueprint for a Mamba |
Drawing ships | Ship blueprint for a Cobra Mk III |
Drawing ships | Ship blueprint for a Thargoid mothership |
Drawing ships | Ship blueprint for a Coriolis space station |
Drawing ships | Ship blueprint for a missile |
Drawing ships | Ship blueprint for an asteroid |
Drawing ships | Ship blueprint for a cargo canister |
Drawing ships | Ship blueprint for a Thargon |
Drawing ships | Ship blueprint for an escape pod |
Drawing ships | Ship blueprint for a Python |
Save and load | The "saving in progress" flag |
Drawing the screen | The original value of the IRQ1 vector |
Big Code file
-------------
Category | Details |
---|---|
Workspaces | Important variables used by the loader |
Copy protection | Subroutine: LBL (Big Code file) Checksum the two pages of code that were copied from UU% to LE% |