Skip to navigation

Revs on the BBC Micro

Revs H source

Name: xVergeRightLo [Show more] Type: Variable Category: Track geometry Summary: Low byte of segment yaw angles along the right track verge in front of the player (i.e. along the x-axis)
Stored as a 16-bit value (xVergeRightHi xVergeRightLo).
ORG &5E40 .xVergeRightLo SKIP 40
Name: xVergeLeftLo [Show more] Type: Variable Category: Track geometry Summary: Low byte of segment yaw angles along the left track verge in front of the player (i.e. along the x-axis)
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (xVergeLeftHi xVergeLeftLo).
.xVergeLeftLo SKIP 40
Name: xVergeRightHi [Show more] Type: Variable Category: Track geometry Summary: High byte of segment yaw angles along the right track verge in front of the player (i.e. along the x-axis)
Stored as a 16-bit value (xVergeRightHi xVergeRightLo).
.xVergeRightHi SKIP 40
Name: xVergeLeftHi [Show more] Type: Variable Category: Track geometry Summary: High byte of segment yaw angles along the left track verge in front of the player (i.e. along the x-axis)
Context: See this variable on its own page References: This variable is used as follows: * GetTrackAndMarkers calls xVergeLeftHi * SetBackground calls xVergeLeftHi

Stored as a 16-bit value (xVergeLeftHi xVergeLeftLo).
.xVergeLeftHi SKIP 40
Name: vergeDataRight [Show more] Type: Variable Category: Track geometry Summary: Data (such as colour) for the verge marks on the right side of the track
* Bits 0-1: colour of the verge mark * 0 = black * 1 = red * 2 = white * Bit 7 gets set in MapSegmentsToLines when this segment is hidden behind a hill
.vergeDataRight SKIP 24
Name: scaledScaffold [Show more] Type: Variable Category: 3D objects Summary: Storage for an object's scaled scaffold Deep dive: Scaling objects with scaffolds
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdges calls scaledScaffold * ScaleObject calls scaledScaffold
.scaledScaffold SKIP 16
Name: vergeDataLeft [Show more] Type: Variable Category: Track geometry Summary: Data (such as colour) for the verge marks on the left side of the track
Context: See this variable on its own page References: No direct references to this variable in this source file

* Bits 0-1: colour of the verge mark * 0 = black * 1 = red * 2 = white * Bit 7: gets set in MapSegmentsToLines
.vergeDataLeft SKIP 24
Name: yVergeRight [Show more] Type: Variable Category: Track geometry Summary: Segment pitch angles along the right track verge in front of the player (i.e. along the up-down y-axis)
.yVergeRight SKIP 24
Name: numberOfPlayers [Show more] Type: Variable Category: Drivers Summary: The number of players
Context: See this variable on its own page References: This variable is used as follows: * AwardRacePoints calls numberOfPlayers * MainLoop (Part 5 of 6) calls numberOfPlayers
.numberOfPlayers SKIP 1
Name: lowestPlayerNumber [Show more] Type: Variable Category: Drivers Summary: The number of the player with the lowest player number
.lowestPlayerNumber SKIP 1 \ Contains 20 minus the number of players, so that's: \ \ * 19 if there is one player \ * 18 if there are two players \ \ and so on, down to 0 if there are 20 players \ \ Human players take the place of drivers with higher \ numbers, so the first player takes the place of driver \ 19 (the aptly called Dummy Driver, as they never get \ to race), and the second player takes the place of \ driver 18 (Peter Out), the third player replaces \ driver 17 (Rick Shaw) and so on \ \ So this not only represents the lowest player number, \ but also the highest non-human driver number (which is \ lowestPlayerNumber - 1)
Name: raceClass [Show more] Type: Variable Category: Drivers Summary: The class of the current race
.raceClass SKIP 1 \ The class of race: \ \ * 0 = Novice \ \ * 1 = Amateur \ \ * 2 = Professional
Name: qualifyingTime [Show more] Type: Variable Category: Drivers Summary: The number of minutes of qualifying lap time
.qualifyingTime SKIP 1 \ The number of minutes of qualifying lap time, minus \ one, as follows: \ \ * 4 gives us 5 minutes of qualifying time \ \ * 9 gives us 10 minutes of qualifying time \ \ * 25 gives us 26 minutes of qualifying time \ \ * 255 gives us infinite time (for practice) \ \ Note that the third value should be 19 to match the \ menu option of 20 minutes, but the value in the \ timeFromOption table is incorrect
Name: competitionStarted [Show more] Type: Variable Category: Drivers Summary: A flag to indicate whether or not the competition has started
.competitionStarted SKIP 1 \ Flag to indicate whether the competition has started: \ \ * 0 = the competition has not started \ \ * Non-zero = the competition has started
Name: frontWingSetting [Show more] Type: Variable Category: Driving model Summary: The front wing setting, as entered by the player
Context: See this variable on its own page References: This variable is used as follows: * GetWingSettings calls frontWingSetting * ScaleWingSettings calls frontWingSetting
.frontWingSetting SKIP 1
Name: rearWingSetting [Show more] Type: Variable Category: Driving model Summary: The rear wing setting, as entered by the player
Context: See this variable on its own page References: This variable is used as follows: * GetWingSettings calls rearWingSetting * ScaleWingSettings calls rearWingSetting
.rearWingSetting SKIP 1
Name: lapsMenuOption [Show more] Type: Variable Category: Drivers Summary: The menu option chosen from the laps menu (0 to 2)
Context: See this variable on its own page References: This variable is used as follows: * MainLoop (Part 5 of 6) calls lapsMenuOption * PrintDriverTable calls lapsMenuOption
.lapsMenuOption SKIP 1
Name: baseSpeed [Show more] Type: Variable Category: Drivers Summary: The base speed for each car, copied from the track data
Context: See this variable on its own page References: This variable is used as follows: * GetSectionSteering calls baseSpeed * SetDriverSpeed calls baseSpeed
.baseSpeed SKIP 1 \ The base speed for each car, which is faster with a \ higher class of race (this value is taken from the \ track data at trackBaseSpeed): \ \ * 134 = Novice \ \ * 146 = Amateur \ \ * 152 = Professional SKIP 7
Name: yVergeLeft [Show more] Type: Variable Category: Track geometry Summary: Segment pitch angles along the left track verge in front of the player (i.e. along the up-down y-axis)
Context: See this variable on its own page References: This variable is used as follows: * GetSectionAngles (Part 3 of 3) calls yVergeLeft * GetTrackAndMarkers calls yVergeLeft
.yVergeLeft SKIP 24
Name: backgroundColour [Show more] Type: Variable Category: Screen buffer Summary: The background colour for each track line Deep dive: Drawing the track view
This table contains colour information for each of the 80 track lines. It stores the colour, the verge type and details of the routine in which the colour data was written, as follows: * Bits 0-1: background colour of track line (this value is a logical colour and the physical colour is looked up from the colourPalette table) %00 = logical colour 0 %01 = logical colour 1 %10 = logical colour 2 %11 = logical colour 3 * Bit 2: records which routine set this colour, along with bits 5-7 %0 = not set by SetVergeBackground %1 = set by SetVergeBackground * Bits 3-4: the verge type that was being drawn when this colour was set (taken from vergeType) %00 = leftVergeStart %01 = leftTrackStart %10 = rightVergeStart %11 = rightGrassStart * Bits 5-7: records which routine set this colour, along with bit 2 %000 = colour not set yet %001 = set by SetBackground %010 = set by UpdateBackground to the value in backgroundRight %100 = set by UpdateBackground to the value in backgroundLeft The contents of bits 2-7 are only used by the GetColour routine in the Acornsoft version (though their being non-zero is used to differentiate black from an unset colour by SetBackground). In the Superior Software release, GetColour was recoded to be smaller, and the recoded version only uses bits 0-1, with bits 2-7 being unused.
.backgroundColour SKIP 80
Name: sectionSteering [Show more] Type: Variable Category: Tactics Summary: The optimum steering for each section Deep dive: Tactics of the non-player drivers
Context: See this variable on its own page References: This variable is used as follows: * GetSectionSteering calls sectionSteering * GetSegmentSteering calls sectionSteering
.sectionSteering SKIP 26 \ The carSteering value to steer round the corner for a \ track section \ \ 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 EQUB &00, &00 \ These bytes appear to be unused EQUB &00, &00 EQUB &00, &00
Name: vergePixelMask [Show more] Type: Variable Category: Drawing the track Summary: Pixel bytes for drawing track verge edges
Context: See this variable on its own page References: This variable is used as follows: * DrawSegmentEdge (Part 3 of 7) calls vergePixelMask

