This page contains a map of all the routines, variables and macros in the NES version of Elite. To make them easier to browse on the web, ROM banks with large source code files have been split into smaller parts, though each bank still produces exactly 16K when assembled. The source files are structured like this:
- The common game code, which contains variable and macro definitions used throughout the code.
- The iNES header, which tells emulators how to configure the ROM cartridge for emulation.
- Bank 7 (part 1, 2, 3, 4), which is the only ROM bank that remains in memory at all times, swapping banks 0 to 6 in and out of memory as required.
- The seven ROM banks that contain most of the game code, and which are swapped in and out of memory by bank 7: bank 0 (part 1, 2, 3, 4, 5), bank 1 (part 1, 2, 3), bank 2 (part 1, 2, 3, 4), bank 3 (part 1, 2), bank 4, bank 5 and bank 6 (part 1, 2, 3).
You can click on the links above to jump to the relevant part of the map.
Common
------
Category | Details |
---|---|
Workspaces | Lots of important variables are stored in the zero page workspace as it is quicker and more space-efficient to access memory here |
Workspaces | Temporary storage space for complex calculations |
Drawing sprites | Workspace: Sprite buffer (Common) Configuration data for sprites 0 to 63, which gets copied to the PPU to update the screen |
Workspaces | Ship slots, variables |
Workspaces | Ship data blocks |
Workspaces | Workspace: Cartridge WRAM (Common) The 8K of battery-backed RAM in the Elite cartridge, which is used for the graphics buffers and storing saved commanders |
PPU | Macro: SETUP_PPU_FOR_ICON_BAR (Common) If the PPU has started drawing the icon bar, configure the PPU to use nametable 0 and pattern table 0 |
Market | Macro definition for the market prices table |
Drawing ships | Macro definition for adding vertices to ship blueprints |
Drawing ships | Macro definition for adding edges to ship blueprints |
Drawing ships | Macro definition for adding faces to ship blueprints |
Text | Macro definition for jump tokens in the extended token table |
Text | Macro definition for characters in the extended token table |
Text | Macro definition for recursive tokens in the extended token table |
Text | Macro definition for two-letter tokens in the extended token table |
Text | Macro definition for random tokens in the extended token table |
Text | Macro definition for standard tokens in the extended token table |
Text | Macro definition for characters in the recursive token table |
Text | Macro definition for two-letter tokens in the token table |
Text | Macro definition for control codes in the recursive token table |
Text | Macro definition for recursive tokens in the recursive token table |
Drawing the screen | Macro: ADD_CYCLES_CLC (Common) Add a specified number to the cycle count |
Drawing the screen | Add a specified number to the cycle count |
Drawing the screen | Macro: SUBTRACT_CYCLES (Common) Subtract a specified number from the cycle count |
Drawing the screen | Fill memory with the specified number of bytes |
Drawing the screen | Macro: SEND_DATA_TO_PPU (Common) Send a specified block of memory to the PPU |
iNES header
-----------
Category | Details |
---|---|
Start and end | Variable: iNES header (iNES header) The iNES header for running in an emulator |
Bank 7 (Part 1 of 4)
--------------------
Category | Details |
---|---|
Start and end | Variable: ResetMMC1_b7 (Bank 7) The MMC1 mapper reset routine at the start of the ROM bank |
Start and end | Run through the NES initialisation process, reset the variables and start the game |
Start and end | Subroutine: ResetToStartScreen (Bank 7) Reset the stack and the game's variables and show the Start screen |
Start and end | Subroutine: ResetVariables (Bank 7) Reset all the RAM (in both the NES and cartridge), initialise all the game's variables, and switch to ROM bank 0 |
Utility routines | Page ROM bank 0 into memory at $8000 |
Utility routines | Subroutine: SetNonZeroBank (Bank 7) An unused routine that pages a specified ROM bank into memory at $8000, but only if it is non-zero |
Utility routines | Subroutine: ResetBank (Bank 7) Retrieve a ROM bank number from the stack and page that bank into memory at $8000 |
Utility routines | Page a specified ROM bank into memory at $8000 |
Start and end | Variable: xTitleScreen (Bank 7) The text column for the title screen's title for each language |
Flight | The text column for the space view name for each language |
Maths (Arithmetic) | Binary logarithm table (high byte) |
Maths (Arithmetic) | Binary logarithm table (low byte) |
Maths (Arithmetic) | Binary antilogarithm table |
Maths (Arithmetic) | Binary antilogarithm table |
Maths (Geometry) | Sine/cosine table |
Maths (Geometry) | Arctan table |
Drawing ships | Ship blueprints lookup table |
PPU | Subroutine: SendBarNamesToPPU (Bank 7) Send the nametable entries for the icon bar to the PPU |
PPU | Subroutine: SendBarPatts2ToPPU (Bank 7) Send pattern data for tiles 64-127 for the icon bar to the PPU, split across multiple calls to the NMI handler if required |
PPU | Subroutine: SendBarPattsToPPU (Bank 7) Send pattern data for tiles 0-127 for the icon bar to the PPU, split across multiple calls to the NMI handler if required |
PPU | Subroutine: SendBarPattsToPPUS (Bank 7) Send the pattern data for the icon bar to the PPU (this is a jump so we can call this routine using a branch instruction) |
PPU | Subroutine: SendBarNamesToPPUS (Bank 7) Send the nametable entries for the icon bar to the PPU (this is a jump so we can call this routine using a branch instruction) |
PPU | Subroutine: ConsiderSendTiles (Bank 7) If there are enough free cycles, move on to the next stage of sending patterns to the PPU |
PPU | Subroutine: SendBuffersToPPU (Part 1 of 3) (Bank 7) Send the icon bar nametable and palette data to the PPU, if it has changed, before moving on to tile data in part 2 |
PPU | Subroutine: SendBuffersToPPU (Part 2 of 3) (Bank 7) If we are already sending tile data to the PPU, pick up where we left off, otherwise jump to part 3 to check for new data to send |
PPU | Subroutine: SendBuffersToPPU (Part 3 of 3) (Bank 7) If we need to send tile nametable and pattern data to the PPU for either bitplane, start doing just that |
PPU | Subroutine: SendTilesToPPU (Bank 7) Set up the variables needed to send the tile nametable and pattern data to the PPU, and then send them |
PPU | Subroutine: SendPatternsToPPU (Part 1 of 6) (Bank 7) Calculate how many patterns we need to send and jump to the most efficient routine for sending them |
PPU | Subroutine: SendPatternsToPPU (Part 2 of 6) (Bank 7) Configure variables for sending data to the PPU one pattern at a time with checks |
PPU | Subroutine: SendPatternsToPPU (Part 3 of 6) (Bank 7) Send pattern data to the PPU for one pattern at a time, checking after each one to see if is the last one |
PPU | Subroutine: SendPatternsToPPU (Part 4 of 6) (Bank 7) Configure variables for sending data to the PPU until we run out of cycles |
PPU | Subroutine: SendPatternsToPPU (Part 5 of 6) (Bank 7) Send pattern data to the PPU for two patterns at a time, until we run out of cycles (and without checking for the last pattern) |
PPU | Subroutine: SendPatternsToPPU (Part 6 of 6) (Bank 7) Save progress for use in the next VBlank and return from the subroutine |
PPU | Subroutine: SendOtherBitplane (Bank 7) Check whether we should send another bitplane to the PPU |
PPU | Subroutine: SendNametableToPPU (Bank 7) Send the tile nametable to the PPU if there are enough cycles left in the current VBlank |
Drawing the screen | Subroutine: CopyNameBuffer0To1 (Bank 7) Copy the contents of nametable buffer 0 to nametable buffer 1 |
Drawing the screen | Subroutine: DrawBoxTop (Bank 7) Draw the top edge of the box along the top of the screen in nametable buffer 0 |
Drawing the screen | Subroutine: DrawBoxEdges (Bank 7) Draw the left and right edges of the box along the sides of the screen, drawing into the nametable buffer for the drawing bitplane |
Universe | Table of pointers to the local universe's ship data blocks |
Universe | Fetch the address of a ship's data block into INF |
Drawing ships | Subroutine: HideExplosionBurst (Bank 7) Hide the four sprites that make up the explosion burst that flashes up when a ship explodes |
Dashboard | Subroutine: ClearScanner (Bank 7) Remove all ships from the scanner and hide the scanner sprites |
Drawing sprites | Subroutine: HideSprites (Bank 7) Hide X sprites from sprite Y / 4 onwards |
Drawing the screen | Variable: nameBufferHiAddr (Bank 7) The high bytes of the addresses of the two nametable buffers |
Drawing the screen | Variable: pattBufferHiAddr (Bank 7) The high bytes of the addresses of the two pattern buffers |
Utility routines | Handle IRQ interrupts by doing nothing |
Utility routines | The NMI interrupt handler that gets called every VBlank and which updates the screen, reads the controllers and plays music |
Utility routines | Subroutine: UpdateNMITimer (Bank 7) Update the NMI timer, which we can use to keep track of time for places like the combat demo |
Drawing sprites | Subroutine: SendPaletteSprites (Bank 7) Send the current palette and sprite data to the PPU |
Drawing the screen | Subroutine: SetPaletteForView (Bank 7) Send palette 0 for the current view to the PPU |
PPU | Subroutine: SendPalettesToPPU (Bank 7) Send the palette data from XX3 to the PPU |
PPU | Subroutine: SendScreenToPPU (Bank 7) Update the screen with the contents of the buffers |
PPU | Subroutine: SetPPURegisters (Bank 7) Set PPU_CTRL, PPU_ADDR and PPU_SCROLL for the current hidden bitplane |
PPU | Subroutine: SetPPUTablesTo0 (Bank 7) Set nametable 0 and pattern table 0 for drawing the icon bar |
Drawing the screen | Subroutine: ClearBuffers (Bank 7) If there are enough free cycles, clear down the nametable and pattern buffers for both bitplanes |
Controllers | Subroutine: ReadControllers (Bank 7) Read the buttons on the controllers and update the control variables |
Controllers | Subroutine: ScanButtons (Bank 7) Scan a specific controller and update the control variables |
Utility routines | Subroutine: WaitForNextNMI (Bank 7) An unused routine that waits until the NMI counter increments (i.e. the next VBlank) |
Utility routines | Subroutine: WaitFor2NMIs (Bank 7) Wait until two NMI interrupts have passed (i.e. the next two VBlanks) |
Utility routines | Subroutine: WaitForNMI (Bank 7) Wait until the next NMI interrupt has passed (i.e. the next VBlank) |
PPU | Subroutine: WaitForIconBarPPU (Bank 7) Wait until the PPU starts drawing the icon bar |
Drawing the screen | Subroutine: ClearDrawingPlane (Part 1 of 3) (Bank 7) Clear the nametable and pattern buffers for the newly flipped drawing plane |
Drawing the screen | Subroutine: ClearDrawingPlane (Part 2 of 3) (Bank 7) Clear the nametable buffers for the newly flipped drawing plane |
Drawing the screen | Subroutine: ClearDrawingPlane (Part 3 of 3) (Bank 7) Clear the pattern buffers for the newly flipped drawing plane |
Drawing the screen | Variable: flagsForClearing (Bank 7) A bitplane mask to control how bitplane buffer clearing works in the ClearPlaneBuffers routine |
Drawing the screen | Subroutine: ClearPlaneBuffers (Part 1 of 2) (Bank 7) Clear the nametable and pattern buffers of data that has already been sent to the PPU, starting with the nametable buffer |
Drawing the screen | Subroutine: ClearPlaneBuffers (Part 2 of 2) (Bank 7) Clear the pattern buffer of data that has already been sent to the PPU for the current bitplane |
Utility routines | Subroutine: FillMemory (Bank 7) Fill a block of memory with a specified value |
Utility routines | Subroutine: FillMemory32Bytes (Bank 7) Fill a 32-byte block of memory with a specified value |
Bank 7 (Part 2 of 4)
--------------------
Category | Details |
---|---|
Utility routines | Subroutine: ClearMemory (Bank 7) Clear a block of memory, split across multiple calls if required |
PPU | Subroutine: WaitForPPUToFinish (Bank 7) Wait until the NMI handler has finished updating both bitplanes, so the screen is no longer refreshing |
Drawing the screen | Subroutine: FlipDrawingPlane (Bank 7) Flip the drawing bitplane |
Drawing the screen | Subroutine: SetDrawingBitplane (Bank 7) Set the drawing bitplane to a specified value |
Drawing the screen | Subroutine: SetPatternBuffer (Bank 7) Set the high byte of the pattern buffer address variables |
Utility routines | Subroutine: CopySmallBlock (Bank 7) An unused routine that copies a small number of pages in memory |
Utility routines | Subroutine: CopyLargeBlock (Bank 7) An unused routine that copies a large number of pages in memory |
Utility routines | Subroutine: WaitFor3xVBlank (Bank 7) Wait for three VBlanks to pass |
Utility routines | Subroutine: WaitForVBlank (Bank 7) Wait for the next VBlank to pass |
Sound | Subroutine: MakeSoundsAtVBlank (Bank 7) Wait for the next VBlank and make the current sounds (music and sound effects) |
Drawing the screen | Subroutine: DrawMessageInNMI (Bank 7) Configure the NMI to send the portion of the screen that contains the in-flight message to the PPU (i.e. tile rows 22 to 24) |
Drawing ships | Subroutine: DrawShipInBitplane (Bank 7) Flip the drawing bitplane and draw the current ship in the newly flipped bitplane |
Drawing the screen | Subroutine: DrawBitplaneInNMI (Bank 7) Configure the NMI to send the drawing bitplane to the PPU after drawing the box edges and setting the next free tile number |
Drawing the screen | Subroutine: SetDrawPlaneFlags (Bank 7) Set the drawing bitplane flags to the specified value, draw the box edges and set the next free tile number |
PPU | Subroutine: SendInventoryToPPU (Bank 7) Send X batches of 16 bytes from SC(1 0) to the PPU, for sending the inventory icon bar image |
Drawing pixels | Ready-made single-pixel character row bytes for the space view |
Drawing pixels | Ready-made double-pixel character row bytes for the space view |
Drawing lines | Ready-made character rows for the left end of a horizontal line in the space view |
Drawing lines | Ready-made character rows for the right end of a horizontal line in the space view |
Drawing pixels | Lookup table for converting pixel y-coordinate to tile number (low byte) |
Drawing pixels | Lookup table for converting pixel y-coordinate to tile number (high byte) |
Drawing the screen | Subroutine: GetRowNameAddress (Bank 7) Get the addresses in the nametable buffers for the start of a given character row |
Drawing lines | Subroutine: LOIN (Part 1 of 7) (Bank 7) Draw a line: Calculate the line gradient in the form of deltas |
Drawing lines | Subroutine: LOIN (Part 2 of 7) (Bank 7) Draw a line: Line has a shallow gradient, step right along x-axis |
Drawing lines | Subroutine: LOIN (Part 3 of 7) (Bank 7) Draw a shallow line going right and up or left and down |
Drawing lines | Subroutine: LOIN (Part 4 of 7) (Bank 7) Draw a shallow line going right and down or left and up |
Drawing lines | Subroutine: LOIN (Part 5 of 7) (Bank 7) Draw a line: Line has a steep gradient, step up along y-axis |
Drawing lines | Subroutine: LOIN (Part 6 of 7) (Bank 7) Draw a steep line going up and left or down and right |
Drawing lines | Subroutine: LOIN (Part 7 of 7) (Bank 7) Draw a steep line going up and right or down and left |
Drawing suns | Subroutine: DrawSunRowOfBlocks (Bank 7) Draw a row of character blocks that contain sunlight, silhouetting any existing content against the sun |
Drawing lines | Subroutine: HLOIN (Part 1 of 5) (Bank 7) Draw a horizontal line from (X1, Y) to (X2, Y) using EOR logic |
Drawing lines | Subroutine: HLOIN (Part 2 of 5) (Bank 7) Draw the left end of the line |
Drawing lines | Subroutine: HLOIN (Part 3 of 5) (Bank 7) Draw the middle part of the line |
Drawing lines | Subroutine: HLOIN (Part 4 of 5) (Bank 7) Draw the right end of the line |
Drawing lines | Subroutine: HLOIN (Part 5 of 5) (Bank 7) Draw the line when it's all within one character block |
Drawing lines | Subroutine: DrawVerticalLine (Part 1 of 3) (Bank 7) Draw a vertical line from (X1, Y1) to (X1, Y2) |
Drawing lines | Subroutine: DrawVerticalLine (Part 2 of 3) (Bank 7) Draw the top end or bottom end of the line |
Drawing lines | Subroutine: DrawVerticalLine (Part 3 of 3) (Bank 7) Draw the middle portion of the line from full-height blocks |
Drawing pixels | Draw a one-pixel dot |
Drawing pixels | Draw a two-pixel dash |
Dashboard | Start up the E.C.M. (start the countdown and make the E.C.M. sound) |
Dashboard | Draw a specific indicator in the dashboard's missile bar |
Dashboard | Variable: missileNames (Bank 7) Tile numbers for the four missile indicators on the dashboard, as offsets from the start of tile row 22 |
Combat demo | Variable: autoPlayKeys1_EN (Bank 7) Auto-play commands for the first part of the auto-play combat demo (combat practice) when English is the chosen language |
Combat demo | Variable: autoPlayKeys1_DE (Bank 7) Auto-play commands for the first part of the auto-play combat demo (combat practice) when German is the chosen language |
Combat demo | Variable: autoPlayKeys1_FR (Bank 7) Auto-play commands for the first part of the auto-play combat demo (combat practice) when French is the chosen language |
Combat demo | Variable: autoPlayKeys2 (Bank 7) Auto-play commands for the second part of the auto-play demo (demonstrating the game itself) |
Combat demo | Subroutine: AutoPlayDemo (Bank 7) Automatically play the demo using the auto-play commands from the autoplayKeys tables |
Icon bar | Subroutine: HideIconBarPointer (Bank 7) Clear the icon bar choice and hide the icon bar pointer |
Icon bar | Subroutine: SetIconBarPointer (Bank 7) Set the icon bar pointer to a specific position |
Icon bar | Subroutine: MoveIconBarPointer (Bank 7) Move the sprites that make up the icon bar pointer and record any choices |
Controllers | Subroutine: SetControllerPast (Bank 7) Set the controller history variables to the values from four VBlanks ago |
Controllers | Subroutine: UpdateJoystick (Bank 7) Update the values of JSTX and JSTY with the values from the controller |
Controllers | Subroutine: IncreaseJoystick (Bank 7) Increase a joystick value by a specific amount, jumping straight to the indicator centre if we increase from the left-hand side |
Controllers | Subroutine: DecreaseJoystick (Bank 7) Decrease a joystick value by a specific amount, jumping straight to the indicator centre if we decrease from the right-hand side |
Icon bar | Variable: iconBarButtons (Bank 7) A list of button numbers for each icon bar type |
Stardust | Subroutine: HideStardust (Bank 7) Hide the stardust sprites |
Drawing sprites | Subroutine: HideMoreSprites (Bank 7) Hide X + 1 sprites from sprite Y / 4 onwards |
Drawing sprites | Subroutine: SetScreenForUpdate (Bank 7) Get the screen ready for updating by hiding all sprites, after fading the screen to black if we are changing view |
Drawing sprites | Subroutine: FadeAndHideSprites (Bank 7) Fade the screen to black and hide all sprites |
Drawing sprites | Subroutine: HideMostSprites (Bank 7) Hide all sprites except for sprite 0 and the icon bar pointer |
Utility routines | Wait until a specified number of NMI interrupts have passed (i.e. a specified number of VBlanks) |
Sound | Make a short, high beep |
Sound | Make an explosion sound |
Sound | Subroutine: FlushSoundChannels (Bank 7) Flush the SQ1, SQ2 and NOISE sound channels |
Sound | Subroutine: FlushSQ2AndNOISE (Bank 7) Flush the SQ2 and NOISE sound channels |
Sound | Subroutine: FlushSpecificSound (Bank 7) Flush the channels used by a specific sound |
Sound | Subroutine: FlushSoundChannel (Bank 7) Flush a specific sound channel |
Sound | Make a long, low beep |
Sound | Subroutine: MakeScoopSound (Bank 7) Make the sound of the fuel scoops working |
Sound | Subroutine: MakeHyperSound (Bank 7) Make the hyperspace sound |
Sound | Make the sound effect whose number is in Y |
Sound | Subroutine: StartEffect_b7 (Bank 7) Call the StartEffect routine |
Sound | Variable: soundChannel (Bank 7) The sound channels used by each sound effect |
Sound | Variable: soundPriority (Bank 7) The default priority for each sound effect |
PPU | Subroutine: SetupPPUForIconBar (Bank 7) If the PPU has started drawing the icon bar, configure the PPU to use nametable 0 and pattern table 0, while preserving A |
Drawing ships | Subroutine: GetShipBlueprint (Bank 7) Fetch a specified byte from the current ship blueprint |
Utility routines | Subroutine: ResetBankA (Bank 7) Page a specified bank into memory at $8000 while preserving the value of A |
Drawing ships | Subroutine: GetDefaultNEWB (Bank 7) Fetch the default NEWB flags for a specified ship type |
Status | Subroutine: IncreaseTally (Bank 7) Add the kill count to the fractional and low bytes of our combat rank tally following a kill |
Utility routines | Subroutine: ResetBankP (Bank 7) Page a specified bank into memory at $8000 while preserving the value of A and the processor flags |
Icon bar | Subroutine: CheckPauseButton (Bank 7) Check whether the pause button has been pressed or an icon bar button has been chosen, and process pause/unpause if required |
Icon bar | Subroutine: CheckForPause_b0 (Bank 7) Call the CheckForPause routine in ROM bank 0 |
Icon bar | Subroutine: DrawInventoryIcon (Bank 7) Draw the inventory icon on top of the second button in the icon bar |
Sound | Subroutine: MakeSounds_b6 (Bank 7) Call the MakeSounds routine in ROM bank 6 |
Sound | Subroutine: ChooseMusic_b6 (Bank 7) Call the ChooseMusic routine in ROM bank 6 |
Sound | Subroutine: StartEffect_b6 (Bank 7) Call the StartEffect routine in ROM bank 6 |
Sound | Subroutine: ResetMusicAfterNMI (Bank 7) Wait for the next NMI before resetting the current tune to 0 and stopping the music |
Sound | Subroutine: ResetMusic (Bank 7) Reset the current tune to the default and stop all sounds (music and sound effects) |
Sound | Subroutine: StopSounds_b6 (Bank 7) Call the StopSounds routine in ROM bank 6 |
Combat demo | Subroutine: SetDemoAutoPlay_b5 (Bank 7) Call the SetDemoAutoPlay routine in ROM bank 5 |
Save and load | Subroutine: DrawSmallLogo_b4 (Bank 7) Call the DrawSmallLogo routine in ROM bank 4 |
Start and end | Subroutine: DrawBigLogo_b4 (Bank 7) Call the DrawBigLogo routine in ROM bank 4 |
Drawing the screen | Subroutine: FadeToBlack_b3 (Bank 7) Call the FadeToBlack routine in ROM bank 3 |
Save and load | Subroutine: CheckSaveSlots_b6 (Bank 7) Call the CheckSaveSlots routine in ROM bank 6 |
Drawing ships | Call the LL9 routine in ROM bank 1 |
Flight | Call the SIGHT routine in ROM bank 3 |
Maths (Geometry) | Call the TIDY routine in ROM bank 1 |
Start and end | Subroutine: ChooseLanguage_b6 (Bank 7) Call the ChooseLanguage routine in ROM bank 6 |
Combat demo | Subroutine: PlayDemo_b0 (Bank 7) Call the PlayDemo routine in ROM bank 0 |
Stardust | Call the STARS routine in ROM bank 1 |
Drawing circles | Subroutine: CIRCLE2_b1 (Bank 7) Call the CIRCLE2 routine in ROM bank 1 |
Drawing suns | Call the SUN routine in ROM bank 1 |
Drawing the screen | Subroutine: DrawBackground_b3 (Bank 7) Call the DrawBackground routine in ROM bank 3 |
Universe | Subroutine: DrawSystemImage_b3 (Bank 7) Call the DrawSystemImage routine in ROM bank 3 |
Drawing the screen | Subroutine: DrawImageNames_b4 (Bank 7) Call the DrawImageNames routine in ROM bank 4 |
Status | Subroutine: DrawCmdrImage_b6 (Bank 7) Call the DrawCmdrImage routine in ROM bank 6 |
Drawing sprites | Subroutine: DrawSpriteImage_b6 (Bank 7) Call the DrawSpriteImage routine in ROM bank 6 |
Status | Subroutine: GetHeadshotType_b4 (Bank 7) Call the GetHeadshotType routine in ROM bank 4 |
Equipment | Subroutine: DrawEquipment_b6 (Bank 7) Call the DrawEquipment routine in ROM bank 6 |
Start and end | Subroutine: DEATH2_b0 (Bank 7) Switch to ROM bank 0 and call the DEATH2 routine |
Start and end | Subroutine: StartGame_b0 (Bank 7) Switch to ROM bank 0 and call the StartGame routine |
Drawing the screen | Subroutine: SetViewAttrs_b3 (Bank 7) Call the SetViewAttrs routine in ROM bank 3 |
Drawing the screen | Subroutine: FadeToColour_b3 (Bank 7) Call the FadeToColour routine in ROM bank 3 |
Drawing the screen | Subroutine: DrawSmallBox_b3 (Bank 7) Call the DrawSmallBox routine in ROM bank 3 |
Drawing the screen | Subroutine: DrawImageFrame_b3 (Bank 7) Call the DrawImageFrame routine in ROM bank 3 |
Flight | Subroutine: DrawLaunchBox_b6 (Bank 7) Call the DrawLaunchBox routine in ROM bank 6 |
Drawing the screen | Subroutine: SetLinePatterns_b3 (Bank 7) Call the SetLinePatterns routine in ROM bank 3 |
Universe | Call the TT24 routine in ROM bank 6 |
Drawing the screen | Subroutine: ClearDashEdge_b6 (Bank 7) Call the ClearDashEdge routine in ROM bank 6 |
Text | Subroutine: LoadNormalFont_b3 (Bank 7) Call the LoadNormalFont routine in ROM bank 3 |
Text | Subroutine: LoadHighFont_b3 (Bank 7) Call the LoadHighFont routine in ROM bank 3 |
Missions | Call the PAS1 routine in ROM bank 0 |
Universe | Subroutine: GetSystemImage_b5 (Bank 7) Call the GetSystemImage routine in ROM bank 5 |
Universe | Subroutine: GetSystemBack_b5 (Bank 7) Call the GetSystemBack routine in ROM bank 5 |
Status | Subroutine: GetCmdrImage_b4 (Bank 7) Call the GetCmdrImage routine in ROM bank 4 |
Status | Subroutine: GetHeadshot_b4 (Bank 7) Call the GetHeadshot routine in ROM bank 4 |
Dashboard | Call the DIALS routine in ROM bank 6 |
Controllers | Subroutine: InputName_b6 (Bank 7) Call the InputName routine in ROM bank 6 |
Drawing the screen | Subroutine: ChangeToView_b0 (Bank 7) Call the ChangeToView routine in ROM bank 0 |
Flight | Call the LL164 routine in ROM bank 6 |
Flight | Subroutine: DrawLightning_b6 (Bank 7) Call the DrawLightning routine in ROM bank 6 |
Icon bar | Subroutine: PauseGame_b6 (Bank 7) Call the PauseGame routine in ROM bank 6 |
Controllers | Subroutine: SetKeyLogger_b6 (Bank 7) Call the SetKeyLogger routine in ROM bank 6 |
Save and load | Subroutine: ChangeCmdrName_b6 (Bank 7) Call the ChangeCmdrName routine in ROM bank 6 |
Save and load | Subroutine: ResetCommander_b6 (Bank 7) Call the ResetCommander routine in ROM bank 6 |
Save and load | Subroutine: JAMESON_b6 (Bank 7) Call the JAMESON routine in ROM bank 6 |
Combat demo | Subroutine: ShowScrollText_b6 (Bank 7) Call the ShowScrollText routine in ROM bank 6 |
Sound | Call the BEEP routine in ROM bank 7 |
Text | Call the DETOK routine in ROM bank 2 |
Text | Call the DTS routine in ROM bank 2 |
Text | Call the PDESC routine in ROM bank 2 |
Icon bar | Subroutine: SetupIconBar_b3 (Bank 7) Call the SetupIconBar routine in ROM bank 3 |
Icon bar | Subroutine: ShowIconBar_b3 (Bank 7) Call the ShowIconBar routine in ROM bank 3 |
Dashboard | Subroutine: DrawDashNames_b3 (Bank 7) Call the DrawDashNames routine in ROM bank 3 |
Dashboard | Subroutine: ResetScanner_b3 (Bank 7) Call the ResetScanner routine in ROM bank 3 |
Start and end | Subroutine: ResetScreen_b3 (Bank 7) Call the ResetScreen routine in ROM bank 3 |
PPU | Subroutine: UpdateScreen (Bank 7) Update the screen by sending data to the PPU, either immediately or during VBlank, depending on whether the screen is visible |
PPU | Subroutine: SendViewToPPU_b3 (Bank 7) Call the SendViewToPPU routine in ROM bank 3 |
Bank 7 (Part 4 of 4)
--------------------
Category | Details |
---|---|
Drawing the screen | Subroutine: SetupFullViewInNMI (Bank 7) Configure the PPU to send tiles for the full screen during VBlank |
Drawing the screen | Subroutine: SetupViewInNMI_b3 (Bank 7) Call the SetupViewInNMI routine in ROM bank 3 |
PPU | Subroutine: SendBitplaneToPPU_b3 (Bank 7) Call the SendBitplaneToPPU routine in ROM bank 3 |
Icon bar | Subroutine: UpdateIconBar_b3 (Bank 7) Call the UpdateIconBar routine in ROM bank 3 |
Drawing the screen | Subroutine: DrawScreenInNMI_b0 (Bank 7) Call the DrawScreenInNMI routine in ROM bank 0 |
Save and load | Call the SVE routine in ROM bank 6 |
Moving | Call the MVS5 routine in ROM bank 0 |
Ship hangar | Call the HALL routine in ROM bank 1 |
Text | Call the CHPR routine in ROM bank 2 |
Text | Call the DASC routine in ROM bank 2 |
Text | Call the TT27 routine in ROM bank 2 |
Text | Call the ex routine in ROM bank 2 |
Text | Subroutine: PrintCtrlCode_b0 (Bank 7) Call the PrintCtrlCode routine in ROM bank 0 |
Start and end | Subroutine: SetupAfterLoad_b0 (Bank 7) Call the SetupAfterLoad routine in ROM bank 0 |
Dashboard | Subroutine: HideShip_b1 (Bank 7) Update the current ship so it is no longer shown on the scanner |
Dashboard | Subroutine: HideFromScanner_b1 (Bank 7) Call the HideFromScanner routine in ROM bank 1 |
Drawing the screen | Call the TT66 routine in ROM bank 0 |
Drawing lines | Call the CLIP routine in ROM bank 1, drawing the clipped line if it fits on-screen |
Drawing the screen | Subroutine: ClearScreen_b3 (Bank 7) Call the ClearScreen routine in ROM bank 3 |
Dashboard | Call the SCAN routine in ROM bank 1 |
Drawing the screen | Subroutine: UpdateViewWithFade (Bank 7) Fade the screen to black, if required, hide all sprites and update the view |
Drawing the screen | Subroutine: UpdateView_b0 (Bank 7) Call the UpdateView routine in ROM bank 0 |
PPU | Subroutine: UpdateHangarView (Bank 7) Update the hangar view on-screen by sending the data to the PPU, either immediately or during VBlank |
Drawing the screen | Clear the bottom two text rows of the visible screen |
Status | Variable: alertColours (Bank 7) Colours for the background of the commander image to show the status condition when we are not looking at the space view |
Status | Subroutine: GetStatusCondition (Bank 7) Calculate our ship's status condition |
Combat demo | Subroutine: SetupDemoUniverse (Bank 7) Initialise the local bubble of universe for the demo |
Combat demo | Subroutine: FixRandomNumbers (Bank 7) Fix the random number seeds to a known value so the random numbers generated are always the same when we run the demo |
Start and end | Subroutine: ResetOptions (Bank 7) Reset the game options to their default values |
Start and end | Subroutine: DrawTitleScreen (Bank 7) Draw a sequence of rotating ships on-screen while checking for button presses on the controllers |
Start and end | Variable: titleShipType (Bank 7) The types of ship to show rotating on the title screen |
Start and end | Variable: titleShipDist (Bank 7) The distances at which to show the rotating title screen ships |
Universe | Initialise the INWK workspace to a hostile ship |
Save and load | Subroutine: UpdateSaveCount (Bank 7) Update the save counter for the current commander |
Drawing lines | Print a title and draw a screen-wide horizontal line on tile row 2 to box it in |
Drawing lines | Draw a horizontal line on tile row 2 to box in a title |
Drawing lines | Draw a horizontal line on tile row 2 to box in a title |
Drawing the screen | Subroutine: SetDrawingPlaneTo0 (Bank 7) Set the drawing bitplane to 0 |
Drawing the screen | Subroutine: ResetBuffers (Bank 7) Reset the pattern and nametable buffers |
Maths (Arithmetic) | Generate random numbers |
Maths (Geometry) | Project the current ship or planet onto the screen |
Drawing planets | Calculate (X K) = (A P+1 P) / (z_sign z_hi z_lo) |
Utility routines | Subroutine: UnpackToRAM (Bank 7) Unpack compressed image data to RAM |
Utility routines | Subroutine: UnpackToPPU (Bank 7) Unpack compressed image data and send it to the PPU |
Maths (Geometry) | Compare x_hi, y_hi and z_hi with A |
Maths (Arithmetic) | Set K(3 2 1 0) = (A A A A) and clear the C flag |
Maths (Arithmetic) | Calculate K(3 2 1 0) = (A P+1 P) * Q |
Maths (Arithmetic) | Calculate (S R) = XX(1 0) and (A P) = A * ALP1 |
Maths (Arithmetic) | Calculate (A P) = ALP1 * A |
Maths (Arithmetic) | Set P(1 0) = (A A) |
Maths (Arithmetic) | Clear bit 7 of A and calculate (A P) = A * A |
Maths (Arithmetic) | Calculate (A P) = A * A |
Maths (Arithmetic) | Copy X into P and A, and clear the C flag |
Maths (Arithmetic) | Calculate Y1 = y_hi and (A P) = |y_hi| * Q for Y-th stardust |
Maths (Arithmetic) | Calculate (A P) = |A| * Q |
Maths (Arithmetic) | Calculate (A P) = P * Q |
Maths (Arithmetic) | Calculate (A P) = P * X |
Maths (Arithmetic) | Calculate A = K * sin(A) |
Maths (Arithmetic) | Calculate A = A * Q / 256 |
Maths (Arithmetic) | Calculate (A P+1 P) = (A ~P) * Q |
Maths (Arithmetic) | An unused routine that does the same as MUT2 |
Maths (Arithmetic) | Calculate (S R) = XX(1 0) and (A P) = Q * A |
Maths (Arithmetic) | Calculate R = XX and (A P) = Q * A |
Maths (Arithmetic) | Calculate (A P) = Q * A |
Maths (Arithmetic) | Calculate (S R) = Q * A |
Maths (Geometry) | Calculate the dot product of XX15 and an orientation vector |
Maths (Arithmetic) | Calculate (A X) = Q * A + (S R) |
Maths (Arithmetic) | Calculate (A X) = (A P) + (S R) |
Maths (Arithmetic) | Calculate (A ?) = (-X * A + (S R)) / 96 |
Maths (Arithmetic) | Calculate (P R) = 256 * DELTA / z_hi |
Maths (Arithmetic) | Calculate (P R) = 256 * DELTA / A |
Maths (Arithmetic) | Calculate (P R) = 256 * A / Q |
Maths (Arithmetic) | Calculate K(3 2 1 0) = (A P+1 P) / (z_sign z_hi z_lo) |
Dashboard | Apply damping to the pitch or roll dashboard indicator |
Dashboard | Bump up the value of the pitch or roll dashboard indicator |
Dashboard | Reduce the value of the pitch or roll dashboard indicator |
Maths (Arithmetic) | Calculate Q = SQRT(R Q) |
Maths (Arithmetic) | Calculate R = 256 * A / Q |
Maths (Arithmetic) | Calculate A = A / Q |
Maths (Geometry) | Normalise the three-coordinate vector in XX15 |
Utility routines | Subroutine: SetupMMC1 (Bank 7) Configure the MMC1 mapper and page ROM bank 0 into memory at $8000 |
Drawing lines | Image data for the horizontal line, vertical line and block images |
Text | Image data for the text font |
Utility routines | Vectors at the end of ROM bank 7 |
Bank 0 (Part 1 of 5)
--------------------
Category | Details |
---|---|
Start and end | Subroutine: ResetMMC1_b0 (Bank 0) The MMC1 mapper reset routine at the start of the ROM bank |
Start and end | Subroutine: Interrupts_b0 (Bank 0) The IRQ and NMI handler while the MMC1 mapper reset routine is still running |
Text | Variable: versionNumber_b0 (Bank 0) The game's version number in bank 0 |
Flight | Subroutine: ResetShipStatus (Bank 0) Reset the ship's speed, hyperspace counter, laser temperature, shields and energy banks |
Flight | Dock at the space station, show the ship hangar and work out any mission progression |
Main loop | Subroutine: Main flight loop (Part 4 of 16) (Bank 0) For each nearby ship: Copy the ship's data block from K% to the zero-page workspace at INWK |
Main loop | Subroutine: Main flight loop (Part 5 of 16) (Bank 0) For each nearby ship: If an energy bomb has been set off, potentially kill this ship |
Main loop | Subroutine: Main flight loop (Part 6 of 16) (Bank 0) For each nearby ship: Move the ship in space and copy the updated INWK data block back to K% |
Main loop | Subroutine: Main flight loop (Part 7 of 16) (Bank 0) For each nearby ship: Check whether we are docking, scooping or colliding with it |
Main loop | Subroutine: Main flight loop (Part 8 of 16) (Bank 0) For each nearby ship: Process us potentially scooping this item |
Main loop | Subroutine: Main flight loop (Part 9 of 16) (Bank 0) For each nearby ship: If it is a space station, check whether we are successfully docking with it |
Main loop | Subroutine: Main flight loop (Part 10 of 16) (Bank 0) For each nearby ship: Remove if scooped, or process collisions |
Main loop | Subroutine: Main flight loop (Part 11 of 16) (Bank 0) For each nearby ship: Process missile lock and firing our laser |
Main loop | Subroutine: Main flight loop (Part 12 of 16) (Bank 0) For each nearby ship: Draw the ship, remove if killed, loop back |
Main loop | Subroutine: FlightLoop4To16 (Bank 0) Display in-flight messages, call parts 4 to 12 of the main flight loop for each slot, and fall through into parts 13 to 16 |
Main loop | Subroutine: Main flight loop (Part 13 of 16) (Bank 0) Show energy bomb effect, charge shields and energy banks |
Main loop | Subroutine: Main flight loop (Part 14 of 16) (Bank 0) Spawn a space station if we are close enough to the planet |
Main loop | Subroutine: Main flight loop (Part 15 of 16) (Bank 0) Perform altitude checks with the planet and sun and process fuel scooping if appropriate |
Main loop | Subroutine: Main flight loop (Part 16 of 16) (Bank 0) Call stardust routine |
Flight | Subroutine: ChargeShields (Bank 0) Charge the shields and energy banks |
Flight | Subroutine: CheckAltitude (Bank 0) Perform an altitude check with the planet, ending the game if we hit the ground |
Main loop | Subroutine: Main flight loop (Part 1 of 16) (Bank 0) Seed the random number generator |
Main loop | Subroutine: Main flight loop (Part 2 of 16) (Bank 0) Calculate the alpha and beta angles from the current pitch and roll of our ship |
Main loop | Subroutine: Main flight loop (Part 3 of 16) (Bank 0) Scan for flight keys and process the results |
Drawing the screen | Subroutine: DrawSpaceViewInNMI (Bank 0) Configure the NMI handler to draw the space view |
Universe | Randomly spawn cargo from a destroyed ship |
Drawing the screen | Subroutine: HideHiddenColour (Bank 0) Set the hidden colour to black, so that pixels in this colour in palette 0 are invisible |
Drawing ships | Ship colours on the scanner |
Utility routines | Subroutine: SetAXTo15 (Bank 0) An unused routine that sets A and X to 15 |
Status | Subroutine: PrintCombatRank (Bank 0) Print the current combat rank |
Status | Subroutine: PrintLegalStatus (Bank 0) Print the current legal status (clean, offender or fugitive) |
Status | Show the Status Mode screen |
Drawing the screen | Subroutine: UpdateView (Bank 0) Update the view |
Status | The text row for the headshot on the Status Mode page |
Drawing the screen | Subroutine: DrawScreenInNMI (Bank 0) Configure the NMI handler to draw the screen |
Text | Subroutine: PrintTokenCrTab (Bank 0) Print a token, a newline and the correct indent for Status Mode entries in the chosen language |
Text | Subroutine: PrintCrTab (Bank 0) Print a newline and the correct indent for Status Mode entries in the chosen language |
Status | Variable: xStatusMode (Bank 0) The text column for the Status Mode entries for each language |
Moving | Calculate K(3 2 1) = (x_sign x_hi x_lo) + K(3 2 1) |
Moving | Apply a 3.6 degree pitch or roll to an orientation vector |
Text | A constant used when printing large numbers in BPRNT |
Text | Print an 8-bit number, left-padded to 3 digits, and optional point |
Text | Print a 16-bit number, left-padded to n digits, and optional point |
Text | Print a 32-bit number, left-padded to a specific number of digits, with an optional decimal point |
Dashboard | Subroutine: DrawPitchRollBars (Bank 0) Update the pitch and roll bars on the dashboard |
Flight | Launch our escape pod |
Charts | Search the galaxy for a system |
Bank 0 (Part 2 of 5)
--------------------
Category | Details |
---|---|
Tactics | Subroutine: TACTICS (Part 1 of 7) (Bank 0) Apply tactics: Process missiles, both enemy missiles and our own |
Tactics | Subroutine: TACTICS (Part 2 of 7) (Bank 0) Apply tactics: Escape pod, station, lone Thargon, safe-zone pirate |
Tactics | Subroutine: TACTICS (Part 3 of 7) (Bank 0) Apply tactics: Calculate dot product to determine ship's aim |
Tactics | Subroutine: TACTICS (Part 4 of 7) (Bank 0) Apply tactics: Check energy levels, maybe launch escape pod if low |
Tactics | Subroutine: TACTICS (Part 5 of 7) (Bank 0) Apply tactics: Consider whether to launch a missile at us |
Tactics | Subroutine: TACTICS (Part 6 of 7) (Bank 0) Apply tactics: Consider firing a laser at us, if aim is true |
Tactics | Subroutine: TACTICS (Part 7 of 7) (Bank 0) Apply tactics: Set pitch, roll, and acceleration |
Flight | Apply docking manoeuvres to the ship in INWK |
Maths (Arithmetic) | Calculate vector K3(8 0) = [x y z] - coordinates of the sun or space station |
Maths (Arithmetic) | Calculate vector K3(8 0) = [x y z] - coordinates in (A V) |
Maths (Arithmetic) | Calculate K3 = (x_sign x_hi x_lo) - V(1 0) |
Maths (Geometry) | Calculate the dot product of XX15 and one of the space station's orientation vectors |
Maths (Geometry) | Negate the vector in XX15 so it points in the opposite direction |
Flight | Calculate the vector from the ideal docking position to the ship |
Tactics | Work out if the ship in INWK is in our crosshairs |
Tactics | Launch a ship straight ahead of us, below the laser sights |
Tactics | Fire a missile from our ship |
Tactics | Make a ship hostile |
Tactics | Display the "missile jammed" message |
Flight | Spawn an escape pod from the current (parent) ship |
Universe | Spawn a child ship from the current (parent) ship |
Moving | Move a ship in space along one of the coordinate axes |
Flight | Make the launch sound and draw the launch tunnel |
Drawing lines | Draw the laser lines for when we fire our lasers |
Missions | Start mission 2 |
Missions | Print an extended token and show the Status Mode screen |
Missions | Receive the briefing and plans for mission 2 |
Missions | Finish mission 2 |
Missions | Finish mission 1 |
Missions | Start mission 3 |
Missions | Start mission 1 and show the mission briefing |
Missions | Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds |
Universe | Set the selected system to the current system |
Combat demo | Play the combat demo |
Combat demo | Subroutine: RunDemoFlightLoop (Bank 0) Run a fixed number of iterations of the main flight loop for the combat demo |
Combat demo | Subroutine: SetupDemoShip (Bank 0) Set up the ship workspace for a new ship in the combat demo |
Market | Work out if we have space for one tonne of cargo |
Market | Work out if we have space for a specific amount of cargo |
Drawing the screen | Subroutine: SetNewViewType (Bank 0) Clear the screen, set the current view type and move the cursor to row 0 |
Universe | Twist the selected system's seeds four times |
Universe | Twist the selected system's seeds |
Universe | Print the distance to the selected system in light years |
Text | Print a text token and a paragraph break |
Text | Print a paragraph break |
Text | Set Sentence Case and print a newline |
Text | Print a newline |
Universe | Display "MAINLY " and jump to TT72 |
Text | Print a text token followed by a space |
Text | Subroutine: PrintSpaceAndToken (Bank 0) Print a space followed by a text token |
Universe | Variable: xDataOnSystem (Bank 0) The text column for the Data on System title for each language |
Text | Subroutine: PrintTokenAndColon (Bank 0) Print a character followed by a colon, ensuring that the colon is always drawn in colour 3 on a black background |
Universe | The text string "RADIUS" for use in the Data on System screen |
Universe | Show the Data on System screen |
Charts | Show the Long-range Chart |
Drawing lines | Draw a set of crosshairs |
Bank 0 (Part 3 of 5)
--------------------
Category | Details |
---|---|
Drawing circles | Draw a circle with crosshairs on a chart |
Drawing circles | Draw a circle on a chart |
Market | Show a list of current cargo in our hold, optionally to sell |
Market | Show the Inventory screen |
Text | Subroutine: PrintCharacter (Bank 0) An unused routine that prints a character and sets the C flag |
Charts | Move the crosshairs on a chart |
Charts | Draw a small set of crosshairs on a chart |
Charts | Move galactic coordinates by a signed delta |
Charts | Draw crosshairs on the Short-range Chart, with clipping |
Charts | Subroutine: DrawCrosshairs (Bank 0) Draw a set of moveable crosshairs as a square reticle |
Charts | Subroutine: HideCrosshairs (Bank 0) Hide the moveable crosshairs (i.e. the square reticle) |
Charts | Variable: xShortRange (Bank 0) The text column for the Short-range Chart title for each language |
Charts | Show the Short-range Chart |
Charts | Subroutine: DrawChartSystem (Bank 0) Draw system blobs on short-range chart |
Universe | Set the selected system's seeds to those of system 0 |
Universe | Subroutine: SelectNearbySystem (Bank 0) Set the current system to the nearest system and update the selected system flags accordingly |
Universe | Subroutine: SetSelectedSystem (Bank 0) Set the selected system to the nearest system, if we don't already have a selected system |
Universe | Subroutine: SetSelectionFlags (Bank 0) Set the selected system flags for the currently selected system and update the icon bar if required |
Universe | Subroutine: SetCurrentSystem (Bank 0) Set the seeds for the selected system to the system that we last snapped the crosshairs to |
Universe | Set the current system to the nearest system to a point |
Flight | Print a message to say there is no hyperspacing allowed inside the station |
Flight | Subroutine: GalacticHyperdrive (Bank 0) If we are in space and the countdown has ended, activate the galactic hyperdrive |
Flight | Start the hyperspace process |
Flight | Start a hyperspace countdown |
Flight | Perform a galactic hyperspace jump |
Universe | Set the current system to the selected system |
Text | Print 16-bit number, left-padded to 5 digits, no point |
Text | Print a 16-bit number, left-padded to 5 digits, and optional point |
Flight | Print an error when a system is out of hyperspace range |
Text | Print a text token followed by a question mark |
Market | Print the name, price and availability of a market item |
Text | Subroutine: PrintSpacedHyphen (Bank 0) Print two spaces, then a "-", and then another two spaces |
Market | Print the unit ("t", "kg" or "g") for a market item |
Text | Print a space |
Market | Print "t" (for tonne) and a space |
Market | Print "kg" (for kilograms) |
Market | Print "g" (for grams) |
Market | Print the headers for the table of market prices |
Market | Subroutine: PrintNumberInHold (Bank 0) Print the number of units of a specified item that we have in the hold |
Market | Variable: yMarketPrice (Bank 0) The text row for the Market Price title for each language |
Market | Show the Market Price screen |
Market | Subroutine: BuyAndSellCargo (Bank 0) Process the buying and selling of cargo on the Market Price screen |
Market | Subroutine: HighlightSaleItem (Bank 0) Highlight the name, price and availability of a market item on the correct row for the chosen language |
Market | Subroutine: PrintMarketItem (Bank 0) Print the name, price and availability of a market item on the correct row for the chosen language |
Market | Subroutine: PrintCash (Bank 0) Print our cash levels in the correct place for the chosen language |
Market | The text column for our cash levels on the Market Price page |
Market | The text row for the cash levels on the Market Price page |
Market | Calculate QQ19+3 = economy * |economic_factor| |
Universe | Process a jump to the system closest to (QQ9, QQ10) |
Universe | Calculate the availability of market items |
Universe | Spawn a Thargoid ship and a Thargon companion |
Flight | Process a mis-jump into witchspace |
Flight | Try to initiate a jump into hyperspace |
Drawing the screen | Subroutine: RedrawCurrentView (Bank 0) Update the current view when we arrive in a new system |
Flight | Launch from a station or show the front space view |
Charts | Display either the Long-range or Short-range Chart |
Maths (Arithmetic) | Subtract an amount of cash from the cash pot |
Maths (Arithmetic) | Add an amount of cash to the cash pot |
Maths (Arithmetic) | Calculate (Y X) = (A P) * 4 |
Start and end | Subroutine: SetupAfterLoad (Bank 0) Configure the game following a commander file load |
Equipment | Subroutine: DrawCobraMkIII (Bank 0) Draw the Cobra Mk III on the Equip Ship screen |
Equipment | Subroutine: HighlightEquipment (Bank 0) Highlight an item of equipment on the Equip Ship screen |
Equipment | Subroutine: PrintEquipment (Bank 0) Print the name and price for a specified item of equipment |
Equipment | Subroutine: MoveEquipmentUp (Bank 0) Move the currently selected item up the list of equipment |
Equipment | Subroutine: UpdateEquipment (Bank 0) Highlight the newly chosen item of equipment, update the Cobra Mk III, redraw the screen and rejoin the main EQSHP routine |
Equipment | Subroutine: MoveEquipmentDown (Bank 0) Move the currently selected item down the list of equipment |
Equipment | The text column for the Equip Ship title for each language |
Equipment | Show the Equip Ship screen |
Market | Print the amount of money we have left in the cash pot |
Equipment | Subtract the price of equipment from the cash pot |
Equipment | Return the price of a piece of equipment |
Bank 0 (Part 4 of 5)
--------------------
Category | Details |
---|---|
Equipment | Subroutine: PrintLaserView (Bank 0) Print the name of a laser view in the laser-buying popup, filled to the right by the correct number of spaces to fill the popup |
Equipment | The text column of the right edge of the laser-buying popup, so the popup gets filled with spaces and covers what's underneath it |
Equipment | Subroutine: HighlightLaserView (Bank 0) Highlight the laser view name in the popup menu |
Equipment | The width of the popup that shows the views available for installing lasers in the Equipment screen |
Equipment | Print a popup menu of the four space views, for buying lasers |
Equipment | Install a new laser, processing a refund if applicable |
Equipment | Equipment prices |
Universe | Subroutine: SetSelectedSeeds (Bank 0) Set the seeds for the selected system in QQ15 to the seeds in the safehouse |
Universe | Print the selected system name |
Status | Print the commander's name |
Universe | Print the current system name |
Universe | Print the current galaxy number |
Status | Print fuel and cash levels |
Text | Subroutine: Print4Spaces (Bank 0) An unused routine that prints four spaces |
Text | Subroutine: Print2Spaces (Bank 0) Print two spaces |
Text | Print the current system name |
Status | Print the current amount of cash |
Text | Print a text token followed by a newline |
Text | Print a text token followed by a colon |
Text | Print a colon |
Text | Print the current galaxy number |
Text | Subroutine: PrintCtrlCode (Bank 0) Print a control code (in the range 0 to 9) |
Text | Print fuel and cash levels |
Universe | Update the missile indicators, set up the planet data block |
Universe | Set up various aspects of arriving in a new system |
Stardust | Initialise the stardust field |
Stardust | Create a random cloud of stardust |
Dashboard | Set all ships to be hidden from the screen |
Flight | Charge a shield and drain some energy from the energy banks |
Flight | Drain some energy from the energy banks |
Dashboard | Update the compass |
Dashboard | Draw the space station on the compass |
Dashboard | Draw a dot on the compass, given the planet/station vector |
Maths (Geometry) | Calculate the vector to the space station |
Flight | Take some damage |
Universe | Add a new space station to our local bubble of universe |
Universe | Add a new ship to our local bubble of universe |
Universe | Flip the sign and double an INWK byte |
Universe | Remove the current ship from our local bubble of universe |
Universe | Remove the space station and replace it with the sun |
Universe | Check the local bubble for missiles with target lock |
Universe | Subroutine: RemoveShip (Bank 0) Fetch a ship data block and remove that ship from our local bubble of universe |
Universe | Remove a ship from our local bubble of universe |
Dashboard | Disarm missiles and update the dashboard indicators |
Dashboard | Set/unset the lock target for a missile and update the dashboard |
Controllers | Display "YES" or "NO" and wait until one is chosen |
Controllers | Scan the key logger for the directional pad buttons |
Missions | Check whether we are in the Constrictor's system in mission 1 |
Start and end | Reset most variables |
Start and end | Reset a number of flight variables and workspaces |
Universe | Reset the INWK workspace and orientation vectors |
Drawing the screen | Subroutine: SetScreenHeight (Bank 0) Set the screen height variables to the specified height |
Dashboard | Display the dashboard's missile indicators in black or grey |
Main loop | Subroutine: Main game loop (Part 1 of 6) (Bank 0) Spawn a trader (a Cobra Mk III, Python, Boa or Anaconda) |
Main loop | Subroutine: Main game loop (Part 2 of 6) (Bank 0) Call the main flight loop, and potentially spawn a trader, an asteroid, or a cargo canister |
Main loop | Subroutine: Main game loop (Part 3 of 6) (Bank 0) Potentially spawn a cop, particularly if we've been bad |
Main loop | Subroutine: Main game loop (Part 4 of 6) (Bank 0) Potentially spawn a lone bounty hunter, a Thargoid, or up to four pirates |
Main loop | Subroutine: Main game loop (Part 5 of 6) (Bank 0) Cool down lasers, make calls to update the dashboard |
Main loop | Subroutine: Main game loop (Part 6 of 6) (Bank 0) Process non-flight key presses (icon bar selections) |
Sound | Variable: trumbleSounds (Bank 0) The range of sounds that the Trumbles make in the hold |
Icon bar | Process icon bar controller choices |
Status | Calculate how bad we have been |
Maths (Geometry) | Compare x_hi, y_hi and z_hi with 224 |
Maths (Geometry) | Calculate a cap on the maximum distance to a ship |
Icon bar | Subroutine: CheckForPause (Bank 0) Pause the game if the pause button (Start) is pressed |
Start and end | Display the death screen |
Bank 0 (Part 5 of 5)
--------------------
Category | Details |
---|---|
Start and end | Subroutine: ShowStartScreen (Bank 0) Show the start screen and start the game |
Start and end | Reset most of the game and restart from the title screen |
Start and end | Subroutine: StartGame (Bank 0) Reset the stack and game variables, and start the game by going to the docking bay |
Status | Go to the docking bay (i.e. show the Status Mode screen) |
Start and end | Reset a number of variables, ready to start a new game |
Drawing the screen | Subroutine: ChangeToView (Bank 0) Clear the screen and set a new view type |
Start and end | Display a title screen with a rotating ship and prompt |
Utility routines | Reset the local bubble of universe and ship status |
Controllers | Clear the key logger |
Maths (Geometry) | Add an orientation vector coordinate to an INWK coordinate |
Maths (Geometry) | Calculate a cap on the maximum distance to the planet or sun |
Maths (Arithmetic) | Calculate A = x_hi^2 + y_hi^2 + z_hi^2 in the K% block |
Universe | Subroutine: SpawnSpaceStation (Bank 0) Add a space station to the local bubble of universe if we are close enough to the station's orbit |
Maths (Arithmetic) | Calculate X = A / 16 |
Maths (Geometry) | Copy a space coordinate from the K% block into K3 |
Maths (Geometry) | Calculate the vector to the planet and store it in XX15 |
Maths (Geometry) | Normalise the three-coordinate vector in K3 |
Flight | Process the fast-forward button to end the demo, dock instantly or perform an in-system jump |
Flight | Subroutine: FastForwardJump (Bank 0) Perform an in-system jump |
Flight | Subroutine: CheckJumpSafety (Bank 0) Check whether we are far enough away from the planet and sun to be able to do an in-system (fast-forward) jump |
Flight | Subroutine: InSystemJump (Bank 0) Perform an in-system (fast-forward) jump |
Controllers | Scan for the seven primary flight controls and apply the docking computer manoeuvring code |
Text | Subroutine: PrintMessage (Bank 0) Print a message in the middle of the screen (used for "GAME OVER" and demo missile messages only) |
Flight | Display an in-flight message |
Flight | Print a text token, possibly followed by " DESTROYED" |
Text | Subroutine: StoreMessage (Bank 0) Copy a message from the justified text buffer at BUF into the message buffer |
Text | Subroutine: DisableJustifyText (Bank 0) Turn off justified text and reset the justified text buffer |
Text | Subroutine: PrintFlightMessage (Bank 0) Print an in-flight message |
Flight | Potentially lose cargo or equipment following damage |
Flight | Display "E.C.M.SYSTEM DESTROYED" as an in-flight message |
Flight | Display "FUEL SCOOPS DESTROYED" as an in-flight message |
Market | Market prices table |
Missions | Display a rotating ship at space coordinates (0, 100, 256) and scan the controllers |
Moving | Subroutine: MVEIT (Part 1 of 9) (Bank 0) Move current ship: Tidy the orientation vectors |
Moving | Subroutine: MVEIT (Part 2 of 9) (Bank 0) Move current ship: Call tactics routine, remove ship from scanner |
Moving | Subroutine: MVEIT (Part 3 of 9) (Bank 0) Move current ship: Move ship forward according to its speed |
Moving | Subroutine: MVEIT (Part 4 of 9) (Bank 0) Move current ship: Apply acceleration to ship's speed as a one-off |
Moving | Subroutine: MVEIT (Part 5 of 9) (Bank 0) Move current ship: Rotate ship's location by our pitch and roll |
Moving | Subroutine: MVEIT (Part 6 of 9) (Bank 0) Move current ship: Move the ship in space according to our speed |
Moving | Subroutine: MVEIT (Part 7 of 9) (Bank 0) Move current ship: Rotate ship's orientation vectors by pitch/roll |
Moving | Subroutine: MVEIT (Part 8 of 9) (Bank 0) Move current ship: Rotate ship about itself by its own pitch/roll |
Moving | Subroutine: MVEIT (Part 9 of 9) (Bank 0) Move current ship: Redraw on scanner, if it hasn't been destroyed |
Moving | Calculate (x_sign x_hi x_lo) = (x_sign x_hi x_lo) + (A R) |
Moving | Apply pitch and roll to an orientation vector |
Moving | Calculate (A P+2 P+1) = (x_sign x_hi x_lo) + (A P+2 P+1) |
Moving | Rotate the planet or sun's location in space by the amount of pitch and roll of our ship |
Flight | Flip the coordinate axes for the four different views |
Flight | Initialise the space view |
Stardust | Reflect the stardust particles in the screen diagonal |
PPU | Subroutine: SendSpaceViewToPPU (Bank 0) Set a new space view, clear the screen, copy the nametable buffers and configure the PPU for the new view |
Drawing the screen | Subroutine: SetSpaceViewInNMI (Bank 0) Change the current space view and configure the NMI to send both bitplanes to the PPU during VBlank |
Stardust | Subroutine: ResetStardust (Bank 0) Hide the sprites for the stardust |
Drawing the screen | Subroutine: SetupSpaceView (Bank 0) Set up the NMI variables for the space view |
Sound | Switch off the E.C.M. |
Tactics | Add an enemy missile to our local bubble of universe |
Status | Process us making a kill |
Sound | Variable: explosionSounds (Bank 0) Sound numbers for explosions at different distances from our ship |
Sound | Make the sound of a laser strike or ship explosion |
Drawing the screen | Clear the screen and set the new view type |
Text | Subroutine: PrintSpaceViewName (Bank 0) Print the name of the current space view |
Utility routines | Vectors and padding at the end of ROM bank 0 |
Bank 1 (Part 1 of 3)
--------------------
Category | Details |
---|---|
Start and end | Subroutine: ResetMMC1_b1 (Bank 1) The MMC1 mapper reset routine at the start of the ROM bank |
Start and end | Subroutine: Interrupts_b1 (Bank 1) The IRQ and NMI handler while the MMC1 mapper reset routine is still running |
Text | Variable: versionNumber_b1 (Bank 1) The game's version number in bank 1 |
Drawing ships | Variable: Unused copy of XX21 (Bank 1) Remnants of an unused copy of the XX21 ship blueprints lookup table |
Drawing ships | Ship blueprints default NEWB flags |
Status | Fractional number of kills awarded for destroying each type of ship |
Status | Integer number of kills awarded for destroying each type of ship |
Drawing ships | Variable: SHIP_MISSILE (Bank 1) Ship blueprint for a missile |
Drawing ships | Variable: SHIP_CORIOLIS (Bank 1) Ship blueprint for a Coriolis space station |
Drawing ships | Variable: SHIP_ESCAPE_POD (Bank 1) Ship blueprint for an escape pod |
Drawing ships | Ship blueprint for an alloy plate |
Drawing ships | Variable: SHIP_CANISTER (Bank 1) Ship blueprint for a cargo canister |
Drawing ships | Variable: SHIP_BOULDER (Bank 1) Ship blueprint for a boulder |
Drawing ships | Variable: SHIP_ASTEROID (Bank 1) Ship blueprint for an asteroid |
Drawing ships | Variable: SHIP_SPLINTER (Bank 1) Ship blueprint for a splinter |
Drawing ships | Variable: SHIP_SHUTTLE (Bank 1) Ship blueprint for a Shuttle |
Drawing ships | Variable: SHIP_TRANSPORTER (Bank 1) Ship blueprint for a Transporter |
Drawing ships | Variable: SHIP_COBRA_MK_3 (Bank 1) Ship blueprint for a Cobra Mk III |
Drawing ships | Variable: SHIP_PYTHON (Bank 1) Ship blueprint for a Python |
Drawing ships | Ship blueprint for a Boa |
Drawing ships | Variable: SHIP_ANACONDA (Bank 1) Ship blueprint for an Anaconda |
Drawing ships | Variable: SHIP_ROCK_HERMIT (Bank 1) Ship blueprint for a rock hermit (asteroid) |
Drawing ships | Ship blueprint for a Viper |
Drawing ships | Variable: SHIP_SIDEWINDER (Bank 1) Ship blueprint for a Sidewinder |
Drawing ships | Ship blueprint for a Mamba |
Drawing ships | Ship blueprint for a Krait |
Drawing ships | Ship blueprint for an Adder |
Drawing ships | Ship blueprint for a Gecko |
Drawing ships | Variable: SHIP_COBRA_MK_1 (Bank 1) Ship blueprint for a Cobra Mk I |
Drawing ships | Ship blueprint for a Worm |
Drawing ships | Variable: SHIP_COBRA_MK_3_P (Bank 1) Ship blueprint for a Cobra Mk III (pirate) |
Drawing ships | Variable: SHIP_ASP_MK_2 (Bank 1) Ship blueprint for an Asp Mk II |
Drawing ships | Variable: SHIP_PYTHON_P (Bank 1) Ship blueprint for a Python (pirate) |
Drawing ships | Variable: SHIP_FER_DE_LANCE (Bank 1) Ship blueprint for a Fer-de-Lance |
Drawing ships | Ship blueprint for a Moray |
Drawing ships | Variable: SHIP_THARGOID (Bank 1) Ship blueprint for a Thargoid mothership |
Drawing ships | Variable: SHIP_THARGON (Bank 1) Ship blueprint for a Thargon |
Drawing ships | Variable: SHIP_CONSTRICTOR (Bank 1) Ship blueprint for a Constrictor |
Drawing ships | Variable: SHIP_COUGAR (Bank 1) Ship blueprint for a Cougar |
Drawing ships | Ship blueprint for a Dodecahedron ("Dodo") space station |
Drawing ships | Draw a distant ship as a point rather than a full wireframe |
Maths (Arithmetic) | Calculate (S A) = (S R) + (A Q) |
Maths (Geometry) | Calculate the dot product of XX15 and XX16 |
Drawing ships | Subroutine: LL9 (Part 1 of 12) (Bank 1) Draw ship: Check if ship is exploding, check if ship is in front |
Drawing ships | Subroutine: LL9 (Part 2 of 12) (Bank 1) Draw ship: Check if ship is in field of view, close enough to draw |
Drawing ships | Subroutine: LL9 (Part 3 of 12) (Bank 1) Draw ship: Set up orientation vector, ship coordinate variables |
Drawing ships | Subroutine: LL9 (Part 4 of 12) (Bank 1) Draw ship: Set visibility for exploding ship (all faces visible) |
Drawing ships | Subroutine: LL9 (Part 5 of 12) (Bank 1) Draw ship: Calculate the visibility of each of the ship's faces |
Drawing ships | Subroutine: LL9 (Part 6 of 12) (Bank 1) Draw ship: Calculate the visibility of each of the ship's vertices |
Bank 1 (Part 2 of 3)
--------------------
Category | Details |
---|---|
Maths (Arithmetic) | Calculate (U R) = 256 * A / Q |
Maths (Arithmetic) | Calculate 128 - (U R) |
Drawing ships | Subroutine: LL9 (Part 7 of 12) (Bank 1) Draw ship: Calculate the visibility of each of the ship's vertices |
Drawing ships | Subroutine: LL9 (Part 8 of 12) (Bank 1) Draw ship: Calculate the screen coordinates of visible vertices |
Drawing ships | Subroutine: LL9 (Part 9 of 12) (Bank 1) Draw ship: Draw laser beams if the ship is firing its laser at us |
Drawing ships | Subroutine: LL9 (Part 10 of 12) (Bank 1) Draw ship: Calculate the visibility of each of the ship's edges |
Drawing lines | Subroutine: LL145 (Part 1 of 4) (Bank 1) Clip line: Work out which end-points are on-screen, if any |
Drawing lines | Subroutine: LL145 (Part 2 of 4) (Bank 1) Clip line: Work out if any part of the line is on-screen |
Drawing lines | Subroutine: LL145 (Part 3 of 4) (Bank 1) Clip line: Calculate the line's gradient |
Drawing lines | Subroutine: LL145 (Part 4 of 4) (Bank 1) Clip line: Call the routine in LL188 to do the actual clipping |
Drawing ships | Subroutine: LL9 (Part 11 of 12) (Bank 1) Draw ship: Loop back for the next edge |
Drawing ships | Subroutine: LL9 (Part 12 of 12) (Bank 1) Does nothing in the NES version |
Drawing lines | Move a point along a line until it is on-screen |
Maths (Arithmetic) | Calculate (Y X) = (S x1_lo) * XX12+2 or (S x1_lo) / XX12+2 |
Maths (Arithmetic) | Calculate (Y X) = (S R) / XX12+2 or (S R) * XX12+2 |
Maths (Arithmetic) | Calculate Q = XX12+2, A = S EOR XX12+3 and (S R) = |S R| |
Drawing ships | Draw an exploding ship |
Drawing planets | Draw the planet or sun |
Drawing planets | Subroutine: PL9 (Part 1 of 3) (Bank 1) Draw the planet, with either an equator and meridian, or a crater |
Drawing planets | Subroutine: PL9 (Part 2 of 3) (Bank 1) Draw the planet's equator and meridian |
Drawing planets | Subroutine: PL9 (Part 3 of 3) (Bank 1) Draw the planet's crater |
Drawing planets | Calculate (Y A) = nosev_x / z |
Drawing planets | Draw a half-ellipse |
Drawing planets | Draw an ellipse or half-ellipse |
Drawing suns | Subroutine: SUN (Part 1 of 2) (Bank 1) Draw the sun: Set up all the variables needed to draw the sun |
Drawing suns | Subroutine: SUN (Part 2 of 2) (Bank 1) Draw the sun: Starting from the bottom of the sun, draw the new sun line by line |
Drawing suns | Calculate the sun's width on a given pixel row |
Drawing circles | Draw a circle for the planet |
Drawing circles | Draw a circle (for the planet or chart) |
Bank 1 (Part 3 of 3)
--------------------
Category | Details |
---|---|
Drawing lines | Draw a horizontal line given a centre and a half-width |
Drawing suns | Subroutine: DrawSunEdgeLeft (Bank 1) Draw a sun line in the tile on the left end of a sun row |
Drawing suns | Subroutine: DrawSunEdgeRight (Bank 1) Draw a sun line in the tile on the right end of a sun row |
Drawing circles | Check whether any part of a circle appears on the extended screen |
Drawing planets | Return from a planet/sun-drawing routine with a failure flag |
Drawing planets | Return from a planet/sun-drawing routine with a success flag |
Drawing planets | Calculate (Y A P) = 222 * roofv_x / z |
Drawing planets | Calculate CNT2 = arctan(P / A) / 4 |
Drawing planets | Calculate roofv_x / z and roofv_y / z |
Maths (Geometry) | Calculate A = arctan(P / Q) |
Drawing circles | Draw a circle segment and add it to the ball line heap |
Stardust | The main routine for processing the stardust |
Stardust | Process the stardust for the front view |
Stardust | Process the stardust for the rear view |
Stardust | Process the stardust for the left or right view |
Ship hangar | Variable: yHangarFloor (Bank 1) Pixel y-coordinates for the four horizontal lines that make up the floor of the ship hangar |
Ship hangar | Display the ship hangar |
Ship hangar | Subroutine: DrawHangarWallLine (Bank 1) Draw a vertical hangar wall line from top to bottom, stopping when it bumps into existing on-screen content |
Ship hangar | Draw a hangar background line from left to right, stopping when it bumps into existing on-screen content |
Ship hangar | Draw a hangar background line from right to left |
Ship hangar | Ship hangar group table |
Ship hangar | Draw the ships in the ship hangar, then draw the hangar |
Universe | Reset the INWK workspace and orientation vectors |
Ship hangar | Draw a ship in the ship hangar |
Maths (Geometry) | Orthonormalise the orientation vectors for a ship |
Maths (Arithmetic) | Calculate -(nosev_1 * roofv_1 + nosev_2 * roofv_2) / nosev_3 |
Maths (Arithmetic) | Calculate (P+1 A) = (A P) / Q |
Dashboard | Display the current ship on the scanner |
Dashboard | Update the current ship so it is no longer shown on the scanner |
Dashboard | Subroutine: HideFromScanner (Bank 1) Hide the current ship from the scanner |
Drawing ships | Subroutine: DrawExplosionBurst (Bank 1) Draw an exploding ship along with an explosion burst made up of colourful sprites |
Drawing pixels | Draw a stardust particle relative to the screen centre |
Utility routines | Vectors and padding at the end of ROM bank 1 |
Bank 2 (Part 1 of 4)
--------------------
Category | Details |
---|---|
Start and end | Subroutine: ResetMMC1_b2 (Bank 2) The MMC1 mapper reset routine at the start of the ROM bank |
Start and end | Subroutine: Interrupts_b2 (Bank 2) The IRQ and NMI handler while the MMC1 mapper reset routine is still running |
Text | Variable: versionNumber_b2 (Bank 2) The game's version number in bank 2 |
Text | The first extended token table for recursive tokens 0-255 (DETOK) |
Text | System numbers that have extended description overrides |
Text | The criteria for systems with extended description overrides |
Text | The second extended token table for recursive tokens 0-26 (DETOK3) |
Bank 2 (Part 2 of 4)
--------------------
Category | Details |
---|---|
Text | The first extended token table for recursive tokens 0-255 (DETOK) (German) |
Text | System numbers that have extended description overrides (German) |
Text | The criteria for systems with extended description overrides (German) |
Text | The second extended token table for recursive tokens 0-26 (DETOK3) (German) |
Bank 2 (Part 3 of 4)
--------------------
Category | Details |
---|---|
Text | The first extended token table for recursive tokens 0-255 (DETOK) (French) |
Text | System numbers that have extended description overrides (French) |
Text | The criteria for systems with extended description overrides (French) |
Text | The second extended token table for recursive tokens 0-26 (DETOK3) (French) |
Text | The recursive token table for tokens 0-148 |
Text | The recursive token table for tokens 0-148 (German) |
Bank 2 (Part 4 of 4)
--------------------
Category | Details |
---|---|
Text | The recursive token table for tokens 0-148 (French) |
Text | Address lookup table for the RUTOK text token table in three different languages (low byte) |
Text | Address lookup table for the RUTOK text token table in three different languages (high byte) |
Text | Print an extended recursive token from the RUTOK token table |
Text | Print an extended recursive token from the TKN1 token table |
Text | Print an extended text token (1-255) |
Text | The extended token table for jump tokens 1-32 (DETOK) |
Text | Lookup table for random tokens in the extended token table (0-37) |
Text | Print the captain's name during mission briefings |
Text | Print the location hint during the mission 1 briefing |
Text | Switch to ALL CAPS when printing extended tokens |
Text | Switch to Sentence Case when printing extended tokens |
Text | Tab to column 6 and start a new word when printing extended tokens |
Text | Print the character in variable DTW7 |
Save and load | Display the currently selected media (disk or tape) |
Save and load | Subroutine: OTHERFILEPR (Bank 2) Display the non-selected media (disk or tape) |
Text | Clear the screen and set the view type for a text-based mission briefing |
Text | Switch to standard tokens in Sentence Case |
Text | Switch to extended tokens |
Text | Switch to justified text when printing extended tokens |
Text | Switch to left-aligned text when printing extended tokens |
Text | Print the selected system's adjective, e.g. Lavian for Lave |
Text | Print a random 1-8 letter word in Sentence Case |
Text | Print a space and capitalise the next letter |
Text | Capitalise the next letter |
Text | Test whether a character is a vowel |
Text | The extended two-letter token lookup table |
Text | The two-letter token lookup table |
Missions | Clear the screen, display "INCOMING MESSAGE" and wait for 2 seconds |
Missions | Display a rotating ship, waiting until a key is pressed, then remove the ship from the screen |
Text | Move to row 9 and switch to lower case when printing extended tokens |
Text | Move to row 7 and switch to lower case when printing extended tokens |
Text | Switch to lower case when printing extended tokens |
Controllers | Wait until a key is pressed, ignoring any existing key press |
Text | Address lookup table for the RUPLA text token table in three different languages (low byte) |
Text | Address lookup table for the RUPLA text token table in three different languages (high byte) |
Text | Address lookup table for the RUGAL text token table in three different languages (low byte) |
Text | Address lookup table for the RUGAL text token table in three different languages (high byte) |
Text | The number of planetary systems with extended system description overrides in the RUTOK table (NRU%) in three different languages |
Universe | Print the system's extended description or a mission 1 directive |
Text | Print a text token |
Text | Print a letter in lower case |
Text | Print a letter according to Sentence Case |
Text | Print a recursive token in the range 128-145 |
Text | Print a letter in lower case |
Text | Print a two-letter token or recursive token 0-95 |
Text | Print a recursive token |
Text | Print a character at the text cursor, with support for verified text in extended tokens |
Sound | Make a standard system beep |
Text | Subroutine: CHPR (Part 1 of 6) (Bank 2) Print a character at the text cursor by poking into screen memory |
Text | Subroutine: CHPR (Part 2 of 6) (Bank 2) Jump to the right part of the routine depending on whether the font pattern we need is already loaded |
Text | Subroutine: CHPR (Part 3 of 6) (Bank 2) Draw a character into the pattern buffers to show the character on-screen |
Text | Subroutine: CHPR (Part 4 of 6) (Bank 2) Process the delete character |
Text | Subroutine: CHPR (Part 5 of 6) (Bank 2) Print the character using a font that has already been loaded |
Text | Subroutine: CHPR (Part 6 of 6) (Bank 2) Print a character in the space view when the relevant font is not loaded, merging the text with whatever is already on-screen |
Text | Lookup table for converting ASCII characters to lower case characters in the game's text font |
Utility routines | Vectors and padding at the end of ROM bank 2 |
Bank 3 (Part 1 of 2)
--------------------
Category | Details |
---|---|
Start and end | Subroutine: ResetMMC1_b3 (Bank 3) The MMC1 mapper reset routine at the start of the ROM bank |
Start and end | Subroutine: Interrupts_b3 (Bank 3) The IRQ and NMI handler while the MMC1 mapper reset routine is still running |
Text | Variable: versionNumber_b3 (Bank 3) The game's version number in bank 3 |
Text | Variable: Copyright and version message (Bank 3) A copyright and version message buried in the code |
Icon bar | Variable: iconBarImage0 (Bank 3) Image data for icon bar 0 (Docked) |
Icon bar | Variable: iconBarImage1 (Bank 3) Image data for icon bar 1 (Flight) |
Icon bar | Variable: iconBarImage2 (Bank 3) Image data for icon bar 2 (Charts) |
Icon bar | Variable: iconBarImage3 (Bank 3) Image data for icon bar 3 (Pause) |
Icon bar | Variable: iconBarImage4 (Bank 3) Image data for icon bar 4 (Title screen copyright message) |
Icon bar | Nametable entries for icon bar 0 (Docked) |
Icon bar | Nametable entries for icon bar 1 (Flight) |
Icon bar | Nametable entries for icon bar 2 (Charts) |
Icon bar | Nametable entries for icon bar 3 (Pause) |
Icon bar | Nametable entries for icon bar 4 (Title screen copyright message) |
Dashboard | Nametable entries for the dashboard |
Dashboard | Packed image data for the dashboard |
Equipment | Packed image data for the Cobra Mk III shown on the Equip Ship screen |
Equipment | Variable: inventoryIcon (Bank 3) Image data for the inventory icon shown on the icon bar in the Market Price screen |
Save and load | Variable: smallLogoImage (Bank 3) Packed image data for the small Elite logo shown on the Save and Load screen |
Start and end | Variable: logoBallImage (Bank 3) Packed image data for the ball at the bottom of the big Elite logo shown on the Start screen |
Dashboard | Subroutine: DrawDashNames (Bank 3) Draw the dashboard into both the nametable buffers |
Dashboard | Subroutine: ResetScanner (Bank 3) Reset the sprites used for drawing ships on the scanner |
PPU | Subroutine: SendViewToPPU (Bank 3) Configure the PPU for the view type in QQ11 |
PPU | Subroutine: SendFontImageToPPU (Bank 3) Send a font to the PPU as a colour 1 font on a colour 0 background (i.e. colour 1 on black) |
PPU | Subroutine: SendDashImageToPPU (Bank 3) Unpack the dashboard image and send it to patterns 69 to 255 in pattern table 0 in the PPU |
PPU | Subroutine: SendBitplaneToPPU (Bank 3) Send a bitplane to the PPU immediately |
PPU | Subroutine: SendDataNowToPPU (Bank 3) Send the specified bitplane buffers to the PPU immediately, without trying to squeeze it into VBlanks |
Drawing the screen | Subroutine: SetupViewInNMI (Bank 3) Setup the view and configure the NMI to send both bitplanes to the PPU during VBlank |
Drawing the screen | Variable: paletteForView (Bank 3) Palette numbers for each view |
Drawing the screen | Variable: boxEdgeImages (Bank 3) Image data for patterns 0 to 4 |
Start and end | Subroutine: ResetScreen (Bank 3) Reset the screen by clearing down the PPU, setting all colours to black, and resetting the screen-related variables |
Icon bar | Subroutine: SetIconBarRow (Bank 3) Set the row on which the icon bar appears, which depends on the view type |
Icon bar | Subroutine: ShowIconBar (Bank 3) Show a specified icon bar on-screen |
Icon bar | Subroutine: UpdateIconBar (Bank 3) Update the icon bar |
PPU | Subroutine: SetupSprite0 (Bank 3) Set the coordinates of sprite 0 so we can detect when the PPU starts to draw the icon bar |
Icon bar | Subroutine: BlankAllButtons (Bank 3) Blank all the buttons on the icon bar |
Icon bar | Subroutine: BlankButtons6To11 (Bank 3) Blank from the sixth to the eleventh button on the icon bar |
Icon bar | Subroutine: BlankButtons8To11 (Bank 3) Blank from the eighth to the eleventh button on the icon bar |
Icon bar | Subroutine: DrawIconBar (Bank 3) Draw the icon bar into the nametable buffers for both bitplanes |
Bank 3 (Part 2 of 2)
--------------------
Category | Details |
---|---|
Icon bar | Subroutine: HideIconBar (Bank 3) Remove the icon bar from the screen by replacing it with background tiles |
Icon bar | Subroutine: SetupIconBarPause (Bank 3) Set up the game options shown on the icon bar when the game is paused |
Icon bar | Subroutine: SetIconBarButtonsS (Bank 3) Set the correct list of button numbers for the icon bar (this is a jump so we can call this routine using a branch instruction) |
Icon bar | Subroutine: SetupIconBar (Bank 3) Set up the icons on the icon bar to show all available options |
Icon bar | Subroutine: SetupIconBarFlight (Bank 3) Set up the Flight icon bar |
Icon bar | Subroutine: SetupIconBarDocked (Bank 3) Set up the Docked icon bar |
Icon bar | Subroutine: SetIconBarButtons (Bank 3) Set the correct list of button numbers for the icon bar |
Icon bar | Subroutine: SetupIconBarCharts (Bank 3) Set up the Charts icon bar |
Icon bar | Subroutine: DrawBlankButton2x2 (Bank 3) Draw a blank icon bar button as a 2x2 tile block |
Icon bar | Subroutine: DrawBlankButton3x2 (Bank 3) Draw a blank icon bar button as a 3x2 tile block |
Icon bar | Subroutine: Draw6OptionTiles (Bank 3) Draw six tiles over the top of an icon bar button in the Pause icon bar to change an option icon to a non-default state |
Icon bar | Subroutine: Draw4OptionTiles (Bank 3) Draw four tiles over the top of an icon bar button in the Pause icon bar to change an option icon to a non-default state |
Icon bar | Subroutine: Draw2OptionTiles (Bank 3) Draw a top and bottom tile over the top of an icon bar button in the Pause icon bar to change an option icon to a non-default state |
Drawing the screen | Subroutine: SetLinePatterns (Bank 3) Copy the patterns for horizontal line, vertical line and block images into the pattern buffers, depending on the view |
Text | Subroutine: LoadNormalFont (Bank 3) Load the normal font into the pattern buffer from pattern 66 to 160 |
Text | Subroutine: LoadHighFont (Bank 3) Load the highlight font into the pattern buffer from pattern 161 to 255 |
Universe | Subroutine: DrawSystemImage (Bank 3) Draw the system image as a coloured foreground in front of a greyscale background |
Drawing the screen | Subroutine: DrawImageFrame (Bank 3) Draw a frame around the system image or commander headshot |
Drawing the screen | Subroutine: DrawRowOfTiles (Bank 3) Draw a row of tiles into the nametable buffer |
Drawing the screen | Subroutine: GetNameAddress (Bank 3) Get the addresses in the nametable buffers for a given tile |
Drawing the screen | Subroutine: DrawSmallBox (Bank 3) Draw a small box, typically used for popups or outlines |
Drawing the screen | Subroutine: DrawBackground (Bank 3) Draw the background of a system or commander image into the nametable buffer |
Drawing the screen | Subroutine: ClearScreen (Bank 3) Clear the screen by clearing patterns 66 to 255 in both pattern buffers, and clearing both nametable buffers to the background |
Drawing the screen | Variable: viewPalettes (Bank 3) The palettes to use for the different views |
Drawing the screen | Variable: fadeColours (Bank 3) Lookup table that converts a NES colour to the same colour but with a smaller brightness value |
Drawing the screen | Subroutine: GetViewPalettes (Bank 3) Get the palette for the view type in QQ11a and store it in a table at XX3 |
Drawing the screen | Subroutine: FadeColoursTwice (Bank 3) Fade the screen colours towards black twice |
Drawing the screen | Subroutine: FadeColours (Bank 3) Fade the screen colours towards black |
Drawing the screen | Subroutine: SetPaletteColours (Bank 3) Set the view's palette from the entries in the XX3 palette table |
Drawing the screen | Subroutine: FadeToBlack (Bank 3) Fade the screen to black over the next four VBlanks |
Drawing the screen | Subroutine: FadeToColour (Bank 3) Reverse-fade the screen from black to full colour over the next four VBlanks |
Universe | Variable: systemPalettes (Bank 3) Palettes for the system images |
Drawing the screen | Variable: viewAttrCount (Bank 3) The number of sets of view attributes in the viewAttrOffset table |
Drawing the screen | Variable: viewAttrOffset (Bank 3) Offset to the data for each of the 24 sets of view attributes |
Drawing the screen | Variable: viewAttributes0 (Bank 3) Packed view attribute data for attribute set 0 |
Drawing the screen | Variable: viewAttributes1 (Bank 3) Packed view attribute data for attribute set 1 |
Drawing the screen | Variable: viewAttributes2 (Bank 3) Packed view attribute data for attribute set 2 |
Drawing the screen | Variable: viewAttributes3 (Bank 3) Packed view attribute data for attribute set 3 |
Drawing the screen | Variable: viewAttributes4 (Bank 3) Packed view attribute data for attribute set 4 |
Drawing the screen | Variable: viewAttributes5 (Bank 3) Packed view attribute data for attribute set 5 |
Drawing the screen | Variable: viewAttributes6 (Bank 3) Packed view attribute data for attribute set 6 |
Drawing the screen | Variable: viewAttributes7 (Bank 3) Packed view attribute data for attribute set 7 |
Drawing the screen | Variable: viewAttributes8 (Bank 3) Packed view attribute data for attribute set 8 |
Drawing the screen | Variable: viewAttributes9 (Bank 3) Packed view attribute data for attribute set 9 |
Drawing the screen | Variable: viewAttributes10 (Bank 3) Packed view attribute data for attribute set 10 |
Drawing the screen | Variable: viewAttributes11 (Bank 3) Packed view attribute data for attribute set 11 |
Drawing the screen | Variable: viewAttributes12 (Bank 3) Packed view attribute data for attribute set 12 |
Drawing the screen | Variable: viewAttributes13 (Bank 3) Packed view attribute data for attribute set 13 |
Drawing the screen | Variable: viewAttributes14 (Bank 3) Packed view attribute data for attribute set 14 |
Drawing the screen | Variable: viewAttributes15 (Bank 3) Packed view attribute data for attribute set 15 |
Drawing the screen | Variable: viewAttributes16 (Bank 3) Packed view attribute data for attribute set 16 |
Drawing the screen | Variable: viewAttributes17 (Bank 3) Packed view attribute data for attribute set 17 |
Drawing the screen | Variable: viewAttributes18 (Bank 3) Packed view attribute data for attribute set 18 |
Drawing the screen | Variable: viewAttributes19 (Bank 3) Packed view attribute data for attribute set 19 |
Drawing the screen | Variable: viewAttributes20 (Bank 3) Packed view attribute data for attribute set 20 |
Drawing the screen | Variable: viewAttributes21 (Bank 3) Packed view attribute data for attribute set 21 |
Drawing the screen | Variable: viewAttributes22 (Bank 3) Packed view attribute data for attribute set 22 |
Drawing the screen | Variable: viewAttributes23 (Bank 3) Packed view attribute data for attribute set 23 |
Drawing the screen | Variable: viewAttributes_EN (Bank 3) The view attributes to use for each view type in English |
Drawing the screen | Variable: viewAttributes_DE (Bank 3) The view attributes to use for each view type in German |
Drawing the screen | Variable: viewAttributes_FR (Bank 3) The view attributes to use for each view type in French |
Drawing the screen | Variable: viewAttributesLo (Bank 3) The low byte of the view attributes lookup table for each language |
Drawing the screen | Variable: viewAttributesHi (Bank 3) The high byte of the view attributes lookup table for each language |
Drawing the screen | Subroutine: SetViewAttrs (Bank 3) Set up attribute buffer 0 for the chosen view |
Flight | Subroutine: HideSightSprites (Bank 3) Hide the sprites for the laser sights in the space view |
Flight | Draw the laser crosshairs |
Utility routines | Vectors and padding at the end of ROM bank 3 |
Bank 4
------
Category | Details |
---|---|
Start and end | Subroutine: ResetMMC1_b4 (Bank 4) The MMC1 mapper reset routine at the start of the ROM bank |
Start and end | Subroutine: Interrupts_b4 (Bank 4) The IRQ and NMI handler while the MMC1 mapper reset routine is still running |
Text | Variable: versionNumber_b4 (Bank 4) The game's version number in bank 4 |
Status | The number of commander face images in the faceOffset table |
Status | Offset to the data for each of the 14 commander face images |
Status | Packed image data for commander face image 0 |
Status | Packed image data for commander face image 1 |
Status | Packed image data for commander face image 2 |
Status | Packed image data for commander face image 3 |
Status | Packed image data for commander face image 4 |
Status | Packed image data for commander face image 5 |
Status | Packed image data for commander face image 6 |
Status | Packed image data for commander face image 7 |
Status | Packed image data for commander face image 8 |
Status | Packed image data for commander face image 9 |
Status | Variable: faceImage10 (Bank 4) Packed image data for commander face image 10 |
Status | Variable: faceImage11 (Bank 4) Packed image data for commander face image 11 |
Status | Variable: faceImage12 (Bank 4) Packed image data for commander face image 12 |
Status | Variable: faceImage13 (Bank 4) Packed image data for commander face image 13 |
Status | The number of commander headshot images in the headOffset table |
Status | Offset to the data for each of the 14 commander headshot images |
Status | Packed image data for commander headshot image 0 |
Status | Packed image data for commander headshot image 1 |
Status | Packed image data for commander headshot image 2 |
Status | Packed image data for commander headshot image 3 |
Status | Packed image data for commander headshot image 4 |
Status | Packed image data for commander headshot image 5 |
Status | Packed image data for commander headshot image 6 |
Status | Packed image data for commander headshot image 7 |
Status | Packed image data for commander headshot image 8 |
Status | Packed image data for commander headshot image 9 |
Status | Variable: headImage10 (Bank 4) Packed image data for commander headshot image 10 |
Status | Variable: headImage11 (Bank 4) Packed image data for commander headshot image 11 |
Status | Variable: headImage12 (Bank 4) Packed image data for commander headshot image 12 |
Status | Variable: headImage13 (Bank 4) Packed image data for commander headshot image 13 |
Status | Variable: glassesImage (Bank 4) Packed image data for the glasses, earrings and medallion that the commander can wear |
Start and end | Variable: bigLogoImage (Bank 4) Packed image data for the big Elite logo shown on the Start screen |
Start and end | Variable: bigLogoNames (Bank 4) Nametable entries for the big Elite logo on the Start screen |
Save and load | Variable: smallLogoTile (Bank 4) Pattern numbers in the smallLogoImage table for the sprites that make up the small Elite logo on the Save and Load screen |
Save and load | Nametable entries for the Cobra Mk III shown on the Equip Ship screen |
Status | Subroutine: GetHeadshotType (Bank 4) Get the correct headshot number for the current combat rank and status condition |
Status | Variable: headShotsByRank (Bank 4) Lookup table for headshots by rank and status condition |
Status | Subroutine: GetHeadshot (Bank 4) Fetch the headshot image for the commander and store it in the pattern buffers, starting at pattern number picturePattern |
Status | Subroutine: GetCmdrImage (Bank 4) Fetch the headshot image for the commander and store it in the pattern buffers, and send the face and glasses images to the PPU |
Start and end | Subroutine: DrawBigLogo (Bank 4) Set the pattern and nametable buffer entries for the big Elite logo on the Start screen |
Drawing the screen | Subroutine: DrawImageNames (Bank 4) Set the nametable buffer entries for the specified image |
Save and load | Subroutine: DrawSmallLogo (Bank 4) Set the sprite buffer entries for the small Elite logo on the Save and Load screen |
Utility routines | Vectors and padding at the end of ROM bank 4 |
Bank 5
------
Category | Details |
---|---|
Start and end | Subroutine: ResetMMC1_b5 (Bank 5) The MMC1 mapper reset routine at the start of the ROM bank |
Start and end | Subroutine: Interrupts_b5 (Bank 5) The IRQ and NMI handler while the MMC1 mapper reset routine is still running |
Text | Variable: versionNumber_b5 (Bank 5) The game's version number in bank 5 |
Universe | Variable: systemCount (Bank 5) The number of system images in the systemOffset table |
Universe | Variable: systemOffset (Bank 5) Offset to the data for each of the 15 system images |
Universe | Variable: systemImage0 (Bank 5) Packed image data for system image 0 |
Universe | Variable: systemImage1 (Bank 5) Packed image data for system image 1 |
Universe | Variable: systemImage2 (Bank 5) Packed image data for system image 2 |
Universe | Variable: systemImage3 (Bank 5) Packed image data for system image 3 |
Universe | Variable: systemImage4 (Bank 5) Packed image data for system image 4 |
Universe | Variable: systemImage5 (Bank 5) Packed image data for system image 5 |
Universe | Variable: systemImage6 (Bank 5) Packed image data for system image 6 |
Universe | Variable: systemImage7 (Bank 5) Packed image data for system image 7 |
Universe | Variable: systemImage8 (Bank 5) Packed image data for system image 8 |
Universe | Variable: systemImage9 (Bank 5) Packed image data for system image 9 |
Universe | Variable: systemImage10 (Bank 5) Packed image data for system image 10 |
Universe | Variable: systemImage11 (Bank 5) Packed image data for system image 11 |
Universe | Variable: systemImage12 (Bank 5) Packed image data for system image 12 |
Universe | Variable: systemImage13 (Bank 5) Packed image data for system image 13 |
Universe | Variable: systemImage14 (Bank 5) Packed image data for system image 14 |
Text | Variable: Copyright message (Bank 5) A copyright message buried in the code, complete with typo |
Universe | Subroutine: GetSystemImage (Bank 5) Fetch the background image and foreground sprite for the current system image and send them to the pattern buffers and PPU |
Universe | Subroutine: GetSystemBack (Bank 5) Fetch the background image for the current system and store it in the pattern buffers |
Combat demo | Subroutine: SetDemoAutoPlay (Bank 5) Set up the NMI handler to automatically play the demo using the controller key presses in the autoPlayKeys table |
Combat demo | Variable: autoPlayKeys1Lo (Bank 5) Low byte of the address of the auto-play key table for each language |
Combat demo | Variable: autoPlayKeys1Hi (Bank 5) High byte of the address of the auto-play key table for each language |
Utility routines | Vectors and padding at the end of ROM bank 5 |
Bank 6 (Part 1 of 3)
--------------------
Category | Details |
---|---|
Start and end | Subroutine: ResetMMC1_b6 (Bank 6) The MMC1 mapper reset routine at the start of the ROM bank |
Start and end | Subroutine: Interrupts_b6 (Bank 6) The IRQ and NMI handler while the MMC1 mapper reset routine is still running |
Text | Variable: versionNumber_b6 (Bank 6) The game's version number in bank 6 |
Sound | Subroutine: ChooseMusicS (Bank 6) A jump table entry at the start of bank 6 for the ChooseMusic routine |
Sound | Subroutine: MakeSoundsS (Bank 6) A jump table entry at the start of bank 6 for the MakeSounds routine |
Sound | Subroutine: StopSoundsS (Bank 6) A jump table entry at the start of bank 6 for the StopSounds routine |
Sound | Subroutine: EnableSoundS (Bank 6) A jump table entry at the start of bank 6 for the EnableSound routine |
Sound | Subroutine: StartEffectOnSQ1S (Bank 6) A jump table entry at the start of bank 6 for the StartEffectOnSQ1 routine |
Sound | Subroutine: StartEffectOnSQ2S (Bank 6) A jump table entry at the start of bank 6 for the StartEffectOnSQ2 routine |
Sound | Subroutine: StartEffectOnNOISES (Bank 6) A jump table entry at the start of bank 6 for the StartEffectOnNOISE routine |
Sound | Subroutine: ChooseMusic (Bank 6) Set the tune for the background music |
Sound | Subroutine: EnableSound (Bank 6) Enable sounds (music and sound effects) |
Sound | Subroutine: StopSounds (Bank 6) Stop all sounds (music and sound effects) |
Sound | Subroutine: MakeSounds (Bank 6) Make the current sounds (music and sound effects) |
Sound | Subroutine: MakeMusic (Bank 6) Play the current music on the SQ1, SQ2, TRI and NOISE channels |
Sound | Subroutine: MakeMusicOnSQ1 (Bank 6) Play the current music on the SQ1 channel |
Sound | Subroutine: ApplyEnvelopeSQ1 (Bank 6) Apply volume and pitch changes to the SQ1 channel |
Sound | Subroutine: MakeMusicOnSQ2 (Bank 6) Play the current music on the SQ2 channel |
Sound | Subroutine: ApplyEnvelopeSQ2 (Bank 6) Apply volume and pitch changes to the SQ2 channel |
Sound | Subroutine: MakeMusicOnTRI (Bank 6) Play the current music on the TRI channel |
Sound | Subroutine: ApplyEnvelopeTRI (Bank 6) Apply volume and pitch changes to the TRI channel |
Sound | Subroutine: MakeMusicOnNOISE (Bank 6) Play the current music on the NOISE channel |
Sound | Subroutine: ApplyEnvelopeNOISE (Bank 6) Apply volume and pitch changes to the NOISE channel |
Sound | Variable: noteFrequency (Bank 6) A table of note frequencies |
Sound | Subroutine: StartEffectOnSQ1 (Bank 6) Make a sound effect on the SQ1 channel |
Sound | Subroutine: StartEffect (Bank 6) Start making a sound effect on the specified channel |
Sound | Subroutine: StartEffectOnSQ2 (Bank 6) Make a sound effect on the SQ2 channel |
Sound | Subroutine: StartEffectOnNOISE (Bank 6) Make a sound effect on the NOISE channel |
Sound | Subroutine: MakeSound (Bank 6) Make the current sound effects on the SQ1, SQ2 and NOISE channels |
Sound | Subroutine: MakeSoundOnSQ1 (Bank 6) Make the current sound effect on the SQ1 channel |
Sound | Subroutine: MakeSoundOnSQ2 (Bank 6) Make the current sound effect on the SQ2 channel |
Sound | Subroutine: MakeSoundOnNOISE (Bank 6) Make the current sound effect on the NOISE channel |
Sound | Subroutine: UpdateVibratoSeeds (Bank 6) Update the sound seeds that are used to randomise the vibrato effect |
Sound | Sound data for the sound effects |
Sound | Variable: soundVolume (Bank 6) Volume envelope data for the sound effects |
Sound | Variable: volumeEnvelope (Bank 6) Volume envelope data for the game music |
Sound | Variable: pitchEnvelope (Bank 6) Pitch envelope data for the game music |
Bank 6 (Part 2 of 3)
--------------------
Category | Details |
---|---|
Sound | Data for the tunes played in the game |
Status | Subroutine: DrawGlasses (Bank 6) Draw a pair of dark glasses on the commander image |
Status | Subroutine: DrawRightEarring (Bank 6) Draw an earring in the commander's right ear (i.e. on the left side of the commander image |
Status | Subroutine: DrawLeftEarring (Bank 6) Draw an earring in the commander's left ear (i.e. on the right side of the commander image |
Status | Subroutine: DrawMedallion (Bank 6) Draw a medallion on the commander image |
Status | Subroutine: DrawCmdrImage (Bank 6) Draw the commander image as a coloured face image in front of a greyscale headshot image, with optional embellishments |
Drawing sprites | Subroutine: DrawSpriteImage (Bank 6) Draw an image out of sprites using patterns in sequential tiles in the pattern buffer |
Icon bar | Subroutine: PauseGame (Bank 6) Pause the game and process choices from the pause menu until the game is unpaused by another press of Start |
Dashboard | Update a bar-based indicator on the dashboard |
Dashboard | Update the dashboard |
Dashboard | Variable: conditionAttrs (Bank 6) Sprite attributes for the status condition indicator on the dashboard |
Dashboard | Variable: conditionPatts (Bank 6) Pattern numbers for the status condition indicator on the dashboard |
Dashboard | Draw a specific indicator in the dashboard's missile bar |
Dashboard | Variable: missileNames_b6 (Bank 6) Tile numbers for the four missile indicators on the dashboard, as offsets from the start of tile row 22 |
Equipment | Subroutine: SetEquipmentSprite (Bank 6) Set up the sprites in the sprite buffer for a specific bit of equipment to show on our Cobra Mk III on the Equip Ship screen |
Equipment | Subroutine: SetLaserSprite (Bank 6) Set up the sprites in the sprite buffer for a specific laser to show on our Cobra Mk III on the Equip Ship screen |
Equipment | Subroutine: GetLaserPattern (Bank 6) Get the pattern number for a specific laser's equipment sprite |
Equipment | Variable: equipSprites (Bank 6) Sprite configuration data for the sprites that show the equipment fitted to our Cobra Mk III on the Equip Ship screen |
Equipment | Subroutine: DrawEquipment (Bank 6) Draw the currently fitted equipment onto the Cobra Mk III image on the Equip Ship screen |
Combat demo | Subroutine: ShowScrollText (Bank 6) Show a scroll text and start the combat demo |
Combat demo | Subroutine: DrawScrollInNMI (Bank 6) Configure the NMI handler to draw the scroll text screen |
Combat demo | Populate the line coordinate tables with the pixel lines for one 21-character line of scroll text |
Combat demo | Populate the line coordinate tables with the lines for a single scroll text character |
Combat demo | Subroutine: CalculateGridLines (Bank 6) Reset the line coordinate tables and populate them with the characters for a specified scroll text |
Combat demo | Subroutine: GetScrollDivisions (Bank 6) Set up the division calculations for the scroll text |
Combat demo | Subroutine: DrawScrollText (Bank 6) Display a Star Wars scroll text |
Combat demo | Subroutine: DrawScrollFrames (Bank 6) Draw a scroll text over multiple frames |
Combat demo | Subroutine: ScrollTextUpScreen (Bank 6) Go through the line y-coordinate table at Y1TB, moving each line coordinate up the screen by W2Y (i.e. by one full line of text) |
Combat demo | Subroutine: ProjectScrollText (Bank 6) Project a scroll text coordinate onto the screen |
Combat demo | Subroutine: DrawScrollFrame (Bank 6) Draw one frame of the scroll text |
Bank 6 (Part 3 of 3)
--------------------
Category | Details |
---|---|
Combat demo | Line definitions for characters in the Star Wars scroll text |
Combat demo | The x-coordinates of the scroll text letter grid |
Combat demo | The y-coordinates of the scroll text letter grid |
Combat demo | Variable: scrollText1Lo (Bank 6) Lookup table for the low byte of the address of the scrollText1 text for each language |
Combat demo | Variable: scrollText1Hi (Bank 6) Lookup table for the high byte of the address of the scrollText1 text for each language |
Combat demo | Variable: scrollText2Lo (Bank 6) Lookup table for the low byte of the address of the scrollText2 text for each language |
Combat demo | Variable: scrollText2Hi (Bank 6) Lookup table for the high byte of the address of the scrollText2 text for each language |
Combat demo | Variable: creditsText1Lo (Bank 6) Lookup table for the low byte of the address of the creditsText1 text for each language |
Combat demo | Variable: creditsText1Hi (Bank 6) Lookup table for the high byte of the address of the creditsText1 text for each language |
Combat demo | Variable: creditsText2Lo (Bank 6) Lookup table for the low byte of the address of the creditsText2 text for each language |
Combat demo | Variable: creditsText2Hi (Bank 6) Lookup table for the high byte of the address of the creditsText2 text for each language |
Combat demo | Variable: creditsText3Lo (Bank 6) Lookup table for the low byte of the address of the creditsText3 text for each language |
Combat demo | Variable: creditsText3Hi (Bank 6) Lookup table for the high byte of the address of the creditsText3 text for each language |
Combat demo | Variable: scrollText1_EN (Bank 6) Text for the first scroll text in English |
Combat demo | Variable: scrollText2_EN (Bank 6) Text for the second scroll text in English |
Combat demo | Variable: scrollText1_FR (Bank 6) Text for the first scroll text in French |
Combat demo | Variable: scrollText2_FR (Bank 6) Text for the second scroll text in French |
Combat demo | Variable: scrollText1_DE (Bank 6) Text for the first scroll text in German |
Combat demo | Variable: scrollText2_DE (Bank 6) Text for the second scroll text in German |
Combat demo | Variable: creditsText1 (Bank 6) Text for the first part of the credits scroll text |
Combat demo | Variable: creditsText2 (Bank 6) Text for the second part of the credits scroll text |
Combat demo | Variable: creditsText3 (Bank 6) Text for the third part of the credits scroll text |
Save and load | Subroutine: saveHeader1_EN (Bank 6) The Save and Load screen title in English |
Save and load | Subroutine: saveHeader2_EN (Bank 6) The subheaders for the Save and Load screen title in English |
Save and load | Subroutine: saveHeader1_DE (Bank 6) The Save and Load screen title in German |
Save and load | Subroutine: saveHeader2_DE (Bank 6) The subheaders for the Save and Load screen title in German |
Save and load | Subroutine: saveHeader1_FR (Bank 6) The Save and Load screen title in French |
Save and load | Subroutine: saveHeader2_FR (Bank 6) The subheaders for the Save and Load screen title in French |
Save and load | Variable: xSaveHeader (Bank 6) The text column for the Save and Load screen headers for each language |
Save and load | Variable: saveHeader1Lo (Bank 6) Lookup table for the low byte of the address of the saveHeader1 text for each language |
Save and load | Variable: saveHeader1Hi (Bank 6) Lookup table for the high byte of the address of the saveHeader1 text for each language |
Save and load | Variable: saveHeader2Lo (Bank 6) Lookup table for the low byte of the address of the saveHeader2 text for each language |
Save and load | Variable: saveHeader2Hi (Bank 6) Lookup table for the high byte of the address of the saveHeader2 text for each language |
Save and load | Variable: saveBracketPatts (Bank 6) Pattern numbers for the bracket on the Save and Load screen |
Save and load | Subroutine: PrintSaveHeader (Bank 6) Print header text for the Save and Load screen |
Save and load | Display the Save and Load screen and process saving and loading of commander files |
Save and load | Subroutine: MoveInLeftColumn (Bank 6) Process moving the highlight when it's in the left column (the current commander) |
Save and load | Subroutine: CheckSaveLoadBar (Bank 6) Check the icon bar buttons on the Save and Load icon bar and process any choices |
Controllers | Subroutine: WaitForNoDirection (Bank 6) Wait until the left and right buttons on controller 1 have been released and remain released for at least four VBlanks |
Save and load | Subroutine: MoveToLeftColumn (Bank 6) Move the highlight to the left column (the current commander) |
Save and load | Subroutine: MoveInRightColumn (Bank 6) Process moving the highlight when it's in the right column (the save slots) |
Save and load | Subroutine: MoveInMiddleColumn (Bank 6) Process moving the highlight when it's in the middle column |
Save and load | Subroutine: DrawSaveSlotMark (Bank 6) Draw a slot mark (a dash) next to a saved slot |
Save and load | Subroutine: PrintSaveName (Bank 6) Print the name of a specific save slot |
Save and load | Subroutine: PrintCommanderName (Bank 6) Print the commander name from the commander file in BUF, with the save count added to the end |
Save and load | Subroutine: HighlightSaveName (Bank 6) Highlight the name of a specific save slot |
Save and load | Subroutine: UpdateSaveScreen (Bank 6) Update the Save and Load screen |
Save and load | Subroutine: PrintNameInMiddle (Bank 6) Print the commander name in the middle column using the highlight font |
Save and load | Subroutine: ClearNameInMiddle (Bank 6) Remove the commander name from the middle column |
Save and load | Variable: galaxySeeds (Bank 6) The galaxy seeds to add to a commander save file |
Save and load | Variable: saveSlotAddr1 (Bank 6) The address of the first saved part for each save slot |
Save and load | Variable: saveSlotAddr2 (Bank 6) The address of the second saved part for each save slot |
Save and load | Variable: saveSlotAddr3 (Bank 6) The address of the third saved part for each save slot |
Save and load | Subroutine: ResetSaveBuffer (Bank 6) Reset the commander file buffer at BUF to the default commander |
Save and load | Subroutine: CopyCommanderToBuf (Bank 6) Copy a commander file in the BUF buffer, either from a save slot or from the currently active commander in-game |
Save and load | Subroutine: ResetSaveSlots (Bank 6) Reset the save slots for all eight save slots, so they will fail their checksums and get reset when they are next checked |
Save and load | Subroutine: GetSaveAddresses (Bank 6) Fetch the addresses of the three saved parts for a specific save slot |
Save and load | Subroutine: SaveLoadCommander (Bank 6) Either save the commander from BUF into a save slot, or load the commander from BUF into the game and start the game |
Save and load | Subroutine: CheckSaveSlots (Bank 6) Load the commanders for all eight save slots, one after the other, to check their integrity and reset any that fail their checksums |
Save and load | The data block for the default commander |
Save and load | Subroutine: ResetCommander (Bank 6) Reset the current commander to the default "JAMESON" commander |
Save and load | Copy the default "JAMESON" commander to the buffer at currentSlot |
Flight | Subroutine: DrawLightning (Bank 6) Draw a lightning effect for the launch tunnel and E.C.M. that consists of two random lightning bolts, one above the other |
Flight | Make the hyperspace sound and draw the hyperspace tunnel |
Flight | Variable: hyperspaceColour (Bank 6) The different colours that can be used for the hyperspace effect |
Flight | Subroutine: DrawLaunchBox (Bank 6) Draw a box as part of the launch tunnel animation |
Controllers | Subroutine: InputName (Bank 6) Get a name from the controller for searching the galaxy or changing commander name |
Controllers | Subroutine: ChangeLetter (Bank 6) Choose a letter using the up and down buttons |
Save and load | Subroutine: ChangeCmdrName (Bank 6) Process changing the commander name |
Save and load | Variable: cheatCmdrName (Bank 6) The commander name that triggers cheat mode in each language |
Controllers | Subroutine: SetKeyLogger (Bank 6) Populate the key logger table with the controller button presses |
Start and end | Subroutine: ChooseLanguage (Bank 6) Draw the Start screen and process the language choice |
Start and end | Subroutine: SetChosenLanguage (Bank 6) Set the language-related variables according to the language chosen on the Start screen |
Start and end | Subroutine: SetLanguage (Bank 6) Set the language-related variables for a specific language |
Start and end | The text column for the language buttons on the Start screen |
Start and end | The text row for the language buttons on the Start screen |
Text | Variable: characterEndLang (Bank 6) The number of the character beyond the end of the printable character set in each language |
Text | Variable: decimalPointLang (Bank 6) The decimal point character to use for each language |
Text | Variable: languageLength (Bank 6) The length of each language name |
Text | Low byte of the text token table for each language |
Text | High byte of the text token table for each language |
Text | Variable: extendedTokensLo (Bank 6) Low byte of the extended text token table for each language |
Text | Variable: extendedTokensHi (Bank 6) High byte of the extended text token table for each language |
Text | Variable: languageIndexes (Bank 6) The index of the chosen language for looking up values from language-indexed tables |
Text | Variable: languageNumbers (Bank 6) The language number for each language, as a set bit within a flag byte |
Universe | Calculate system data from the system seeds |
Drawing the screen | Subroutine: ClearDashEdge (Bank 6) Clear the right edge of the dashboard |
Utility routines | Vectors and padding at the end of ROM bank 6 |