INCLUDE "1-source-files/main-sources/elite-build-options.asm" _RELEASED = (_VARIANT = 1) _SOURCE_DISC = (_VARIANT = 2) _BUG_FIX = (_VARIANT = 3) GUARD &6000 \ Guard against assembling over screen memoryELITE-A MAIN GAME SOURCE (DOCKED) Elite-A is an extended version of BBC Micro Elite by Angus Duggan The original Elite was written by Ian Bell and David Braben and is copyright Acornsoft 1984, and the extra code in Elite-A is copyright Angus Duggan The code in this file is identical to Angus Duggan's source discs (it's just been reformatted, and the label names have been changed to be consistent with the sources for the original BBC Micro disc version on which it is based) The commentary is copyright Mark Moxon, and any misunderstandings or mistakes in the documentation are entirely my fault The terminology and notations used in this commentary are explained at https://elite.bbcelite.com/terminology The deep dive articles referred to in this commentary can be found at https://elite.bbcelite.com/deep_dives
This source file contains the main game code for Elite-A, for when the player is docked.
This source file produces the following binary file: * 1.D.binCODE% = &11E3 \ The address where the code will be run LOAD% = &11E3 \ The address where the code will be loaded NOST = 18 \ The number of stardust particles in normal space (this \ goes down to 3 in witchspace) \ \ [Show more]Configuration variables\ \ This variable is used by the following: \ \ * RES2 \ * WP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveNOSH = 12 \ The maximum number of ships in our local bubble of \ universe \ \ [Show more]\ \ This variable is used by the following: \ \ * K% \ * NWSHP \ * UP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveNTY = 31 \ The number of different ship types \ \ [Show more]\ \ This variable is used by the following: \ \ * UP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSST = 2 \ Ship blueprint position for the space station \ \ [Show more]\ \ This variable is used by the following: \ \ * NWSHP \ * UP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveCOPS = 16 \ Ship blueprint position for the cop CON = 31 \ Ship blueprint position for the Constrictor \ \ [Show more]\ \ This variable is used by the following: \ \ * BRIEF \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveCYL = 11 \ Ship blueprint position for the title's Cobra Mk III \ \ [Show more]\ \ This variable is used by the following: \ \ * BR1 (Part 1 of 2) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveKRA = 19 \ Ship blueprint position for the title's Krait \ \ [Show more]\ \ This variable is used by the following: \ \ * BR1 (Part 2 of 2) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveNI% = 37 \ The number of bytes in each ship's data block (as \ stored in INWK and K%) \ \ [Show more]\ \ This variable is used by the following: \ \ * K% \ * NWSHP \ * UNIV \ * ZINF \ * ZP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveX = 128 \ The centre x-coordinate of the 256 x 192 space view \ \ [Show more]\ \ This variable is used by the following: \ \ * HFS1 \ * SHPPT \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveY = 96 \ The centre y-coordinate of the 256 x 192 space view \ \ [Show more]\ \ This variable is used by the following: \ \ * CHKON \ * FLFLLS \ * HANGER \ * HFS1 \ * LL118 \ * LL145 (Part 1 of 4) \ * LL145 (Part 2 of 4) \ * LL145 (Part 4 of 4) \ * LL9 (Part 8 of 12) \ * SHPPT \ * SUN (Part 1 of 4) \ * SUN (Part 2 of 4) \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef0 = &20 \ Internal key number for red key f0 (Launch, Front) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef1 = &71 \ Internal key number for red key f1 (Buy Cargo, Rear) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef2 = &72 \ Internal key number for red key f2 (Sell Cargo, Left) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef3 = &73 \ Internal key number for red key f3 (Equip Ship, Right) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef4 = &14 \ Internal key number for red key f4 (Long-range Chart) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef5 = &74 \ Internal key number for red key f5 (Short-range Chart) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef6 = &75 \ Internal key number for red key f6 (Data on System) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef7 = &16 \ Internal key number for red key f7 (Market Price) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef8 = &76 \ Internal key number for red key f8 (Status Mode) \ \ [Show more]\ \ This variable is used by the following: \ \ * BAY \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovef9 = &77 \ Internal key number for red key f9 (Inventory) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveNRU% = 25 \ The number of planetary systems with extended system \ description overrides in the RUTOK table \ \ [Show more]\ \ This variable is used by the following: \ \ * PDESC \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveRE = &23 \ The obfuscation byte used to hide the recursive tokens \ table from crackers viewing the binary code \ \ [Show more]\ \ This variable is used by the following: \ \ * ex \ * n_load \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveVE = 0 \ The obfuscation byte used to hide the extended tokens \ table from crackers viewing the binary code, which is \ zero in Elite-A as the token table is not obfuscated \ \ [Show more]\ \ This variable is used by the following: \ \ * ECHR \ * EJMP \ * ERND \ * ETOK \ * ETWO \ * RUTOK \ * TKN1 \ * TOKN \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveLL = 30 \ The length of lines (in characters) of justified text \ in the extended tokens system \ \ [Show more]\ \ This variable is used by the following: \ \ * TT26 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovesave_lock = &0233 \ This flag indicates whether we should be asking for \ confirmation before saving or loading a commander \ file: \ \ * 0 = last file operation was a save, or we just \ started a new game, so there are no unsaved \ changes (so ask for confirmation on saving) \ \ * &FF = last file operation was a load, or we have \ just docked and have unsaved changes (so ask \ for confirmation on loading) \ \ It shares a location with the IND2V+1 vector, which we \ do not use, so we can reuse the location \ \ [Show more]\ \ This variable is used by the following: \ \ * confirm \ * QUS1 \ * SCRAM \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveQQ18 = &0400 \ The address of the text token table, as set in \ elite-loader.asm \ \ [Show more]\ \ This variable is used by the following: \ \ * ex \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovenew_name = &074D \ This points to recursive token 132 in the QQ18 table. \ We update the token's text at this address whenever we \ buy a new ship, so that printing token 132 will always \ show the current ship type \ \ [Show more]\ \ This variable is used by the following: \ \ * n_load \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSNE = &07C0 \ The address of the sine lookup table, as set in \ elite-loader.asm \ \ [Show more]\ \ This variable is used by the following: \ \ * FMLTU2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveQQ16_FLIGHT = &0880 \ The address of the two-letter text token table in the \ flight code (this gets populated by the docked code at \ the start of the game) \ \ [Show more]\ \ This variable is used by the following: \ \ * TT110 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveLS% = &0CFF \ The start of the descending ship line heap \ \ [Show more]\ \ This variable is used by the following: \ \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveIRQ1 = &114B \ The address of the IRQ1 routine that implements the \ split screen interrupt handler, as set in \ elite-loader.asm \ \ [Show more]\ \ This variable is used by the following: \ \ * S% \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveNA% = &1181 \ The address of the data block for the last saved \ commander, as set in elite-loader.asm \ \ [Show more]\ \ This variable is used by the following: \ \ * CATS \ * CHECK \ * cmn \ * DFAULT \ * GTNMEW \ * LOD \ * SVE \ * TR1 \ * TRNME \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveCHK2 = &11D3 \ The address of the second checksum byte for the saved \ commander data file, as set in elite-loader.asm \ \ [Show more]\ \ This variable is used by the following: \ \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveCHK = &11D4 \ The address of the first checksum byte for the saved \ commander data file, as set in elite-loader.asm \ \ [Show more]\ \ This variable is used by the following: \ \ * DFAULT \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSHIP_MISSILE = &7F00 \ The address of the missile ship blueprint, as set in \ elite-loader.asm \ \ [Show more]\ \ This variable is used by the following: \ \ * XX21 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveIF _BUG_FIX savews = &DD06 \ The address for the savews workspace routine from \ the loader so we can call it to ensure the MOS \ character definitions are loaded before printing \ text on the BBC Master \ \ [Show more]\ \ This variable is used by the following: \ \ * SwitchToCharSet \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboverestorews = &DD65 \ The address for the restorews workspace routine from \ the loader so we can call it to ensure the MOS \ character definitions are loaded before printing \ text on the BBC Master \ \ [Show more]\ \ This variable is used by the following: \ \ * SwitchToFileSys \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovewsstate = &DDBA \ The address for the wsstate workspace routine from \ the loader so we can call it to ensure the MOS \ character definitions are loaded before printing \ text on the BBC Master \ \ [Show more]\ \ This variable is used by the following: \ \ * SwitchToCharSet \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveENDIF VIA = &FE00 \ Memory-mapped space for accessing internal hardware, \ such as the video ULA, 6845 CRTC and 6522 VIAs (also \ known as SHEILA) \ \ [Show more]\ \ This variable is used by the following: \ \ * DKS4 \ * MT26 \ * TITLE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveOSFILE = &FFDD \ The address for the OSFILE routine \ \ [Show more]\ \ This variable is used by the following: \ \ * QUS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveOSWRCH = &FFEE \ The address for the OSWRCH routine \ \ [Show more]\ \ This variable is used by the following: \ \ * MEBRK \ * TITLE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveOSWORD = &FFF1 \ The address for the OSWORD routine \ \ [Show more]\ \ This variable is used by the following: \ \ * MT26 \ * NO3 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveOSBYTE = &FFF4 \ The address for the OSBYTE routine \ \ [Show more]\ \ This variable is used by the following: \ \ * DKS2 \ * FLKB \ * FX200 \ * SwitchToCharSet \ * SwitchToFileSys \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveOSCLI = &FFF7 \ The address for the OSCLI routine \ \ [Show more]\ \ This variable is used by the following: \ \ * CATS \ * DELT \ * TT110 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveORG &0000 .ZP SKIP 0 \ The start of the zero page workspace .RAND SKIP 4 \ Four 8-bit seeds for the random number generation \ system implemented in the DORND routine \ \ [Show more]Name: ZP [Show more] Type: Workspace Address: &0000 to &00E1 Category: Workspaces Summary: Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory hereContext: See this workspace on its own page References: No direct references to this workspace in this source file\ \ This variable is used by the following: \ \ * DORND \ * PDESC \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.TRTB% SKIP 2 \ Contains the address of the keyboard translation \ table, which is used to translate internal key \ numbers to ASCII \ \ [Show more]\ \ This variable is used by the following: \ \ * TT217 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.T1 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * ADD \ * DIALS (Part 1 of 4) \ * DIALS (Part 3 of 4) \ * DIALS (Part 4 of 4) \ * DILX \ * gnum \ * LCASH \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ * MULT1 \ * NWSHP \ * PIXEL \ * PX3 \ * TIS1 \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.SC SKIP 1 \ Screen address (low byte) \ \ Elite draws on-screen by poking bytes directly into \ screen memory, and SC(1 0) is typically set to the \ address of the character block containing the pixel \ we want to draw (see the deep dives on "Drawing \ monochrome pixels in mode 4" and "Drawing colour \ pixels in mode 5" for more details) \ \ [Show more]\ \ This variable is used by the following: \ \ * CHPR \ * CLYNS \ * DETOK2 \ * DIALS (Part 1 of 4) \ * DIALS (Part 4 of 4) \ * DIL2 \ * DILX \ * HANGER \ * HAS2 \ * HAS3 \ * HLOIN \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * LYN \ * MSBAR \ * PIXEL \ * PX3 \ * TT26 \ * ZES1 \ * ZES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.SCH SKIP 1 \ Screen address (high byte) \ \ [Show more]\ \ This variable is used by the following: \ \ * HANGER \ * HLOIN \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * MSBAR \ * PIXEL \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX16 SKIP 18 \ Temporary storage for a block of values, used in a \ number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * LL51 \ * LL9 (Part 3 of 12) \ * LL9 (Part 6 of 12) \ * n_buyship \ * NO3 \ * NOS1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.P SKIP 3 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * ADD \ * CHKON \ * CHPR \ * cour_count \ * DIALS (Part 3 of 4) \ * DVID4 \ * DVIDT \ * FMLTU \ * GC2 \ * HANGER \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * MU1 \ * MU11 \ * MULT1 \ * MULT12 \ * MVS4 \ * MVS5 \ * NORM \ * SQUA2 \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ * TIS3 \ * TT111 \ * TT151 \ * TT210 \ * TT219 \ * TT24 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX0 SKIP 2 \ Temporary storage, used to store the address of a ship \ blueprint. For example, it is used when we add a new \ ship to the local bubble in routine NWSHP, and it \ contains the address of the current ship's blueprint \ as we loop through all the nearby ships in the main \ flight loop \ \ [Show more]\ \ This variable is used by the following: \ \ * HAS1 \ * LL9 (Part 1 of 12) \ * LL9 (Part 2 of 12) \ * LL9 (Part 4 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * NWSHP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.INF SKIP 2 \ Temporary storage, typically used for storing the \ address of a ship's data block, so it can be copied \ to and from the internal workspace at INWK \ \ [Show more]\ \ This variable is used by the following: \ \ * GINF \ * LL9 (Part 1 of 12) \ * NWSHP \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.V SKIP 2 \ Temporary storage, typically used for storing an \ address pointer \ \ [Show more]\ \ This variable is used by the following: \ \ * DETOK \ * DETOK2 \ * DETOK3 \ * ex \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX SKIP 2 \ Temporary storage, typically used for storing a 16-bit \ x-coordinate \ \ [Show more]\ \ This variable is used by the following: \ \ * SUN (Part 3 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.YY SKIP 2 \ Temporary storage, typically used for storing a 16-bit \ y-coordinate \ \ [Show more]\ \ This variable is used by the following: \ \ * EDGES \ * SUN (Part 2 of 4) \ * SUN (Part 3 of 4) \ * SUN (Part 4 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.SUNX SKIP 2 \ The 16-bit x-coordinate of the vertical centre axis \ of the sun (which might be off-screen) \ \ [Show more]\ \ This variable is used by the following: \ \ * SUN (Part 2 of 4) \ * SUN (Part 3 of 4) \ * SUN (Part 4 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.BETA SKIP 1 \ The current pitch angle beta, which is reduced from \ JSTY to a sign-magnitude value between -8 and +8 \ \ This describes how fast we are pitching our ship, and \ determines how fast the universe pitches around us \ \ The sign bit is also stored in BET2, while the \ opposite sign is stored in BET2+1 \ \ [Show more]\ \ This variable is used by the following: \ \ * MVS4 \ * RESET \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.BET1 SKIP 1 \ The magnitude of the pitch angle beta, i.e. |beta|, \ which is a positive value between 0 and 8 .XC SKIP 1 \ The x-coordinate of the text cursor (i.e. the text \ column), which can be from 0 to 32 \ \ A value of 0 denotes the leftmost column and 32 the \ rightmost column, but because the top part of the \ screen (the space view) has a border box that \ clashes with columns 0 and 32, text is only shown \ in columns 1-31 \ \ [Show more]\ \ This variable is used by the following: \ \ * BR1 (Part 1 of 2) \ * BRIEF \ * CATS \ * CHPR \ * CLYNS \ * cour_buy \ * cour_count \ * cour_dock \ * crlf \ * EQSHP \ * MESS \ * MT8 \ * MT9 \ * n_buyship \ * qv \ * sell_jump \ * STATUS \ * status_equip \ * TITLE \ * TT102 \ * TT151 \ * TT163 \ * TT167 \ * TT208 \ * TT210 \ * TT213 \ * TT219 \ * TT22 \ * TT23 \ * TT25 \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.YC SKIP 1 \ The y-coordinate of the text cursor (i.e. the text \ row), which can be from 0 to 23 \ \ The screen actually has 31 character rows if you \ include the dashboard, but the text printing routines \ only work on the top part (the space view), so the \ text cursor only goes up to a maximum of 23, the row \ just before the screen splits \ \ A value of 0 denotes the top row, but because the \ top part of the screen has a border box that clashes \ with row 0, text is always shown at row 1 or greater \ \ [Show more]\ \ This variable is used by the following: \ \ * CHPR \ * CLYNS \ * cour_buy \ * cour_count \ * cour_dock \ * EQSHP \ * MESS \ * MT29 \ * n_buyship \ * NLIN \ * qv \ * TITLE \ * TT102 \ * TT146 \ * TT167 \ * TT219 \ * TT23 \ * TTX66 \ * TTX69 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ22 SKIP 2 \ The two hyperspace countdown counters \ \ Before a hyperspace jump, both QQ22 and QQ22+1 are \ set to 15 \ \ QQ22 is an internal counter that counts down by 1 \ each time TT102 is called, which happens every \ iteration of the main game loop. When it reaches \ zero, the on-screen counter in QQ22+1 gets \ decremented, and QQ22 gets set to 5 and the countdown \ continues (so the first tick of the hyperspace counter \ takes 15 iterations to happen, but subsequent ticks \ take 5 iterations each) \ \ QQ22+1 contains the number that's shown on-screen \ during the countdown. It counts down from 15 to 1, and \ when it hits 0, the hyperspace engines kick in \ \ [Show more]\ \ This variable is used by the following: \ \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ECMA SKIP 1 \ The E.C.M. countdown timer, which determines whether \ an E.C.M. system is currently operating: \ \ * 0 = E.C.M. is off \ \ * Non-zero = E.C.M. is on and is counting down \ \ The counter starts at 32 when an E.C.M. is activated, \ either by us or by an opponent, and it decreases by 1 \ in each iteration of the main flight loop until it \ reaches zero, at which point the E.C.M. switches off. \ Only one E.C.M. can be active at any one time, so \ there is only one counter \ \ [Show more]\ \ This variable is used by the following: \ \ * ECMOF \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ALP1 SKIP 1 \ Magnitude of the roll angle alpha, i.e. |alpha|, \ which is a positive value between 0 and 31 \ \ [Show more]\ \ This variable is used by the following: \ \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ALP2 SKIP 2 \ Bit 7 of ALP2 = sign of the roll angle in ALPHA \ \ Bit 7 of ALP2+1 = opposite sign to ALP2 and ALPHA \ \ [Show more]\ \ This variable is used by the following: \ \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX15 SKIP 0 \ Temporary storage, typically used for storing screen \ coordinates in line-drawing routines \ \ There are six bytes of storage, from XX15 TO XX15+5. \ The first four bytes have the following aliases: \ \ X1 = XX15 \ Y1 = XX15+1 \ X2 = XX15+2 \ Y2 = XX15+3 \ \ These are typically used for describing lines in terms \ of screen coordinates, i.e. (X1, Y1) to (X2, Y2) \ \ The last two bytes of XX15 do not have aliases \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * BPRNT \ * HALL \ * HAS1 \ * LL118 \ * LL120 \ * LL145 (Part 1 of 4) \ * LL145 (Part 2 of 4) \ * LL145 (Part 3 of 4) \ * LL145 (Part 4 of 4) \ * LL51 \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ * LL9 (Part 12 of 12) \ * NORM \ * TIDY \ * TT15 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.X1 SKIP 1 \ Temporary storage, typically used for x-coordinates in \ line-drawing routines \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * EDGES \ * HLOIN \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * NLIN2 \ * SUN (Part 3 of 4) \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.Y1 SKIP 1 \ Temporary storage, typically used for y-coordinates in \ line-drawing routines \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * HLOIN \ * HLOIN2 \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * NLIN2 \ * SUN (Part 3 of 4) \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.X2 SKIP 1 \ Temporary storage, typically used for x-coordinates in \ line-drawing routines \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * EDGES \ * HLOIN \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * NLIN2 \ * SUN (Part 3 of 4) \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.Y2 SKIP 1 \ Temporary storage, typically used for y-coordinates in \ line-drawing routines \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 5 of 7) \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSKIP 2 \ The last two bytes of the XX15 block .XX12 SKIP 6 \ Temporary storage for a block of values, used in a \ number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * DIALS (Part 3 of 4) \ * LL129 \ * LL145 (Part 1 of 4) \ * LL145 (Part 2 of 4) \ * LL145 (Part 3 of 4) \ * LL145 (Part 4 of 4) \ * LL51 \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.K SKIP 4 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * BPRNT \ * CHKON \ * cour_count \ * csh \ * DIALS (Part 1 of 4) \ * DIALS (Part 3 of 4) \ * DIALS (Part 4 of 4) \ * DILX \ * EQSHP \ * FMLTU2 \ * HFS1 \ * MVS5 \ * n_buyship \ * n_name \ * n_price \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ * TT11 \ * TT111 \ * TT14 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.LAS SKIP 1 \ Contains the laser power of the laser fitted to the \ current space view (or 0 if there is no laser fitted \ to the current view) \ \ This gets set to bits 0-6 of the laser power byte from \ the commander data block, which contains the laser's \ power (bit 7 doesn't denote laser power, just whether \ or not the laser pulses, so that is not stored here) .MSTG SKIP 1 \ The current missile lock target \ \ * &FF = no target \ \ * 1-12 = the slot number of the ship that our \ missile is locked onto \ \ [Show more]\ \ This variable is used by the following: \ \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX1 SKIP 0 \ This is an alias for INWK that is used in the main \ ship-drawing routine at LL9 \ \ [Show more]\ \ This variable is used by the following: \ \ * LL9 (Part 1 of 12) \ * LL9 (Part 2 of 12) \ * LL9 (Part 3 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 9 of 12) \ * SHPPT \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.INWK SKIP 33 \ The zero-page internal workspace for the current ship \ data block \ \ As operations on zero page locations are faster and \ have smaller opcodes than operations on the rest of \ the addressable memory, Elite tends to store oft-used \ data here. A lot of the routines in Elite need to \ access and manipulate ship data, so to make this an \ efficient exercise, the ship data is first copied from \ the ship data blocks at K% into INWK (or, when new \ ships are spawned, from the blueprints at XX21). See \ the deep dive on "Ship data blocks" for details of \ what each of the bytes in the INWK data block \ represents \ \ [Show more]\ \ This variable is used by the following: \ \ * BRIEF \ * cour_buy \ * cour_count \ * DELT \ * GTNMEW \ * HAS1 \ * HME2 \ * MVEIT (Part 1 of 9) \ * MVEIT (Part 8 of 9) \ * MVS4 \ * MVS5 \ * NWSHP \ * PAS1 \ * PAUSE \ * QUS1 \ * RLINE \ * TIDY \ * TIS3 \ * TITLE \ * TR1 \ * TRNME \ * TT23 \ * WPSHPS \ * ZINF \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX19 SKIP NI% - 34 \ XX19(1 0) shares its location with INWK(34 33), which \ contains the address of the ship line heap \ \ [Show more]\ \ This variable is used by the following: \ \ * LL9 (Part 1 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 11 of 12) \ * LL9 (Part 12 of 12) \ * SHPPT \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.NEWB SKIP 1 \ The ship's "new byte flags" (or NEWB flags) \ \ Contains details about the ship's type and associated \ behaviour, such as whether they are a trader, a bounty \ hunter, a pirate, currently hostile, in the process of \ docking, inside the hold having been scooped, and so \ on. The default values for each ship type are taken \ from the table at E%, and you can find out more detail \ in the deep dive on "Advanced tactics with the NEWB \ flags" .LSP SKIP 1 \ The ball line heap pointer, which contains the number \ of the first free byte after the end of the LSX2 and \ LSY2 heaps (see the deep dive on "The ball line heap" \ for details) \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * HFS1 \ * TT128 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ15 SKIP 6 \ The three 16-bit seeds for the selected system, i.e. \ the one in the crosshairs in the Short-range Chart \ \ See the deep dives on "Galaxy and system seeds" and \ "Twisting the system seeds" for more details \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_count \ * cpl \ * HME2 \ * hyp1 \ * PDESC \ * TT111 \ * TT22 \ * TT23 \ * TT24 \ * TT25 \ * TT54 \ * TT81 \ * ypl \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.K5 SKIP 0 \ Temporary storage used to store segment coordinates \ across successive calls to BLINE, the ball line \ routine \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX18 SKIP 0 \ Temporary storage used to store coordinates in the \ LL9 ship-drawing routine \ \ [Show more]\ \ This variable is used by the following: \ \ * LL9 (Part 3 of 12) \ * LL9 (Part 5 of 12) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ17 SKIP 1 \ Contains a number of flags that affect how text tokens \ are printed, particularly capitalisation: \ \ * If all bits are set (255) then text printing is \ disabled \ \ * Bit 7: 0 = ALL CAPS \ 1 = Sentence Case, bit 6 determines the \ case of the next letter to print \ \ * Bit 6: 0 = print the next letter in upper case \ 1 = print the next letter in lower case \ \ * Bits 0-5: If any of bits 0-5 are set, print in \ lower case \ \ So: \ \ * QQ17 = 0 means case is set to ALL CAPS \ \ * QQ17 = %10000000 means Sentence Case, currently \ printing upper case \ \ * QQ17 = %11000000 means Sentence Case, currently \ printing lower case \ \ * QQ17 = %11111111 means printing is disabled \ \ [Show more]\ \ This variable is used by the following: \ \ * CHPR \ * MESS \ * MT17 \ * MT6 \ * TT102 \ * TT210 \ * TT25 \ * TT27 \ * TT41 \ * TT46 \ * TT69 \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ19 SKIP 3 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * cpl \ * GVL \ * TT103 \ * TT105 \ * TT111 \ * TT123 \ * TT128 \ * TT14 \ * TT15 \ * TT151 \ * TT152 \ * TT16 \ * TT210 \ * TT22 \ * TT25 \ * var \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.K6 SKIP 5 \ Temporary storage, typically used for storing \ coordinates during vector calculations \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * CIRCLE2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.BET2 SKIP 2 \ Bit 7 of BET2 = sign of the pitch angle in BETA \ \ Bit 7 of BET2+1 = opposite sign to BET2 and BETA \ \ [Show more]\ \ This variable is used by the following: \ \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.DELTA SKIP 1 \ Our current speed, in the range 1-40 \ \ [Show more]\ \ This variable is used by the following: \ \ * DIALS (Part 1 of 4) \ * RES2 \ * TITLE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.DELT4 SKIP 2 \ Our current speed * 64 as a 16-bit value \ \ This is stored as DELT4(1 0), so the high byte in \ DELT4+1 therefore contains our current speed / 4 .U SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * ADD \ * BPRNT \ * csh \ * LL61 \ * LL62 \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 11 of 12) \ * n_buyship \ * TT11 \ * TT111 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.Q SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_count \ * DIALS (Part 3 of 4) \ * DIL2 \ * DILX \ * DVID4 \ * DVIDT \ * EQSHP \ * FMLTU \ * FMLTU2 \ * gnum \ * HANGER \ * HAS1 \ * LL120 \ * LL123 \ * LL129 \ * LL145 (Part 3 of 4) \ * LL28 \ * LL38 \ * LL5 \ * LL51 \ * LL61 \ * LL9 (Part 3 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 10 of 12) \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * MULT1 \ * MULTU \ * MVS4 \ * MVS5 \ * n_buyship \ * NORM \ * SUN (Part 3 of 4) \ * TIDY \ * TIS1 \ * TIS2 \ * TIS3 \ * TT111 \ * TT210 \ * TT219 \ * TT24 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.R SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * ADD \ * cour_count \ * DILX \ * gnum \ * HAS1 \ * HLOIN \ * LL118 \ * LL120 \ * LL123 \ * LL129 \ * LL145 (Part 4 of 4) \ * LL28 \ * LL38 \ * LL5 \ * LL51 \ * LL61 \ * LL62 \ * LL9 (Part 3 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 8 of 12) \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * MULT12 \ * MVS4 \ * MVS5 \ * NORM \ * SUN (Part 3 of 4) \ * TT111 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.S SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * ADD \ * BPRNT \ * gnum \ * LL118 \ * LL120 \ * LL123 \ * LL129 \ * LL145 (Part 3 of 4) \ * LL145 (Part 4 of 4) \ * LL38 \ * LL5 \ * LL51 \ * LL61 \ * LL9 (Part 5 of 12) \ * LOIN (Part 1 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * MULT12 \ * MVS4 \ * MVS5 \ * TT111 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XSAV SKIP 1 \ Temporary storage for saving the value of the X \ register, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * HANGER \ * HAS1 \ * MVEIT (Part 1 of 9) \ * TT22 \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.YSAV SKIP 1 \ Temporary storage for saving the value of the Y \ register, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * HALL \ * HANGER \ * HLOIN \ * LOIN (Part 1 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ * TT217 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX17 SKIP 1 \ Temporary storage, used in BPRNT to store the number \ of characters to print, and as the edge counter in the \ main ship-drawing routine \ \ [Show more]\ \ This variable is used by the following: \ \ * BPRNT \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ * LL9 (Part 11 of 12) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ11 SKIP 1 \ The type of the current view: \ \ 0 = Space view \ 1 = Data on System screen (red key f6) \ Get commander name ("@", save/load commander) \ In-system jump just arrived ("J") \ Title screen \ 2 = Buy Cargo screen (red key f1) \ 3 = Mis-jump just arrived (witchspace) \ 4 = Sell Cargo screen (red key f2) \ 6 = Death screen \ 8 = Status Mode screen (red key f8) \ Inventory screen (red key f9) \ 16 = Market Price screen (red key f7) \ 32 = Equip Ship screen (red key f3) \ 64 = Long-range Chart (red key f4) \ 128 = Short-range Chart (red key f5) \ 255 = Launch view \ \ This value is typically set by calling routine TT66 \ \ [Show more]\ \ This variable is used by the following: \ \ * DFAULT \ * DK4 \ * status_equip \ * TITLE \ * TT102 \ * TT103 \ * TT14 \ * TT15 \ * TT210 \ * TT66 \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ZZ SKIP 1 \ Temporary storage, typically used for distance values \ \ [Show more]\ \ This variable is used by the following: \ \ * PDESC \ * PIXEL \ * TT111 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX13 SKIP 1 \ Temporary storage, typically used in the line-drawing \ routines \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * EQSHP \ * LL145 (Part 1 of 4) \ * LL145 (Part 2 of 4) \ * LL145 (Part 4 of 4) \ * n_buyship \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.MCNT SKIP 1 \ The main loop counter \ \ This counter determines how often certain actions are \ performed within the main loop. See the deep dive on \ "Scheduling tasks with the main loop counter" for more \ details \ \ [Show more]\ \ This variable is used by the following: \ \ * BRIEF \ * DIALS (Part 3 of 4) \ * Main game loop (Part 2 of 6) \ * MVEIT (Part 1 of 9) \ * RES2 \ * TITLE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.DL SKIP 1 \ Vertical sync flag \ \ DL gets set to 30 every time we reach vertical sync on \ the video system, which happens 50 times a second \ (50Hz). The WSCAN routine uses this to pause until the \ vertical sync, by setting DL to 0 and then monitoring \ its value until it changes to 30 \ \ [Show more]\ \ This variable is used by the following: \ \ * WSCAN \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.TYPE SKIP 1 \ The current ship type \ \ This is where we store the current ship type for when \ we are iterating through the ships in the local bubble \ as part of the main flight loop. See the table at XX21 \ for information about ship types \ \ [Show more]\ \ This variable is used by the following: \ \ * BRIEF \ * TITLE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ALPHA SKIP 1 \ The current roll angle alpha, which is reduced from \ JSTX to a sign-magnitude value between -31 and +31 \ \ This describes how fast we are rolling our ship, and \ determines how fast the universe rolls around us \ \ The sign bit is also stored in ALP2, while the \ opposite sign is stored in ALP2+1 \ \ [Show more]\ \ This variable is used by the following: \ \ * MVS4 \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ12 SKIP 1 \ Our "docked" status \ \ * 0 = we are not docked \ \ * &FF = we are docked \ \ [Show more]\ \ This variable is used by the following: \ \ * BAY \ * Main game loop (Part 6 of 6) \ * RESET \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.TGT SKIP 1 \ Temporary storage, typically used as a target value \ for counters when drawing explosion clouds and partial \ circles \ \ [Show more]\ \ This variable is used by the following: \ \ * SUN (Part 1 of 4) \ * SUN (Part 2 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.SWAP SKIP 1 \ Temporary storage, used to store a flag that records \ whether or not we had to swap a line's start and end \ coordinates around when clipping the line in routine \ LL145 (the flag is used in places like BLINE to swap \ them back) \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * LL145 (Part 1 of 4) \ * LL145 (Part 4 of 4) \ * LOIN (Part 1 of 7) \ * LOIN (Part 2 of 7) \ * LOIN (Part 3 of 7) \ * LOIN (Part 4 of 7) \ * LOIN (Part 5 of 7) \ * LOIN (Part 6 of 7) \ * LOIN (Part 7 of 7) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.COL SKIP 1 \ Temporary storage, used to store colour information \ when drawing pixels in the dashboard \ \ [Show more]\ \ This variable is used by the following: \ \ * DILX \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.FLAG SKIP 1 \ A flag that's used to define whether this is the first \ call to the ball line routine in BLINE, so it knows \ whether to wait for the second call before storing \ segment data in the ball line heap \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * CIRCLE2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.CNT SKIP 1 \ Temporary storage, typically used for storing the \ number of iterations required when looping \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * CIRCLE2 \ * LL9 (Part 6 of 12) \ * LL9 (Part 8 of 12) \ * STATUS \ * status_equip \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.CNT2 SKIP 1 \ Temporary storage, used in the planet-drawing routine \ to store the segment number where the arc of a partial \ circle should start \ \ [Show more]\ \ This variable is used by the following: \ \ * HALL \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.STP SKIP 1 \ The step size for drawing circles \ \ Circles in Elite are split up into 64 points, and the \ step size determines how many points to skip with each \ straight-line segment, so the smaller the step size, \ the smoother the circle. The values used are: \ \ * 2 for big planets and the circles on the charts \ * 4 for medium planets and the launch tunnel \ * 8 for small planets and the hyperspace tunnel \ \ As the step size increases we move from smoother \ circles at the top to more polygonal at the bottom. \ See the CIRCLE2 routine for more details \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * TT128 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX4 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * GVL \ * HFS1 \ * LL9 (Part 1 of 12) \ * LL9 (Part 2 of 12) \ * LL9 (Part 4 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ * status_equip \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX20 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * HME2 \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 11 of 12) \ * LL9 (Part 12 of 12) \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX14 SKIP 1 \ This byte appears to be unused .RAT SKIP 1 \ Used to store different signs depending on the current \ space view, for use in calculating stardust movement .RAT2 SKIP 1 \ Temporary storage, used to store the pitch and roll \ signs when moving objects and stardust \ \ [Show more]\ \ This variable is used by the following: \ \ * HAS1 \ * MVEIT (Part 8 of 9) \ * MVS5 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.K2 SKIP 4 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * SUN (Part 1 of 4) \ * SUN (Part 3 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above\ --- Mod: Code added for Elite-A: --------------------> .finder SKIP 1 \ Toggle whether the compass shows the planet or sun \ \ * 0 = show the planet on the compass \ \ * NI% = show the sun on the compass \ \ When inside the space station's safe zone, the compass \ always shows the space station \ \ Toggled by pressing "F" when paused, see the DK4 \ routine for details \ --- End of added code -------------------------------> ORG &00D1 .T SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * ADD \ * BLINE \ * BPRNT \ * CIRCLE2 \ * cpl \ * DKS3 \ * DVIDT \ * EDGES \ * gnum \ * HALL \ * HLOIN \ * LL120 \ * LL123 \ * LL145 (Part 3 of 4) \ * LL5 \ * LL51 \ * LL9 (Part 2 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 7 of 12) \ * LL9 (Part 8 of 12) \ * MSBAR \ * MU11 \ * MULT1 \ * MVS5 \ * NORM \ * NWSHP \ * SUN (Part 3 of 4) \ * TIS1 \ * TIS2 \ * TT111 \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.K3 SKIP 0 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * CHKON \ * CHPR \ * CIRCLE2 \ * HFS1 \ * SUN (Part 3 of 4) \ * SUN (Part 4 of 4) \ * SwitchToCharSet \ * TT128 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XX2 SKIP 14 \ Temporary storage, used to store the visibility of the \ ship's faces during the ship-drawing routine at LL9 \ \ [Show more]\ \ This variable is used by the following: \ \ * LL9 (Part 3 of 12) \ * LL9 (Part 4 of 12) \ * LL9 (Part 5 of 12) \ * LL9 (Part 6 of 12) \ * LL9 (Part 10 of 12) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.K4 SKIP 2 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * CHKON \ * HFS1 \ * SUN (Part 1 of 4) \ * TT128 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovePRINT "ZP workspace from ", ~ZP, "to ", ~P%-1, "inclusive"ORG &0100 .XX3 SKIP 256 \ Temporary storage, typically used for storing tables \ of values such as screen coordinates or ship data \ \ [Show more]Name: XX3 [Show more] Type: Workspace Address: &0100 to the top of the descending stack Category: Workspaces Summary: Temporary storage space for complex calculationsContext: See this workspace on its own page References: This workspace is used as follows: * LL62 uses XX3 * LL9 (Part 2 of 12) uses XX3 * LL9 (Part 8 of 12) uses XX3 * LL9 (Part 9 of 12) uses XX3 * LL9 (Part 10 of 12) uses XX3
Used as heap space for storing temporary data during calculations. Shared with the descending 6502 stack, which works down from &01FF.\ \ This variable is used by the following: \ \ * LL62 \ * LL9 (Part 2 of 12) \ * LL9 (Part 8 of 12) \ * LL9 (Part 9 of 12) \ * LL9 (Part 10 of 12) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveORG &0300 .UP SKIP 0 \ The start of the UP workspace .KL SKIP 1 \ The following bytes implement a key logger that \ enables Elite to scan for concurrent key presses of \ the primary flight keys, plus a secondary flight key \ \ See the deep dive on "The key logger" for more details \ \ If a key is being pressed that is not in the keyboard \ table at KYTB, it can be stored here (as seen in \ routine DK4, for example) \ \ [Show more]Name: UP [Show more] Type: Workspace Address: &0300 to &03DE Category: Workspaces Summary: Ship slots, variablesContext: See this workspace on its own page References: No direct references to this workspace in this source file\ \ This variable is used by the following: \ \ * DK4 \ * DOENTRY \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.KY1 SKIP 1 \ "?" is being pressed (slow down) \ \ * 0 = no \ \ * Non-zero = yes .KY2 SKIP 1 \ Space is being pressed (speed up) \ \ * 0 = no \ \ * Non-zero = yes .KY3 SKIP 1 \ "<" is being pressed (roll left) \ \ * 0 = no \ \ * Non-zero = yes .KY4 SKIP 1 \ ">" is being pressed (roll right) \ \ * 0 = no \ \ * Non-zero = yes .KY5 SKIP 1 \ "X" is being pressed (pull up) \ \ * 0 = no \ \ * Non-zero = yes .KY6 SKIP 1 \ "S" is being pressed (pitch down) \ \ * 0 = no \ \ * Non-zero = yes .KY7 SKIP 1 \ "A" is being pressed (fire lasers) \ \ * 0 = no \ \ * Non-zero = yes \ \ This is also set when the joystick fire button has \ been pressed .KY12 SKIP 1 \ TAB is being pressed (energy bomb) \ \ * 0 = no \ \ * Non-zero = yes .KY13 SKIP 1 \ ESCAPE is being pressed (launch escape pod) \ \ * 0 = no \ \ * Non-zero = yes .KY14 SKIP 1 \ "T" is being pressed (target missile) \ \ * 0 = no \ \ * Non-zero = yes .KY15 SKIP 1 \ "U" is being pressed (unarm missile) \ \ * 0 = no \ \ * Non-zero = yes .KY16 SKIP 1 \ "M" is being pressed (fire missile) \ \ * 0 = no \ \ * Non-zero = yes .KY17 SKIP 1 \ "E" is being pressed (activate E.C.M.) \ \ * 0 = no \ \ * Non-zero = yes .KY18 SKIP 1 \ "J" is being pressed (in-system jump) \ \ * 0 = no \ \ * Non-zero = yes .KY19 SKIP 1 \ "C" is being pressed (activate docking computer) \ \ * 0 = no \ \ * Non-zero = yes .KY20 SKIP 1 \ "P" is being pressed (deactivate docking computer) \ \ * 0 = no \ \ * Non-zero = yes .FRIN SKIP NOSH + 1 \ Slots for the ships in the local bubble of universe \ \ There are #NOSH + 1 slots, but the ship-spawning \ routine at NWSHP only populates #NOSH of them, so \ there are 13 slots but only 12 are used for ships \ (the last slot is effectively used as a null \ terminator when shuffling the slots down in the \ KILLSHP routine) \ \ See the deep dive on "The local bubble of universe" \ for details of how Elite stores the local universe in \ FRIN, UNIV and K% \ \ [Show more]\ \ This variable is used by the following: \ \ * NWSHP \ * WPSHPS \ * ZERO \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.MANY SKIP SST \ The number of ships of each type in the local bubble \ of universe \ \ The number of ships of type X in the local bubble is \ stored at MANY+X \ \ See the deep dive on "Ship blueprints" for a list of \ ship types \ \ [Show more]\ \ This variable is used by the following: \ \ * NWSHP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.SSPR SKIP NTY + 1 - SST \ "Space station present" flag \ \ * Non-zero if we are inside the space station's safe \ zone \ \ * 0 if we aren't (in which case we can show the sun) \ \ This flag is at MANY+SST, which is no coincidence, as \ MANY+SST is a count of how many space stations there \ are in our local bubble, which is the same as saying \ "space station present" .JUNK SKIP 1 \ The amount of junk in the local bubble \ \ "Junk" is defined as being one of these: \ \ * Escape pod \ * Alloy plate \ * Cargo canister \ * Asteroid \ * Splinter \ * Shuttle \ * Transporter \ \ Junk is the range of ship types from #JL to #JH - 1 .auto SKIP 1 \ Docking computer activation status \ \ * 0 = Docking computer is off \ \ * Non-zero = Docking computer is running .ECMP SKIP 1 \ Our E.C.M. status \ \ * 0 = E.C.M. is off \ \ * Non-zero = E.C.M. is on \ \ [Show more]\ \ This variable is used by the following: \ \ * ECMOF \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.MJ SKIP 1 \ Are we in witchspace (i.e. have we mis-jumped)? \ \ * 0 = no, we are in normal space \ \ * &FF = yes, we are in witchspace .CABTMP SKIP 1 \ Cabin temperature \ \ The ambient cabin temperature in deep space is 30, \ which is displayed as one notch on the dashboard bar \ \ We get higher temperatures closer to the sun \ \ CABTMP shares a location with MANY, but that's OK as \ MANY+0 would contain the number of ships of type 0, \ and as there is no ship type 0 (they start at 1), the \ byte at MANY+0 is not used for storing a ship type \ and can be used for the cabin temperature instead \ \ [Show more]\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.LAS2 SKIP 1 \ Laser power for the current laser \ \ * Bits 0-6 contain the laser power of the current \ space view \ \ * Bit 7 denotes whether or not the laser pulses: \ \ * 0 = pulsing laser \ \ * 1 = beam laser (i.e. always on) .MSAR SKIP 1 \ The targeting state of our leftmost missile \ \ * 0 = missile is not looking for a target, or it \ already has a target lock (indicator is not \ yellow/white) \ \ * Non-zero = missile is currently looking for a \ target (indicator is yellow/white) .VIEW SKIP 1 \ The number of the current space view \ \ * 0 = front \ * 1 = rear \ * 2 = left \ * 3 = right \ \ [Show more]\ \ This variable is used by the following: \ \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.LASCT SKIP 1 \ The laser pulse count for the current laser \ \ This is a counter that defines the gap between the \ pulses of a pulse laser. It is set as follows: \ \ * 0 for a beam laser \ \ * 10 for a pulse laser \ \ It gets decremented every vertical sync (in the LINSCN \ routine, which is called 50 times a second) and is set \ to a non-zero value for pulse lasers only \ \ The laser only fires when the value of LASCT hits \ zero, so for pulse lasers with a value of 10, that \ means the laser fires once every 10 vertical syncs (or \ 5 times a second) \ \ In comparison, beam lasers fire continuously as the \ value of LASCT is always 0 \ \ [Show more]\ \ This variable is used by the following: \ \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.GNTMP SKIP 1 \ Laser temperature (or "gun temperature") \ \ If the laser temperature exceeds 242 then the laser \ overheats and cannot be fired again until it has \ cooled down \ \ [Show more]\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.HFX SKIP 1 \ A flag that toggles the hyperspace colour effect \ \ * 0 = no colour effect \ \ * Non-zero = hyperspace colour effect enabled \ \ When HFX is set to 1, the mode 4 screen that makes \ up the top part of the display is temporarily switched \ to mode 5 (the same screen mode as the dashboard), \ which has the effect of blurring and colouring the \ hyperspace rings in the top part of the screen. The \ code to do this is in the LINSCN routine, which is \ called as part of the screen mode routine at IRQ1. \ It's in LINSCN that HFX is checked, and if it is \ non-zero, the top part of the screen is not switched \ to mode 4, thus leaving the top part of the screen in \ the more colourful mode 5 .EV SKIP 1 \ The "extra vessels" spawning counter \ \ This counter is set to 0 on arrival in a system and \ following an in-system jump, and is bumped up when we \ spawn bounty hunters or pirates (i.e. "extra vessels") \ \ It decreases by 1 each time we consider spawning more \ "extra vessels" in part 4 of the main game loop, so \ increasing the value of EV has the effect of delaying \ the spawning of more vessels \ \ In other words, this counter stops bounty hunters and \ pirates from continually appearing, and ensures that \ there's a delay between spawnings \ \ [Show more]\ \ This variable is used by the following: \ \ * hyp1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.DLY SKIP 1 \ In-flight message delay \ \ This counter is used to keep an in-flight message up \ for a specified time before it gets removed. The value \ in DLY is decremented each time we start another \ iteration of the main game loop at TT100 \ \ [Show more]\ \ This variable is used by the following: \ \ * Main game loop (Part 2 of 6) \ * me1 \ * me2 \ * MESS \ * TTX66 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.de SKIP 1 \ Equipment destruction flag \ \ * Bit 1 denotes whether or not the in-flight message \ about to be shown by the MESS routine is about \ destroyed equipment: \ \ * 0 = the message is shown normally \ \ * 1 = the string " DESTROYED" gets added to the \ end of the message \ \ [Show more]\ \ This variable is used by the following: \ \ * mes9 \ * TTX66 \ * ZERO \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.JSTX SKIP 1 \ Our current roll rate \ \ This value is shown in the dashboard's RL indicator, \ and determines the rate at which we are rolling \ \ The value ranges from 1 to 255 with 128 as the centre \ point, so 1 means roll is decreasing at the maximum \ rate, 128 means roll is not changing, and 255 means \ roll is increasing at the maximum rate \ \ This value is updated by "<" and ">" key presses, or \ if joysticks are enabled, from the joystick. If \ keyboard damping is enabled (which it is by default), \ the value is slowly moved towards the centre value of \ 128 (no roll) if there are no key presses or joystick \ movement \ \ [Show more]\ \ This variable is used by the following: \ \ * DOKEY \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.JSTY SKIP 1 \ Our current pitch rate \ \ This value is shown in the dashboard's DC indicator, \ and determines the rate at which we are pitching \ \ The value ranges from 1 to 255 with 128 as the centre \ point, so 1 means pitch is decreasing at the maximum \ rate, 128 means pitch is not changing, and 255 means \ pitch is increasing at the maximum rate \ \ This value is updated by "S" and "X" key presses, or \ if joysticks are enabled, from the joystick. If \ keyboard damping is enabled (which it is by default), \ the value is slowly moved towards the centre value of \ 128 (no pitch) if there are no key presses or joystick \ movement \ \ [Show more]\ \ This variable is used by the following: \ \ * DOKEY \ * RES2 \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.XSAV2 SKIP 1 \ Temporary storage, used for storing the value of the X \ register in the CHPR routine \ \ [Show more]\ \ This variable is used by the following: \ \ * CHPR \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.YSAV2 SKIP 1 \ Temporary storage, used for storing the value of the Y \ register in the CHPR routine \ \ [Show more]\ \ This variable is used by the following: \ \ * CHPR \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.NAME SKIP 8 \ The current commander name \ \ The commander name can be up to 7 characters (the DFS \ limit for filenames), and is terminated by a carriage \ return \ \ [Show more]\ \ This variable is used by the following: \ \ * CATS \ * DFAULT \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.TP SKIP 1 \ The current mission status \ \ * Bits 0-1 = Mission 1 status \ \ * %00 = Mission not started \ * %01 = Mission in progress, hunting for ship \ * %11 = Constrictor killed, not debriefed yet \ * %10 = Mission and debrief complete \ \ * Bits 2-3 = Mission 2 status \ \ * %00 = Mission not started \ * %01 = Mission in progress, plans not picked up \ * %10 = Mission in progress, plans picked up \ * %11 = Mission complete \ \ [Show more]\ \ This variable is used by the following: \ \ * BRIEF \ * BRIEF2 \ * BRIEF3 \ * DEBRIEF \ * DEBRIEF2 \ * DOENTRY \ * PDESC \ * SVE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ0 SKIP 1 \ The current system's galactic x-coordinate (0-256) \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * cour_count \ * cour_dock \ * DOENTRY \ * jmp \ * ping \ * TT105 \ * TT111 \ * TT14 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ1 SKIP 1 \ The current system's galactic y-coordinate (0-256) \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * cour_count \ * cour_dock \ * DOENTRY \ * jmp \ * TT105 \ * TT111 \ * TT14 \ * TT23 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ21 SKIP 6 \ The three 16-bit seeds for the current galaxy \ \ These seeds define system 0 in the current galaxy, so \ they can be used as a starting point to generate all \ 256 systems in the galaxy \ \ Using a galactic hyperdrive rotates each byte to the \ left (rolling each byte within itself) to get the \ seeds for the next galaxy, so after eight galactic \ jumps, the seeds roll around to the first galaxy again \ \ See the deep dives on "Galaxy and system seeds" and \ "Twisting the system seeds" for more details \ \ [Show more]\ \ This variable is used by the following: \ \ * TT81 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.CASH SKIP 4 \ Our current cash pot \ \ The cash stash is stored as a 32-bit unsigned integer, \ with the most significant byte in CASH and the least \ significant in CASH+3. This is big-endian, which is \ the opposite way round to most of the numbers used in \ Elite - to use our notation for multi-byte numbers, \ the amount of cash is CASH(0 1 2 3) \ \ [Show more]\ \ This variable is used by the following: \ \ * csh \ * LCASH \ * MCASH \ * n_buyship \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ14 SKIP 1 \ Our current fuel level (0-70) \ \ The fuel level is stored as the number of light years \ multiplied by 10, so QQ14 = 1 represents 0.1 light \ years, and the maximum possible value is 70, for 7.0 \ light years \ \ [Show more]\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ * EQSHP \ * fwl \ * n_buyship \ * TT14 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.COK SKIP 1 \ Flags used to generate the competition code \ \ See the deep dive on "The competition code" for \ details of these flags and how they are used in \ generating and decoding the competition code .GCNT SKIP 1 \ The number of the current galaxy (0-7) \ \ When this is displayed in-game, 1 is added to the \ number, so we start in galaxy 1 in-game, but it's \ stored as galaxy 0 internally \ \ The galaxy number increases by one every time a \ galactic hyperdrive is used, and wraps back around to \ the start after eight galaxies \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * DOENTRY \ * MT28 \ * PDESC \ * tal \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.LASER SKIP 4 \ The specifications of the lasers fitted to each of the \ four space views: \ \ * Byte #0 = front view \ * Byte #1 = rear view \ * Byte #2 = left view \ * Byte #3 = right view \ \ For each of the views: \ \ * 0 = no laser is fitted to this view \ \ * Non-zero = a laser is fitted to this view, with \ the following specification: \ \ * Bits 0-6 contain the laser's power \ \ * Bit 7 determines whether or not the laser pulses \ (0 = pulse or mining laser) or is always on \ (1 = beam or military laser) \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * n_buyship \ * n_load \ * STATUS \ * status_equip \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above\ --- Mod: Code removed for Elite-A: ------------------> \SKIP 2 \ These bytes appear to be unused (they were originally \ \ used for up/down lasers, but they were dropped) \ --- And replaced by: --------------------------------> SKIP 1 \ This byte appears to be unused .cmdr_type SKIP 1 \ The type of our current ship \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * n_buyship \ * n_load \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above\ --- End of replacement ------------------------------> .CRGO SKIP 1 \ I.F.F. system \ \ * 0 = not fitted \ \ * &FF = fitted \ \ Elite-A doesn't sell the large cargo bay as you can \ buy different ships with different capacities, so we \ reuse the CRGO variable to determine whether an I.F.F. \ system is fitted \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ20 SKIP 17 \ The contents of our cargo hold \ \ The amount of market item X that we have in our hold \ can be found in the X-th byte of QQ20. For example: \ \ * QQ20 contains the amount of food (item 0) \ \ * QQ20+7 contains the amount of computers (item 7) \ \ See QQ23 for a list of market item numbers and their \ storage units \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * tnpr \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ECM SKIP 1 \ E.C.M. system \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.BST SKIP 1 \ Fuel scoops (BST stands for "barrel status") \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.BOMB SKIP 1 \ Hyperspace unit \ \ * 0 = not fitted \ \ * &FF = fitted \ \ Elite-A replaces the energy bomb with the hyperspace \ unit, reusing the BOMB variable to determine whether \ one is fitted \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ENGY SKIP 1 \ Energy unit \ \ * 0 = not fitted \ \ * Non-zero = fitted \ \ The actual value determines the refresh rate of our \ energy banks, as they refresh by ENGY+1 each time (so \ our ship's energy level goes up by 2 each time if we \ have an energy unit fitted, otherwise it goes up by 1) \ \ [Show more]\ \ This variable is used by the following: \ \ * DEBRIEF2 \ * EQSHP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above\ \ In Elite-A, the value of ENGY depends on the ship type \ so some ships recharge faster than others .DKCMP SKIP 1 \ Docking computer \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.GHYP SKIP 1 \ Galactic hyperdrive \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ESCP SKIP 1 \ Escape pod \ \ * 0 = not fitted \ \ * &FF = fitted \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * sell_jump \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above\ --- Mod: Code removed for Elite-A: ------------------> \SKIP 4 \ These bytes appear to be unused \ --- And replaced by: --------------------------------> .cmdr_cour SKIP 2 \ The mission reward for the current special cargo \ delivery destination \ \ While doing a special cargo delivery, the reward is \ halved on every visit to a station (and again if we \ choose to pay a docking fee), and if it runs down to \ zero, the mission is lost \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * cour_dock \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.cmdr_courx SKIP 1 \ The galactic x-coordinate for the current special \ cargo delivery destination \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * cour_dock \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.cmdr_coury SKIP 1 \ The galactic y-coordinate for the current special \ cargo delivery destination \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * cour_dock \ * TT102 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above\ --- End of replacement ------------------------------> .NOMSL SKIP 1 \ The number of missiles we have fitted (0-4) \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * msblob \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.FIST SKIP 1 \ Our legal status (FIST stands for "fugitive/innocent \ status"): \ \ * 0 = Clean \ \ * 1-49 = Offender \ \ * 50+ = Fugitive \ \ You get 64 points if you kill a cop, so that's a fast \ ticket to fugitive status \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * cour_count \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.AVL SKIP 17 \ Market availability in the current system \ \ The available amount of market item X is stored in \ the X-th byte of AVL, so for example: \ \ * AVL contains the amount of food (item 0) \ \ * AVL+7 contains the amount of computers (item 7) \ \ See QQ23 for a list of market item numbers and their \ storage units, and the deep dive on "Market item \ prices and availability" for details of the algorithm \ used for calculating each item's availability \ \ [Show more]\ \ This variable is used by the following: \ \ * GVL \ * TT151 \ * TT219 \ * var \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ26 SKIP 1 \ A random value used to randomise market data \ \ This value is set to a new random number for each \ change of system, so we can add a random factor into \ the calculations for market prices (for details of how \ this is used, see the deep dive on "Market prices") \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * GVL \ * TT151 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.TALLY SKIP 2 \ Our combat rank \ \ The combat rank is stored as the number of kills, in a \ 16-bit number TALLY(1 0) - so the high byte is in \ TALLY+1 and the low byte in TALLY \ \ If the high byte in TALLY+1 is 0 then we have between \ 0 and 255 kills, so our rank is Harmless, Mostly \ Harmless, Poor, Average or Above Average, according to \ the value of the low byte in TALLY: \ \ Harmless = %00000000 to %00000011 = 0 to 3 \ Mostly Harmless = %00000100 to %00000111 = 4 to 7 \ Poor = %00001000 to %00001111 = 8 to 15 \ Average = %00010000 to %00011111 = 16 to 31 \ Above Average = %00100000 to %11111111 = 32 to 255 \ \ If the high byte in TALLY+1 is non-zero then we are \ Competent, Dangerous, Deadly or Elite, according to \ the high byte in TALLY+1: \ \ Competent = 1 = 256 to 511 kills \ Dangerous = 2 to 9 = 512 to 2559 kills \ Deadly = 10 to 24 = 2560 to 6399 kills \ Elite = 25 and up = 6400 kills and up \ \ You can see the rating calculation in the STATUS \ subroutine \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * DEBRIEF \ * DEBRIEF2 \ * DOENTRY \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.SVC SKIP 1 \ The save count \ \ When a new commander is created, the save count gets \ set to 128. This value gets halved each time the \ commander file is saved, but it is otherwise unused. \ It is presumably part of the security system for the \ competition, possibly another flag to catch out \ entries with manually altered commander files SKIP 2 \ The commander file checksum \ \ These two bytes are reserved for the commander file \ checksum, so when the current commander block is \ copied from here to the last saved commander block at \ NA%, CHK and CHK2 get overwritten NT% = SVC + 2 - TP \ This sets the variable NT% to the size of the current \ commander data block, which starts at TP and ends at \ SVC+2 (inclusive) .MCH SKIP 1 \ The text token number of the in-flight message that is \ currently being shown, and which will be removed by \ the me2 routine when the counter in DLY reaches zero \ \ [Show more]\ \ This variable is used by the following: \ \ * me1 \ * me2 \ * MESS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.FSH SKIP 1 \ Forward shield status \ \ * 0 = empty \ \ * &FF = full \ \ [Show more]\ \ This variable is used by the following: \ \ * RESET \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.ASH SKIP 1 \ Aft shield status \ \ * 0 = empty \ \ * &FF = full .ENERGY SKIP 1 \ Energy bank status \ \ * 0 = empty \ \ * &FF = full .COMX SKIP 1 \ The x-coordinate of the compass dot .COMY SKIP 1 \ The y-coordinate of the compass dot .QQ24 SKIP 1 \ Temporary storage, used to store the current market \ item's price in routine TT151 \ \ [Show more]\ \ This variable is used by the following: \ \ * TT151 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ25 SKIP 1 \ Temporary storage, used to store the current market \ item's availability in routine TT151 \ \ [Show more]\ \ This variable is used by the following: \ \ * cour_buy \ * EQSHP \ * gnum \ * n_buyship \ * status_equip \ * TT151 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ28 SKIP 1 \ The current system's economy (0-7) \ \ * 0 = Rich Industrial \ * 1 = Average Industrial \ * 2 = Poor Industrial \ * 3 = Mainly Industrial \ * 4 = Mainly Agricultural \ * 5 = Rich Agricultural \ * 6 = Average Agricultural \ * 7 = Poor Agricultural \ \ See the deep dive on "Generating system data" for more \ information on economies \ \ [Show more]\ \ This variable is used by the following: \ \ * hyp1 \ * n_buyship \ * var \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ29 SKIP 1 \ Temporary storage, used in a number of places \ \ [Show more]\ \ This variable is used by the following: \ \ * NWDAV4 \ * tnpr \ * TT167 \ * TT210 \ * TT219 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.gov SKIP 1 \ The current system's government type (0-7) \ \ See the deep dive on "Generating system data" for \ details of the various government types \ \ [Show more]\ \ This variable is used by the following: \ \ * hyp1 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.tek SKIP 1 \ The current system's tech level (0-14) \ \ See the deep dive on "Generating system data" for more \ information on tech levels \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * hyp1 \ * qv \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.SLSP SKIP 2 \ The address of the bottom of the ship line heap \ \ The ship line heap is a descending block of memory \ that starts at WP and descends down to SLSP. It can be \ extended downwards by the NWSHP routine when adding \ new ships (and their associated ship line heaps), in \ which case SLSP is lowered to provide more heap space, \ assuming there is enough free memory to do so \ \ [Show more]\ \ This variable is used by the following: \ \ * NWSHP \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ2 SKIP 6 \ The three 16-bit seeds for the current system, i.e. \ the one we are currently in \ \ See the deep dives on "Galaxy and system seeds" and \ "Twisting the system seeds" for more details \ \ [Show more]\ \ This variable is used by the following: \ \ * hyp1 \ * ypl \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ3 SKIP 1 \ The selected system's economy (0-7) \ \ * 0 = Rich Industrial \ * 1 = Average Industrial \ * 2 = Poor Industrial \ * 3 = Mainly Industrial \ * 4 = Mainly Agricultural \ * 5 = Rich Agricultural \ * 6 = Average Agricultural \ * 7 = Poor Agricultural \ \ See the deep dive on "Generating system data" for more \ information on economies \ \ [Show more]\ \ This variable is used by the following: \ \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ4 SKIP 1 \ The selected system's government (0-7) \ \ See the deep dive on "Generating system data" for more \ details of the various government types \ \ [Show more]\ \ This variable is used by the following: \ \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ5 SKIP 1 \ The selected system's tech level (0-14) \ \ See the deep dive on "Generating system data" for more \ information on tech levels \ \ [Show more]\ \ This variable is used by the following: \ \ * hyp1 \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ6 SKIP 2 \ The selected system's population in billions * 10 \ (1-71), so the maximum population is 7.1 billion \ \ See the deep dive on "Generating system data" for more \ details on population levels \ \ [Show more]\ \ This variable is used by the following: \ \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ7 SKIP 2 \ The selected system's productivity in M CR (96-62480) \ \ See the deep dive on "Generating system data" for more \ details about productivity levels \ \ [Show more]\ \ This variable is used by the following: \ \ * TT24 \ * TT25 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ8 SKIP 2 \ The distance from the current system to the selected \ system in light years * 10, stored as a 16-bit number \ \ The distance will be 0 if the selected system is the \ current system \ \ The galaxy chart is 102.4 light years wide and 51.2 \ light years tall (see the intra-system distance \ calculations in routine TT111 for details), which \ equates to 1024 x 512 in terms of QQ8 \ \ [Show more]\ \ This variable is used by the following: \ \ * PDESC \ * TT111 \ * TT146 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ9 SKIP 1 \ The galactic x-coordinate of the crosshairs in the \ galaxy chart (and, most of the time, the selected \ system's galactic x-coordinate) \ \ [Show more]\ \ This variable is used by the following: \ \ * HME2 \ * jmp \ * ping \ * TT102 \ * TT103 \ * TT105 \ * TT111 \ * TT16 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.QQ10 SKIP 1 \ The galactic y-coordinate of the crosshairs in the \ galaxy chart (and, most of the time, the selected \ system's galactic y-coordinate) \ \ [Show more]\ \ This variable is used by the following: \ \ * HME2 \ * jmp \ * TT102 \ * TT103 \ * TT105 \ * TT111 \ * TT16 \ * TT22 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.NOSTM SKIP 1 \ The number of stardust particles shown on screen, \ which is 18 (#NOST) for normal space, and 3 for \ witchspace \ \ [Show more]\ \ This variable is used by the following: \ \ * RES2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSKIP 1 \ This byte appears to be unused .COMC SKIP 1 \ The colour of the dot on the compass \ \ * &F0 = the object in the compass is in front of us, \ so the dot is yellow/white \ \ * &FF = the object in the compass is behind us, so \ the dot is green/cyan \ \ [Show more]\ \ This variable is used by the following: \ \ * BEGIN \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.DNOIZ SKIP 1 \ Sound on/off configuration setting \ \ * 0 = sound is on (default) \ \ * Non-zero = sound is off \ \ Toggled by pressing "S" when paused, see the DK4 \ routine for details \ \ [Show more]\ \ This variable is used by the following: \ \ * DK4 \ * NO3 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.DAMP SKIP 1 \ Keyboard damping configuration setting \ \ * 0 = damping is enabled (default) \ \ * &FF = damping is disabled \ \ Toggled by pressing CAPS LOCK when paused, see the \ DKS3 routine for details \ \ [Show more]\ \ This variable is used by the following: \ \ * DKS3 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.DJD SKIP 1 \ Keyboard auto-recentre configuration setting \ \ * 0 = auto-recentre is enabled (default) \ \ * &FF = auto-recentre is disabled \ \ Toggled by pressing "A" when paused, see the DKS3 \ routine for details .PATG SKIP 1 \ Configuration setting to show the author names on the \ start-up screen and enable manual hyperspace mis-jumps \ \ * 0 = no author names or manual mis-jumps (default) \ \ * &FF = show author names and allow manual mis-jumps \ \ Toggled by pressing "X" when paused, see the DKS3 \ routine for details \ \ This needs to be turned on for manual mis-jumps to be \ possible. To do a manual mis-jump, first toggle the \ author display by pausing the game and pressing "X", \ and during the next hyperspace, hold down CTRL to \ force a mis-jump. See routine ee5 for the "AND PATG" \ instruction that implements this logic \ \ [Show more]\ \ This variable is used by the following: \ \ * TITLE \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.FLH SKIP 1 \ Flashing console bars configuration setting \ \ * 0 = static bars (default) \ \ * &FF = flashing bars \ \ Toggled by pressing "F" when paused, see the DKS3 \ routine for details .JSTGY SKIP 1 \ Reverse joystick Y-channel configuration setting \ \ * 0 = standard Y-channel (default) \ \ * &FF = reversed Y-channel \ \ Toggled by pressing "Y" when paused, see the DKS3 \ routine for details \ \ [Show more]\ \ This variable is used by the following: \ \ * DOKEY \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.JSTE SKIP 1 \ Reverse both joystick channels configuration setting \ \ * 0 = standard channels (default) \ \ * &FF = reversed channels \ \ Toggled by pressing "J" when paused, see the DKS3 \ routine for details \ \ [Show more]\ \ This variable is used by the following: \ \ * DKS2 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.JSTK SKIP 1 \ Keyboard or joystick configuration setting \ \ * 0 = keyboard (default) \ \ * &FF = joystick \ \ Toggled by pressing "K" when paused, see the DKS3 \ routine for details \ \ [Show more]\ \ This variable is used by the following: \ \ * DOKEY \ * TITLE \ * TT17 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.BSTK SKIP 1 \ Delta 14B joystick configuration setting \ \ * 127 = keyboard \ \ * 128 = Delta 14B joystick \ \ Elite-A doesn't support the Bitstik, but instead it \ supports the multi-button Voltmace Delta 14B joystick, \ reusing the BSTK variable to determine whether it is \ configured \ \ [Show more]\ \ This variable is used by the following: \ \ * BEGIN \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.CATF SKIP 1 \ The disc catalogue flag \ \ Determines whether a disc catalogue is currently in \ progress, so the TT26 print routine can format the \ output correctly: \ \ * 0 = disc is not currently being catalogued \ \ * 1 = disc is currently being catalogued \ \ Specifically, when CATF is non-zero, TT26 will omit \ column 17 from the catalogue so that it will fit \ on-screen (column 17 is blank column in the middle \ of the catalogue, between the two lists of filenames, \ so it can be dropped without affecting the layout) \ \ [Show more]\ \ This variable is used by the following: \ \ * BEGIN \ * CATS \ * CHPR \ * SwitchToCharSet \ * SwitchToFileSys \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above\ --- Mod: Code added for Elite-A: --------------------> .new_pulse SKIP 1 \ The power level of pulse lasers when fitted to our \ current ship type \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * n_load \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_beam SKIP 1 \ The power level of beam lasers when fitted to our \ current ship type \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_military SKIP 1 \ The power level of military lasers when fitted to our \ current ship type \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_mining SKIP 1 \ The power level of mining lasers when fitted to our \ current ship type \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * STATUS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_mounts SKIP 1 \ The available laser mounts in our current ship \ \ * 1 = Front only \ * 2 = Front and rear \ * 4 = Front, rear, left and right \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * qv \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_missiles SKIP 1 \ The maximum number of missiles that can be fitted to \ our current ship \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_shields SKIP 1 \ Our current ship's shield level \ \ If our ship is damaged and the level of damage is less \ than our shield level, then the ship emerges unscathed \ \ If the damage level is greater than the shield level, \ then the damage level is reduced by the shield level \ before being applied to the ship (i.e. the shields \ absorb the amount of damage given in new_shields) \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details .new_energy SKIP 1 \ Our current ship's ship energy refresh rate when \ fitted with an energy unit \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_speed SKIP 1 \ Our current ship's maximum speed \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details .new_hold SKIP 1 \ The amount of free space in our current ship's hold \ \ The value is actually the amount of free space plus 1, \ as this makes the maths slightly easier in the tnpr \ routine \ \ In Elite-A, hold space is taken up by both equipment \ and cargo \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * DEBRIEF2 \ * EQSHP \ * n_load \ * status_equip \ * tnpr \ * TT213 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_range SKIP 1 \ Our current ship's hyperspace range (i.e. the size of \ the fuel tank) \ \ The range is stored as the number of light years \ multiplied by 10, so a value of 1 represents 0.1 light \ years, while 70 represents 7.0 light years \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * EQSHP \ * n_buyship \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_costs SKIP 1 \ The price table offset for our current ship \ \ In Elite-A the PRXS table (which contains equipment \ prices) has multiple sections, for the different types \ of ship we can buy, and the offset into this table for \ our current ship is held here \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * prx \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_max SKIP 1 \ Our current ship's maximum pitch/roll rate \ \ When we buy a new ship, this is set to the relevant \ value from the ship's flight characteristics table \ at new_details \ \ [Show more]\ \ This variable is used by the following: \ \ * n_load \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_min SKIP 1 \ Our current ship's minimum pitch/roll rate \ \ This is always equal to 255 - new_max, so when we buy \ a new ship, the correct value is calculated rather \ than being fetched from the new_details table (there \ are default values for this in the new_details table, \ though these are commented out) \ \ [Show more]\ \ This variable is used by the following: \ \ * n_load \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.new_space SKIP 1 \ This byte appears to be unused \ \ It does have a label in the original source, and there \ are default values for it in the new_details table, \ though these are commented out \ --- End of added code -------------------------------> PRINT "UP workspace from ", ~UP, "to ", ~P%-1, "inclusive"ORG &0900 .K% SKIP NOSH * NI% \ Ship data blocks and ship line heap \ \ [Show more]Name: K% [Show more] Type: Workspace Address: &0900 to &0ABB Category: Workspaces Summary: Ship data blocks and ship line heaps Deep dive: Ship data blocks The local bubble of universeContext: See this workspace on its own page References: This workspace is used as follows: * UNIV uses K%
Contains ship data for all the ships, planets, suns and space stations in our local bubble of universe, along with their corresponding ship line heaps. The blocks are pointed to by the lookup table at location UNIV. The first 444 bytes of the K% workspace hold ship data on up to 12 ships, with 37 (NI%) bytes per ship, and the ship line heap grows downwards from WP at the end of the K% workspace. See the deep dive on "Ship data blocks" for details on ship data blocks, and the deep dive on "The local bubble of universe" for details of how Elite stores the local universe in K%, FRIN and UNIV.\ \ This variable is used by the following: \ \ * UNIV \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned abovePRINT "K% workspace from ", ~K%, "to ", ~P%-1, "inclusive"ORG &0E00 .WP SKIP 0 \ The start of the WP workspace .LSX SKIP 0 \ LSX is an alias that points to the first byte of the \ sun line heap at LSO \ \ * &FF indicates the sun line heap is empty \ \ * Otherwise the LSO heap contains the line data for \ the sun \ \ [Show more]Name: WP [Show more] Type: Workspace Address: &0E00 to &0FD2 Category: Workspaces Summary: VariablesContext: See this workspace on its own page References: No direct references to this workspace in this source file\ \ This variable is used by the following: \ \ * FLFLLS \ * SUN (Part 1 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.LSO SKIP 1 \ The ship line heap for the space station (see NWSPS) \ and the sun line heap (see SUN) \ \ The spaces can be shared as our local bubble of \ universe can support either the sun or a space \ station, but not both \ \ [Show more]\ \ This variable is used by the following: \ \ * EDGES \ * FLFLLS \ * HLOIN2 \ * SUN (Part 2 of 4) \ * SUN (Part 3 of 4) \ * SUN (Part 4 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.BUF SKIP 191 \ The line buffer used by DASC to print justified text \ \ This buffer shares space with the LSO buffer, which \ works because neither the sun or space station are \ shown at the same time as printing justified text \ \ [Show more]\ \ This variable is used by the following: \ \ * HME2 \ * MT17 \ * TT26 \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.LSX2 SKIP 78 \ The ball line heap for storing x-coordinates (see the \ deep dive on "The ball line heap" for details) \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * RES2 \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.LSY2 SKIP 78 \ The ball line heap for storing y-coordinates (see the \ deep dive on "The ball line heap" for details) \ \ [Show more]\ \ This variable is used by the following: \ \ * BLINE \ * RES2 \ * WPSHPS \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.SX SKIP NOST + 1 \ This is where we store the x_hi coordinates for all \ the stardust particles .SXL SKIP NOST + 1 \ This is where we store the x_lo coordinates for all \ the stardust particles .SY SKIP NOST + 1 \ This is where we store the y_hi coordinates for all \ the stardust particles .SYL SKIP NOST + 1 \ This is where we store the y_lo coordinates for all \ the stardust particles .SZ SKIP NOST + 1 \ This is where we store the z_hi coordinates for all \ the stardust particles .SZL SKIP NOST + 1 \ This is where we store the z_lo coordinates for all \ the stardust particles .LASX SKIP 1 \ The x-coordinate of the tip of the laser line .LASY SKIP 1 \ The y-coordinate of the tip of the laser line .XX24 SKIP 1 \ This byte appears to be unused .ALTIT SKIP 1 \ Our altitude above the surface of the planet or sun \ \ * 255 = we are a long way above the surface \ \ * 1-254 = our altitude as the square root of: \ \ x_hi^2 + y_hi^2 + z_hi^2 - 6^2 \ \ where our ship is at the origin, the centre of the \ planet/sun is at (x_hi, y_hi, z_hi), and the \ radius of the planet/sun is 6 \ \ * 0 = we have crashed into the surface \ \ [Show more]\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.CPIR SKIP 1 \ A counter used when spawning pirates, to work our way \ through the list of pirate ship blueprints until we \ find one that has been loaded PRINT "WP workspace from ", ~WP, "to ", ~P%-1, "inclusive"
[X]
Configuration variable NI%
The number of bytes in each ship's data block (as stored in INWK and K%)
[X]
Configuration variable NOSH
The maximum number of ships in our local bubble of universe
[X]
Configuration variable NOST
The number of stardust particles in normal space (this goes down to 3 in witchspace)
[X]
Configuration variable NTY
The number of different ship types
[X]
Configuration variable SST
Ship blueprint position for the space station