This table contains four bytes for each of the different colour schemes for the track verges. The first byte contains four pixels of the fill colour, which gets poked into the byte to the right of the edge byte we are drawing. The other three bytes contain 1, 2 and 3 pixels of the foreground colour, with the pixels coming in from the left. So each batch looks like this if all four pixels are drawn: .... .... x... .... xx.. .... xxx. .... In the comments, this would be denoted as "Colour x then ." as colour x is on the left, then colour . is on the right.
.vergePixelMask EQUB %00000000 \ Colour 3 then 0 (green then black) bbbb bbbb EQUB %10001000 \ gbbb bbbb EQUB %11001100 \ * pixelMaskVerge for leftVergeStart ggbb bbbb EQUB %11101110 \ * pixelMaskNoVerge for leftTrackStart gggb bbbb EQUB %00001111 \ Colour 3 then 1 (green then red) rrrr rrrr EQUB %10001111 \ grrr rrrr EQUB %11001111 \ ggrr rrrr EQUB %11101111 \ gggr rrrr EQUB %11110000 \ Colour 3 then 2 (green then white) wwww wwww EQUB %11111000 \ gwww wwww EQUB %11111100 \ * pixelMaskVerge for leftTrackStart ggww wwww EQUB %11111110 \ gggw wwww EQUB %00000000 \ Colour 1 then 0 (red then black) bbbb bbbb EQUB %00001000 \ rbbb bbbb EQUB %00001100 \ rrbb bbbb EQUB %00001110 \ rrrb bbbb EQUB %00000000 \ Colour 2 then 0 (white then black) bbbb bbbb EQUB %10000000 \ wbbb bbbb EQUB %11000000 \ * pixelMaskVerge for rightVergeStart wwbb bbbb EQUB %11100000 \ wwwb bbbb EQUB %00001111 \ Colour 0 then 1 (black then red) rrrr rrrr EQUB %00000111 \ brrr rrrr EQUB %00000011 \ bbrr rrrr EQUB %00000001 \ bbbr rrrr EQUB %11110000 \ Colour 0 then 2 (black then white) wwww wwww EQUB %01110000 \ bwww wwww EQUB %00110000 \ bbww wwww EQUB %00010000 \ bbbw wwww EQUB %11111111 \ Colour 0 then 3 (black then green) gggg gggg EQUB %01110111 \ bggg gggg EQUB %00110011 \ * pixelMaskVerge for rightGrassStart bbgg gggg EQUB %00010001 \ * pixelMaskNoVerge for rightVergeStart bbbg gggg \ * pixelMaskNoVerge for rightGrassStart EQUB %11111111 \ Colour 1 then 3 (red then green) gggg gggg EQUB %01111111 \ rggg gggg EQUB %00111111 \ rrgg gggg EQUB %00011111 \ rrrg gggg EQUB %11111111 \ Colour 2 then 3 (white then green) gggg gggg EQUB %11110111 \ wggg gggg EQUB %11110011 \ wwgg gggg EQUB %11110001 \ wwwg gggg EQUB &03, &60 \ These bytes appear to be unused
Name: scaleRange [Show more] Type: Variable Category: 3D objects Summary: Storage for scale factors when scaling objects
Context: See this variable on its own page References: This variable is used as follows: * ScaleObject calls scaleRange
.scaleRange IF _ACORNSOFT OR _4TRACKS EQUB &6F, &6E \ These values are workspace noise and have no meaning EQUB &32, &00 EQUB &8D, &2B ELIF _SUPERIOR OR _REVSPLUS EQUB &30, &18 \ These values are workspace noise and have no meaning EQUB &0C, &06 EQUB &03, &01 ENDIF
Name: zeroIfYIs55 [Show more] Type: Variable Category: Screen buffer Summary: A lookup table for zeroing Y if and only if it is &55
Context: See this variable on its own page References: This variable is used as follows: * DRAW_BYTE calls zeroIfYIs55
.zeroIfYIs55 FOR I%, 0, 255 IF I% = &55 EQUB 0 ELSE EQUB I% ENDIF NEXT
Name: arctanY [Show more] Type: Variable Category: Maths (Geometry) Summary: Table for arctan values when calculating yaw angles Deep dive: Trigonometry
Context: See this variable on its own page References: This variable is used as follows: * GetObjYawAngle (Part 2 of 4) calls arctanY * GetObjYawAngle (Part 4 of 4) calls arctanY
.arctanY FOR I%, 0, 255 EQUB INT(0.5 + ATN(I% / 256) * 325.95) NEXT
Name: arctanP [Show more] Type: Variable Category: Maths (Geometry) Summary: Table for arctan values when calculating pitch angles Deep dive: Trigonometry
Context: See this variable on its own page References: This variable is used as follows: * GetObjPitchAngle calls arctanP

