ORG &0400 \ Set the assembly address to &0400 .leftSegment SKIP 80 \ For each track line, the index of the segment within \ the track segment list for the left verge \ \ [Show more]Name: Main variable workspace (Part 2 of 4) [Show more] Type: Workspace Address: &0400 to &07FF Category: Workspaces Summary: The main block of game variablesContext: See this workspace in context in the source code References: No direct references to this workspace in this source file\ \ This variable is used by the following: \ \ * DrawTrack \ * GetColour (Part 2 of 3) \ * GetColourSup \ * MapSegmentsToLines \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.rightSegment SKIP 80 \ For each track line, the index of the segment within \ the track segment list for the right verge \ \ [Show more]\ \ This variable is used by the following: \ \ * DrawTrack \ * GetColour (Part 3 of 3) \ * GetColourSup \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.driverGridRow SKIP 20 \ The grid row for each driver (0 to 9) \ \ There are two cars per grid row, with grid row 0 at \ the front including the car in pole position \ \ There are 20 cars, in rows 0 to 9 \ \ Indexed by driver number (0 to 19) \ \ Gets set in InitialiseDrivers \ \ [Show more]\ \ This variable is used by the following: \ \ * InitialiseDrivers \ * MainLoop (Part 5 of 6) \ * SetDriverSpeed \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.driverLapNumber SKIP 20 \ The current lap number for each driver \ \ Indexed by driver number (0 to 19) \ \ [Show more]\ \ This variable is used by the following: \ \ * ClearTotalRaceTime \ * FinishRace \ * MoveObjectBack \ * ProcessOvertaking (Part 1 of 3) \ * ResetVariables \ * UpdateLaps \ * UpdateLapTimers \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.driversInOrder2 SKIP 20 \ Used to store a copy of the driversInOrder list \ \ [Show more]\ \ This variable is used by the following: \ \ * MainLoop (Part 5 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.totalRaceMinutes SKIP 20 \ Minutes of each driver's total race time, stored in \ BCD \ \ Set to &80 in ResetVariables (80 minutes) \ \ [Show more]\ \ This variable is used by the following: \ \ * AddTimeToTimer \ * ClearTotalRaceTime \ * ResetVariables \ * SortDrivers \ * UpdateLaps \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.totalPointsTop SKIP 20 \ Top byte of total accumulated points for each driver \ \ Indexed by driver number (0 to 19) \ \ Gets set to 0 in InitialiseDrivers \ \ Stored as a 24-bit value (totalPointsTop totalPointsHi \ totalPointsLo) \ \ [Show more]\ \ This variable is used by the following: \ \ * AddRacePoints \ * InitialiseDrivers \ * PrintDriverTable \ * SortDrivers \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.tyreRightEdge SKIP 80 \ Storage for the first track pixel byte along the right \ edge of the left tyre \ \ This table is used to store the track pixel byte that \ would be shown along the edge of the left tyre, but \ which is partially obscured by the edge \ \ This is stored so we can retrieve it when masking the \ pixel byte with the tyre edge when we draw the track \ line that starts at the edge of the left tyre \ \ There is a byte for each track line from 43 (the track \ line at the top of the dashboard) down to line 3 (the \ lowest track line, just above where the wing mirror \ joins the car body) \ \ Lines 0 to 2 are not used \ \ [Show more]\ \ This variable is used by the following: \ \ * CopyTyreDashEdges \ * DrawFence (Part 2 of 2) \ * DrawTrackView (Part 3 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.rightGrassStart SKIP 80 \ For each track line, the block number where the grass \ starts to the right of the track \ \ [Show more]\ \ This variable is used by the following: \ \ * GetColour (Part 1 of 3) \ * GetColourSup \ * ResetTrackLines \ * vergeTableHi \ * vergeTableLo \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.leftVergeStart SKIP 80 \ For each track line, the block number where the left \ track verge starts \ \ [Show more]\ \ This variable is used by the following: \ \ * GetColour (Part 1 of 3) \ * GetColourSup \ * ResetTrackLines \ * vergeTableHi \ * vergeTableLo \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.configStop SKIP 1 \ A key has been pressed that stops the race \ \ * Bit 5 set = retire from race/lap \ (SHIFT-f7 pressed) \ \ * Bit 7 and bit 6 set = pit stop \ (SHIFT-f0 pressed) \ \ * Bit 7 set and bit 6 clear = restart game \ (SHIFT and right arrow pressed) \ \ Zeroed in SetupGame \ \ [Show more]\ \ This variable is used by the following: \ \ * FinishRace \ * HeadToTrack \ * MainDrivingLoop (Part 1 of 5) \ * MainDrivingLoop (Part 4 of 5) \ * MainDrivingLoop (Part 5 of 5) \ * MainLoop (Part 1 of 6) \ * ProcessShiftedKeys \ * SetupGame \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.configJoystick SKIP 1 \ A key has been pressed to set joystick or keyboard \ \ * No bits set = keyboard \ (SHIFT-f1 pressed) \ \ * Bit 7 set = joystick \ (SHIFT-f2 pressed) \ \ Zeroed in SetupGame \ \ [Show more]\ \ This variable is used by the following: \ \ * ProcessDrivingKeys (Part 1 of 6) \ * ProcessDrivingKeys (Part 3 of 6) \ * ProcessDrivingKeys (Part 5 of 6) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.configVolume SKIP 1 \ A key has been pressed to change the volume \ \ * Bit 7 and bit 6 set = volume down \ (SHIFT-f4 pressed) \ \ * Bit 7 clear and bit 6 set = volume up \ (SHIFT-f5 pressed) \ \ Zeroed in SetupGame \ \ [Show more]\ \ This variable is used by the following: \ \ * ProcessShiftedKeys \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.configPause SKIP 1 \ A key has been pressed to pause the game \ \ * Bit 7 set = pause game \ (COPY pressed) \ \ * Bit 6 set = unpause game \ (DELETE pressed) \ \ Zeroed in SetupGame \ \ [Show more]\ \ This variable is used by the following: \ \ * ProcessShiftedKeys \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.configAssist SKIP 1 \ A key has been pressed to toggle computer assisted \ steering (CAS) \ \ * No bits set = disable computer assisted steering \ (SHIFT-f3 pressed) \ \ * Bit 7 set = enable computer assisted steering \ (SHIFT-f6 pressed) \ \ Zeroed in SetupGame \ \ [Show more]\ \ This variable is used by the following: \ \ * GetSteeringAssist \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSKIP 5 \ These bytes appear to be unused .volumeLevel SKIP 1 \ The game's volume level \ \ This uses the operating system's volume scale, with \ -15 being full volume and 0 being silent \ \ Set to -10 (246) in SetupGame \ \ [Show more]\ \ This variable is used by the following: \ \ * MakeDrivingSounds \ * MakeSound \ * ProcessShiftedKeys \ * SetupGame \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSKIP 1 \ This byte appears to be unused .rightVergeStart SKIP 80 \ For each track line, the block number where the right \ track verge starts \ \ [Show more]\ \ This variable is used by the following: \ \ * GetColour (Part 1 of 3) \ * GetColourSup \ * ResetTrackLines \ * vergeTableHi \ * vergeTableLo \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.leftTrackStart SKIP 80 \ For each track line, the block number where the track \ starts (i.e. the left edge of the black track) \ \ [Show more]\ \ This variable is used by the following: \ \ * GetColour (Part 1 of 3) \ * GetColour (Part 2 of 3) \ * GetColourSup \ * ResetTrackLines \ * vergeTableHi \ * vergeTableLo \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.bestLapTenths SKIP 20 \ Tenths of seconds of each driver's best lap time, \ stored in BCD \ \ Indexed by driver number (0 to 19) \ \ [Show more]\ \ This variable is used by the following: \ \ * PrintTimer \ * ResetBestLapTime \ * SortDrivers \ * UpdateLaps \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.clockTenths SKIP 1 \ Tenths of seconds for the clock timer \ \ The clock timer counts the time spent on the track, so \ that's the total amount of qualifying time, or the \ time spent throughout an entire race \ \ [Show more]\ \ This variable is used by the following: \ \ * AddTimeToTimer \ * UpdateLaps \ * ZeroTimer \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.lapTenths SKIP 1 \ Tenths of seconds for the lap timer \ \ The lap timer counts the time spent on the current lap SKIP 2 \ These bytes appear to be unused .bestLapSeconds SKIP 20 \ Seconds of each driver's best lap time, stored in BCD \ \ Indexed by driver number (0 to 19) \ \ [Show more]\ \ This variable is used by the following: \ \ * MainLoop (Part 4 of 6) \ * PrintTimer \ * ResetBestLapTime \ * SortDrivers \ * UpdateLaps \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.clockSeconds SKIP 1 \ Seconds for the clock timer \ \ The clock timer counts the time spent on the track, so \ that's the total amount of qualifying time, or the \ time spent throughout an entire race \ \ [Show more]\ \ This variable is used by the following: \ \ * AddTimeToTimer \ * ProcessTime \ * UpdateLaps \ * ZeroTimer \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.lapSeconds SKIP 1 \ Seconds for the lap timer \ \ The lap timer counts the time spent on the current lap SKIP 2 \ These bytes appear to be unused .bestLapMinutes SKIP 20 \ Minutes of each driver's best lap time, stored in BCD \ \ Indexed by driver number (0 to 19) \ \ [Show more]\ \ This variable is used by the following: \ \ * MainLoop (Part 4 of 6) \ * PrintTimer \ * ResetBestLapTime \ * SortDrivers \ * UpdateLaps \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.clockMinutes SKIP 1 \ Minutes for the clock timer \ \ The clock timer counts the time spent on the track, so \ that's the total amount of qualifying time, or the \ time spent throughout an entire race \ \ [Show more]\ \ This variable is used by the following: \ \ * AddTimeToTimer \ * UpdateLaps \ * UpdateLapTimers \ * ZeroTimer \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.lapMinutes SKIP 1 \ Minutes for the lap timer \ \ The lap timer counts the time spent on the current lap SKIP 2 \ These bytes appear to be unused .objTrackSection SKIP 24 \ The number of the track section * 8 for each object \ \ In the Silverstone track there are 24 track sections \ numbered from 0 to 23, so this ranges from 0 to 184 \ \ [Show more]\ \ This variable is used by the following: \ \ * BuildRoadSign \ * GetFirstSegment \ * GetSectionAngles (Part 2 of 3) \ * GetSegmentSteering \ * GetTrackSegment (Part 1 of 3) \ * GetTrackSegment (Part 2 of 3) \ * MoveCars (Part 1 of 2) \ * MoveObjectBack \ * MoveObjectForward \ * ResetVariables \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.segmentVector SKIP 1 \ The segment vector number for a track segment in the \ track segment buffer \ \ [Show more]\ \ This variable is used by the following: \ \ * ApplyElevation (Part 2 of 5) \ * BuildCarObjects (Part 1 of 3) \ * GetTrackSegment (Part 3 of 3) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.segmentSteering SKIP 1 \ The carSteering value to steer round the corner for a \ track segment in the track segment buffer \ \ The various bits are as for carSteering: \ \ * Bits 0-5 = the amount of steering as a positive \ value (0 to 31) \ \ * Bit 6 = controls whether to apply steering in the \ MoveCars routine \ \ * Clear = always apply steering \ \ * Set = only apply steering if there is enough \ room on the track \ \ * Bit 7 = the direction of the steering \ \ * Clear = steer left \ \ * Set = steer right \ \ [Show more]\ \ This variable is used by the following: \ \ * AssistSteering \ * BuildVisibleCar \ * GetSegmentSteering \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.segmentFlags SKIP 1 \ Flags for a track segment in the track segment buffer \ \ Based on the track section flags for the track section \ containing the segment, but updated for each segment \ \ [Show more]\ \ This variable is used by the following: \ \ * GetFirstSegment \ * GetTrackSegment (Part 2 of 3) \ * GetVergeAndMarkers (Part 1 of 4) \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSKIP 39 * 3 \ The track segment buffer contains data for 40 track \ segments, with three bytes per segment, so this \ reserves space for the other 39 SKIP 8 \ These bytes appear to be unused .lineBufferPixel SKIP 40 \ The original screen contents of each pixel in the line \ buffer \ \ [Show more]\ \ This variable is used by the following: \ \ * DrawDashboardLine \ * EraseRevCounter \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.lineBufferAddrLo SKIP 40 \ The low byte of the screen address of each pixel in \ the line buffer \ \ Stored as a 16-bit value (lineBufferAddrHi \ lineBufferAddrLo) \ \ [Show more]\ \ This variable is used by the following: \ \ * DrawDashboardLine \ * EraseRevCounter \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned above.lineBufferAddrHi SKIP 40 \ The low byte of the screen address of each pixel in \ the line buffer \ \ Stored as a 16-bit value (lineBufferAddrHi \ lineBufferAddrLo) \ \ [Show more]\ \ This variable is used by the following: \ \ * DrawDashboardLine \ * EraseRevCounter \ \ This list only includes code that refers to the \ variable by name; there may be other references to \ this memory location that don't use this label, and \ these will not be mentioned aboveSKIP 8 \ These bytes appear to be unused