![]() |
Game status buffer |
| Address | Length | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5C1A | 1 |
Cleared by EndSegment, which sets it when the terrain was touched in a way that stops the horizontal speed, and tests it again at the end. Other routines also use it.
|
||||||||||||||||||||||||||||||||
| 5C1C | 1 |
One of the values that many routines use for temporary results. The terrain drawing routines keep a screen column in it, for FillSlopeEdge.
|
||||||||||||||||||||||||||||||||
| 5C1D | 1 |
Which of the four tiles in view is being drawn, from 00 to 03: bit 0 is set for a tile below the first and bit 1 for a tile to the right. DrawTerrain sets it. Other routines use it to count tiles that an object overlaps, and for temporary values.
|
||||||||||||||||||||||||||||||||
| 5C1E | 2 |
Two more of the values that many routines use for temporary results.
|
||||||||||||||||||||||||||||||||
| 5C20 | 1 |
The number of segments of the script of the current tile that are not drawn yet, which DrawTerrain sets from the script. Other routines use it for temporary values.
|
||||||||||||||||||||||||||||||||
| 5C22 | 1 |
The number of steps in the current segment, from 01 to 10. DrawTerrain reads it from the script.
|
||||||||||||||||||||||||||||||||
| 5C24 | 1 |
The column step of the type of the current segment without its sign, set by SetUpSegment. Also used by AdjustTerrainSlope.
|
||||||||||||||||||||||||||||||||
| 5C25 | 1 |
The horizontal step of the type of the current segment without its sign, set by SetUpSegment. RunFrame sets it to FF while the ship is tested against the terrain, and MoveObjectAndStop sets it to 80 when an object should stop.
|
||||||||||||||||||||||||||||||||
| 5C26 | 1 |
Set to 99 when the current tile is drawn upside down and to zero when it is not, by DrawTerrain.
|
||||||||||||||||||||||||||||||||
| 5C27 | 1 |
Cleared at the start of each segment. SetUpFlatPiece stores a shape code in it for a segment that goes the way that the horizontal speed does and that starts at the edge of a cell, and FillSlopeEdge tests it.
|
||||||||||||||||||||||||||||||||
| 5C28 | 4 |
Four more of the values that many routines use for temporary results.
|
||||||||||||||||||||||||||||||||
| 5C2C | 1 |
The pixel column of the current step of a segment on the screen, found by FindSegmentAddress and moved on by NextStep. Other routines use it for the position of an object.
|
||||||||||||||||||||||||||||||||
| 5C2D | 1 |
The pixel row of the current step of a segment on the screen, found by FindSegmentAddress and moved on by NextStep. Other routines use it for the position of an object.
|
||||||||||||||||||||||||||||||||
| 5C2E | 1 |
The column where the next piece of a sloped segment starts in its row, set by SetUpPiece and read by DrawSlopeRowsFromEdge. Other routines use the two bytes from here as a word.
|
||||||||||||||||||||||||||||||||
| 5C2F | 1 |
The number of steps of the current segment that have been flagged: it is cleared at the start of each segment and increased by FinishStep_Count.
|
||||||||||||||||||||||||||||||||
| 5C30 | 1 |
Set to FF when the current tile is drawn back to front and to zero when it is not, by DrawTerrain. Other routines use the two bytes from here as a word.
|
||||||||||||||||||||||||||||||||
| 5C31 | 1 |
Cleared by NextStep_Test for each step of a segment. FlagFloorContact and FlagCeilingContact set bit 7, and then bit 0 or bit 1 instead; FlagLeftContact sets bit 3 and FlagRightContact sets bit 2. NextStep_Flags chooses what to do from the result.
|
||||||||||||||||||||||||||||||||
| 5C32 | 1 |
A copy of the flags at ContactFlags that FlagFloorContact and FlagCeilingContact make when they set bit 0 or bit 1, cleared at the start of each segment. DrawVerticalEdge tests it.
|
||||||||||||||||||||||||||||||||
| 5C33 | 1 |
The shape code for the start of a flat segment, read from the script by ReadSegmentShapes and changed when the tile is back to front or upside down.
|
||||||||||||||||||||||||||||||||
| 5C34 | 1 |
The shape code for the end of a flat segment, read from the script by ReadSegmentShapes and changed when the tile is back to front or upside down.
|
||||||||||||||||||||||||||||||||
| 5C35 | 1 |
Set to 80 by SetSlopeParameters when the current segment is upside down, and cleared at the start of each segment. CheckTerrainCollision also uses it as the collision status: 80 once a rectangle has been hit, bit 6 after a vertical bounce, and bit 4 after a slope has been hit.
|
||||||||||||||||||||||||||||||||
| 5C36 | 1 |
Cleared at the start of UpdateShipSpeeds. Left stores 80 here and right stores 03, and RunFrame compares bit 7 with the facing of the ship.
|
||||||||||||||||||||||||||||||||
| 5C37 | 1 |
What is pressed on the keyboard or joystick, set by ReadControls (bit 0 is right, bit 1 is left, bit 3 is up, bit 4 is fire and bit 5 is the extra key).
|
||||||||||||||||||||||||||||||||
| 5C38 | 1 |
A vertical position that BuildShip works out from the height of the ship and that other routines compare with the positions of objects. Also used for the step of the shots.
|
||||||||||||||||||||||||||||||||
| 5C39 | 1 |
The number of frames before the ship can fire again. B734 stores 06 when the ship fires and counts it down, and returns while it is not zero.
|
||||||||||||||||||||||||||||||||
| 5C3A | 1 |
The attribute value for the terrain of a tile on the top row, set by SetRowAttributes and used by ColourSegment.
|
||||||||||||||||||||||||||||||||
| 5C3B | 1 |
The attribute value for the terrain of a tile on the bottom row, set by SetRowAttributes and used by ColourSegment.
|
||||||||||||||||||||||||||||||||
| 5C3C | 1 |
Not zero while the world scrolls in at the start of a life: FF at first and 03 once the ground has been found (see LookForGround). While it is set DrawTerrain treats all of the tiles as changed and ColourSegment does not colour them.
|
||||||||||||||||||||||||||||||||
| 5C3D | 1 |
The number of times that the map position moved in the frame, set by ScrollWorld (and set by DrawTerrain when ScrollInFlag is not zero). When it is not zero DrawTerrain makes the records of the segments of the tiles again.
|
||||||||||||||||||||||||||||||||
| 5C3E | 1 | |||||||||||||||||||||||||||||||||
| 5C3F | 1 |
Two normally, and four when the flag at F5F2 is set. BuildShip sets it. It is the limit of the vertical scroll speed, used by UpdateVerticalScrollSpeed.
|
||||||||||||||||||||||||||||||||
| 5C40 | 64 |
More variables used by the game. The first byte is set to FF when the ship is hit and is cleared at the start of the next frame. Purpose not yet known for the rest.
|
||||||||||||||||||||||||||||||||
| 9974 | 216 |
Nine slots of 18 bytes, one for each enemy or similar object. Each slot is laid out as follows:
|
||||||||||||||||||||||||||||||||
| 9A4C | 24 |
A tenth slot in the same format as the enemy slots, used by UpdateCrystalStack.
|
||||||||||||||||||||||||||||||||
| 9A64 | 2 |
A two byte counter that is incremented every frame, for example by RunTitleMenu and RunFrame.
|
||||||||||||||||||||||||||||||||
| 9BCB | 4 |
The two random bytes made by the routine at RandomNumber, followed by the address of the next byte of memory it will mix in (high byte first).
|
||||||||||||||||||||||||||||||||
| 9BD6 | 4 |
The state shared by the four flickering beams drawn by UpdateBeams.
|
||||||||||||||||||||||||||||||||
| 9D2F | 1 |
The number of frames that remain before a beam can hurt the ship again.
|
||||||||||||||||||||||||||||||||
| 9D43 | 16 |
Four entries of four bytes, one for each beam that is currently drawn: the screen address (low byte first), the number of bytes and the pattern.
|
||||||||||||||||||||||||||||||||
| 9DA9 | 8 |
The eight patterns that a beam can have.
|
||||||||||||||||||||||||||||||||
| A1D3 | 6 |
The positions and sizes of the two sprites that are drawn together by DrawSprites. The first sprite is the one that is erased and the second sprite is the one that is drawn.
|
||||||||||||||||||||||||||||||||
| A289 | 2 |
Two vertical positions that are used by DrawSpritesDirectly.
|
||||||||||||||||||||||||||||||||
| A2F8 | 11 |
Variables used by DrawSprites.
|
||||||||||||||||||||||||||||||||
| A80B | 154 |
Six slots of 1A bytes for the objects of the planet that are near the ship. They have the same layout as the slots at EnemySlots, with two more bytes at the end: the index in the table at 5C94 of the map entry that the object came from (at offsets 18 and 19). A slot with a type of FF is free. The last slot is cut short by the code at AddToStack.
|
||||||||||||||||||||||||||||||||
| ABA4 | 4 |
The box of the object that is being tested for a collision: horizontal position, vertical position, width in pixels and height in pixels.
|
||||||||||||||||||||||||||||||||
| AF01 | 3 |
The width in cells, the height in cells and the attribute of the area to fill, as used by FillAttributes.
|
||||||||||||||||||||||||||||||||
| B320 | 2 |
The fraction of a pixel that is left over from the vertical scroll speed worked out by UpdateVerticalScrollSpeed.
|
||||||||||||||||||||||||||||||||
| B37A | 96 |
Four slots of 18 bytes for the shots that the ship fires, in the same layout as the slots at EnemySlots. The routine at UpdateShots updates them.
|
||||||||||||||||||||||||||||||||
| B625 | 3 |
The width in cells, the height in cells and the attribute of the area that SetShotAttributes fills in the same way as SetObjectAttributes.
|
||||||||||||||||||||||||||||||||
| B730 | 1 |
Bit 0 changes every time the ship fires. Bit 2 is flipped by CheckSpecialShot to make LaunchShot launch a special shot.
|
||||||||||||||||||||||||||||||||
| BF7F | 6 |
Used while checking the terrain: the map column and horizontal position of the object, then its map zone and vertical position, then a third position that is used by SelectMirroredErase.
|
||||||||||||||||||||||||||||||||
| C0E6 | 4 |
The addresses of the offsets of the layer and of the position of the current star.
|
||||||||||||||||||||||||||||||||
| C0EA | 36 |
The horizontal and vertical positions of the eighteen stars. Bit 0 of the horizontal position is set while the star is being shown.
|
||||||||||||||||||||||||||||||||
| C184 | 12 |
The distance that each of the three layers of stars has moved, as a horizontal and a vertical offset, followed by a copy that is kept while the layers are being updated.
|
||||||||||||||||||||||||||||||||
| C1A9 | 1 |
The height of the ship in pixels, which is made taller by parts that are fitted.
|
||||||||||||||||||||||||||||||||
| C1AA | 2 |
The address in the buffer at ShipWorkArea that the ship is drawn from.
|
||||||||||||||||||||||||||||||||
| C279 | 6 |
Used to draw the pieces that are next to the ship. The first byte has bit 6 set when a piece is being delivered, and otherwise holds the direction that the ship was facing when it started. The second is set to 80 after a piece is drawn, and the others are the positions of the two pieces.
|
||||||||||||||||||||||||||||||||
| C6C2 | 16 |
The object that is used to draw the flame at the side of the ship, followed by a copy that is kept for the other player. The byte at C6D0 is set by CheckTerrainCollision when the ship has landed.
|
||||||||||||||||||||||||||||||||
| C78F | 12 |
The object that is used to draw the flame under the ship.
|
||||||||||||||||||||||||||||||||
| C7BC | 12 | |||||||||||||||||||||||||||||||||
| C7FA | 2 |
The fraction of a pixel that is left over from the horizontal speed worked out by UpdateHorizontalScrollSpeed.
|
||||||||||||||||||||||||||||||||
| C8E5 | 32 |
The player's ship. The first 18 bytes have the layout of an enemy slot, as described at EnemySlots, and then there are some extra fields:
|
||||||||||||||||||||||||||||||||
| C905 | 1 |
The height of the stack of units that the ship carries (up to 12). Also see AddToStack.
|
||||||||||||||||||||||||||||||||
| C906 | 33 |
The state that ResetLife copies to the ship object at ShipObject at the start of each life.
|
||||||||||||||||||||||||||||||||
| CA1D | 20 | |||||||||||||||||||||||||||||||||
| CC4B | 2 |
The amount of fuel that is left. The high byte is the row of the fuel gauge: 42 when the tank is full and BE when it is empty.
|
||||||||||||||||||||||||||||||||
| CC62 | 1 |
The pixel row that the fuel gauge is currently showing, which UpdateFuelGauge moves one row at a time towards the high byte of the fuel level.
|
||||||||||||||||||||||||||||||||
| CCBA | 1 |
The vertical scroll speed: how many pixel rows the world moves each frame. It is negative when the ship is going up the screen.
|
||||||||||||||||||||||||||||||||
| CCBB | 1 |
The horizontal scroll speed: how many pixels the world moves sideways each frame. It is negative when the ship is going to the left.
|
||||||||||||||||||||||||||||||||
| CCBC | 1 |
Flags for the layers of stars. Bit 0 is set when a star has been drawn (see UpdateStarLayer and CheckStarPosition). Purpose not yet known for the other bits.
|
||||||||||||||||||||||||||||||||
| CCBD | 2 |
The address of the table of shapes for the current horizontal scroll offset, which is one of ShapeTableShiftTwo, ShapeTableShiftFour, ShapeTableShiftSix and ShapeTableShiftZero. DrawTerrain sets it.
|
||||||||||||||||||||||||||||||||
| CE35 | 1 |
The number of pixels that the current type of segment moves across the screen at each step, which is negative if it goes to the left. It is the first of the three steps that SetSlopeParameters loads, and is also used by the routines that draw the ship parts.
|
||||||||||||||||||||||||||||||||
| CE36 | 1 |
The second of the steps that SetSlopeParameters loads: the number added to the screen address at each step of a segment, which is negative if it goes to the left.
|
||||||||||||||||||||||||||||||||
| CE37 | 1 |
The third of the steps that SetSlopeParameters loads: the number of pixel rows that the current type of segment moves down the screen at each step, which is zero for a flat segment.
|
||||||||||||||||||||||||||||||||
| CE3A | 4 |
Four bytes that many of the routines use for temporary values, and which FindTilesOverlapped uses for the position of an object within a tile.
|
||||||||||||||||||||||||||||||||
| CE3E | 1 |
The number of rows of attributes that ColourSegment colours at each step of a segment.
|
||||||||||||||||||||||||||||||||
| CE3F | 1 |
The number of pixel rows that the world moves vertically in a frame, which is the vertical speed without its sign. ScrollWorld sets it. DrawVerticalEdge uses it as the number of rows of the edge to fill, with FillFourEdgeRows if it is four and FillTwoEdgeRows otherwise.
|
||||||||||||||||||||||||||||||||
| CE40 | 1 |
Set by SetUpPiece to the pixel row where the picture of a segment starts. LocatePicture reads it.
|
||||||||||||||||||||||||||||||||
| CE41 | 1 |
How far the view of the world is across the first tile, from 00 to 20 pixels. ScrollWorld_Horizontal adds the horizontal speed to it. Its bottom three bits choose which of the tables of shifted pictures is used.
|
||||||||||||||||||||||||||||||||
| CE42 | 1 |
How far the view of the world is down the first tile, from 00 to A0 pixel rows. ScrollWorld_Vertical adds the vertical speed to it.
|
||||||||||||||||||||||||||||||||
| CE43 | 1 |
The pixel column where the current segment starts. The script gives it and NextStep adds the horizontal step at each step of the segment.
|
||||||||||||||||||||||||||||||||
| CE44 | 1 |
The pixel row where the current segment starts. The script gives it and NextStep subtracts the vertical step at each step of the segment.
|
||||||||||||||||||||||||||||||||
| CE45 | 1 |
The pixel column that the tests of a segment at DrawTerrain_Test compare the segment with. ScrollWorld_Horizontal subtracts the horizontal speed from it, and when it leaves the range 08 to E8 (the width of the area of the terrain) the map position moves one tile and it wraps round.
|
||||||||||||||||||||||||||||||||
| CE46 | 1 |
The pixel row that the tests of a segment at DrawTerrain_Test compare the segment with. ScrollWorld_Vertical subtracts the vertical speed from it, and when it leaves the range 17 to B7 (the height of the area of the terrain) the map position moves one tile and it wraps round.
|
||||||||||||||||||||||||||||||||
| CE47 | 2 |
The address of the picture of the current segment, which SetUpPiece sets and LocatePicture reads.
|
||||||||||||||||||||||||||||||||
| CE49 | 2 |
The screen address where the drawing of the current segment is up to.
|
||||||||||||||||||||||||||||||||
| CE4B | 2 |
A pointer into PictureOffsets that DrawTerrain sets: to the start of the table when the horizontal offset has no pixels to the side of a whole byte, or one byte on otherwise. SetUpPiece adds the offset of the type to set SegmentPictureOffsets.
|
||||||||||||||||||||||||||||||||
| CE4D | 2 |
The address in the script of the next segment, which ReadSegmentShapes sets.
|
||||||||||||||||||||||||||||||||
| CE4F | 2 |
A screen address that SetUpFlatPiece_Skip and FindSegmentAddress store. FinishStep and FillSlopeEdge read it.
|
||||||||||||||||||||||||||||||||
| CE51 | 2 |
The address of the six bytes in PictureOffsets for the type of the current segment, which SetUpPiece sets.
|
||||||||||||||||||||||||||||||||
| CE53 | 1 |
|
||||||||||||||||||||||||||||||||
| CE54 | 1 |
The number of steps of the current segment that have been drawn so far.
|
||||||||||||||||||||||||||||||||
| CE55 | 1 |
The pixel column where the first step that was seen of the current segment started, which NoteSegmentStart stores.
|
||||||||||||||||||||||||||||||||
| CE56 | 1 |
The pixel row where the first step that was seen of the current segment started, which NoteSegmentStart stores.
|
||||||||||||||||||||||||||||||||
| CE57 | 2 |
The map column (in the first byte) and map row (in the second) of the tile at the top left of the view of the world.
|
||||||||||||||||||||||||||||||||
| CE59 | 1 |
A copy of the horizontal step of the type of the current segment. It is zero for a vertical segment.
|
||||||||||||||||||||||||||||||||
| CE5A | 1 |
A copy of the vertical step of the type of the current segment, which is set to 04 when it is zero. Some routines use it as a count of rows.
|
||||||||||||||||||||||||||||||||
| D0BC | 1 |
What the ship has collided with: zero for nothing, 80 for an object, FF or 01 for the terrain. The routines that detect collisions set it and C5D2 clears it each frame.
|
||||||||||||||||||||||||||||||||
| D85D | 1 |
Set to zero when each segment is started and to FF by NextStep when the last step of a flat segment is found to be at the right edge of the area. DrawEdgePixels and DrawVerticalEdge test it.
|
||||||||||||||||||||||||||||||||
| DC87 | 2 |
The address in the list at TileScriptAddresses that DrawTerrain reads next.
|
||||||||||||||||||||||||||||||||
| DC89 | 8 |
The addresses of the scripts that draw the four tiles that are on the screen, which MakeTiles gets from the table at TileScriptPointers.
|
||||||||||||||||||||||||||||||||
| DC91 | 4 | |||||||||||||||||||||||||||||||||
| DC95 | 1 |
The attribute for the background of the map rows above row 0C, which BeginLife gets from the table at PlanetAttributes.
|
||||||||||||||||||||||||||||||||
| DC96 | 1 |
The attribute for the background of the map rows from row 0C down, which BeginLife gets from the table at PlanetAttributes.
|
||||||||||||||||||||||||||||||||
| DDF2 | 1 |
Set by BeginLife to one when the horizontal position of the ship is an even number, in which case the bottom of the playfield is filled with a chequered pattern.
|
||||||||||||||||||||||||||||||||
| DDF3 | 2 |
Not referenced by the code.
|
||||||||||||||||||||||||||||||||
| DDF5 | 2 |
The number of map objects in the column that the left side of the screen is in and in the one to its right, set by LoadMapObjects.
|
||||||||||||||||||||||||||||||||
| DDF7 | 1 |
The number of the map column that is to the right of the one that the left side of the screen is in, set by GetTile. It wraps round from 5F to 00.
|
||||||||||||||||||||||||||||||||
| E41B | 1 |
The direction of the current segment, which is 01 when the second parameter of its slope is negative (the segment goes to the left) and FF when it is not. It is set by SetSlopeParameters.
|
||||||||||||||||||||||||||||||||
| F10F | 3 |
The area of attributes for the background of the playfield, which ColourPlayfield fills: 1C wide and 14 high. BeginLife sets the attribute.
|
||||||||||||||||||||||||||||||||
| F1FF | 3 |
The area of attributes that ColourShip fills: the width, the height in rows and the attribute.
|
||||||||||||||||||||||||||||||||
| F22A | 17 |
The values that DrawFrame uses to draw the frame of the title screen, which has the same layout as the table at FrameParameters.
|
||||||||||||||||||||||||||||||||
| F2E2 | 1 |
Is zero for a game with one player and not zero for a game with two players, which the menu at RunTitleMenu sets.
|
||||||||||||||||||||||||||||||||
| F5E7 | 29 |
The state of the player who is up. The state of the other player is at OtherPlayerState in the same layout, and SwapPlayers swaps the two.
|
||||||||||||||||||||||||||||||||
| F604 | 76 |
Nineteen sites for items, of four bytes each, that ChooseItemSites chooses. The sites are the map column, the map row, and the horizontal and vertical positions. The first eleven are for parts and the others for items. The first byte of a site that has been taken has bit 7 set.
|
||||||||||||||||||||||||||||||||
| F650 | 105 |
The state of the other player, in the same layout as CurrentPlayerState.
|
||||||||||||||||||||||||||||||||
| F6B9 | 306 |
Cleared by BeginLife at the start of each life. BuildShip builds the graphic of the ship from ShipBaseGraphic at ShipWorkArea_ShipGraphic.
|
||||||||||||||||||||||||||||||||
| FA00 | 512 |
Tables of shifted bytes built by BuildTables when the game starts, used by the sprite drawing routines. The first table holds two pages of two byte values for each of the shifts by two, four and six bits. The contents at the time of the snapshot are left over from loading and are replaced when the tables are built.
|
||||||||||||||||||||||||||||||||
| FC10 | 1008 |
The rest of the shift tables.
|