This is very close to the following calculation: FOR I%, 0, 127 EQUB INT(0.5 + 776 - 512 * ATN(3.2595 * (I% + 128) / 256)) NEXT
.arctanP EQUB &FF, &FE, &FC, &FA, &F8, &F6, &F5, &F3 EQUB &F1, &EF, &ED, &EC, &EA, &E8, &E7, &E5 EQUB &E4, &E2, &E0, &DF, &DD, &DC, &DA, &D9 EQUB &D8, &D6, &D5, &D3, &D2, &D1, &CF, &CE EQUB &CD, &CC, &CA, &C9, &C8, &C7, &C5, &C4 EQUB &C3, &C2, &C1, &C0, &BF, &BD, &BC, &BB EQUB &BA, &B9, &B8, &B7, &B6, &B5, &B4, &B3 EQUB &B2, &B1, &B0, &AF, &AE, &AD, &AC, &AC EQUB &AB, &AA, &A9, &A8, &A7, &A6, &A5, &A5 EQUB &A4, &A3, &A2, &A1, &A1, &A0, &9F, &9E EQUB &9E, &9D, &9C, &9B, &9B, &9A, &99, &98 EQUB &98, &97, &96, &96, &95, &94, &94, &93 EQUB &92, &92, &91, &90, &90, &8F, &8E, &8E EQUB &8D, &8D, &8C, &8B, &8B, &8A, &8A, &89 EQUB &89, &88, &87, &87, &86, &86, &85, &85 EQUB &84, &84, &83, &83, &82, &82, &81, &81
Name: xPlayerCoordHi [Show more] Type: Variable Category: Car geometry Summary: The high byte of the x-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * AddScaledVector calls xPlayerCoordHi * ApplyDeltas calls xPlayerCoordHi * BuildPlayerCar calls xPlayerCoordHi * GetObjYawAngle (Part 1 of 4) calls xPlayerCoordHi * ResetVariables calls xPlayerCoordHi

The coordinate is stored as a 24-bit number in (xPlayerCoordTop xPlayerCoordHi xPlayerCoordLo).
.xPlayerCoordHi EQUB 0
Name: yPlayerCoordHi [Show more] Type: Variable Category: Car geometry Summary: The high byte of the y-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * ApplyElevation (Part 5 of 5) calls yPlayerCoordHi * GetObjPitchAngle calls yPlayerCoordHi

The coordinate is stored as a 24-bit number in (yPlayerCoordTop yPlayerCoordHi yPlayerCoordLo).
.yPlayerCoordHi EQUB 0
Name: zPlayerCoordHi [Show more] Type: Variable Category: Car geometry Summary: The high byte of the z-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * GetObjYawAngle (Part 1 of 4) calls zPlayerCoordHi

The coordinate is stored as a 24-bit number in (zPlayerCoordTop zPlayerCoordHi zPlayerCoordLo).
.zPlayerCoordHi EQUB 0
Name: xPlayerCoordTop [Show more] Type: Variable Category: Car geometry Summary: The top byte of the x-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * AddScaledVector calls xPlayerCoordTop * ApplyDeltas calls xPlayerCoordTop * BuildPlayerCar calls xPlayerCoordTop * GetObjYawAngle (Part 1 of 4) calls xPlayerCoordTop

The coordinate is stored as a 24-bit number in (xPlayerCoordTop xPlayerCoordHi xPlayerCoordLo).
.xPlayerCoordTop EQUB 0
Name: yPlayerCoordTop [Show more] Type: Variable Category: Car geometry Summary: The top byte of the y-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * ApplyElevation (Part 5 of 5) calls yPlayerCoordTop * GetObjPitchAngle calls yPlayerCoordTop

The coordinate is stored as a 24-bit number in (yPlayerCoordTop yPlayerCoordHi yPlayerCoordLo).
.yPlayerCoordTop EQUB 0
Name: zPlayerCoordTop [Show more] Type: Variable Category: Car geometry Summary: The top byte of the z-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * GetObjYawAngle (Part 1 of 4) calls zPlayerCoordTop

The coordinate is stored as a 24-bit number in (zPlayerCoordTop zPlayerCoordHi zPlayerCoordLo).
.zPlayerCoordTop EQUB 0
Name: xRoadSignCoordLo [Show more] Type: Variable Category: 3D objects Summary: The low byte of the x-coordinate of the road sign's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * AddScaledVector calls xRoadSignCoordLo

Stored as a 16-bit value (xRoadSignCoordHi xRoadSignCoordLo).
.xRoadSignCoordLo EQUB 0
Name: yRoadSignCoordLo [Show more] Type: Variable Category: 3D objects Summary: The low byte of the y-coordinate of the road sign's 3D coordinates
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (yRoadSignCoordHi yRoadSignCoordLo).
.yRoadSignCoordLo EQUB 0
Name: zRoadSignCoordLo [Show more] Type: Variable Category: 3D objects Summary: The low byte of the z-coordinate of the road sign's 3D coordinates
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (zRoadSignCoordHi zRoadSignCoordLo).
.zRoadSignCoordLo EQUB 0
Name: xRoadSignCoordHi [Show more] Type: Variable Category: 3D objects Summary: The high byte of the x-coordinate of the road sign's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * AddScaledVector calls xRoadSignCoordHi

