ORG &0BE0 .WP SKIP 0 \ The start of the WP workspace \ \ [Show more]Name: WP [Show more] Type: Workspace Address: &0BE0 to &0CF3 Category: Workspaces Summary: Ship slots, variablesContext: See this workspace in context in the source code Variations: See code variations for this workspace in the different versions References: This workspace is used as follows: * RES2 uses WP\ \ 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.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: \ \ * DEATH \ * FRMIS \ * KILLSHP \ * KS2 \ * KS4 \ * Main flight loop (Part 4 of 16) \ * NWSHP \ * NWSPS \ * STATUS \ * WARP \ * 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.LAS2 SKIP 0 \ 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) \ \ [Show more]\ \ This variable is used by the following: \ \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ * 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.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: \ \ * KILLSHP \ * Main game loop (Part 2 of 6) \ * Main game loop (Part 3 of 6) \ * NWSHP \ * STATUS \ * TACTICS (Part 2 of 7) \ * WARP \ \ 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 \ \ 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" \ \ [Show more]\ \ This variable is used by the following: \ \ * COMPAS \ * KS4 \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 14 of 16) \ * Main game loop (Part 2 of 6) \ * Main game loop (Part 3 of 6) \ * RES2 \ * TACTICS (Part 2 of 7) \ * WARP \ \ 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 \ These bytes appear to be unused .SFXPR SKIP 1 \ The priority of the current sound on channel 0 \ \ [Show more]\ \ This variable is used by the following: \ \ * Main flight loop (Part 1 of 16) \ * 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 aboveSKIP 1 \ The priority of the current sound on channel 1 .SFXDU SKIP 1 \ The duration counter of the current sound on channel 0 \ \ [Show more]\ \ This variable is used by the following: \ \ * Main flight loop (Part 1 of 16) \ * 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 aboveSKIP 1 \ The duration counter of the current sound on channel 1 .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 \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ \ 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.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 either a \ white square, or a white square containing a "T") \ \ * Non-zero = missile is currently looking for a \ target (indicator is a black box in a white \ square) \ \ [Show more]\ \ This variable is used by the following: \ \ * ABORT2 \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 11 of 16) \ \ 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.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: \ \ * LOOK1 \ * Main flight loop (Part 3 of 16) \ * PLUT \ * SIGHT \ * STARS \ * TTX66 \ * WARP \ \ 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 by 4 on each iteration round the \ main game loop 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 four iterations \ round the main game loop (LASCT = 10, 6, 2, 0) \ \ In comparison, beam lasers fire continuously as the \ value of LASCT is always 0 \ \ [Show more]\ \ This variable is used by the following: \ \ * DEATH \ * Main flight loop (Part 3 of 16) \ * Main flight loop (Part 16 of 16) \ * Main game loop (Part 5 of 6) \ \ 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) \ * LASLI \ * Main flight loop (Part 3 of 16) \ * Main game loop (Part 5 of 6) \ \ 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 \ This flag is unused in this version of Elite. In the \ other versions, setting HFX to a non-zero value makes \ the hyperspace rings multi-coloured, but the Electron \ version is monochrome, so this has no effect \ \ [Show more]\ \ This variable is used by the following: \ \ * LL164 \ \ 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.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 \ * Main game loop (Part 4 of 6) \ * WARP \ \ 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 flight loop (Part 12 of 16) \ * Main game loop (Part 2 of 6) \ * me1 \ * me2 \ * MESS \ * OUCH \ * 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 \ * OUCH \ * 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.LSO SKIP 86 \ This is the ship line heap for the space station \ (see NWSPS for details) \ \ [Show more]\ \ This variable is used by the following: \ \ * NWSPS \ \ 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 40 \ 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 \ * CIRCLE \ * RES2 \ * WP1 \ * WPLS2 \ * 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 40 \ 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 \ * WPLS2 \ * 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.SYL SKIP NOST + 1 \ This is where we store the y_lo coordinates for all \ the stardust particles \ \ [Show more]\ \ This variable is used by the following: \ \ * PIX1 \ * STARS1 \ * STARS2 \ * STARS6 \ \ 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.SZ SKIP NOST + 1 \ This is where we store the z_hi coordinates for all \ the stardust particles \ \ [Show more]\ \ This variable is used by the following: \ \ * DV42 \ * FLIP \ * nWq \ * STARS1 \ * STARS2 \ * STARS6 \ \ 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.SZL SKIP NOST + 1 \ This is where we store the z_lo coordinates for all \ the stardust particles \ \ [Show more]\ \ This variable is used by the following: \ \ * STARS1 \ * STARS6 \ \ 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 TT26 routine \ \ [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 above.YSAV2 SKIP 1 \ Temporary storage, used for storing the value of the Y \ register in the TT26 routine \ \ [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 above.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: \ \ * DIALS (Part 4 of 4) \ * Main flight loop (Part 13 of 16) \ * OOPS \ * 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 \ \ [Show more]\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ * Main flight loop (Part 13 of 16) \ * OOPS \ \ 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.ENERGY SKIP 1 \ Energy bank status \ \ * 0 = empty \ \ * &FF = full \ \ [Show more]\ \ This variable is used by the following: \ \ * DENGY \ * DIALS (Part 3 of 4) \ * Main flight loop (Part 13 of 16) \ * Main flight loop (Part 15 of 16) \ * OOPS \ * 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.LASX SKIP 1 \ The x-coordinate of the tip of the laser line \ \ [Show more]\ \ This variable is used by the following: \ \ * LASLI \ \ 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.LASY SKIP 1 \ The y-coordinate of the tip of the laser line \ \ [Show more]\ \ This variable is used by the following: \ \ * LASLI \ \ 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.COMX SKIP 1 \ The x-coordinate of the compass dot \ \ [Show more]\ \ This variable is used by the following: \ \ * DOT \ * SP2 \ \ 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.COMY SKIP 1 \ The y-coordinate of the compass dot \ \ [Show more]\ \ This variable is used by the following: \ \ * DOT \ * SP2 \ \ 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.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: \ \ * EQSHP \ * gnum \ * TT151 \ * 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 \ * 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: \ \ * Main flight loop (Part 8 of 16) \ * 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 \ * Main game loop (Part 4 of 6) \ \ 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 \ * SOS1 \ \ 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: \ \ * KS3 \ * 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.XX24 SKIP 1 \ This byte appears to be unused .ALTIT SKIP 1 \ Our altitude above the surface of the planet \ \ * 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 is at (x_hi, y_hi, z_hi), and the radius \ of the planet is 6 \ \ * 0 = we have crashed into the surface \ \ [Show more]\ \ This variable is used by the following: \ \ * DIALS (Part 4 of 4) \ * Main flight loop (Part 15 of 16) \ \ 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: \ \ * Ghy \ * hyp \ * TT111 \ * TT146 \ * TT18 \ \ 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: \ \ * Ghy \ * jmp \ * ping \ * 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: \ \ * Ghy \ * jmp \ * 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 abovePRINT "WP workspace from ", ~WP, "to ", ~P%-1, "inclusive"
[X]
Configuration variable NOSH = 12
The maximum number of ships in our local bubble of universe
[X]
Configuration variable NOST = 10
The number of stardust particles in normal space
[X]
Configuration variable NTY = 11
The number of different ship types
[X]
Configuration variable SST = 7
Ship type for the space station