https://www.bbcelite.com/ Skip to navigation [?] [?] Elite on the BBC Micro --------------------------------------------------------------------- BBC Micro Elite source code Fully documented source code for Elite on the BBC Micro ------------------------------------------------------- BBC Micro Elite screenshotBBC Micro Elite screenshotBBC Micro 6502 Second Processor Elite screenshot This site contains the original source code for the classic space game Elite on the BBC Micro and Acorn Electron, with every single line documented and (for the most part) explained. It covers the original BBC Micro cassette version, the enhanced BBC Micro disc version, the super-fast 6502 Second Processor version, the flicker-free BBC Master version and the cut-down Acorn Electron version, all of which were written by Ian Bell and David Braben and published by Acornsoft. It also includes Elite-A, Angus Duggan's extended version of the original game. My hope is that this site will be useful for those who want to learn more about Elite and what makes it tick. It is provided on an educational and non-profit basis, with the aim of helping people appreciate one of the most iconic games of the 8-bit era. Note that the original source code was never released for the BBC Micro disc, BBC Master or Acorn Electron versions, so some of the source code for these versions has been reconstructed from disassembling the original game binaries. Suggestions for your visit -------------------------- To start your journey into the secrets of Elite, you might like to try the following: * See the quick start guide to find out how to use this site. * Read more about this project and how it came to be. * Check out the deep dive articles for lots of details about how Elite works under the hood. * Explore Elite hacks like the Elite Universe Editor, flicker-free Elite and Teletext Elite. * Dive straight into the source code, though you might want to read these notes first, which explain some of the terminology used in the commentary. * Dig really deep and compare the code for the different versions of Elite. * Play Elite in your browser or emulator, and discover why it is regarded as such a masterpiece. * Jump straight to a random routine from the source code - who knows where you might end up? (Hopefully not in witchspace...) You can also click the [?] at the top of the page to keep jumping through the source code; it's a good way to explore. If you prefer a lighter theme for your Elite explorations, you can change the site's colour scheme by clicking the icons in the top-right corner. And finally, you may also be interested in my other projects, the fully documented source code for Aviator on the BBC Micro and fully documented source code for Revs on the BBC Micro. If you want to play with the code --------------------------------- If you are interested in building a working copy of Elite from the source, then there are six accompanying GitHub repositories, each of which contains fully commented and buildable source code for a specific version of Elite: * BBC Micro cassette version * BBC Micro disc version * 6502 Second Processor version * BBC Master version * Acorn Electron version * Elite-A These repositories can be assembled on modern computers to produce working game discs that can be loaded into a BBC Micro, an Acorn Electron or an emulator. If you want to experiment with the code, this is the place to go. Right on, Commanders! Mark Moxon BBC Micro Elite, written by Ian Bell and David Braben, (c) Acornsoft 1984 Acorn Electron Elite, written by Ian Bell and David Braben, (c) Acornsoft 1984 6502 Second Processor Elite, written by Ian Bell and David Braben, (c) Acornsoft 1985 BBC Master Elite, written by Ian Bell and David Braben, (c) Acornsoft 1986 Elite-A base code as per BBC Micro Elite, modifications by Angus Duggan, (c) Angus Duggan Commentary (c) Mark Moxon 2020 All Rights Reserved Home page * Using this site * Home page Start at the very beginning * Quick start guide All you need to know to start exploring this site * All about this project Project history, building the source and more + All about this project + About this project The story of how this project came to be + Terminology used in this commentary Read this before you explore the source code + Building Elite from the source How to build your own working copy of Elite + Useful links A collection of links to pages I've found useful during this project + Acknowledgements The giants on whose shoulders this project stands + Site history A short history of this site's development + Site map A top-level map of this website * Playing with the source code * Playing 8-bit Elite in the 21st century How to play all the versions of Elite analysed here * Deep dive articles Over 80 articles on how Elite weaves its magic + Index + Index of all deep dive articlesDiscover how Elite works under the hood + Deep dives + Memory maps Details of memory usage in the different versions o Memory maps o BBC Micro cassette memory map Memory usage in the classic version of Elite, where space is really tight o BBC Micro disc memory map Memory usage in the enhanced disc version of Elite o 6502 Second Processor memory map Memory usage in the Tube-based version of Elite o BBC Master memory map Memory usage in the smoothest version of Elite o Acorn Electron memory map Memory usage in the smallest and most basic version of Elite + Main loop The main game loop and task scheduler o Main loop o Program flow of the main game loop The sequence of events in the main game loop and the main flight loop o Scheduling tasks with the main loop counter How the main loop counter controls what we do and when we do it + Drawing pixels and text Split-screen modes and poking to screen memory o Drawing pixels and text o The split-screen mode Elite's famous split-screen mode, dissected and explained in detail o Drawing monochrome pixels in mode 4 Poking screen memory to display monochrome pixels in the space view o Drawing colour pixels in mode 5 Poking screen memory to display colour pixels in the dashboard view o Drawing pixels in the Electron version Poking pixels into screen memory in the Acorn Electron version of Elite o Extended screen coordinates The extended 16-bit screen coordinate system behind the space view o Drawing text How Elite draws text on-screen by poking character bitmaps directly into screen memory + Drawing lines Line-drawing algorithms and efficient clipping o Drawing lines o Bresenham's line algorithm The main line-drawing algorithm used to draw non-horizontal lines o Line-clipping Efficiently clipping an extended line to the part that's on-screen + Drawing ships Ship blueprints, data blocks and drawing in 3D o Drawing ships o Ship blueprints Specifications for all the different types of ship in the universe o Ship blueprints in the disc version How the disc version loads its ship blueprints into memory o Ship data blocks Storing data for each of the ships in the local bubble of universe o Drawing ships The main routine for drawing 3D wiremesh ships in space o Back-face culling How Elite draws solid-looking 3D ships by only drawing visible faces o Calculating vertex coordinates Determining whether a ship's vertex is visible or hidden from us o Flicker-free ship drawing How the BBC Master version reduces when drawing ships o Backporting the flicker-free algorithm Applying the BBC Master's flicker-free algorithm to the other versions + Drawing circles and ellipses Circles, ellipses, hyperspace and docking effects o Drawing circles and ellipses o Drawing circles The routines that draw planets and the hyperspace and docking tunnels o The ball line heap How we remember the lines used to draw circles so they can be redrawn o Drawing ellipses How Elite draws ellipses for the planet's crater, meridian and equator + Drawing planets Craters, meridians and the dots of Saturn o Drawing planets o Drawing craters The algorithms behind the huge craters of planets like Diso o Drawing meridians and equators The algorithms behind the meridians and equators of planets like Lave o Drawing Saturn on the loading screen How the loader draws the dot-based Saturn in Elite's epic loading screen + Drawing suns and explosions Shimmering suns and glittering explosion clouds o Drawing suns and explosions o Drawing the sun Drawing and storing the sun, and the systems on the Short-range Chart o Drawing explosion clouds Drawing and storing explosion clouds for ships whose luck runs out... + Simulating the universe Procedural galaxies, ship spawning, market prices o Simulating the universe o Galaxy and system seeds How system data is extracted from the galaxy and system seeds o Generating system data The algorithms behind the procedural generation of system data o Generating system names Producing system names from twisted seeds and two-letter tokens o Twisting the system seeds How the system seeds are twisted to produce entire galaxies of stars o Market item prices and availability The algorithms behind the generation of each system's cargo market o The local bubble of universe The data structures used to simulate the universe around our ship o The elusive Cougar They say it is vanishingly rare... but just how rare is the mysterious Cougar? + Moving and rotating in space Pitching, rolling and moving in 3D vector space o Moving and rotating in space o Pitching and rolling Applying our pitch and roll to another ship's orientation in space o Pitching and rolling by a fixed angle How other ships manage to pitch and roll in space o Program flow of the ship-moving routine A breakdown of the routine that moves the entire universe around us o Rotating the universe What happens to the rest of the universe when we rotate our ship? o Orientation vectors The three vectors that determine a ship's orientation in space o Tidying orthonormal vectors Making the orientation vectors orthonormal, and why this matters + Flying and flight controls Docking, space views and the flight keys o Flying and flight controls o Docking checks The checks that determine whether we are docking... or just crashing o The docking computer How the docking computer steers us home in the enhanced versions of Elite o Flipping axes between space views Details of how the different space views are implemented o The key logger Supporting concurrent in-flight key presses using a key logger + Tactics and combat Ranks, weapons and intelligent enemy ships o Tactics and combat o Combat rank The long, long road from Harmless to Elite o In the crosshairs How the game knows whether an enemy is being hit by our laser fire o Program flow of the tactics routine How ships and missiles work out attack patterns... or how to run away o Advanced tactics with the NEWB flags How the enhanced versions of Elite give their ships a bit more personality + The scanner and dashboard The 3D elliptical scanner and other indicators o The scanner and dashboard o The 3D scanner The maths behind Elite's famous 3D elliptical scanner o The dashboard indicators How the bar-based dashboard indicators display their data + Stardust How the tiny particles of moving stardust work o Stardust o Stardust in the front view The algorithms behind the stardust particles in the front view o Stardust in the side views The algorithms behind the stardust particles in the side views + Text Text tokenisation and the "goat soup" algorithm o Text o Printing text tokens Printing recursive text tokens, two-letter tokens and control codes o Extended text tokens The extended text token system in the enhanced versions of Elite o Extended system descriptions The famous "goat soup" algorithm that generates those strange and wonderful system descriptions o Printing decimal numbers How to print big decimal numbers with decimal points and padding + Maths Arithmetic, geometry and random numbers o Maths o Adding sign-magnitude numbers Doing basic arithmetic with sign-magnitude numbers o Calculating square roots The algorithm behind the square root routine o Shift-and-add multiplication The main algorithm behind Elite's many multiplication routines o Multiplication and division using logarithms Faster multiplication and division routines by using logarithm lookup tables o Shift-and-subtract division The main algorithm behind Elite's many division routines o The sine, cosine and arctan tables The lookup tables used for the planet-drawing trigonometric functions o Generating random numbers The algorithm behind Elite's random number generation routines + Saving and loading Commander files and competition codes o Saving and loading o Commander save files A description of each and every byte in the saved commander file o The competition code All the information that's hidden in the Elite competition code + 6502 Second Processor Elite Tube APIs, scroll texts, speech support and more o 6502 Second Processor Elite o 6502 Second Processor Tube communication How the 6502 Second Processor version of Elite talks over the Tube o The 6502 Second Processor demo mode All about the Star Wars-esque scroll text in the Tube-based version of Elite o The TINA hook Adding your own custom code to the 6502 Second Processor version using TINA o Secrets of the Executive version Infinite jumps, retro-futuristic fonts, speech support... and Pizzasoft? + Elite-A How Angus Duggan modified the original Elite o Elite-A o Making room for the modifications How Angus Duggan found enough spare memory for Elite-A's modifications o Buying and flying ships in Elite-A What it's like to save up for and fly your dream ship in Elite-A o Ship blueprints in Elite-A The enhanced logic behind Elite-A's sophisticated ship blueprints system o The Encyclopedia Galactica Inside the encyclopedia, Elite-A's most recognisable modification o The I.F.F. system Friend or foe? Adding ship information to the 3D scanner o Fixing ship positions Why Elite spawns certain ships in certain places, and how Elite-A fixes this o Special cargo missions Procedurally generating delivery missions and tracking progress o Delta 14b joystick support All the controls of Elite in one single handset - the future is here! o Tube communication in Elite-A How the 6502 Second Processor version of Elite-A talks over the Tube o The original source files How the original Elite-A source was written, edited and compiled * Elite hacks Universe editor, flicker-free, teletext and more + Index + Index of all Elite hacksA list of all the Elite hacks on this site + Elite hacks + Elite Universe Editor Create your own Elite universes and "press play" to bring them to life o Elite Universe Editor o An introduction to the Elite Universe Editor Create your own Elite universes and "press play" to bring them to life o Downloading the Elite Universe Editor How to download and play the Elite Universe Editor o A summary of keys All the keys used in all the different versions of the Elite Universe Editor o Instructions for the BBC version Full instructions for the Elite Universe Editor on the BBC Micro and Master o Instructions for the Commodore 64 version Full instructions for the Elite Universe Editor on the Commodore 64 o Technical information Details of how the Elite Universe Editor works under the bonnet + Flicker-free Elite Improved ship drawing on the BBC Micro, Commodore 64 and Commodore Plus/4 o Flicker-free Elite o An introduction to flicker-free Elite Improved ship drawing on the BBC Micro, Commodore 64 and Commodore Plus /4 o Downloading flicker-free Elite How to download and play flicker-free Elite, on both the BBC and Commodore o Technical information Details of how flicker-free Elite weaves its magic + Teletext Elite The disc version of BBC Micro Elite, converted to run in teletext o Teletext Elite o An introduction to Teletext Elite The disc version of BBC Micro Elite, converted to run in teletext o Downloading Teletext Elite How to download and play Teletext Elite o Instructions for Teletext Elite Full instructions for Teletext Elite on the BBC Micro o Technical information Details of how Elite was converted to use teletext + BBC Micro Elite... with music! The title and docking music from the Commodore 64, shoehorned into BBC Micro Elite o BBC Micro Elite... with music! o About the musical version of BBC Micro Elite The disc version of BBC Micro Elite, with added title and docking music o Downloading musical BBC Micro Elite How to download and play the musical version of BBC Micro Elite o Technical information How the Commodore 64's music was ported to Elite on the BBC Micro + BBC Master disc Elite The disc version of BBC Micro Elite, converted to run on the BBC Master o BBC Master disc Elite o About BBC Micro disc Elite on the BBC Master The disc version of BBC Micro Elite, converted to run on the BBC Master o Downloading BBC Master disc Elite How to download and play the original disc version of Elite on the BBC Master o Technical information Details of how disc Elite was converted from the BBC Micro to the BBC Master * Exploring the source code * BBC Micro cassette source code Annotated source of the original version of Elite + Version information + About the BBC Micro cassette versionDetails of the original version of Elite + Different variants of the BBC Micro cassette versionCode variations found in cassette Elite + BBC Micro cassette source code by file + Map of the source code An overview of how the source code for Elite is structured + Annotated original source files The source files in their original structure o Game loader o Loader source The loading screen, copy protection and set-up for the main game o Main game o Workspaces The main variable workspaces used in Elite o Text tokens Elite's tokenised game text o Elite A source Part 1 of the main game code o Elite B source Part 2 of the main game code o Elite C source Part 3 of the main game code o Elite D source Part 4 of the main game code o Elite E source Part 5 of the main game code o Elite F source Part 6 of the main game code o Elite G source Part 7 of the main game code o Ship blueprints Data for the 13 different ship designs o Big Code File o Big Code File source Concatenates the individual source code parts into one big game file + BBC Micro cassette source code by category + Charts Long-range and short-range galactic charts o Subroutines o hm Select the closest system and redraw the chart crosshairs o TT103 Draw a small set of crosshairs on a chart o TT105 Draw crosshairs on the Short-range Chart, with clipping o TT114 Display either the Long-range or Short-range Chart o TT123 Move galactic coordinates by a signed delta o TT16 Move the crosshairs on a chart o TT22 * Show the Long-range Chart (red key f4) o TT23 * Show the Short-range Chart (red key f5) + Copy protection Hiding the Elite code from prying eyes o Subroutines o BEGIN% (Loader) Single-byte decryption and copying routine, run on the stack o CHECKER (Loader) Run checksum checks on tokens, loader and tape block count o David7 (Loader) Part of the multi-jump obfuscation code in PROT1 o DOMOVE (Loader) Multi-byte decryption and copying routine, run on the stack o doPROT1 (Loader) Routine to self-modify the loader code o LBL (Big Code file) Checksum the two pages of code that were copied from UU% to LE% o swine (Loader) Resets the machine if the copy protection detects a problem o Variables o Authors' names The authors' names and a copyright notice, buried in the code o Authors' names (Loader) The authors' names, buried in the code o BLOCK (Loader) Addresses for the obfuscated jumps that use RTS not JMP o CHECKbyt (Loader) Checksum for the validity of the UU% workspace o checksum0 Checksum for the entire main game code o CHECKV (Loader) The address of the LBL routine in the decryption header o David23 (Loader) Address pointer to the start of the 6502 stack o David9 (Loader) Address used as part of the stack-based decryption loop o FOOLV (Loader) Part of the AFOOL roundabout obfuscation routine o MAINSUM (Loader) Two checksums for the decryption header and text token table o MHCA (Loader) Used to set one of the vectors in the copy protection code + Dashboard The dials, 3D scanner and compass o Subroutines o ABORT Disarm missiles and update the dashboard indicators o ABORT2 Set/unset the lock target for a missile and update the dashboard o BULB Draw an indicator bulb on the dashboard o BUMP2 Bump up the value of the pitch or roll dashboard indicator o cntr Apply damping to the pitch or roll dashboard indicator o COMPAS * Update the compass o DIALS (Part 1 of 4) Update the dashboard: speed indicator o DIALS (Part 2 of 4) Update the dashboard: pitch and roll indicators o DIALS (Part 3 of 4) Update the dashboard: four energy banks o DIALS (Part 4 of 4) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIL2 Update the roll or pitch indicator on the dashboard o DILX * Update a bar-based indicator on the dashboard o DOT Draw a dash on the compass o ECBLB Light up the E.C.M. indicator bulb ("E") on the dashboard o ECBLB2 Start up the E.C.M. (indicator, start countdown and make sound) o MSBAR Draw a specific indicator in the dashboard's missile bar o msblob Display the dashboard's missile indicators in green o PZW Fetch the current dashboard colours, to support flashing o REDU2 Reduce the value of the pitch or roll dashboard indicator o SCAN * Display the current ship on the scanner o SP1 Draw the space station on the compass o SP2 Draw a dot on the compass, given the planet/station vector o SPBLB Light up the space station indicator ("S") on the dashboard o WPSHPS Clear the scanner, reset the ball line and sun line heaps o Variables o ECBT The character bitmap for the E.C.M. indicator bulb o SPBT The bitmap definition for the space station indicator bulb + Drawing circles Hyperspace tunnels, launch rings and planets o Subroutines o BLINE * Draw a circle segment and add it to the ball line heap o CHKON Check whether any part of a circle appears on the extended screen o CIRCLE Draw a circle for the planet o CIRCLE2 * Draw a circle (for the planet or chart) o HFS2 * Draw the launch or hyperspace tunnel o LAUN Make the launch sound and draw the launch tunnel o LL164 Make the hyperspace sound and draw the hyperspace tunnel o TT128 * Draw a circle on a chart o TT14 Draw a circle with crosshairs on a chart + Drawing lines The core line-drawing routines o Subroutines o EDGES Draw a horizontal line given a centre and a half-width o HLOIN * Draw a horizontal line from (X1, Y1) to (X2, Y1) o HLOIN2 Remove a line from the sun line heap and draw it on-screen o LASLI Draw the laser lines for when we fire our lasers o LL118 Move a point along a line until it is on-screen o LL145 (Part 1 of 4) * Clip line: Work out which end-points are on-screen, if any o LL145 (Part 2 of 4) Clip line: Work out if any part of the line is on-screen o LL145 (Part 3 of 4) Clip line: Calculate the line's gradient o LL145 (Part 4 of 4) Clip line: Call the routine in LL188 to do the actual clipping o LOIN (Part 1 of 7) * Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 2 of 7) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 3 of 7) Draw a shallow line going right and up or left and down o LOIN (Part 4 of 7) Draw a shallow line going right and down or left and up o LOIN (Part 5 of 7) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 6 of 7) Draw a steep line going up and left or down and right o LOIN (Part 7 of 7) Draw a steep line going up and right or down and left o NLIN Draw a horizontal line at pixel row 23 to box in a title o NLIN2 Draw a screen-wide horizontal line at the pixel row in A o NLIN3 Print a title and a horizontal line at row 19 to box it in o NLIN4 Draw a horizontal line at pixel row 19 to box in a title o TT15 Draw a set of crosshairs o Variables o TWFL Ready-made character rows for the left end of a horizontal line in mode 4 o TWFR Ready-made character rows for the right end of a horizontal line in mode 4 + Drawing pixels How to plot pixels in various colours o Subroutines o CPIX2 * Draw a single-height dash on the dashboard o CPIX4 Draw a double-height dot on the dashboard o PIX (Loader) Draw a single pixel at a specific coordinate o PIXEL * Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o PIXEL2 Draw a stardust particle relative to the screen centre o PX3 Plot a single pixel at (X, Y) within a character block o Variables o CTWOS Ready-made single-pixel character row bytes for mode 5 o TWOS Ready-made single-pixel character row bytes for mode 4 o TWOS (Loader) Ready-made single-pixel character row bytes for mode 4 o TWOS2 Ready-made double-pixel character row bytes for mode 4 + Drawing planets Planets with meridians and craters o Subroutines o PL2 Remove the planet or sun from the screen o PL21 Return from a planet/sun-drawing routine with a failure flag o PL9 (Part 1 of 3) * Draw the planet, with either an equator and meridian, or a crater o PL9 (Part 2 of 3) Draw the planet's equator and meridian o PL9 (Part 3 of 3) Draw the planet's crater o PLANET Draw the planet or sun o PLL1 (Loader) * Draw Saturn on the loading screen o PLS1 Calculate (Y A) = nosev_x / z o PLS2 Draw a half-ellipse o PLS22 * Draw an ellipse or half-ellipse o PLS3 Calculate (Y A P) = 222 * roofv_x / z o PLS4 Calculate CNT2 = arctan(P / A) / 4 o PLS5 Calculate roofv_x / z and roofv_y / z o PLS6 Calculate (X K) = (A P) / (z_sign z_hi z_lo) o WP1 Reset the ball line heap o WPLS2 Remove the planet from the screen o Variables o CNT (Loader) A counter for use in drawing Saturn's planetary body o CNT2 (Loader) A counter for use in drawing Saturn's background stars o CNT3 (Loader) A counter for use in drawing Saturn's rings + Drawing ships The celebrated 3D ship plotting process o Subroutines o DOEXP * Draw an exploding ship o LL9 (Part 1 of 12) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 2 of 12) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 3 of 12) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 4 of 12) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 5 of 12) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 6 of 12) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 8 of 12) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 9 of 12) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 10 of 12) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 11 of 12) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 12 of 12) Draw ship: Draw all the visible edges from the ship line heap o PROJ Project the current ship onto the screen o SHPPT Draw a distant ship as a point rather than a full wireframe o Variables o SHIP_ASTEROID Ship blueprint for an asteroid o SHIP_CANISTER Ship blueprint for a cargo canister o SHIP_COBRA_MK_3 Ship blueprint for a Cobra Mk III o SHIP_CORIOLIS Ship blueprint for a Coriolis space station o SHIP_ESCAPE_POD Ship blueprint for an escape pod o SHIP_MAMBA Ship blueprint for a Mamba o SHIP_MISSILE Ship blueprint for a missile o SHIP_PYTHON Ship blueprint for a Python o SHIP_SIDEWINDER Ship blueprint for a Sidewinder o SHIP_THARGOID Ship blueprint for a Thargoid mothership o SHIP_THARGON Ship blueprint for a Thargon o SHIP_VIPER Ship blueprint for a Viper o XX21 Ship blueprints lookup table o Macros o EDGE Macro definition for adding edges to ship blueprints o FACE Macro definition for adding faces to ship blueprints o VERTEX Macro definition for adding vertices to ship blueprints + Drawing suns The epic, shimmering Elite sun o Subroutines o FLFLLS Reset the sun line heap o SUN (Part 1 of 4) Draw the sun: Set up all the variables needed o SUN (Part 2 of 4) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 3 of 4) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 4 of 4) Draw the sun: Continue to the top of the screen, erasing old sun o WPLS Remove the sun from the screen + Equipment Buying and selling weapons and ship upgrades o Subroutines o eq Subtract the price of equipment from the cash pot o EQSHP * Show the Equip Ship screen (red key f3) o prx Return the price of a piece of equipment o qv Print a menu of the four space views, for buying lasers o Variables o PRXS Equipment prices + Flight Docking, hyperspace, views, shields and more o Subroutines o DENGY Drain some energy from the energy banks o ESCAPE Launch our escape pod o Ghy Perform a galactic hyperspace jump o hy6 Print a message to say no hyperspacing inside the station o hyp Start the hyperspace process o LOOK1 Initialise the space view o MJP Process a mis-jump into witchspace o OOPS Take some damage o OUCH Potentially lose cargo or equipment following damage o PLUT * Flip the coordinate axes for the four different views o SESCP Spawn an escape pod from the current (parent) ship o SHD Charge a shield and drain some energy from the energy banks o SIGHT Draw the laser crosshairs o TT110 Launch from a station or show the front space view o TT18 Try to initiate a jump into hyperspace o WARP * Perform an in-system jump o wW Start a hyperspace countdown + Inventory Showing the contents of the hold o Subroutines o TT210 Show a list of current cargo in our hold, optionally to sell o TT213 * Show the Inventory screen (red key f9) o TT214 Ask a question with a "Y/N?" prompt and return the response + Keyboard Processing key presses and joysticks o Subroutines o CTRL Scan the keyboard to see if CTRL is currently pressed o DK4 Scan for pause, configuration and secondary flight keys o DKJ1 Read joystick and flight controls o DKS1 Scan the keyboard for a flight key o DKS2 Read the joystick position o DKS3 Toggle a configuration setting and emit a beep o DKS4 Scan the keyboard to see if a specific key is being pressed o DOKEY * Scan for the seven primary flight controls o RDKEY Scan the keyboard for key presses o TT102 * Process function key, save key, hyperspace and chart key presses and update the hyperspace counter o TT17 Scan the keyboard for cursor key or joystick movement o TT217 Scan the keyboard until a key is pressed o U% Clear the key logger o Variables o KYTB Lookup table for in-flight keyboard controls + Loader The loading screen and system setup o Subroutines o Elite loader (Part 1 of 6) (Loader) Include binaries for recursive tokens, Python blueprint and images o Elite loader (Part 2 of 6) (Loader) Perform a number of OS calls, set up sound, push routines on stack o Elite loader (Part 3 of 6) (Loader) Move and decrypt recursive tokens, Python blueprint and images o Elite loader (Part 4 of 6) (Loader) Copy more code onto stack, decrypt TUT block, set up IRQ1 handler o Elite loader (Part 5 of 6) (Loader) Load main game code, decrypt it, move it to the correct location o Elite loader (Part 6 of 6) (Loader) Set up interrupt vectors, calculate checksums, run main game code + Main loop The core loop that runs Elite o Subroutines o Main flight loop (Part 1 of 16) Seed the random number generator o Main flight loop (Part 2 of 16) Calculate the alpha and beta angles from the current pitch and roll of our ship o Main flight loop (Part 3 of 16) Scan for flight keys and process the results o 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 o Main flight loop (Part 5 of 16) For each nearby ship: If an energy bomb has been set off, potentially kill this ship o 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% o Main flight loop (Part 7 of 16) For each nearby ship: Check whether we are docking, scooping or colliding with it o Main flight loop (Part 8 of 16) For each nearby ship: Process us potentially scooping this item o 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 o Main flight loop (Part 10 of 16) For each nearby ship: Remove if scooped, or process collisions o Main flight loop (Part 11 of 16) For each nearby ship: Process missile lock and firing our laser o Main flight loop (Part 12 of 16) For each nearby ship: Draw the ship, remove if killed, loop back o Main flight loop (Part 13 of 16) Show energy bomb effect, charge shields and energy banks o Main flight loop (Part 14 of 16) Spawn a space station if we are close enough to the planet o Main flight loop (Part 15 of 16) Perform altitude checks with the planet and sun and process fuel scooping if appropriate o Main flight loop (Part 16 of 16) Process laser pulsing, E.C.M. energy drain, call stardust routine o Main game loop (Part 1 of 6) Spawn a trader (a peaceful Cobra Mk III) o Main game loop (Part 2 of 6) * Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister o Main game loop (Part 3 of 6) Potentially spawn a cop, particularly if we've been bad o Main game loop (Part 4 of 6) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates o Main game loop (Part 5 of 6) Cool down lasers, make calls to update the dashboard o Main game loop (Part 6 of 6) Process non-flight key presses (red function keys, docked keys) + Market Prices, availability, selling and buying cargo o Subroutines o gnum Get a number from the keyboard o tnpr Work out if we have space for a specific amount of cargo o TT151 Print the name, price and availability of a market item o TT152 Print the unit ("t", "kg" or "g") for a market item o TT160 Print "t" (for tonne) and a space o TT161 Print "kg" (for kilograms) o TT163 Print the headers for the table of market prices o TT167 * Show the Market Price screen (red key f7) o TT16a Print "g" (for grams) o TT208 * Show the Sell Cargo screen (red key f2) o TT219 * Show the Buy Cargo screen (red key f1) o var Calculate QQ19+3 = economy * |economic_factor| o Variables o QQ23 Market prices table o Macros o ITEM Macro definition for the market prices table + Maths (Arithmetic) Addition, subtraction, multiplication, division o Subroutines o ADD * Calculate (A X) = (A P) + (S R) o DV41 Calculate (P R) = 256 * DELTA / A o DV42 Calculate (P R) = 256 * DELTA / z_hi o DVID3B2 Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID4 * Calculate (P R) = 256 * A / Q o DVIDT Calculate (P+1 A) = (A P) / Q o FMLTU Calculate A = A * Q / 256 o FMLTU2 Calculate A = K * sin(A) o GC2 Calculate (Y X) = (A P) * 4 o GCASH Calculate (Y X) = P * Q * 4 o LCASH Subtract an amount of cash from the cash pot o LL120 Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL123 Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL129 Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL28 Calculate R = 256 * A / Q o LL38 Calculate (S A) = (S R) + (A Q) o LL5 Calculate Q = SQRT(R Q) o LL61 Calculate (U R) = 256 * A / Q o LL62 Calculate 128 - (U R) o MAD Calculate (A X) = Q * A + (S R) o MAS3 Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block o MCASH Add an amount of cash to the cash pot o MLS1 Calculate (A P) = ALP1 * A o MLS2 Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLTU2 Calculate (A P+1 P) = (A ~P) * Q o MLU1 Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust o MLU2 Calculate (A P) = |A| * Q o MU1 Copy X into P and A, and clear the C flag o MU11 Calculate (A P) = P * X o MU5 Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU6 Set P(1 0) = (A A) o MULT1 Calculate (A P) = Q * A o MULT12 Calculate (S R) = Q * A o MULT3 Calculate K(3 2 1 0) = (A P+1 P) * Q o MULTU * Calculate (A P) = P * Q o MUT1 Calculate R = XX and (A P) = Q * A o MUT2 Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT3 Unused routine that does the same as MUT2 o PIX1 Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o ROOT (Loader) Calculate ZP = SQRT(ZP(1 0)) o SPS2 Calculate (Y X) = A / 10 o SQUA Clear bit 7 of A and calculate (A P) = A * A o SQUA2 Calculate (A P) = A * A o SQUA2 (Loader) Calculate (A P) = A * A o TAS1 Calculate K3 = (x_sign x_hi x_lo) - V(1 0) o TIS1 Calculate (A ?) = (-X * A + (S R)) / 96 o TIS2 Calculate A = A / Q o TIS3 Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o Unused duplicate of MULTU Unused duplicate of the MULTU routine + Maths (Geometry) Vectors, coordinates, dot products and matrices o Subroutines o ARCTAN Calculate A = arctan(P / Q) o FAROF Compare x_hi, y_hi and z_hi with 224 o FAROF2 Compare x_hi, y_hi and z_hi with A o LL51 Calculate the dot product of XX15 and XX16 o MAS1 Add an orientation vector coordinate to an INWK coordinate o MAS2 Calculate a cap on the maximum distance to the planet or sun o MAS4 Calculate a cap on the maximum distance to a ship o NORM * Normalise the three-coordinate vector in XX15 o SPS1 Calculate the vector to the planet and store it in XX15 o SPS3 Copy a space coordinate from the K% block into K3 o SPS4 Calculate the vector to the space station o TAS2 Normalise the three-coordinate vector in K3 o TAS3 Calculate the dot product of XX15 and an orientation vector o TIDY * Orthonormalise the orientation vectors for a ship o Variables o ACT Arctan table o SNE Sine/cosine table + Moving Moving and rotating ships and planets in space o Subroutines o MV40 Rotate the planet or sun's location in space by the amount of pitch and roll of our ship o MVEIT (Part 1 of 9) Move current ship: Tidy the orientation vectors o MVEIT (Part 2 of 9) Move current ship: Call tactics routine, remove ship from scanner o MVEIT (Part 3 of 9) Move current ship: Move ship forward according to its speed o MVEIT (Part 4 of 9) Move current ship: Apply acceleration to ship's speed as a one-off o MVEIT (Part 5 of 9) Move current ship: Rotate ship's location by our pitch and roll o MVEIT (Part 6 of 9) Move current ship: Move the ship in space according to our speed o MVEIT (Part 7 of 9) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 8 of 9) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 9 of 9) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVS4 * Apply pitch and roll to an orientation vector o MVS5 Apply a 3.6 degree pitch or roll to an orientation vector o MVT1 Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT3 Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1) o MVT6 Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o SFS2 Move a ship in space along one of the coordinate axes + Save and load Commander files and competition codes o Subroutines o CHECK Calculate the checksum for the last saved commander data block o GTNME Fetch the name of a commander file to save or load o LOD * Load a commander file o QUS1 Save or load the commander file o SVE * Save the commander file o TR1 Copy the last saved commander's name from NA% to INWK o TRNME Copy the last saved commander's name from INWK to NA% o Variables o CHK First checksum byte for the saved commander data file o CHK2 Second checksum byte for the saved commander data file o NA% The data block for the last saved commander o SVN The "saving in progress" flag + Screen mode Elite's famous split-screen mode o Subroutines o DET1 Show or hide the dashboard (for when we die) o IRQ1 * The main screen-mode interrupt handler (IRQ1V points here) o IRQ1 (Loader) The loader's screen-mode interrupt handler (IRQ1V points here) o WSCAN Wait for the vertical sync o Variables o B% (Loader) VDU commands for setting the square mode 4 screen o block1 (Loader) Palette data for the two dashboard colour scheme o block2 (Loader) Palette data for the space part of the screen o TVT1 Palette data for space and the two dashboard colour schemes o VEC The original value of the IRQ1 vector + Sound Explosions, laser fire, hyperspace and more o Subroutines o BEEP Make a short, high beep o BELL Make a standard system beep o ECMOF Switch off the E.C.M. o EXNO Make the sound of a laser strike or ship explosion o EXNO2 Process us making a kill o EXNO3 Make an explosion sound o NO3 Make a sound from a prepared sound block o NOISE * Make the sound whose number is in A o NOS1 Prepare a sound block o Variables o E% (Loader) Sound envelope definitions o SFX Sound data o Macros o FNE (Loader) Macro definition for defining a sound envelope + Stardust Stardust generation and movement o Subroutines o FLIP Reflect the stardust particles in the screen diagonal and redraw the stardust field o nWq Create a random cloud of stardust o NWSTARS Initialise the stardust field o STARS * The main routine for processing the stardust o STARS1 Process the stardust for the front view o STARS2 Process the stardust for the left or right view o STARS6 Process the stardust for the rear view + Start and end The title screen... and the Game Over screen o Subroutines o BR1 (Part 1 of 2) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 2 of 2) Show the "Press Fire or Space, Commander" screen and start the game o DEATH * Display the death screen o DEATH2 Reset most of the game and restart from the title screen o QU5 Reset the current commander data block to the last saved commander o RES2 Reset a number of flight variables and workspaces o RESET Reset most variables o TITLE * Display a title screen with a rotating ship and prompt o TT170 * Main entry point for the Elite game code + Status Showing the commander's status and rank o Subroutines o BAD Calculate how bad we have been o BAY Go to the docking bay (i.e. show the Status Mode screen) o STATUS * Show the Status Mode screen (red key f8) + Tactics AI tactics for enemy ships and missiles o Subroutines o ANGRY Make a ship hostile o FR1 Display the "missile jammed" message o FRMIS Fire a missile from our ship o FRS1 Launch a ship straight ahead of us, below the laser sights o HITCH * Work out if the ship in INWK is in our crosshairs o SFRMIS Add an enemy missile to our local bubble of universe o TACTICS (Part 1 of 7) Apply tactics: Process missiles, both enemy missiles and our own o TACTICS (Part 2 of 7) * Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate o TACTICS (Part 3 of 7) Apply tactics: Calculate dot product to determine ship's aim o TACTICS (Part 4 of 7) Apply tactics: Check energy levels, maybe launch escape pod if low o TACTICS (Part 5 of 7) Apply tactics: Consider whether to launch a missile at us o TACTICS (Part 6 of 7) Apply tactics: Consider firing a laser at us, if aim is true o TACTICS (Part 7 of 7) Apply tactics: Set pitch, roll, and acceleration + Text Recursive tokens, control codes, two-letter tokens and more o Subroutines o BPRNT * Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o cmn Print the commander's name o cpl Print the selected system name o crlf Tab to column 21 and print a colon o csh Print the current amount of cash o dn Print the amount of cash and beep o dn2 Make a short, high beep and delay for 1 second o ee3 Print the hyperspace countdown in the top-left of the screen o ex Print a recursive token o fwl Print fuel and cash levels o me1 Erase an old in-flight message and display a new one o me2 Remove an in-flight message from the space view o mes9 Print a text token, possibly followed by " DESTROYED" o MESS Display an in-flight message o ou2 Display "E.C.M.SYSTEM DESTROYED" as an in-flight message o ou3 Display "FUEL SCOOPS DESTROYED" as an in-flight message o plf Print a text token followed by a newline o plf2 Print text followed by a newline and indent of 6 characters o pr2 Print an 8-bit number, left-padded to 3 digits, and optional point o pr5 Print a 16-bit number, left-padded to 5 digits, and optional point o pr6 Print 16-bit number, left-padded to 5 digits, no point o prq Print a text token followed by a question mark o qw Print a recursive token in the range 128-145 o spc Print a text token followed by a space o tal Print the current galaxy number o TT11 Print a 16-bit number, left-padded to n digits, and optional point o TT146 Print the distance to the selected system in light years o TT147 Print an error when a system is out of hyperspace range o TT162 Print a space o TT26 * Print a character at the text cursor by poking into screen memory o TT26 (Loader) Print a character at the text cursor (WRCHV points here) o TT27 * Print a text token o TT41 Print a letter according to Sentence Case o TT42 Print a letter in lower case o TT43 Print a two-letter token or recursive token 0-95 o TT45 Print a letter in lower case o TT46 Print a character and switch to capitals o TT60 Print a text token and a paragraph break o TT67 Print a newline o TT68 Print a text token followed by a colon o TT69 Set Sentence Case and print a newline o TT70 Display "MAINLY " and jump to TT72 o TT73 Print a colon o TT74 Print a character o TTX69 Print a paragraph break o ypl Print the current system name o Variables o QQ16 The two-letter token lookup table o QQ18 The recursive token table for tokens 0-148 o RLINE The OSWORD configuration block used to fetch a line of text from the keyboard o TENS A constant used when printing large numbers in BPRNT o XC (Loader) The x-coordinate of the text cursor o YC (Loader) The y-coordinate of the text cursor o Macros o CHAR Macro definition for characters in the recursive token table o CONT Macro definition for control codes in the recursive token table o RTOK Macro definition for recursive tokens in the recursive token table o TWOK Macro definition for two-letter tokens in the token table + Universe Ship spawning, the local bubble, system/market generation o Subroutines o GINF Fetch the address of a ship's data block into INF o GTHG Spawn a Thargoid ship and a Thargon companion o GVL Calculate the availability of market items o hyp1 Process a jump to the system closest to (QQ9, QQ10) o jmp Set the current system to the selected system o KILLSHP * Remove a ship from our local bubble of universe o KS1 Remove the current ship from our local bubble of universe o KS2 Check the local bubble for missiles with target lock o KS3 Set the SLSP ship heap pointer after shuffling ship slots o KS4 Remove the space station and replace it with the sun o NwS1 Flip the sign and double an INWK byte o NWSHP Add a new ship to our local bubble of universe o NWSPS Add a new space station to our local bubble of universe o ping Set the selected system to the current system o SFS1 * Spawn a child ship from the current (parent) ship o SOLAR Set up various aspects of arriving in a new system o SOS1 Update the missile indicators, set up the planet data block o TT111 Set the current system to the nearest system to a point o TT20 Twist the selected system's seeds four times o TT24 * Calculate system data from the system seeds o TT25 * Show the Data on System screen (red key f6) o TT54 * Twist the selected system's seeds o TT81 Set the selected system's seeds to those of system 0 o Ze Initialise the INWK workspace to a hostile ship o Variables o UNIV Table of pointers to the local universe's ship data blocks + Utility routines Memory/screen clearing, delay routines, random number generators o Subroutines o CLYNS Clear the bottom three text rows of the mode 4 screen o command (Loader) Execute an OS command o DELAY Wait for a specified time, in 1/50s of a second o DORND * Generate random numbers o DORND (Loader) Generate random numbers o FX200 Set the behaviour of the ESCAPE and BREAK keys o LYN Clear most of a row of pixels o OSB (Loader) A convenience routine for calling OSBYTE with Y = 0 o osprint (Loader) Print a character o TT66 Clear the screen and set the current view type o TTX66 Clear the top part of the screen and draw a white border o ZERO Zero-fill pages &9, &A, &B, &C and &D o ZES1 Zero-fill the page whose number is in X o ZES2 Zero-fill a specific page o ZINF Reset the INWK workspace and orientation vectors o Variables o M2 (Loader) Used for testing the 6522 System VIA status byte in IRQ1 o MESS1 (Loader) Contains an OS command string for loading the main game code o oscliv (Loader) Contains the address of OSCLIV, for executing OS commands + Workspaces Collections of important variables into blocks o Workspaces o K% * Ship data blocks and ship line heaps o S% Vector addresses, compass colour and configuration settings o T% Current commander data and stardust data blocks o UU% (Loader) Marker for a block that is moved as part of the obfuscation o WP Ship slots, variables o XX3 Temporary storage space for complex calculations o ZP * Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (Big Code file) Important variables used by the loader o ZP (Loader) Important variables used by the loader * BBC Micro disc source code An enhanced version with missions and more ships + Version information + About the BBC Micro disc versionDetails of the enhanced version of Elite + Different variants of the BBC Micro disc versionCode variations found in disc Elite + BBC Micro disc source code by file + Map of the source code An overview of how the source code for Elite is structured + Annotated original source files The source files in their original structure o Game loader o Loader 1 source Initial setup and disc copy protection o Loader 2 source The mode 7 screen set-up for the main game o Text tokens Elite's tokenised game text o Missile ship blueprint The ship blueprint for the missile o Loader 3 source The Saturn loading screen and main game loader o Main game docked code o Docked workspaces The main variable workspaces used when docked o Elite A docked source Part 1 of the main docked code o Elite B docked source Part 2 of the main docked code o Elite C docked source Part 3 of the main docked code o Elite D docked source Part 4 of the main docked code o Elite E docked source Part 5 of the main docked code o Elite F docked source Part 6 of the main docked code o Elite G docked source Part 7 of the main docked code o Elite H docked source Part 8 of the main docked code o Ship hangar blueprints Data for ships in the ship hangar o Main game flight code o Flight workspaces The main variable workspaces used in flight o Elite A flight source Part 1 of the main flight code o Elite B flight source Part 2 of the main flight code o Elite C flight source Part 3 of the main flight code o Elite D flight source Part 4 of the main flight code o Elite E flight source Part 5 of the main flight code o Elite F flight source Part 6 of the main flight code o Elite G flight source Part 7 of the main flight code o Elite H flight source Part 8 of the main flight code o Ship blueprint files o Ship blueprints A source The D.MOA ship blueprints file o Ship blueprints B source The D.MOB ship blueprints file o Ship blueprints C source The D.MOC ship blueprints file o Ship blueprints D source The D.MOD ship blueprints file o Ship blueprints E source The D.MOE ship blueprints file o Ship blueprints F source The D.MOF ship blueprints file o Ship blueprints G source The D.MOG ship blueprints file o Ship blueprints H source The D.MOH ship blueprints file o Ship blueprints I source The D.MOI ship blueprints file o Ship blueprints J source The D.MOJ ship blueprints file o Ship blueprints K source The D.MOK ship blueprints file o Ship blueprints L source The D.MOL ship blueprints file o Ship blueprints M source The D.MOM ship blueprints file o Ship blueprints N source The D.MON ship blueprints file o Ship blueprints O source The D.MOO ship blueprints file o Ship blueprints P source The D.MOP ship blueprints file + BBC Micro disc source code by category + Charts Long-range and short-range galactic charts o Subroutines o hm (Docked) Select the closest system and redraw the chart crosshairs o hm (Flight) Select the closest system and redraw the chart crosshairs o HME2 (Docked) Search the galaxy for a system o TT103 (Docked) Draw a small set of crosshairs on a chart o TT103 (Flight) Draw a small set of crosshairs on a chart o TT105 (Docked) Draw crosshairs on the Short-range Chart, with clipping o TT105 (Flight) Draw crosshairs on the Short-range Chart, with clipping o TT114 (Flight) Display either the Long-range or Short-range Chart o TT123 (Docked) Move galactic coordinates by a signed delta o TT123 (Flight) Move galactic coordinates by a signed delta o TT16 (Docked) Move the crosshairs on a chart o TT16 (Flight) Move the crosshairs on a chart o TT22 (Docked) Show the Long-range Chart (red key f4) o TT22 (Flight) Show the Long-range Chart (red key f4) o TT23 (Docked) Show the Short-range Chart (red key f5) o TT23 (Flight) Show the Short-range Chart (red key f5) + Copy protection Hiding the Elite code from prying eyes o Subroutines o BEGIN (Loader 1) Decrypt the loader code using a rolling EOR that uses the decryption routine itself to seed the decryption o CHECK (Loader 3) Calculate a checksum from two 256-byte portions of the loader code o LOAD (Loader 1) Load a hidden file from disc (not used in this version as disc protection is disabled) o LOAD (Loader 2) This code accesses the disc directly (not used in this version as disc protection is disabled) o LOADcode (Loader 2) LOAD routine, bundled up in the loader so it can be moved to &0400 to be run o OSBmod (Loader 3) Calculate a checksum on &0F00 to &0FFF (the test is disabled in this version) o PROT1 (Loader 3) Part of the CHKSM copy protection checksum calculation o PROT2 (Loader 3) Part of the CHKSM copy protection checksum calculation o PROT3 (Loader 3) Part of the CHKSM copy protection checksum calculation o Unused copy protection routine (Loader 2) This code doesn't appear to be run in this version o Variables o BLOCK (Loader 1) These bytes are copied and decrypted by the loader routine (not used in this version as disc protection is disabled) o Checksum (Docked) Contains a checksum at &55FF that is checked by the loader o PARAMS1 (Loader 1) OSWORD parameter block for accessing a specific track on the disc (not used in this version as disc protection is disabled) o PARAMS2 (Loader 1) OSWORD parameter block for accessing a specific track on the disc (not used in this version as disc protection is disabled) o PARAMS3 (Loader 1) OSWORD parameter block for loading the ELITE3 loader file (not used in this version as disc protection is disabled) + Dashboard The dials, 3D scanner and compass o Subroutines o ABORT (Docked) Disarm missiles and update the dashboard indicators o ABORT (Flight) Disarm missiles and update the dashboard indicators o ABORT2 (Docked) Set/unset the lock target for a missile and update the dashboard o ABORT2 (Flight) Set/unset the lock target for a missile and update the dashboard o BULB (Docked) Draw an indicator bulb on the dashboard o BULB (Flight) Draw an indicator bulb on the dashboard o BUMP2 (Docked) Bump up the value of the pitch or roll dashboard indicator o BUMP2 (Flight) Bump up the value of the pitch or roll dashboard indicator o cntr (Docked) Apply damping to the pitch or roll dashboard indicator o cntr (Flight) Apply damping to the pitch or roll dashboard indicator o COMPAS (Flight) Update the compass o DIALS (Part 1 of 4) (Docked) Update the dashboard: speed indicator o DIALS (Part 1 of 4) (Flight) Update the dashboard: speed indicator o DIALS (Part 2 of 4) (Docked) Update the dashboard: pitch and roll indicators o DIALS (Part 2 of 4) (Flight) Update the dashboard: pitch and roll indicators o DIALS (Part 3 of 4) (Docked) Update the dashboard: four energy banks o DIALS (Part 3 of 4) (Flight) Update the dashboard: four energy banks o DIALS (Part 4 of 4) (Docked) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIALS (Part 4 of 4) (Flight) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIL2 (Docked) Update the roll or pitch indicator on the dashboard o DIL2 (Flight) Update the roll or pitch indicator on the dashboard o DILX (Docked) Update a bar-based indicator on the dashboard o DILX (Flight) Update a bar-based indicator on the dashboard o DOT (Flight) Draw a dash on the compass o ECBLB (Flight) Light up the E.C.M. indicator bulb ("E") on the dashboard o ECBLB2 (Flight) Start up the E.C.M. (indicator, start countdown and make sound) o MSBAR (Docked) Draw a specific indicator in the dashboard's missile bar o MSBAR (Flight) Draw a specific indicator in the dashboard's missile bar o msblob (Docked) Display the dashboard's missile indicators in green o msblob (Flight) Display the dashboard's missile indicators in green o PZW (Docked) Fetch the current dashboard colours, to support flashing o PZW (Flight) Fetch the current dashboard colours, to support flashing o REDU2 (Docked) Reduce the value of the pitch or roll dashboard indicator o REDU2 (Flight) Reduce the value of the pitch or roll dashboard indicator o SCAN (Flight) Display the current ship on the scanner o SP1 (Flight) Draw the space station on the compass o SP2 (Flight) Draw a dot on the compass, given the planet/ station vector o SPBLB (Docked) Light up the space station indicator ("S") on the dashboard o SPBLB (Flight) Light up the space station indicator ("S") on the dashboard o WPSHPS (Docked) Clear the scanner, reset the ball line and sun line heaps o WPSHPS (Flight) Clear the scanner, reset the ball line and sun line heaps o Variables o ECBT (Flight) The character bitmap for the E.C.M. indicator bulb o SPBT (Docked) The bitmap definition for the space station indicator bulb o SPBT (Flight) The bitmap definition for the space station indicator bulb + Drawing circles Hyperspace tunnels, launch rings and planets o Subroutines o BLINE (Docked) Draw a circle segment and add it to the ball line heap o BLINE (Flight) Draw a circle segment and add it to the ball line heap o CHKON (Docked) Check whether any part of a circle appears on the extended screen o CHKON (Flight) Check whether any part of a circle appears on the extended screen o CIRCLE (Docked) Draw a circle for the planet o CIRCLE (Flight) Draw a circle for the planet o CIRCLE2 (Docked) Draw a circle (for the planet or chart) o CIRCLE2 (Flight) Draw a circle (for the planet or chart) o HFS2 (Docked) Draw the launch or hyperspace tunnel o HFS2 (Flight) Draw the launch or hyperspace tunnel o LAUN (Docked) Make the launch sound and draw the launch tunnel o LAUN (Flight) Make the launch sound and draw the launch tunnel o LL164 (Docked) Make the hyperspace sound and draw the hyperspace tunnel o LL164 (Flight) Make the hyperspace sound and draw the hyperspace tunnel o TT128 (Docked) Draw a circle on a chart o TT128 (Flight) Draw a circle on a chart o TT14 (Docked) Draw a circle with crosshairs on a chart o TT14 (Flight) Draw a circle with crosshairs on a chart + Drawing lines The core line-drawing routines o Subroutines o EDGES (Docked) Draw a horizontal line given a centre and a half-width o EDGES (Flight) Draw a horizontal line given a centre and a half-width o HLOIN (Docked) Draw a horizontal line from (X1, Y1) to (X2, Y1) o HLOIN (Flight) Draw a horizontal line from (X1, Y1) to (X2, Y1) o HLOIN2 (Docked) Remove a line from the sun line heap and draw it on-screen o HLOIN2 (Flight) Remove a line from the sun line heap and draw it on-screen o LASLI (Flight) Draw the laser lines for when we fire our lasers o LL118 (Docked) Move a point along a line until it is on-screen o LL118 (Flight) Move a point along a line until it is on-screen o LL145 (Part 1 of 4) (Docked) Clip line: Work out which end-points are on-screen, if any o LL145 (Part 1 of 4) (Flight) Clip line: Work out which end-points are on-screen, if any o LL145 (Part 2 of 4) (Docked) Clip line: Work out if any part of the line is on-screen o LL145 (Part 2 of 4) (Flight) Clip line: Work out if any part of the line is on-screen o LL145 (Part 3 of 4) (Docked) Clip line: Calculate the line's gradient o LL145 (Part 3 of 4) (Flight) Clip line: Calculate the line's gradient o LL145 (Part 4 of 4) (Docked) Clip line: Call the routine in LL188 to do the actual clipping o LL145 (Part 4 of 4) (Flight) Clip line: Call the routine in LL188 to do the actual clipping o LOIN (Part 1 of 7) (Docked) Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 1 of 7) (Flight) Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 2 of 7) (Docked) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 2 of 7) (Flight) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 3 of 7) (Docked) Draw a shallow line going right and up or left and down o LOIN (Part 3 of 7) (Flight) Draw a shallow line going right and up or left and down o LOIN (Part 4 of 7) (Docked) Draw a shallow line going right and down or left and up o LOIN (Part 4 of 7) (Flight) Draw a shallow line going right and down or left and up o LOIN (Part 5 of 7) (Docked) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 5 of 7) (Flight) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 6 of 7) (Docked) Draw a steep line going up and left or down and right o LOIN (Part 6 of 7) (Flight) Draw a steep line going up and left or down and right o LOIN (Part 7 of 7) (Docked) Draw a steep line going up and right or down and left o LOIN (Part 7 of 7) (Flight) Draw a steep line going up and right or down and left o NLIN (Docked) Draw a horizontal line at pixel row 23 to box in a title o NLIN (Flight) Draw a horizontal line at pixel row 23 to box in a title o NLIN2 (Docked) Draw a screen-wide horizontal line at the pixel row in A o NLIN2 (Flight) Draw a screen-wide horizontal line at the pixel row in A o NLIN3 (Docked) Print a title and a horizontal line at row 19 to box it in o NLIN3 (Flight) Print a title and a horizontal line at row 19 to box it in o NLIN4 (Docked) Draw a horizontal line at pixel row 19 to box in a title o NLIN4 (Flight) Draw a horizontal line at pixel row 19 to box in a title o TT15 (Docked) Draw a set of crosshairs o TT15 (Flight) Draw a set of crosshairs o Variables o TWFL (Docked) Ready-made character rows for the left end of a horizontal line in mode 4 o TWFL (Flight) Ready-made character rows for the left end of a horizontal line in mode 4 o TWFR (Docked) Ready-made character rows for the right end of a horizontal line in mode 4 o TWFR (Flight) Ready-made character rows for the right end of a horizontal line in mode 4 + Drawing pixels How to plot pixels in various colours o Subroutines o CPIX2 (Docked) Draw a single-height dash on the dashboard o CPIX2 (Flight) Draw a single-height dash on the dashboard o CPIX4 (Docked) Draw a double-height dot on the dashboard o CPIX4 (Flight) Draw a double-height dot on the dashboard o PIX (Loader 3) Draw a single pixel at a specific coordinate o PIXEL (Docked) Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o PIXEL (Flight) Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o PIXEL2 (Docked) Draw a stardust particle relative to the screen centre o PIXEL2 (Flight) Draw a stardust particle relative to the screen centre o PX3 (Docked) Plot a single pixel at (X, Y) within a character block o PX3 (Flight) Plot a single pixel at (X, Y) within a character block o Variables o CTWOS (Docked) Ready-made single-pixel character row bytes for mode 5 o CTWOS (Flight) Ready-made single-pixel character row bytes for mode 5 o TWOS (Docked) Ready-made single-pixel character row bytes for mode 4 o TWOS (Flight) Ready-made single-pixel character row bytes for mode 4 o TWOS (Loader 3) Ready-made single-pixel character row bytes for mode 4 o TWOS2 (Docked) Ready-made double-pixel character row bytes for mode 4 o TWOS2 (Flight) Ready-made double-pixel character row bytes for mode 4 + Drawing planets Planets with meridians and craters o Subroutines o PL2 (Flight) Remove the planet or sun from the screen o PL21 (Docked) Return from a planet/sun-drawing routine with a failure flag o PL21 (Flight) Return from a planet/sun-drawing routine with a failure flag o PL9 (Part 1 of 3) (Flight) Draw the planet, with either an equator and meridian, or a crater o PL9 (Part 2 of 3) (Flight) Draw the planet's equator and meridian o PL9 (Part 3 of 3) (Flight) Draw the planet's crater o PLANET (Flight) Draw the planet or sun o PLL1 (Loader 3) Draw Saturn on the loading screen o PLS1 (Flight) Calculate (Y A) = nosev_x / z o PLS2 (Flight) Draw a half-ellipse o PLS22 (Flight) Draw an ellipse or half-ellipse o PLS3 (Flight) Calculate (Y A P) = 222 * roofv_x / z o PLS4 (Flight) Calculate CNT2 = arctan(P / A) / 4 o PLS5 (Flight) Calculate roofv_x / z and roofv_y / z o PLS6 (Flight) Calculate (X K) = (A P) / (z_sign z_hi z_lo) o WP1 (Docked) Reset the ball line heap o WP1 (Flight) Reset the ball line heap o WPLS2 (Flight) Remove the planet from the screen o Variables o CNT (Loader 3) A counter for use in drawing Saturn's planetary body o CNT2 (Loader 3) A counter for use in drawing Saturn's background stars o CNT3 (Loader 3) A counter for use in drawing Saturn's rings o RAND (Loader 3) The random number seed used for drawing Saturn + Drawing ships The celebrated 3D ship plotting process o Subroutines o DOEXP (Docked) Draw an exploding ship o DOEXP (Flight) Draw an exploding ship o LL9 (Part 1 of 12) (Docked) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 1 of 12) (Flight) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 2 of 12) (Docked) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 2 of 12) (Flight) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 3 of 12) (Docked) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 3 of 12) (Flight) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 4 of 12) (Docked) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 4 of 12) (Flight) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 5 of 12) (Docked) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 5 of 12) (Flight) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 6 of 12) (Docked) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 6 of 12) (Flight) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) (Docked) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) (Flight) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 8 of 12) (Docked) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 8 of 12) (Flight) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 9 of 12) (Docked) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 9 of 12) (Flight) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 10 of 12) (Docked) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 10 of 12) (Flight) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 11 of 12) (Docked) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 11 of 12) (Flight) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 12 of 12) (Docked) Draw ship: Draw all the visible edges from the ship line heap o LL9 (Part 12 of 12) (Flight) Draw ship: Draw all the visible edges from the ship line heap o PROJ (Flight) Project the current ship onto the screen o SHPPT (Docked) Draw a distant ship as a point in the middle of the screen o SHPPT (Flight) Draw a distant ship as a point rather than a full wireframe o Variables o E% (Docked) Ship blueprints default NEWB flags for the ship hangar o E% (Ship blueprints A) Ship blueprints default NEWB flags for the D.MOA file o E% (Ship blueprints B) Ship blueprints default NEWB flags for the D.MOB file o E% (Ship blueprints C) Ship blueprints default NEWB flags for the D.MOC file o E% (Ship blueprints D) Ship blueprints default NEWB flags for the D.MOD file o E% (Ship blueprints E) Ship blueprints default NEWB flags for the D.MOE file o E% (Ship blueprints F) Ship blueprints default NEWB flags for the D.MOF file o E% (Ship blueprints G) Ship blueprints default NEWB flags for the D.MOG file o E% (Ship blueprints H) Ship blueprints default NEWB flags for the D.MOH file o E% (Ship blueprints I) Ship blueprints default NEWB flags for the D.MOI file o E% (Ship blueprints J) Ship blueprints default NEWB flags for the D.MOJ file o E% (Ship blueprints K) Ship blueprints default NEWB flags for the D.MOK file o E% (Ship blueprints L) Ship blueprints default NEWB flags for the D.MOL file o E% (Ship blueprints M) Ship blueprints default NEWB flags for the D.MOM file o E% (Ship blueprints N) Ship blueprints default NEWB flags for the D.MON file o E% (Ship blueprints O) Ship blueprints default NEWB flags for the D.MOO file o E% (Ship blueprints P) Ship blueprints default NEWB flags for the D.MOP file o SHIP_ADDER (Ship blueprints B) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints G) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints I) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints M) Ship blueprint for an Adder o SHIP_ANACONDA (Ship blueprints L) Ship blueprint for an Anaconda o SHIP_ASP_MK_2 (Ship blueprints N) Ship blueprint for an Asp Mk II o SHIP_ASP_MK_2 (Ship blueprints P) Ship blueprint for an Asp Mk II o SHIP_ASTEROID (Ship blueprints C) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints D) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints H) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints K) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints N) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints O) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints P) Ship blueprint for an asteroid o SHIP_BOA (Ship blueprints C) Ship blueprint for a Boa o SHIP_BOA (Ship blueprints F) Ship blueprint for a Boa o SHIP_BOULDER (Ship blueprints B) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints E) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints F) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints G) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints P) Ship blueprint for a boulder o SHIP_CANISTER (Docked) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints A) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints B) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints C) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints D) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints E) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints F) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints G) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints H) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints I) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints J) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints K) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints L) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints M) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints N) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints O) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints P) Ship blueprint for a cargo canister o SHIP_COBRA_MK_1 (Ship blueprints D) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints E) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints J) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints K) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints M) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints O) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_3 (Docked) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints B) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints C) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints D) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints E) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints F) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints G) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints K) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints L) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints N) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints O) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints P) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3_P (Ship blueprints A) Ship blueprint for a Cobra Mk III (pirate) o SHIP_COBRA_MK_3_P (Ship blueprints H) Ship blueprint for a Cobra Mk III (pirate) o SHIP_COBRA_MK_3_P (Ship blueprints I) Ship blueprint for a Cobra Mk III (pirate) o SHIP_COBRA_MK_3_P (Ship blueprints J) Ship blueprint for a Cobra Mk III (pirate) o SHIP_COBRA_MK_3_P (Ship blueprints M) Ship blueprint for a Cobra Mk III (pirate) o SHIP_CONSTRICTOR (Docked) Ship blueprint for a Constrictor o SHIP_CONSTRICTOR (Ship blueprints G) Ship blueprint for a Constrictor o SHIP_CORIOLIS (Ship blueprints A) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints C) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints E) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints G) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints I) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints K) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints M) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints O) Ship blueprint for a Coriolis space station o SHIP_DODO (Ship blueprints B) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints D) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints F) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints H) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints J) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints L) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints N) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints P) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_ESCAPE_POD (Ship blueprints A) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints B) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints C) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints D) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints E) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints F) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints G) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints H) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints I) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints J) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints K) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints L) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints N) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints O) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints P) Ship blueprint for an escape pod o SHIP_FER_DE_LANCE (Ship blueprints A) Ship blueprint for a Fer-de-Lance o SHIP_FER_DE_LANCE (Ship blueprints L) Ship blueprint for a Fer-de-Lance o SHIP_GECKO (Ship blueprints D) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints E) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints F) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints J) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints K) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints M) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints N) Ship blueprint for a Gecko o SHIP_KRAIT (Docked) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints A) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints B) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints C) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints E) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints G) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints H) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints I) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints J) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints M) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints N) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints O) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints P) Ship blueprint for a Krait o SHIP_MAMBA (Ship blueprints A) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints B) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints E) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints G) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints I) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints J) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints L) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints M) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints O) Ship blueprint for a Mamba o SHIP_MISSILE (Missile ship blueprint) Ship blueprint for a missile o SHIP_MORAY (Ship blueprints K) Ship blueprint for a Moray o SHIP_PLATE (Ship blueprints A) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints B) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints E) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints G) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints I) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints J) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints O) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints P) Ship blueprint for an alloy plate o SHIP_PYTHON (Docked) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints A) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints H) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints K) Ship blueprint for a Python o SHIP_PYTHON_P (Ship blueprints I) Ship blueprint for a Python (pirate) o SHIP_PYTHON_P (Ship blueprints O) Ship blueprint for a Python (pirate) o SHIP_SHUTTLE (Docked) Ship blueprint for a Shuttle o SHIP_SHUTTLE (Ship blueprints H) Ship blueprint for a Shuttle o SHIP_SIDEWINDER (Ship blueprints A) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints C) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints D) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints E) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints F) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints H) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints I) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints J) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints K) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints L) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints M) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints N) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints P) Ship blueprint for a Sidewinder o SHIP_SPLINTER (Ship blueprints C) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints D) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints H) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints K) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints N) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints O) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints P) Ship blueprint for a splinter o SHIP_THARGOID (Ship blueprints C) Ship blueprint for a Thargoid mothership o SHIP_THARGOID (Ship blueprints D) Ship blueprint for a Thargoid mothership o SHIP_THARGON (Ship blueprints C) Ship blueprint for a Thargon o SHIP_THARGON (Ship blueprints D) Ship blueprint for a Thargon o SHIP_TRANSPORTER (Docked) Ship blueprint for a Transporter o SHIP_TRANSPORTER (Ship blueprints F) Ship blueprint for a Transporter o SHIP_VIPER (Docked) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints A) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints B) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints C) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints D) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints E) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints F) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints G) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints H) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints I) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints J) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints K) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints L) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints M) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints N) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints O) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints P) Ship blueprint for a Viper o SHIP_WORM (Ship blueprints B) Ship blueprint for a Worm o SHIP_WORM (Ship blueprints L) Ship blueprint for a Worm o XX21 (Docked) Ship blueprints lookup table for the ship hangar o XX21 (Ship blueprints A) Ship blueprints lookup table for the D.MOA file o XX21 (Ship blueprints B) Ship blueprints lookup table for the D.MOB file o XX21 (Ship blueprints C) Ship blueprints lookup table for the D.MOC file o XX21 (Ship blueprints D) Ship blueprints lookup table for the D.MOD file o XX21 (Ship blueprints E) Ship blueprints lookup table for the D.MOE file o XX21 (Ship blueprints F) Ship blueprints lookup table for the D.MOF file o XX21 (Ship blueprints G) Ship blueprints lookup table for the D.MOG file o XX21 (Ship blueprints H) Ship blueprints lookup table for the D.MOH file o XX21 (Ship blueprints I) Ship blueprints lookup table for the D.MOI file o XX21 (Ship blueprints J) Ship blueprints lookup table for the D.MOJ file o XX21 (Ship blueprints K) Ship blueprints lookup table for the D.MOK file o XX21 (Ship blueprints L) Ship blueprints lookup table for the D.MOL file o XX21 (Ship blueprints M) Ship blueprints lookup table for the D.MOM file o XX21 (Ship blueprints N) Ship blueprints lookup table for the D.MON file o XX21 (Ship blueprints O) Ship blueprints lookup table for the D.MOO file o XX21 (Ship blueprints P) Ship blueprints lookup table for the D.MOP file o Macros o EDGE (Docked) Macro definition for adding edges to ship blueprints o EDGE (Missile ship blueprint) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints A) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints B) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints C) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints D) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints E) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints F) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints G) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints H) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints I) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints J) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints K) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints L) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints M) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints N) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints O) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints P) Macro definition for adding edges to ship blueprints o FACE (Docked) Macro definition for adding faces to ship blueprints o FACE (Missile ship blueprint) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints A) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints B) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints C) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints D) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints E) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints F) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints G) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints H) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints I) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints J) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints K) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints L) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints M) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints N) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints O) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints P) Macro definition for adding faces to ship blueprints o VERTEX (Docked) Macro definition for adding vertices to ship blueprints o VERTEX (Missile ship blueprint) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints A) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints B) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints C) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints D) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints E) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints F) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints G) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints H) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints I) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints J) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints K) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints L) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints M) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints N) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints O) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints P) Macro definition for adding vertices to ship blueprints + Drawing suns The epic, shimmering Elite sun o Subroutines o FLFLLS (Docked) Reset the sun line heap o FLFLLS (Flight) Reset the sun line heap o SUN (Part 1 of 4) (Docked) Draw the sun: Set up all the variables needed o SUN (Part 1 of 4) (Flight) Draw the sun: Set up all the variables needed o SUN (Part 2 of 4) (Docked) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 2 of 4) (Flight) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 3 of 4) (Docked) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 3 of 4) (Flight) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 4 of 4) (Docked) Draw the sun: Continue to the top of the screen, erasing old sun o SUN (Part 4 of 4) (Flight) Draw the sun: Continue to the top of the screen, erasing old sun o WPLS (Docked) Remove the sun from the screen o WPLS (Flight) Remove the sun from the screen + Equipment Buying and selling weapons and ship upgrades o Subroutines o eq (Docked) Subtract the price of equipment from the cash pot o EQSHP (Docked) Show the Equip Ship screen (red key f3) o prx (Docked) Return the price of a piece of equipment o qv (Docked) Print a menu of the four space views, for buying lasers o refund (Docked) Install a new laser, processing a refund if applicable o Variables o PRXS (Docked) Equipment prices + Flight Docking, hyperspace, views, shields and more o Subroutines o DCS1 (Flight) Calculate the vector from the ideal docking position to the ship o DENGY (Docked) Drain some energy from the energy banks o DENGY (Flight) Drain some energy from the energy banks o DOCKIT (Flight) Apply docking manoeuvres to the ship in INWK o DOENTRY (Docked) Dock at the space station, show the ship hangar and work out any mission progression o ESCAPE (Flight) Launch our escape pod o Ghy (Docked) Perform a galactic hyperspace jump o Ghy (Flight) Perform a galactic hyperspace jump o hyp (Docked) Start the hyperspace process o hyp (Flight) Start the hyperspace process o LOOK1 (Flight) Initialise the space view o MJP (Flight) Process a mis-jump into witchspace o OOPS (Flight) Take some damage o OUCH (Flight) Potentially lose cargo or equipment following damage o PU1 (Flight) Flip the coordinate axes for the four different views o SESCP (Flight) Spawn an escape pod from the current (parent) ship o SHD (Docked) Charge a shield and drain some energy from the energy banks o SHD (Flight) Charge a shield and drain some energy from the energy banks o SIGHT (Docked) Draw the laser crosshairs o SIGHT (Flight) Draw the laser crosshairs o TT110 (Docked) Launch from a station or show the front space view o TT110 (Flight) Launch from a station or show the front space view o TT18 (Flight) Try to initiate a jump into hyperspace o TTX110 (Docked) Set the current system to the nearest system and return to hyp o TTX110 (Flight) Set the current system to the nearest system and return to hyp o WARP (Flight) Perform an in-system jump o wW (Docked) Start a hyperspace countdown o wW (Flight) Start a hyperspace countdown + Inventory Showing the contents of the hold o Subroutines o TT210 (Docked) Show a list of current cargo in our hold, optionally to sell o TT210 (Flight) Show a list of current cargo in our hold, optionally to sell o TT213 (Docked) Show the Inventory screen (red key f9) o TT213 (Flight) Show the Inventory screen (red key f9) o TT214 (Docked) Ask a question with a "Y/N?" prompt and return the response + Keyboard Processing key presses and joysticks o Subroutines o CTRL (Docked) Scan the keyboard to see if CTRL is currently pressed o CTRL (Flight) Scan the keyboard to see if CTRL is currently pressed o DK4 (Docked) Scan for pause, configuration and secondary flight keys o DK4 (Flight) Scan for pause, configuration and secondary flight keys o DKJ1 (Docked) Read joystick and flight controls o DKJ1 (Flight) Read joystick and flight controls o DKS1 (Flight) Scan the keyboard for a flight key o DKS2 (Docked) Read the joystick position o DKS2 (Flight) Read the joystick position o DKS3 (Docked) Toggle a configuration setting and emit a beep o DKS3 (Flight) Toggle a configuration setting and emit a beep o DKS4 (Docked) Scan the keyboard to see if a specific key is being pressed o DKS4 (Flight) Scan the keyboard to see if a specific key is being pressed o DOKEY (Docked) Scan for the joystick o DOKEY (Flight) Scan for the seven primary flight controls o FLKB (Docked) Flush the keyboard buffer o FLKB (Flight) Flush the keyboard buffer o PAS1 (Docked) Display a rotating ship at space coordinates (0, 112, 256) and scan the keyboard o PAUSE (Docked) Display a rotating ship, waiting until a key is pressed, then remove the ship from the screen o PAUSE2 (Docked) Wait until a key is pressed, ignoring any existing key press o RDKEY (Docked) Scan the keyboard for key presses o RDKEY (Flight) Scan the keyboard for key presses o TT102 (Docked) Process function key, save key, hyperspace and chart key presses o TT102 (Flight) Process function key, save key, hyperspace and chart key presses and update the hyperspace counter o TT17 (Docked) Scan the keyboard for cursor key or joystick movement o TT17 (Flight) Scan the keyboard for cursor key or joystick movement o TT217 (Docked) Scan the keyboard until a key is pressed o U% (Flight) Clear the key logger o Variables o KYTB (Flight) Lookup table for in-flight keyboard controls + Loader The loading screen and system setup o Subroutines o BEGIN (Docked) Initialise the configuration variables and start the game o BRBR1 (Loader 3) Loader break handler: print a newline and the error message, and then hang the computer o DOBEGIN (Docked) Decrypt the main docked code, initialise the configuration variables and start the game o DOENTRY (Flight) Load and run the docked code o Elite loader (Loader 1) Reset vectors, change to mode 7, and load and run the ELITE3 loader o Elite loader (Part 1 of 2) (Loader 2) Various copy protection checks, and make sure there is no Tube o Elite loader (Part 1 of 3) (Loader 3) Set up the split screen mode, move code around, set up the sound envelopes and configure the system o Elite loader (Part 2 of 2) (Loader 2) Load and run the ELITE4 loader o Elite loader (Part 2 of 3) (Loader 3) Include binaries for recursive tokens, Missile blueprint and images o Elite loader (Part 3 of 3) (Loader 3) Include binaries for the loading screen images o INBAY (Docked) This routine is unused and is never run o INBAY (Flight) Load and run the main docked code in T.CODE o LOAD (Loader 3) Load the main docked code, set up various vectors, run a checksum and start the game o LOADcode (Loader 3) Encrypted LOAD routine, bundled up in the loader so it can be moved to &0B00 to be run o LOADSCR (Loader 2) Show the mode 7 Acornsoft loading screen o LOGOS (Loader 2) Print a large Acornsoft logo as part of the loading screen o LSHIPS (Flight) Load a new ship blueprints file o PROT1 (Loader 2) Various copy protection shenanigans in preparation for showing the Acornspft loading screen o prstr (Loader 2) Print the NOP-terminated string immediately following the JSR instruction that called the routine o RSHIPS (Flight) Launch from the station, load a new set of ship blueprints and jump into the main game loop o SCRAM (Docked) Decrypt the main docked code, reset the flight variables and start the game o scramble (Docked) Decrypt the main docked code between & 1300 and &5FFF and the main game loop o scramble (Flight) Decrypt the main flight code between & 1300 and &55FF and jump into the main game loop o TVT1code (Loader 3) Code block at &1100-&11E2 that remains resident in both docked and flight mode (palettes, screen mode routine and commander data) o Variables o ECHAR (Loader 2) Character definitions for the Electron to mimic the graphics characters of the BBC Micro's mode 7 teletext screen o LOGO (Loader 2) Tables containing the Acornsoft logo for the BBC Micro and Acorn Electron o LTLI (Flight) The OS command string for loading the docked code in file T.CODE o MESS1 (Loader 1) The OS command string for switching to the disc filing system o MESS1 (Loader 2) The OS command string for loading the ELITE4 loader o MESS1 (Loader 3) The OS command string for changing the disc directory to E o MESS2 (Loader 1) The OS command string for loading the the ELITE3 binary o RDLI (Docked) The OS command string for running the flight code in file D.CODE o SHIPI (Flight) The OS command string for loading a ship blueprints file + Main loop The core loop that runs Elite o Subroutines o Main flight loop (Part 1 of 16) (Flight) Seed the random number generator o Main flight loop (Part 2 of 16) (Flight) Calculate the alpha and beta angles from the current pitch and roll of our ship o Main flight loop (Part 3 of 16) (Flight) Scan for flight keys and process the results o Main flight loop (Part 4 of 16) (Flight) For each nearby ship: Copy the ship's data block from K% to the zero-page workspace at INWK o Main flight loop (Part 5 of 16) (Flight) For each nearby ship: If an energy bomb has been set off, potentially kill this ship o Main flight loop (Part 6 of 16) (Flight) For each nearby ship: Move the ship in space and copy the updated INWK data block back to K% o Main flight loop (Part 7 of 16) (Flight) For each nearby ship: Check whether we are docking, scooping or colliding with it o Main flight loop (Part 8 of 16) (Flight) For each nearby ship: Process us potentially scooping this item o Main flight loop (Part 9 of 16) (Flight) For each nearby ship: If it is a space station, check whether we are successfully docking with it o Main flight loop (Part 10 of 16) (Flight) For each nearby ship: Remove if scooped, or process collisions o Main flight loop (Part 11 of 16) (Flight) For each nearby ship: Process missile lock and firing our laser o Main flight loop (Part 12 of 16) (Flight) For each nearby ship: Draw the ship, remove if killed, loop back o Main flight loop (Part 13 of 16) (Flight) Show energy bomb effect, charge shields and energy banks o Main flight loop (Part 14 of 16) (Flight) Spawn a space station if we are close enough to the planet o Main flight loop (Part 15 of 16) (Flight) Perform altitude checks with the planet and sun and process fuel scooping if appropriate o Main flight loop (Part 16 of 16) (Flight) Process laser pulsing, E.C.M. energy drain, call stardust routine o Main game loop (Part 1 of 6) (Flight) Spawn a trader (a Cobra Mk III, Python, Boa or Anaconda) o Main game loop (Part 2 of 6) (Docked) Potentially spawn a trader, an asteroid, or a cargo canister (though this has no effect when docked) o Main game loop (Part 2 of 6) (Flight) Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister o Main game loop (Part 3 of 6) (Flight) Potentially spawn a cop, particularly if we've been bad o Main game loop (Part 4 of 6) (Flight) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates o Main game loop (Part 5 of 6) (Docked) Cool down lasers, make calls to update the dashboard o Main game loop (Part 5 of 6) (Flight) Cool down lasers, make calls to update the dashboard o Main game loop (Part 6 of 6) (Docked) Process non-flight key presses (red function keys, docked keys) o Main game loop (Part 6 of 6) (Flight) Process non-flight key presses (red function keys, docked keys) + Market Prices, availability, selling and buying cargo o Subroutines o gnum (Docked) Get a number from the keyboard o NWDAV4 (Docked) Print an "ITEM?" error, make a beep and rejoin the TT210 routine o tnpr (Docked) Work out if we have space for a specific amount of cargo o tnpr (Flight) Work out if we have space for a specific amount of cargo o tnpr1 (Flight) Work out if we have space for one tonne of cargo o TT151 (Docked) Print the name, price and availability of a market item o TT151 (Flight) Print the name, price and availability of a market item o TT152 (Docked) Print the unit ("t", "kg" or "g") for a market item o TT152 (Flight) Print the unit ("t", "kg" or "g") for a market item o TT160 (Docked) Print "t" (for tonne) and a space o TT160 (Flight) Print "t" (for tonne) and a space o TT161 (Docked) Print "kg" (for kilograms) o TT161 (Flight) Print "kg" (for kilograms) o TT163 (Docked) Print the headers for the table of market prices o TT163 (Flight) Print the headers for the table of market prices o TT167 (Docked) Show the Market Price screen (red key f7) o TT167 (Flight) Show the Market Price screen (red key f7) o TT16a (Docked) Print "g" (for grams) o TT16a (Flight) Print "g" (for grams) o TT208 (Docked) Show the Sell Cargo screen (red key f2) o TT219 (Docked) Show the Buy Cargo screen (red key f1) o var (Docked) Calculate QQ19+3 = economy * | economic_factor| o var (Flight) Calculate QQ19+3 = economy * | economic_factor| o Variables o QQ23 (Docked) Market prices table o QQ23 (Flight) Market prices table o Macros o ITEM (Docked) Macro definition for the market prices table o ITEM (Flight) Macro definition for the market prices table + Maths (Arithmetic) Addition, subtraction, multiplication, division o Subroutines o ADD (Docked) Calculate (A X) = (A P) + (S R) o ADD (Flight) Calculate (A X) = (A P) + (S R) o DV41 (Docked) Calculate (P R) = 256 * DELTA / A o DV41 (Flight) Calculate (P R) = 256 * DELTA / A o DV42 (Docked) Calculate (P R) = 256 * DELTA / z_hi o DV42 (Flight) Calculate (P R) = 256 * DELTA / z_hi o DVID3B2 (Docked) Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID3B2 (Flight) Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID4 (Docked) Calculate (P R) = 256 * A / Q o DVID4 (Flight) Calculate (P R) = 256 * A / Q o DVIDT (Docked) Calculate (P+1 A) = (A P) / Q o DVIDT (Flight) Calculate (P+1 A) = (A P) / Q o FMLTU (Docked) Calculate A = A * Q / 256 o FMLTU (Flight) Calculate A = A * Q / 256 o FMLTU2 (Docked) Calculate A = K * sin(A) o FMLTU2 (Flight) Calculate A = K * sin(A) o GC2 (Docked) Calculate (Y X) = (A P) * 4 o GC2 (Flight) Calculate (Y X) = (A P) * 4 o GCASH (Docked) Calculate (Y X) = P * Q * 4 o GCASH (Flight) Calculate (Y X) = P * Q * 4 o LCASH (Docked) Subtract an amount of cash from the cash pot o LL120 (Docked) Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL120 (Flight) Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL123 (Docked) Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL123 (Flight) Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL129 (Docked) Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL129 (Flight) Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL28 (Docked) Calculate R = 256 * A / Q o LL28 (Flight) Calculate R = 256 * A / Q o LL38 (Docked) Calculate (S A) = (S R) + (A Q) o LL38 (Flight) Calculate (S A) = (S R) + (A Q) o LL5 (Docked) Calculate Q = SQRT(R Q) o LL5 (Flight) Calculate Q = SQRT(R Q) o LL61 (Docked) Calculate (U R) = 256 * A / Q o LL61 (Flight) Calculate (U R) = 256 * A / Q o LL62 (Docked) Calculate 128 - (U R) o LL62 (Flight) Calculate 128 - (U R) o MAD (Docked) Calculate (A X) = Q * A + (S R) o MAD (Flight) Calculate (A X) = Q * A + (S R) o MAS3 (Flight) Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block o MCASH (Docked) Add an amount of cash to the cash pot o MCASH (Flight) Add an amount of cash to the cash pot o MLS1 (Flight) Calculate (A P) = ALP1 * A o MLS2 (Docked) Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLS2 (Flight) Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLTU2 (Docked) Calculate (A P+1 P) = (A ~P) * Q o MLTU2 (Flight) Calculate (A P+1 P) = (A ~P) * Q o MLU1 (Docked) Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust o MLU1 (Flight) Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust o MLU2 (Docked) Calculate (A P) = |A| * Q o MLU2 (Flight) Calculate (A P) = |A| * Q o MU1 (Docked) Copy X into P and A, and clear the C flag o MU1 (Flight) Copy X into P and A, and clear the C flag o MU11 (Docked) Calculate (A P) = P * X o MU11 (Flight) Calculate (A P) = P * X o MU5 (Docked) Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU5 (Flight) Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU6 (Docked) Set P(1 0) = (A A) o MU6 (Flight) Set P(1 0) = (A A) o MULT1 (Docked) Calculate (A P) = Q * A o MULT1 (Flight) Calculate (A P) = Q * A o MULT12 (Docked) Calculate (S R) = Q * A o MULT12 (Flight) Calculate (S R) = Q * A o MULT3 (Flight) Calculate K(3 2 1 0) = (A P+1 P) * Q o MULTU (Docked) Calculate (A P) = P * Q o MULTU (Flight) Calculate (A P) = P * Q o MUT1 (Docked) Calculate R = XX and (A P) = Q * A o MUT1 (Flight) Calculate R = XX and (A P) = Q * A o MUT2 (Docked) Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT2 (Flight) Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT3 (Docked) Unused routine that does the same as MUT2 o MUT3 (Flight) Unused routine that does the same as MUT2 o PIX1 (Docked) Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o PIX1 (Flight) Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o ROOT (Loader 3) Calculate ZP = SQRT(ZP(1 0)) o SPS2 (Flight) Calculate (Y X) = A / 10 o SQUA (Docked) Clear bit 7 of A and calculate (A P) = A * A o SQUA (Flight) Clear bit 7 of A and calculate (A P) = A * A o SQUA2 (Docked) Calculate (A P) = A * A o SQUA2 (Flight) Calculate (A P) = A * A o SQUA2 (Loader 3) Calculate (A P) = A * A o TAS1 (Flight) Calculate K3 = (x_sign x_hi x_lo) - V(1 0) o TIS1 (Docked) Calculate (A ?) = (-X * A + (S R)) / 96 o TIS1 (Flight) Calculate (A ?) = (-X * A + (S R)) / 96 o TIS2 (Docked) Calculate A = A / Q o TIS2 (Flight) Calculate A = A / Q o TIS3 (Docked) Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o TIS3 (Flight) Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o Unused duplicate of MULTU (Docked) Unused duplicate of the MULTU routine o Unused duplicate of MULTU (Flight) Unused duplicate of the MULTU routine o VCSU1 (Flight) Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station o VCSUB (Flight) Calculate vector K3(8 0) = [x y z] - coordinates in (A V) + Maths (Geometry) Vectors, coordinates, dot products and matrices o Subroutines o ARCTAN (Flight) Calculate A = arctan(P / Q) o FAROF (Flight) Compare x_hi, y_hi and z_hi with 224 o FAROF2 (Flight) Compare x_hi, y_hi and z_hi with A o LL51 (Docked) Calculate the dot product of XX15 and XX16 o LL51 (Flight) Calculate the dot product of XX15 and XX16 o MAS1 (Flight) Add an orientation vector coordinate to an INWK coordinate o MAS2 (Flight) Calculate a cap on the maximum distance to the planet or sun o MAS4 (Flight) Calculate a cap on the maximum distance to a ship o NORM (Docked) Normalise the three-coordinate vector in XX15 o NORM (Flight) Normalise the three-coordinate vector in XX15 o SPS1 (Docked) Calculate the vector to the planet and store it in XX15 o SPS1 (Flight) Calculate the vector to the planet and store it in XX15 o SPS3 (Docked) Copy a space coordinate from the K% block into K3 o SPS3 (Flight) Copy a space coordinate from the K% block into K3 o SPS4 (Flight) Calculate the vector to the space station o TAS2 (Docked) Normalise the three-coordinate vector in K3 o TAS2 (Flight) Normalise the three-coordinate vector in K3 o TAS3 (Docked) Calculate the dot product of XX15 and an orientation vector o TAS3 (Flight) Calculate the dot product of XX15 and an orientation vector o TAS4 (Flight) Calculate the dot product of XX15 and one of the space station's orientation vectors o TAS6 (Flight) Negate the vector in XX15 so it points in the opposite direction o TIDY (Docked) Orthonormalise the orientation vectors for a ship o TIDY (Flight) Orthonormalise the orientation vectors for a ship o Variables o ACT (Text tokens) Arctan table o SNE (Text tokens) Sine/cosine table + Missions Only in the enhanced versions of Elite o Subroutines o BRIEF (Docked) Start mission 1 and show the mission briefing o BRIEF2 (Docked) Start mission 2 o BRIEF3 (Docked) Receive the briefing and plans for mission 2 o BRIS (Docked) Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds o BRP (Docked) Print an extended token and show the Status Mode screen o DEBRIEF (Docked) Finish mission 1 o DEBRIEF2 (Docked) Finish mission 2 o THERE (Flight) Check whether we are in the Constrictor's system in mission 1 + Moving Moving and rotating ships and planets in space o Subroutines o MV40 (Flight) Rotate the planet or sun's location in space by the amount of pitch and roll of our ship o MVEIT (Part 1 of 9) (Docked) Move current ship: Tidy the orientation vectors o MVEIT (Part 1 of 9) (Flight) Move current ship: Tidy the orientation vectors o MVEIT (Part 2 of 9) (Flight) Move current ship: Call tactics routine, remove ship from scanner o MVEIT (Part 3 of 9) (Flight) Move current ship: Move ship forward according to its speed o MVEIT (Part 4 of 9) (Flight) Move current ship: Apply acceleration to ship's speed as a one-off o MVEIT (Part 5 of 9) (Flight) Move current ship: Rotate ship's location by our pitch and roll o MVEIT (Part 6 of 9) (Flight) Move current ship: Move the ship in space according to our speed o MVEIT (Part 7 of 9) (Docked) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 7 of 9) (Flight) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 8 of 9) (Docked) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 8 of 9) (Flight) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 9 of 9) (Docked) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVEIT (Part 9 of 9) (Flight) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVS4 (Docked) Apply pitch and roll to an orientation vector o MVS4 (Flight) Apply pitch and roll to an orientation vector o MVS5 (Docked) Apply a 3.6 degree pitch or roll to an orientation vector o MVS5 (Flight) Apply a 3.6 degree pitch or roll to an orientation vector o MVT1 (Docked) Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT1 (Flight) Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT3 (Docked) Calculate K(3 2 1) = (x_sign x_hi x_lo) + K (3 2 1) o MVT3 (Flight) Calculate K(3 2 1) = (x_sign x_hi x_lo) + K (3 2 1) o MVT6 (Docked) Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o MVT6 (Flight) Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o SFS2 (Flight) Move a ship in space along one of the coordinate axes + Save and load Commander files and competition codes o Subroutines o BRKBK (Docked) Set the standard BRKV handler for the game o CAT (Docked) Catalogue a disc, wait for a key press and display the disc access menu o CATD (Loader 3) Load disc sectors 0 and 1 to &0E00 and & 0F00 respectively o CATDcode (Loader 3) The CATD routine, bundled up in the loader so it can be moved to &0D7A to be run o CATS (Docked) Ask for a disc drive number and print a catalogue of that drive o CHECK (Docked) Calculate the checksum for the last saved commander data block o DELT (Docked) Catalogue a disc, ask for a filename to delete, and delete the file o GTDRV (Docked) Get an ASCII disc drive drive number from the keyboard o GTNMEW (Docked) Fetch the name of a commander file to save or load o LOD (Docked) Load a commander file o MEBRK (Docked) The BRKV handler for disc access operations o QUS1 (Docked) Save or load the commander file o retry (Docked) Scan the keyboard until a key is pressed and display the disc access menu o SVE (Docked) Save the commander file o TR1 (Docked) Copy the last saved commander's name from NA% to INWK o TRNME (Docked) Copy the last saved commander's name from INWK to NA% o Variables o CHK (Loader 3) First checksum byte for the saved commander data file o CHK2 (Loader 3) Second checksum byte for the saved commander data file o CTLI (Docked) The OS command string for cataloguing a disc o DELI (Docked) The OS command string for deleting a file o NA% (Loader 3) The data block for the last saved commander o S1% (Loader 3) The drive and directory number used when saving or loading a commander file o stack (Docked) Temporary storage for the stack pointer when switching the BRKV handler between BRBR and MEBRK + Screen mode Elite's famous split-screen mode o Subroutines o DET1 (Docked) Show or hide the dashboard (for when we die) o DET1 (Flight) Show or hide the dashboard (for when we die) o IRQ1 (Loader 3) The main screen-mode interrupt handler (IRQ1V points here) o WSCAN (Docked) Wait for the vertical sync o WSCAN (Flight) Wait for the vertical sync o Variables o B% (Loader 1) VDU commands for switching to a mode 7 screen o B% (Loader 3) VDU commands for setting the square mode 4 screen o TVT1 (Loader 3) Palette data for space and the two dashboard colour schemes o VEC (Missile ship blueprint) The original value of the IRQ1 vector + Ship hangar The ship hangar that's displayed on docking o Subroutines o HALL (Docked) Draw the ships in the ship hangar, then draw the hangar o HANGER (Docked) Display the ship hangar o HAS1 (Docked) Draw a ship in the ship hangar o HAS2 (Docked) Draw a hangar background line from left to right o HAS3 (Docked) Draw a hangar background line from right to left o UNWISE (Docked) Switch the main line-drawing routine between EOR and OR logic o Variables o HATB (Docked) Ship hangar group table + Sound Explosions, laser fire, hyperspace and more o Subroutines o BEEP (Docked) Make a short, high beep o BEEP (Flight) Make a short, high beep o BELL (Docked) Make a standard system beep o BELL (Flight) Make a standard system beep o ECMOF (Docked) Switch off the E.C.M. o ECMOF (Flight) Switch off the E.C.M. o EXNO (Docked) Make the sound of a laser strike or ship explosion o EXNO (Flight) Make the sound of a laser strike or ship explosion o EXNO2 (Docked) Process us making a kill o EXNO2 (Flight) Process us making a kill o EXNO3 (Docked) Make an explosion sound o EXNO3 (Flight) Make an explosion sound o NO3 (Docked) Make a sound from a prepared sound block o NO3 (Flight) Make a sound from a prepared sound block o NOISE (Docked) Make the sound whose number is in A o NOISE (Flight) Make the sound whose number is in A o NOS1 (Docked) Prepare a sound block o NOS1 (Flight) Prepare a sound block o Variables o E% (Loader 3) Sound envelope definitions o SFX (Docked) Sound data o SFX (Flight) Sound data o Macros o FNE (Loader 3) Macro definition for defining a sound envelope + Stardust Stardust generation and movement o Subroutines o FLIP (Docked) Reflect the stardust particles in the screen diagonal and redraw the stardust field o FLIP (Flight) Reflect the stardust particles in the screen diagonal and redraw the stardust field o nWq (Flight) Create a random cloud of stardust o NWSTARS (Flight) Initialise the stardust field o STARS (Flight) The main routine for processing the stardust o STARS1 (Flight) Process the stardust for the front view o STARS2 (Flight) Process the stardust for the left or right view o STARS6 (Flight) Process the stardust for the rear view + Start and end The title screen... and the Game Over screen o Subroutines o BR1 (Part 1 of 2) (Docked) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 2 of 2) (Docked) Show the "Press Fire or Space, Commander" screen and start the game o DEATH (Flight) Display the death screen o DEATH2 (Docked) Reset most of the game and restart from the title screen o DEATH2 (Flight) Reset most of the game and restart from the title screen o DFAULT (Docked) Reset the current commander data block to the last saved commander o RES2 (Docked) Reset a number of flight variables and workspaces o RES2 (Flight) Reset a number of flight variables and workspaces o RESET (Docked) Reset most variables o RESET (Flight) Reset most variables o TITLE (Docked) Display a title screen with a rotating ship and prompt o TT170 (Docked) Main entry point for the Elite game code + Status Showing the commander's status and rank o Subroutines o BAD (Docked) Calculate how bad we have been o BAD (Flight) Calculate how bad we have been o BAY (Docked) Go to the docking bay (i.e. show the Status Mode screen) o STATUS (Docked) Show the Status Mode screen (red key f8) o STATUS (Flight) Show the Status Mode screen (red key f8) + Tactics AI tactics for enemy ships and missiles o Subroutines o ANGRY (Flight) Make a ship hostile o FR1 (Flight) Display the "missile jammed" message o FRMIS (Flight) Fire a missile from our ship o FRS1 (Flight) Launch a ship straight ahead of us, below the laser sights o HITCH (Flight) Work out if the ship in INWK is in our crosshairs o SFRMIS (Flight) Add an enemy missile to our local bubble of universe o TACTICS (Part 1 of 7) (Flight) Apply tactics: Process missiles, both enemy missiles and our own o TACTICS (Part 2 of 7) (Flight) Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate o TACTICS (Part 3 of 7) (Flight) Apply tactics: Calculate dot product to determine ship's aim o TACTICS (Part 4 of 7) (Flight) Apply tactics: Check energy levels, maybe launch escape pod if low o TACTICS (Part 5 of 7) (Flight) Apply tactics: Consider whether to launch a missile at us o TACTICS (Part 6 of 7) (Flight) Apply tactics: Consider firing a laser at us, if aim is true o TACTICS (Part 7 of 7) (Flight) Apply tactics: Set pitch, roll, and acceleration + Text Recursive tokens, control codes, two-letter tokens and more o Subroutines o BPRNT (Docked) Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o BPRNT (Flight) Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o CHPR (Docked) Print a character at the text cursor by poking into screen memory o cmn (Docked) Print the commander's name o cmn (Flight) Print the commander's name o cpl (Docked) Print the selected system name o cpl (Flight) Print the selected system name o crlf (Docked) Tab to column 21 and print a colon o crlf (Flight) Tab to column 21 and print a colon o csh (Docked) Print the current amount of cash o csh (Flight) Print the current amount of cash o DETOK (Docked) Print an extended recursive token from the TKN1 token table o DETOK2 (Docked) Print an extended text token (1-255) o DETOK3 (Docked) Print an extended recursive token from the RUTOK token table o dn (Docked) Print the amount of cash and beep o dn2 (Docked) Make a short, high beep and delay for 1 second o ee3 (Docked) Print the hyperspace countdown in the top-left of the screen o ee3 (Flight) Print the hyperspace countdown in the top-left of the screen o ex (Docked) Print a recursive token o ex (Flight) Print a recursive token o FEED (Docked) Print a newline o fwl (Docked) Print fuel and cash levels o fwl (Flight) Print fuel and cash levels o me1 (Docked) Erase an old in-flight message and display a new one o me1 (Flight) Erase an old in-flight message and display a new one o me2 (Docked) Remove an in-flight message from the space view o me2 (Flight) Remove an in-flight message from the space view o mes9 (Docked) Print a text token, possibly followed by " DESTROYED" o mes9 (Flight) Print a text token, possibly followed by " DESTROYED" o MESS (Docked) Display an in-flight message o MESS (Flight) Display an in-flight message o MT1 (Docked) Switch to ALL CAPS when printing extended tokens o MT13 (Docked) Switch to lower case when printing extended tokens o MT14 (Docked) Switch to justified text when printing extended tokens o MT15 (Docked) Switch to left-aligned text when printing extended tokens o MT16 (Docked) Print the character in variable DTW7 o MT17 (Docked) Print the selected system's adjective, e.g. Lavian for Lave o MT18 (Docked) Print a random 1-8 letter word in Sentence Case o MT19 (Docked) Capitalise the next letter o MT2 (Docked) Switch to Sentence Case when printing extended tokens o MT23 (Docked) Move to row 10, switch to white text, and switch to lower case when printing extended tokens o MT26 (Docked) Fetch a line of text from the keyboard o MT27 (Docked) Print the captain's name during mission briefings o MT28 (Docked) Print the location hint during the mission 1 briefing o MT29 (Docked) Move to row 6, switch to white text, and switch to lower case when printing extended tokens o MT5 (Docked) Switch to extended tokens o MT6 (Docked) Switch to standard tokens in Sentence Case o MT8 (Docked) Tab to column 6 and start a new word when printing extended tokens o MT9 (Docked) Clear the screen and set the current view type to 1 o ou2 (Flight) Display "E.C.M.SYSTEM DESTROYED" as an in-flight message o ou3 (Flight) Display "FUEL SCOOPS DESTROYED" as an in-flight message o PDESC (Docked) Print the system's extended description or a mission 1 directive o plf (Docked) Print a text token followed by a newline o plf (Flight) Print a text token followed by a newline o plf2 (Docked) Print text followed by a newline and indent of 6 characters o plf2 (Flight) Print text followed by a newline and indent of 6 characters o pr2 (Docked) Print an 8-bit number, left-padded to 3 digits, and optional point o pr2 (Flight) Print an 8-bit number, left-padded to 3 digits, and optional point o pr5 (Docked) Print a 16-bit number, left-padded to 5 digits, and optional point o pr5 (Flight) Print a 16-bit number, left-padded to 5 digits, and optional point o pr6 (Docked) Print 16-bit number, left-padded to 5 digits, no point o pr6 (Flight) Print 16-bit number, left-padded to 5 digits, no point o prq (Docked) Print a text token followed by a question mark o prq (Flight) Print a text token followed by a question mark o qw (Docked) Print a recursive token in the range 128-145 o qw (Flight) Print a recursive token in the range 128-145 o spc (Docked) Print a text token followed by a space o spc (Flight) Print a text token followed by a space o tal (Docked) Print the current galaxy number o tal (Flight) Print the current galaxy number o TT11 (Docked) Print a 16-bit number, left-padded to n digits, and optional point o TT11 (Flight) Print a 16-bit number, left-padded to n digits, and optional point o TT146 (Docked) Print the distance to the selected system in light years o TT146 (Flight) Print the distance to the selected system in light years o TT147 (Docked) Print an error when a system is out of hyperspace range o TT147 (Flight) Print an error when a system is out of hyperspace range o TT162 (Docked) Print a space o TT162 (Flight) Print a space o TT26 (Docked) Print a character at the text cursor, with support for verified text in extended tokens o TT26 (Flight) Print a character at the text cursor by poking into screen memory o TT27 (Docked) Print a text token o TT27 (Flight) Print a text token o TT41 (Docked) Print a letter according to Sentence Case o TT41 (Flight) Print a letter according to Sentence Case o TT42 (Docked) Print a letter in lower case o TT42 (Flight) Print a letter in lower case o TT43 (Docked) Print a two-letter token or recursive token 0-95 o TT43 (Flight) Print a two-letter token or recursive token 0-95 o TT45 (Docked) Print a letter in lower case o TT45 (Flight) Print a letter in lower case o TT46 (Docked) Print a character and switch to capitals o TT46 (Flight) Print a character and switch to capitals o TT60 (Docked) Print a text token and a paragraph break o TT60 (Flight) Print a text token and a paragraph break o TT67 (Docked) Print a newline o TT67 (Flight) Print a newline o TT68 (Docked) Print a text token followed by a colon o TT68 (Flight) Print a text token followed by a colon o TT69 (Docked) Set Sentence Case and print a newline o TT69 (Flight) Set Sentence Case and print a newline o TT70 (Docked) Display "MAINLY " and jump to TT72 o TT70 (Flight) Display "MAINLY " and jump to TT72 o TT73 (Docked) Print a colon o TT73 (Flight) Print a colon o TT74 (Docked) Print a character o TT74 (Flight) Print a character o TTX69 (Docked) Print a paragraph break o TTX69 (Flight) Print a paragraph break o VOWEL (Docked) Test whether a character is a vowel o ypl (Docked) Print the current system name o ypl (Flight) Print the current system name o Variables o DTW1 (Docked) A mask for applying the lower case part of Sentence Case to extended text tokens o DTW2 (Docked) A flag that indicates whether we are currently printing a word o DTW3 (Docked) A flag for switching between standard and extended text tokens o DTW4 (Docked) Flags that govern how justified extended text tokens are printed o DTW5 (Docked) The size of the justified text buffer at BUF o DTW6 (Docked) A flag to denote whether printing in lower case is enabled for extended text tokens o DTW8 (Docked) A mask for capitalising the next letter in an extended text token o JMTB (Docked) The extended token table for jump tokens 1-32 (DETOK) o MTIN (Docked) Lookup table for random tokens in the extended token table (0-37) o QQ16 (Docked) The two-letter token lookup table o QQ18 (Text tokens) The recursive token table for tokens 0-148 o RLINE (Docked) The OSWORD configuration block used to fetch a line of text from the keyboard o RUGAL (Docked) The criteria for systems with extended decription overrides o RUPLA (Docked) System numbers that have extended decription overrides o RUTOK (Docked) The second extended token table for recursive tokens 0-26 (DETOK3) o TENS (Docked) A constant used when printing large numbers in BPRNT o TENS (Flight) A constant used when printing large numbers in BPRNT o TKN1 (Docked) The first extended token table for recursive tokens 0-255 (DETOK) o TKN2 (Docked) The extended two-letter token lookup table o Macros o CHAR (Text tokens) Macro definition for characters in the recursive token table o CONT (Text tokens) Macro definition for control codes in the recursive token table o ECHR (Docked) Macro definition for characters in the extended token table o EJMP (Docked) Macro definition for jump tokens in the extended token table o ERND (Docked) Macro definition for random tokens in the extended token table o ETOK (Docked) Macro definition for recursive tokens in the extended token table o ETWO (Docked) Macro definition for two-letter tokens in the extended token table o RTOK (Text tokens) Macro definition for recursive tokens in the recursive token table o TOKN (Docked) Macro definition for standard tokens in the extended token table o TWOK (Text tokens) Macro definition for two-letter tokens in the token table + Universe Ship spawning, the local bubble, system/market generation o Subroutines o GINF (Docked) Fetch the address of a ship's data block into INF o GINF (Flight) Fetch the address of a ship's data block into INF o GTHG (Flight) Spawn a Thargoid ship and a Thargon companion o GVL (Flight) Calculate the availability of market items o hyp1 (Docked) Process a jump to the system closest to (QQ9, QQ10) o hyp1 (Flight) Process a jump to the system closest to (QQ9, QQ10) o jmp (Docked) Set the current system to the selected system o jmp (Flight) Set the current system to the selected system o KILLSHP (Flight) Remove a ship from our local bubble of universe o KS1 (Flight) Remove the current ship from our local bubble of universe o KS2 (Flight) Check the local bubble for missiles with target lock o KS3 (Flight) Set the SLSP ship heap pointer after shuffling ship slots o KS4 (Flight) Remove the space station and replace it with the sun o NwS1 (Docked) Flip the sign and double an INWK byte o NwS1 (Flight) Flip the sign and double an INWK byte o NWSHP (Docked) Add a new ship to our local bubble of universe o NWSHP (Flight) Add a new ship to our local bubble of universe o NWSPS (Flight) Add a new space station to our local bubble of universe o ping (Docked) Set the selected system to the current system o ping (Flight) Set the selected system to the current system o SFS1 (Flight) Spawn a child ship from the current (parent) ship o SOLAR (Flight) Set up various aspects of arriving in a new system o SOS1 (Flight) Update the missile indicators, set up the planet data block o SPIN (Flight) Randomly spawn cargo from a destroyed ship o TT111 (Docked) Set the current system to the nearest system to a point o TT111 (Flight) Set the current system to the nearest system to a point o TT20 (Docked) Twist the selected system's seeds four times o TT20 (Flight) Twist the selected system's seeds four times o TT24 (Docked) Calculate system data from the system seeds o TT24 (Flight) Calculate system data from the system seeds o TT25 (Docked) Show the Data on System screen (red key f6) o TT25 (Flight) Show the Data on System screen (red key f6) o TT54 (Docked) Twist the selected system's seeds o TT54 (Flight) Twist the selected system's seeds o TT81 (Docked) Set the selected system's seeds to those of system 0 o TT81 (Flight) Set the selected system's seeds to those of system 0 o Ze (Docked) Initialise the INWK workspace to a hostile ship o Ze (Flight) Initialise the INWK workspace to a hostile ship o Variables o UNIV (Docked) Table of pointers to the local universe's ship data blocks o UNIV (Flight) Table of pointers to the local universe's ship data blocks + Utility routines Memory/screen clearing, delay routines, random number generators o Subroutines o BRBR (Docked) The standard BRKV handler for the game o CLYNS (Docked) Clear the bottom three text rows of the mode 4 screen o CLYNS (Flight) Clear the bottom three text rows of the mode 4 screen o DELAY (Docked) Wait for a specified time, in 1/50s of a second o DELAY (Flight) Wait for a specified time, in 1/50s of a second o DORND (Docked) Generate random numbers o DORND (Flight) Generate random numbers o DORND (Loader 3) Generate random numbers o FX200 (Docked) Set the behaviour of the ESCAPE and BREAK keys o LYN (Docked) Clear most of a row of pixels o LYN (Flight) Clear most of a row of pixels o MPL (Loader 2) Move two pages of memory from LOADcode to LOAD and jump to ENTRY2 o MVBL (Loader 3) Decrypt and move a multi-page block of memory o MVPG (Loader 3) Decrypt and move a page of memory o OSB (Loader 3) A convenience routine for calling OSBYTE with Y = 0 o TT66 (Docked) Clear the screen and set the current view type o TT66 (Flight) Clear the screen and set the current view type o TTX66 (Docked) Clear the top part of the screen and draw a white border o TTX66 (Flight) Clear the top part of the screen and draw a white border o Unused routine (Docked) This code appears to be unused o ZEBC (Docked) Zero-fill pages &B and &C o ZERO (Docked) Reset the local bubble of universe and ship status o ZERO (Flight) Reset the local bubble of universe and ship status o ZES1 (Docked) Zero-fill the page whose number is in X o ZES1 (Flight) Zero-fill the page whose number is in X o ZES2 (Docked) Zero-fill a specific page o ZES2 (Flight) Zero-fill a specific page o ZINF (Docked) Reset the INWK workspace and orientation vectors o ZINF (Flight) Reset the INWK workspace and orientation vectors o Variables o brkd (Docked) The brkd counter for error handling o Unused block (Docked) These bytes appear to be unused (the same block appears in both the flight and docked code) o Unused block (Flight) These bytes appear to be unused (the same block appears in both the flight and docked code) + Workspaces Collections of important variables into blocks o Workspaces o K% (Docked) Ship data blocks and ship line heaps o K% (Flight) Ship data blocks and ship line heaps o S% (Docked) Entry points and vector addresses in the main docked code o S% (Flight) Entry points and vector addresses in the main flight code o UP (Docked) Ship slots, variables o UP (Flight) Ship slots, variables o WP (Docked) Variables o WP (Flight) Variables o XX3 (Docked) Temporary storage space for complex calculations o XX3 (Flight) Temporary storage space for complex calculations o ZP (Docked) Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (Flight) Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (Loader 1) Important variables used by the loader o ZP (Loader 2) Important variables used by the loader o ZP (Loader 3) Important variables used by the loader * 6502 Second Processor source code The fastest and most colourful version of Elite + Version information + About the 6502 Second Processor versionDetails of the fastest version of Elite + Different variants of the 6502 Second Processor versionCode variations found in 6502 Second Processor Elite + 6502 Second Processor source code by file + Map of the source code An overview of how the source code for Elite is structured + Annotated original source files The source files in their original structure o Game loader o Loader 1 source The Saturn loading screen, copy protection and set-up for the main game o Loader 2 source The rest of the loading screen and main game loader o Main game o Workspaces The main variable workspaces used in Elite o Text tokens Elite's tokenised game text o Elite A source Part 1 of the main game code o Elite B source Part 2 of the main game code o Elite C source Part 3 of the main game code o Elite D source Part 4 of the main game code o Elite E source Part 5 of the main game code o Elite F source Part 6 of the main game code o Elite G source Part 7 of the main game code o Elite H source Part 8 of the main game code o Elite I source Part 9 of the main game code o Elite J source Part 10 of the main game code o Ship blueprints Data for the 33 different ship designs o I/O processor source o I/O processor source The I/O processor source o Big Code File o Big Code File source Concatenates the individual source code parts into one big game file + 6502 Second Processor source code by category + Charts Long-range and short-range galactic charts o Subroutines o hm Select the closest system and redraw the chart crosshairs o HME2 Search the galaxy for a system o TT103 Draw a small set of crosshairs on a chart o TT105 Draw crosshairs on the Short-range Chart, with clipping o TT114 Display either the Long-range or Short-range Chart o TT123 Move galactic coordinates by a signed delta o TT16 Move the crosshairs on a chart o TT22 * Show the Long-range Chart (red key f4) o TT23 * Show the Short-range Chart (red key f5) + Copy protection Hiding the Elite code from prying eyes o Subroutines o Checksum Checksum the code from &1000 to &9FFF and check against S%-1 o DEEOR Decrypt bytes between &1300 and &9FFF by EOR'ing them with their page offset o do65C02 (I/O processor) Reverse the order of all bytes between the addresses in (1 0) and (3 2) and start the game o SOMEPROT (I/O processor) Implement the OSWORD 249 command (some copy protection) o Variables o copyright (Loader 1) A copyright notice, buried in the code o Firebird The name "Firebird", buried in the code of the Executive version + Dashboard The dials, 3D scanner and compass o Subroutines o ABORT Disarm missiles and update the dashboard indicators o ABORT2 Set/unset the lock target for a missile and update the dashboard o ADPARAMS (I/O processor) Implement the OSWRCH 137 command (add a dashboard parameter and update the dashboard when all are received) o BUMP2 Bump up the value of the pitch or roll dashboard indicator o cntr Apply damping to the pitch or roll dashboard indicator o COMPAS * Update the compass o DIALS * Update the dashboard indicators and flight variables by sending a #RDPARAMS command to the I/O processor o DIALS (Part 1 of 4) (I/O processor) Update the dashboard: speed indicator o DIALS (Part 2 of 4) (I/O processor) Update the dashboard: pitch and roll indicators o DIALS (Part 3 of 4) (I/O processor) Update the dashboard: four energy banks o DIALS (Part 4 of 4) (I/O processor) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIL2 (I/O processor) Update the roll or pitch indicator on the dashboard o DILX (I/O processor) Update a bar-based indicator on the dashboard o DOBULB (I/O processor) Implement the #DOBULB 0 command (draw the space station indicator bulb) o DOT (I/O processor) Implement the #DOdot command (draw a dash on the compass) o ECBLB Light up the E.C.M. indicator bulb ("E") on the dashboard by sending a #DOBULB 255 command to the I/O processor o ECBLB (I/O processor) Implement the #DOBULB 255 command (draw the E.C.M. indicator bulb) o ECBLB2 Start up the E.C.M. (indicator, start countdown and make sound) o MSBAR Draw a specific indicator in the dashboard's missile bar by sending a #DOmsbar command to the I/O processor o MSBAR (I/O processor) Implement the #DOmsbar command (draw a specific indicator in the dashboard's missile bar) o msblob Display the dashboard's missile indicators in green o PZW (I/O processor) Fetch the current dashboard colours, to support flashing o PZW2 (I/O processor) Fetch the current dashboard colours for non-striped indicators, to support flashing o RDPARAMS (I/O processor) Implement the #RDPARAMS command (start receiving a new set of parameters for updating the dashboard) o REDU2 Reduce the value of the pitch or roll dashboard indicator o SC48 (I/O processor) Implement the #onescan command (draw a ship on the 3D scanner) o SCAN * Display the current ship on the scanner o SP1 Draw the space station on the compass o SP2 Draw a dot on the compass, given the planet/station vector o SPBLB Light up the space station indicator ("S") on the dashboard by sending a #DOBULB 0 command to the I/O processor o WPSHPS Clear the scanner, reset the ball line and sun line heaps o Variables o ECBT (I/O processor) The character bitmap for the E.C.M. indicator bulb o SCANpars The scanner buffer to send with the #onescan command o SPBT (I/O processor) The bitmap definition for the space station indicator bulb + Demo Star Wars scroll texts and a huge Elite logo o Subroutines o DEMON Show the demo o GRIDSET Populate the line coordinate tables with the lines for the scroll text o GRS1 Populate the line coordinate tables with the lines for a single scroll text character o SLIDE Display a Star Wars scroll text o TWIST Pitch the current ship by a small angle in a positive direction o ZZAAP Draw a vertical red laser line from (128, 67) to (128, 160) o Variables o acorn The text for the demo's opening scroll text o byian The text for the demo's middle scroll text o executive Extra text for the demo in the Executive version o HIMCNT Used as a loop counter for the Cobra's slow approach in the demo o LTDEF Line definitions for characters in the Star Wars scroll text o NOFX The x-coordinates of the scroll text letter grid o NOFY The y-coordinates of the scroll text letter grid o true3 The text for the demo's final scroll text + Drawing circles Hyperspace tunnels, launch rings and planets o Subroutines o BLINE * Draw a circle segment and add it to the ball line heap o CHKON Check whether any part of a circle appears on the extended screen o CIRCLE Draw a circle for the planet o CIRCLE2 * Draw a circle (for the planet or chart) o DOHFX (I/O processor) Implement the #DOHFX command (update the hyperspace effect flag) o HFS2 * Draw the launch or hyperspace tunnel o LAUN Make the launch sound and draw the launch tunnel o LL164 Make the hyperspace sound and draw the hyperspace tunnel o LS2FL Draw the contents of the ball line heap by sending an OSWRCH 129 command to the I/O processor o TT128 * Draw a circle on a chart o TT14 Draw a circle with crosshairs on a chart + Drawing lines The core line-drawing routines o Subroutines o ADDBYT (I/O processor) Implement the OSWRCH 130 command (add a byte to a line and draw it when all bytes are received) o BEGINLIN (I/O processor) Implement the OSWRCH 129 command (start receiving a new line to draw) o EDGES Draw a horizontal line given a centre and a half-width o HBFL Draw the sun lines in the horizontal line buffer in orange by sending an OSWORD 247 command to the I/O processor o HBZE Reset the horizontal line buffer o HLOIN * Add a sun line to the horizontal line buffer o HLOIN (I/O processor) Implement the OSWORD 247 command (draw the sun lines in the horizontal line buffer in orange) o HLOIN2 Remove a line from the sun line heap and draw it on-screen o HLOIN2 (I/O processor) Draw a horizontal line in a specific colour o LASLI Draw the laser lines for when we fire our lasers o LBFL Draw the lines in the multi-segment line buffer by sending an OSWRCH 129 command to the I/O processor o LL118 Move a point along a line until it is on-screen o LL145 (Part 1 of 4) * Clip line: Work out which end-points are on-screen, if any o LL145 (Part 2 of 4) Clip line: Work out if any part of the line is on-screen o LL145 (Part 3 of 4) Clip line: Calculate the line's gradient o LL145 (Part 4 of 4) Clip line: Call the routine in LL188 to do the actual clipping o LL30 Draw a one-segment line by sending an OSWRCH 129 command to the I/O processor o LOIN Add a line segment to the multi-segment line buffer o LOIN (Part 1 of 7) (I/O processor) Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 2 of 7) (I/O processor) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 3 of 7) (I/O processor) Draw a shallow line going right and up or left and down o LOIN (Part 4 of 7) (I/O processor) Draw a shallow line going right and down or left and up o LOIN (Part 5 of 7) (I/O processor) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 6 of 7) (I/O processor) Draw a steep line going up and left or down and right o LOIN (Part 7 of 7) (I/O processor) Draw a steep line going up and right or down and left o NLIN Draw a horizontal line at pixel row 23 to box in a title o NLIN2 Draw a screen-wide horizontal line at the pixel row in A o NLIN3 Print a title and a horizontal line at row 19 to box it in o NLIN4 Draw a horizontal line at pixel row 19 to box in a title o TT15 Draw a set of crosshairs o Variables o HBUF The horizontal line buffer to send with the OSWORD 247 command o LBUF The multi-segment line buffer used by LOIN o LSX2 The ball line heap for storing x-coordinates o LSY2 The ball line heap for storing y-coordinates o TABLE (I/O processor) The line buffer for line data transmited from the parasite o TWFL Ready-made character rows for the left end of a horizontal line in mode 4 o TWFR Ready-made character rows for the right end of a horizontal line in mode 4 + Drawing pixels How to plot pixels in various colours o Subroutines o CPIX2 (I/O processor) Draw a single-height dash on the dashboard o CPIX4 (I/O processor) Draw a double-height dot on the dashboard o PBFL Draw the pixel in the pixel buffer by sending an OSWORD 241 command to the I/O processor o PBZE Reset the pixel buffer o PIX (Loader 1) Draw a single pixel at a specific coordinate o PIXEL * Add a white dot at a specific distance to the pixel buffer (2-pixel dash or 4-pixel square) o PIXEL (I/O processor) Implement the OSWORD 241 command (draw space view pixels) o PIXEL2 Draw a stardust particle relative to the screen centre o PIXEL3 Add a coloured dot at a specific distance to the pixel buffer (1-pixel dot, 2-pixel dash or 4-pixel square) o Variables o CTWOS Ready-made single-pixel character row bytes for mode 5 o CTWOS (I/O processor) Ready-made single-pixel character row bytes for mode 2 o orange (I/O processor) Lookup table for 2-pixel mode 1 orange pixels for the sun o PBUF The pixel buffer to send with the OSWORD 241 command o PXCL (I/O processor) A four-colour mode 1 pixel byte that represents a dot's distance o TWFL (I/O processor) Ready-made character rows for the left end of a horizontal line o TWFR (I/O processor) Ready-made character rows for the right end of a horizontal line o TWOS Ready-made single-pixel character row bytes for mode 4 o TWOS (I/O processor) Ready-made single-pixel character row bytes for mode 1 o TWOS (Loader 1) Ready-made single-pixel character row bytes for mode 1 o TWOS2 Ready-made double-pixel character row bytes for mode 4 o TWOS2 (I/O processor) Ready-made double-pixel character row bytes for mode 1 o ylookup (I/O processor) Lookup table for converting pixel y-coordinate to page number of screen address + Drawing planets Planets with meridians and craters o Subroutines o PL2 Remove the planet or sun from the screen o PL21 Return from a planet/sun-drawing routine with a failure flag o PL9 (Part 1 of 3) * Draw the planet, with either an equator and meridian, or a crater o PL9 (Part 2 of 3) Draw the planet's equator and meridian o PL9 (Part 3 of 3) Draw the planet's crater o PLANET Draw the planet or sun o PLL1 (Loader 1) Draw Saturn on the loading screen o PLS1 Calculate (Y A) = nosev_x / z o PLS2 Draw a half-ellipse o PLS22 * Draw an ellipse or half-ellipse o PLS3 Calculate (Y A P) = 222 * roofv_x / z o PLS4 Calculate CNT2 = arctan(P / A) / 4 o PLS5 Calculate roofv_x / z and roofv_y / z o PLS6 Calculate (X K) = (A P) / (z_sign z_hi z_lo) o Variables o CNT (Loader 1) A counter for use in drawing Saturn's planetary body o CNT2 (Loader 1) A counter for use in drawing Saturn's background stars o CNT3 (Loader 1) A counter for use in drawing Saturn's rings o RAND (Loader 1) The random number seed used for drawing Saturn + Drawing ships The celebrated 3D ship plotting process o Subroutines o DOEXP * Draw an exploding ship o LL9 (Part 1 of 12) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 2 of 12) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 3 of 12) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 4 of 12) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 5 of 12) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 6 of 12) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 8 of 12) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 9 of 12) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 10 of 12) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 11 of 12) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 12 of 12) Draw ship: Draw all the visible edges from the ship line heap o PROJ Project the current ship onto the screen o SHPPT Draw a distant ship as a point rather than a full wireframe o Variables o E% Ship blueprints default NEWB flags o scacol Ship colours on the scanner o SHIP_ADDER Ship blueprint for an Adder o SHIP_ANACONDA Ship blueprint for an Anaconda o SHIP_ASP_MK_2 Ship blueprint for an Asp Mk II o SHIP_ASTEROID Ship blueprint for an asteroid o SHIP_BOA Ship blueprint for a Boa o SHIP_BOULDER Ship blueprint for a boulder o SHIP_CANISTER Ship blueprint for a cargo canister o SHIP_COBRA_MK_1 Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_3 Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3_P Ship blueprint for a Cobra Mk III (pirate) o SHIP_CONSTRICTOR Ship blueprint for a Constrictor o SHIP_CORIOLIS Ship blueprint for a Coriolis space station o SHIP_COUGAR Ship blueprint for a Cougar o SHIP_DODO Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_ESCAPE_POD Ship blueprint for an escape pod o SHIP_FER_DE_LANCE Ship blueprint for a Fer-de-Lance o SHIP_GECKO Ship blueprint for a Gecko o SHIP_KRAIT Ship blueprint for a Krait o SHIP_LOGO Ship blueprint for the Elite logo o SHIP_MAMBA Ship blueprint for a Mamba o SHIP_MISSILE Ship blueprint for a missile o SHIP_MORAY Ship blueprint for a Moray o SHIP_PLATE Ship blueprint for an alloy plate o SHIP_PYTHON Ship blueprint for a Python o SHIP_PYTHON_P Ship blueprint for a Python (pirate) o SHIP_ROCK_HERMIT Ship blueprint for a rock hermit (asteroid) o SHIP_SHUTTLE Ship blueprint for a Shuttle o SHIP_SIDEWINDER Ship blueprint for a Sidewinder o SHIP_SPLINTER Ship blueprint for a splinter o SHIP_THARGOID Ship blueprint for a Thargoid mothership o SHIP_THARGON Ship blueprint for a Thargon o SHIP_TRANSPORTER Ship blueprint for a Transporter o SHIP_VIPER Ship blueprint for a Viper o SHIP_WORM Ship blueprint for a Worm o shpcol Ship colours o XX21 Ship blueprints lookup table o Macros o EDGE Macro definition for adding edges to ship blueprints o FACE Macro definition for adding faces to ship blueprints o VERTEX Macro definition for adding vertices to ship blueprints + Drawing suns The epic, shimmering Elite sun o Subroutines o FLFLLS Reset the sun line heap o SUN (Part 1 of 4) Draw the sun: Set up all the variables needed o SUN (Part 2 of 4) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 3 of 4) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 4 of 4) Draw the sun: Continue to the top of the screen, erasing old sun o WPLS Remove the sun from the screen + Equipment Buying and selling weapons and ship upgrades o Subroutines o eq Subtract the price of equipment from the cash pot o EQSHP * Show the Equip Ship screen (red key f3) o prx Return the price of a piece of equipment o qv Print a menu of the four space views, for buying lasers o refund Install a new laser, processing a refund if applicable o Variables o PRXS Equipment prices + Flight Docking, hyperspace, views, shields and more o Subroutines o DCS1 Calculate the vector from the ideal docking position to the ship o DENGY Drain some energy from the energy banks o dockEd Print a message to say no hyperspacing inside the station o DOCKIT Apply docking manoeuvres to the ship in INWK o DOENTRY Dock at the space station, show the ship hangar and work out any mission progression o DOFE21 (I/O processor) Implement the #DOFE21 command (show the energy bomb effect) o ESCAPE Launch our escape pod o Ghy Perform a galactic hyperspace jump o hyp Start the hyperspace process o LOOK1 Initialise the space view o MJP Process a mis-jump into witchspace o OOPS Take some damage o OUCH Potentially lose cargo or equipment following damage o PLUT * Flip the coordinate axes for the four different views o SESCP Spawn an escape pod from the current (parent) ship o SHD Charge a shield and drain some energy from the energy banks o SIGHT Draw the laser crosshairs o TT110 Launch from a station or show the front space view o TT18 Try to initiate a jump into hyperspace o TTX110 Set the current system to the nearest system and return to hyp o WARP * Perform an in-system jump o wW Start a hyperspace countdown + Inventory Showing the contents of the hold o Subroutines o TT210 Show a list of current cargo in our hold, optionally to sell o TT213 * Show the Inventory screen (red key f9) o TT214 Ask a question with a "Y/N?" prompt and return the response + Keyboard Processing key presses and joysticks o Subroutines o CTRL Scan the keyboard to see if CTRL is currently pressed o DK4 Scan for pause, configuration and secondary flight keys o DKJ1 Read joystick and flight controls o DKS2 Read the joystick position o DKS3 Toggle a configuration setting and emit a beep o DKS4 Scan for a particular key press by sending a #DODKS4 command to the I/O processor o DODKS4 (I/O processor) Implement the #DODKS4 command (scan the keyboard to see if a specific key is being pressed) o DOKEY * Scan for the seven primary flight controls o DOVIAE (I/O processor) Implement the #VIAE command (enable/disable interrupts) o FLKB Flush the keyboard buffer o KEYBOARD (I/O processor) Implement the OSWORD 240 command (scan the keyboard and joystick and log the results) o PAS1 Display a rotating ship at space coordinates (0, 112, 256) and scan the keyboard o PAUSE Display a rotating ship, waiting until a key is pressed, then remove the ship from the screen o PAUSE2 Wait until a key is pressed, ignoring any existing key press o RDKEY Scan the keyboard for key presses by sending an OSWORD 240 command to the I/O processor o TT102 * Process function key, save key, hyperspace and chart key presses and update the hyperspace counter o TT17 Scan the keyboard for cursor key or joystick movement o TT217 Scan the keyboard until a key is pressed o U% Clear the key logger o ZEKTRAN Reset the key logger buffer at KTRAN o Variables o KTRAN The key logger buffer that gets updated by the OSWORD 240 command o KYTB Lookup table for in-flight keyboard controls o KYTB (I/O processor) Lookup table for in-flight keyboard controls o TRANTABLE Translation table from internal key number to ASCII o Macros o DKS4 (I/O processor) Scan the keyboard to see if a specific key is being pressed + Loader The loading screen and system setup o Subroutines o BEGIN Initialise the configuration variables and start the game o COLD Copy the recursive tokens and ship blueprints to their correct locations o Elite loader (Loader 1) Check for a 6502 Second Processor, perform a number of OS calls, set up sound and run the second loader o Elite loader (Part 1 of 2) (Loader 2) Move loading screen binaries into screen memory and load and run the main game code o Elite loader (Part 2 of 2) (Loader 2) Include binaries for loading screen and dashboard images o S% Checksum, decrypt and unscramble the main game code, and start the game o STARTUP (I/O processor) Set the various vectors, interrupts and timers, and terminate the loading process so the vector handlers can take over o Variables o MESS1 (Loader 1) The OS command string for changing the disc directory to E o MESS2 (Loader 1) The OS command string for running the second part of the loader in file ELITEa o MESS2 (Loader 2) The OS command string for running the I/ O processor's main game code in file I.CODE o MESS3 (Loader 2) The OS command string for running the parasite's main game code in file P.CODE o RDLI The OS command string for running the flight code in file D.CODE in the disc version of Elite + Main loop The core loop that runs Elite o Subroutines o Main flight loop (Part 1 of 16) Seed the random number generator o Main flight loop (Part 2 of 16) Calculate the alpha and beta angles from the current pitch and roll of our ship o Main flight loop (Part 3 of 16) Scan for flight keys and process the results o 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 o Main flight loop (Part 5 of 16) For each nearby ship: If an energy bomb has been set off, potentially kill this ship o 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% o Main flight loop (Part 7 of 16) For each nearby ship: Check whether we are docking, scooping or colliding with it o Main flight loop (Part 8 of 16) For each nearby ship: Process us potentially scooping this item o 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 o Main flight loop (Part 10 of 16) For each nearby ship: Remove if scooped, or process collisions o Main flight loop (Part 11 of 16) For each nearby ship: Process missile lock and firing our laser o Main flight loop (Part 12 of 16) For each nearby ship: Draw the ship, remove if killed, loop back o Main flight loop (Part 13 of 16) Show energy bomb effect, charge shields and energy banks o Main flight loop (Part 14 of 16) Spawn a space station if we are close enough to the planet o Main flight loop (Part 15 of 16) Perform altitude checks with the planet and sun and process fuel scooping if appropriate o Main flight loop (Part 16 of 16) Process laser pulsing, E.C.M. energy drain, call stardust routine o Main game loop (Part 1 of 6) Spawn a trader (a Cobra Mk III, Python, Boa or Anaconda) o Main game loop (Part 2 of 6) * Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister o Main game loop (Part 3 of 6) Potentially spawn a cop, particularly if we've been bad o Main game loop (Part 4 of 6) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates o Main game loop (Part 5 of 6) Cool down lasers, make calls to update the dashboard o Main game loop (Part 6 of 6) Process non-flight key presses (red function keys, docked keys) + Market Prices, availability, selling and buying cargo o Subroutines o gnum Get a number from the keyboard o NWDAV4 Print an "ITEM?" error, make a beep and rejoin the TT210 routine o tnpr Work out if we have space for a specific amount of cargo o tnpr1 Work out if we have space for one tonne of cargo o TT151 Print the name, price and availability of a market item o TT152 Print the unit ("t", "kg" or "g") for a market item o TT160 Print "t" (for tonne) and a space o TT161 Print "kg" (for kilograms) o TT163 Print the headers for the table of market prices o TT167 * Show the Market Price screen (red key f7) o TT16a Print "g" (for grams) o TT208 * Show the Sell Cargo screen (red key f2) o TT219 * Show the Buy Cargo screen (red key f1) o var Calculate QQ19+3 = economy * |economic_factor| o Variables o QQ23 Market prices table o Macros o ITEM Macro definition for the market prices table + Maths (Arithmetic) Addition, subtraction, multiplication, division o Subroutines o ADD * Calculate (A X) = (A P) + (S R) o ADD (I/O processor) Calculate (A X) = (A P) + (S R) o DV41 Calculate (P R) = 256 * DELTA / A o DV42 Calculate (P R) = 256 * DELTA / z_hi o DVID3B2 Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID4 * Calculate (P R) = 256 * A / Q o DVID4 (I/O processor) Calculate (P R) = 256 * A / Q o DVIDT Calculate (P+1 A) = (A P) / Q o FMLTU Calculate A = A * Q / 256 o FMLTU2 Calculate A = K * sin(A) o GC2 Calculate (Y X) = (A P) * 4 o GCASH Calculate (Y X) = P * Q * 4 o LCASH Subtract an amount of cash from the cash pot o LL120 Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL123 Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL129 Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL28 Calculate R = 256 * A / Q o LL38 Calculate (S A) = (S R) + (A Q) o LL5 Calculate Q = SQRT(R Q) o LL61 Calculate (U R) = 256 * A / Q o LL62 Calculate 128 - (U R) o MAD Calculate (A X) = Q * A + (S R) o MAS3 Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block o MCASH Add an amount of cash to the cash pot o MLS1 Calculate (A P) = ALP1 * A o MLS2 Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLTU2 Calculate (A P+1 P) = (A ~P) * Q o MLU1 Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust o MLU2 Calculate (A P) = |A| * Q o MU1 Copy X into P and A, and clear the C flag o MU11 Calculate (A P) = P * X o MU5 Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU6 Set P(1 0) = (A A) o MULT1 Calculate (A P) = Q * A o MULT12 Calculate (S R) = Q * A o MULT3 Calculate K(3 2 1 0) = (A P+1 P) * Q o MULTU * Calculate (A P) = P * Q o MUT1 Calculate R = XX and (A P) = Q * A o MUT2 Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT3 Unused routine that does the same as MUT2 o PIX1 Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o ROOT (Loader 1) Calculate ZP = SQRT(ZP(1 0)) o SPS2 Calculate (Y X) = A / 10 o SQUA Clear bit 7 of A and calculate (A P) = A * A o SQUA2 Calculate (A P) = A * A o SQUA2 (Loader 1) Calculate (A P) = A * A o TAS1 Calculate K3 = (x_sign x_hi x_lo) - V(1 0) o TIS1 Calculate (A ?) = (-X * A + (S R)) / 96 o TIS2 Calculate A = A / Q o TIS3 Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o VCSU1 Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station o VCSUB Calculate vector K3(8 0) = [x y z] - coordinates in (A V) o Variables o antilog Binary antilogarithm table o antilog (I/O processor) Binary antilogarithm table o antilogODD Binary antilogarithm table o antilogODD (I/O processor) Binary antilogarithm table o log Binary logarithm table (high byte) o log (I/O processor) Binary logarithm table (high byte) o logL Binary logarithm table (low byte) o logL (I/O processor) Binary logarithm table (low byte) + Maths (Geometry) Vectors, coordinates, dot products and matrices o Subroutines o ARCTAN Calculate A = arctan(P / Q) o FAROF Compare x_hi, y_hi and z_hi with 224 o FAROF2 Compare x_hi, y_hi and z_hi with A o LL51 Calculate the dot product of XX15 and XX16 o MAS1 Add an orientation vector coordinate to an INWK coordinate o MAS2 Calculate a cap on the maximum distance to the planet or sun o MAS4 Calculate a cap on the maximum distance to a ship o NORM * Normalise the three-coordinate vector in XX15 o SPS1 Calculate the vector to the planet and store it in XX15 o SPS3 Copy a space coordinate from the K% block into K3 o SPS4 Calculate the vector to the space station o TAS2 Normalise the three-coordinate vector in K3 o TAS3 Calculate the dot product of XX15 and an orientation vector o TAS4 Calculate the dot product of XX15 and one of the space station's orientation vectors o TAS6 Negate the vector in XX15 so it points in the opposite direction o TIDY * Orthonormalise the orientation vectors for a ship o Variables o ACT Arctan table o SNE Sine/cosine table + Missions Only in the enhanced versions of Elite o Subroutines o BRIEF Start mission 1 and show the mission briefing o BRIEF2 Start mission 2 o BRIEF3 Receive the briefing and plans for mission 2 o BRIS Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds o BRP Print an extended token and show the Status Mode screen o DEBRIEF Finish mission 1 o DEBRIEF2 Finish mission 2 o THERE Check whether we are in the Constrictor's system in mission 1 + Moving Moving and rotating ships and planets in space o Subroutines o MV40 Rotate the planet or sun's location in space by the amount of pitch and roll of our ship o MVEIT (Part 1 of 9) Move current ship: Tidy the orientation vectors o MVEIT (Part 2 of 9) Move current ship: Call tactics routine, remove ship from scanner o MVEIT (Part 3 of 9) Move current ship: Move ship forward according to its speed o MVEIT (Part 4 of 9) Move current ship: Apply acceleration to ship's speed as a one-off o MVEIT (Part 5 of 9) Move current ship: Rotate ship's location by our pitch and roll o MVEIT (Part 6 of 9) Move current ship: Move the ship in space according to our speed o MVEIT (Part 7 of 9) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 8 of 9) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 9 of 9) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVS4 * Apply pitch and roll to an orientation vector o MVS5 Apply a 3.6 degree pitch or roll to an orientation vector o MVT1 Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT3 Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1) o MVT6 Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o SFS2 Move a ship in space along one of the coordinate axes + Save and load Commander files and competition codes o Subroutines o BRKBK Set the standard BRKV handler for the game o CAT Catalogue a disc, wait for a key press and display the disc access menu o CATS Ask for a disc drive number and print a catalogue of that drive o CHECK Calculate the checksum for the last saved commander data block o DELT Catalogue a disc, ask for a filename to delete, and delete the file o DOCATF (I/O processor) Implement the #DOCATF command (update the disc catalogue flag) o DODOSVN Set the SVN ("save in progress") flag by sending a #DOsvn command to the I/O processor o DOSVN (I/O processor) Implement the #DOSVN command (update the "save in progress" flag) o GTDRV Get an ASCII disc drive drive number from the keyboard o GTNMEW Fetch the name of a commander file to save or load o LOD * Load a commander file o MEBRK The BRKV handler for disc access operations o QUS1 Save or load the commander file o retry Scan the keyboard until a key is pressed and display the disc access menu o savscr Save a screenshot if CTRL-D is pressed when the game is paused o SVE * Display the disc access menu and process saving of commander files o TR1 Copy the last saved commander's name from NA% to INWK o TRNME Copy the last saved commander's name from INWK to NA% o Variables o CHK First checksum byte for the saved commander data file o CHK2 Second checksum byte for the saved commander data file o CTLI The OS command string for cataloguing a disc o DELI The OS command string for deleting a file o NA% The data block for the last saved commander o oscobl OSFILE configuration block for saving a screenshot o oscobl2 Master OSFILE configuration block for saving a screenshot o S1% The drive and directory number used when saving or loading a commander file o scname Filename to be used when saving a screenshot o stack Temporary storage for the stack pointer when switching the BRKV handler between BRBR and MEBRK + Screen mode Elite's famous split-screen mode o Subroutines o DET1 Show or hide the dashboard (for when we die) by sending a #DODIALS command to the I/O processor o DODIALS (I/O processor) Implement the #DODIALS command (show or hide the dashboard) o IRQ1 (I/O processor) The main screen-mode interrupt handler (IRQ1V points here) o SETVDU19 (I/O processor) Implement the #SETVDU19 command (change mode 1 palette) o WSCAN Ask the I/O processor to wait for the vertical sync by sending a #wscn command to the I/O processor o WSCAN (I/O processor) Implement the #wscn command (wait for the vertical sync) o Variables o B% (Loader 1) VDU commands for setting the square mode 1 screen o TVT1 (I/O processor) Palette data for the mode 2 part of the screen (the dashboard) o TVT3 (I/O processor) Palette data for the mode 1 part of the screen (the top part) + Ship hangar The ship hangar that's displayed on docking o Subroutines o HALL Draw the ships in the ship hangar, then draw the hangar by sending an OSWORD 248 command to the I/O processor o HANGER (I/O processor) Implement the OSWORD 248 command (display the ship hangar) o HAS1 Draw a ship in the ship hangar o HAS2 (I/O processor) Draw a hangar background line from left to right o HAS3 (I/O processor) Draw a hangar background line from right to left o UNWISE Switch the main line-drawing routine between EOR and OR logic o Variables o HATB Ship hangar group table + Sound Explosions, laser fire, hyperspace and more o Subroutines o BEEP Make a short, high beep o BELL Make a standard system beep o ECMOF Switch off the E.C.M. o EXNO Make the sound of a laser strike or ship explosion o EXNO2 Process us making a kill o EXNO3 Make an explosion sound o NO3 Make a sound from a prepared sound block o NOISE * Make the sound whose number is in A o NOS1 Prepare a sound block o TALK Speak using the Watford Electronics Beeb Speech Synthesiser o Variables o E% (Loader 1) Sound envelope definitions o SFX Sound data o SPEECH Phrases for the Watford Electronics Beeb Speech Synthesiser o Macros o FNE (Loader 1) Macro definition for defining a sound envelope + Stardust Stardust generation and movement o Subroutines o FLIP Reflect the stardust particles in the screen diagonal and redraw the stardust field o nWq Create a random cloud of stardust o NWSTARS Initialise the stardust field o STARS * The main routine for processing the stardust o STARS1 Process the stardust for the front view o STARS2 Process the stardust for the left or right view o STARS6 Process the stardust for the rear view + Start and end The title screen... and the Game Over screen o Subroutines o BR1 (Part 1 of 2) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 2 of 2) Show the "Press Fire or Space, Commander" screen and start the game o DEATH * Display the death screen o DEATH2 Reset most of the game and restart from the title screen o DFAULT Reset the current commander data block to the last saved commander o RES2 Reset a number of flight variables and workspaces o RESET Reset most variables o TITLE * Display a title screen with a rotating ship and prompt o TT170 * Main entry point for the Elite game code + Status Showing the commander's status and rank o Subroutines o BAD Calculate how bad we have been o BAY Go to the docking bay (i.e. show the Status Mode screen) o STATUS * Show the Status Mode screen (red key f8) + Tactics AI tactics for enemy ships and missiles o Subroutines o ANGRY Make a ship hostile o FR1 Display the "missile jammed" message o FRMIS Fire a missile from our ship o FRS1 Launch a ship straight ahead of us, below the laser sights o HITCH * Work out if the ship in INWK is in our crosshairs o SFRMIS Add an enemy missile to our local bubble of universe o TACTICS (Part 1 of 7) Apply tactics: Process missiles, both enemy missiles and our own o TACTICS (Part 2 of 7) * Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate o TACTICS (Part 3 of 7) Apply tactics: Calculate dot product to determine ship's aim o TACTICS (Part 4 of 7) Apply tactics: Check energy levels, maybe launch escape pod if low o TACTICS (Part 5 of 7) Apply tactics: Consider whether to launch a missile at us o TACTICS (Part 6 of 7) Apply tactics: Consider firing a laser at us, if aim is true o TACTICS (Part 7 of 7) Apply tactics: Set pitch, roll, and acceleration + Text Recursive tokens, control codes, two-letter tokens and more o Subroutines o BPRNT * Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o CHPR Send a character to the I/O processor for printing or processing o cmn Print the commander's name o cpl Print the selected system name o crlf Tab to column 21 and print a colon o csh Print the current amount of cash o DETOK Print an extended recursive token from the TKN1 token table o DETOK2 Print an extended text token (1-255) o DETOK3 Print an extended recursive token from the RUTOK token table o dn Print the amount of cash and beep o dn2 Make a short, high beep and delay for 1 second o DOCOL Set the text colour by sending a #SETCOL command to the I/O processor o DOT Draw a dash on the compass by sending a #DOdot command to the I/O processor o DOVDU19 Change the mode 1 palette by sending a #SETVDU19 command to the I/O processor o DOXC Move the text cursor to a specified column by sending a #SETXC command to the I/O processor o DOYC Move the text cursor to a specified row by sending a #SETYC command to the I/O processor o ee3 Print the hyperspace countdown in the top-left of the screen o ex Print a recursive token o FEED Print a newline o fwl Print fuel and cash levels o INCYC Move the text cursor to the next row o label Send a two-byte OSWRCH command to the I/O processor o me1 Erase an old in-flight message and display a new one o me2 Remove an in-flight message from the space view o mes9 Print a text token, possibly followed by " DESTROYED" o MESS Display an in-flight message o MT1 Switch to ALL CAPS when printing extended tokens o MT13 Switch to lower case when printing extended tokens o MT14 Switch to justified text when printing extended tokens o MT15 Switch to left-aligned text when printing extended tokens o MT16 Print the character in variable DTW7 o MT17 Print the selected system's adjective, e.g. Lavian for Lave o MT18 Print a random 1-8 letter word in Sentence Case o MT19 Capitalise the next letter o MT2 Switch to Sentence Case when printing extended tokens o MT23 Move to row 10, switch to white text, and switch to lower case when printing extended tokens o MT26 Fetch a line of text from the keyboard o MT27 Print the captain's name during mission briefings o MT28 Print the location hint during the mission 1 briefing o MT29 Move to row 6, switch to white text, and switch to lower case when printing extended tokens o MT5 Switch to extended tokens o MT6 Switch to standard tokens in Sentence Case o MT8 Tab to column 6 and start a new word when printing extended tokens o MT9 Clear the screen and set the current view type to 1 o ou2 Display "E.C.M.SYSTEM DESTROYED" as an in-flight message o ou3 Display "FUEL SCOOPS DESTROYED" as an in-flight message o PDESC Print the system's extended description or a mission 1 directive o plf Print a text token followed by a newline o plf2 Print text followed by a newline and indent of 6 characters o POSWRCH (I/O processor) Print a character on the printer only o pr2 Print an 8-bit number, left-padded to 3 digits, and optional point o pr5 Print a 16-bit number, left-padded to 5 digits, and optional point o pr6 Print 16-bit number, left-padded to 5 digits, no point o prilf (I/O processor) Implement the #prilf command (print a blank line on the printer) o printer (I/O processor) Implement the #printcode command (print a character on the printer and screen) o prq Print a text token followed by a question mark o qw Print a recursive token in the range 128-145 o SETXC (I/O processor) Implement the #SETXC command (move the text cursor to a specific column) o SETYC (I/O processor) Implement the #SETYC command (move the text cursor to a specific row) o spc Print a text token followed by a space o tal Print the current galaxy number o tosend (I/O processor) Print a printable character and return to the printer routine o TT11 Print a 16-bit number, left-padded to n digits, and optional point o TT146 Print the distance to the selected system in light years o TT147 Print an error when a system is out of hyperspace range o TT162 Print a space o TT26 * Print a character at the text cursor, with support for verified text in extended tokens o TT26 (I/O processor) Print a character at the text cursor by poking into screen memory o TT27 * Print a text token o TT41 Print a letter according to Sentence Case o TT42 Print a letter in lower case o TT43 Print a two-letter token or recursive token 0-95 o TT45 Print a letter in lower case o TT46 Print a character and switch to capitals o TT60 Print a text token and a paragraph break o TT67 Print a newline o TT67 (I/O processor) Print a newline o TT68 Print a text token followed by a colon o TT69 Set Sentence Case and print a newline o TT70 Display "MAINLY " and jump to TT72 o TT73 Print a colon o TT74 Print a character o TTX69 Print a paragraph break o VOWEL Test whether a character is a vowel o WHITETEXT Switch to white text o ypl Print the current system name o Variables o DTW1 A mask for applying the lower case part of Sentence Case to extended text tokens o DTW2 A flag that indicates whether we are currently printing a word o DTW3 A flag for switching between standard and extended text tokens o DTW4 Flags that govern how justified extended text tokens are printed o DTW5 The size of the justified text buffer at BUF o DTW6 A flag to denote whether printing in lower case is enabled for extended text tokens o DTW8 A mask for capitalising the next letter in an extended text token o FONT% (I/O processor) A copy of the character definition bitmap table from the MOS ROM o JMTB The extended token table for jump tokens 1-32 (DETOK) o MTIN Lookup table for random tokens in the extended token table (0-37) o printflag A flag that determines whether to send text output to the printer as well as the screen o QQ16 The two-letter token lookup table o QQ18 The recursive token table for tokens 0-148 o RLINE The OSWORD configuration block used to fetch a line of text from the keyboard o RUGAL The criteria for systems with extended decription overrides o RUPLA System numbers that have extended decription overrides o RUTOK The second extended token table for recursive tokens 0-26 (DETOK3) o TENS A constant used when printing large numbers in BPRNT o TKN1 The first extended token table for recursive tokens 0-255 (DETOK) o TKN2 The extended two-letter token lookup table o Macros o CHAR Macro definition for characters in the recursive token table o CONT Macro definition for control codes in the recursive token table o ECHR Macro definition for characters in the extended token table o EJMP Macro definition for jump tokens in the extended token table o ERND Macro definition for random tokens in the extended token table o ETOK Macro definition for recursive tokens in the extended token table o ETWO Macro definition for two-letter tokens in the extended token table o RTOK Macro definition for recursive tokens in the recursive token table o TOKN Macro definition for standard tokens in the extended token table o TWOK Macro definition for two-letter tokens in the token table + Tube How 6502 Second Processor Elite communicates over the Tube o Subroutines o newosrdch (I/O processor) The custom OSRDCH routine for reading characters o NWOSWD (I/O processor) The custom OSWORD routine o PUTBACK (I/O processor) Reset the OSWRCH vector in WRCHV to point to USOSWRCH o USOSWRCH (I/O processor) The custom OSWRCH routine for writing characters and implementing jump table commands o Variables o JMPTAB (I/O processor) The lookup table for OSWRCH jump commands (128-147) o OSWVECS (I/O processor) The lookup table for OSWORD jump commands (240-255) + Universe Ship spawning, the local bubble, system/market generation o Subroutines o GINF Fetch the address of a ship's data block into INF o GTHG Spawn a Thargoid ship and a Thargon companion o GVL Calculate the availability of market items o hyp1 Process a jump to the system closest to (QQ9, QQ10) o jmp Set the current system to the selected system o KILLSHP * Remove a ship from our local bubble of universe o KS1 Remove the current ship from our local bubble of universe o KS2 Check the local bubble for missiles with target lock o KS3 Set the SLSP ship heap pointer after shuffling ship slots o KS4 Remove the space station and replace it with the sun o NwS1 Flip the sign and double an INWK byte o NWSHP Add a new ship to our local bubble of universe o NWSPS Add a new space station to our local bubble of universe o ping Set the selected system to the current system o SFS1 * Spawn a child ship from the current (parent) ship o SOLAR Set up various aspects of arriving in a new system o SOS1 Update the missile indicators, set up the planet data block o SPIN Randomly spawn cargo from a destroyed ship o STORE Copy the ship data block at INWK back to the K% workspace o TT111 Set the current system to the nearest system to a point o TT20 Twist the selected system's seeds four times o TT24 * Calculate system data from the system seeds o TT25 * Show the Data on System screen (red key f6) o TT54 * Twist the selected system's seeds o TT81 Set the selected system's seeds to those of system 0 o Ze Initialise the INWK workspace to a hostile ship o Variables o spasto Contains the address Coriolis space station's ship blueprint o UNIV Table of pointers to the local universe's ship data blocks + Utility routines Memory/screen clearing, delay routines, random number generators o Subroutines o backtonormal Disable the keyboard, set the SVN flag to 0, and return with A = 0 o BRBR The standard BRKV handler for the game o CLDELAY Delay by iterating through 5 * 256 (1280) empty loops o cls (I/O processor) Clear the top part of the screen and draw a white border o CLYNS Clear the bottom three text rows of the mode 1 screen by sending a #clyns command to the I/O processor o CLYNS (I/O processor) Implement the #clyns command (clear the bottom of the screen) o DELAY Wait for a specified time, in 1/50s of a second o DOBRK (I/O processor) Implement the OSWRCH 145 command (execute a BRK instruction) o DOCOL (I/O processor) Implement the #SETCOL command (set the current colour) o DORND * Generate random numbers o DORND (Loader 1) Generate random numbers o FX200 Set the behaviour of the ESCAPE and BREAK keys o MVBL (Loader 2) Move a multi-page block of memory from one location to another o OSB (Loader 1) A convenience routine for calling OSBYTE with Y = 0 o SCLI2 Execute an OS command, setting the SVN flag while it's running o TRADEMODE Clear the screen and set up a printable trading screen o TT66 Clear the screen and set the current view type o TTX66 Send control code 11 to the I/O processor to clear the top part of the screen and draw a white border o TTX66 (I/O processor) Clear the top part of the screen and draw a white border o ZEBC Zero-fill pages &B and &C o ZERO Reset the local bubble of universe and ship status o ZES1 Zero-fill the page whose number is in X o ZES1 (I/O processor) Zero-fill the page whose number is in X o ZES2 Zero-fill a specific page o ZES2 (I/O processor) Zero-fill a specific page o ZEVB Zero-fill the Y1VB variable o ZINF Reset the INWK workspace and orientation vectors o ZINF2 Reset the INWK workspace and orientation vectors o Variables o brkd The brkd counter for error handling o F% Denotes the end of the main game code, from Elite A to Elite J o Macros o MVE (Loader 2) Move a one-page block of memory from one location to another + Workspaces Collections of important variables into blocks o Workspaces o I/O variables (I/O processor) Various variables used by the I/O processor o K% * Ship data blocks o LP Variables used for displaying the scrolling text in the demo o Parasite variables Various variables used by the parasite o UP Ship slots, variables o WP Variables o XX3 Temporary storage space for complex calculations o ZP * Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (I/O processor) Important variables used by the I/O processor o ZP (Loader 1) Important variables used by the loader o ZP (Loader 2) Important variables used by the loader * BBC Master source code The smoothest animation of all the BBC versions + Version information + About the BBC Master versionDetails of the smoothest version of Elite + Different variants of the BBC Master versionCode variations found in BBC Master Elite + BBC Master source code by file + Map of the source code An overview of how the source code for Elite is structured + Annotated original source files The source files in their original structure o Game loader o Loader source The loading screen and set-up for the main game o Main game o Workspaces The main variable workspaces used in Elite o Elite A source Part 1 of the main game code o Elite B source Part 2 of the main game code o Elite C source Part 3 of the main game code o Elite D source Part 4 of the main game code o Elite E source Part 5 of the main game code o Elite F source Part 6 of the main game code o Elite G source Part 7 of the main game code o Elite H source Part 8 of the main game code o Game data o Game data source The game data file, which contains the dashboard image, ship blueprints and text tokens o Ship blueprints Data for the 33 different ship designs o Text tokens Elite's tokenised game text + BBC Master source code by category + Charts Long-range and short-range galactic charts o Subroutines o hm Select the closest system and redraw the chart crosshairs o HME2 Search the galaxy for a system o TT103 Draw a small set of crosshairs on a chart o TT105 Draw crosshairs on the Short-range Chart, with clipping o TT114 Display either the Long-range or Short-range Chart o TT123 Move galactic coordinates by a signed delta o TT16 Move the crosshairs on a chart o TT22 * Show the Long-range Chart (red key f4) o TT23 * Show the Short-range Chart (red key f5) + Dashboard The dials, 3D scanner and compass o Subroutines o ABORT Disarm missiles and update the dashboard indicators o ABORT2 Set/unset the lock target for a missile and update the dashboard o BUMP2 Bump up the value of the pitch or roll dashboard indicator o cntr Apply damping to the pitch or roll dashboard indicator o COMPAS * Update the compass o DIALS (Part 1 of 4) Update the dashboard: speed indicator o DIALS (Part 2 of 4) Update the dashboard: pitch and roll indicators o DIALS (Part 3 of 4) Update the dashboard: four energy banks o DIALS (Part 4 of 4) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIL2 Update the roll or pitch indicator on the dashboard o DILX * Update a bar-based indicator on the dashboard o DOT Draw a dash on the compass o ECBLB Light up the E.C.M. indicator bulb ("E") on the dashboard o ECBLB2 Start up the E.C.M. (indicator, start countdown and make sound) o MSBAR Draw a specific indicator in the dashboard's missile bar o msblob Display the dashboard's missile indicators in green o PZW Fetch the current dashboard colours, to support flashing o PZW2 Fetch the current dashboard colours for non-striped indicators, to support flashing o REDU2 Reduce the value of the pitch or roll dashboard indicator o SCAN * Display the current ship on the scanner o SP1 Draw the space station on the compass o SP2 Draw a dot on the compass, given the planet/station vector o SPBLB Light up the space station indicator ("S") on the dashboard o WPSHPS Clear the scanner, reset the ball line and sun line heaps o Variables o ECBT The character bitmap for the E.C.M. indicator bulb o SPBT The bitmap definition for the space station indicator bulb + Drawing circles Hyperspace tunnels, launch rings and planets o Subroutines o BLINE * Draw a circle segment and add it to the ball line heap o CHKON Check whether any part of a circle appears on the extended screen o CIRCLE Draw a circle for the planet o CIRCLE2 * Draw a circle (for the planet or chart) o HFS2 * Draw the launch or hyperspace tunnel o LAUN Make the launch sound and draw the launch tunnel o LL164 Make the hyperspace sound and draw the hyperspace tunnel o TT128 * Draw a circle on a chart o TT14 Draw a circle with crosshairs on a chart + Drawing lines The core line-drawing routines o Subroutines o BOMBFX Erase the energy bomb zig-zag lightning bolt, make the sound of the energy bomb going off, draw a new bolt and repeat four times o BOMBINIT Randomise and draw the energy bomb's zig-zag lightning bolt lines o BOMBLINES Draw the zig-zag lightning bolt for the energy bomb o DVLOIN Draw a horizontal line from (A, 24) to (A, 152) o EDGES Draw a horizontal line given a centre and a half-width o HLOIN * Draw a horizontal line from (X1, Y1) to (X2, Y1) o HLOIN2 Remove a line from the sun line heap and draw it on-screen o LASLI Draw the laser lines for when we fire our lasers o LL118 Move a point along a line until it is on-screen o LL145 (Part 1 of 4) * Clip line: Work out which end-points are on-screen, if any o LL145 (Part 2 of 4) Clip line: Work out if any part of the line is on-screen o LL145 (Part 3 of 4) Clip line: Calculate the line's gradient o LL145 (Part 4 of 4) Clip line: Call the routine in LL188 to do the actual clipping o LL30 Draw a one-segment line o LLX30 Draw a ship line using flicker-free animation o LOIN (Part 1 of 7) * Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 2 of 7) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 3 of 7) Draw a shallow line going right and up or left and down o LOIN (Part 4 of 7) Draw a shallow line going right and down or left and up o LOIN (Part 5 of 7) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 6 of 7) Draw a steep line going up and left or down and right o LOIN (Part 7 of 7) Draw a steep line going up and right or down and left o NLIN Draw a horizontal line at pixel row 23 to box in a title o NLIN2 Draw a screen-wide horizontal line at the pixel row in A o NLIN3 Print a title and a horizontal line at row 19 to box it in o NLIN4 Draw a horizontal line at pixel row 19 to box in a title o TT15 Draw a set of crosshairs o Variables o BOMBSTEP A set of x-coordinates that are used as the basis for the energy bomb's zig-zag lightning bolt o BOMBX This is where we store the x-coordinates for the energy bomb's zig-zag lightning bolt o BOMBY This is where we store the y-coordinates for the energy bomb's zig-zag lightning bolt o SIGHTCOL Colours for the crosshair sights on the different laser types + Drawing pixels How to plot pixels in various colours o Subroutines o CPIX2 * Draw a single-height dash on the dashboard o PIX (Loader) Draw a single pixel at a specific coordinate o PIXEL * Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o PIXEL2 Draw a stardust particle relative to the screen centre o Variables o CTWOS Ready-made single-pixel character row bytes for mode 2 o orange Lookup table for 2-pixel mode 1 orange pixels for the sun o PXCL A four-colour mode 1 pixel byte that represents a dot's distance o TWFL Ready-made character rows for the left end of a horizontal line o TWFR Ready-made character rows for the right end of a horizontal line o TWOS Ready-made single-pixel character row bytes for mode 1 o TWOS (Loader) Ready-made single-pixel character row bytes for mode 1 o TWOS2 Ready-made double-pixel character row bytes for mode 1 o ylookup Lookup table for converting pixel y-coordinate to page number of screen address + Drawing planets Planets with meridians and craters o Subroutines o PL2 Remove the planet or sun from the screen o PL21 Return from a planet/sun-drawing routine with a failure flag o PL9 (Part 1 of 3) * Draw the planet, with either an equator and meridian, or a crater o PL9 (Part 2 of 3) Draw the planet's equator and meridian o PL9 (Part 3 of 3) Draw the planet's crater o PLANET Draw the planet or sun o PLL1 (Loader) * Draw Saturn on the loading screen o PLS1 Calculate (Y A) = nosev_x / z o PLS2 Draw a half-ellipse o PLS22 * Draw an ellipse or half-ellipse o PLS3 Calculate (Y A P) = 222 * roofv_x / z o PLS4 Calculate CNT2 = arctan(P / A) / 4 o PLS5 Calculate roofv_x / z and roofv_y / z o PLS6 Calculate (X K) = (A P) / (z_sign z_hi z_lo) o WP1 Reset the ball line heap o WPLS2 Remove the planet from the screen o Variables o CNT (Loader) A counter for use in drawing Saturn's planetary body o CNT2 (Loader) A counter for use in drawing Saturn's background stars o CNT3 (Loader) A counter for use in drawing Saturn's rings o RAND (Loader) The random number seed used for drawing Saturn + Drawing ships The celebrated 3D ship plotting process o Subroutines o DOEXP * Draw an exploding ship o LL9 (Part 1 of 12) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 2 of 12) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 3 of 12) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 4 of 12) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 5 of 12) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 6 of 12) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 8 of 12) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 9 of 12) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 10 of 12) Draw ship: Calculate the visibility of each of the ship's edges and draw the visible ones using flicker-free animation o LL9 (Part 11 of 12) Draw ship: Loop back for the next edge o LL9 (Part 12 of 12) Draw ship: Draw all the visible edges from the ship line heap o PROJ Project the current ship onto the screen o SHPPT Draw a distant ship as a point rather than a full wireframe o Variables o E% (Game data) Ship blueprints default NEWB flags o EXCOL Colours for ship explosions o scacol Ship colours on the scanner o SHIP_ADDER (Game data) Ship blueprint for an Adder o SHIP_ANACONDA (Game data) Ship blueprint for an Anaconda o SHIP_ASP_MK_2 (Game data) Ship blueprint for an Asp Mk II o SHIP_ASTEROID (Game data) Ship blueprint for an asteroid o SHIP_BOA (Game data) Ship blueprint for a Boa o SHIP_BOULDER (Game data) Ship blueprint for a boulder o SHIP_CANISTER (Game data) Ship blueprint for a cargo canister o SHIP_COBRA_MK_1 (Game data) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_3 (Game data) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3_P (Game data) Ship blueprint for a Cobra Mk III (pirate) o SHIP_CONSTRICTOR (Game data) Ship blueprint for a Constrictor o SHIP_CORIOLIS (Game data) Ship blueprint for a Coriolis space station o SHIP_COUGAR (Game data) Ship blueprint for a Cougar o SHIP_DODO (Game data) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_ESCAPE_POD (Game data) Ship blueprint for an escape pod o SHIP_FER_DE_LANCE (Game data) Ship blueprint for a Fer-de-Lance o SHIP_GECKO (Game data) Ship blueprint for a Gecko o SHIP_KRAIT (Game data) Ship blueprint for a Krait o SHIP_MAMBA (Game data) Ship blueprint for a Mamba o SHIP_MISSILE (Game data) Ship blueprint for a missile o SHIP_MORAY (Game data) Ship blueprint for a Moray o SHIP_PLATE (Game data) Ship blueprint for an alloy plate o SHIP_PYTHON (Game data) Ship blueprint for a Python o SHIP_PYTHON_P (Game data) Ship blueprint for a Python (pirate) o SHIP_ROCK_HERMIT (Game data) Ship blueprint for a rock hermit (asteroid) o SHIP_SHUTTLE (Game data) Ship blueprint for a Shuttle o SHIP_SIDEWINDER (Game data) Ship blueprint for a Sidewinder o SHIP_SPLINTER (Game data) Ship blueprint for a splinter o SHIP_THARGOID (Game data) Ship blueprint for a Thargoid mothership o SHIP_THARGON (Game data) Ship blueprint for a Thargon o SHIP_TRANSPORTER (Game data) Ship blueprint for a Transporter o SHIP_VIPER (Game data) Ship blueprint for a Viper o SHIP_WORM (Game data) Ship blueprint for a Worm o shpcol Ship colours o XX21 (Game data) Ship blueprints lookup table o Macros o EDGE (Game data) Macro definition for adding edges to ship blueprints o FACE (Game data) Macro definition for adding faces to ship blueprints o VERTEX (Game data) Macro definition for adding vertices to ship blueprints + Drawing suns The epic, shimmering Elite sun o Subroutines o FLFLLS Reset the sun line heap o SUN (Part 1 of 4) Draw the sun: Set up all the variables needed o SUN (Part 2 of 4) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 3 of 4) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 4 of 4) Draw the sun: Continue to the top of the screen, erasing old sun o WPLS Remove the sun from the screen + Equipment Buying and selling weapons and ship upgrades o Subroutines o eq Subtract the price of equipment from the cash pot o EQSHP * Show the Equip Ship screen (red key f3) o prx Return the price of a piece of equipment o qv Print a menu of the four space views, for buying lasers o refund Install a new laser, processing a refund if applicable o Variables o PRXS Equipment prices + Flight Docking, hyperspace, views, shields and more o Subroutines o DCS1 Calculate the vector from the ideal docking position to the ship o DENGY Drain some energy from the energy banks o DOCKIT Apply docking manoeuvres to the ship in INWK o DOENTRY Dock at the space station, show the ship hangar and work out any mission progression o ESCAPE Launch our escape pod o Ghy Perform a galactic hyperspace jump o hy6 Print a message to say no hyperspacing inside the station o hyp Start the hyperspace process o LOOK1 Initialise the space view o MJP Process a mis-jump into witchspace o OOPS Take some damage o OUCH Potentially lose cargo or equipment following damage o PLUT * Flip the coordinate axes for the four different views o SESCP Spawn an escape pod from the current (parent) ship o SHD Charge a shield and drain some energy from the energy banks o SIGHT Draw the laser crosshairs o TT110 Launch from a station or show the front space view o TT18 Try to initiate a jump into hyperspace o TTX110 Set the current system to the nearest system and return to hyp o WARP * Perform an in-system jump o wW Start a hyperspace countdown + Inventory Showing the contents of the hold o Subroutines o TT210 Show a list of current cargo in our hold, optionally to sell o TT213 * Show the Inventory screen (red key f9) o TT214 Ask a question with a "Y/N?" prompt and return the response + Keyboard Processing key presses and joysticks o Subroutines o CTRL Scan the keyboard to see if CTRL is currently pressed o CTRLmc Scan the Master Compact keyboard to see if CTRL is currently pressed o DJOY Scan the keyboard for cursor key or digital joystick movement o DK4 Scan for pause, configuration and secondary flight keys o DKS3 Toggle a configuration setting and emit a beep o DKS4 Scan the keyboard to see if a specific key is being pressed o DKS4mc Scan the Master Compact keyboard to see if a specific key is being pressed o DOKEY * Scan for the seven primary flight controls o FLKB Flush the keyboard buffer o GETYN Wait until either "Y" or "N" is pressed o PAS1 Display a rotating ship at space coordinates (0, 120, 256) and scan the keyboard o PAUSE Display a rotating ship, waiting until a key is pressed, then remove the ship from the screen o PAUSE2 Wait until a key is pressed, ignoring any existing key press o RDFIRE Read the fire button on either the analogue or digital joystick o RDJOY Read from either the analogue or digital joystick o RDKEY Scan the keyboard for key presses o RDKEY2 Scan the keyboard for a flight key and update the key logger o RETURN Scan the keyboard to see if RETURN is currently pressed o SHIFT Scan the keyboard to see if SHIFT is currently pressed o TT102 * Process function key, save key, hyperspace and chart key presses and update the hyperspace counter o TT17 Scan the keyboard for cursor key or joystick movement o TT17X Scan the digital joystick for movement o TT217 Scan the keyboard until a key is pressed o U% Clear the key logger o Variables o CKEYS The keys used to toggle configuration settings when the game is paused o KTRAN The key logger buffer that gets updated by the OSWORD 240 command o KYTB Lookup table for in-flight keyboard controls o TRANTABLE Translation table from internal key number to ASCII + Loader The loading screen and system setup o Subroutines o BEGIN Initialise the configuration variables and start the game o Elite loader (Loader) Perform a number of OS calls, check for sideways RAM, load and move the main game data, and load and run the main game code o S% Move code, set up break handler and start the game o STARTUP Set the various vectors, interrupts and timers o Variables o Dashboard image (Game data) The binary for the dashboard image o MESS1 (Loader) The OS command string for loading the BDATA binary o MESS2 (Loader) The OS command string for loading the main game code binary o MESS3 (Loader) The OS command string for changing the disc directory to E + Main loop The core loop that runs Elite o Subroutines o Main flight loop (Part 1 of 16) Seed the random number generator o Main flight loop (Part 2 of 16) Calculate the alpha and beta angles from the current pitch and roll of our ship o Main flight loop (Part 3 of 16) Scan for flight keys and process the results o 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 o Main flight loop (Part 5 of 16) For each nearby ship: If an energy bomb has been set off, potentially kill this ship o 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% o Main flight loop (Part 7 of 16) For each nearby ship: Check whether we are docking, scooping or colliding with it o Main flight loop (Part 8 of 16) For each nearby ship: Process us potentially scooping this item o 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 o Main flight loop (Part 10 of 16) For each nearby ship: Remove if scooped, or process collisions o Main flight loop (Part 11 of 16) For each nearby ship: Process missile lock and firing our laser o Main flight loop (Part 12 of 16) For each nearby ship: Draw the ship, remove if killed, loop back o Main flight loop (Part 13 of 16) Show energy bomb effect, charge shields and energy banks o Main flight loop (Part 14 of 16) Spawn a space station if we are close enough to the planet o Main flight loop (Part 15 of 16) Perform altitude checks with the planet and sun and process fuel scooping if appropriate o Main flight loop (Part 16 of 16) Process laser pulsing, E.C.M. energy drain, call stardust routine o Main game loop (Part 1 of 6) Spawn a trader (a Cobra Mk III, Python, Boa or Anaconda) o Main game loop (Part 2 of 6) * Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister o Main game loop (Part 3 of 6) Potentially spawn a cop, particularly if we've been bad o Main game loop (Part 4 of 6) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates o Main game loop (Part 5 of 6) Cool down lasers, make calls to update the dashboard o Main game loop (Part 6 of 6) Process non-flight key presses (red function keys, docked keys) + Market Prices, availability, selling and buying cargo o Subroutines o gnum Get a number from the keyboard o NWDAV4 Print an "ITEM?" error, make a beep and rejoin the TT210 routine o tnpr Work out if we have space for a specific amount of cargo o tnpr1 Work out if we have space for one tonne of cargo o TT151 Print the name, price and availability of a market item o TT152 Print the unit ("t", "kg" or "g") for a market item o TT160 Print "t" (for tonne) and a space o TT161 Print "kg" (for kilograms) o TT163 Print the headers for the table of market prices o TT167 * Show the Market Price screen (red key f7) o TT16a Print "g" (for grams) o TT208 * Show the Sell Cargo screen (red key f2) o TT219 * Show the Buy Cargo screen (red key f1) o var Calculate QQ19+3 = economy * |economic_factor| o Variables o QQ23 Market prices table o Macros o ITEM Macro definition for the market prices table + Maths (Arithmetic) Addition, subtraction, multiplication, division o Subroutines o ADD * Calculate (A X) = (A P) + (S R) o ADD_DUPLICATE Calculate (A X) = (A P) + (S R) o DV41 Calculate (P R) = 256 * DELTA / A o DV42 Calculate (P R) = 256 * DELTA / z_hi o DVID3B2 Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID4 * Calculate (P R) = 256 * A / Q o DVID4_DUPLICATE Calculate (P R) = 256 * A / Q o DVIDT Calculate (P+1 A) = (A P) / Q o FMLTU Calculate A = A * Q / 256 o FMLTU2 Calculate A = K * sin(A) o GC2 Calculate (Y X) = (A P) * 4 o GCASH Calculate (Y X) = P * Q * 4 o LCASH Subtract an amount of cash from the cash pot o LL120 Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL123 Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL129 Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL28 Calculate R = 256 * A / Q o LL38 Calculate (S A) = (S R) + (A Q) o LL5 Calculate Q = SQRT(R Q) o LL61 Calculate (U R) = 256 * A / Q o LL62 Calculate 128 - (U R) o MAD Calculate (A X) = Q * A + (S R) o MAS3 Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block o MCASH Add an amount of cash to the cash pot o MLS1 Calculate (A P) = ALP1 * A o MLS2 Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLTU2 Calculate (A P+1 P) = (A ~P) * Q o MLU1 Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust o MLU2 Calculate (A P) = |A| * Q o MU1 Copy X into P and A, and clear the C flag o MU11 Calculate (A P) = P * X o MU5 Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU6 Set P(1 0) = (A A) o MULT1 Calculate (A P) = Q * A o MULT12 Calculate (S R) = Q * A o MULT3 Calculate K(3 2 1 0) = (A P+1 P) * Q o MULTU * Calculate (A P) = P * Q o MUT1 Calculate R = XX and (A P) = Q * A o MUT2 Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT3 Unused routine that does the same as MUT2 o PIX1 Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o ROOT (Loader) Calculate ZP = SQRT(ZP(1 0)) o SPS2 Calculate (Y X) = A / 10 o SQUA Clear bit 7 of A and calculate (A P) = A * A o SQUA2 Calculate (A P) = A * A o SQUA2 (Loader) Calculate (A P) = A * A o TAS1 Calculate K3 = (x_sign x_hi x_lo) - V(1 0) o TIS1 Calculate (A ?) = (-X * A + (S R)) / 96 o TIS2 Calculate A = A / Q o TIS3 Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o VCSU1 Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station o VCSUB Calculate vector K3(8 0) = [x y z] - coordinates in (A V) o Variables o antilog Binary antilogarithm table o log Binary logarithm table (high byte) o logL Binary logarithm table (low byte) + Maths (Geometry) Vectors, coordinates, dot products and matrices o Subroutines o ARCTAN Calculate A = arctan(P / Q) o FAROF Compare x_hi, y_hi and z_hi with 224 o FAROF2 Compare x_hi, y_hi and z_hi with A o LL51 Calculate the dot product of XX15 and XX16 o MAS1 Add an orientation vector coordinate to an INWK coordinate o MAS2 Calculate a cap on the maximum distance to the planet or sun o MAS4 Calculate a cap on the maximum distance to a ship o NORM * Normalise the three-coordinate vector in XX15 o SPS1 Calculate the vector to the planet and store it in XX15 o SPS3 Copy a space coordinate from the K% block into K3 o SPS4 Calculate the vector to the space station o TAS2 Normalise the three-coordinate vector in K3 o TAS3 Calculate the dot product of XX15 and an orientation vector o TAS4 Calculate the dot product of XX15 and one of the space station's orientation vectors o TAS6 Negate the vector in XX15 so it points in the opposite direction o TIDY * Orthonormalise the orientation vectors for a ship o Variables o ACT (Game data) Arctan table o SNE (Game data) Sine/cosine table + Missions Only in the enhanced versions of Elite o Subroutines o BRIEF Start mission 1 and show the mission briefing o BRIEF2 Start mission 2 o BRIEF3 Receive the briefing and plans for mission 2 o BRIS Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds o BRP Print an extended token and show the Status Mode screen o DEBRIEF Finish mission 1 o DEBRIEF2 Finish mission 2 o THERE Check whether we are in the Constrictor's system in mission 1 + Moving Moving and rotating ships and planets in space o Subroutines o MV40 Rotate the planet or sun's location in space by the amount of pitch and roll of our ship o MVEIT (Part 1 of 9) Move current ship: Tidy the orientation vectors o MVEIT (Part 2 of 9) Move current ship: Call tactics routine, remove ship from scanner o MVEIT (Part 3 of 9) Move current ship: Move ship forward according to its speed o MVEIT (Part 4 of 9) Move current ship: Apply acceleration to ship's speed as a one-off o MVEIT (Part 5 of 9) Move current ship: Rotate ship's location by our pitch and roll o MVEIT (Part 6 of 9) Move current ship: Move the ship in space according to our speed o MVEIT (Part 7 of 9) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 8 of 9) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 9 of 9) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVS4 * Apply pitch and roll to an orientation vector o MVS5 Apply a 3.6 degree pitch or roll to an orientation vector o MVT1 Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT3 Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1) o MVT6 Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o SFS2 Move a ship in space along one of the coordinate axes + Save and load Commander files and competition codes o Subroutines o BRKBK Set the standard BRKV handler for the game o CATS Ask for a disc drive number and print a catalogue of that drive o CHECK Calculate the checksum for the last saved commander data block o DELT Catalogue a disc, ask for a filename to delete, and delete the file o GTDIR Fetch the name of an ADFS directory on the Master Compact and change to that directory o GTDRV Get an ASCII disc drive drive number from the keyboard o GTNMEW Fetch the name of a commander file to save or load o JAMESON Restore the default JAMESON commander o LOAD Load the commander file o LOD * Load a commander file o SAVE Save the commander file o SVE * Display the disc access menu and process saving of commander files o TR1 Copy the last saved commander's name from NA% to INWK o TRNME Copy the last saved commander's name from INWK to NA% o Variables o CHK First checksum byte for the saved commander data file o CHK2 Second checksum byte for the saved commander data file o CTLI The OS command string for cataloguing a disc o DEFAULT% The data block for the default commander o DELI The OS command string for deleting a file o DIRI The OS command string for changing directory on the Master Compact o LDLI The OS command string for loading a commander file o NA% The data block for the last saved commander o NAMELEN1 Contains the length of the most recently entered commander name o NAMELEN2 Contains the length of the last saved commander name o S1% The drive and directory number used when saving or loading a commander file o stack Temporary storage for the stack pointer when jumping to the break handler at BRBR o SVLI The OS command string for saving a commander file + Screen mode Elite's famous split-screen mode o Subroutines o DET1 Show or hide the dashboard (for when we die) o DOVDU19 Change the mode 1 palette o IRQ1 * The main screen-mode interrupt handler (IRQ1V points here) o WSCAN Implement the #wscn command (wait for the vertical sync) o Variables o B% (Loader) VDU commands for setting the square mode 1 screen o DLCNT The line scan counter in DL gets reset to this value at each vertical sync, before decrementing with each line scan o TVT1 Palette data for the mode 2 part of the screen (the dashboard) o TVT3 Palette data for the mode 1 part of the screen (the top part) o VEC The original value of the IRQ1 vector o VSCAN Defines the split position in the split-screen mode + Ship hangar The ship hangar that's displayed on docking o Subroutines o HALL Draw the ships in the ship hangar, then draw the hangar o HANGER Display the ship hangar o HAS1 Draw a ship in the ship hangar o HAS2 Draw a hangar background line from left to right o HAS3 Draw a hangar background line from right to left o Variables o HATB Ship hangar group table o HCNT The number of ships being displayed in the ship hangar + Sound Explosions, laser fire, hyperspace and more o Subroutines o BEEP Make a short, high beep o BELL Make a standard system beep o ECMOF Switch off the E.C.M. o EXNO Make the sound of a laser strike or ship explosion o EXNO2 Process us making a kill o EXNO3 Make an explosion sound o LOWBEEP Make a long, low beep o NOISE * Make the sound whose number is in Y by populating the sound buffer o NOISE2 Process the contents of the sound buffer and send it to the sound chip o NOISEHIT Make the sound of us being hit o NOISELASER Make the sound of our laser firing o SOUND Write sound data directly to the 76489 sound chip o SRESET Reset the sound buffer and turn off all sound channels o Variables o CHANNEL Sound chip data mask for choosing a tone channel in the range 0-2 o QUIET Sound chip data to turn the volume down on all channels and to act as a mask for choosing a tone channel in the range 0-2 o SBUF The sound buffer where the data to be sent to the sound chip is processed o SFX1 Sound data block 1 o SFX2 Sound data block 2 o SFX3 Sound data block 3 o SFX4 Sound data block 4 + Stardust Stardust generation and movement o Subroutines o FLIP Reflect the stardust particles in the screen diagonal and redraw the stardust field o nWq Create a random cloud of stardust o NWSTARS Initialise the stardust field o STARS * The main routine for processing the stardust o STARS1 Process the stardust for the front view o STARS2 Process the stardust for the left or right view o STARS6 Process the stardust for the rear view + Start and end The title screen... and the Game Over screen o Subroutines o BR1 (Part 1 of 2) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 2 of 2) Show the "Press Fire or Space, Commander" screen and start the game o DEATH * Display the death screen o DEATH2 Reset most of the game and restart from the title screen o RES2 Reset a number of flight variables and workspaces o RESET Reset most variables o TITLE * Display a title screen with a rotating ship and prompt o TT170 * Main entry point for the Elite game code + Status Showing the commander's status and rank o Subroutines o BAD Calculate how bad we have been o BAY Go to the docking bay (i.e. show the Status Mode screen) o STATUS * Show the Status Mode screen (red key f8) o Variables o TALLYFRAC (Game data) Fractional number of kills awarded for destroying each type of ship o TALLYINT (Game data) Integer number of kills awarded for destroying each type of ship + Tactics AI tactics for enemy ships and missiles o Subroutines o ANGRY Make a ship hostile o FR1 Display the "missile jammed" message o FRMIS Fire a missile from our ship o FRS1 Launch a ship straight ahead of us, below the laser sights o HITCH * Work out if the ship in INWK is in our crosshairs o SFRMIS Add an enemy missile to our local bubble of universe o TACTICS (Part 1 of 7) Apply tactics: Process missiles, both enemy missiles and our own o TACTICS (Part 2 of 7) * Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate o TACTICS (Part 3 of 7) Apply tactics: Calculate dot product to determine ship's aim o TACTICS (Part 4 of 7) Apply tactics: Check energy levels, maybe launch escape pod if low o TACTICS (Part 5 of 7) Apply tactics: Consider whether to launch a missile at us o TACTICS (Part 6 of 7) Apply tactics: Consider firing a laser at us, if aim is true o TACTICS (Part 7 of 7) Apply tactics: Set pitch, roll, and acceleration + Text Recursive tokens, control codes, two-letter tokens and more o Subroutines o BPRNT * Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o CHPR Print a character at the text cursor by poking into screen memory o cmn Print the commander's name o cpl Print the selected system name o crlf Tab to column 21 and print a colon o csh Print the current amount of cash o DETOK Print an extended recursive token from the TKN1 token table o DETOK2 Print an extended text token (1-255) o DETOK3 Print an extended recursive token from the RUTOK token table o dn Print the amount of cash and beep o dn2 Make a short, high beep and delay for 0.5 seconds o DOXC Move the text cursor to a specific column o DOYC Move the text cursor to a specific row o ee3 Print the hyperspace countdown in the top-left of the screen o ex Print a recursive token o FEED Print a newline o fwl Print fuel and cash levels o HEXPRNT Print a number in hexadecimal (unused) o INCYC Move the text cursor to the next row o me1 Erase an old in-flight message and display a new one o me2 Remove an in-flight message from the space view o mes9 Print a text token, possibly followed by " DESTROYED" o MESS Display an in-flight message o MT1 Switch to ALL CAPS when printing extended tokens o MT13 Switch to lower case when printing extended tokens o MT14 Switch to justified text when printing extended tokens o MT15 Switch to left-aligned text when printing extended tokens o MT16 Print the character in variable DTW7 o MT17 Print the selected system's adjective, e.g. Lavian for Lave o MT18 Print a random 1-8 letter word in Sentence Case o MT19 Capitalise the next letter o MT2 Switch to Sentence Case when printing extended tokens o MT23 Move to row 10, switch to white text, and switch to lower case when printing extended tokens o MT26 Fetch a line of text from the keyboard o MT27 Print the captain's name during mission briefings o MT28 Print the location hint during the mission 1 briefing o MT29 Move to row 6, switch to white text, and switch to lower case when printing extended tokens o MT30 Display the currently selected media (disc or tape) o MT31 Display the non-selected media (disc or tape) o MT5 Switch to extended tokens o MT6 Switch to standard tokens in Sentence Case o MT8 Tab to column 6 and start a new word when printing extended tokens o MT9 Clear the screen and set the current view type to 1 o ou2 Display "E.C.M.SYSTEM DESTROYED" as an in-flight message o ou3 Display "FUEL SCOOPS DESTROYED" as an in-flight message o OUTX Print the character in Q before returning to gnum o PDESC Print the system's extended description or a mission 1 directive o plf Print a text token followed by a newline o plf2 Print text followed by a newline and indent of 6 characters o pr2 Print an 8-bit number, left-padded to 3 digits, and optional point o pr5 Print a 16-bit number, left-padded to 5 digits, and optional point o pr6 Print 16-bit number, left-padded to 5 digits, no point o prq Print a text token followed by a question mark o qw Print a recursive token in the range 128-145 o spc Print a text token followed by a space o tal Print the current galaxy number o TT11 Print a 16-bit number, left-padded to n digits, and optional point o TT146 Print the distance to the selected system in light years o TT147 Print an error when a system is out of hyperspace range o TT162 Print a space o TT26 * Print a character at the text cursor, with support for verified text in extended tokens o TT27 * Print a text token o TT41 Print a letter according to Sentence Case o TT42 Print a letter in lower case o TT43 Print a two-letter token or recursive token 0-95 o TT45 Print a letter in lower case o TT46 Print a character and switch to capitals o TT60 Print a text token and a paragraph break o TT67 Print a newline o TT67_DUPLICATE Print a newline o TT68 Print a text token followed by a colon o TT69 Set Sentence Case and print a newline o TT70 Display "MAINLY " and jump to TT72 o TT73 Print a colon o TT74 Print a character o TTX69 Print a paragraph break o VOWEL Test whether a character is a vowel o ypl Print the current system name o Variables o DTW1 A mask for applying the lower case part of Sentence Case to extended text tokens o DTW2 A flag that indicates whether we are currently printing a word o DTW3 A flag for switching between standard and extended text tokens o DTW4 Flags that govern how justified extended text tokens are printed o DTW5 The size of the justified text buffer at BUF o DTW6 A flag to denote whether printing in lower case is enabled for extended text tokens o DTW8 A mask for capitalising the next letter in an extended text token o FONT% A copy of the character definition bitmap table from the MOS ROM o JMTB The extended token table for jump tokens 1-32 (DETOK) o MTIN Lookup table for random tokens in the extended token table (0-37) o QQ16 The two-letter token lookup table o QQ18 (Game data) The recursive token table for tokens 0-148 o RLINE The OSWORD configuration block used to fetch a line of text from the keyboard o RUGAL (Game data) The criteria for systems with extended decription overrides o RUPLA (Game data) System numbers that have extended decription overrides o RUTOK (Game data) The second extended token table for recursive tokens 0-26 (DETOK3) o TENS A constant used when printing large numbers in BPRNT o TKN1 (Game data) The first extended token table for recursive tokens 0-255 (DETOK) o TKN2 The extended two-letter token lookup table o Macros o CHAR (Game data) Macro definition for characters in the recursive token table o CONT (Game data) Macro definition for control codes in the recursive token table o ECHR (Game data) Macro definition for characters in the extended token table o EJMP (Game data) Macro definition for jump tokens in the extended token table o ERND (Game data) Macro definition for random tokens in the extended token table o ETOK (Game data) Macro definition for recursive tokens in the extended token table o ETWO (Game data) Macro definition for two-letter tokens in the extended token table o RTOK (Game data) Macro definition for recursive tokens in the recursive token table o TOKN (Game data) Macro definition for standard tokens in the extended token table o TWOK (Game data) Macro definition for two-letter tokens in the token table + Universe Ship spawning, the local bubble, system/market generation o Subroutines o GINF Fetch the address of a ship's data block into INF o GTHG Spawn a Thargoid ship and a Thargon companion o GVL Calculate the availability of market items o hyp1 Process a jump to the system closest to (QQ9, QQ10) o jmp Set the current system to the selected system o KILLSHP * Remove a ship from our local bubble of universe o KS1 Remove the current ship from our local bubble of universe o KS2 Check the local bubble for missiles with target lock o KS3 Set the SLSP ship heap pointer after shuffling ship slots o KS4 Remove the space station and replace it with the sun o NwS1 Flip the sign and double an INWK byte o NWSHP Add a new ship to our local bubble of universe o NWSPS Add a new space station to our local bubble of universe o ping Set the selected system to the current system o SFS1 * Spawn a child ship from the current (parent) ship o SOLAR Set up various aspects of arriving in a new system o SOLARX Set up various aspects of arriving in a new system, including Trumble breeding o SOS1 Update the missile indicators, set up the planet data block o SPIN Randomly spawn cargo from a destroyed ship o TT111 Set the current system to the nearest system to a point o TT20 Twist the selected system's seeds four times o TT24 * Calculate system data from the system seeds o TT25 * Show the Data on System screen (red key f6) o TT54 * Twist the selected system's seeds o TT81 Set the selected system's seeds to those of system 0 o Ze Initialise the INWK workspace to a hostile ship o Variables o spasto Contains the address Coriolis space station's ship blueprint o UNIV Table of pointers to the local universe's ship data blocks + Utility routines Memory/screen clearing, delay routines, random number generators o Subroutines o BRBR The standard BRKV handler for the game o cls Clear the top part of the screen and draw a white border o CLYNS Clear the bottom three text rows of the mode 4 screen o DECRYPT Decrypt a multi-page block of memory o DELAY Wait for a specified time, in 1/50s of a second o DORND * Generate random numbers o DORND (Loader) Generate random numbers o NMICLAIM Claim the NMI workspace (&00A0 to &00A7) o NMIRELEASE Release the NMI workspace (&00A0 to &00A7) o OSB (Loader) A convenience routine for calling OSBYTE with Y = 0 o SAVEZP Save zero page (&0090 to &00FF) into the buffer at &3000 o SCALEX Scale the x-coordinate in A o SCALEY Scale the y-coordinate in A o SCALEY2 Scale the y-coordinate in A o scramble Unscramble the main code o SWAPZP Swap zero page (&0090 to &00EF) with the buffer at &3000 o SWAPZP2 An unused placeholder routine for swapping zero page bytes o TRADEMODE Clear the screen and set up a trading screen o TT66 Clear the screen and set the current view type o TTX66 Clear the top part of the screen and draw a white border o TTX662 Clear the top part of the screen and draw a white border o ZERO Reset the local bubble of universe and ship status o ZES1 Zero-fill the page whose number is in X o ZES2 Zero-fill a specific page o ZINF Reset the INWK workspace and orientation vectors o Variables o F% Denotes the end of the main game code, from Elite A to Elite H + Workspaces Collections of important variables into blocks o Workspaces o K% * Ship data blocks and ship line heaps o UP Configuration variables o WP Ship slots, variables o XX3 Temporary storage space for complex calculations o ZP * Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (Loader) Important variables used by the loader * Acorn Electron source code A cut-down version for the Beeb's little brother + Version information + About the Electron versionDetails of the cut-down version of Elite + Different variants of the Electron versionCode variations found in Electron Elite + Electron source code by file + Map of the source code An overview of how the source code for Elite is structured + Annotated original source files The source files in their original structure o Game loader o Loader source The loading screen, copy protection and set-up for the main game o Main game o Workspaces The main variable workspaces used in Elite o Text tokens Elite's tokenised game text o Elite A source Part 1 of the main game code o Elite B source Part 2 of the main game code o Elite C source Part 3 of the main game code o Elite D source Part 4 of the main game code o Elite E source Part 5 of the main game code o Elite F source Part 6 of the main game code o Elite G source Part 7 of the main game code o Ship blueprints Data for the 11 different ship designs o Big Code File o Big Code File source Concatenates the individual source code parts into one big game file + Electron source code by category + Charts Long-range and short-range galactic charts o Subroutines o hm Select the closest system and redraw the chart crosshairs o TT103 Draw a small set of crosshairs on a chart o TT105 Draw crosshairs on the Short-range Chart, with clipping o TT114 Display either the Long-range or Short-range Chart o TT123 Move galactic coordinates by a signed delta o TT16 Move the crosshairs on a chart o TT22 * Show the Long-range Chart (FUNC-5) o TT23 * Show the Short-range Chart (FUNC-6) + Copy protection Hiding the Elite code from prying eyes o Subroutines o BEGIN% (Loader) Single-byte decryption and copying routine, run on the stack o crunchit (Loader) Multi-byte decryption and copying routine o David7 (Loader) Part of the multi-jump obfuscation code in PROT1 o doPROT1 (Loader) Routine to self-modify the loader code o swine (Loader) Resets the machine if the copy protection detects a problem o Variables o Authors' names The authors' names and a copyright notice, buried in the code o Authors' names (Loader) The authors' names, buried in the code o checksum0 Checksum for the entire main game code o David23 (Loader) Address pointer to the start of the 6502 stack o David9 (Loader) Address used as part of the stack-based decryption loop o MHCA (Loader) Used to set one of the vectors in the copy protection code + Dashboard The dials, 3D scanner and compass o Subroutines o ABORT Disarm missiles and update the dashboard indicators o ABORT2 Set/unset the lock target for a missile and update the dashboard o BULB Draw an indicator bulb on the dashboard o BUMP2 Bump up the value of the pitch or roll dashboard indicator o cntr Apply damping to the pitch or roll dashboard indicator o COMPAS * Update the compass o DIALS (Part 1 of 4) Update the dashboard: speed indicator o DIALS (Part 2 of 4) Update the dashboard: pitch and roll indicators o DIALS (Part 3 of 4) Update the dashboard: four energy banks o DIALS (Part 4 of 4) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIL2 Update the roll or pitch indicator on the dashboard o DILX * Update a bar-based indicator on the dashboard o DOT Draw a dash on the compass o ECBLB Light up the E.C.M. indicator bulb ("E") on the dashboard o ECBLB2 Start up the E.C.M. (indicator, start countdown and make sound) o MSBAR Draw a specific indicator in the dashboard's missile bar o msblob Display the dashboard's missile indicators as white squares o REDU2 Reduce the value of the pitch or roll dashboard indicator o SCAN * Display the current ship on the scanner o SP1 Draw the space station on the compass o SP2 Draw a dot on the compass, given the planet/station vector o SPBLB Light up the space station indicator ("S") on the dashboard o WPSHPS Clear the scanner and reset the ball line heap o Variables o ECBT The character bitmap for the E.C.M. indicator bulb o MDIALS The missile indicator bitmaps for the monochrome dashboard o SPBT The bitmap definition for the space station indicator bulb + Drawing circles Hyperspace tunnels, launch rings and planets o Subroutines o BLINE * Draw a circle segment and add it to the ball line heap o CHKON Check whether any part of a circle appears on the extended screen o CIRCLE Draw a circle for the planet o CIRCLE2 * Draw a circle (for the planet or chart) o HFS2 * Draw the launch or hyperspace tunnel o LAUN Make the launch sound and draw the launch tunnel o LL164 Make the hyperspace sound and draw the hyperspace tunnel o TT128 * Draw a circle on a chart o TT14 Draw a circle with crosshairs on a chart + Drawing lines The core line-drawing routines o Subroutines o HLOIN * Draw a horizontal line from (X1, Y1) to (X2, Y1) o LASLI Draw the laser lines for when we fire our lasers o LL118 Move a point along a line until it is on-screen o LL145 (Part 1 of 4) * Clip line: Work out which end-points are on-screen, if any o LL145 (Part 2 of 4) Clip line: Work out if any part of the line is on-screen o LL145 (Part 3 of 4) Clip line: Calculate the line's gradient o LL145 (Part 4 of 4) Clip line: Call the routine in LL188 to do the actual clipping o LOIN (Part 1 of 7) * Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 2 of 7) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 3 of 7) Draw a shallow line going right and up or left and down o LOIN (Part 4 of 7) Draw a shallow line going right and down or left and up o LOIN (Part 5 of 7) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 6 of 7) Draw a steep line going up and left or down and right o LOIN (Part 7 of 7) Draw a steep line going up and right or down and left o NLIN Draw a horizontal line at pixel row 23 to box in a title o NLIN2 Draw a screen-wide horizontal line at the pixel row in A o NLIN3 Print a title and a horizontal line at row 19 to box it in o NLIN4 Draw a horizontal line at pixel row 19 to box in a title o TT15 Draw a set of crosshairs + Drawing pixels How to plot pixels in various colours o Subroutines o CPIX2 * Draw a single-height dash on the dashboard o CPIX4 Draw a double-height dot on the dashboard o PIX (Loader) Draw a single pixel at a specific coordinate o PIXEL * Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o PIXEL2 Draw a stardust particle relative to the screen centre o Variables o CTWOS Ready-made double-pixel character row bytes for the mode 4 dashboard o TWOS Ready-made single-pixel character row bytes for mode 4 o TWOS (Loader) Ready-made single-pixel character row bytes for mode 4 o TWOS2 Ready-made double-pixel character row bytes for mode 4 + Drawing planets Planets with meridians and craters o Subroutines o PL2 Remove the planet from the screen o PL21 Return from a planet-drawing routine with a failure flag o PLANET Draw the planet o PLL1 (Loader) * Draw Saturn on the loading screen o PLS6 Calculate (X K) = (A P) / (z_sign z_hi z_lo) o WP1 Reset the ball line heap o WPLS2 Remove the planet from the screen o Variables o CNT (Loader) A counter for use in drawing Saturn's planetary body o CNT2 (Loader) A counter for use in drawing Saturn's background stars o CNT3 (Loader) A counter for use in drawing Saturn's rings + Drawing ships The celebrated 3D ship plotting process o Subroutines o DOEXP * Draw an exploding ship o LL9 (Part 1 of 12) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 2 of 12) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 3 of 12) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 4 of 12) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 5 of 12) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 6 of 12) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 8 of 12) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 9 of 12) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 10 of 12) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 11 of 12) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 12 of 12) Draw ship: Draw all the visible edges from the ship line heap o PROJ Project the current ship onto the screen o SHPPT Draw a distant ship as a point rather than a full wireframe o Variables o SHIP_ASTEROID Ship blueprint for an asteroid o SHIP_CANISTER Ship blueprint for a cargo canister o SHIP_COBRA_MK_3 Ship blueprint for a Cobra Mk III o SHIP_CORIOLIS Ship blueprint for a Coriolis space station o SHIP_ESCAPE_POD Ship blueprint for an escape pod o SHIP_MAMBA Ship blueprint for a Mamba o SHIP_MISSILE Ship blueprint for a missile o SHIP_PYTHON Ship blueprint for a Python o SHIP_SIDEWINDER Ship blueprint for a Sidewinder o SHIP_VIPER Ship blueprint for a Viper o XX21 Ship blueprints lookup table o Macros o EDGE Macro definition for adding edges to ship blueprints o FACE Macro definition for adding faces to ship blueprints o VERTEX Macro definition for adding vertices to ship blueprints + Equipment Buying and selling weapons and ship upgrades o Subroutines o eq Subtract the price of equipment from the cash pot o EQSHP * Show the Equip Ship screen (FUNC-4) o prx Return the price of a piece of equipment o qv Print a menu of the four space views, for buying lasers o Variables o PRXS Equipment prices + Flight Docking, hyperspace, views, shields and more o Subroutines o DENGY Drain some energy from the energy banks o ESCAPE Launch our escape pod o Ghy Perform a galactic hyperspace jump o hy6 Print a message to say no hyperspacing inside the station o hyp Start the hyperspace process o LOOK1 Initialise the space view o OOPS Take some damage o OUCH Potentially lose cargo or equipment following damage o PLUT * Flip the coordinate axes for the four different views o SESCP Spawn an escape pod from the current (parent) ship o SHD Charge a shield and drain some energy from the energy banks o SIGHT Draw the laser crosshairs o TT110 Launch from a station or show the front space view o TT18 Try to initiate a jump into hyperspace o WARP * Perform an in-system jump o wW Start a hyperspace countdown + Inventory Showing the contents of the hold o Subroutines o TT210 Show a list of current cargo in our hold, optionally to sell o TT213 * Show the Inventory screen (FUNC-0) o TT214 Ask a question with a "Y/N?" prompt and return the response + Keyboard Processing key presses and joysticks o Subroutines o DK4 Scan for pause, configuration and secondary flight keys o DKS2 Read the joystick position o DKS3 Toggle a configuration setting and emit a beep o DKS4 Scan the keyboard to see if a specific key is being pressed o DOKEY * Scan for the seven primary flight controls o FLKB Flush the keyboard buffer o KEY1 The main keyboard interrupt handler (KEYV points here) o RDKEY Scan the keyboard for key presses o TT102 * Process function key, save key, hyperspace and chart key presses and update the hyperspace counter o TT17 Scan the keyboard for cursor key movement o TT217 Scan the keyboard until a key is pressed o U% Clear the key logger o Variables o KYTB Lookup table for in-flight keyboard controls + Loader The loading screen and system setup o Subroutines o Elite loader (Part 1 of 5) (Loader) Include binaries for recursive tokens and images o Elite loader (Part 2 of 5) (Loader) Perform a number of OS calls, set up sound, push routines on stack o Elite loader (Part 3 of 5) (Loader) Move recursive tokens and images o Elite loader (Part 4 of 5) (Loader) Call part 5 of the loader now that is has been relocated o Elite loader (Part 5 of 5) (Loader) Set up interrupt vectors, calculate checksums, run main game code + Main loop The core loop that runs Elite o Subroutines o Main flight loop (Part 1 of 16) Seed the random number generator o Main flight loop (Part 2 of 16) Calculate the alpha and beta angles from the current pitch and roll of our ship o Main flight loop (Part 3 of 16) Scan for flight keys and process the results o 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 o Main flight loop (Part 5 of 16) For each nearby ship: If an energy bomb has been set off, potentially kill this ship o 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% o Main flight loop (Part 7 of 16) For each nearby ship: Check whether we are docking, scooping or colliding with it o Main flight loop (Part 8 of 16) For each nearby ship: Process us potentially scooping this item o 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 o Main flight loop (Part 10 of 16) For each nearby ship: Remove if scooped, or process collisions o Main flight loop (Part 11 of 16) For each nearby ship: Process missile lock and firing our laser o Main flight loop (Part 12 of 16) For each nearby ship: Draw the ship, remove if killed, loop back o Main flight loop (Part 13 of 16) Show energy bomb effect, charge shields and energy banks o Main flight loop (Part 14 of 16) Spawn a space station if we are close enough to the planet o Main flight loop (Part 15 of 16) Perform altitude checks with the planet o Main flight loop (Part 16 of 16) Process laser pulsing, E.C.M. energy drain, call stardust routine o Main game loop (Part 1 of 6) Spawn a trader (a peaceful Cobra Mk III) o Main game loop (Part 2 of 6) * Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister o Main game loop (Part 3 of 6) Potentially spawn a cop, particularly if we've been bad o Main game loop (Part 4 of 6) Potentially spawn a lone bounty hunter or up to four pirates o Main game loop (Part 5 of 6) Cool down lasers, make calls to update the dashboard o Main game loop (Part 6 of 6) Process non-flight key presses (FUNC keys, docked keys) + Market Prices, availability, selling and buying cargo o Subroutines o gnum Get a number from the keyboard o tnpr Work out if we have space for a specific amount of cargo o TT151 Print the name, price and availability of a market item o TT152 Print the unit ("t", "kg" or "g") for a market item o TT160 Print "t" (for tonne) and a space o TT161 Print "kg" (for kilograms) o TT163 Print the headers for the table of market prices o TT167 * Show the Market Price screen (FUNC-8) o TT16a Print "g" (for grams) o TT208 * Show the Sell Cargo screen (FUNC-3) o TT219 * Show the Buy Cargo screen (FUNC-2) o var Calculate QQ19+3 = economy * |economic_factor| o Variables o QQ23 Market prices table o Macros o ITEM Macro definition for the market prices table + Maths (Arithmetic) Addition, subtraction, multiplication, division o Subroutines o ADD * Calculate (A X) = (A P) + (S R) o DV41 Calculate (P R) = 256 * DELTA / A o DV42 Calculate (P R) = 256 * DELTA / z_hi o DVID3B2 Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID4 * Calculate (P R) = 256 * A / Q o DVIDT Calculate (P+1 A) = (A P) / Q o FMLTU Calculate A = A * Q / 256 o FMLTU2 Calculate A = K * sin(A) o GC2 Calculate (Y X) = (A P) * 4 o GCASH Calculate (Y X) = P * Q * 4 o LCASH Subtract an amount of cash from the cash pot o LL120 Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL123 Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL129 Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL28 Calculate R = 256 * A / Q o LL38 Calculate (S A) = (S R) + (A Q) o LL5 Calculate Q = SQRT(R Q) o LL61 Calculate (U R) = 256 * A / Q o LL62 Calculate 128 - (U R) o MAD Calculate (A X) = Q * A + (S R) o MAS3 Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block o MCASH Add an amount of cash to the cash pot o MLS1 Calculate (A P) = ALP1 * A o MLS2 Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLTU2 Calculate (A P+1 P) = (A ~P) * Q o MLU1 Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust o MLU2 Calculate (A P) = |A| * Q o MU1 Copy X into P and A, and clear the C flag o MU11 Calculate (A P) = P * X o MU5 Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU6 Set P(1 0) = (A A) o MULT1 Calculate (A P) = Q * A o MULT12 Calculate (S R) = Q * A o MULT3 Calculate K(3 2 1 0) = (A P+1 P) * Q o MULTU * Calculate (A P) = P * Q o MUT1 Calculate R = XX and (A P) = Q * A o MUT2 Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT3 Unused routine that does the same as MUT2 o PIX1 Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o ROOT (Loader) Calculate ZP = SQRT(ZP(1 0)) o SPS2 Calculate (Y X) = A / 10 o SQUA Clear bit 7 of A and calculate (A P) = A * A o SQUA2 Calculate (A P) = A * A o SQUA2 (Loader) Calculate (A P) = A * A o TAS1 Calculate K3 = (x_sign x_hi x_lo) - V(1 0) o TIS1 Calculate (A ?) = (-X * A + (S R)) / 96 o TIS2 Calculate A = A / Q o TIS3 Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o Unused duplicate of MULTU Unused duplicate of the MULTU routine + Maths (Geometry) Vectors, coordinates, dot products and matrices o Subroutines o ARCTAN Calculate A = arctan(P / Q) o FAROF Compare x_hi, y_hi and z_hi with 224 o FAROF2 Compare x_hi, y_hi and z_hi with A o LL51 Calculate the dot product of XX15 and XX16 o MAS1 Add an orientation vector coordinate to an INWK coordinate o MAS2 Calculate a cap on the maximum distance to the planet o MAS4 Calculate a cap on the maximum distance to a ship o NORM * Normalise the three-coordinate vector in XX15 o SPS1 Calculate the vector to the planet and store it in XX15 o SPS3 Copy a space coordinate from the K% block into K3 o SPS4 Calculate the vector to the space station o TAS2 Normalise the three-coordinate vector in K3 o TAS3 Calculate the dot product of XX15 and an orientation vector o TIDY * Orthonormalise the orientation vectors for a ship o Variables o ACT Arctan table o SNE Sine/cosine table + Moving Moving and rotating ships and planets in space o Subroutines o MV40 Rotate the planet's location in space by the amount of pitch and roll of our ship o MVEIT (Part 1 of 9) Move current ship: Tidy the orientation vectors o MVEIT (Part 2 of 9) Move current ship: Call tactics routine, remove ship from scanner o MVEIT (Part 3 of 9) Move current ship: Move ship forward according to its speed o MVEIT (Part 4 of 9) Move current ship: Apply acceleration to ship's speed as a one-off o MVEIT (Part 5 of 9) Move current ship: Rotate ship's location by our pitch and roll o MVEIT (Part 6 of 9) Move current ship: Move the ship in space according to our speed o MVEIT (Part 7 of 9) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 8 of 9) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 9 of 9) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVS4 * Apply pitch and roll to an orientation vector o MVS5 Apply a 3.6 degree pitch or roll to an orientation vector o MVT1 Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT3 Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1) o MVT6 Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o SFS2 Move a ship in space along one of the coordinate axes + Save and load Commander files and competition codes o Subroutines o CHECK Calculate the checksum for the last saved commander data block o GTNME Fetch the name of a commander file to save or load o LOD * Load a commander file o QUS1 Save or load the commander file o SVE * Save the commander file o TR1 Copy the last saved commander's name from NA% to INWK o TRNME Copy the last saved commander's name from INWK to NA% o Variables o CHK First checksum byte for the saved commander data file o CHK2 Second checksum byte for the saved commander data file o NA% The data block for the last saved commander + Screen mode Elite's famous split-screen mode o Subroutines o NEXTR Move to the next character row in the Electron mode 4 screen o Variables o B% (Loader) VDU commands for changing to a standard mode 4 screen + Sound Explosions, laser fire, hyperspace and more o Subroutines o BEEP Make a short, high beep o BELL Make a standard system beep o ECMOF Switch off the E.C.M. o EXNO Make the sound of a laser strike or ship explosion o EXNO2 Process us making a kill o EXNO3 Make an explosion sound o NO3 Make a sound from a prepared sound block o NOISE * Make the sound whose number is in A o NOS1 Prepare a sound block o Variables o E% (Loader) Sound envelope definitions o SFX Sound data o Macros o FNE (Loader) Macro definition for defining a sound envelope + Stardust Stardust generation and movement o Subroutines o FLIP Reflect the stardust particles in the screen diagonal and redraw the stardust field o nWq Create a random cloud of stardust o NWSTARS Initialise the stardust field o STARS * The main routine for processing the stardust o STARS1 Process the stardust for the front view o STARS2 Process the stardust for the left or right view o STARS6 Process the stardust for the rear view + Start and end The title screen... and the Game Over screen o Subroutines o BR1 (Part 1 of 2) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 2 of 2) Show the "Press Fire or Space, Commander" screen and start the game o DEATH * Display the death screen o DEATH2 Reset most of the game and restart from the title screen o QU5 Reset the current commander data block to the last saved commander o RES2 Reset a number of flight variables and workspaces o RESET Reset most variables o TITLE * Display a title screen with a rotating ship and prompt o TT170 * Main entry point for the Elite game code + Status Showing the commander's status and rank o Subroutines o BAD Calculate how bad we have been o BAY Go to the docking bay (i.e. show the Status Mode screen) o STATUS * Show the Status Mode screen (FUNC-9) + Tactics AI tactics for enemy ships and missiles o Subroutines o ANGRY Make a ship hostile o FR1 Display the "missile jammed" message o FRMIS Fire a missile from our ship o FRS1 Launch a ship straight ahead of us, below the laser sights o HITCH * Work out if the ship in INWK is in our crosshairs o SFRMIS Add an enemy missile to our local bubble of universe o TACTICS (Part 1 of 7) Apply tactics: Process missiles, both enemy missiles and our own o TACTICS (Part 2 of 7) * Apply tactics: Escape pod, station, safe-zone pirate o TACTICS (Part 3 of 7) Apply tactics: Calculate dot product to determine ship's aim o TACTICS (Part 4 of 7) Apply tactics: Check energy levels, maybe launch escape pod if low o TACTICS (Part 5 of 7) Apply tactics: Consider whether to launch a missile at us o TACTICS (Part 6 of 7) Apply tactics: Consider firing a laser at us, if aim is true o TACTICS (Part 7 of 7) Apply tactics: Set pitch, roll, and acceleration + Text Recursive tokens, control codes, two-letter tokens and more o Subroutines o BPRNT * Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o cmn Print the commander's name o cpl Print the selected system name o crlf Tab to column 21 and print a colon o csh Print the current amount of cash o dn Print the amount of cash and beep o dn2 Make a short, high beep and delay for 1 second o ee3 Print the hyperspace countdown in the top-left of the screen o ex Print a recursive token o fwl Print fuel and cash levels o me1 Erase an old in-flight message and display a new one o me2 Remove an in-flight message from the space view o mes9 Print a text token, possibly followed by " DESTROYED" o MESS Display an in-flight message o ou2 Display "E.C.M.SYSTEM DESTROYED" as an in-flight message o ou3 Display "FUEL SCOOPS DESTROYED" as an in-flight message o plf Print a text token followed by a newline o plf2 Print text followed by a newline and indent of 6 characters o pr2 Print an 8-bit number, left-padded to 3 digits, and optional point o pr5 Print a 16-bit number, left-padded to 5 digits, and optional point o pr6 Print 16-bit number, left-padded to 5 digits, no point o prq Print a text token followed by a question mark o qw Print a recursive token in the range 128-145 o spc Print a text token followed by a space o tal Print the current galaxy number o TT11 Print a 16-bit number, left-padded to n digits, and optional point o TT146 Print the distance to the selected system in light years o TT147 Print an error when a system is out of hyperspace range o TT162 Print a space o TT26 * Print a character at the text cursor by poking into screen memory o TT27 * Print a text token o TT41 Print a letter according to Sentence Case o TT42 Print a letter in lower case o TT43 Print a two-letter token or recursive token 0-95 o TT45 Print a letter in lower case o TT46 Print a character and switch to capitals o TT60 Print a text token and a paragraph break o TT67 Print a newline o TT68 Print a text token followed by a colon o TT69 Set Sentence Case and print a newline o TT70 Display "MAINLY " and jump to TT72 o TT73 Print a colon o TT74 Print a character o TTX69 Print a paragraph break o ypl Print the current system name o Variables o QQ16 The two-letter token lookup table o QQ18 The recursive token table for tokens 0-148 o RLINE The OSWORD configuration block used to fetch a line of text from the keyboard o TENS A constant used when printing large numbers in BPRNT o Macros o CHAR Macro definition for characters in the recursive token table o CONT Macro definition for control codes in the recursive token table o RTOK Macro definition for recursive tokens in the recursive token table o TWOK Macro definition for two-letter tokens in the token table + Universe Ship spawning, the local bubble, system/market generation o Subroutines o GINF Fetch the address of a ship's data block into INF o GVL Calculate the availability of market items o hyp1 Process a jump to the system closest to (QQ9, QQ10) o jmp Set the current system to the selected system o KILLSHP * Remove a ship from our local bubble of universe o KS1 Remove the current ship from our local bubble of universe o KS2 Check the local bubble for missiles with target lock o KS3 Set the SLSP ship heap pointer after shuffling ship slots o KS4 Remove the space station and replace with a placeholder o NwS1 Flip the sign and double an INWK byte o NWSHP Add a new ship to our local bubble of universe o NWSPS Add a new space station to our local bubble of universe o ping Set the selected system to the current system o SFS1 * Spawn a child ship from the current (parent) ship o SOLAR Set up various aspects of arriving in a new system o SOS1 Update the missile indicators, set up the planet data block o TT111 Set the current system to the nearest system to a point o TT20 Twist the selected system's seeds four times o TT24 * Calculate system data from the system seeds o TT25 * Show the Data on System screen (FUNC-7) o TT54 * Twist the selected system's seeds o TT81 Set the selected system's seeds to those of system 0 o Ze Initialise the INWK workspace to a hostile ship o Variables o UNIV Table of pointers to the local universe's ship data blocks + Utility routines Memory/screen clearing, delay routines, random number generators o Subroutines o CLYNS Clear the bottom three text rows of the mode 4 screen o DELAY Wait for a specified time o DORND * Generate random numbers o DORND (Loader) Generate random numbers o FX200 Set the behaviour of the ESCAPE and BREAK keys o IRQ1 * The main interrupt handler (IRQ1V points here) o LYN Clear most of a row of pixels o OSB (Loader) A convenience routine for calling OSBYTE with Y = 0 o TT66 Clear the screen and set the current view type o TTX66 Clear the top part of the screen and draw a white border o ZERO Zero-fill pages &9, &A, &B, &C and &D o ZES1 Zero-fill the page whose number is in X o ZES2 Zero-fill a specific page o ZINF Reset the INWK workspace and orientation vectors o Variables o MESS1 (Loader) Contains an OS command string for loading the main game code o oscliv (Loader) Contains the address of OSCLIV, for executing OS commands + Workspaces Collections of important variables into blocks o Workspaces o K% * Ship data blocks and ship line heaps o S% (Part 1 of 2) Vector addresses, compass shape and configuration settings o S% (Part 2 of 2) Compass shape and configuration settings o T% Current commander data and stardust data blocks o UU% (Loader) Marker for a block that is moved as part of the obfuscation o WP Ship slots, variables o XX3 Temporary storage space for complex calculations o ZP * Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (Loader) Important variables used by the loader * Elite-A source code Angus Duggan's extended version of Elite + Version information + About Elite-ADetails of the extended version of Elite + Different variants of Elite-ACode variations found in Elite-A + Elite-A source code by file + Map of the source code An overview of how the source code for Elite is structured + Annotated original source files The source files in their original structure o Game loader o Loader source The loading screen, copy protection and set-up for the main game o Text tokens Elite's tokenised game text o Missile ship blueprint The ship blueprint for the missile o Main game docked code o Docked workspaces The main variable workspaces used when docked o Elite A docked source Part 1 of the main docked code o Elite B docked source Part 2 of the main docked code o Elite C docked source Part 3 of the main docked code o Elite D docked source Part 4 of the main docked code o Elite E docked source Part 5 of the main docked code o Elite F docked source Part 6 of the main docked code o Elite G docked source Part 7 of the main docked code o Elite H docked source Part 8 of the main docked code o Ship hangar blueprints Data for ships in the ship hangar o Main game flight code o Flight workspaces The main variable workspaces used in flight o Elite A flight source Part 1 of the main flight code o Elite B flight source Part 2 of the main flight code o Elite C flight source Part 3 of the main flight code o Elite D flight source Part 4 of the main flight code o Elite E flight source Part 5 of the main flight code o Elite F flight source Part 6 of the main flight code o Elite G flight source Part 7 of the main flight code o Elite H flight source Part 8 of the main flight code o Main game encyclopedia code o Encyclopedia workspaces The main variable workspaces used in encyclopedia o Elite A encyclopedia source Part 1 of the main encyclopedia code o Elite B encyclopedia source Part 2 of the main encyclopedia code o Elite C encyclopedia source Part 3 of the main encyclopedia code o Elite D encyclopedia source Part 4 of the main encyclopedia code o Elite E encyclopedia source Part 5 of the main encyclopedia code o Elite F encyclopedia source Part 6 of the main encyclopedia code o Elite G encyclopedia source Part 7 of the main encyclopedia code o Elite H encyclopedia source Part 8 of the main encyclopedia code o Ship blueprint files o Ship blueprints A source The S.A ship blueprints file o Ship blueprints B source The S.B ship blueprints file o Ship blueprints C source The S.C ship blueprints file o Ship blueprints D source The S.D ship blueprints file o Ship blueprints E source The S.E ship blueprints file o Ship blueprints F source The S.F ship blueprints file o Ship blueprints G source The S.G ship blueprints file o Ship blueprints H source The S.H ship blueprints file o Ship blueprints I source The S.I ship blueprints file o Ship blueprints J source The S.J ship blueprints file o Ship blueprints K source The S.K ship blueprints file o Ship blueprints L source The S.L ship blueprints file o Ship blueprints M source The S.M ship blueprints file o Ship blueprints N source The S.N ship blueprints file o Ship blueprints O source The S.O ship blueprints file o Ship blueprints P source The S.P ship blueprints file o Ship blueprints Q source The S.Q ship blueprints file o Ship blueprints R source The S.R ship blueprints file o Ship blueprints S source The S.S ship blueprints file o Ship blueprints T source The S.T ship blueprints file o Ship blueprints U source The S.U ship blueprints file o Ship blueprints V source The S.V ship blueprints file o Ship blueprints W source The S.W ship blueprints file o 6502 Second Processor source o I/O processor source The I/O processor source o Parasite workspaces The main variable workspaces used when parasite o Elite A parasite source Part 1 of the main parasite code o Elite B parasite source Part 2 of the main parasite code o Elite C parasite source Part 3 of the main parasite code o Elite D parasite source Part 4 of the main parasite code o Elite E parasite source Part 5 of the main parasite code o Elite F parasite source Part 6 of the main parasite code o Elite G parasite source Part 7 of the main parasite code o Elite H parasite source Part 8 of the main parasite code o Elite I parasite source Part 9 of the main parasite code o Elite J parasite source Part 10 of the main parasite code o Elite K parasite source Part 11 of the main parasite code o Elite L parasite source Part 12 of the main parasite code o Elite M parasite source Part 13 of the main parasite code o Ship blueprints parasite source Data for ships in the parasite + Elite-A source code by category + Buying ships Elite-A allows you to fly different ships o Subroutines o buy_invnt (Encyclopedia) Process key presses in the encyclopedia o n_buyship (Docked) Show the Buy Ship screen (CTRL-f3) o n_buyship (Parasite) Show the Buy Ship screen (CTRL-f3) o n_load (Docked) Load the name and flight characteristics for the current ship type o n_load (Parasite) Load the name and flight characteristics for the current ship type o n_price (Docked) Set K(0 1 2 3) to the price of a given ship o n_price (Parasite) Set K(0 1 2 3) to the price of a given ship o Variables o count_offs (Docked) Offsets from LASER for equipment that takes up space in the hold o count_offs (Parasite) Offsets from LASER for equipment that takes up space in the hold o new_details (Docked) The flight characteristics for each of the different ship types o new_details (Parasite) The flight characteristics for each of the different ship types o new_offsets (Docked) Table of offsets for each ship type o new_offsets (Parasite) Table of offsets for each ship type o new_ships (Docked) Ship names and prices for the different ship types we can buy o new_ships (Parasite) Ship names and prices for the different ship types we can buy + Charts Long-range and short-range galactic charts o Subroutines o hm (Docked) Select the closest system and redraw the chart crosshairs o hm (Encyclopedia) Select the closest system and redraw the chart crosshairs o hm (Flight) Select the closest system and redraw the chart crosshairs o hm (Parasite) Select the closest system and redraw the chart crosshairs o HME2 (Docked) Search the galaxy for a system o HME2 (Encyclopedia) Search the galaxy for a system o HME2 (Parasite) Search the galaxy for a system o TT103 (Docked) Draw a small set of crosshairs on a chart o TT103 (Encyclopedia) Draw a small set of crosshairs on a chart o TT103 (Flight) Draw a small set of crosshairs on a chart o TT103 (Parasite) Draw a small set of crosshairs on a chart o TT105 (Docked) Draw crosshairs on the Short-range Chart, with clipping o TT105 (Encyclopedia) Draw crosshairs on the Short-range Chart, with clipping o TT105 (Flight) Draw crosshairs on the Short-range Chart, with clipping o TT105 (Parasite) Draw crosshairs on the Short-range Chart, with clipping o TT114 (Flight) Display either the Long-range or Short-range Chart o TT114 (Parasite) Display either the Long-range or Short-range Chart o TT123 (Docked) Move galactic coordinates by a signed delta o TT123 (Encyclopedia) Move galactic coordinates by a signed delta o TT123 (Flight) Move galactic coordinates by a signed delta o TT123 (Parasite) Move galactic coordinates by a signed delta o TT16 (Docked) Move the crosshairs on a chart o TT16 (Encyclopedia) Move the crosshairs on a chart o TT16 (Flight) Move the crosshairs on a chart o TT16 (Parasite) Move the crosshairs on a chart o TT22 (Docked) Show the Long-range Chart (red key f4) o TT22 (Encyclopedia) Show the Long-range Chart (red key f4) o TT22 (Flight) Show the Long-range Chart (red key f4) o TT22 (Parasite) Show the Long-range Chart (red key f4) o TT23 (Docked) Show the Short-range Chart (red key f5) o TT23 (Encyclopedia) Show the Short-range Chart (red key f5) o TT23 (Flight) Show the Short-range Chart (red key f5) o TT23 (Parasite) Show the Short-range Chart (red key f5) + Copy protection Hiding the Elite code from prying eyes o Subroutines o PROT3 (Loader) Part of the CHKSM copy protection checksum calculation o Variables o Checksum (Docked) Copy protection is disabled in Elite-A, so this block is unused + Dashboard The dials, 3D scanner and compass o Subroutines o ABORT (Flight) Disarm missiles and update the dashboard indicators o ABORT (Parasite) Disarm missiles and update the dashboard indicators o ABORT, Removed (Docked) Disarm missiles and update the dashboard indicators o ABORT2 (Flight) Set/unset the lock target for a missile and update the dashboard o ABORT2 (Parasite) Set/unset the lock target for a missile and update the dashboard o ABORT2, Removed (Docked) Set/unset the lock target for a missile and update the dashboard o BULB (Flight) Draw an indicator bulb on the dashboard o BULB (I/O processor) Draw an indicator bulb on the dashboard o BULB, Removed (Docked) Draw an indicator bulb on the dashboard o BUMP2 (Flight) Bump up the value of the pitch or roll dashboard indicator o BUMP2 (Parasite) Bump up the value of the pitch or roll dashboard indicator o BUMP2, Removed (Docked) Bump up the value of the pitch or roll dashboard indicator o cntr (Flight) Apply damping to the pitch or roll dashboard indicator o cntr (Parasite) Apply damping to the pitch or roll dashboard indicator o cntr, Removed (Docked) Apply damping to the pitch or roll dashboard indicator o COMPAS (Flight) Update the compass o COMPAS (Parasite) Update the compass o DIALS (Part 1 of 4) (Docked) Update the dashboard: speed indicator o DIALS (Part 1 of 4) (Flight) Update the dashboard: speed indicator o DIALS (Part 1 of 4) (Parasite) Update the dashboard: speed indicator o DIALS (Part 2 of 4) (Docked) Update the dashboard: pitch and roll indicators o DIALS (Part 2 of 4) (Flight) Update the dashboard: pitch and roll indicators o DIALS (Part 2 of 4) (Parasite) Update the dashboard: pitch and roll indicators o DIALS (Part 3 of 4) (Docked) Update the dashboard: four energy banks o DIALS (Part 3 of 4) (Flight) Update the dashboard: four energy banks o DIALS (Part 3 of 4) (Parasite) Update the dashboard: four energy banks o DIALS (Part 4 of 4) (Docked) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIALS (Part 4 of 4) (Flight) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIALS (Part 4 of 4) (Parasite) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIL2 (Docked) Update the roll or pitch indicator on the dashboard o DIL2 (Flight) Update the roll or pitch indicator on the dashboard o DIL2 (I/O processor) Implement the draw_angle command (update the roll or pitch indicator on the dashboard) o DIL2 (Parasite) Update the roll or pitch indicator on the dashboard by sending a draw_angle command to the I/O processor o DILX (Docked) Update a bar-based indicator on the dashboard o DILX (Flight) Update a bar-based indicator on the dashboard o DILX (I/O processor) Implement the draw_bar command (update a bar-based indicator on the dashboard o DILX (Parasite) Update a bar-based indicator on the dashboard by sending a draw_bar command to the I/O processor o DOT (Flight) Draw a dash on the compass o DOT (Parasite) Draw a dash on the compass o draw_tail (I/O processor) Implement the draw_tail command (draw a ship on the 3D scanner) o ECBLB (Flight) Light up the E.C.M. indicator bulb ("E") on the dashboard o ECBLB (I/O processor) Light up the E.C.M. indicator bulb ("E") on the dashboard o ECBLB (Parasite) Light up the E.C.M. indicator bulb ("E") on the dashboard by sending a draw_E command to the I/O processor o ECBLB2 (Flight) Start up the E.C.M. (indicator, start countdown and make sound) o ECBLB2 (Parasite) Start up the E.C.M. (indicator, start countdown and make sound) o iff_index (Loader) Return the type index for this ship in the I.F.F. system o iff_index_code (Loader) The iff_index routine, bundled up in the loader so it can be moved to &0D7A to be run o MSBAR (Docked) Draw a specific indicator in the dashboard's missile bar o MSBAR (Flight) Draw a specific indicator in the dashboard's missile bar o MSBAR (I/O processor) Implement the put_missle command (update a missile indicator on the dashboard) o MSBAR (Parasite) Draw a specific indicator in the dashboard's missile bar by sending a put_missle command to the I/O processor o MSBARS (Parasite) Draw a specific indicator in the dashboard's missile bar o msblob (Docked) Display the dashboard's missile indicators in green o msblob (Flight) Display the dashboard's missile indicators in green o msblob (Parasite) Display the dashboard's missile indicators in green o PZW (Docked) Fetch the current dashboard colours, to support flashing o PZW (Flight) Fetch the current dashboard colours, to support flashing o PZW (Parasite) Fetch the current dashboard colours, to support flashing o REDU2 (Flight) Reduce the value of the pitch or roll dashboard indicator o REDU2 (Parasite) Reduce the value of the pitch or roll dashboard indicator o REDU2, Removed (Docked) Reduce the value of the pitch or roll dashboard indicator o SCAN (Flight) Display the current ship on the scanner o SCAN (Parasite) Display the current ship on the scanner by sending a draw_tail command to the I/O processor o SP1, Removed (Flight) Draw the space station on the compass o SP2 (Flight) Draw a dot on the compass, given the planet/ station vector o SP2 (Parasite) Draw a dot on the compass, given the planet/station vector o SPBLB (Flight) Light up the space station indicator ("S") on the dashboard o SPBLB (I/O processor) Light up the space station indicator ("S") on the dashboard o SPBLB (Parasite) Light up the space station indicator ("S") on the dashboard by sending a draw_S command to the I/O processor o SPBLB, Removed (Docked) Light up the space station indicator ("S") on the dashboard o update_pod (Parasite) Ensure the correct palette is shown for the dashboard/hyperspace tunnel, by sending a write_pod command to the I/O processor o WPSHPS (Docked) Clear the scanner, reset the ball line and sun line heaps o WPSHPS (Encyclopedia) Clear the scanner, reset the ball line and sun line heaps o WPSHPS (Flight) Clear the scanner, reset the ball line and sun line heaps o WPSHPS (Parasite) Clear the scanner, reset the ball line and sun line heaps o WPSHPSS (Parasite) Clear the scanner, reset the ball line and sun line heaps o write_pod (I/O processor) Implement the write_pod command (show the correct palette for the dashboard and hyperspace tunnel) o Variables o ECBT (Flight) The character bitmap for the E.C.M. indicator bulb o ECBT (I/O processor) The character bitmap for the E.C.M. indicator bulb o iff_base (Flight) Base colours for different types of ship in the the I.F.F. system o iff_base (Parasite) Base colours for different types of ship in the the I.F.F. system o iff_xor (Flight) The EOR value for different types of ship in the the I.F.F. system for creating striped sticks in the scanner o iff_xor (Parasite) The EOR value for different types of ship in the the I.F.F. system for creating striped sticks in the scanner o SPBT (Flight) The bitmap definition for the space station indicator bulb o SPBT (I/O processor) The bitmap definition for the space station indicator bulb o SPBT, Removed (Docked) The bitmap definition for the space station indicator bulb + Drawing circles Hyperspace tunnels, launch rings and planets o Subroutines o BLINE (Docked) Draw a circle segment and add it to the ball line heap o BLINE (Encyclopedia) Draw a circle segment and add it to the ball line heap o BLINE (Flight) Draw a circle segment and add it to the ball line heap o BLINE (Parasite) Draw a circle segment and add it to the ball line heap o CHKON (Docked) Check whether any part of a circle appears on the extended screen o CHKON (Encyclopedia) Check whether any part of a circle appears on the extended screen o CHKON (Flight) Check whether any part of a circle appears on the extended screen o CHKON (Parasite) Check whether any part of a circle appears on the extended screen o CIRCLE (Flight) Draw a circle for the planet o CIRCLE (Parasite) Draw a circle for the planet o CIRCLE, Removed (Docked) Draw a circle for the planet o CIRCLE2 (Docked) Draw a circle (for the planet or chart) o CIRCLE2 (Encyclopedia) Draw a circle (for the planet or chart) o CIRCLE2 (Flight) Draw a circle (for the planet or chart) o CIRCLE2 (Parasite) Draw a circle (for the planet or chart) o HFS1 (Docked) Draw the launch or hyperspace tunnel o HFS1 (Parasite) Draw the launch or hyperspace tunnel o HFS2 (Flight) Draw the launch or hyperspace tunnel o HFS2 (Parasite) Clear the screen and draw the launch or hyperspace tunnel o LAUN (Flight) Make the launch sound and draw the launch tunnel o LAUN (Parasite) Make the launch sound and draw the launch tunnel o LAUN, Removed (Docked) Make the launch sound and draw the launch tunnel o LL164 (Flight) Make the hyperspace sound and draw the hyperspace tunnel o LL164 (Parasite) Make the hyperspace sound and draw the hyperspace tunnel o LL164, Removed (Docked) Make the hyperspace sound and draw the hyperspace tunnel o TT128 (Docked) Draw a circle on a chart o TT128 (Encyclopedia) Draw a circle on a chart o TT128 (Flight) Draw a circle on a chart o TT128 (Parasite) Draw a circle on a chart o TT14 (Docked) Draw a circle with crosshairs on a chart o TT14 (Encyclopedia) Draw a circle with crosshairs on a chart o TT14 (Flight) Draw a circle with crosshairs on a chart o TT14 (Parasite) Draw a circle with crosshairs on a chart + Drawing lines The core line-drawing routines o Subroutines o EDGES (Docked) Draw a horizontal line given a centre and a half-width o EDGES (Encyclopedia) Draw a horizontal line given a centre and a half-width o EDGES (Flight) Draw a horizontal line given a centre and a half-width o EDGES (Parasite) Draw a horizontal line given a centre and a half-width o HLOIN (Docked) Draw a horizontal line from (X1, Y1) to (X2, Y1) o HLOIN (Encyclopedia) Draw a horizontal line from (X1, Y1) to (X2, Y1) o HLOIN (Flight) Draw a horizontal line from (X1, Y1) to (X2, Y1) o HLOIN (I/O processor) Implement the draw_hline command (draw a horizontal line o HLOIN (Parasite) Draw a horizontal line by sending a draw_hline command to the I/O processor o HLOIN2 (Docked) Remove a line from the sun line heap and draw it on-screen o HLOIN2 (Encyclopedia) Remove a line from the sun line heap and draw it on-screen o HLOIN2 (Flight) Remove a line from the sun line heap and draw it on-screen o HLOIN2 (Parasite) Remove a line from the sun line heap and draw it on-screen o LASLI (Flight) Draw the laser lines for when we fire our lasers o LASLI (Parasite) Draw the laser lines for when we fire our lasers o LL118 (Docked) Move a point along a line until it is on-screen o LL118 (Encyclopedia) Move a point along a line until it is on-screen o LL118 (Flight) Move a point along a line until it is on-screen o LL118 (Parasite) Move a point along a line until it is on-screen o LL145 (Part 1 of 4) (Docked) Clip line: Work out which end-points are on-screen, if any o LL145 (Part 1 of 4) (Encyclopedia) Clip line: Work out which end-points are on-screen, if any o LL145 (Part 1 of 4) (Flight) Clip line: Work out which end-points are on-screen, if any o LL145 (Part 1 of 4) (Parasite) Clip line: Work out which end-points are on-screen, if any o LL145 (Part 2 of 4) (Docked) Clip line: Work out if any part of the line is on-screen o LL145 (Part 2 of 4) (Encyclopedia) Clip line: Work out if any part of the line is on-screen o LL145 (Part 2 of 4) (Flight) Clip line: Work out if any part of the line is on-screen o LL145 (Part 2 of 4) (Parasite) Clip line: Work out if any part of the line is on-screen o LL145 (Part 3 of 4) (Docked) Clip line: Calculate the line's gradient o LL145 (Part 3 of 4) (Encyclopedia) Clip line: Calculate the line's gradient o LL145 (Part 3 of 4) (Flight) Clip line: Calculate the line's gradient o LL145 (Part 3 of 4) (Parasite) Clip line: Calculate the line's gradient o LL145 (Part 4 of 4) (Docked) Clip line: Call the routine in LL188 to do the actual clipping o LL145 (Part 4 of 4) (Encyclopedia) Clip line: Call the routine in LL188 to do the actual clipping o LL145 (Part 4 of 4) (Flight) Clip line: Call the routine in LL188 to do the actual clipping o LL145 (Part 4 of 4) (Parasite) Clip line: Call the routine in LL188 to do the actual clipping o LL30 (Parasite) Draw a one-segment line by sending a draw_line command to the I/O processor o LOIN (Part 1 of 7) (Docked) Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 1 of 7) (Encyclopedia) Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 1 of 7) (Flight) Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 1 of 7) (I/O processor) Implement the draw_line command (draw a line) o LOIN (Part 2 of 7) (Docked) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 2 of 7) (Encyclopedia) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 2 of 7) (Flight) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 2 of 7) (I/O processor) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 3 of 7) (Docked) Draw a shallow line going right and up or left and down o LOIN (Part 3 of 7) (Encyclopedia) Draw a shallow line going right and up or left and down o LOIN (Part 3 of 7) (Flight) Draw a shallow line going right and up or left and down o LOIN (Part 3 of 7) (I/O processor) Draw a shallow line going right and up or left and down o LOIN (Part 4 of 7) (Docked) Draw a shallow line going right and down or left and up o LOIN (Part 4 of 7) (Encyclopedia) Draw a shallow line going right and down or left and up o LOIN (Part 4 of 7) (Flight) Draw a shallow line going right and down or left and up o LOIN (Part 4 of 7) (I/O processor) Draw a shallow line going right and down or left and up o LOIN (Part 5 of 7) (Docked) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 5 of 7) (Encyclopedia) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 5 of 7) (Flight) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 5 of 7) (I/O processor) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 6 of 7) (Docked) Draw a steep line going up and left or down and right o LOIN (Part 6 of 7) (Encyclopedia) Draw a steep line going up and left or down and right o LOIN (Part 6 of 7) (Flight) Draw a steep line going up and left or down and right o LOIN (Part 6 of 7) (I/O processor) Draw a steep line going up and left or down and right o LOIN (Part 7 of 7) (Docked) Draw a steep line going up and right or down and left o LOIN (Part 7 of 7) (Encyclopedia) Draw a steep line going up and right or down and left o LOIN (Part 7 of 7) (Flight) Draw a steep line going up and right or down and left o LOIN (Part 7 of 7) (I/O processor) Draw a steep line going up and right or down and left o NLIN (Docked) Draw a horizontal line at pixel row 23 to box in a title o NLIN (Encyclopedia) Draw a horizontal line at pixel row 23 to box in a title o NLIN (Flight) Draw a horizontal line at pixel row 23 to box in a title o NLIN (Parasite) Draw a horizontal line at pixel row 23 to box in a title o NLIN2 (Docked) Draw a screen-wide horizontal line at the pixel row in A o NLIN2 (Encyclopedia) Draw a screen-wide horizontal line at the pixel row in A o NLIN2 (Flight) Draw a screen-wide horizontal line at the pixel row in A o NLIN2 (Parasite) Draw a screen-wide horizontal line at the pixel row in A o NLIN3 (Docked) Print a title and a horizontal line at row 19 to box it in o NLIN3 (Encyclopedia) Print a title and a horizontal line at row 19 to box it in o NLIN3 (Flight) Print a title and a horizontal line at row 19 to box it in o NLIN3 (Parasite) Print a title and a horizontal line at row 19 to box it in o NLIN4 (Docked) Draw a horizontal line at pixel row 19 to box in a title o NLIN4 (Encyclopedia) Draw a horizontal line at pixel row 19 to box in a title o NLIN4 (Flight) Draw a horizontal line at pixel row 19 to box in a title o NLIN4 (Parasite) Draw a horizontal line at pixel row 19 to box in a title o TT15 (Docked) Draw a set of crosshairs o TT15 (Encyclopedia) Draw a set of crosshairs o TT15 (Flight) Draw a set of crosshairs o TT15 (Parasite) Draw a set of crosshairs o Variables o TWFL (Docked) Ready-made character rows for the left end of a horizontal line in mode 4 o TWFL (Encyclopedia) Ready-made character rows for the left end of a horizontal line in mode 4 o TWFL (Flight) Ready-made character rows for the left end of a horizontal line in mode 4 o TWFL (I/O processor) Ready-made character rows for the left end of a horizontal line in mode 4 o TWFR (Docked) Ready-made character rows for the right end of a horizontal line in mode 4 o TWFR (Encyclopedia) Ready-made character rows for the right end of a horizontal line in mode 4 o TWFR (Flight) Ready-made character rows for the right end of a horizontal line in mode 4 o TWFR (I/O processor) Ready-made character rows for the right end of a horizontal line in mode 4 + Drawing pixels How to plot pixels in various colours o Subroutines o CPIX2 (Flight) Draw a single-height dash on the dashboard o CPIX2 (I/O processor) Draw a single-height dash on the dashboard o CPIX2 (Parasite) Draw a single-height dash on the dashboard by sending a draw_blob command to the I/O processor o CPIX2, Removed (Docked) Draw a single-height dash on the dashboard o CPIX4 (Flight) Draw a double-height dot on the dashboard o CPIX4 (Parasite) Draw a double-height dot on the dashboard o CPIX4, Removed (Docked) Draw a double-height dot on the dashboard o draw_blob (I/O processor) Implement the draw_blob command (draw a single-height dash on the dashboard) o PIX (Loader) Draw a single pixel at a specific coordinate o PIXEL (Docked) Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o PIXEL (Encyclopedia) Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o PIXEL (Flight) Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o PIXEL (I/O processor) Implement the draw_pixel command (draw space view pixels) o PIXEL (Parasite) Draw a 1-pixel dot, 2-pixel dash or 4-pixel square by sending a draw_pixel command to the I/O processor o PIXEL2 (Flight) Draw a stardust particle relative to the screen centre o PIXEL2 (Parasite) Draw a stardust particle relative to the screen centre o PIXEL2, Removed (Docked) Draw a stardust particle relative to the screen centre o PX3 (Docked) Plot a single pixel at (X, Y) within a character block o PX3 (Encyclopedia) Plot a single pixel at (X, Y) within a character block o PX3 (I/O processor) Plot a single pixel at (X, Y) within a character block o PX3, Removed (Flight) Plot a single pixel at (X, Y) within a character block o Variables o CTWOS (Docked) Ready-made single-pixel character row bytes for mode 5 o CTWOS (Encyclopedia) Ready-made single-pixel character row bytes for mode 5 o CTWOS (Flight) Ready-made single-pixel character row bytes for mode 5 o CTWOS (I/O processor) Ready-made single-pixel character row bytes for mode 5 o TWOS (Docked) Ready-made single-pixel character row bytes for mode 4 o TWOS (Encyclopedia) Ready-made single-pixel character row bytes for mode 4 o TWOS (Flight) Ready-made single-pixel character row bytes for mode 4 o TWOS (I/O processor) Ready-made single-pixel character row bytes for mode 4 o TWOS (Loader) Ready-made single-pixel character row bytes for mode 4 o TWOS2 (Docked) Ready-made double-pixel character row bytes for mode 4 o TWOS2 (Encyclopedia) Ready-made double-pixel character row bytes for mode 4 o TWOS2 (Flight) Ready-made double-pixel character row bytes for mode 4 o TWOS2 (I/O processor) Ready-made double-pixel character row bytes for mode 4 + Drawing planets Planets with meridians and craters o Subroutines o PL2 (Flight) Remove the planet or sun from the screen o PL2 (Parasite) Remove the planet or sun from the screen o PL21 (Docked) Return from a planet/sun-drawing routine with a failure flag o PL21 (Encyclopedia) Return from a planet/sun-drawing routine with a failure flag o PL21 (Flight) Return from a planet/sun-drawing routine with a failure flag o PL21 (Parasite) Return from a planet/sun-drawing routine with a failure flag o PL21S (Parasite) Return from a planet/sun-drawing routine with a failure flag o PL9 (Part 1 of 3) (Flight) Draw the planet, with either an equator and meridian, or a crater o PL9 (Part 1 of 3) (Parasite) Draw the planet, with either an equator and meridian, or a crater o PL9 (Part 2 of 3) (Flight) Draw the planet's equator and meridian o PL9 (Part 2 of 3) (Parasite) Draw the planet's equator and meridian o PL9 (Part 3 of 3) (Flight) Draw the planet's crater o PL9 (Part 3 of 3) (Parasite) Draw the planet's crater o PLANET (Flight) Draw the planet or sun o PLANET (Parasite) Draw the planet or sun o PLL1 (Loader) * Draw Saturn on the loading screen o PLS1 (Flight) Calculate (Y A) = nosev_x / z o PLS1 (Parasite) Calculate (Y A) = nosev_x / z o PLS2 (Flight) Draw a half-ellipse o PLS2 (Parasite) Draw a half-ellipse o PLS22 (Flight) Draw an ellipse or half-ellipse o PLS22 (Parasite) Draw an ellipse or half-ellipse o PLS3 (Flight) Calculate (Y A P) = 222 * roofv_x / z o PLS3 (Parasite) Calculate (Y A P) = 222 * roofv_x / z o PLS4 (Flight) Calculate CNT2 = arctan(P / A) / 4 o PLS4 (Parasite) Calculate CNT2 = arctan(P / A) / 4 o PLS5 (Flight) Calculate roofv_x / z and roofv_y / z o PLS5 (Parasite) Calculate roofv_x / z and roofv_y / z o PLS6 (Flight) Calculate (X K) = (A P) / (z_sign z_hi z_lo) o PLS6 (Parasite) Calculate (X K) = (A P) / (z_sign z_hi z_lo) o WP1 (Flight) Reset the ball line heap o WP1 (Parasite) Reset the ball line heap o WP1, Removed (Docked) Reset the ball line heap o WPLS2 (Flight) Remove the planet from the screen o WPLS2 (Parasite) Remove the planet from the screen o Variables o CNT (Loader) A counter for use in drawing Saturn's planetary body o CNT2 (Loader) A counter for use in drawing Saturn's background stars o CNT3 (Loader) A counter for use in drawing Saturn's rings o RAND (Loader) The random number seed used for drawing Saturn + Drawing ships The celebrated 3D ship plotting process o Subroutines o DOEXP (Flight) Draw an exploding ship o DOEXP (Parasite) Draw an exploding ship o DOEXP, Removed (Docked) Draw an exploding ship o LL9 (Part 1 of 12) (Docked) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 1 of 12) (Encyclopedia) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 1 of 12) (Flight) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 1 of 12) (Parasite) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 2 of 12) (Docked) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 2 of 12) (Encyclopedia) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 2 of 12) (Flight) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 2 of 12) (Parasite) Draw ship: Check if ship is in field of view, close enough to draw o LL9 (Part 3 of 12) (Docked) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 3 of 12) (Encyclopedia) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 3 of 12) (Flight) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 3 of 12) (Parasite) Draw ship: Set up orientation vector, ship coordinate variables o LL9 (Part 4 of 12) (Docked) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 4 of 12) (Encyclopedia) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 4 of 12) (Flight) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 4 of 12) (Parasite) Draw ship: Set visibility for exploding ship (all faces visible) o LL9 (Part 5 of 12) (Docked) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 5 of 12) (Encyclopedia) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 5 of 12) (Flight) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 5 of 12) (Parasite) Draw ship: Calculate the visibility of each of the ship's faces o LL9 (Part 6 of 12) (Docked) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 6 of 12) (Encyclopedia) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 6 of 12) (Flight) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 6 of 12) (Parasite) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) (Docked) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) (Encyclopedia) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) (Flight) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 7 of 12) (Parasite) Draw ship: Calculate the visibility of each of the ship's vertices o LL9 (Part 8 of 12) (Docked) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 8 of 12) (Encyclopedia) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 8 of 12) (Flight) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 8 of 12) (Parasite) Draw ship: Calculate the screen coordinates of visible vertices o LL9 (Part 9 of 12) (Docked) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 9 of 12) (Encyclopedia) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 9 of 12) (Flight) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 9 of 12) (Parasite) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 10 of 12) (Docked) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 10 of 12) (Encyclopedia) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 10 of 12) (Flight) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 10 of 12) (Parasite) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 11 of 12) (Docked) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 11 of 12) (Encyclopedia) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 11 of 12) (Flight) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 11 of 12) (Parasite) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 12 of 12) (Docked) Draw ship: Draw all the visible edges from the ship line heap o LL9 (Part 12 of 12) (Encyclopedia) Draw ship: Draw all the visible edges from the ship line heap o LL9 (Part 12 of 12) (Flight) Draw ship: Draw all the visible edges from the ship line heap o LL9 (Part 12 of 12) (Parasite) Draw ship: Draw all the visible edges from the ship line heap o LL9_FLIGHT (Parasite) Draw a ship (flight version) o PROJ (Flight) Project the current ship onto the screen o PROJ (Parasite) Project the current ship onto the screen o SHPPT (Docked) Draw a distant ship as a point in the middle of the screen o SHPPT (Encyclopedia) Draw a distant ship as a point in the middle of the screen o SHPPT (Flight) Draw a distant ship as a point rather than a full wireframe o SHPPT (Parasite) Draw a distant ship as a point rather than a full wireframe o Variables o E% (Docked) Ship blueprints default NEWB flags for the ship hangar o E% (Parasite) Ship blueprints default NEWB flags o E% (Ship blueprints A) Ship blueprints default NEWB flags for the S.A file o E% (Ship blueprints B) Ship blueprints default NEWB flags for the S.B file o E% (Ship blueprints C) Ship blueprints default NEWB flags for the S.C file o E% (Ship blueprints D) Ship blueprints default NEWB flags for the S.D file o E% (Ship blueprints E) Ship blueprints default NEWB flags for the S.E file o E% (Ship blueprints F) Ship blueprints default NEWB flags for the S.F file o E% (Ship blueprints G) Ship blueprints default NEWB flags for the S.G file o E% (Ship blueprints H) Ship blueprints default NEWB flags for the S.H file o E% (Ship blueprints I) Ship blueprints default NEWB flags for the S.I file o E% (Ship blueprints J) Ship blueprints default NEWB flags for the S.J file o E% (Ship blueprints K) Ship blueprints default NEWB flags for the S.K file o E% (Ship blueprints L) Ship blueprints default NEWB flags for the S.L file o E% (Ship blueprints M) Ship blueprints default NEWB flags for the S.M file o E% (Ship blueprints N) Ship blueprints default NEWB flags for the S.N file o E% (Ship blueprints O) Ship blueprints default NEWB flags for the S.O file o E% (Ship blueprints P) Ship blueprints default NEWB flags for the S.P file o E% (Ship blueprints Q) Ship blueprints default NEWB flags for the S.Q file o E% (Ship blueprints R) Ship blueprints default NEWB flags for the S.R file o E% (Ship blueprints S) Ship blueprints default NEWB flags for the S.S file o E% (Ship blueprints T) Ship blueprints default NEWB flags for the S.T file o E% (Ship blueprints U) Ship blueprints default NEWB flags for the S.U file o E% (Ship blueprints V) Ship blueprints default NEWB flags for the S.V file o E% (Ship blueprints W) Ship blueprints default NEWB flags for the S.W file o SHIP_ADDER (Parasite) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints A) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints E) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints G) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints H) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints O) Ship blueprint for an Adder o SHIP_ADDER (Ship blueprints V) Ship blueprint for an Adder o SHIP_ANACONDA (Parasite) Ship blueprint for an Anaconda o SHIP_ANACONDA (Ship blueprints H) Ship blueprint for an Anaconda o SHIP_ANACONDA (Ship blueprints I) Ship blueprint for an Anaconda o SHIP_ASP_MK_2 (Parasite) Ship blueprint for an Asp Mk II o SHIP_ASP_MK_2 (Ship blueprints I) Ship blueprint for an Asp Mk II o SHIP_ASP_MK_2 (Ship blueprints N) Ship blueprint for an Asp Mk II o SHIP_ASP_MK_2 (Ship blueprints T) Ship blueprint for an Asp Mk II o SHIP_ASTEROID (Parasite) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints E) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints G) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints K) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints O) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints R) Ship blueprint for an asteroid o SHIP_ASTEROID (Ship blueprints U) Ship blueprint for an asteroid o ship_bits (Parasite) Table of allowed ship blueprint positions for each ship type o SHIP_BOA (Parasite) Ship blueprint for a Boa o SHIP_BOA (Ship blueprints D) Ship blueprint for a Boa o SHIP_BOA (Ship blueprints F) Ship blueprint for a Boa o SHIP_BOA (Ship blueprints G) Ship blueprint for a Boa o SHIP_BOA (Ship blueprints K) Ship blueprint for a Boa o SHIP_BOA (Ship blueprints L) Ship blueprint for a Boa o SHIP_BOA (Ship blueprints R) Ship blueprint for a Boa o SHIP_BOA (Ship blueprints V) Ship blueprint for a Boa o SHIP_BOULDER (Parasite) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints A) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints D) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints K) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints O) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints Q) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints R) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints S) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints U) Ship blueprint for a boulder o SHIP_BOULDER (Ship blueprints V) Ship blueprint for a boulder o SHIP_BUSHMASTER (Parasite) Ship blueprint for a Bushmaster o SHIP_BUSHMASTER (Ship blueprints D) Ship blueprint for a Bushmaster o SHIP_BUSHMASTER (Ship blueprints F) Ship blueprint for a Bushmaster o SHIP_BUSHMASTER (Ship blueprints J) Ship blueprint for a Bushmaster o SHIP_BUSHMASTER (Ship blueprints M) Ship blueprint for a Bushmaster o SHIP_BUSHMASTER (Ship blueprints Q) Ship blueprint for a Bushmaster o SHIP_BUSHMASTER (Ship blueprints R) Ship blueprint for a Bushmaster o SHIP_BUSHMASTER (Ship blueprints S) Ship blueprint for a Bushmaster o ship_bytes (Parasite) Table of data used when adding each ship type to the positions in the blueprints table o SHIP_CANISTER (Docked) Ship blueprint for a cargo canister o SHIP_CANISTER (Parasite) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints A) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints B) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints C) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints D) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints E) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints F) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints G) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints H) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints I) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints J) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints K) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints L) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints M) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints N) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints O) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints P) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints Q) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints R) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints S) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints T) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints U) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints V) Ship blueprint for a cargo canister o SHIP_CANISTER (Ship blueprints W) Ship blueprint for a cargo canister o SHIP_CHAMELEON (Parasite) Ship blueprint for a Chameleon o SHIP_CHAMELEON (Ship blueprints C) Ship blueprint for a Chameleon o SHIP_CHAMELEON (Ship blueprints L) Ship blueprint for a Chameleon o SHIP_CHAMELEON (Ship blueprints M) Ship blueprint for a Chameleon o SHIP_CHAMELEON (Ship blueprints P) Ship blueprint for a Chameleon o SHIP_CHAMELEON (Ship blueprints U) Ship blueprint for a Chameleon o SHIP_COBRA_MK_1 (Parasite) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints A) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints B) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints H) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints I) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints M) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints O) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints U) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_1 (Ship blueprints V) Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_3 (Docked) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Parasite) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints B) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints N) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints Q) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints T) Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3 (Ship blueprints V) Ship blueprint for a Cobra Mk III o SHIP_CONSTRICTOR (Docked) Ship blueprint for a Constrictor o SHIP_CONSTRICTOR (Parasite) Ship blueprint for a Constrictor o SHIP_CONSTRICTOR (Ship blueprints G) Ship blueprint for a Constrictor o SHIP_CORIOLIS (Parasite) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints A) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints C) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints E) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints G) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints I) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints K) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints M) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints O) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints Q) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints S) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints U) Ship blueprint for a Coriolis space station o SHIP_CORIOLIS (Ship blueprints W) Ship blueprint for a Coriolis space station o SHIP_DODO (Parasite) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints B) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints D) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints F) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints H) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints J) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints L) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints N) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints P) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints R) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints T) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DODO (Ship blueprints V) Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_DRAGON (Parasite) Ship blueprint for a Dragon o SHIP_DRAGON (Ship blueprints D) Ship blueprint for a Dragon o SHIP_DRAGON (Ship blueprints W) Ship blueprint for a Dragon o SHIP_ESCAPE_POD (Parasite) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints A) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints B) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints C) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints D) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints E) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints F) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints G) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints H) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints I) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints J) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints K) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints L) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints M) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints N) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints O) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints P) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints Q) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints R) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints S) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints T) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints U) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints V) Ship blueprint for an escape pod o SHIP_ESCAPE_POD (Ship blueprints W) Ship blueprint for an escape pod o SHIP_FER_DE_LANCE (Parasite) Ship blueprint for a Fer-de-Lance o SHIP_FER_DE_LANCE (Ship blueprints J) Ship blueprint for a Fer-de-Lance o SHIP_FER_DE_LANCE (Ship blueprints K) Ship blueprint for a Fer-de-Lance o SHIP_FER_DE_LANCE (Ship blueprints M) Ship blueprint for a Fer-de-Lance o SHIP_FER_DE_LANCE (Ship blueprints W) Ship blueprint for a Fer-de-Lance o SHIP_GECKO (Parasite) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints A) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints D) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints E) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints G) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints J) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints K) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints N) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints Q) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints R) Ship blueprint for a Gecko o SHIP_GECKO (Ship blueprints S) Ship blueprint for a Gecko o SHIP_GHAVIAL (Parasite) Ship blueprint for a Ghavial o SHIP_GHAVIAL (Ship blueprints B) Ship blueprint for a Ghavial o SHIP_GHAVIAL (Ship blueprints H) Ship blueprint for a Ghavial o SHIP_GHAVIAL (Ship blueprints I) Ship blueprint for a Ghavial o SHIP_GHAVIAL (Ship blueprints S) Ship blueprint for a Ghavial o SHIP_GHAVIAL (Ship blueprints U) Ship blueprint for a Ghavial o SHIP_IGUANA (Parasite) Ship blueprint for an Iguana o SHIP_IGUANA (Ship blueprints B) Ship blueprint for an Iguana o SHIP_IGUANA (Ship blueprints E) Ship blueprint for an Iguana o SHIP_IGUANA (Ship blueprints F) Ship blueprint for an Iguana o SHIP_IGUANA (Ship blueprints G) Ship blueprint for an Iguana o SHIP_IGUANA (Ship blueprints Q) Ship blueprint for an Iguana o SHIP_IGUANA (Ship blueprints T) Ship blueprint for an Iguana o SHIP_KRAIT (Docked) Ship blueprint for a Krait o SHIP_KRAIT (Parasite) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints I) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints K) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints L) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints N) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints T) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints U) Ship blueprint for a Krait o SHIP_KRAIT (Ship blueprints W) Ship blueprint for a Krait o ship_list (Parasite) A list of all available ship types in Elite-A, for populating the ship blueprints table o SHIP_MAMBA (Parasite) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints F) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints J) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints M) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints P) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints S) Ship blueprint for a Mamba o SHIP_MAMBA (Ship blueprints W) Ship blueprint for a Mamba o SHIP_MISSILE (Missile ship blueprint) Ship blueprint for a missile o SHIP_MISSILE (Parasite) Ship blueprint for a missile o SHIP_MONITOR (Parasite) Ship blueprint for a Monitor o SHIP_MONITOR (Ship blueprints A) Ship blueprint for a Monitor o SHIP_MONITOR (Ship blueprints B) Ship blueprint for a Monitor o SHIP_MONITOR (Ship blueprints S) Ship blueprint for a Monitor o SHIP_MORAY (Parasite) Ship blueprint for a Moray o SHIP_MORAY (Ship blueprints A) Ship blueprint for a Moray o SHIP_MORAY (Ship blueprints J) Ship blueprint for a Moray o SHIP_MORAY (Ship blueprints O) Ship blueprint for a Moray o SHIP_MORAY (Ship blueprints P) Ship blueprint for a Moray o SHIP_MORAY (Ship blueprints Q) Ship blueprint for a Moray o SHIP_OPHIDIAN (Parasite) Ship blueprint for an Ophidian o SHIP_OPHIDIAN (Ship blueprints A) Ship blueprint for an Ophidian o SHIP_OPHIDIAN (Ship blueprints F) Ship blueprint for an Ophidian o SHIP_OPHIDIAN (Ship blueprints I) Ship blueprint for an Ophidian o SHIP_OPHIDIAN (Ship blueprints K) Ship blueprint for an Ophidian o SHIP_OPHIDIAN (Ship blueprints L) Ship blueprint for an Ophidian o SHIP_OPHIDIAN (Ship blueprints M) Ship blueprint for an Ophidian o SHIP_OPHIDIAN (Ship blueprints P) Ship blueprint for an Ophidian o SHIP_OPHIDIAN (Ship blueprints R) Ship blueprint for an Ophidian o SHIP_PLATE (Parasite) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints A) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints D) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints E) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints F) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints H) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints J) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints L) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints M) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints R) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints S) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints T) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints U) Ship blueprint for an alloy plate o SHIP_PLATE (Ship blueprints V) Ship blueprint for an alloy plate o SHIP_PYTHON (Docked) Ship blueprint for a Python o SHIP_PYTHON (Parasite) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints C) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints E) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints F) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints N) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints O) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints Q) Ship blueprint for a Python o SHIP_PYTHON (Ship blueprints U) Ship blueprint for a Python o SHIP_RATTLER (Parasite) Ship blueprint for a Rattler o SHIP_RATTLER (Ship blueprints C) Ship blueprint for a Rattler o SHIP_RATTLER (Ship blueprints E) Ship blueprint for a Rattler o SHIP_RATTLER (Ship blueprints H) Ship blueprint for a Rattler o SHIP_RATTLER (Ship blueprints N) Ship blueprint for a Rattler o SHIP_SHUTTLE (Docked) Ship blueprint for a Shuttle o SHIP_SHUTTLE (Parasite) Ship blueprint for a Shuttle o SHIP_SHUTTLE (Ship blueprints L) Ship blueprint for a Shuttle o SHIP_SHUTTLE_MK_2 (Parasite) Ship blueprint for a Shuttle Mk II o SHIP_SHUTTLE_MK_2 (Ship blueprints B) Ship blueprint for a Shuttle Mk II o SHIP_SHUTTLE_MK_2 (Ship blueprints O) Ship blueprint for a Shuttle Mk II o SHIP_SHUTTLE_MK_2 (Ship blueprints T) Ship blueprint for a Shuttle Mk II o SHIP_SIDEWINDER (Parasite) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints D) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints J) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints L) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints R) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints S) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints V) Ship blueprint for a Sidewinder o SHIP_SIDEWINDER (Ship blueprints W) Ship blueprint for a Sidewinder o SHIP_SPLINTER (Parasite) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints E) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints G) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints K) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints O) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints R) Ship blueprint for a splinter o SHIP_SPLINTER (Ship blueprints U) Ship blueprint for a splinter o SHIP_THARGOID (Parasite) Ship blueprint for a Thargoid mothership o SHIP_THARGOID (Ship blueprints C) Ship blueprint for a Thargoid mothership o SHIP_THARGOID (Ship blueprints D) Ship blueprint for a Thargoid mothership o SHIP_THARGON (Parasite) Ship blueprint for a Thargon o SHIP_THARGON (Ship blueprints C) Ship blueprint for a Thargon o SHIP_THARGON (Ship blueprints D) Ship blueprint for a Thargon o SHIP_TRANSPORTER (Docked) Ship blueprint for a Transporter o SHIP_TRANSPORTER (Parasite) Ship blueprint for a Transporter o SHIP_TRANSPORTER (Ship blueprints C) Ship blueprint for a Transporter o SHIP_TRANSPORTER (Ship blueprints P) Ship blueprint for a Transporter o SHIP_TRANSPORTER (Ship blueprints W) Ship blueprint for a Transporter o SHIP_VIPER (Docked) Ship blueprint for a Viper o SHIP_VIPER (Parasite) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints A) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints B) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints C) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints D) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints E) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints F) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints G) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints H) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints I) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints J) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints K) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints L) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints M) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints N) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints O) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints P) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints Q) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints R) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints S) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints T) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints U) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints V) Ship blueprint for a Viper o SHIP_VIPER (Ship blueprints W) Ship blueprint for a Viper o SHIP_WORM (Parasite) Ship blueprint for a Worm o SHIP_WORM (Ship blueprints G) Ship blueprint for a Worm o SHIP_WORM (Ship blueprints H) Ship blueprint for a Worm o SHIP_WORM (Ship blueprints I) Ship blueprint for a Worm o SHIP_WORM (Ship blueprints J) Ship blueprint for a Worm o XX21 (Docked) Ship blueprints lookup table for the ship hangar o XX21 (Parasite) Ship blueprints lookup table for flight in Elite-A o XX21 (Ship blueprints A) Ship blueprints lookup table for the S.A file o XX21 (Ship blueprints B) Ship blueprints lookup table for the S.B file o XX21 (Ship blueprints C) Ship blueprints lookup table for the S.C file o XX21 (Ship blueprints D) Ship blueprints lookup table for the S.D file o XX21 (Ship blueprints E) Ship blueprints lookup table for the S.E file o XX21 (Ship blueprints F) Ship blueprints lookup table for the S.F file o XX21 (Ship blueprints G) Ship blueprints lookup table for the S.G file o XX21 (Ship blueprints H) Ship blueprints lookup table for the S.H file o XX21 (Ship blueprints I) Ship blueprints lookup table for the S.I file o XX21 (Ship blueprints J) Ship blueprints lookup table for the S.J file o XX21 (Ship blueprints K) Ship blueprints lookup table for the S.K file o XX21 (Ship blueprints L) Ship blueprints lookup table for the S.L file o XX21 (Ship blueprints M) Ship blueprints lookup table for the S.M file o XX21 (Ship blueprints N) Ship blueprints lookup table for the S.N file o XX21 (Ship blueprints O) Ship blueprints lookup table for the S.O file o XX21 (Ship blueprints P) Ship blueprints lookup table for the S.P file o XX21 (Ship blueprints Q) Ship blueprints lookup table for the S.Q file o XX21 (Ship blueprints R) Ship blueprints lookup table for the S.R file o XX21 (Ship blueprints S) Ship blueprints lookup table for the S.S file o XX21 (Ship blueprints T) Ship blueprints lookup table for the S.T file o XX21 (Ship blueprints U) Ship blueprints lookup table for the S.U file o XX21 (Ship blueprints V) Ship blueprints lookup table for the S.V file o XX21 (Ship blueprints W) Ship blueprints lookup table for the S.W file o Macros o EDGE (Docked) Macro definition for adding edges to ship blueprints o EDGE (Missile ship blueprint) Macro definition for adding edges to ship blueprints o EDGE (Parasite) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints A) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints B) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints C) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints D) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints E) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints F) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints G) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints H) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints I) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints J) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints K) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints L) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints M) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints N) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints O) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints P) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints Q) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints R) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints S) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints T) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints U) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints V) Macro definition for adding edges to ship blueprints o EDGE (Ship blueprints W) Macro definition for adding edges to ship blueprints o FACE (Docked) Macro definition for adding faces to ship blueprints o FACE (Missile ship blueprint) Macro definition for adding faces to ship blueprints o FACE (Parasite) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints A) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints B) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints C) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints D) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints E) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints F) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints G) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints H) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints I) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints J) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints K) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints L) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints M) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints N) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints O) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints P) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints Q) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints R) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints S) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints T) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints U) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints V) Macro definition for adding faces to ship blueprints o FACE (Ship blueprints W) Macro definition for adding faces to ship blueprints o VERTEX (Docked) Macro definition for adding vertices to ship blueprints o VERTEX (Missile ship blueprint) Macro definition for adding vertices to ship blueprints o VERTEX (Parasite) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints A) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints B) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints C) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints D) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints E) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints F) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints G) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints H) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints I) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints J) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints K) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints L) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints M) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints N) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints O) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints P) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints Q) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints R) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints S) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints T) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints U) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints V) Macro definition for adding vertices to ship blueprints o VERTEX (Ship blueprints W) Macro definition for adding vertices to ship blueprints + Drawing suns The epic, shimmering Elite sun o Subroutines o FLFLLS (Docked) Reset the sun line heap o FLFLLS (Encyclopedia) Reset the sun line heap o FLFLLS (Flight) Reset the sun line heap o FLFLLS (Parasite) Reset the sun line heap o SUN (Part 1 of 4) (Docked) Draw the sun: Set up all the variables needed o SUN (Part 1 of 4) (Encyclopedia) Draw the sun: Set up all the variables needed o SUN (Part 1 of 4) (Flight) Draw the sun: Set up all the variables needed o SUN (Part 1 of 4) (Parasite) Draw the sun: Set up all the variables needed o SUN (Part 2 of 4) (Docked) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 2 of 4) (Encyclopedia) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 2 of 4) (Flight) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 2 of 4) (Parasite) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 3 of 4) (Docked) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 3 of 4) (Encyclopedia) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 3 of 4) (Flight) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 3 of 4) (Parasite) Draw the sun: Continue to move up the screen, drawing the new sun o SUN (Part 4 of 4) (Docked) Draw the sun: Continue to the top of the screen, erasing old sun o SUN (Part 4 of 4) (Encyclopedia) Draw the sun: Continue to the top of the screen, erasing old sun o SUN (Part 4 of 4) (Flight) Draw the sun: Continue to the top of the screen, erasing old sun o SUN (Part 4 of 4) (Parasite) Draw the sun: Continue to the top of the screen, erasing old sun o WPLS (Flight) Remove the sun from the screen o WPLS (Parasite) Remove the sun from the screen o WPLS, Removed (Docked) Remove the sun from the screen + Encyclopedia Elite-A contains the Encyclopedia Galactica o Subroutines o controls (Encyclopedia) Show the Controls menu and display the chosen page o controls (Parasite) Show the Controls menu and display the chosen page o encyclopedia (Parasite) Show the Encyclopedia screen o equip_data (Encyclopedia) Show the Equipment menu and display the chosen page o equip_data (Parasite) Show the Equipment menu and display the chosen page o info_menu (Encyclopedia) Show the Encyclopedia screen o menu (Encyclopedia) Display a menu and ask for a choice o menu (Parasite) Display a menu and ask for a choice o ships_ag (Encyclopedia) Show the Ships A-G or Ships K-W menu and display the chosen ship card o ships_ag (Parasite) Show the Ships A-G or Ships K-W menu and display the chosen ship card o trading (Encyclopedia) Wait until a key is pressed and show the Encyclopedia screen o trading (Parasite) Wait until a key is pressed and show the Encyclopedia screen o write_card (Encyclopedia) Display a ship card in the encyclopedia o write_card (Parasite) Display a ship card in the encyclopedia o Variables o adder (Encyclopedia) Ship card data for the encyclopedia entry for the Adder o adder (Parasite) Ship card data for the encyclopedia entry for the Adder o anaconda (Encyclopedia) Ship card data for the encyclopedia entry for the Anaconda o anaconda (Parasite) Ship card data for the encyclopedia entry for the Anaconda o asp_2 (Encyclopedia) Ship card data for the encyclopedia entry for the Asp Mk II o asp_2 (Parasite) Ship card data for the encyclopedia entry for the Asp Mk II o boa (Encyclopedia) Ship card data for the encyclopedia entry for the Boa o boa (Parasite) Ship card data for the encyclopedia entry for the Boa o bushmaster (Encyclopedia) Ship card data for the encyclopedia entry for the Bushmaster o bushmaster (Parasite) Ship card data for the encyclopedia entry for the Bushmaster o card_addr (Encyclopedia) Lookup table for the encyclopedia's ship cards o card_addr (Parasite) Lookup table for the encyclopedia's ship cards o card_pattern (Encyclopedia) Layout pattern for the encyclopedia's ship cards o card_pattern (Parasite) Layout pattern for the encyclopedia's ship cards o chameleon (Encyclopedia) Ship card data for the encyclopedia entry for the Chameleon o chameleon (Parasite) Ship card data for the encyclopedia entry for the Chameleon o cobra_1 (Encyclopedia) Ship card data for the encyclopedia entry for the Cobra Mk I o cobra_1 (Parasite) Ship card data for the encyclopedia entry for the Cobra Mk I o cobra_3 (Encyclopedia) Ship card data for the encyclopedia entry for the Cobra Mk III o cobra_3 (Parasite) Ship card data for the encyclopedia entry for the Cobra Mk III o coriolis (Encyclopedia) Ship card data for the encyclopedia entry for the Coriolis station o coriolis (Parasite) Ship card data for the encyclopedia entry for the Coriolis station o dodecagon (Encyclopedia) Ship card data for the encyclopedia entry for the Dodo station o dodecagon (Parasite) Ship card data for the encyclopedia entry for the Dodo station o escape_pod (Encyclopedia) Ship card data for the encyclopedia entry for the escape pod o escape_pod (Parasite) Ship card data for the encyclopedia entry for the escape pod o fer_de_lance (Encyclopedia) Ship card data for the encyclopedia entry for the Fer-de-Lance o fer_de_lance (Parasite) Ship card data for the encyclopedia entry for the Fer-de-Lance o gecko (Encyclopedia) Ship card data for the encyclopedia entry for the Gecko o gecko (Parasite) Ship card data for the encyclopedia entry for the Gecko o ghavial (Encyclopedia) Ship card data for the encyclopedia entry for the Ghavial o ghavial (Parasite) Ship card data for the encyclopedia entry for the Ghavial o iguana (Encyclopedia) Ship card data for the encyclopedia entry for the Iguana o iguana (Parasite) Ship card data for the encyclopedia entry for the Iguana o krait (Encyclopedia) Ship card data for the encyclopedia entry for the Krait o krait (Parasite) Ship card data for the encyclopedia entry for the Krait o mamba (Encyclopedia) Ship card data for the encyclopedia entry for the Mamba o mamba (Parasite) Ship card data for the encyclopedia entry for the Mamba o menu_entry (Encyclopedia) Table containing the number of entries in each menu o menu_entry (Parasite) Table containing the number of entries in each menu o menu_offset (Encyclopedia) Table containing token numbers for the first item in each menu o menu_offset (Parasite) Table containing token numbers for the first item in each menu o menu_query (Encyclopedia) Table containing token numbers for each menu's query prompt o menu_query (Parasite) Table containing token numbers for each menu's query prompt o menu_title (Encyclopedia) Table containing text token numbers for each menu's title o menu_title (Parasite) Table containing text token numbers for each menu's title o menu_titlex (Encyclopedia) Table containing column positions for each menu's title o menu_titlex (Parasite) Table containing column positions for each menu's title o monitor (Encyclopedia) Ship card data for the encyclopedia entry for the Monitor o monitor (Parasite) Ship card data for the encyclopedia entry for the Monitor o moray (Encyclopedia) Ship card data for the encyclopedia entry for the Moray o moray (Parasite) Ship card data for the encyclopedia entry for the Moray o ophidian (Encyclopedia) Ship card data for the encyclopedia entry for the Ophidian o ophidian (Parasite) Ship card data for the encyclopedia entry for the Ophidian o python (Encyclopedia) Ship card data for the encyclopedia entry for the Python o python (Parasite) Ship card data for the encyclopedia entry for the Python o ship_centre (Encyclopedia) Table containing column positions for each ship card's title o ship_centre (Parasite) Table containing column positions for each ship card's title o ship_dist (Encyclopedia) Table containing the closest distance to show the ship for each ship card o ship_dist (Parasite) Table containing the closest distance to show the ship for each ship card o ship_file (Encyclopedia) Table containing the letter of the relevant ship blueprints file that we load for each ship card o ship_load (Encyclopedia) The OS command string for loading a ship blueprints file o ship_posn (Encyclopedia) Table containing the number of this ship blueprint within the ship blueprints file that we load for each ship card o ship_posn (Parasite) Table containing the number of this ship in the ship_list table o shuttle (Encyclopedia) Ship card data for the encyclopedia entry for the Shuttle o shuttle (Parasite) Ship card data for the encyclopedia entry for the Shuttle o sidewinder (Encyclopedia) Ship card data for the encyclopedia entry for the Sidewinder o sidewinder (Parasite) Ship card data for the encyclopedia entry for the Sidewinder o thargoid (Encyclopedia) Ship card data for the encyclopedia entry for the Thargoid o thargoid (Parasite) Ship card data for the encyclopedia entry for the Thargoid o thargon (Encyclopedia) Ship card data for the encyclopedia entry for the Thargon o thargon (Parasite) Ship card data for the encyclopedia entry for the Thargon o transporter (Encyclopedia) Ship card data for the encyclopedia entry for the Transporter o transporter (Parasite) Ship card data for the encyclopedia entry for the Transporter o viper (Encyclopedia) Ship card data for the encyclopedia entry for the Viper o viper (Parasite) Ship card data for the encyclopedia entry for the Viper o worm (Encyclopedia) Ship card data for the encyclopedia entry for the Worm o worm (Parasite) Ship card data for the encyclopedia entry for the Worm + Equipment Buying and selling weapons and ship upgrades o Subroutines o eq (Docked) Subtract the price of equipment from the cash pot o eq (Parasite) Subtract the price of equipment from the cash pot o EQSHP (Docked) Show the Equip Ship screen (red key f3) or Buy Ship screen (CTRL-f3) o EQSHP (Parasite) Show the Equip Ship screen (red key f3) or Buy Ship screen (CTRL-f3) o prx (Docked) Return the price of a piece of equipment o prx (Parasite) Return the price of a piece of equipment o qv (Docked) Print a menu of the four space views, for buying lasers o qv (Parasite) Print a menu of the four space views, for buying lasers o refund, Removed (Docked) Install a new laser, processing a refund if applicable o sell_jump (Docked) Show the Sell Equipment screen (CTRL-f2) o sell_jump (Parasite) Show the Sell Equipment screen (CTRL-f2) o Variables o PRXS (Docked) Equipment prices o PRXS (Parasite) Equipment prices + Flight Docking, hyperspace, views, shields and more o Subroutines o DCS1 (Flight) Calculate the vector from the ideal docking position to the ship o DCS1 (Parasite) Calculate the vector from the ideal docking position to the ship o DENGY (Flight) Drain some energy from the energy banks o DENGY (Parasite) Drain some energy from the energy banks o DENGY, Removed (Docked) Drain some energy from the energy banks o DOCKIT (Flight) Apply docking manoeuvres to the ship in INWK o DOCKIT (Parasite) Apply docking manoeuvres to the ship in INWK o DOENTRY (Docked) Dock at the space station, show the ship hangar and work out any mission progression o DOENTRY (Parasite) Dock at the space station, show the ship hangar and work out any mission progression o ESCAPE (Flight) Launch our escape pod o ESCAPE (Parasite) Launch our escape pod o Ghy (Flight) Perform a galactic hyperspace jump o Ghy (Parasite) Perform a galactic hyperspace jump o Ghy, Removed (Docked) Perform a galactic hyperspace jump o hyp (Flight) Start the hyperspace process o hyp (Parasite) Start the hyperspace process o hyp, Removed (Docked) Start the hyperspace process o LOOK1 (Flight) Initialise the space view o LOOK1 (Parasite) Initialise the space view o MJP (Flight) Process a mis-jump into witchspace o MJP (Parasite) Process a mis-jump into witchspace o n_oops (Flight) Take some damage, taking our ship's shields into consideration o n_oops (Parasite) Take some damage, taking our ship's shields into consideration o OOPS (Flight) Take some damage o OOPS (Parasite) Take some damage o OUCH (Flight) Potentially lose cargo or equipment following damage o OUCH (Parasite) Potentially lose cargo or equipment following damage o PU1 (Flight) Flip the coordinate axes for the four different views o PU1 (Parasite) Flip the coordinate axes for the four different views o SESCP (Flight) Spawn an escape pod from the current (parent) ship o SESCP (Parasite) Spawn an escape pod from the current (parent) ship o SHD (Flight) Charge a shield and drain some energy from the energy banks o SHD (Parasite) Charge a shield and drain some energy from the energy banks o SHD, Removed (Docked) Charge a shield and drain some energy from the energy banks o SIGHT (Flight) Draw the laser crosshairs o SIGHT (Parasite) Draw the laser crosshairs o SIGHT, Removed (Docked) Draw the laser crosshairs o TT110 (Docked) Launch from a station or show the front space view o TT110 (Flight) Launch from a station or show the front space view o TT110 (Parasite) Launch from a station or show the front space view o TT18 (Flight) Try to initiate a jump into hyperspace o TT18 (Parasite) Try to initiate a jump into hyperspace o TTX110, Removed (Docked) Set the current system to the nearest system and return to hyp o TTX110, Removed (Flight) Set the current system to the nearest system and return to hyp o WARP (Flight) Perform an in-system jump o WARP (Parasite) Perform an in-system jump o wW (Flight) Start a hyperspace countdown o wW (Parasite) Start a hyperspace countdown o wW, Removed (Docked) Start a hyperspace countdown + Inventory Showing the contents of the hold o Subroutines o TT210 (Docked) Show a list of current cargo in our hold, optionally to sell o TT210 (Flight) Show a list of current cargo in our hold, optionally to sell o TT210 (Parasite) Show a list of current cargo in our hold, optionally to sell o TT213 (Docked) Show the Inventory screen (red key f9) o TT213 (Flight) Show the Inventory screen (red key f9) o TT213 (Parasite) Show the Inventory screen (red key f9) o TT214, Removed (Docked) Ask a question with a "Y/N?" prompt and return the response + Keyboard Processing key presses and joysticks o Subroutines o b_14 (Flight) Scan the Delta 14B joystick buttons o b_14 (I/O processor) Scan the Delta 14B joystick buttons o check_keys (Parasite) Wait until a key is pressed, quitting the game if the game is paused and ESCAPE is pressed o CTRL (Docked) Scan the keyboard to see if CTRL is currently pressed o CTRL (Encyclopedia) Scan the keyboard to see if CTRL is currently pressed o CTRL (Flight) Scan the keyboard to see if CTRL is currently pressed o CTRL (Parasite) Scan the keyboard to see if CTRL is currently pressed o DK4 (Docked) Scan for pause, configuration and secondary flight keys o DK4 (Encyclopedia) Scan for pause, configuration and secondary flight keys o DK4 (Flight) Scan for pause, configuration and secondary flight keys o DK4 (Parasite) Scan for pause, configuration and secondary flight keys o DK4_FLIGHT (Parasite) Scan for pause, configuration and secondary flight keys (flight version) o DKJ1 (Flight) Read joystick and flight controls o DKJ1 (Parasite) Read joystick and flight controls o DKJ1, Removed (Docked) Read joystick and flight controls o DKS1 (Flight) Scan the keyboard for a flight key o DKS1 (Parasite) Scan the keyboard or joystick for a flight key by sending a scan_y command to the I/O processor o DKS2 (Docked) Read the joystick position o DKS2 (Encyclopedia) Read the joystick position o DKS2 (Flight) Read the joystick position o DKS2 (Parasite) Read the joystick position o DKS3 (Docked) Toggle a configuration setting and emit a beep o DKS3 (Encyclopedia) Toggle a configuration setting and emit a beep o DKS3 (Flight) Toggle a configuration setting and emit a beep o DKS3 (Parasite) Toggle a configuration setting and emit a beep o DKS4 (Docked) Scan the keyboard to see if a specific key is being pressed o DKS4 (Encyclopedia) Scan the keyboard to see if a specific key is being pressed o DKS4 (Flight) Scan the keyboard to see if a specific key is being pressed o DKS4 (I/O processor) Scan the keyboard to see if a specific key is being pressed o DKS4 (Parasite) Scan for a particular key press by sending a scan_xin command to the I/O processor o DOKEY (Docked) Scan for the joystick o DOKEY (Encyclopedia) Scan for the seven primary flight controls o DOKEY (Flight) Scan for the seven primary flight controls o DOKEY (Parasite) Scan for the seven primary flight controls o DOKEY_FLIGHT (Parasite) Scan for the seven primary flight controls (flight version) o FLKB (Docked) Flush the keyboard buffer o FLKB (Encyclopedia) Flush the keyboard buffer o FLKB (Parasite) Flush the keyboard buffer o FLKB, Removed (Flight) Flush the keyboard buffer o get_key (I/O processor) Implement the get_key command (wait for a key press) o PAS1 (Docked) Display a rotating ship at space coordinates (0, 112, 256) and scan the keyboard o PAS1 (Parasite) Display a rotating ship at space coordinates (0, 112, 256) and scan the keyboard o PAUSE (Docked) Display a rotating ship, waiting until a key is pressed, then remove the ship from the screen o PAUSE (Parasite) Display a rotating ship, waiting until a key is pressed, then remove the ship from the screen o PAUSE2 (Docked) Wait until a key is pressed, ignoring any existing key press o PAUSE2 (Encyclopedia) Wait until a key is pressed, ignoring any existing key press o PAUSE2 (Parasite) Wait until a key is pressed, ignoring any existing key press o RDKEY (Docked) Scan the keyboard for key presses o RDKEY (Encyclopedia) Scan the keyboard for key presses o RDKEY (Flight) Scan the keyboard for key presses o RDKEY (I/O processor) Scan the keyboard for key presses o RDKEY (Parasite) Scan the keyboard for key presses by sending a scan_10in command to the I/O processor o scan_10in (I/O processor) Implement the scan_10in command (scan the keyboard) o scan_fire (I/O processor) Implement the scan_fire command (scan the joystick's fire button) o scan_fire (Parasite) Check whether the joystick's fire button is being pressed by sending a scan_fire command to the I/O processor o scan_xin (I/O processor) Implement the scan_xin command (scan the keyboard for a specific key press) o scan_y (I/O processor) Implement the scan_y command (scan for a specific flight key or Delta 14B button press) o TT102 (Docked) Process function key, save key, hyperspace and chart key presses o TT102 (Encyclopedia) Process function key, save key, hyperspace and chart key presses o TT102 (Flight) Process function key, save key, hyperspace and chart key presses and update the hyperspace counter o TT102 (Parasite) Process function key, save key, hyperspace and chart key presses o TT17 (Docked) Scan the keyboard for cursor key or joystick movement o TT17 (Encyclopedia) Scan the keyboard for cursor key or joystick movement o TT17 (Flight) Scan the keyboard for cursor key or joystick movement o TT17 (Parasite) Scan the keyboard for cursor key or joystick movement o TT217 (Docked) Scan the keyboard until a key is pressed o TT217 (Encyclopedia) Scan the keyboard until a key is pressed o TT217 (Parasite) Scan the keyboard until a key is pressed by sending a get_key command to the I/O processor o U% (Flight) Clear the key logger o U% (Parasite) Clear the key logger o write_fe4e (I/O processor) Implement the write_fe4e command (update the System VIA interrupt enable register) o Variables o b_table (Flight) Lookup table for Delta 14B joystick buttons o b_table (I/O processor) Lookup table for Delta 14B joystick buttons o func_tab (Encyclopedia) Lookup table for internal numbers of red function keys o KYTB (Flight) Lookup table for in-flight keyboard controls o KYTB (I/O processor) Lookup table for in-flight keyboard controls + Loader The loading screen and system setup o Subroutines o BEGIN (Docked) Initialise the configuration variables and start the game o BEGIN (Parasite) Initialise the configuration variables and start the game o boot_in (Parasite) The entry point for the game o BRBR1 (Loader) Loader break handler: print a newline and the error message, and then hang the computer o do_BYTEV (Loader) The custom handler for OSBYTE calls in the BBC Master version o do_FILEV (Loader) The custom handler for OSFILE calls in the BBC Master version o do_FSCV (Loader) The custom handler for filing system calls in the BBC Master version o DOBEGIN (Docked) Initialise the configuration variables and start the game o DOENTRY (Encyclopedia) Initialise the encyclopedia and show the menu screen o DOENTRY (Flight) Load and run the docked code o DOENTRYS (Parasite) Dock at the space station, show the ship hangar and work out any mission progression o Elite loader (Part 1 of 3) (Loader) Set up the split screen mode, move code around, set up the sound envelopes and configure the system o Elite loader (Part 2 of 3) (Loader) Include binaries for recursive tokens, Missile blueprint and images o Elite loader (Part 3 of 3) (Loader) Include binaries for the loading screen images o encyclopedia (Docked) Load and run the encyclopedia code in 1.E o INBAY (Docked) Set the break handler and go to the docking bay without showing the tunnel or ship hangar, or checking mission progress o INBAY (Encyclopedia) Load and run the main docked code in 1.D o INBAY (Flight) Load and run the main docked code in 1.D o INBAY (Parasite) Restart the game upon death o launch (Encyclopedia) Load and run the main docked code in 1.D o LOAD (Loader) Load the main docked code, set up various vectors, run a checksum and start the game o LOADcode (Loader) Encrypted LOAD routine, bundled up in the loader so it can be moved to &0B00 to be run o LSHIPS (Flight) Load a new ship blueprints file o old_BYTEV (Loader) Call the default OSBYTE handler o restorews (Loader) Restore the filing system workspace o RSHIPS (Flight) Launch from the station, load a new set of ship blueprints and jump into the main game loop o RSHIPS (Parasite) Launch from the station, load a new set of ship blueprints and jump into the main game loop o savews (Loader) Save the filing system workspace in a safe place and replace it with the MOS character set o SCRAM (Docked) Set the save_lock variable and break handler o SCRAM (Parasite) Set the save_lock variable and break handler o scramble, Removed (Docked) Decrypt the main docked code between &1300 and &5FFF and the main game loop o scramble, Removed (Flight) Decrypt the main flight code between &1300 and &55FF and jump into the main game loop o set_vectors (Loader) Set the FILEV, FSCV and BYTEV vectors to point to our custom handlers o to_dd00 (Loader) BBC Master code for saving and restoring the MOS character set, bundled up in the loader so it can be moved to &DD00 to be run o TVT1code (Loader) Code block at &1100-&11E2 that remains resident in both docked and flight mode (palettes, screen mode routine and commander data) o Variables o LTLI (Encyclopedia) The OS command string for loading the docked code in file 1.D o LTLI (Flight) The OS command string for loading the docked code in file 1.D o MESS1 (Loader) The OS command string for changing the disc directory to E o mix_bits (Parasite) Lookup table for locating a specific bit in the 32-bit word for a given ship blueprint position o RDLI (Docked) The OS command string for running the flight code in file 1.F o SHIPI (Flight) The OS command string for loading a ship blueprints file + Main loop The core loop that runs Elite o Subroutines o Main flight loop (Part 1 of 16) (Flight) Seed the random number generator o Main flight loop (Part 1 of 16) (Parasite) Seed the random number generator o Main flight loop (Part 2 of 16) (Flight) Calculate the alpha and beta angles from the current pitch and roll of our ship o Main flight loop (Part 2 of 16) (Parasite) Calculate the alpha and beta angles from the current pitch and roll of our ship o Main flight loop (Part 3 of 16) (Flight) Scan for flight keys and process the results o Main flight loop (Part 3 of 16) (Parasite) Scan for flight keys and process the results o Main flight loop (Part 4 of 16) (Flight) For each nearby ship: Copy the ship's data block from K% to the zero-page workspace at INWK o Main flight loop (Part 4 of 16) (Parasite) For each nearby ship: Copy the ship's data block from K% to the zero-page workspace at INWK o Main flight loop (Part 5 of 16), Removed (Flight) For each nearby ship: If an energy bomb has been set off, potentially kill this ship o Main flight loop (Part 6 of 16) (Flight) For each nearby ship: Move the ship in space and copy the updated INWK data block back to K% o Main flight loop (Part 6 of 16) (Parasite) For each nearby ship: Move the ship in space and copy the updated INWK data block back to K% o Main flight loop (Part 7 of 16) (Flight) For each nearby ship: Check whether we are docking, scooping or colliding with it o Main flight loop (Part 7 of 16) (Parasite) For each nearby ship: Check whether we are docking, scooping or colliding with it o Main flight loop (Part 8 of 16) (Flight) For each nearby ship: Process us potentially scooping this item o Main flight loop (Part 8 of 16) (Parasite) For each nearby ship: Process us potentially scooping this item o Main flight loop (Part 9 of 16) (Flight) For each nearby ship: If it is a space station, check whether we are successfully docking with it o Main flight loop (Part 9 of 16) (Parasite) For each nearby ship: If it is a space station, check whether we are successfully docking with it o Main flight loop (Part 10 of 16) (Flight) For each nearby ship: Remove if scooped, or process collisions o Main flight loop (Part 10 of 16) (Parasite) For each nearby ship: Remove if scooped, or process collisions o Main flight loop (Part 11 of 16) (Flight) For each nearby ship: Process missile lock and firing our laser o Main flight loop (Part 11 of 16) (Parasite) For each nearby ship: Process missile lock and firing our laser o Main flight loop (Part 12 of 16) (Flight) For each nearby ship: Draw the ship, remove if killed, loop back o Main flight loop (Part 12 of 16) (Parasite) For each nearby ship: Draw the ship, remove if killed, loop back o Main flight loop (Part 13 of 16) (Flight) Charge shields and energy banks o Main flight loop (Part 13 of 16) (Parasite) Charge shields and energy banks o Main flight loop (Part 14 of 16) (Flight) Spawn a space station if we are close enough to the planet o Main flight loop (Part 14 of 16) (Parasite) Spawn a space station if we are close enough to the planet o Main flight loop (Part 15 of 16) (Flight) Perform altitude checks with the planet and sun and process fuel scooping if appropriate o Main flight loop (Part 15 of 16) (Parasite) Perform altitude checks with the planet and sun and process fuel scooping if appropriate o Main flight loop (Part 16 of 16) (Flight) Process laser pulsing, E.C.M. energy drain, call stardust routine o Main flight loop (Part 16 of 16) (Parasite) Process laser pulsing, E.C.M. energy drain, call stardust routine o Main game loop (Part 1 of 6) (Flight) Spawn a trader (a Cobra Mk III, Python, Boa or Anaconda) o Main game loop (Part 2 of 6) (Docked) Update the main loop counters o Main game loop (Part 2 of 6) (Encyclopedia) Update the main loop counters o Main game loop (Part 2 of 6) (Flight) Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister o Main game loop (Part 2 of 6) (Parasite) Update the main loop counters o Main game loop (Part 3 of 6) (Flight) Potentially spawn a cop, particularly if we've been bad o Main game loop (Part 4 of 6) (Flight) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates o Main game loop (Part 5 of 6) (Docked) Cool down lasers, make calls to update the dashboard o Main game loop (Part 5 of 6) (Encyclopedia) Cool down lasers, make calls to update the dashboard o Main game loop (Part 5 of 6) (Flight) Cool down lasers, make calls to update the dashboard o Main game loop (Part 5 of 6) (Parasite) Cool down lasers, make calls to update the dashboard o Main game loop (Part 6 of 6) (Docked) Process non-flight key presses (red function keys, docked keys) o Main game loop (Part 6 of 6) (Encyclopedia) Process non-flight key presses (red function keys, docked keys) o Main game loop (Part 6 of 6) (Flight) Process non-flight key presses (red function keys, docked keys) o Main game loop (Part 6 of 6) (Parasite) Process non-flight key presses (red function keys, docked keys) o Main game loop for flight (Part 1 of 6) (Parasite) Spawn a trader (a Cobra Mk III, Python, Boa or Anaconda) o Main game loop for flight (Part 2 of 6) (Parasite) Update the main loop counters o Main game loop for flight (Part 3 of 6) (Parasite) Potentially spawn a cop, particularly if we've been bad o Main game loop for flight (Part 4 of 6) (Parasite) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates o Main game loop for flight (Part 5 of 6) (Parasite) Cool down lasers, make calls to update the dashboard o Main game loop for flight (Part 6 of 6) (Parasite) Process non-flight key presses (red function keys, docked keys) + Market Prices, availability, selling and buying cargo o Subroutines o gnum (Docked) Get a number from the keyboard o gnum (Encyclopedia) Get a number from the keyboard o gnum (Parasite) Get a number from the keyboard o NWDAV4 (Docked) Print an "ITEM?" error, make a beep and rejoin the TT210 routine o NWDAV4 (Parasite) Print an "ITEM?" error, make a beep and rejoin the TT210 routine o stay_here (Docked) Pay a docking fee and refresh the system's market prices o stay_here (Parasite) Pay a docking fee and refresh the system's market prices o tnpr (Docked) Work out if we have space for a specific amount of cargo o tnpr (Parasite) Work out if we have space for a specific amount of cargo o tnpr1 (Flight) Work out if we have space for one tonne of cargo o tnpr1 (Parasite) Work out if we have space for one tonne of cargo o tnpr1, Removed (Flight) Work out if we have space for one tonne of cargo o TT151 (Docked) Print the name, price and availability of a market item o TT151 (Flight) Print the name, price and availability of a market item o TT151 (Parasite) Print the name, price and availability of a market item o TT152 (Docked) Print the unit ("t", "kg" or "g") for a market item o TT152 (Flight) Print the unit ("t", "kg" or "g") for a market item o TT152 (Parasite) Print the unit ("t", "kg" or "g") for a market item o TT160 (Docked) Print "t" (for tonne) and a space o TT160 (Flight) Print "t" (for tonne) and a space o TT160 (Parasite) Print "t" (for tonne) and a space o TT161 (Docked) Print "kg" (for kilograms) o TT161 (Flight) Print "kg" (for kilograms) o TT161 (Parasite) Print "kg" (for kilograms) o TT163 (Docked) Print the headers for the table of market prices o TT163 (Flight) Print the headers for the table of market prices o TT163 (Parasite) Print the headers for the table of market prices o TT167 (Docked) Show the Market Price screen (red key f7) o TT167 (Flight) Show the Market Price screen (red key f7) o TT167 (Parasite) Show the Market Price screen (red key f7) o TT16a (Docked) Print "g" (for grams) o TT16a (Flight) Print "g" (for grams) o TT16a (Parasite) Print "g" (for grams) o TT208 (Docked) Show the Sell Cargo screen (red key f2) or Sell Equipment screen (CTRL-f2) o TT208 (Parasite) Show the Sell Cargo screen (red key f2) or Sell Equipment screen (CTRL-f2) o TT219 (Docked) Show the Buy Cargo screen (red key f1) or Special Cargo screen (CTRL-f1) o TT219 (Parasite) Show the Buy Cargo screen (red key f1) or Special Cargo screen (CTRL-f1) o var (Docked) Calculate QQ19+3 = economy * | economic_factor| o var (Flight) Calculate QQ19+3 = economy * | economic_factor| o var (Parasite) Calculate QQ19+3 = economy * | economic_factor| o Variables o QQ23 (Docked) Market prices table o QQ23 (Flight) Market prices table o QQ23 (Parasite) Market prices table o Macros o ITEM (Docked) Macro definition for the market prices table o ITEM (Flight) Macro definition for the market prices table o ITEM (Parasite) Macro definition for the market prices table + Maths (Arithmetic) Addition, subtraction, multiplication, division o Subroutines o ADD (Docked) Calculate (A X) = (A P) + (S R) o ADD (Encyclopedia) Calculate (A X) = (A P) + (S R) o ADD (Flight) Calculate (A X) = (A P) + (S R) o ADD (Parasite) Calculate (A X) = (A P) + (S R) o DV41 (Flight) Calculate (P R) = 256 * DELTA / A o DV41 (Parasite) Calculate (P R) = 256 * DELTA / A o DV41, Removed (Docked) Calculate (P R) = 256 * DELTA / A o DV42 (Flight) Calculate (P R) = 256 * DELTA / z_hi o DV42 (Parasite) Calculate (P R) = 256 * DELTA / z_hi o DV42, Removed (Docked) Calculate (P R) = 256 * DELTA / z_hi o DVID3B2 (Flight) Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID3B2 (Parasite) Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID3B2, Removed (Docked) Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID4 (Docked) Calculate (P R) = 256 * A / Q o DVID4 (Flight) Calculate (P R) = 256 * A / Q o DVID4 (Parasite) Calculate (P R) = 256 * A / Q o DVIDT (Docked) Calculate (P+1 A) = (A P) / Q o DVIDT (Encyclopedia) Calculate (P+1 A) = (A P) / Q o DVIDT (Flight) Calculate (P+1 A) = (A P) / Q o DVIDT (Parasite) Calculate (P+1 A) = (A P) / Q o FMLTU (Docked) Calculate A = A * Q / 256 o FMLTU (Encyclopedia) Calculate A = A * Q / 256 o FMLTU (Flight) Calculate A = A * Q / 256 o FMLTU (Parasite) Calculate A = A * Q / 256 o FMLTU2 (Docked) Calculate A = K * sin(A) o FMLTU2 (Encyclopedia) Calculate A = K * sin(A) o FMLTU2 (Flight) Calculate A = K * sin(A) o FMLTU2 (Parasite) Calculate A = K * sin(A) o GC2 (Docked) Calculate (Y X) = (A P) * 4 o GC2 (Flight) Calculate (Y X) = (A P) * 4 o GC2 (Parasite) Calculate (Y X) = (A P) * 4 o GCASH (Docked) Calculate (Y X) = P * Q * 4 o GCASH (Parasite) Calculate (Y X) = P * Q * 4 o GCASH, Removed (Flight) Calculate (Y X) = P * Q * 4 o LCASH (Docked) Subtract an amount of cash from the cash pot o LCASH (Parasite) Subtract an amount of cash from the cash pot o LL120 (Docked) Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL120 (Encyclopedia) Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL120 (Flight) Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL120 (Parasite) Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL123 (Docked) Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL123 (Encyclopedia) Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL123 (Flight) Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL123 (Parasite) Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL129 (Docked) Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL129 (Encyclopedia) Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL129 (Flight) Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL129 (Parasite) Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| o LL28 (Docked) Calculate R = 256 * A / Q o LL28 (Encyclopedia) Calculate R = 256 * A / Q o LL28 (Flight) Calculate R = 256 * A / Q o LL28 (Parasite) Calculate R = 256 * A / Q o LL38 (Docked) Calculate (S A) = (S R) + (A Q) o LL38 (Encyclopedia) Calculate (S A) = (S R) + (A Q) o LL38 (Flight) Calculate (S A) = (S R) + (A Q) o LL38 (Parasite) Calculate (S A) = (S R) + (A Q) o LL5 (Docked) Calculate Q = SQRT(R Q) o LL5 (Encyclopedia) Calculate Q = SQRT(R Q) o LL5 (Flight) Calculate Q = SQRT(R Q) o LL5 (Parasite) Calculate Q = SQRT(R Q) o LL61 (Docked) Calculate (U R) = 256 * A / Q o LL61 (Encyclopedia) Calculate (U R) = 256 * A / Q o LL61 (Flight) Calculate (U R) = 256 * A / Q o LL61 (Parasite) Calculate (U R) = 256 * A / Q o LL62 (Docked) Calculate 128 - (U R) o LL62 (Encyclopedia) Calculate 128 - (U R) o LL62 (Flight) Calculate 128 - (U R) o LL62 (Parasite) Calculate 128 - (U R) o MAD (Docked) Calculate (A X) = Q * A + (S R) o MAD (Encyclopedia) Calculate (A X) = Q * A + (S R) o MAD (Flight) Calculate (A X) = Q * A + (S R) o MAD (Parasite) Calculate (A X) = Q * A + (S R) o MAS3 (Flight) Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block o MAS3 (Parasite) Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block o MCASH (Docked) Add an amount of cash to the cash pot o MCASH (Flight) Add an amount of cash to the cash pot o MCASH (Parasite) Add an amount of cash to the cash pot o MLS1 (Flight) Calculate (A P) = ALP1 * A o MLS1 (Parasite) Calculate (A P) = ALP1 * A o MLS2 (Flight) Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLS2 (Parasite) Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLS2, Removed (Docked) Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MLTU2 (Flight) Calculate (A P+1 P) = (A ~P) * Q o MLTU2 (Parasite) Calculate (A P+1 P) = (A ~P) * Q o MLTU2, Removed (Docked) Calculate (A P+1 P) = (A ~P) * Q o MLU1 (Flight) Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust o MLU1 (Parasite) Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust o MLU1, Removed (Docked) Calculate Y1 = y_hi and (A P) = | y_hi| * Q for Y-th stardust o MLU2 (Flight) Calculate (A P) = |A| * Q o MLU2 (Parasite) Calculate (A P) = |A| * Q o MLU2, Removed (Docked) Calculate (A P) = |A| * Q o MU1 (Docked) Copy X into P and A, and clear the C flag o MU1 (Encyclopedia) Copy X into P and A, and clear the C flag o MU1 (Flight) Copy X into P and A, and clear the C flag o MU1 (Parasite) Copy X into P and A, and clear the C flag o MU11 (Docked) Calculate (A P) = P * X o MU11 (Encyclopedia) Calculate (A P) = P * X o MU11 (Flight) Calculate (A P) = P * X o MU11 (Parasite) Calculate (A P) = P * X o MU5 (Flight) Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU5 (Parasite) Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU5, Removed (Docked) Set K(3 2 1 0) = (A A A A) and clear the C flGag o MU6 (Flight) Set P(1 0) = (A A) o MU6 (Parasite) Set P(1 0) = (A A) o MU6, Removed (Docked) Set P(1 0) = (A A) o MULT1 (Docked) Calculate (A P) = Q * A o MULT1 (Encyclopedia) Calculate (A P) = Q * A o MULT1 (Flight) Calculate (A P) = Q * A o MULT1 (Parasite) Calculate (A P) = Q * A o MULT12 (Docked) Calculate (S R) = Q * A o MULT12 (Encyclopedia) Calculate (S R) = Q * A o MULT12 (Flight) Calculate (S R) = Q * A o MULT12 (Parasite) Calculate (S R) = Q * A o MULT3 (Flight) Calculate K(3 2 1 0) = (A P+1 P) * Q o MULT3 (Parasite) Calculate K(3 2 1 0) = (A P+1 P) * Q o MULTU (Docked) Calculate (A P) = P * Q o MULTU (Encyclopedia) Calculate (A P) = P * Q o MULTU (Flight) Calculate (A P) = P * Q o MULTU (Parasite) Calculate (A P) = P * Q o MUT1 (Flight) Calculate R = XX and (A P) = Q * A o MUT1 (Parasite) Calculate R = XX and (A P) = Q * A o MUT1, Removed (Docked) Calculate R = XX and (A P) = Q * A o MUT2 (Flight) Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT2 (Parasite) Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT2, Removed (Docked) Calculate (S R) = XX(1 0) and (A P) = Q * A o MUT3, Removed (Docked) Unused routine that does the same as MUT2 o MUT3, Removed (Flight) Unused routine that does the same as MUT2 o PIX1 (Flight) Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o PIX1 (Parasite) Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o PIX1, Removed (Docked) Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o ROOT (Loader) Calculate ZP = SQRT(ZP(1 0)) o SPS2 (Flight) Calculate (Y X) = A / 10 o SPS2 (Parasite) Calculate (Y X) = A / 10 o SPS2, Moved (Flight) Calculate (Y X) = A / 10 o SQUA (Docked) Clear bit 7 of A and calculate (A P) = A * A o SQUA (Encyclopedia) Clear bit 7 of A and calculate (A P) = A * A o SQUA (Flight) Clear bit 7 of A and calculate (A P) = A * A o SQUA (Parasite) Clear bit 7 of A and calculate (A P) = A * A o SQUA2 (Docked) Calculate (A P) = A * A o SQUA2 (Encyclopedia) Calculate (A P) = A * A o SQUA2 (Flight) Calculate (A P) = A * A o SQUA2 (Loader) Calculate (A P) = A * A o SQUA2 (Parasite) Calculate (A P) = A * A o TAS1 (Flight) Calculate K3 = (x_sign x_hi x_lo) - V(1 0) o TAS1 (Parasite) Calculate K3 = (x_sign x_hi x_lo) - V(1 0) o TIS1 (Docked) Calculate (A ?) = (-X * A + (S R)) / 96 o TIS1 (Encyclopedia) Calculate (A ?) = (-X * A + (S R)) / 96 o TIS1 (Flight) Calculate (A ?) = (-X * A + (S R)) / 96 o TIS1 (Parasite) Calculate (A ?) = (-X * A + (S R)) / 96 o TIS2 (Docked) Calculate A = A / Q o TIS2 (Encyclopedia) Calculate A = A / Q o TIS2 (Flight) Calculate A = A / Q o TIS2 (Parasite) Calculate A = A / Q o TIS3 (Docked) Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o TIS3 (Encyclopedia) Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o TIS3 (Flight) Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o TIS3 (Parasite) Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 o Unused duplicate of MULTU (Flight) Unused duplicate of the MULTU routine o Unused duplicate of MULTU (Parasite) Unused duplicate of the MULTU routine o Unused duplicate of MULTU, Removed (Docked) Unused duplicate of the MULTU routine o VCSU1 (Flight) Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station o VCSU1 (Parasite) Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station o VCSUB (Flight) Calculate vector K3(8 0) = [x y z] - coordinates in (A V) o VCSUB (Parasite) Calculate vector K3(8 0) = [x y z] - coordinates in (A V) + Maths (Geometry) Vectors, coordinates, dot products and matrices o Subroutines o ARCTAN (Flight) Calculate A = arctan(P / Q) o ARCTAN (Parasite) Calculate A = arctan(P / Q) o FAROF (Flight) Compare x_hi, y_hi and z_hi with 224 o FAROF (Parasite) Compare x_hi, y_hi and z_hi with 224 o FAROF2 (Flight) Compare x_hi, y_hi and z_hi with A o FAROF2 (Parasite) Compare x_hi, y_hi and z_hi with A o LL51 (Docked) Calculate the dot product of XX15 and XX16 o LL51 (Encyclopedia) Calculate the dot product of XX15 and XX16 o LL51 (Flight) Calculate the dot product of XX15 and XX16 o LL51 (Parasite) Calculate the dot product of XX15 and XX16 o MAS1 (Flight) Add an orientation vector coordinate to an INWK coordinate o MAS1 (Parasite) Add an orientation vector coordinate to an INWK coordinate o MAS2 (Flight) Calculate a cap on the maximum distance to the planet or sun o MAS2 (Parasite) Calculate a cap on the maximum distance to the planet or sun o MAS4 (Flight) Calculate a cap on the maximum distance to a ship o MAS4 (Parasite) Calculate a cap on the maximum distance to a ship o NORM (Docked) Normalise the three-coordinate vector in XX15 o NORM (Encyclopedia) Normalise the three-coordinate vector in XX15 o NORM (Flight) Normalise the three-coordinate vector in XX15 o NORM (Parasite) Normalise the three-coordinate vector in XX15 o SPS1 (Flight) Calculate the vector to the planet, sun or station and store it in XX15 o SPS1 (Parasite) Calculate the vector to the planet, sun or station and store it in XX15 o SPS1, Removed (Docked) Calculate the vector to the planet, sun or station and store it in XX15 o SPS3 (Flight) Copy a space coordinate from the K% block into K3 o SPS3 (Parasite) Copy a space coordinate from the K% block into K3 o SPS3, Removed (Docked) Copy a space coordinate from the K% block into K3 o SPS4, Removed (Flight) Calculate the vector to the space station o TAS2 (Flight) Normalise the three-coordinate vector in K3 o TAS2 (Parasite) Normalise the three-coordinate vector in K3 o TAS2, Removed (Docked) Normalise the three-coordinate vector in K3 o TAS3 (Flight) Calculate the dot product of XX15 and an orientation vector o TAS3 (Parasite) Calculate the dot product of XX15 and an orientation vector o TAS3, Removed (Docked) Calculate the dot product of XX15 and an orientation vector o TAS4 (Flight) Calculate the dot product of XX15 and one of the space station's orientation vectors o TAS4 (Parasite) Calculate the dot product of XX15 and one of the space station's orientation vectors o TAS6 (Flight) Negate the vector in XX15 so it points in the opposite direction o TAS6 (Parasite) Negate the vector in XX15 so it points in the opposite direction o TIDY (Docked) Orthonormalise the orientation vectors for a ship o TIDY (Encyclopedia) Orthonormalise the orientation vectors for a ship o TIDY (Flight) Orthonormalise the orientation vectors for a ship o TIDY (Parasite) Orthonormalise the orientation vectors for a ship o Variables o ACT (Parasite) Arctan table o ACT (Text tokens) Arctan table o SNE (Parasite) Sine/cosine table o SNE (Text tokens) Sine/cosine table + Missions Only in the enhanced versions of Elite o Subroutines o BRIEF (Docked) Start mission 1 and show the mission briefing o BRIEF (Parasite) Start mission 1 and show the mission briefing o BRIEF2 (Docked) Start mission 2 o BRIEF2 (Parasite) Start mission 2 o BRIEF3 (Docked) Receive the briefing and plans for mission 2 o BRIEF3 (Parasite) Receive the briefing and plans for mission 2 o BRIS (Docked) Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds o BRIS (Parasite) Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds o BRP (Docked) Print an extended token and show the Status Mode screen o BRP (Parasite) Print an extended token and show the Status Mode screen o cour_buy (Docked) Show the Special Cargo screen (CTRL-f1) o cour_buy (Parasite) Show the Special Cargo screen (CTRL-f1) o cour_count (Docked) Generate a single special cargo mission and display its menu item o cour_count (Parasite) Generate a single special cargo mission and display its menu item o cour_dock (Docked) Update the current special cargo delivery mission on docking o cour_dock (Parasite) Update the current special cargo delivery mission on docking o DEBRIEF (Docked) Finish mission 1 o DEBRIEF (Parasite) Finish mission 1 o DEBRIEF2 (Docked) Finish mission 2 o DEBRIEF2 (Parasite) Finish mission 2 o THERE (Flight) Check whether we are in the Constrictor's system in mission 1 o THERE (Parasite) Check whether we are in the Constrictor's system in mission 1 + Moving Moving and rotating ships and planets in space o Subroutines o MV40 (Flight) Rotate the planet or sun's location in space by the amount of pitch and roll of our ship o MV40 (Parasite) Rotate the planet or sun's location in space by the amount of pitch and roll of our ship o MVEIT (Part 1 of 9) (Docked) Move current ship: Tidy the orientation vectors o MVEIT (Part 1 of 9) (Encyclopedia) Move current ship: Tidy the orientation vectors o MVEIT (Part 1 of 9) (Flight) Move current ship: Tidy the orientation vectors o MVEIT (Part 1 of 9) (Parasite) Move current ship: Tidy the orientation vectors o MVEIT (Part 2 of 9) (Flight) Move current ship: Call tactics routine, remove ship from scanner o MVEIT (Part 3 of 9) (Flight) Move current ship: Move ship forward according to its speed o MVEIT (Part 4 of 9) (Flight) Move current ship: Apply acceleration to ship's speed as a one-off o MVEIT (Part 5 of 9) (Flight) Move current ship: Rotate ship's location by our pitch and roll o MVEIT (Part 6 of 9) (Flight) Move current ship: Move the ship in space according to our speed o MVEIT (Part 7 of 9) (Docked) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 7 of 9) (Encyclopedia) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 7 of 9) (Flight) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 7 of 9) (Parasite) Move current ship: Rotate ship's orientation vectors by pitch/roll o MVEIT (Part 8 of 9) (Docked) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 8 of 9) (Encyclopedia) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 8 of 9) (Flight) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 8 of 9) (Parasite) Move current ship: Rotate ship about itself by its own pitch/roll o MVEIT (Part 9 of 9) (Docked) Return from the subroutine (the scanner is not used when docked) o MVEIT (Part 9 of 9) (Encyclopedia) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVEIT (Part 9 of 9) (Flight) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVEIT (Part 9 of 9) (Parasite) Move current ship: Redraw on scanner, if it hasn't been destroyed o MVEIT_FLIGHT (Part 1 of 6) (Parasite) Move current ship (flight version) o MVEIT_FLIGHT (Part 2 of 6) (Parasite) Move current ship: Call tactics routine, remove ship from scanner o MVEIT_FLIGHT (Part 3 of 6) (Parasite) Move current ship: Move ship forward according to its speed o MVEIT_FLIGHT (Part 4 of 6) (Parasite) Move current ship: Apply acceleration to ship's speed as a one-off o MVEIT_FLIGHT (Part 5 of 6) (Parasite) Move current ship: Rotate ship's location by our pitch and roll o MVEIT_FLIGHT (Part 6 of 6) (Parasite) Move current ship: Move the ship in space according to our speed o MVS4 (Docked) Apply pitch and roll to an orientation vector o MVS4 (Encyclopedia) Apply pitch and roll to an orientation vector o MVS4 (Flight) Apply pitch and roll to an orientation vector o MVS4 (Parasite) Apply pitch and roll to an orientation vector o MVS5 (Docked) Apply a 3.6 degree pitch or roll to an orientation vector o MVS5 (Encyclopedia) Apply a 3.6 degree pitch or roll to an orientation vector o MVS5 (Flight) Apply a 3.6 degree pitch or roll to an orientation vector o MVS5 (Parasite) Apply a 3.6 degree pitch or roll to an orientation vector o MVT1 (Flight) Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT1 (Parasite) Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT1, Removed (Docked) Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) o MVT3 (Flight) Calculate K(3 2 1) = (x_sign x_hi x_lo) + K (3 2 1) o MVT3 (Parasite) Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1) o MVT3, Removed (Docked) Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1) o MVT6 (Flight) Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o MVT6 (Parasite) Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o MVT6, Removed (Docked) Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) o SFS2 (Flight) Move a ship in space along one of the coordinate axes o SFS2 (Parasite) Move a ship in space along one of the coordinate axes + Save and load Commander files and competition codes o Subroutines o BRKBK (Docked) Set the standard BRKV handler for the game o BRKBK (Encyclopedia) Set the standard BRKV handler for the game o BRKBK (Parasite) Set the standard BRKV handler for the game o CAT (Docked) Catalogue a disc, wait for a key press and display the disc access menu o CAT (Parasite) Catalogue a disc, wait for a key press and display the disc access menu o CATS (Docked) Ask for a disc drive number and print a catalogue of that drive o CATS (Parasite) Ask for a disc drive number and print a catalogue of that drive o CHECK (Docked) Calculate the checksum for the last saved commander data block o CHECK (Parasite) Calculate the checksum for the last saved commander data block o confirm (Docked) Print "ARE YOU SURE?" and wait for a response o confirm (Parasite) Print "ARE YOU SURE?" and wait for a response o DELT (Docked) Catalogue a disc, ask for a filename to delete, and delete the file o DELT (Parasite) Catalogue a disc, ask for a filename to delete, and delete the file o GTDRV (Docked) Get an ASCII disc drive drive number from the keyboard o GTDRV (Parasite) Get an ASCII disc drive drive number from the keyboard o GTNMEW (Docked) Fetch the name of a commander file to save or load o GTNMEW (Parasite) Fetch the name of a commander file to save or load o LOD (Docked) Load a commander file o LOD (Parasite) Load a commander file o MEBRK (Docked) The BRKV handler for disc access operations o MEBRK (Parasite) The BRKV handler for disc access operations o QUS1 (Docked) Save or load the commander file o QUS1 (Parasite) Save or load the commander file o retry (Docked) Scan the keyboard until a key is pressed and display the disc access menu o retry (Parasite) Scan the keyboard until a key is pressed and display the disc access menu o SVE (Docked) Save the commander file o SVE (Parasite) Save the commander file o TR1 (Docked) Copy the last saved commander's name from NA% to INWK o TR1 (Parasite) Copy the last saved commander's name from NA% to INWK o TRNME (Docked) Copy the last saved commander's name from INWK to NA% o TRNME (Parasite) Copy the last saved commander's name from INWK to NA% o Variables o CHK (Loader) First checksum byte for the saved commander data file o CHK (Parasite) First checksum byte for the saved commander data file o CHK2 (Loader) Second checksum byte for the saved commander data file o CHK2 (Parasite) Second checksum byte for the saved commander data file o CTLI (Docked) The OS command string for cataloguing a disc o CTLI (Parasite) The OS command string for cataloguing a disc o DELI (Docked) The OS command string for deleting a file o DELI (Parasite) The OS command string for deleting a file o NA% (Loader) The data block for the last saved commander o NA% (Parasite) The data block for the last saved commander o S1% (Loader) The drive and directory number used when saving or loading a commander file o S1% (Parasite) The drive and directory number used when saving or loading a commander file o stack, Removed (Docked) Temporary storage for the stack pointer when switching the BRKV handler between BRBR and MEBRK + Screen mode Elite's famous split-screen mode o Subroutines o DET1 (Flight) Show or hide the dashboard (for when we die) o DET1 (I/O processor) Show or hide the dashboard (for when we die) o DET1 (Parasite) Show or hide the dashboard (for when we die) by sending a write_crtc command to the I/O processor o DET1, Removed (Docked) Show or hide the dashboard (for when we die) o IRQ1 (Loader) The main screen-mode interrupt handler (IRQ1V points here) o sync_in (I/O processor) Implement the sync_in command (wait for the vertical sync) o WSCAN (Docked) Wait for the vertical sync o WSCAN (Encyclopedia) Wait for the vertical sync o WSCAN (Flight) Wait for the vertical sync o WSCAN (I/O processor) Wait for the vertical sync o WSCAN (Parasite) Wait for the vertical sync by sending a sync_in command to the I/O processor o Variables o B% (Loader) VDU commands for setting the square mode 4 screen o TVT1 (Loader) Palette data for space and the two dashboard colour schemes o VEC (Missile ship blueprint) The original value of the IRQ1 vector + Ship hangar The ship hangar that's displayed on docking o Subroutines o HA2 (I/O processor) Implement the picture_v command (draw vertical lines for the ship hangar background) o HALL (Docked) Draw the ships in the ship hangar, then draw the hangar o HALL (Parasite) Draw the ships in the ship hangar, then draw the hangar o HANGER (Docked) Display the ship hangar o HANGER (I/O processor) Implement the picture_h command (draw horizontal lines for the ship hangar floor) o HANGER (Parasite) Display the ship hangar by sending picture_h and picture_v commands to the I/O processor o HAS1 (Docked) Draw a ship in the ship hangar o HAS1 (Parasite) Draw a ship in the ship hangar o HAS2 (Docked) Draw a hangar background line from left to right o HAS2 (I/O processor) Draw a hangar background line from left to right o HAS3 (Docked) Draw a hangar background line from right to left o HAS3 (I/O processor) Draw a hangar background line from right to left o UNWISE (Docked) Switch the main line-drawing routine between EOR and OR logic o UNWISE (I/O processor) Switch the main line-drawing routine between EOR and OR logic o UNWISE (Parasite) Switch the main line-drawing routine between EOR and OR logic by sending a draw_mode command to the I/O processor o Variables o HATB (Docked) Ship hangar group table o HATB (Parasite) Ship hangar group table + Sound Explosions, laser fire, hyperspace and more o Subroutines o BEEP (Docked) Make a short, high beep o BEEP (Encyclopedia) Make a short, high beep o BEEP (Flight) Make a short, high beep o BEEP (Parasite) Make a short, high beep o BELL (Docked) Make a standard system beep o BELL (Encyclopedia) Make a standard system beep o BELL (Flight) Make a standard system beep o BELL (Parasite) Make a standard system beep o ECMOF (Docked) Switch off the E.C.M. o ECMOF (Encyclopedia) Switch off the E.C.M. o ECMOF (Flight) Switch off the E.C.M. o ECMOF (Parasite) Switch off the E.C.M. o EXNO (Flight) Make the sound of a laser strike or ship explosion o EXNO (Parasite) Make the sound of a laser strike or ship explosion o EXNO, Removed (Docked) Make the sound of a laser strike or ship explosion o EXNO2 (Flight) Process us making a kill o EXNO2 (Parasite) Process us making a kill o EXNO2, Removed (Docked) Process us making a kill o EXNO3 (Flight) Make an explosion sound o EXNO3 (Parasite) Make an explosion sound o EXNO3, Removed (Docked) Make an explosion sound o NO3 (Docked) Make a sound from a prepared sound block o NO3 (Encyclopedia) Make a sound from a prepared sound block o NO3 (Flight) Make a sound from a prepared sound block o NO3 (Parasite) Make a sound from a prepared sound block o NOISE (Docked) Make the sound whose number is in A o NOISE (Encyclopedia) Make the sound whose number is in A o NOISE (Flight) Make the sound whose number is in A o NOISE (Parasite) Make the sound whose number is in A o NOS1 (Docked) Prepare a sound block o NOS1 (Encyclopedia) Prepare a sound block o NOS1 (Flight) Prepare a sound block o NOS1 (Parasite) Prepare a sound block o Variables o E% (Loader) Sound envelope definitions o SFX (Docked) Sound data o SFX (Encyclopedia) Sound data o SFX (Flight) Sound data o SFX (Parasite) Sound data o Macros o FNE (Loader) Macro definition for defining a sound envelope + Stardust Stardust generation and movement o Subroutines o FLIP (Flight) Reflect the stardust particles in the screen diagonal and redraw the stardust field o FLIP (Parasite) Reflect the stardust particles in the screen diagonal and redraw the stardust field o FLIP, Removed (Docked) Reflect the stardust particles in the screen diagonal and redraw the stardust field o nWq (Flight) Create a random cloud of stardust o nWq (Parasite) Create a random cloud of stardust o NWSTARS (Flight) Initialise the stardust field o NWSTARS (Parasite) Initialise the stardust field o STARS (Flight) The main routine for processing the stardust o STARS (Parasite) The main routine for processing the stardust o STARS1 (Flight) Process the stardust for the front view o STARS1 (Parasite) Process the stardust for the front view o STARS2 (Flight) Process the stardust for the left or right view o STARS2 (Parasite) Process the stardust for the left or right view o STARS6 (Flight) Process the stardust for the rear view o STARS6 (Parasite) Process the stardust for the rear view + Start and end The title screen... and the Game Over screen o Subroutines o BR1 (Encyclopedia) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 1 of 2) (Docked) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 1 of 2) (Parasite) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 2 of 2) (Docked) Show the "Press Fire or Space, Commander" screen and start the game o BR1 (Part 2 of 2) (Parasite) Show the "Press Fire or Space, Commander" screen and start the game o DEATH (Flight) Display the death screen o DEATH (Parasite) Display the death screen o DEATH2 (Docked) Reset most of the game and restart from the title screen o DEATH2 (Encyclopedia) Reset most of the game and restart from the title screen o DEATH2 (Flight) Reset most of the game and restart from the title screen o DEATH2 (Parasite) Reset most of the game and restart from the title screen o DFAULT (Docked) Reset the current commander data block to the last saved commander o DFAULT (Parasite) Reset the current commander data block to the last saved commander o escape (Encyclopedia) Load the main docked code so that it shows the docking tunnel o RES2 (Docked) Reset a number of flight variables and workspaces o RES2 (Encyclopedia) Reset a number of flight variables and workspaces o RES2 (Flight) Reset a number of flight variables and workspaces o RES2 (Parasite) Reset a number of flight variables and workspaces o RESET (Docked) Reset most variables o RESET (Flight) Reset most variables o RESET (Parasite) Reset most variables o TITLE (Docked) Display a title screen with a rotating ship and prompt o TITLE (Parasite) Display a title screen with a rotating ship and prompt o TT170 (Docked) Main entry point for the Elite game code + Status Showing the commander's status and rank o Subroutines o BAD, Removed (Docked) Calculate how bad we have been o BAD, Removed (Flight) Calculate how bad we have been o BAY (Docked) Go to the docking bay (i.e. show the Status Mode screen) o BAY (Encyclopedia) Go to the docking bay (i.e. show the Encyclopedia screen) o BAY (Parasite) Go to the docking bay (i.e. show the Status Mode screen) o STATUS (Docked) Show the Status Mode screen (red key f8) o STATUS (Flight) Show the Status Mode screen (red key f8) o STATUS (Parasite) Show the Status Mode screen (red key f8) + Tactics AI tactics for enemy ships and missiles o Subroutines o anger_8c (Flight) Make the current ship angry o anger_8c (Parasite) Make the current ship angry o ANGRY (Flight) Make a ship hostile o ANGRY (Parasite) Make a ship hostile o FR1 (Flight) Display the "missile jammed" message o FR1 (Parasite) Display the "missile jammed" message o FRMIS (Flight) Fire a missile from our ship o FRMIS (Parasite) Fire a missile from our ship o FRS1 (Flight) Launch a ship straight ahead of us, below the laser sights o FRS1 (Parasite) Launch a ship straight ahead of us, below the laser sights o HITCH (Flight) Work out if the ship in INWK is in our crosshairs o HITCH (Parasite) Work out if the ship in INWK is in our crosshairs o SFRMIS (Flight) Add an enemy missile to our local bubble of universe o SFRMIS (Parasite) Add an enemy missile to our local bubble of universe o TACTICS (Part 1 of 7) (Flight) Apply tactics: Process missiles, both enemy missiles and our own o TACTICS (Part 1 of 7) (Parasite) Apply tactics: Process missiles, both enemy missiles and our own o TACTICS (Part 2 of 7) (Flight) Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate o TACTICS (Part 2 of 7) (Parasite) Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate o TACTICS (Part 3 of 7) (Flight) Apply tactics: Calculate dot product to determine ship's aim o TACTICS (Part 3 of 7) (Parasite) Apply tactics: Calculate dot product to determine ship's aim o TACTICS (Part 4 of 7) (Flight) Apply tactics: Check energy levels, maybe launch escape pod if low o TACTICS (Part 4 of 7) (Parasite) Apply tactics: Check energy levels, maybe launch escape pod if low o TACTICS (Part 5 of 7) (Flight) Apply tactics: Consider whether to launch a missile at us o TACTICS (Part 5 of 7) (Parasite) Apply tactics: Consider whether to launch a missile at us o TACTICS (Part 6 of 7) (Flight) Apply tactics: Consider firing a laser at us, if aim is true o TACTICS (Part 6 of 7) (Parasite) Apply tactics: Consider firing a laser at us, if aim is true o TACTICS (Part 7 of 7) (Flight) Apply tactics: Set pitch, roll, and acceleration o TACTICS (Part 7 of 7) (Parasite) Apply tactics: Set pitch, roll, and acceleration + Text Recursive tokens, control codes, two-letter tokens and more o Subroutines o BPRNT (Docked) Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o BPRNT (Encyclopedia) Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o BPRNT (Flight) Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o BPRNT (Parasite) Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o cargo_mtok (Flight) Print the name of a specific cargo item o cargo_mtok (Parasite) Print the name of a specific cargo item o CHPR (Docked) Print a character at the text cursor by poking into screen memory o CHPR (Encyclopedia) Print a character at the text cursor by poking into screen memory o CHPR (I/O processor) Implement the write_xyc command (write a character to the screen) o CHPR (Parasite) Print a character at the text cursor by sending a write_xyc command to the I/O processor o clr_vdustat (Encyclopedia) Switch to standard tokens in lower case o cmn (Docked) Print the commander's name o cmn (Encyclopedia) Print the commander's name o cmn (Flight) Print the commander's name o cmn (Parasite) Print the commander's name o column_16 (Encyclopedia) Tab to column 16 and start a new word when printing extended tokens o cpl (Docked) Print the selected system name o cpl (Encyclopedia) Print the selected system name o cpl (Flight) Print the selected system name o cpl (Parasite) Print the selected system name o crlf (Docked) Tab to column 21 and print a colon o crlf (Encyclopedia) Tab to column 21 and print a colon o crlf (Flight) Tab to column 21 and print a colon o crlf (Parasite) Tab to column 21 and print a colon o csh (Docked) Print the current amount of cash o csh (Encyclopedia) Print the current amount of cash o csh (Flight) Print the current amount of cash o csh (Parasite) Print the current amount of cash o DETOK (Docked) Print an extended recursive token from the TKN1 token table o DETOK (Encyclopedia) Print an extended recursive token from the TKN1 token table o DETOK (Parasite) Print an extended recursive token from the TKN1 token table o DETOK2 (Docked) Print an extended text token (1-255) o DETOK2 (Encyclopedia) Print an extended text token (1-255) o DETOK2 (Parasite) Print an extended text token (1-255) o DETOK3 (Docked) Print an extended recursive token from the RUTOK token table o DETOK3 (Parasite) Print an extended recursive token from the RUTOK token table o DETOK3, Moved (Docked) Print an extended recursive token from the RUTOK token table o dn (Docked) Print the amount of cash and beep o dn (Parasite) Print the amount of cash and beep o dn2 (Docked) Make a short, high beep and delay for 1 second o dn2 (Encyclopedia) Make a short, high beep and delay for 1 second o dn2 (Parasite) Make a short, high beep and delay for 1 second o ee3 (Flight) Print the hyperspace countdown in the top-left of the screen o ee3 (Parasite) Print the hyperspace countdown in the top-left of the screen o ex (Docked) Print a recursive token o ex (Encyclopedia) Print a recursive token o ex (Flight) Print a recursive token o ex (Parasite) Print a recursive token o FEED (Docked) Print a newline o FEED (Encyclopedia) Print a newline o FEED (Parasite) Print a newline o fwl (Docked) Print fuel and cash levels o fwl (Encyclopedia) Print fuel and cash levels o fwl (Flight) Print fuel and cash levels o fwl (Parasite) Print fuel and cash levels o me1 (Docked) Erase an old in-flight message and display a new one o me1 (Encyclopedia) Erase an old in-flight message and display a new one o me1 (Flight) Erase an old in-flight message and display a new one o me1 (Parasite) Erase an old in-flight message and display a new one o me2 (Docked) Remove an in-flight message from the space view o me2 (Encyclopedia) Remove an in-flight message from the space view o me2 (Flight) Remove an in-flight message from the space view o me2 (Parasite) Remove an in-flight message from the space view o mes9 (Docked) Print a text token, possibly followed by " DESTROYED" o mes9 (Encyclopedia) Print a text token, possibly followed by " DESTROYED" o mes9 (Flight) Print a text token, possibly followed by " DESTROYED" o mes9 (Parasite) Print a text token, possibly followed by " DESTROYED" o MESS (Docked) Display an in-flight message o MESS (Encyclopedia) Display an in-flight message o MESS (Flight) Display an in-flight message o MESS (Parasite) Display an in-flight message o MT1 (Docked) Switch to ALL CAPS when printing extended tokens o MT1 (Encyclopedia) Switch to ALL CAPS when printing extended tokens o MT1 (Parasite) Switch to ALL CAPS when printing extended tokens o MT13 (Docked) Switch to lower case when printing extended tokens o MT13 (Encyclopedia) Switch to lower case when printing extended tokens o MT13 (Parasite) Switch to lower case when printing extended tokens o MT14 (Docked) Switch to justified text when printing extended tokens o MT14 (Encyclopedia) Switch to justified text when printing extended tokens o MT14 (Parasite) Switch to justified text when printing extended tokens o MT15 (Docked) Switch to left-aligned text when printing extended tokens o MT15 (Encyclopedia) Switch to left-aligned text when printing extended tokens o MT15 (Parasite) Switch to left-aligned text when printing extended tokens o MT16 (Docked) Print the character in variable DTW7 o MT16 (Encyclopedia) Print the character in variable DTW7 o MT16 (Parasite) Print the character in variable DTW7 o MT17 (Docked) Print the selected system's adjective, e.g. Lavian for Lave o MT17 (Encyclopedia) Print the selected system's adjective, e.g. Lavian for Lave o MT17 (Parasite) Print the selected system's adjective, e.g. Lavian for Lave o MT18 (Docked) Print a random 1-8 letter word in Sentence Case o MT18 (Encyclopedia) Print a random 1-8 letter word in Sentence Case o MT18 (Parasite) Print a random 1-8 letter word in Sentence Case o MT19 (Docked) Capitalise the next letter o MT19 (Encyclopedia) Capitalise the next letter o MT19 (Parasite) Capitalise the next letter o MT2 (Docked) Switch to Sentence Case when printing extended tokens o MT2 (Encyclopedia) Switch to Sentence Case when printing extended tokens o MT2 (Parasite) Switch to Sentence Case when printing extended tokens o MT23 (Docked) Move to row 10, switch to white text, and switch to lower case when printing extended tokens o MT23 (Encyclopedia) Move to row 10, switch to white text, and switch to lower case when printing extended tokens o MT23 (Parasite) Move to row 10, switch to white text, and switch to lower case when printing extended tokens o MT26 (Docked) Fetch a line of text from the keyboard o MT26 (Encyclopedia) Fetch a line of text from the keyboard o MT26 (Parasite) Fetch a line of text from the keyboard o MT27 (Docked) Print the captain's name during mission briefings o MT27 (Encyclopedia) Print the captain's name during mission briefings o MT27 (Parasite) Print the captain's name during mission briefings o MT28 (Docked) Print the location hint during the mission 1 briefing o MT28 (Encyclopedia) Print the location hint during the mission 1 briefing o MT28 (Parasite) Print the location hint during the mission 1 briefing o MT29 (Docked) Move to row 6, switch to white text, and switch to lower case when printing extended tokens o MT29 (Encyclopedia) Move to row 6, switch to white text, and switch to lower case when printing extended tokens o MT29 (Parasite) Move to row 6, switch to white text, and switch to lower case when printing extended tokens o MT5 (Docked) Switch to extended tokens o MT5 (Encyclopedia) Switch to extended tokens o MT5 (Parasite) Switch to extended tokens o MT6 (Docked) Switch to standard tokens in Sentence Case o MT6 (Encyclopedia) Switch to standard tokens in Sentence Case o MT6 (Parasite) Switch to standard tokens in Sentence Case o MT8 (Docked) Tab to column 6 and start a new word when printing extended tokens o MT8 (Encyclopedia) Tab to column 6 and start a new word when printing extended tokens o MT8 (Parasite) Tab to column 6 and start a new word when printing extended tokens o MT9 (Docked) Clear the screen and set the current view type to 1 o MT9 (Encyclopedia) Clear the screen and set the current view type to 1 o MT9 (Parasite) Clear the screen and set the current view type to 1 o n_name (Docked) Print the type of a given ship o n_name (Parasite) Print the type of a given ship o ou2, Removed (Flight) Display "E.C.M.SYSTEM DESTROYED" as an in-flight message o ou3, Removed (Flight) Display "FUEL SCOOPS DESTROYED" as an in-flight message o PDESC (Docked) Print the system's extended description or a mission 1 directive o PDESC (Encyclopedia) Print the system's extended description or a mission 1 directive o PDESC (Parasite) Print the system's extended description or a mission 1 directive o plf (Docked) Print a text token followed by a newline o plf (Encyclopedia) Print a text token followed by a newline o plf (Flight) Print a text token followed by a newline o plf (Parasite) Print a text token followed by a newline o plf2 (Flight) Print text followed by a newline and indent of 6 characters o plf2, Removed (Docked) Print text followed by a newline and indent of 6 characters o pr2 (Docked) Print an 8-bit number, left-padded to 3 digits, and optional point o pr2 (Encyclopedia) Print an 8-bit number, left-padded to 3 digits, and optional point o pr2 (Flight) Print an 8-bit number, left-padded to 3 digits, and optional point o pr2 (Parasite) Print an 8-bit number, left-padded to 3 digits, and optional point o pr5 (Docked) Print a 16-bit number, left-padded to 5 digits, and optional point o pr5 (Encyclopedia) Print a 16-bit number, left-padded to 5 digits, and optional point o pr5 (Flight) Print a 16-bit number, left-padded to 5 digits, and optional point o pr5 (Parasite) Print a 16-bit number, left-padded to 5 digits, and optional point o pr6 (Docked) Print 16-bit number, left-padded to 5 digits, no point o pr6 (Encyclopedia) Print 16-bit number, left-padded to 5 digits, no point o pr6 (Flight) Print 16-bit number, left-padded to 5 digits, no point o pr6 (Parasite) Print 16-bit number, left-padded to 5 digits, no point o print_esc (I/O processor) Send an escape sequence to the printer o print_safe (I/O processor) Print a character using the VDU routine in the MOS, to bypass our custom WRCHV handler o print_wrch (I/O processor) Send a character to the printer o printer (I/O processor) Send the screen to the printer, following a CTRL-P key press o printer (Parasite) This routine is commented out in the original source o prq (Docked) Print a text token followed by a question mark o prq (Flight) Print a text token followed by a question mark o prq (Parasite) Print a text token followed by a question mark o qw (Docked) Print a recursive token in the range 128-145 o qw (Encyclopedia) Print a recursive token in the range 128-145 o qw (Flight) Print a recursive token in the range 128-145 o qw (Parasite) Print a recursive token in the range 128-145 o sell_yn (Docked) Print a "Sell(Y/N)?" prompt and get a number from the keyboard o sell_yn (Parasite) Print a "Sell(Y/N)?" prompt and get a number from the keyboard o spc (Docked) Print a text token followed by a space o spc (Encyclopedia) Print a text token followed by a space o spc (Flight) Print a text token followed by a space o spc (Parasite) Print a text token followed by a space o status_equip (Docked) Print equipment name, adding a sell prompt if appropriate o status_equip (Parasite) Print equipment name, adding a sell prompt if appropriate o tal (Docked) Print the current galaxy number o tal (Encyclopedia) Print the current galaxy number o tal (Flight) Print the current galaxy number o tal (Parasite) Print the current galaxy number o TT11 (Docked) Print a 16-bit number, left-padded to n digits, and optional point o TT11 (Encyclopedia) Print a 16-bit number, left-padded to n digits, and optional point o TT11 (Flight) Print a 16-bit number, left-padded to n digits, and optional point o TT11 (Parasite) Print a 16-bit number, left-padded to n digits, and optional point o TT146 (Docked) Print the distance to the selected system in light years o TT146 (Encyclopedia) Print the distance to the selected system in light years o TT146 (Flight) Print the distance to the selected system in light years o TT146 (Parasite) Print the distance to the selected system in light years o TT147 (Flight) Print an error when a system is out of hyperspace range o TT147 (Parasite) Print an error when a system is out of hyperspace range o TT147, Removed (Docked) Print an error when a system is out of hyperspace range o TT162 (Docked) Print a space o TT162 (Encyclopedia) Print a space o TT162 (Flight) Print a space o TT162 (Parasite) Print a space o TT26 (Docked) Print a character at the text cursor, with support for verified text in extended tokens o TT26 (Encyclopedia) Print a character at the text cursor, with support for verified text in extended tokens o TT26 (Flight) Print a character at the text cursor by poking into screen memory o TT26 (Parasite) Print a character at the text cursor, with support for verified text in extended tokens o TT27 (Docked) Print a text token o TT27 (Encyclopedia) Print a text token o TT27 (Flight) Print a text token o TT27 (Parasite) Print a text token o TT41 (Docked) Print a letter according to Sentence Case o TT41 (Encyclopedia) Print a letter according to Sentence Case o TT41 (Flight) Print a letter according to Sentence Case o TT41 (Parasite) Print a letter according to Sentence Case o TT42 (Docked) Print a letter in lower case o TT42 (Encyclopedia) Print a letter in lower case o TT42 (Flight) Print a letter in lower case o TT42 (Parasite) Print a letter in lower case o TT43 (Docked) Print a two-letter token or recursive token 0-95 o TT43 (Encyclopedia) Print a two-letter token or recursive token 0-95 o TT43 (Flight) Print a two-letter token or recursive token 0-95 o TT43 (Parasite) Print a two-letter token or recursive token 0-95 o TT45 (Docked) Print a letter in lower case o TT45 (Encyclopedia) Print a letter in lower case o TT45 (Flight) Print a letter in lower case o TT45 (Parasite) Print a letter in lower case o TT46 (Docked) Print a character and switch to capitals o TT46 (Encyclopedia) Print a character and switch to capitals o TT46 (Flight) Print a character and switch to capitals o TT46 (Parasite) Print a character and switch to capitals o TT60 (Docked) Print a text token and a paragraph break o TT60 (Encyclopedia) Print a text token and a paragraph break o TT60 (Flight) Print a text token and a paragraph break o TT60 (Parasite) Print a text token and a paragraph break o TT67 (Docked) Print a newline o TT67 (Encyclopedia) Print a newline o TT67 (Flight) Print a newline o TT67 (Parasite) Print a newline o TT68 (Docked) Print a text token followed by a colon o TT68 (Encyclopedia) Print a text token followed by a colon o TT68 (Flight) Print a text token followed by a colon o TT68 (Parasite) Print a text token followed by a colon o TT69 (Docked) Set Sentence Case and print a newline o TT69 (Flight) Set Sentence Case and print a newline o TT69 (Parasite) Set Sentence Case and print a newline o TT70 (Docked) Display "MAINLY " and jump to TT72 o TT70 (Encyclopedia) Display "MAINLY " and jump to TT72 o TT70 (Flight) Display "MAINLY " and jump to TT72 o TT70 (Parasite) Display "MAINLY " and jump to TT72 o TT73 (Docked) Print a colon o TT73 (Encyclopedia) Print a colon o TT73 (Flight) Print a colon o TT73 (Parasite) Print a colon o TT74 (Docked) Print a character o TT74 (Encyclopedia) Print a character o TT74 (Flight) Print a character o TT74 (Parasite) Print a character o TTX69 (Docked) Print a paragraph break o TTX69 (Encyclopedia) Print a paragraph break o TTX69 (Flight) Print a paragraph break o TTX69 (Parasite) Print a paragraph break o tube_wrch (I/O processor) Write characters to the screen and process Tube commands from the parasite o VOWEL (Docked) Test whether a character is a vowel o VOWEL (Encyclopedia) Test whether a character is a vowel o VOWEL (Parasite) Test whether a character is a vowel o wrch_font (I/O processor) Set the font and screen address for printing characters on-screen o write_msg3 (Encyclopedia) Print an extended recursive token from the msg_3 token table o write_msg3 (Parasite) Print an extended recursive token from the msg_3 token table o ypl (Docked) Print the current system name o ypl (Encyclopedia) Print the current system name o ypl (Flight) Print the current system name o ypl (Parasite) Print the current system name o Variables o DTW1 (Docked) A mask for applying the lower case part of Sentence Case to extended text tokens o DTW1 (Encyclopedia) A mask for applying the lower case part of Sentence Case to extended text tokens o DTW1 (Parasite) A mask for applying the lower case part of Sentence Case to extended text tokens o DTW2 (Docked) A flag that indicates whether we are currently printing a word o DTW2 (Encyclopedia) A flag that indicates whether we are currently printing a word o DTW2 (Parasite) A flag that indicates whether we are currently printing a word o DTW3 (Docked) A flag for switching between standard and extended text tokens o DTW3 (Encyclopedia) A flag for switching between standard and extended text tokens o DTW3 (Parasite) A flag for switching between standard and extended text tokens o DTW4 (Docked) Flags that govern how justified extended text tokens are printed o DTW4 (Encyclopedia) Flags that govern how justified extended text tokens are printed o DTW4 (Parasite) Flags that govern how justified extended text tokens are printed o DTW5 (Docked) The size of the justified text buffer at BUF o DTW5 (Encyclopedia) The size of the justified text buffer at BUF o DTW5 (Parasite) The size of the justified text buffer at BUF o DTW6 (Docked) A flag to denote whether printing in lower case is enabled for extended text tokens o DTW6 (Encyclopedia) A flag to denote whether printing in lower case is enabled for extended text tokens o DTW6 (Parasite) A flag to denote whether printing in lower case is enabled for extended text tokens o DTW8 (Docked) A mask for capitalising the next letter in an extended text token o DTW8 (Encyclopedia) A mask for capitalising the next letter in an extended text token o DTW8 (Parasite) A mask for capitalising the next letter in an extended text token o JMTB (Docked) The extended token table for jump tokens 1-32 (DETOK) o JMTB (Encyclopedia) The extended token table for jump tokens 1-32 (DETOK) o JMTB (Parasite) The extended token table for jump tokens 1-32 (DETOK) o msg_3 (Encyclopedia) The second extended token table for recursive tokens 0-255 (write_msg3) o msg_3 (Parasite) The second extended token table for recursive tokens 0-255 (write_msg3) o MTIN (Docked) Lookup table for random tokens in the extended token table (0-37) o MTIN (Encyclopedia) Lookup table for random tokens in the extended token table (0-37) o MTIN (Parasite) Lookup table for random tokens in the extended token table (0-37) o print_tone (I/O processor) Lookup table for converting mode 5 colour pixel rows to monochrome pixel pairs o QQ16 (Docked) The two-letter token lookup table o QQ16 (Encyclopedia) The two-letter token lookup table o QQ16 (Parasite) The two-letter token lookup table o QQ18 (Parasite) The recursive token table for tokens 0-148 o QQ18 (Text tokens) The recursive token table for tokens 0-148 o RLINE (Docked) The OSWORD configuration block used to fetch a line of text from the keyboard o RLINE (Encyclopedia) The OSWORD configuration block used to fetch a line of text from the keyboard o RLINE (Parasite) The OSWORD configuration block used to fetch a line of text from the keyboard o RUGAL (Docked) The criteria for systems with extended decription overrides o RUGAL (Parasite) The criteria for systems with extended decription overrides o RUPLA (Docked) System numbers that have extended decription overrides o RUPLA (Parasite) System numbers that have extended decription overrides o RUTOK (Docked) The second extended token table for recursive tokens 0-26 (DETOK3) o RUTOK (Parasite) The second extended token table for recursive tokens 0-26 (DETOK3) o TENS (Docked) A constant used when printing large numbers in BPRNT o TENS (Encyclopedia) A constant used when printing large numbers in BPRNT o TENS (Flight) A constant used when printing large numbers in BPRNT o TENS (Parasite) A constant used when printing large numbers in BPRNT o TKN1 (Docked) The first extended token table for recursive tokens 0-255 (DETOK) o TKN1 (Encyclopedia) The first extended token table for recursive tokens 0-255 (DETOK) o TKN1 (Parasite) The first extended token table for recursive tokens 0-255 (DETOK) o TKN2 (Docked) The extended two-letter token lookup table o TKN2 (Encyclopedia) The extended two-letter token lookup table o TKN2 (Parasite) The extended two-letter token lookup table o Macros o CHAR (Parasite) Macro definition for characters in the recursive token table o CHAR (Text tokens) Macro definition for characters in the recursive token table o CONT (Parasite) Macro definition for control codes in the recursive token table o CONT (Text tokens) Macro definition for control codes in the recursive token table o CTOK (Encyclopedia) Macro definition for ship data in the encyclopedia's ship cards o CTOK (Parasite) Macro definition for ship data in the encyclopedia's ship cards o ECHR (Docked) Macro definition for characters in the extended token table o ECHR (Encyclopedia) Macro definition for characters in the extended token table o ECHR (Parasite) Macro definition for characters in the extended token table o EJMP (Docked) Macro definition for jump tokens in the extended token table o EJMP (Encyclopedia) Macro definition for jump tokens in the extended token table o EJMP (Parasite) Macro definition for jump tokens in the extended token table o ERND (Docked) Macro definition for random tokens in the extended token table o ERND (Encyclopedia) Macro definition for random tokens in the extended token table o ERND (Parasite) Macro definition for random tokens in the extended token table o ETOK (Docked) Macro definition for recursive tokens in the extended token table o ETOK (Encyclopedia) Macro definition for recursive tokens in the extended token table o ETOK (Parasite) Macro definition for recursive tokens in the extended token table o ETWO (Docked) Macro definition for two-letter tokens in the extended token table o ETWO (Encyclopedia) Macro definition for two-letter tokens in the extended token table o ETWO (Parasite) Macro definition for two-letter tokens in the extended token table o RTOK (Parasite) Macro definition for recursive tokens in the recursive token table o RTOK (Text tokens) Macro definition for recursive tokens in the recursive token table o TOKN (Docked) Macro definition for standard tokens in the extended token table o TOKN (Encyclopedia) Macro definition for standard tokens in the extended token table o TOKN (Parasite) Macro definition for standard tokens in the extended token table o TWOK (Parasite) Macro definition for two-letter tokens in the token table o TWOK (Text tokens) Macro definition for two-letter tokens in the token table + Tube How 6502 Second Processor Elite communicates over the Tube o Subroutines o read_0346 (I/O processor) Implement the read_0346 command (read LASCT) o read_0346 (Parasite) Get the value of LASCT by sending a read_0346 command to the I/O processor o tube_elite (I/O processor) Set the vectors to receive Tube communications, run the parasite code, and terminate the I/O processor's loading process o tube_func (I/O processor) Call the corresponding routine for a Tube command o tube_get (I/O processor) As the I/O processor, fetch a byte that's been sent over the Tube from the parasite o tube_put (I/O processor) As the I/O processor, send a byte across the Tube to the parasite o tube_read (Parasite) As the parasite, fetch a byte that's been sent over the Tube from the I/O processor o tube_write (Parasite) As the parasite, send a byte across the Tube to the I/O processor o write_0346 (I/O processor) Implement the write_0346 command (update LASCT) o write_0346 (Parasite) Update the value of LASCT by sending a write_0346 command to the I/O processor o Variables o tube_run (I/O processor) The OS command string for running the Tube version's parasite code in file 2.T o tube_table (I/O processor) Lookup table for Tube commands sent from the parasite to the I/O processor + Universe Ship spawning, the local bubble, system/market generation o Subroutines o GINF (Docked) Fetch the address of a ship's data block into INF o GINF (Encyclopedia) Fetch the address of a ship's data block into INF o GINF (Flight) Fetch the address of a ship's data block into INF o GINF (Parasite) Fetch the address of a ship's data block into INF o GTHG (Flight) Spawn a Thargoid ship and a Thargon companion o GTHG (Parasite) Spawn a Thargoid ship and a Thargon companion o GVL (Docked) Calculate the availability of market items o GVL (Flight) Calculate the availability of market items o GVL (Parasite) Calculate the availability of market items o hyp1 (Docked) Process a jump to the system closest to (QQ9, QQ10) o hyp1 (Flight) Process a jump to the system closest to (QQ9, QQ10) o hyp1 (Parasite) Process a jump to the system closest to (QQ9, QQ10) o hyp1_FLIGHT (Parasite) Process a jump to the system closest to (QQ9, QQ10) (flight version) o install_ship (Parasite) Install a ship blueprint into the ship blueprints lookup table o jmp (Docked) Set the current system to the selected system o jmp (Flight) Set the current system to the selected system o jmp (Parasite) Set the current system to the selected system o KILLSHP (Flight) Remove a ship from our local bubble of universe o KILLSHP (Parasite) Remove a ship from our local bubble of universe o KS1 (Flight) Remove the current ship from our local bubble of universe o KS1 (Parasite) Remove the current ship from our local bubble of universe o KS2 (Flight) Check the local bubble for missiles with target lock o KS2 (Parasite) Check the local bubble for missiles with target lock o KS3 (Flight) Set the SLSP ship heap pointer after shuffling ship slots o KS3 (Parasite) Set the SLSP ship heap pointer after shuffling ship slots o KS4 (Flight) Remove the space station and replace it with the sun o KS4 (Parasite) Remove the space station and replace it with the sun o LSHIPS (Parasite) Populate the ship blueprints table at XX21 with a random selection of ships and set the compass to point to the planet o NwS1 (Flight) Flip the sign and double an INWK byte o NwS1 (Parasite) Flip the sign and double an INWK byte o NwS1, Removed (Docked) Flip the sign and double an INWK byte o NWSHP (Docked) Add a new ship to our local bubble of universe o NWSHP (Encyclopedia) Add a new ship to our local bubble of universe o NWSHP (Flight) Add a new ship to our local bubble of universe o NWSHP (Parasite) Add a new ship to our local bubble of universe o NWSPS (Flight) Add a new space station to our local bubble of universe o NWSPS (Parasite) Add a new space station to our local bubble of universe o ping (Docked) Set the selected system to the current system o ping (Encyclopedia) Set the selected system to the current system o ping (Flight) Set the selected system to the current system o ping (Parasite) Set the selected system to the current system o rand_posn (Flight) Set up the INWK workspace for a ship in a random ship position o rand_posn (Parasite) Set up the INWK workspace for a ship in a random ship position o SFS1 (Flight) Spawn a child ship from the current (parent) ship o SFS1 (Parasite) Spawn a child ship from the current (parent) ship o SOLAR (Flight) Set up various aspects of arriving in a new system o SOLAR (Parasite) Set up various aspects of arriving in a new system o SOS1 (Flight) Update the missile indicators, set up the planet data block o SOS1 (Parasite) Update the missile indicators, set up the planet data block o SPIN (Flight) Randomly spawn cargo from a destroyed ship o SPIN (Parasite) Randomly spawn cargo from a destroyed ship o TT111 (Docked) Set the current system to the nearest system to a point o TT111 (Encyclopedia) Set the current system to the nearest system to a point o TT111 (Flight) Set the current system to the nearest system to a point o TT111 (Parasite) Set the current system to the nearest system to a point o TT20 (Docked) Twist the selected system's seeds four times o TT20 (Encyclopedia) Twist the selected system's seeds four times o TT20 (Flight) Twist the selected system's seeds four times o TT20 (Parasite) Twist the selected system's seeds four times o TT24 (Docked) Calculate system data from the system seeds o TT24 (Encyclopedia) Calculate system data from the system seeds o TT24 (Flight) Calculate system data from the system seeds o TT24 (Parasite) Calculate system data from the system seeds o TT25 (Docked) Show the Data on System screen (red key f6) or Encyclopedia screen (CTRL-f6) o TT25 (Encyclopedia) Show the Data on System screen (red key f6) or Encyclopedia screen (CTRL-f6) o TT25 (Flight) Show the Data on System screen (red key f6) or Encyclopedia screen (CTRL-f6) o TT25 (Parasite) Show the Data on System screen (red key f6) or Encyclopedia screen (CTRL-f6) o TT54 (Docked) Twist the selected system's seeds o TT54 (Encyclopedia) Twist the selected system's seeds o TT54 (Flight) Twist the selected system's seeds o TT54 (Parasite) Twist the selected system's seeds o TT81 (Docked) Set the selected system's seeds to those of system 0 o TT81 (Encyclopedia) Set the selected system's seeds to those of system 0 o TT81 (Flight) Set the selected system's seeds to those of system 0 o TT81 (Parasite) Set the selected system's seeds to those of system 0 o Ze (Flight) Initialise the INWK workspace to a hostile ship o Ze (Parasite) Initialise the INWK workspace to a hostile ship o Ze, Removed (Docked) Initialise the INWK workspace to a hostile ship o Variables o UNIV (Docked) Table of pointers to the local universe's ship data blocks o UNIV (Encyclopedia) Table of pointers to the local universe's ship data blocks o UNIV (Flight) Table of pointers to the local universe's ship data blocks o UNIV (Parasite) Table of pointers to the local universe's ship data blocks + Utility routines Memory/screen clearing, delay routines, random number generators o Subroutines o BRBR (Docked) The standard BRKV handler for the game o BRBR (Encyclopedia) The standard BRKV handler for the game o BRBR (Parasite) The standard BRKV handler for the game o clr_scrn (I/O processor) Clear the top part of the screen (the space view) o CLYNS (Docked) Clear the bottom three text rows of the mode 4 screen o CLYNS (Encyclopedia) Clear the bottom three text rows of the mode 4 screen o CLYNS (Flight) Clear the bottom three text rows of the mode 4 screen o CLYNS (I/O processor) Clear the bottom three text rows of the mode 4 screen o CLYNS (Parasite) Clear the bottom three text rows of the mode 4 screen by sending a clr_line command to the I/O processor o DELAY (Docked) Wait for a specified time, in 1/50s of a second o DELAY (Encyclopedia) Wait for a specified time, in 1/50s of a second o DELAY (Flight) Wait for a specified time, in 1/50s of a second o DELAY (Parasite) Wait for a specified time, in 1/50s of a second o DORND (Docked) Generate random numbers o DORND (Encyclopedia) Generate random numbers o DORND (Flight) Generate random numbers o DORND (Loader) Generate random numbers o DORND (Parasite) Generate random numbers o DORND2 (Parasite) Generate random numbers, making sure the C flag doesn't affect the outcome o FX200 (Docked) Set the behaviour of the ESCAPE and BREAK keys o FX200 (Parasite) Set the behaviour of the ESCAPE and BREAK keys o LYN (Docked) Clear most of a row of pixels o LYN (Encyclopedia) Clear most of a row of pixels o LYN (Flight) Clear most of a row of pixels o LYN (I/O processor) Clear most of a row of pixels o MVBL (Loader) Move a multi-page block of memory o MVPG (Loader) Move a page of memory o OSB (Loader) A convenience routine for calling OSBYTE with Y = 0 o TT66 (Docked) Clear the screen and set the current view type o TT66 (Encyclopedia) Clear the screen and set the current view type o TT66 (Flight) Clear the screen and set the current view type o TT66 (Parasite) Clear the screen and set the current view type o TTX66 (Docked) Clear the top part of the screen and draw a white border o TTX66 (Encyclopedia) Clear the top part of the screen and draw a white border o TTX66 (Flight) Clear the top part of the screen and draw a white border o TTX66 (Parasite) Clear the top part of the screen and draw a white border by sending a clr_scrn command to the I/O processor o Unused routine, Removed (Docked) This code appears to be unused o ZEBC (Docked) Zero-fill pages &B and &C o ZEBC (Parasite) Zero-fill pages &B and &C o ZERO (Docked) Reset the local bubble of universe and ship status o ZERO (Encyclopedia) Reset the local bubble of universe and ship status o ZERO (Flight) Reset the local bubble of universe and ship status o ZERO (Parasite) Reset the local bubble of universe and ship status o ZES1 (Docked) Zero-fill the page whose number is in X o ZES1 (Encyclopedia) Zero-fill the page whose number is in X o ZES1 (Flight) Zero-fill the page whose number is in X o ZES1 (I/O processor) Zero-fill the page whose number is in X o ZES1 (Parasite) Zero-fill the page whose number is in X o ZES2 (Docked) Zero-fill a specific page o ZES2 (Encyclopedia) Zero-fill a specific page o ZES2 (Flight) Zero-fill a specific page o ZES2 (I/O processor) Zero-fill a specific page o ZES2 (Parasite) Zero-fill a specific page o ZINF (Docked) Reset the INWK workspace and orientation vectors o ZINF (Encyclopedia) Reset the INWK workspace and orientation vectors o ZINF (Flight) Reset the INWK workspace and orientation vectors o ZINF (Parasite) Reset the INWK workspace and orientation vectors o Variables o brkd (Docked) The brkd counter for error handling o brkd (Encyclopedia) The brkd counter for error handling o brkd (Parasite) The brkd counter for error handling o Unused block, Removed (Docked) These bytes appear to be unused (the same block appears in both the flight and docked code) o Unused block, Removed (Flight) These bytes appear to be unused (the same block appears in both the flight and docked code) + Workspaces Collections of important variables into blocks o Workspaces o K% (Docked) Ship data blocks and ship line heaps o K% (Encyclopedia) Ship data blocks and ship line heaps o K% (Flight) Ship data blocks and ship line heaps o K% (Parasite) Ship data blocks and ship line heaps o S% (Docked) Entry points and vector addresses in the main docked code o S% (Encyclopedia) Entry points and vector addresses in the main docked code o S% (Flight) Entry points and vector addresses in the main flight code o UP (Docked) Ship slots, variables o UP (Encyclopedia) Ship slots, variables o UP (Flight) Ship slots, variables o UP (Parasite) Ship slots, variables o WP (Docked) Variables o WP (Encyclopedia) Variables o WP (Flight) Variables o WP (Parasite) Variables o XX3 (Docked) Temporary storage space for complex calculations o XX3 (Encyclopedia) Temporary storage space for complex calculations o XX3 (Flight) Temporary storage space for complex calculations o XX3 (Parasite) Temporary storage space for complex calculations o ZP (Docked) Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (Encyclopedia) Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (Flight) Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here o ZP (I/O processor) Important variables used by the I/O processor o ZP (Loader) Important variables used by the loader o ZP (Parasite) Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here * Show me a Random Routine Or click [?] above to jump into the source code... * Indexes and code analyses * Compare the different versions of Elite Feature and code differences between versions + Versions and variants + Versions of BBC Micro Elite From the humble BBC Micro cassette to the 6502 Second Processor + Feature comparison table A comprehensive table comparing features of the different versions of Elite + Different variants of each version Bug fixes, unofficial versions and extra platforms + Explore all the code variations + How to compare different versions of Elite A quick guide to using this section to compare the different versions of Elite + Code comparisons of different versions Code-level comparisons of features that occur in multiple versions of Elite o Compare the main versions o Compare code for features of standard Elite Code variations in the features that are common to all versions (BBC Micro cassette, BBC Micro disc, 6502SP, Master, Electron) o Compare code for features of enhanced Elite Code variations in the extra features of the enhanced versions (BBC Micro disc, 6502SP, Master) o Compare code for features of advanced Elite Code variations in the extra features of the advanced versions (6502SP, Master) o Compare code for features of BBC Micro disc Elite Code variations that are unique to the BBC Micro disc version o Compare code for features of 6502SP Elite Code variations that are unique to the 6502SP version o Compare code for features of Master Elite Code variations that are unique to the Master version o Compare code for features of Electron Elite Code variations that are unique to the Electron version o Compare other versions o Compare code in other interesting areas Other code variations might have an impact, such as bug fixes or faster code o Minor differences between versions Smaller differences between the versions that don't have a noticeable effect in-game + All code variations by category + Charts Long-range and short-range galactic charts o Subroutines o hm Select the closest system and redraw the chart crosshairs o HME2 Search the galaxy for a system o TT103 Draw a small set of crosshairs on a chart o TT105 Draw crosshairs on the Short-range Chart, with clipping o TT16 Move the crosshairs on a chart o TT22 Show the Long-range Chart (red key f4) o TT23 Show the Short-range Chart (red key f5) + Copy protection Hiding the Elite code from prying eyes o Subroutines o doPROT1 Routine to self-modify the loader code o swine Resets the machine if the copy protection detects a problem o Variables o Authors' names The authors' names, buried in the code o Authors' names The authors' names and a copyright notice, buried in the code o checksum0 Checksum for the entire main game code o David23 Address pointer to the start of the 6502 stack + Dashboard The dials, 3D scanner and compass o Subroutines o ABORT Disarm missiles and update the dashboard indicators o ABORT2 Set/unset the lock target for a missile and update the dashboard o BULB Draw an indicator bulb on the dashboard o BUMP2 Bump up the value of the pitch or roll dashboard indicator o cntr Apply damping to the pitch or roll dashboard indicator o COMPAS Update the compass o DIALS (Part 1 of 4) Update the dashboard: speed indicator o DIALS (Part 2 of 4) Update the dashboard: pitch and roll indicators o DIALS (Part 3 of 4) Update the dashboard: four energy banks o DIALS (Part 4 of 4) Update the dashboard: shields, fuel, laser & cabin temp, altitude o DIL2 Update the roll or pitch indicator on the dashboard o DILX Update a bar-based indicator on the dashboard o DOT Draw a dash on the compass o ECBLB Light up the E.C.M. indicator bulb ("E") on the dashboard o ECBLB2 Start up the E.C.M. (indicator, start countdown and make sound) o MSBAR Draw a specific indicator in the dashboard's missile bar o msblob Display the dashboard's missile indicators in green o PZW Fetch the current dashboard colours, to support flashing o REDU2 Reduce the value of the pitch or roll dashboard indicator o SCAN Display the current ship on the scanner o SP2 Draw a dot on the compass, given the planet/station vector o SPBLB / DOBULB Light up the space station indicator ("S") on the dashboard o WPSHPS Clear the scanner, reset the ball line and sun line heaps o Variables o ECBT The character bitmap for the E.C.M. indicator bulb o SPBT The bitmap definition for the space station indicator bulb + Drawing circles Hyperspace tunnels, launch rings and planets o Subroutines o BLINE Draw a circle segment and add it to the ball line heap o CHKON Check whether any part of a circle appears on the extended screen o CIRCLE Draw a circle for the planet o CIRCLE2 Draw a circle (for the planet or chart) o HFS2 Draw the launch or hyperspace tunnel o LAUN Make the launch sound and draw the launch tunnel o LL164 Make the hyperspace sound and draw the hyperspace tunnel o TT128 Draw a circle on a chart o TT14 Draw a circle with crosshairs on a chart + Drawing lines The core line-drawing routines o Subroutines o EDGES Draw a horizontal line given a centre and a half-width o HLOIN Draw a horizontal line from (X1, Y1) to (X2, Y1) o HLOIN2 Remove a line from the sun line heap and draw it on-screen o LASLI Draw the laser lines for when we fire our lasers o LL118 Move a point along a line until it is on-screen o LL145 (Part 1 of 4) Clip line: Work out which end-points are on-screen, if any o LL30 Draw a one-segment line by sending an OSWRCH 129 command to the I/O processor o LOIN (Part 1 of 7) Draw a line: Calculate the line gradient in the form of deltas o LOIN (Part 2 of 7) Draw a line: Line has a shallow gradient, step right along x-axis o LOIN (Part 3 of 7) Draw a shallow line going right and up or left and down o LOIN (Part 4 of 7) Draw a shallow line going right and down or left and up o LOIN (Part 5 of 7) Draw a line: Line has a steep gradient, step up along y-axis o LOIN (Part 6 of 7) Draw a steep line going up and left or down and right o LOIN (Part 7 of 7) Draw a steep line going up and right or down and left o NLIN Draw a horizontal line at pixel row 23 to box in a title o NLIN2 Draw a screen-wide horizontal line at the pixel row in A o TT15 Draw a set of crosshairs o Variables o LSX2 The ball line heap for storing x-coordinates o LSY2 The ball line heap for storing y-coordinates o TWFL Ready-made character rows for the left end of a horizontal line in mode 4 o TWFR Ready-made character rows for the right end of a horizontal line in mode 4 + Drawing pixels How to plot pixels in various colours o Subroutines o CPIX2 Draw a single-height dash on the dashboard o CPIX4 Draw a double-height dot on the dashboard o PIX Draw a single pixel at a specific coordinate o PIXEL Draw a 1-pixel dot, 2-pixel dash or 4-pixel square o Variables o CTWOS Ready-made single-pixel character row bytes for mode 5 o TWOS Ready-made single-pixel character row bytes for mode 4 o TWOS Ready-made single-pixel character row bytes for mode 4 o TWOS2 Ready-made double-pixel character row bytes for mode 4 + Drawing planets Planets with meridians and craters o Subroutines o PL2 Remove the planet or sun from the screen o PL21 Return from a planet/sun-drawing routine with a failure flag o PL9 (Part 1 of 3) Draw the planet, with either an equator and meridian, or a crater o PL9 (Part 2 of 3) Draw the planet's equator and meridian o PL9 (Part 3 of 3) Draw the planet's crater o PLANET Draw the planet or sun o PLL1 Draw Saturn on the loading screen o PLS6 Calculate (X K) = (A P) / (z_sign z_hi z_lo) o WPLS2 Remove the planet from the screen o Variables o CNT A counter for use in drawing Saturn's planetary body o CNT3 A counter for use in drawing Saturn's rings + Drawing ships The celebrated 3D ship plotting process o Subroutines o DOEXP Draw an exploding ship o LL9 (Part 1 of 12) Draw ship: Check if ship is exploding, check if ship is in front o LL9 (Part 9 of 12) Draw ship: Draw laser beams if the ship is firing its laser at us o LL9 (Part 10 of 12) Draw ship: Calculate the visibility of each of the ship's edges o LL9 (Part 11 of 12) Draw ship: Add all visible edges to the ship line heap o LL9 (Part 12 of 12) Draw ship: Draw all the visible edges from the ship line heap o PROJ Project the current ship onto the screen o SHPPT Draw a distant ship as a point rather than a full wireframe o Variables o E% Ship blueprints default NEWB flags o SHIP_ADDER Ship blueprint for an Adder o SHIP_ANACONDA Ship blueprint for an Anaconda o SHIP_ASP_MK_2 Ship blueprint for an Asp Mk II o SHIP_ASTEROID Ship blueprint for an asteroid o SHIP_BOA Ship blueprint for a Boa o SHIP_BOULDER Ship blueprint for a boulder o SHIP_CANISTER Ship blueprint for a cargo canister o SHIP_COBRA_MK_1 Ship blueprint for a Cobra Mk I o SHIP_COBRA_MK_3 Ship blueprint for a Cobra Mk III o SHIP_COBRA_MK_3_P Ship blueprint for a Cobra Mk III (pirate) o SHIP_CONSTRICTOR Ship blueprint for a Constrictor o SHIP_CORIOLIS Ship blueprint for a Coriolis space station o SHIP_DODO Ship blueprint for a Dodecahedron ("Dodo") space station o SHIP_ESCAPE_POD Ship blueprint for an escape pod o SHIP_FER_DE_LANCE Ship blueprint for a Fer-de-Lance o SHIP_GECKO Ship blueprint for a Gecko o SHIP_KRAIT Ship blueprint for a Krait o SHIP_MAMBA Ship blueprint for a Mamba o SHIP_MISSILE Ship blueprint for a missile o SHIP_MORAY Ship blueprint for a Moray o SHIP_PLATE Ship blueprint for an alloy plate o SHIP_PYTHON Ship blueprint for a Python o SHIP_PYTHON_P Ship blueprint for a Python (pirate) o SHIP_ROCK_HERMIT Ship blueprint for a rock hermit (asteroid) o SHIP_SHUTTLE Ship blueprint for a Shuttle o SHIP_SIDEWINDER Ship blueprint for a Sidewinder o SHIP_SPLINTER Ship blueprint for a splinter o SHIP_THARGOID Ship blueprint for a Thargoid mothership o SHIP_THARGON Ship blueprint for a Thargon o SHIP_TRANSPORTER Ship blueprint for a Transporter o SHIP_VIPER Ship blueprint for a Viper o SHIP_WORM Ship blueprint for a Worm o XX21 Ship blueprints lookup table + Drawing suns The epic, shimmering Elite sun o Subroutines o FLFLLS Reset the sun line heap o SUN (Part 1 of 4) Draw the sun: Set up all the variables needed o SUN (Part 2 of 4) Draw the sun: Start from bottom of screen and erase the old sun o SUN (Part 4 of 4) Draw the sun: Continue to the top of the screen, erasing old sun o WPLS Remove the sun from the screen + Equipment Buying and selling weapons and ship upgrades o Subroutines o EQSHP Show the Equip Ship screen (red key f3) o prx Return the price of a piece of equipment o qv Print a menu of the four space views, for buying lasers o refund Install a new laser, processing a refund if applicable o Variables o PRXS Equipment prices + Flight Docking, hyperspace, views, shields and more o Subroutines o DENGY Drain some energy from the energy banks o DOCKIT Apply docking manoeuvres to the ship in INWK o DOENTRY Dock at the space station, show the ship hangar and work out any mission progression o ESCAPE Launch our escape pod o Ghy Perform a galactic hyperspace jump o hy6 / dockEd Print a message to say no hyperspacing inside the station o hyp Start the hyperspace process o LOOK1 Initialise the space view o MJP Process a mis-jump into witchspace o OOPS Take some damage o OUCH Potentially lose cargo or equipment following damage o PLUT / PU1 Flip the coordinate axes for the four different views o SIGHT Draw the laser crosshairs o TT110 Launch from a station or show the front space view o TT18 Try to initiate a jump into hyperspace o WARP Perform an in-system jump o wW Start a hyperspace countdown + Inventory Showing the contents of the hold o Subroutines o TT210 Show a list of current cargo in our hold, optionally to sell o TT213 Show the Inventory screen (red key f9) o TT214 Ask a question with a "Y/N?" prompt and return the response + Keyboard Processing key presses and joysticks o Subroutines o CTRL Scan the keyboard to see if CTRL is currently pressed o DK4 Scan for pause, configuration and secondary flight keys o DKJ1 Read joystick and flight controls o DKS1 Scan the keyboard for a flight key o DKS2 Read the joystick position o DKS3 Toggle a configuration setting and emit a beep o DKS4 Scan the keyboard to see if a specific key is being pressed o DOKEY Scan for the seven primary flight controls o FLKB Flush the keyboard buffer o PAS1 Display a rotating ship at space coordinates (0, 112, 256) and o PAUSE2 Wait until a key is pressed, ignoring any existing key press o RDKEY Scan the keyboard for key presses o TT102 Process function key, save key, hyperspace and chart key presses o TT17 Scan the keyboard for cursor key or joystick movement o TT217 Scan the keyboard until a key is pressed o U% Clear the key logger o Variables o KYTB Lookup table for in-flight keyboard controls o TRANTABLE Translation table from internal key number to ASCII + Loader The loading screen and system setup o Subroutines o BEGIN Initialise the configuration variables and start the game o scramble Decrypt the main flight code between &1300 and & 55FF and jump into the main game loop o STARTUP Set the various vectors, interrupts and timers, and terminate the loading process so the vector handlers can take over o Variables o RDLI The OS command string for running the flight code in file D.CODE + Main loop The core loop that runs Elite o Subroutines o Main flight loop (Part 1 of 16) Seed the random number generator o Main flight loop (Part 2 of 16) Calculate the alpha and beta angles from the current pitch and roll of our ship o Main flight loop (Part 3 of 16) Scan for flight keys and process the results o 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 o Main flight loop (Part 5 of 16) For each nearby ship: If an energy bomb has been set off, potentially kill this ship o Main flight loop (Part 7 of 16) For each nearby ship: Check whether we are docking, scooping or colliding with it o Main flight loop (Part 8 of 16) For each nearby ship: Process us potentially scooping this item o 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 o Main flight loop (Part 11 of 16) For each nearby ship: Process missile lock and firing our laser o Main flight loop (Part 12 of 16) For each nearby ship: Draw the ship, remove if killed, loop back o Main flight loop (Part 13 of 16) Show energy bomb effect, charge shields and energy banks o Main flight loop (Part 14 of 16) Spawn a space station if we are close enough to the planet o Main flight loop (Part 15 of 16) Perform altitude checks with the planet and sun and process fuel scooping if appropriate o Main flight loop (Part 16 of 16) Process laser pulsing, E.C.M. energy drain, call stardust routine o Main game loop (Part 1 of 6) Spawn a trader (a peaceful Cobra Mk III) o Main game loop (Part 2 of 6) Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister o Main game loop (Part 3 of 6) Potentially spawn a cop, particularly if we've been bad o Main game loop (Part 4 of 6) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates o Main game loop (Part 5 of 6) Cool down lasers, make calls to update the dashboard o Main game loop (Part 6 of 6) Process non-flight key presses (red function keys, docked keys) + Market Prices, availability, selling and buying cargo o Subroutines o gnum Get a number from the keyboard o tnpr Work out if we have space for a specific amount of cargo o TT151 Print the name, price and availability of a market item o TT163 Print the headers for the table of market prices o TT167 Show the Market Price screen (red key f7) o TT208 Show the Sell Cargo screen (red key f2) o TT219 Show the Buy Cargo screen (red key f1) + Maths (Arithmetic) Addition, subtraction, multiplication, division o Subroutines o DVID3B2 Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) o DVID4 Calculate (P R) = 256 * A / Q o DVID4 / DVID4_DUPLICATE Calculate (P R) = 256 * A / Q o FMLTU Calculate A = A * Q / 256 o LL120 Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 o LL123 Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 o LL28 Calculate R = 256 * A / Q o MLS2 Calculate (S R) = XX(1 0) and (A P) = A * ALP1 o MU11 Calculate (A P) = P * X o MULT1 Calculate (A P) = Q * A o PIX1 Calculate (YY+1 SYL+Y) = (A P) + (S R) and draw stardust particle o Variables o antilog Binary antilogarithm table o log Binary logarithm table (high byte) o logL Binary logarithm table (low byte) + Maths (Geometry) Vectors, coordinates, dot products and matrices o Subroutines o ARCTAN Calculate A = arctan(P / Q) o FAROF2 Compare x_hi, y_hi and z_hi with A o MAS2 Calculate a cap on the maximum distance to the planet or sun o TAS3 Calculate the dot product of XX15 and an orientation vector + Missions Only in the enhanced versions of Elite o Subroutines o BRIEF Start mission 1 and show the mission briefing o BRP Print an extended token and show the Status Mode screen o DEBRIEF Finish mission 1 + Moving Moving and rotating ships and planets in space o Subroutines o MV40 Rotate the planet or sun's location in space by the amount of pitch and roll of our ship o MVEIT (Part 1 of 9) Move current ship: Tidy the orientation vectors o MVEIT (Part 2 of 9) Move current ship: Call tactics routine, remove ship from scanner o MVEIT (Part 6 of 9) Move current ship: Move the ship in space according to our speed o MVEIT (Part 9 of 9) Move current ship: Redraw on scanner, if it hasn't been destroyed + Save and load Commander files and competition codes o Subroutines o BRKBK Set the standard BRKV handler for the game o CATS Ask for a disc drive number and print a catalogue of that drive o CHECK Calculate the checksum for the last saved commander data block o DELT Catalogue a disc, ask for a filename to delete, and delete the file o GTNME / GTNMEW Fetch the name of a commander file to save or load o LOD Load a commander file o MEBRK The BRKV handler for disc access operations o QUS1 Save or load the commander file o SVE Save the commander file o TR1 Copy the last saved commander's name from NA% to INWK o TRNME Copy the last saved commander's name from INWK to NA% o Variables o CHK First checksum byte for the saved commander data file o CHK2 Second checksum byte for the saved commander data file o CTLI The OS command string for cataloguing a disc o DELI The OS command string for deleting a file o NA% / DEFAULT% The data block for the last saved commander o stack Temporary storage for the stack pointer when switching the BRKV handler between BRBR and MEBRK o SVN The "saving in progress" flag + Screen mode Elite's famous split-screen mode o Subroutines o DET1 / DODIALS Show or hide the dashboard (for when we die) o IRQ1 The main screen-mode interrupt handler (IRQ1V points here) o SETVDU19 / DOVDU19 Implement the #SETVDU19 command (change mode 1 palette) o WSCAN Wait for the vertical sync o Variables o B% VDU commands for setting the square mode 4 screen o TVT3 Palette data for the mode 1 part of the screen (the top part) o VEC The original value of the IRQ1 vector + Ship hangar The ship hangar that's displayed on docking o Subroutines o HALL Draw the ships in the ship hangar, then draw the hangar o HANGER Display the ship hangar o HAS1 Draw a ship in the ship hangar o HAS2 Draw a hangar background line from left to right o HAS3 Draw a hangar background line from right to left o UNWISE Switch the main line-drawing routine between EOR and OR logic o Variables o HATB Ship hangar group table + Sound Explosions, laser fire, hyperspace and more o Subroutines o BEEP Make a short, high beep o BELL Make a standard system beep o ECMOF Switch off the E.C.M. o EXNO Make the sound of a laser strike or ship explosion o EXNO2 Process us making a kill o EXNO3 Make an explosion sound o NO3 Make a sound from a prepared sound block o NOISE Make the sound whose number is in A o NOS1 Prepare a sound block o Variables o E% Sound envelope definitions o SFX Sound data + Stardust Stardust generation and movement o Subroutines o FLIP Reflect the stardust particles in the screen diagonal and redraw the stardust field o nWq Create a random cloud of stardust o NWSTARS Initialise the stardust field o STARS The main routine for processing the stardust o STARS1 Process the stardust for the front view o STARS2 Process the stardust for the left or right view o STARS6 Process the stardust for the rear view + Start and end The title screen... and the Game Over screen o Subroutines o BR1 (Part 1 of 2) Show the "Load New Commander (Y/N)?" screen and start the game o BR1 (Part 2 of 2) Show the "Press Fire or Space, Commander" screen and start the game o DEATH Display the death screen o DEATH2 Reset most of the game and restart from the title screen o DFAULT / QU5 Reset the current commander data block to the last saved commander o RES2 Reset a number of flight variables and workspaces o RESET Reset most variables o TITLE Display a title screen with a rotating ship and prompt o TT170 Main entry point for the Elite game code + Status Showing the commander's status and rank o Subroutines o BAY Go to the docking bay (i.e. show the Status Mode screen) o STATUS Show the Status Mode screen (red key f8) + Tactics AI tactics for enemy ships and missiles o Subroutines o ANGRY Make a ship hostile o FRMIS Fire a missile from our ship o HITCH Work out if the ship in INWK is in our crosshairs o SFRMIS Add an enemy missile to our local bubble of universe o TACTICS (Part 1 of 7) Apply tactics: Process missiles, both enemy missiles and our own o TACTICS (Part 2 of 7) Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate o TACTICS (Part 3 of 7) Apply tactics: Calculate dot product to determine ship's aim o TACTICS (Part 4 of 7) Apply tactics: Check energy levels, maybe launch escape pod if low o TACTICS (Part 5 of 7) Apply tactics: Consider whether to launch a missile at us o TACTICS (Part 6 of 7) Apply tactics: Consider firing a laser at us, if aim is true o TACTICS (Part 7 of 7) Apply tactics: Set pitch, roll, and acceleration + Text Recursive tokens, control codes, two-letter tokens and more o Subroutines o BPRNT Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point o cmn Print the commander's name o crlf Tab to column 21 and print a colon o dn2 Make a short, high beep and delay for 1 second o ee3 Print the hyperspace countdown in the top-left of the screen o INCYC Move the text cursor to the next row o me1 Erase an old in-flight message and display a new one o me2 Remove an in-flight message from the space view o mes9 Print a text token, possibly followed by " DESTROYED" o MESS Display an in-flight message o MT26 Fetch a line of text from the keyboard o MT27 Print the captain's name during mission briefings o MT29 Move to row 6, switch to white text, and switch to lower case when printing extended tokens o MT8 Tab to column 6 and start a new word when printing extended tokens o MT9 Clear the screen and set the current view type to 1 o ou2 Display "E.C.M.SYSTEM DESTROYED" as an in-flight message o ou3 Display "FUEL SCOOPS DESTROYED" as an in-flight message o PDESC Print the system's extended description or a mission 1 directive o plf2 Print text followed by a newline and indent of 6 characters o SETXC / DOXC Implement the #SETXC command (move the text cursor to a specific column) o SETYC / DOYC Implement the #SETYC command (move the text cursor to a specific row) o TT146 Print the distance to the selected system in light years o TT26 Print a character at the text cursor, with support for verified text in extended tokens o TT26 / CHPR Print a character at the text cursor by poking into screen memory o TT67 Print a newline o TT67 / TT67_DUPLICATE Print a newline o TTX69 Print a paragraph break o ypl Print the current system name o Variables o FONT% A copy of the character definition bitmap table from the MOS ROM o JMTB The extended token table for jump tokens 1-32 (DETOK) o QQ16 The two-letter token lookup table o QQ18 The recursive token table for tokens 0-148 o RLINE The OSWORD configuration block used to fetch a line of text from the keyboard o RUGAL The criteria for systems with extended decription overrides o RUPLA System numbers that have extended decription overrides o RUTOK The second extended token table for recursive tokens 0-26 (DETOK3) o TKN1 The first extended token table for recursive tokens 0-255 (DETOK) + Universe Ship spawning, the local bubble, system/market generation o Subroutines o hyp1 Process a jump to the system closest to (QQ9, QQ10) o KILLSHP Remove a ship from our local bubble of universe o KS4 Remove the space station and replace it with the sun o NWSHP Add a new ship to our local bubble of universe o NWSPS Add a new space station to our local bubble of universe o SFS1 Spawn a child ship from the current (parent) ship o SOLAR Set up various aspects of arriving in a new system o SPIN Randomly spawn cargo from a destroyed ship o TT111 Set the current system to the nearest system to a point o TT25 Show the Data on System screen (red key f6) o Ze Initialise the INWK workspace to a hostile ship + Utility routines Memory/screen clearing, delay routines, random number generators o Subroutines o BRBR The standard BRKV handler for the game o CLYNS Clear the bottom three text rows of the mode 4 screen o DELAY Wait for a specified time, in 1/50s of a second o FX200 Set the behaviour of the ESCAPE and BREAK keys o LYN Clear most of a row of pixels o TRADEMODE Clear the screen and set up a printable trading screen o TT66 Clear the screen and set the current view type o TTX66 Clear the top part of the screen and draw a white border o TTX66 / TTX662 Clear the top part of the screen and draw a white border o ZERO Zero-fill pages &9, &A, &B, &C and &D o ZES1 Zero-fill the page whose number is in X o ZES2 Zero-fill a specific page o Variables o F% Denotes the end of the main game code, from Elite A to Elite J + Workspaces Collections of important variables into blocks o Workspaces o K% Ship data blocks and ship line heaps o T% Current commander data and stardust data blocks o UP Ship slots, variables o WP Ship slots, variables o ZP Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here * Indexes to the source code A-Z indexes, statistics, code usage and more + Indexes to the source code + BBC Micro cassette source code indexes A-Z indexes and indexes by category for the BBC Micro cassette version of Elite o A-Z indexes for the BBC Micro cassette version o A-Z index of the source code An index of every subroutine, entry point, variable, workspace and macro in the source code o Source code cross-references Every label and variable in the source code and where they are used o Indexes by category for the BBC Micro cassette version o List of all subroutines by category Subroutines in the BBC Micro cassette version of Elite o List of all variables by category Variables in the BBC Micro cassette version of Elite o List of all workspaces by category Workspaces in the BBC Micro cassette version of Elite o List of all macros by category Macros used in the BBC Micro cassette version of Elite + BBC Micro disc source code indexes A-Z indexes and indexes by category for the BBC Micro disc version of Elite o A-Z indexes for the BBC Micro disc version o A-Z index of the source code An index of every subroutine, entry point, variable, workspace and macro in the source code o Source code cross-references Every label and variable in the source code and where they are used o Indexes by category for the BBC Micro disc version o List of all subroutines by category Subroutines in the BBC Micro disc version of Elite o List of all variables by category Variables in the BBC Micro disc version of Elite o List of all workspaces by category Workspaces in the BBC Micro disc version of Elite o List of all macros by category Macros used in the BBC Micro disc version of Elite + 6502 Second Processor source code indexes A-Z indexes and indexes by category for the 6502 Second Processor version of Elite o A-Z indexes for the 6502 Second Processor version o A-Z index of the source code An index of every subroutine, entry point, variable, workspace and macro in the source code o Source code cross-references Every label and variable in the source code and where they are used o Indexes by category for the 6502 Second Processor version o List of all subroutines by category Subroutines in the 6502 Second Processor version of Elite o List of all variables by category Variables in the 6502 Second Processor version of Elite o List of all workspaces by category Workspaces in the 6502 Second Processor version of Elite o List of all macros by category Macros used in the 6502 Second Processor version of Elite + BBC Master source code indexes A-Z indexes and indexes by category for the BBC Master version of Elite o A-Z indexes for the BBC Master version o A-Z index of the source code An index of every subroutine, entry point, variable, workspace and macro in the source code o Source code cross-references Every label and variable in the source code and where they are used o Indexes by category for the BBC Master version o List of all subroutines by category Subroutines in the BBC Master version of Elite o List of all variables by category Variables in the BBC Master version of Elite o List of all workspaces by category Workspaces in the BBC Master version of Elite o List of all macros by category Macros used in the BBC Master version of Elite + Acorn Electron source code indexes A-Z indexes and indexes by category for the Electron version of Elite o A-Z indexes for the Electron version o A-Z index of the source code An index of every subroutine, entry point, variable, workspace and macro in the source code o Source code cross-references Every label and variable in the source code and where they are used o Indexes by category for the Electron version o List of all subroutines by category Subroutines in the Electron version of Elite o List of all variables by category Variables in the Electron version of Elite o List of all workspaces by category Workspaces in the Electron version of Elite o List of all macros by category Macros used in the Electron version of Elite + Elite-A source code indexes A-Z indexes and indexes by category for Elite-A o A-Z indexes for Elite-A o A-Z index of the source code An index of every subroutine, entry point, variable, workspace and macro in the source code o Source code cross-references Every label and variable in the source code and where they are used o Indexes by category for Elite-A o List of all subroutines by category Subroutines in Elite-A o List of all variables by category Variables in Elite-A o List of all workspaces by category Workspaces in Elite-A o List of all macros by category Macros used in Elite-A + Indexes of variations and statistics + Indexes of variations and code usage How code is shared between the different versions of Elite, and how it varies between versions o Indexes of variations and code usage o All shared code that contains variations Code that appears in multiple versions and which differs between versions o All shared code that contains no variations Code that appears in multiple versions and which is the same in all versions o Version-specific routines Code that appears in just one version of Elite + Source code statistics Instruction counts, subroutine statistics and other source code analysis o Source code statistics o Code statistics for the BBC Micro cassette version A breakdown of the BBC Micro cassette source code by category, type and number of instructions o Code statistics for the BBC Micro disc version A breakdown of the BBC Micro disc source code by category, type and number of instructions o Code statistics for the 6502 Second Processor version A breakdown of the 6502 Second Processor source code by category, type and number of instructions o Code statistics for the BBC Master version A breakdown of the BBC Master source code by category, type and number of instructions o Code statistics for the Electron version A breakdown of the Electron source code by category, type and number of instructions o Code statistics for Elite-A A breakdown of the Elite-A source code by category, type and number of instructions * My Other Sites * Fully documented source code for Aviator * Fully documented source code for Revs * Mark Moxon's Travel Writing * Walking Land's End to John o'Groats * Tubewalker: The Tube, on Foot * Mark Moxon, Web Developer