Stored as a 16-bit value (xRoadSignCoordHi xRoadSignCoordLo).
.xRoadSignCoordHi EQUB 0
Name: yRoadSignCoordHi [Show more] Type: Variable Category: 3D objects Summary: The high byte of the y-coordinate of the road sign's 3D coordinates
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (yRoadSignCoordHi yRoadSignCoordLo).
.yRoadSignCoordHi EQUB 0
Name: zRoadSignCoordHi [Show more] Type: Variable Category: 3D objects Summary: The high byte of the z-coordinate of the road sign's 3D coordinates
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (zRoadSignCoordHi zRoadSignCoordLo).
.zRoadSignCoordHi EQUB 0 EQUB &00, &00 \ These bytes appear to be unused EQUB &00
Name: objectPalette [Show more] Type: Variable Category: 3D objects Summary: The object colour palette that maps logical colours 0 to 3 to physical colours
This table is also used for storing pixel bytes when drawing edges of the track verges.
.objectPalette EQUB 0 EQUB 0 EQUB 0 EQUB 0
Name: mirrorContents [Show more] Type: Variable Category: Dashboard Summary: Contains the size of the car in each mirror segment Deep dive: Wing mirrors
Context: See this variable on its own page References: This variable is used as follows: * ResetVariables calls mirrorContents * UpdateMirrors calls mirrorContents
.mirrorContents EQUB 0 \ Mirror segment 0 (left mirror, outer segment) EQUB 0 \ Mirror segment 1 (left mirror, middle segment) EQUB 0 \ Mirror segment 2 (left mirror, inner segment) EQUB 0 \ Mirror segment 3 (right mirror, inner segment) EQUB 0 \ Mirror segment 4 (right mirror, middle segment) EQUB 0 \ Mirror segment 5 (right mirror, outer segment)
Name: markerData [Show more] Type: Variable Category: Track geometry Summary: The segment flags for each of the three corner markers
Context: See this variable on its own page References: This variable is used as follows: * DrawCornerMarkers calls markerData * GetVergeAndMarkers (Part 3 of 4) calls markerData
.markerData EQUB 0 EQUB 0 EQUB 0
Name: vergeEdgeRight [Show more] Type: Variable Category: Drawing the track Summary: Contain the four pixel bytes for the verge edge we are drawing, masked to only include the rightmost 4, 3, 2 and 1 pixels
Context: See this variable on its own page References: This variable is used as follows: * DrawSegmentEdge (Part 3 of 7) calls vergeEdgeRight * DrawVergeByteLeft calls vergeEdgeRight * DrawVergeByteRight calls vergeEdgeRight
.vergeEdgeRight EQUB 0 \ Includes all four pixels xxxx EQUB 0 \ Includes pixels 1, 2, 3 .xxx EQUB 0 \ Includes pixels 2, 3 ..xx EQUB 0 \ Includes pixel 3 ...x
Name: sinYawAngleLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the sine of the player's yaw angle
Stored as a 16-bit value (sinYawAngleHi sinYawAngleLo).
.sinYawAngleLo EQUB 0
Name: cosYawAngleLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the cosine of the player's yaw angle
Context: See this variable on its own page References: This variable is used as follows: * GetRotationMatrix (Part 5 of 5) calls cosYawAngleLo

Stored as a 16-bit value (cosYawAngleHi cosYawAngleLo).
.cosYawAngleLo EQUB 0
Name: steeringLo [Show more] Type: Variable Category: Dashboard Summary: The low byte of the steering wheel position Deep dive: Computer assisted steering (CAS)
Context: See this variable on its own page References: This variable is used as follows: * AssistSteering calls steeringLo * ProcessDrivingKeys (Part 2 of 6) calls steeringLo * SetSteeringLimit calls steeringLo * UpdateDashboard calls steeringLo

The steering wheel position is stored as (steeringHi steeringLo), with the sign bit in bit 0 of steeringLo, so it's a sign-magnitude number. Negative (bit 0 set) means we are steering left, positive (bit 0 clear) means we are steering right.
.steeringLo EQUB 0
Name: sinYawAngleHi [Show more] Type: Variable Category: Driving model Summary: High byte of the sine of the player's yaw angle
Context: See this variable on its own page References: This variable is used as follows: * GetRotationMatrix (Part 2 of 5) calls sinYawAngleHi * GetRotationMatrix (Part 3 of 5) calls sinYawAngleHi * MultiplyCoords calls sinYawAngleHi

Stored as a 16-bit value (sinYawAngleHi sinYawAngleLo).
.sinYawAngleHi EQUB 0
Name: cosYawAngleHi [Show more] Type: Variable Category: Driving model Summary: High byte of the cosine of the player's yaw angle
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (cosYawAngleHi cosYawAngleLo).
.cosYawAngleHi EQUB 0
Name: steeringHi [Show more] Type: Variable Category: Dashboard Summary: The high byte of the steering wheel position Deep dive: Computer assisted steering (CAS)
Context: See this variable on its own page References: This variable is used as follows: * AssistSteering calls steeringHi * ProcessDrivingKeys (Part 2 of 6) calls steeringHi * SetSteeringLimit calls steeringHi * UpdateDashboard calls steeringHi

The steering wheel position is stored as (steeringHi steeringLo), with the sign bit in bit 0 of steeringLo, so it's a sign-magnitude number. Negative (bit 0 set) means we are steering left, positive (bit 0 clear) means we are steering right.
.steeringHi EQUB 0
Name: tyreSqueal [Show more] Type: Variable Category: Driving model Summary: A flag to determine whether the front or rear tyres are squealing
Context: See this variable on its own page References: This variable is used as follows: * ApplyTyreForces calls tyreSqueal * ApplyTyresAndSkids calls tyreSqueal * MakeDrivingSounds calls tyreSqueal * SquealTyres calls tyreSqueal

If bit 7 is set in either of these, we make the sound of squealing tyres.
.tyreSqueal EQUB 0 \ Front tyres EQUB 0 \ Rear tyres
Name: wingSetting [Show more] Type: Variable Category: Driving model Summary: Contains the scaled wing settings
Context: See this variable on its own page References: This variable is used as follows: * ApplyGrassOrTrack calls wingSetting * ScaleWingSettings calls wingSetting
.wingSetting EQUB 0 \ Front wing setting, scaled to the range 90 to 218 EQUB 0 \ Rear wing setting, scaled to the range 90 to 218
Name: wingForce [Show more] Type: Variable Category: Driving model Summary: The downward force from the front and rear wings
Context: See this variable on its own page References: This variable is used as follows: * ApplyGrassOrTrack calls wingForce * ApplyTyreForces calls wingForce * GetTyreForces calls wingForce
.wingForce EQUB 0 \ Front wing EQUB 0 \ Rear wing
Name: wingForce95 [Show more] Type: Variable Category: Driving model Summary: 95% of the downward force from the front and rear wings
Context: See this variable on its own page References: This variable is used as follows: * ApplyGrassOrTrack calls wingForce95 * ApplySkidForces calls wingForce95
.wingForce95 EQUB 0 \ Front wing EQUB 0 \ Rear wing
Name: xPlayerSpeedLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the x-coordinate of the velocity vector (i.e. x-axis speed) for the player's car during this main loop iteration
Context: See this variable on its own page References: This variable is used as follows: * UpdateVelocity calls xPlayerSpeedLo

The speed is stored as a 24-bit number in (xPlayerSpeedTop xPlayerSpeedHi xPlayerSpeedLo).
.xPlayerSpeedLo EQUB 0
Name: zPlayerSpeedLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the z-coordinate of the velocity vector (i.e. z-axis speed) for the player's car during this main loop iteration
Context: See this variable on its own page References: No direct references to this variable in this source file

The speed is stored as a 24-bit number in (zPlayerSpeedTop zPlayerSpeedHi zPlayerSpeedLo).
.zPlayerSpeedLo EQUB 0
Name: spinYawAngleLo [Show more] Type: Variable Category: Car geometry Summary: Low byte of the amount of yaw angle spin that is being applied to the player's car
Context: See this variable on its own page References: No direct references to this variable in this source file

The spin is stored as a 24-bit number in (spinYawAngleTop spinYawAngleHi spinYawAngleLo).
.spinYawAngleLo EQUB 0
Name: xPlayerCoordLo [Show more] Type: Variable Category: Car geometry Summary: The low byte of the x-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: This variable is used as follows: * ApplyDeltas calls xPlayerCoordLo

The coordinate is stored as a 24-bit number in (xPlayerCoordTop xPlayerCoordHi xPlayerCoordLo).
.xPlayerCoordLo EQUB 0
Name: yPlayerCoordLo [Show more] Type: Variable Category: Car geometry Summary: The low byte of the y-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: No direct references to this variable in this source file

The coordinate is stored as a 24-bit number in (yPlayerCoordTop yPlayerCoordHi yPlayerCoordLo).
.yPlayerCoordLo EQUB 0
Name: zPlayerCoordLo [Show more] Type: Variable Category: Car geometry Summary: The low byte of the z-coordinate of the player's 3D coordinates
Context: See this variable on its own page References: No direct references to this variable in this source file

The coordinate is stored as a 24-bit number in (zPlayerCoordTop zPlayerCoordHi zPlayerCoordLo).
.zPlayerCoordLo EQUB 0
Name: markerListIndex [Show more] Type: Variable Category: Track geometry Summary: The index of the corresponding entry in the track segment list for each of the three corner markers
Context: See this variable on its own page References: This variable is used as follows: * DrawCornerMarkers calls markerListIndex * GetVergeAndMarkers (Part 3 of 4) calls markerListIndex
.markerListIndex EQUB 0 EQUB 0 EQUB 0
Name: xMarkerLo [Show more] Type: Variable Category: Track geometry Summary: Low byte of the x-axis distance between the track edge and the three corner markers
Context: See this variable on its own page References: This variable is used as follows: * DrawCornerMarkers calls xMarkerLo * GetVergeAndMarkers (Part 3 of 4) calls xMarkerLo

Stored as a 16-bit value (xMarkerHi xMarkerLo).
.xMarkerLo EQUB 0 EQUB 0 EQUB 0
Name: xMarkerHi [Show more] Type: Variable Category: Track geometry Summary: High byte of the x-axis distance between the track edge and the three corner markers
Context: See this variable on its own page References: This variable is used as follows: * DrawCornerMarkers calls xMarkerHi * GetVergeAndMarkers (Part 3 of 4) calls xMarkerHi

Stored as a 16-bit value (xMarkerHi xMarkerLo).
.xMarkerHi EQUB 0 EQUB 0 EQUB 0
Name: soundBuffer [Show more] Type: Variable Category: Sound Summary: Details of each sound channel's buffer status Deep dive: The engine sounds
Context: See this variable on its own page References: This variable is used as follows: * ApplyTyresAndSkids calls soundBuffer * FlushSoundBuffer calls soundBuffer * MakeSound calls soundBuffer
.soundBuffer EQUB 0 EQUB 0 EQUB 0 EQUB 0 EQUB 0 EQUB 0
Name: characterDef [Show more] Type: Variable Category: Text Summary: Storage for a character definition when printing characters
Context: See this variable on its own page References: This variable is used as follows: * PrintCharacter calls characterDef
.characterDef EQUB 0 \ The character number EQUB 0, 0, 0, 0 \ The eight bytes that make up the character definition, EQUB 0, 0, 0, 0 \ which gets populated by an OSWORD call
Name: xCursor [Show more] Type: Variable Category: Text Summary: The cursor's x-coordinate, which can either be a pixel coordinate or a character row
Context: See this variable on its own page References: This variable is used as follows: * Print2DigitBCD calls xCursor * PrintBestLapTime calls xCursor * PrintCharacter calls xCursor * PrintFirstLine calls xCursor * PrintGearNumber calls xCursor * PrintLapTime calls xCursor * PrintNearestDriver calls xCursor
.xCursor EQUB 0
Name: yCursor [Show more] Type: Variable Category: Text Summary: The cursor's pixel y-coordinate
Context: See this variable on its own page References: This variable is used as follows: * Print2DigitBCD calls yCursor * PrintBestLapTime calls yCursor * PrintCharacter calls yCursor * PrintFirstLine calls yCursor * PrintGearNumber calls yCursor * PrintLapTime calls yCursor * PrintNearestDriver calls yCursor

In terms of printing text on-screen, we need to set: * yCursor = 24 for the first line of text * yCursor = 33 for the second line of text See the notes on the yLookupHi variable for information about the values of yCursor and how they relate to the custom screen.
.yCursor EQUB 0 EQUB &00, &00 \ These bytes appear to be unused
Name: xPlayerSpeedHi [Show more] Type: Variable Category: Driving model Summary: High byte of the x-coordinate of the velocity vector (i.e. x-axis speed) for the player's car during this main loop iteration
Context: See this variable on its own page References: This variable is used as follows: * AddCoords calls xPlayerSpeedHi * AddSteeringForce calls xPlayerSpeedHi * ApplyDeltas calls xPlayerSpeedHi * CheckForCrash calls xPlayerSpeedHi * MultiplyCoords calls xPlayerSpeedHi * Scale16Bit calls xPlayerSpeedHi * UpdateVelocity calls xPlayerSpeedHi

The speed is stored as a 24-bit number in (xPlayerSpeedTop xPlayerSpeedHi xPlayerSpeedLo).
.xPlayerSpeedHi EQUB 0
Name: zPlayerSpeedHi [Show more] Type: Variable Category: Driving model Summary: High byte of the z-coordinate of the velocity vector (i.e. z-axis speed) for the player's car during this main loop iteration
Context: See this variable on its own page References: No direct references to this variable in this source file

The speed is stored as a 24-bit number in (zPlayerSpeedTop zPlayerSpeedHi zPlayerSpeedLo).
.zPlayerSpeedHi EQUB 0
Name: spinYawAngleHi [Show more] Type: Variable Category: Car geometry Summary: High byte of the amount of yaw angle spin that is being applied to the player's car
Context: See this variable on its own page References: This variable is used as follows: * ApplyBounce calls spinYawAngleHi * ApplyDeltas calls spinYawAngleHi * ApplySpinYaw calls spinYawAngleHi * SpinTrackSection calls spinYawAngleHi

The spin is stored as a 24-bit number in (spinYawAngleTop spinYawAngleHi spinYawAngleLo).
.spinYawAngleHi EQUB 0
Name: xAccelerationLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the x-coordinate of the change in velocity of the player's car in terms of 3D world coordinates
Context: See this variable on its own page References: This variable is used as follows: * UpdateVelocity calls xAccelerationLo

Stored as a 16-bit value (xAccelerationHi xAccelerationLo).
.xAccelerationLo EQUB 0
Name: zAccelerationLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the z-coordinate of the change in velocity of the player's car in terms of 3D world coordinates
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (zAccelerationHi zAccelerationLo).
.zAccelerationLo EQUB 0
Name: spinYawDeltaLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the change in the spin yaw angle for the player's car
Context: See this variable on its own page References: This variable is used as follows: * ApplyDrivingModel calls spinYawDeltaLo * ScaleTyreForces calls spinYawDeltaLo

Stored as a 16-bit value (spinYawDeltaHi spinYawDeltaLo).
.spinYawDeltaLo EQUB 0
Name: xPlayerAccelLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the x-coordinate of the change in velocity of the player's car in the player's frame of reference
Context: See this variable on its own page References: This variable is used as follows: * ScaleTyreForces calls xPlayerAccelLo

Stored as a 16-bit value (xPlayerAccelHi xPlayerAccelLo).
.xPlayerAccelLo EQUB 0
Name: zPlayerAccelLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the z-coordinate of the change in velocity of the player's car in the player's frame of reference
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (zPlayerAccelHi zPlayerAccelLo).
.zPlayerAccelLo EQUB 0
Name: xVelocityLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the x-coordinate of the player's velocity vector, from the player's frame of reference
Context: See this variable on its own page References: This variable is used as follows: * ApplyDrivingModel calls xVelocityLo * ApplySpinYaw calls xVelocityLo * ApplyTyreForces calls xVelocityLo

Stored as a 16-bit value (xVelocityHi xVelocityLo).
.xVelocityLo EQUB 0
Name: zVelocityLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the z-coordinate of the player's velocity vector, from the player's frame of reference
Context: See this variable on its own page References: This variable is used as follows: * ApplyDrivingModel calls zVelocityLo

Stored as a 16-bit value (zVelocityHi zVelocityLo).
.zVelocityLo EQUB 0
Name: xTyreForceNoseLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the x-coordinate of the force vector produced by the front tyres in the nose of the car
Stored as a 16-bit value (xTyreForceNoseHi xTyreForceNoseLo).
.xTyreForceNoseLo EQUB 0
Name: xTyreForceRearLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the x-coordinate of the force vector produced by the rear tyres of the car
Context: See this variable on its own page References: This variable is used as follows: * ScaleTyreForces calls xTyreForceRearLo

Stored as a 16-bit value (xTyreForceRearHi xTyreForceRearLo).
.xTyreForceRearLo EQUB 0
Name: zTyreForceNoseLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the z-coordinate of the force vector produced by the front tyres in the nose of the car
Context: See this variable on its own page References: This variable is used as follows: * ApplySkidForces calls zTyreForceNoseLo * ApplyTyreForces calls zTyreForceNoseLo

Stored as a 16-bit value (zTyreForceNoseHi zTyreForceNoseLo).
.zTyreForceNoseLo EQUB 0
Name: zTyreForceRearLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the z-coordinate of the force vector produced by the rear tyres
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (zTyreForceRearHi zTyreForceRearLo).
.zTyreForceRearLo EQUB 0
Name: xSteeringForceLo [Show more] Type: Variable Category: Driving model Summary: Low byte of the sideways force applied by steering
Context: See this variable on its own page References: This variable is used as follows: * AddSteeringForce calls xSteeringForceLo

Stored as a 16-bit value (xSteeringForceHi xSteeringForceLo).
.xSteeringForceLo EQUB 0
Name: mainLoopCounterHi [Show more] Type: Variable Category: Main loop Summary: High byte of the main loop counter, which increments on each iteration of the main driving loop Deep dive: Scheduling tasks in the main loop
Context: See this variable on its own page References: This variable is used as follows: * FinishRace calls mainLoopCounterHi * ProcessTime calls mainLoopCounterHi

Stored as a 16-bit value (mainLoopCounterHi mainLoopCounterLo).
.mainLoopCounterHi EQUB 0
Name: xPlayerSpeedTop [Show more] Type: Variable Category: Driving model Summary: Top byte of the x-coordinate of the velocity vector (i.e. x-axis speed) for the player's car during this main loop iteration
Context: See this variable on its own page References: This variable is used as follows: * AddCoords calls xPlayerSpeedTop * AddSteeringForce calls xPlayerSpeedTop * ApplyDeltas calls xPlayerSpeedTop * MultiplyCoords calls xPlayerSpeedTop * Scale16Bit calls xPlayerSpeedTop * UpdateVelocity calls xPlayerSpeedTop

The speed is stored as a 24-bit number in (xPlayerSpeedTop xPlayerSpeedHi xPlayerSpeedLo).
.xPlayerSpeedTop EQUB 0
Name: zPlayerSpeedTop [Show more] Type: Variable Category: Driving model Summary: Top byte of the z-coordinate of the velocity vector (i.e. z-axis speed) for the player's car during this main loop iteration
Context: See this variable on its own page References: No direct references to this variable in this source file

The speed is stored as a 24-bit number in (zPlayerSpeedTop zPlayerSpeedHi zPlayerSpeedLo).
.zPlayerSpeedTop EQUB 0
Name: spinYawAngleTop [Show more] Type: Variable Category: Car geometry Summary: Top byte of the amount of yaw angle spin that is being applied to the player's car
Context: See this variable on its own page References: This variable is used as follows: * ApplyDeltas calls spinYawAngleTop * ApplySpinYaw calls spinYawAngleTop * CheckForCrash calls spinYawAngleTop * MovePlayerSegment calls spinYawAngleTop * SpinTrackSection calls spinYawAngleTop * SquealTyres calls spinYawAngleTop

The spin is stored as a 24-bit number in (spinYawAngleTop spinYawAngleHi spinYawAngleLo).
.spinYawAngleTop EQUB 0
Name: xAccelerationHi [Show more] Type: Variable Category: Driving model Summary: High byte of the x-coordinate of the change in velocity of the player's car in terms of 3D world coordinates
Context: See this variable on its own page References: This variable is used as follows: * UpdateVelocity calls xAccelerationHi

Stored as a 16-bit value (xAccelerationHi xAccelerationLo).
.xAccelerationHi EQUB 0
Name: zAccelerationHi [Show more] Type: Variable Category: Driving model Summary: High byte of the z-coordinate of the change in velocity of the player's car in terms of 3D world coordinates
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (zAccelerationHi zAccelerationLo).
.zAccelerationHi EQUB 0
Name: spinYawDeltaHi [Show more] Type: Variable Category: Driving model Summary: High byte of the change in the spin yaw angle for the player's car
Context: See this variable on its own page References: This variable is used as follows: * ApplyDrivingModel calls spinYawDeltaHi * ScaleTyreForces calls spinYawDeltaHi

Stored as a 16-bit value (spinYawDeltaHi spinYawDeltaLo).
.spinYawDeltaHi EQUB 0
Name: xPlayerAccelHi [Show more] Type: Variable Category: Driving model Summary: High byte of the x-coordinate of the change in velocity of the player's car in the player's frame of reference
Context: See this variable on its own page References: This variable is used as follows: * ScaleTyreForces calls xPlayerAccelHi

Stored as a 16-bit value (xPlayerAccelHi xPlayerAccelLo).
.xPlayerAccelHi EQUB 0
Name: zPlayerAccelHi [Show more] Type: Variable Category: Driving model Summary: High byte of the z-coordinate of the change in velocity of the player's car in the player's frame of reference
Context: See this variable on its own page References: This variable is used as follows: * ScaleTyreForces calls zPlayerAccelHi

Stored as a 16-bit value (zPlayerAccelHi zPlayerAccelLo).
.zPlayerAccelHi EQUB 0
Name: xVelocityHi [Show more] Type: Variable Category: Driving model Summary: High byte of the x-coordinate of the player's velocity vector, from the player's frame of reference
Context: See this variable on its own page References: This variable is used as follows: * ApplyDrivingModel calls xVelocityHi * ApplySkidForces calls xVelocityHi * ApplySpinYaw calls xVelocityHi * ApplyTyreForces calls xVelocityHi

Stored as a 16-bit value (xVelocityHi xVelocityLo).
.xVelocityHi EQUB 0
Name: zVelocityHi [Show more] Type: Variable Category: Driving model Summary: High byte of the z-coordinate of the player's velocity vector, from the player's frame of reference
Context: See this variable on its own page References: This variable is used as follows: * ApplyDrivingModel calls zVelocityHi * ApplyGrassOrTrack calls zVelocityHi * ApplyWingBalance calls zVelocityHi * GetTyreForces calls zVelocityHi

Stored as a 16-bit value (zVelocityHi zVelocityLo).
.zVelocityHi EQUB 0
Name: xTyreForceNoseHi [Show more] Type: Variable Category: Driving model Summary: High byte of the x-coordinate of the force vector produced by the front tyres in the nose of the car
Stored as a 16-bit value (xTyreForceNoseHi xTyreForceNoseLo).
.xTyreForceNoseHi EQUB 0
Name: xTyreForceRearHi [Show more] Type: Variable Category: Driving model Summary: High byte of the x-coordinate of the force vector produced by the rear tyres of the car
Context: See this variable on its own page References: This variable is used as follows: * ScaleTyreForces calls xTyreForceRearHi

Stored as a 16-bit value (xTyreForceRearHi xTyreForceRearLo).
.xTyreForceRearHi EQUB 0
Name: zTyreForceNoseHi [Show more] Type: Variable Category: Driving model Summary: High byte of the z-coordinate of the force vector produced by the front tyres in the nose of the car
Context: See this variable on its own page References: This variable is used as follows: * ApplySkidForces calls zTyreForceNoseHi * ApplyTyreForces calls zTyreForceNoseHi

Stored as a 16-bit value (zTyreForceNoseHi zTyreForceNoseLo).
.zTyreForceNoseHi EQUB 0
Name: zTyreForceRearHi [Show more] Type: Variable Category: Driving model Summary: High byte of the z-coordinate of the force vector produced by the rear tyres
Context: See this variable on its own page References: No direct references to this variable in this source file

Stored as a 16-bit value (zTyreForceRearHi zTyreForceRearLo).
.zTyreForceRearHi EQUB 0
Name: xSteeringForceHi [Show more] Type: Variable Category: Driving model Summary: High byte of the sideways force applied by steering
Context: See this variable on its own page References: This variable is used as follows: * AddSteeringForce calls xSteeringForceHi

Stored as a 16-bit value (xSteeringForceHi xSteeringForceLo).
.xSteeringForceHi EQUB 0
Name: firstLapStarted [Show more] Type: Variable Category: Drivers Summary: Flag to keep track of whether we have started the first lap of practice or qualifying
Context: See this variable on its own page References: This variable is used as follows: * ResetVariables calls firstLapStarted * UpdateLapTimers calls firstLapStarted

For practice and qualifying laps, firstLapStarted keeps track of whether we have started the first lap (at which point the lap timer starts). Before we reach the starting line, firstLapStarted is -33, which is the value it gets in ResetVariables for practice or qualifying laps. This is then incremented to 0 when we start the first lap. The value of firstLapStarted is decremented with each call to UpdateLapTimers for practice or qualifying, but only if bit 6 of updateDrivingInfo is set and firstLapStarted is non-zero. I am not sure why.
.firstLapStarted EQUB 0
Name: liftFromTorque [Show more] Type: Variable Category: Driving model Summary: The lift of the front of the car caused by acceleration or braking
Context: See this variable on its own page References: This variable is used as follows: * ApplyElevation (Part 1 of 5) calls liftFromTorque * ApplyElevation (Part 3 of 5) calls liftFromTorque
.liftFromTorque EQUB 0
Name: wingBalance [Show more] Type: Variable Category: Driving model Summary: Value used in the driving model when calculating the effect of the two wing settings
Context: See this variable on its own page References: This variable is used as follows: * ApplyWingBalance calls wingBalance * ScaleWingSettings calls wingBalance

The wing balance is calculated as: 60 + (rearWingSetting * 3 + frontWingSetting) / 2
.wingBalance EQUB 0
Name: playerSideways [Show more] Type: Variable Category: Car geometry Summary: Contains the player's heading, for testing whether the car is pointing sideways
Context: See this variable on its own page References: This variable is used as follows: * ApplyElevation (Part 2 of 5) calls playerSideways * SetVergeBackground calls playerSideways * UpdateBackground calls playerSideways

If playerSideways < 40, then the player's car is facing forwards or backwards along the track. If playerSideways >= 40, then the player's car is facing sideways, relative to the direction of the track.
.playerSideways EQUB 0
Name: thisObjectType [Show more] Type: Variable Category: 3D objects Summary: The type of object we are currently drawing
Context: See this variable on its own page References: This variable is used as follows: * DrawObject calls thisObjectType
.thisObjectType EQUB 0
Name: thisDriverNumber [Show more] Type: Variable Category: Drawing objects Summary: The number of the current driver when drawing cars
Context: See this variable on its own page References: This variable is used as follows: * MoveAndDrawCars calls thisDriverNumber
.thisDriverNumber EQUB 0
Name: newSectionFetched [Show more] Type: Variable Category: Track geometry Summary: Flag that determines whether a new track section has been fetched
Context: See this variable on its own page References: This variable is used as follows: * GetFirstSegment calls newSectionFetched * GetSectionAngles (Part 1 of 3) calls newSectionFetched
.newSectionFetched EQUB 0 \ Track section status: \ \ * 0 = no new section \ \ * Non-zero = the player's car has entered a new \ track section
Name: crashedIntoFence [Show more] Type: Variable Category: Car geometry Summary: Flag that records whether we have crashed into the fence
Context: See this variable on its own page References: This variable is used as follows: * CheckForCrash calls crashedIntoFence * MainDrivingLoop (Part 3 of 5) calls crashedIntoFence
.crashedIntoFence EQUB 0 \ Crash status \ \ * 0 = we have not crashed into the fence \ \ * &FF = we have crashed into the fence
Name: irqCounter [Show more] Type: Variable Category: Screen mode Summary: Counter that gets incremented every time the IRQ routine reaches section 4 of the custom screen
Context: See this variable on its own page References: This variable is used as follows: * AnimateTyres calls irqCounter * MainDrivingLoop (Part 3 of 5) calls irqCounter
.irqCounter EQUB 0
Name: updateLapTimes [Show more] Type: Variable Category: Drivers Summary: Controls whether moving the car forward updates the lap number and lap times
Context: See this variable on its own page References: This variable is used as follows: * PlaceCarsOnTrack calls updateLapTimes * UpdateLaps calls updateLapTimes
.updateLapTimes EQUB 0
Name: previousSignNumber [Show more] Type: Variable Category: Track geometry Summary: Stores the number of the sign from the previous call to the BuildRoadSign routine
Context: See this variable on its own page References: This variable is used as follows: * BuildRoadSign calls previousSignNumber * ResetVariables calls previousSignNumber

Set to 23 in ResetVariables.
.previousSignNumber EQUB 0
Name: tyreTravel [Show more] Type: Variable Category: Dashboard Summary: Keeps track of how far we have travelled so we know when to animate the tyres
Context: See this variable on its own page References: This variable is used as follows: * AnimateTyres calls tyreTravel
.tyreTravel EQUB 0
Name: playerDrift [Show more] Type: Variable Category: Driving model Summary: Records whether the player's car is moving sideways by a significant amount
Context: See this variable on its own page References: This variable is used as follows: * ApplyGrassOrTrack calls playerDrift * MovePlayerOnTrack calls playerDrift * SetPlayerDriftSup calls playerDrift
.playerDrift EQUB 0 \ If bit 7 is set, then the player's car is moving \ sideways by more than 22 in this iteration around the \ main driving loop (where the track width is 256)
Name: horizonTrackWidth [Show more] Type: Variable Category: Track geometry Summary: The arc of the track at the horizon (i.e. the track width at the horizon), halved
Context: See this variable on its own page References: This variable is used as follows: * DrawObject calls horizonTrackWidth * GetTrackAndMarkers calls horizonTrackWidth
.horizonTrackWidth EQUB 0
Name: lowestTrackLine [Show more] Type: Variable Category: Screen buffer Summary: Used to prevent objects from being drawn below the horizon line
Context: See this variable on its own page References: This variable is used as follows: * DrawObject calls lowestTrackLine * DrawObjectEdges calls lowestTrackLine
.lowestTrackLine EQUB 0
Name: updateDriverInfo [Show more] Type: Variable Category: Text Summary: Flag that controls whether the driver names are updated in the information block at the top of the screen
Context: See this variable on its own page References: This variable is used as follows: * ProcessOvertaking (Part 1 of 3) calls updateDriverInfo * ResetVariables calls updateDriverInfo * UpdatePositionInfo calls updateDriverInfo

If bit 7 is set, then we update the driver names in the "In front" and "Behind" sections at the top of the screen. Bit 7 gets set in ResetVariables, for race laps only.
.updateDriverInfo EQUB 0
Name: zTyreForceBoth [Show more] Type: Variable Category: Driving model Summary: High byte of the z-coordinate of the force vector produced by the front and tyres combined
Context: See this variable on its own page References: This variable is used as follows: * ApplyGrassOrTrack calls zTyreForceBoth * ScaleTyreForces calls zTyreForceBoth
.zTyreForceBoth EQUB 0