Skip to navigation

Revs on the BBC Micro

Revs E source

Name: token26 [Show more] Type: Variable Category: Text Summary: Text for recursive token 26 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token26 * tokenLo calls token26
.token26 EQUB 200 + 54 \ Print token 54 ("FORMULA 3 CHAMPIONSHIP" header) EQUB 31, 10, 12 \ Move text cursor to column 10, row 12 EQUB 131 \ Set foreground colour to yellow alphanumeric EQUS "STANDARD OF" \ Print "STANDARD OF" EQUB 200 + 15 \ Print token 15 (" RACE") EQUB 31, 14, 14 \ Move text cursor to column 14, row 14 EQUB 255 \ End token
Name: token4 [Show more] Type: Variable Category: Text Summary: Text for recursive token 4 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token4 * tokenLo calls token4
.token4 EQUB 200 + 52 \ Print token 52 (multicoloured "REVS") EQUB 160 + 3 \ Print 3 spaces EQUB 200 + 52 \ Print token 52 (multicoloured "REVS") EQUB 160 + 3 \ Print 3 spaces EQUB 200 + 52 \ Print token 52 (multicoloured "REVS") EQUB 160 + 1 \ Print 1 space EQUB 255 \ End token
Name: dashData0 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * DrawShallowToLeft calls dashData0 * DrawSteepToLeft calls dashData0 * dashDataOffset calls dashData0 * fillDataOffset calls dashData0
.dashData0 SKIP 52 \ Populated with code from &7FCC to &7FFF
Name: tyreEdgeIndex [Show more] Type: Variable Category: Dashboard Summary: Index of the mask and pixel bytes for the tyre edges on a specific track line Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 3 of 4) calls tyreEdgeIndex

This table points to the index of the mask or pixel byte to use from the leftTyreMask/rightTyreMask and leftTyrePixels/rightTyrePixels tables for a specific track line. This is used when clipping track lines to the tyre edges. There is a byte for each track line from 27 (the track line at the top of the tyres) down to 3 (the lowest track line, just above where the wing mirror joins the car body). Lines 0 to 2 are not used.
.tyreEdgeIndex EQUB 0 \ Line 0 EQUB 0 \ Line 1 EQUB 0 \ Line 2 EQUB 0 \ Line 3 EQUB 6 \ Line 4 EQUB 6 \ Line 5 EQUB 6 \ Line 6 EQUB 6 \ Line 7 EQUB 6 \ Line 8 EQUB 6 \ Line 9 EQUB 6 \ Line 10 EQUB 3 \ Line 11 EQUB 3 \ Line 12 EQUB 3 \ Line 13 EQUB 3 \ Line 14 EQUB 3 \ Line 15 EQUB 1 \ Line 16 EQUB 1 \ Line 17 EQUB 1 \ Line 18 EQUB 0 \ Line 19 EQUB 0 \ Line 20 EQUB 0 \ Line 21 EQUB 5 \ Line 22 EQUB 4 \ Line 23 EQUB 3 \ Line 24 EQUB 2 \ Line 25 EQUB 1 \ Line 26 EQUB 0 \ Line 27
Name: segmentFlagMask [Show more] Type: Variable Category: Track geometry Summary: A mask for extracting bits from the segment flag byte when processing the track verge and corner markers
Context: See this variable on its own page References: This variable is used as follows: * GetVergeAndMarkers (Part 1 of 4) calls segmentFlagMask
.segmentFlagMask EQUB %00101101 \ Mask for the right verge, to keep the following from \ the segment flags: \ \ * Bit 0 (section shape) \ * Bit 2 (colour of right verge marks) \ * Bit 3 (show right corner markers) \ * Bit 5 (corner marker colours) EQUB %00110011 \ Mask for the left verge, to keep the following from \ the segment flags: \ \ * Bit 0 (section shape) \ * Bit 1 (colour of left verge marks) \ * Bit 4 (show left corner markers) \ * Bit 5 (corner marker colours)
Name: vergeColour [Show more] Type: Variable Category: Track geometry Summary: Lookup table for converting bits 0-2 of the segment flag byte into the verge colour scheme
Context: See this variable on its own page References: This variable is used as follows: * GetVergeAndMarkers (Part 1 of 4) calls vergeColour
.vergeColour EQUB 0 \ * 0 = %000 = black right, black left, straight EQUB 0 \ * 1 = %001 = black right, black left, curve EQUB 1 \ * 2 = %010 = black right, red left, straight EQUB 1 \ * 3 = %011 = black right, red left, curve EQUB 1 \ * 4 = %100 = red right, black left, straight EQUB 1 \ * 5 = %101 = red right, black left, curve EQUB 1 \ * 6 = %110 = red right, red left, straight EQUB 1 \ * 7 = %111 = red right, red left, curve
Name: vergeScale [Show more] Type: Variable Category: Track geometry Summary: Scale factors for the track verge width for different types of verge (larger value = smaller verge width)
Context: See this variable on its own page References: This variable is used as follows: * GetVergeAndMarkers (Part 2 of 4) calls vergeScale
.vergeScale EQUB 5 \ * 0 = %000 = black right, black left, straight EQUB 5 \ * 1 = %001 = black right, black left, curve EQUB 3 \ * 2 = %010 = black right, red left, straight EQUB 4 \ * 3 = %011 = black right, red left, curve EQUB 3 \ * 4 = %100 = red right, black left, straight EQUB 4 \ * 5 = %101 = red right, black left, curve EQUB 4 \ * 6 = %110 = red right, red left, straight EQUB 4 \ * 7 = %111 = red right, red left, curve EQUB &38, &38 \ These bytes appear to be unused
Name: staDrawByteTyre [Show more] Type: Variable Category: Screen buffer Summary: Low address bytes of the STA instructions in the DRAW_BYTE macros, for use when drawing track lines around the tyres
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 3 of 4) calls staDrawByteTyre

This table contains the low byte offset of the address of the STA (P),Y instruction for the track line, which we convert into an RTS when drawing the track line up against the right tyre, so we stop in time. As the tyres are reflections of each other, we can also use this to calculate the starting point for the line that starts at the left tyre: see part 3 of DrawTrackView for details.
.staDrawByteTyre EQUB 8 * 17 + 15 \ Line 0 = LO(address) of STA (P),Y in DRAW_BYTE 34 EQUB 8 * 17 + 15 \ Line 1 = LO(address) of STA (P),Y in DRAW_BYTE 34 EQUB 8 * 17 + 15 \ Line 2 = LO(address) of STA (P),Y in DRAW_BYTE 34 EQUB 8 * 17 + 15 \ Line 3 = LO(address) of STA (P),Y in DRAW_BYTE 34 EQUB 9 * 17 + 15 \ Line 4 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 5 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 6 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 7 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 8 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 9 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 10 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 11 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 12 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 13 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 14 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 15 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 16 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 17 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 18 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 19 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 20 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 9 * 17 + 15 \ Line 21 = LO(address) of STA (P),Y in DRAW_BYTE 35 EQUB 10 * 17 + 15 \ Line 22 = LO(address) of STA (P),Y in DRAW_BYTE 36 EQUB 10 * 17 + 15 \ Line 23 = LO(address) of STA (P),Y in DRAW_BYTE 36 EQUB 10 * 17 + 15 \ Line 24 = LO(address) of STA (P),Y in DRAW_BYTE 36 EQUB 10 * 17 + 15 \ Line 25 = LO(address) of STA (P),Y in DRAW_BYTE 36 EQUB 10 * 17 + 15 \ Line 26 = LO(address) of STA (P),Y in DRAW_BYTE 36 EQUB 10 * 17 + 15 \ Line 27 = LO(address) of STA (P),Y in DRAW_BYTE 36
Name: dashData1 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData1 * fillDataOffset calls dashData1
.dashData1 SKIP 52 \ Populated with code from &7F98 to &7FCB
Name: ldaDrawByte [Show more] Type: Variable Category: Screen buffer Summary: Low address bytes of the LDA #0 instructions in the DRAW_BYTE macros, for use when drawing track lines around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 2 of 4) calls ldaDrawByte * DrawTrackView (Part 3 of 4) calls ldaDrawByte
.ldaDrawByte IF _ACORNSOFT OR _4TRACKS EQUB &1C \ Line 0 is unused and contains workspace noise ELIF _SUPERIOR OR _REVSPLUS EQUB &28 \ Line 0 is unused and contains workspace noise ENDIF EQUB 8 * 17 + 5 \ Line 1 = LO(address) of LDA #0 in DRAW_BYTE 34 EQUB 7 * 17 + 5 \ Line 2 = LO(address) of LDA #0 in DRAW_BYTE 33 EQUB 7 * 17 + 5 \ Line 3 = LO(address) of LDA #0 in DRAW_BYTE 33 EQUB 7 * 17 + 5 \ Line 4 = LO(address) of LDA #0 in DRAW_BYTE 33 EQUB 7 * 17 + 5 \ Line 5 = LO(address) of LDA #0 in DRAW_BYTE 33 EQUB 7 * 17 + 5 \ Line 6 = LO(address) of LDA #0 in DRAW_BYTE 33 EQUB 6 * 17 + 5 \ Line 7 = LO(address) of LDA #0 in DRAW_BYTE 32 EQUB 6 * 17 + 5 \ Line 8 = LO(address) of LDA #0 in DRAW_BYTE 32 EQUB 6 * 17 + 5 \ Line 9 = LO(address) of LDA #0 in DRAW_BYTE 32 EQUB 6 * 17 + 5 \ Line 10 = LO(address) of LDA #0 in DRAW_BYTE 32 EQUB 6 * 17 + 5 \ Line 11 = LO(address) of LDA #0 in DRAW_BYTE 32 EQUB 5 * 17 + 5 \ Line 12 = LO(address) of LDA #0 in DRAW_BYTE 31 EQUB 5 * 17 + 5 \ Line 13 = LO(address) of LDA #0 in DRAW_BYTE 31 EQUB 5 * 17 + 5 \ Line 14 = LO(address) of LDA #0 in DRAW_BYTE 31 EQUB 5 * 17 + 5 \ Line 15 = LO(address) of LDA #0 in DRAW_BYTE 31 EQUB 4 * 17 + 5 \ Line 16 = LO(address) of LDA #0 in DRAW_BYTE 30 EQUB 4 * 17 + 5 \ Line 17 = LO(address) of LDA #0 in DRAW_BYTE 30 EQUB 4 * 17 + 5 \ Line 18 = LO(address) of LDA #0 in DRAW_BYTE 30 EQUB 4 * 17 + 5 \ Line 19 = LO(address) of LDA #0 in DRAW_BYTE 30 EQUB 3 * 17 + 5 \ Line 20 = LO(address) of LDA #0 in DRAW_BYTE 29 EQUB 3 * 17 + 5 \ Line 21 = LO(address) of LDA #0 in DRAW_BYTE 29 EQUB 3 * 17 + 5 \ Line 22 = LO(address) of LDA #0 in DRAW_BYTE 29 EQUB 3 * 17 + 5 \ Line 23 = LO(address) of LDA #0 in DRAW_BYTE 29 EQUB 2 * 17 + 5 \ Line 24 = LO(address) of LDA #0 in DRAW_BYTE 28 EQUB 2 * 17 + 5 \ Line 25 = LO(address) of LDA #0 in DRAW_BYTE 28 EQUB 2 * 17 + 5 \ Line 26 = LO(address) of LDA #0 in DRAW_BYTE 28 EQUB 2 * 17 + 5 \ Line 27 = LO(address) of LDA #0 in DRAW_BYTE 28 EQUB 1 * 17 + 5 \ Line 28 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 29 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 30 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 31 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 32 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 33 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 34 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 35 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 36 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 37 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 1 * 17 + 5 \ Line 38 = LO(address) of LDA #0 in DRAW_BYTE 27 EQUB 0 * 17 + 5 \ Line 39 = LO(address) of LDA #0 in DRAW_BYTE 26 EQUB 0 * 17 + 5 \ Line 40 = LO(address) of LDA #0 in DRAW_BYTE 26 EQUB 0 * 17 + 5 \ Line 41 = LO(address) of LDA #0 in DRAW_BYTE 26 EQUB 0 * 17 + 5 \ Line 42 = LO(address) of LDA #0 in DRAW_BYTE 26 EQUB 0 * 17 + 5 \ Line 43 = LO(address) of LDA #0 in DRAW_BYTE 26
Name: vergeEdgeInOut [Show more] Type: Variable Category: Drawing the track Summary: Table for mapping the verge tables to the outer and inner edges of the verge marks
Context: See this variable on its own page References: This variable is used as follows: * DrawVergeEdge calls vergeEdgeInOut
.vergeEdgeInOut EQUB 16 \ leftVergeStart is an outer edge of the verge mark EQUB 0 \ leftTrackStart is an inner edge of the verge mark EQUB 0 \ rightVergeStart is an inner edge of the verge mark EQUB 16 \ rightGrassStart is an outer edge of the verge mark
Name: handPixels [Show more] Type: Variable Category: Dashboard Summary: The number of pixels in the longest axis for the rev counter hand at various points in a half-quadrant Deep dive: Trigonometry
Context: See this variable on its own page References: This variable is used as follows: * DrawRevCounter calls handPixels

This table contains values that are used to calculate the coordinates of the end of the hand in the rev counter. The contents of the table are very close to the following (the values from the following calculation are shown in the comments below - they are close, but not quite a perfect match, so I haven't got this exactly right): FOR I%, 0, 21 EQUB INT(0.5 + 28 * COS((PI/4) * I% / 21)) NEXT This gives the length of the adjacent side of a right-angled triangle, with a hypotenuse of length 28, and an angle ranging from 0 to PI/4 (i.e. one eighth of a circle), split up into 21 points per eighth of a circle. In other words, if we have a clock whose centre is at the origin, then this table contains the x-coordinate of the end of a clock hand of length 28 as it moves from 3 o'clock to half past 4.
.handPixels EQUB 28 \ INT(0.5 + 28.00) = 28 EQUB 28 \ INT(0.5 + 27.98) = 28 EQUB 28 \ INT(0.5 + 27.92) = 28 EQUB 28 \ INT(0.5 + 27.82) = 28 EQUB 28 \ INT(0.5 + 27.69) = 28 EQUB 27 \ INT(0.5 + 27.51) = 28 (doesn't match) EQUB 27 \ INT(0.5 + 27.30) = 27 EQUB 27 \ INT(0.5 + 27.05) = 27 EQUB 27 \ INT(0.5 + 26.76) = 27 EQUB 26 \ INT(0.5 + 26.43) = 26 EQUB 26 \ INT(0.5 + 26.06) = 26 EQUB 26 \ INT(0.5 + 25.66) = 26 EQUB 25 \ INT(0.5 + 25.23) = 25 EQUB 25 \ INT(0.5 + 24.76) = 25 EQUB 24 \ INT(0.5 + 24.25) = 24 EQUB 24 \ INT(0.5 + 23.71) = 24 EQUB 23 \ INT(0.5 + 23.13) = 23 EQUB 22 \ INT(0.5 + 22.53) = 23 (doesn't match) EQUB 21 \ INT(0.5 + 21.89) = 22 (doesn't match) EQUB 20 \ INT(0.5 + 21.22) = 21 (doesn't match) EQUB 20 \ INT(0.5 + 20.53) = 21 (doesn't match) EQUB 20 \ INT(0.5 + 19.80) = 20 EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81 EQUB &81, &81
Name: dashData2 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData2 * fillDataOffset calls dashData2
.dashData2 SKIP 52 \ Populated with code from &7F64 to &7F97
Name: staDrawByte [Show more] Type: Variable Category: Screen buffer Summary: Low address bytes of the STA instructions in the DRAW_BYTE macros, for use when drawing track lines around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 2 of 4) calls staDrawByte * DrawTrackView (Part 3 of 4) calls staDrawByte
.staDrawByte EQUB 3 * 17 + 15 \ Line 0 = LO(address) of STA (P),Y in DRAW_BYTE 3 EQUB 5 * 17 + 15 \ Line 1 = LO(address) of STA (P),Y in DRAW_BYTE 5 EQUB 6 * 17 + 15 \ Line 2 = LO(address) of STA (P),Y in DRAW_BYTE 6 EQUB 6 * 17 + 15 \ Line 3 = LO(address) of STA (P),Y in DRAW_BYTE 6 EQUB 6 * 17 + 15 \ Line 4 = LO(address) of STA (P),Y in DRAW_BYTE 6 EQUB 6 * 17 + 15 \ Line 5 = LO(address) of STA (P),Y in DRAW_BYTE 6 EQUB 6 * 17 + 15 \ Line 6 = LO(address) of STA (P),Y in DRAW_BYTE 6 EQUB 7 * 17 + 15 \ Line 7 = LO(address) of STA (P),Y in DRAW_BYTE 7 EQUB 7 * 17 + 15 \ Line 8 = LO(address) of STA (P),Y in DRAW_BYTE 7 EQUB 7 * 17 + 15 \ Line 9 = LO(address) of STA (P),Y in DRAW_BYTE 7 EQUB 7 * 17 + 15 \ Line 10 = LO(address) of STA (P),Y in DRAW_BYTE 7 EQUB 7 * 17 + 15 \ Line 11 = LO(address) of STA (P),Y in DRAW_BYTE 7 EQUB 8 * 17 + 15 \ Line 12 = LO(address) of STA (P),Y in DRAW_BYTE 8 EQUB 8 * 17 + 15 \ Line 13 = LO(address) of STA (P),Y in DRAW_BYTE 8 EQUB 8 * 17 + 15 \ Line 14 = LO(address) of STA (P),Y in DRAW_BYTE 8 EQUB 8 * 17 + 15 \ Line 15 = LO(address) of STA (P),Y in DRAW_BYTE 8 EQUB 9 * 17 + 15 \ Line 16 = LO(address) of STA (P),Y in DRAW_BYTE 9 EQUB 9 * 17 + 15 \ Line 17 = LO(address) of STA (P),Y in DRAW_BYTE 9 EQUB 9 * 17 + 15 \ Line 18 = LO(address) of STA (P),Y in DRAW_BYTE 9 EQUB 9 * 17 + 15 \ Line 19 = LO(address) of STA (P),Y in DRAW_BYTE 9 EQUB 10 * 17 + 15 \ Line 20 = LO(address) of STA (P),Y in DRAW_BYTE 10 EQUB 10 * 17 + 15 \ Line 21 = LO(address) of STA (P),Y in DRAW_BYTE 10 EQUB 10 * 17 + 15 \ Line 22 = LO(address) of STA (P),Y in DRAW_BYTE 10 EQUB 10 * 17 + 15 \ Line 23 = LO(address) of STA (P),Y in DRAW_BYTE 10 EQUB 11 * 17 + 15 \ Line 24 = LO(address) of STA (P),Y in DRAW_BYTE 11 EQUB 11 * 17 + 15 \ Line 25 = LO(address) of STA (P),Y in DRAW_BYTE 11 EQUB 11 * 17 + 15 \ Line 26 = LO(address) of STA (P),Y in DRAW_BYTE 11 EQUB 11 * 17 + 15 \ Line 27 = LO(address) of STA (P),Y in DRAW_BYTE 11 EQUB 12 * 17 + 15 \ Line 28 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 29 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 30 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 31 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 32 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 33 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 34 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 35 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 36 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 37 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 12 * 17 + 15 \ Line 38 = LO(address) of STA (P),Y in DRAW_BYTE 12 EQUB 13 * 17 + 15 \ Line 39 = LO(address) of STA (P),Y in DRAW_BYTE 13 EQUB 13 * 17 + 15 \ Line 40 = LO(address) of STA (P),Y in DRAW_BYTE 13 EQUB 13 * 17 + 15 \ Line 41 = LO(address) of STA (P),Y in DRAW_BYTE 13 EQUB 13 * 17 + 15 \ Line 42 = LO(address) of STA (P),Y in DRAW_BYTE 13 EQUB 13 * 17 + 15 \ Line 43 = LO(address) of STA (P),Y in DRAW_BYTE 13 EQUB &28, &28 \ These bytes appear to be unused EQUB &00, &00 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81
Name: dashData3 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData3 * fillDataOffset calls dashData3
.dashData3 SKIP 58 \ Populated with code from &7F2A to &7F63
Name: DrawFence (Part 2 of 2) [Show more] Type: Subroutine Category: Screen buffer Summary: Draw the fence that we crash into when running off the track
Context: See this subroutine on its own page References: No direct references to this subroutine in this source file
.fenc2 LDX #3 \ Set X = 3, to use as an index into the fencePixelsSky \ and fencePixelsGrass tables, so we draw pixel bytes \ repeatedly from these two tables to build up the fence \ effect .fenc3 CPY horizonLine \ If Y < horizonLine, then this pixel row is below the BCC fenc4 \ horizon, so jump to fenc4 to draw the fence with green \ grass behind it LDA fencePixelsSky,X \ Otherwise this pixel row is above the horizon, so set \ A to the correct pixel byte for the fence with blue \ sky behind it BNE fenc5 \ Jump to fenc5 (this BNE is effectively a JMP as A is \ never zero) .fenc4 LDA fencePixelsGrass,X \ Set A to the correct pixel byte for the fence with \ green grass behind it .fenc5 STA (P),Y \ Store A in the dash data block at (Q P), to draw this \ four-pixel part of the fence in the track view STA tyreRightEdge,Y \ Store A in the tyreRightEdge and dashRightEdge STA dashRightEdge,Y \ entries for this row, so the drawing routines can wrap \ the fence correctly around the dashboard and tyres DEX \ Decrement X to point to the next pixel byte in the \ fence pixel byte tables BPL fenc6 \ If we just decremented X to -1, set it back to 3, so LDX #3 \ X goes 3, 2, 1, 0, then 3, 2, 1, 0, and so on .fenc6 DEY \ Decrement the byte counter in Y to point to the next \ byte in the dash data block CPY U \ If Y <> U then we have not yet drawn the fence in all BNE fenc3 \ the bytes in the dash data block (as U contains the \ dashDataOffset for this block, which contains the \ offset of the last byte that we need to fill), so loop \ back to draw the next byte of the fence \ If we get here then we have drawn fence through the \ whole dash data block, so now we move on to the next \ block by updating the counter in T and pointing (Q P) \ to the next dash data block INC T \ Increment the loop counter to point to the next dash \ data block LDA P \ Set (Q P) = (Q P) + &80 EOR #&80 \ STA P \ starting with the low bytes \ \ We can do the addition more efficiently by using EOR \ to flip between &xx00 and &xx80, as the dash data \ blocks always start at these addresses BMI fenc7 \ We then increment the high byte, but only if the EOR INC Q \ set the low byte to &00 rather than &80 (if we just \ set it to the latter, the BMI will skip the INC) .fenc7 JMP fenc1 \ Loop back to part 1 to draw the fence in the next dash \ data block EQUB 0 \ This byte appears to be unused
Name: token18 [Show more] Type: Variable Category: Text Summary: Text for recursive token 18 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token18 * tokenLo calls token18
.token18 EQUS " 5" \ Print " 5" EQUB 255 \ End token EQUB &81 \ This byte appears to be unused
Name: dashData4 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData4 * fillDataOffset calls dashData4
.dashData4 SKIP 76 \ Populated with code from &7EDE to &7F29
Name: PrintDriverName [Show more] Type: Subroutine Category: Text Summary: Print a driver's name
Context: See this subroutine on its own page References: This subroutine is called as follows: * PrintDriverPrompt calls PrintDriverName * PrintPositionName calls PrintDriverName

Arguments: (Y A) Address of 12-character driver name
.PrintDriverName STY S \ Set (S R) = (Y A) STA R LDY #0 \ Set a character counter in Y .name1 LDA (R),Y \ Set A to the Y-th character from (S R) JSR PrintCharacter \ Print the character in A INY \ Increment the character counter CPY #12 \ Loop back to print the next character until we have BNE name1 \ printed all 12 characters RTS \ Return from the subroutine
Name: CheckRestartKeys [Show more] Type: Subroutine Category: Keyboard Summary: If the restart keys are being pressed, restart the game
Context: See this subroutine on its own page References: This subroutine is called as follows: * GetMenuOption calls CheckRestartKeys * WaitForSpaceReturn calls CheckRestartKeys * HeadToTrack calls entry point RestartGame

Other entry points: RestartGame Restart the game, putting the C flag into bit 7 of pressingShiftArrow
.CheckRestartKeys LDX #&FF \ Scan the keyboard to see if SHIFT is being pressed JSR ScanKeyboard BNE rest1 \ If SHIFT is not being pressed, jump to rest1 LDX #&86 \ Scan the keyboard to see if right arrow is being JSR ScanKeyboard \ pressed (if it is this will also set the C flag) BNE rest1 \ If right arrow is not being pressed, jump to rest1 BIT pressingShiftArrow \ If bit 7 of pressingShiftArrow is set, then we are BMI rest2 \ still pressing Shift-arrow from a previous restart, so \ jump to rest2 to return from the subroutine without \ anything doing \ If we get here then SHIFT-arrow is being pressed and \ bit 7 of pressingShiftArrow is clear, so this is a \ new pressing SHIFT-arrow, so we fall through into \ RestartGame with the C flag set to restart the game \ and set bit 7 of pressingShiftArrow .RestartGame LDX startingStack \ Set the stack pointer to the value it had when the TXS \ game started, which clears any stored addresses put on \ the stack by the code we are now exiting from ROR pressingShiftArrow \ Shift the C flag into bit 7 of pressingShiftArrow JMP MainLoop \ Jump to the start of the main gane loop to restart the \ game .rest1 LSR pressingShiftArrow \ Clear bit 7 of pressingShiftArrow to indicate that we \ are no longer pressing SHIFT-arrow .rest2 RTS \ Return from the subroutine EQUB &00, &00 \ These bytes appear to be unused
Name: token19 [Show more] Type: Variable Category: Text Summary: Text for recursive token 19 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token19 * tokenLo calls token19
.token19 EQUS "10" \ Print "10" EQUB 255 \ End token
Name: dashData5 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData5 * fillDataOffset calls dashData5
.dashData5 SKIP 77 \ Populated with code from &7E91 to &7EDD
Name: GetNumberFromText [Show more] Type: Subroutine Category: Text Summary: Convert a two-digit string into a number
Context: See this subroutine on its own page References: This subroutine is called as follows: * GetNumberInput calls GetNumberFromText

Arguments: T The first digit of the number, as text U The second digit of the number, as text Returns: A The numerical value of the number C flag The status of the conversion: * Clear if the string is a valid number and A <= 40 * Set if string is not a valid number, or A > 40
.GetNumberFromText LDA T \ Set A to the character containing the first digit CMP #' ' \ If the first digit is not a space, skip the following BNE tnum1 \ instruction LDA #'0' \ The first digit is a space, so convert it to a "0" .tnum1 SEC \ Subtract the ASCII value for "0" to get the numerical SBC #'0' \ value of the first digit into A CMP #10 \ If the value of the first digit is greater than 10, BCS tnum2 \ then this is not a valid number, so jump to tnum2 to \ return from the subroutine with the C flag set, to \ indicate an error STA T \ Set T = the value of the first digit LDX U \ Set X to the character containing the second digit CPX #' ' \ If the second digit is a space, then jump to tnum2 to CLC \ return from the subroutine with the value of the first BEQ tnum2 \ digit in A and the C flag clear, to indicate success ASL A \ Set T = (A << 2 + T) << 1 ASL A \ = (A * 4 + A) * 2 ADC T \ = 10 * A ASL A \ STA T \ So T contains 10 * the numerical value of the first \ digit TXA \ Set A to the character containing the second digit SEC \ Subtract the ASCII value for "0" to get the numerical SBC #'0' \ value of the second digit CMP #10 \ If the value of the second digit is greater than 10, BCS tnum2 \ then this is not a valid number, so jump to tnum2 to \ return from the subroutine with the C flag set, to \ indicate an error ADC T \ Set A = A + T \ = the numerical value of the second digit \ + 10 * the numerical value of the first digit \ \ which is the numerical value of the two-digit string CMP #41 \ If A < 41, clear the C flag, otherwise set it .tnum2 RTS \ Return from the subroutine
Name: startDialLo [Show more] Type: Variable Category: Drawing pixels Summary: The low byte of the screen address of the start of the dial hand on the rev counter
Context: See this variable on its own page References: This variable is used as follows: * DrawRevCounter calls startDialLo
.startDialLo EQUB &66 \ Quadrant 0 (12:00 to 3:00) = &7566 EQUB &67 \ Quadrant 1 (3:00 to 6:00) = &7567 EQUB &5F \ Quadrant 2 (6:00 to 9:00) = &755F EQUB &5E \ Quadrant 3 (9:00 to 12:00) = &755E
Name: token20 [Show more] Type: Variable Category: Text Summary: Text for recursive token 20 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token20 * tokenLo calls token20
.token20 EQUS "20" \ Print "20" EQUB 255 \ End token
Name: dashData6 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData6 * fillDataOffset calls dashData6
.dashData6 SKIP 77 \ Populated with code from &7E44 to &7E90
Name: leftDashPixels [Show more] Type: Variable Category: Dashboard Summary: Pixels along the left edge of the dashboard Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 2 of 4) calls leftDashPixels * DrawTrackView (Part 3 of 4) calls leftDashPixels

Contains a pixel byte for the white border (colour 2) along the left edge of the dashboard. There is a byte for each track line from 43 (the track line at the top of the dashboard) down to 3 (the lowest track line, just above where the wing mirror joins the car body). Lines 0 to 2 are not used. Each pixel is a colour 2 pixel, so the high nibble contains a 1 and the low nibble contains a 0, to give colour %10. Colour 2 is mapped to white at this point of the custom screen.
.leftDashPixels EQUB %00000000 \ Line 0 EQUB %00000000 \ Line 1 EQUB %11110000 \ Line 2 EQUB %01110000 \ Line 3 EQUB %00110000 \ Line 4 EQUB %00010000 \ Line 5 EQUB %00000000 \ Line 6 EQUB %01110000 \ Line 7 EQUB %01110000 \ Line 8 EQUB %00110000 \ Line 9 EQUB %00010000 \ Line 10 EQUB %00000000 \ Line 11 EQUB %01110000 \ Line 12 EQUB %00110000 \ Line 13 EQUB %00010000 \ Line 14 EQUB %00000000 \ Line 15 EQUB %01110000 \ Line 16 EQUB %00110000 \ Line 17 EQUB %00010000 \ Line 18 EQUB %00000000 \ Line 19 EQUB %01110000 \ Line 20 EQUB %00110000 \ Line 21 EQUB %00010000 \ Line 22 EQUB %00000000 \ Line 23 EQUB %01110000 \ Line 24 EQUB %00110000 \ Line 25 EQUB %00010000 \ Line 26 EQUB %00000000 \ Line 27 EQUB %01110000 \ Line 28 EQUB %01000000 \ Line 29 EQUB %00110000 \ Line 30 EQUB %00100000 \ Line 31 EQUB %00110000 \ Line 32 EQUB %00010000 \ Line 33 EQUB %00010000 \ Line 34 EQUB %00010000 \ Line 35 EQUB %00000000 \ Line 36 EQUB %00000000 \ Line 37 EQUB %00000000 \ Line 38 EQUB %01000000 \ Line 39 EQUB %01110000 \ Line 40 EQUB %01000000 \ Line 41 EQUB %00110000 \ Line 42 EQUB %00110000 \ Line 43
Name: pixelsToLeft [Show more] Type: Variable Category: Drawing pixels Summary: Pixel byte with all the pixels to the left of position X set
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdge (Part 3 of 5) calls pixelsToLeft * DrawVergeByteLeft calls pixelsToLeft * DrawVergeByteRight calls pixelsToLeft
.pixelsToLeft EQUB %00000000 EQUB %10001000 EQUB %11001100 EQUB %11101110 EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81 EQUB &81, &81 EQUB &81
Name: dashData7 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData7 * fillDataOffset calls dashData7
.dashData7 SKIP 73 \ Populated with code from &7DFB to &7E43
Name: rightDashPixels [Show more] Type: Variable Category: Dashboard Summary: Pixels along the right edge of the dashboard Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 2 of 4) calls rightDashPixels * DrawTrackView (Part 3 of 4) calls rightDashPixels

Contains a pixel byte for the white border (colour 2) along the right edge of the dashboard. There is a byte for each track line from 43 (the track line at the top of the dashboard) down to 3 (the lowest track line, just above where the wing mirror joins the car body). Lines 0 to 2 are not used. Each pixel is a colour 2 pixel, so the high nibble contains a 1 and the low nibble contains a 0, to give colour %10. Colour 2 is mapped to white at this point of the custom screen.
.rightDashPixels EQUB %00000000 \ Line 0 EQUB %00000000 \ Line 1 EQUB %11110000 \ Line 2 EQUB %11100000 \ Line 3 EQUB %11000000 \ Line 4 EQUB %10000000 \ Line 5 EQUB %00000000 \ Line 6 EQUB %11100000 \ Line 7 EQUB %11100000 \ Line 8 EQUB %11000000 \ Line 9 EQUB %10000000 \ Line 10 EQUB %00000000 \ Line 11 EQUB %11100000 \ Line 12 EQUB %11000000 \ Line 13 EQUB %10000000 \ Line 14 EQUB %00000000 \ Line 15 EQUB %11100000 \ Line 16 EQUB %11000000 \ Line 17 EQUB %10000000 \ Line 18 EQUB %00000000 \ Line 19 EQUB %11100000 \ Line 20 EQUB %11000000 \ Line 21 EQUB %10000000 \ Line 22 EQUB %00000000 \ Line 23 EQUB %11100000 \ Line 24 EQUB %11000000 \ Line 25 EQUB %10000000 \ Line 26 EQUB %00000000 \ Line 27 EQUB %11100000 \ Line 28 EQUB %00100000 \ Line 29 EQUB %11000000 \ Line 30 EQUB %01000000 \ Line 31 EQUB %11000000 \ Line 32 EQUB %10000000 \ Line 33 EQUB %10000000 \ Line 34 EQUB %10000000 \ Line 35 EQUB %00000000 \ Line 36 EQUB %00000000 \ Line 37 EQUB %00000000 \ Line 38 EQUB %00100000 \ Line 39 EQUB %11100000 \ Line 40 EQUB %00100000 \ Line 41 EQUB %11000000 \ Line 42 EQUB %11000000 \ Line 43
Name: pixelsEdgeRight [Show more] Type: Variable Category: Drawing pixels Summary: Pixel byte with all the pixels to the right of position X set, plus pixel X
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdge (Part 3 of 5) calls pixelsEdgeRight * DrawSegmentEdge (Part 3 of 7) calls pixelsEdgeRight
.pixelsEdgeRight EQUB %11111111 EQUB %01110111 EQUB %00110011 EQUB %00010001
Name: token11 [Show more] Type: Variable Category: Text Summary: Text for recursive token 11 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token11 * tokenLo calls token11
.token11 EQUS "ENTER " \ Print "ENTER " EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81 EQUB &81
Name: dashData8 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData8 * fillDataOffset calls dashData8
.dashData8 SKIP 68 \ Populated with code from &7DB7 to &7DFA
Name: Absolute8Bit [Show more] Type: Subroutine Category: Maths (Arithmetic) Summary: Calculate the absolute value (modulus) of an 8-bit number
This routine returns |A|. It can also return A * abs(n), where A is given the sign of n. Arguments: A The number to make positive N flag Controls the sign to be applied: * If we want to calculate |A|, do an LDA or equivalent before calling the routine * If we want to calculate A * abs(n), do a BIT n before calling the routine * If we want to set the sign of A, then call with: * N flag clear to calculate A * 1 * N flag set to calculate A * -1
.Absolute8Bit BPL aval1 \ If A is positive then it already contains its absolute \ value, so jump to aval1 to return from the subroutine EOR #&FF \ Negate the value in A using two's complement, as the CLC \ following is true when A is negative: ADC #1 \ \ |A| = -A \ = ~A + 1 .aval1 RTS \ Return from the subroutine
Name: paletteSection2 [Show more] Type: Variable Category: Screen mode Summary: Colour palette for screen section 2 in the custom screen mode (part of the mode 5 portion) Deep dive: Hidden secrets of the custom screen mode
Context: See this variable on its own page References: This variable is used as follows: * ScreenHandler calls paletteSection2

Palette data is given as a set of bytes, with each byte mapping a logical colour to a physical one. In each byte, the logical colour is given in bits 4-7 and the physical colour in bits 0-3. See p.379 of the Advanced User Guide for details of how palette mapping works, as in modes 4 and 5 we have to do multiple palette commands to change the colours correctly, and the physical colour value is EOR'd with 7, just to make things even more confusing. Each of these mappings requires six calls to SHEILA &21 - see p.379 of the Advanced User Guide for an explanation.
.paletteSection2 EQUB &07, &17 \ Map logical colour 0 to physical colour 0 (black) EQUB &47, &57 EQUB &23, &33 \ Map logical colour 1 to physical colour 4 (blue) EQUB &63, &73 EQUB &80, &90 \ Map logical colour 2 to physical colour 7 (white) EQUB &C0, &D0 EQUB &A5, &B5 \ Map logical colour 3 to physical colour 2 (green) EQUB &E5, &F5
Name: paletteSection0 [Show more] Type: Variable Category: Screen mode Summary: Colour palette for screen section 0 in the custom screen mode (the mode 4 portion) Deep dive: Hidden secrets of the custom screen mode
Context: See this variable on its own page References: This variable is used as follows: * ScreenHandler calls paletteSection0
.paletteSection0 EQUB &03, &13 \ Map logical colour 0 to physical colour 4 (blue) EQUB &23, &33 EQUB &43, &53 EQUB &63, &73 EQUB &84, &94 \ Map logical colour 1 to physical colour 3 (yellow) EQUB &A4, &B4 EQUB &C4, &D4 EQUB &E4, &F4
Name: paletteSection3 [Show more] Type: Variable Category: Screen mode Summary: Colour palette for screen section 3 in the custom screen mode (part of the mode 5 portion) Deep dive: Hidden secrets of the custom screen mode
Context: See this variable on its own page References: This variable is used as follows: * ScreenHandler calls paletteSection3
.paletteSection3 EQUB &26, &36 \ Map logical colour 1 to physical colour 1 (red) EQUB &66, &76
Name: paletteSection4 [Show more] Type: Variable Category: Screen mode Summary: Colour palette for screen section 4 in the custom screen mode (part of the mode 5 portion) Deep dive: Hidden secrets of the custom screen mode
Context: See this variable on its own page References: This variable is used as follows: * ScreenHandler calls paletteSection4
.paletteSection4 EQUB &A1, &B1 \ Map logical colour 3 to physical colour 6 (cyan) EQUB &E1, &F1
Name: token25 [Show more] Type: Variable Category: Text Summary: Text for recursive token 25 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token25 * tokenLo calls token25
.token25 EQUB 31, 13, 18 \ Move text cursor to column 13, row 18 EQUS "front" \ Print "front" EQUB 160 + 2 \ Print 2 spaces EQUB 133 \ Set foreground colour to magenta alphanumeric EQUB 200 + 16 \ Print token 16 (" > ") EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81
Name: dashData9 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData9 * fillDataOffset calls dashData9
.dashData9 SKIP 64 \ Populated with code from &7D77 to &7DB6
Name: WaitForSpace [Show more] Type: Subroutine Category: Keyboard Summary: Print a prompt, wait for the SPACE key to be released, and wait for SPACE to be pressed
Context: See this subroutine on its own page References: This subroutine is called as follows: * GetWingSettings calls WaitForSpace * MainLoop (Part 5 of 6) calls WaitForSpace * PrintDriverPrompt calls WaitForSpace
.WaitForSpace LDA #0 \ Set A = 0 so WaitForSpaceReturn waits for SPACE to be \ pressed \ Fall through into WaitForSpaceReturn to print the \ prompt, wait for the SPACE key to be released, and \ wait for SPACE to be pressed
Name: WaitForSpaceReturn [Show more] Type: Subroutine Category: Keyboard Summary: Print a prompt, wait for the SPACE key to be released, and wait for either SPACE or RETURN to be pressed
Context: See this subroutine on its own page References: This subroutine is called as follows: * PrintDriverTable calls WaitForSpaceReturn

Arguments: A Determines the key to wait for: * Bit 7 clear = wait for SPACE to be pressed * Bit 7 set = wait for SPACE or RETURN to be pressed Returns: G If bit 7 was set on entry, then it is cleared if RETURN was pressed, but remains set if SPACE was pressed
.WaitForSpaceReturn STA G \ Store A in G so we can check the value of bit 7 below LDX #30 \ Print token 30 ("PRESS SPACE BAR TO CONTINUE" in cyan JSR PrintToken \ at column 5, row 24) .wait1 LDX #&9D \ Scan the keyboard to see if SPACE is being pressed JSR ScanKeyboard BEQ wait1 \ If SPACE is being pressed, loop back to wait1 until \ it is released .wait2 LDX #&9D \ Scan the keyboard to see if SPACE is being pressed JSR ScanKeyboard BEQ wait3 \ If SPACE is being pressed, jump to wait3 to return \ from the subroutine JSR CheckRestartKeys \ Check whether the restart keys are being pressed, and \ if they are, restart the game (the restart keys are \ SHIFT and right arrow) BIT G \ If bit 7 of G is clear, jump back to wait2 to wait for BPL wait2 \ SPACE to be pressed LDX #&B6 \ Scan the keyboard to see if RETURN is being pressed JSR ScanKeyboard BNE wait2 \ If RETURN is not being pressed, jump back to wait2 to \ wait for RETURN is being pressed LSR G \ Clear bit 7 of G .wait3 RTS \ Return from the subroutine
Name: pixelByte [Show more] Type: Variable Category: Drawing pixels Summary: A table of pixel bytes with individual pixels set
Context: See this variable on its own page References: This variable is used as follows: * DrawDashboardLine calls pixelByte
.pixelByte EQUB %10000000 \ Pixel byte with the first pixel set to colour 2 EQUB %01000000 \ Pixel byte with the second pixel set to colour 2 EQUB %00100000 \ Pixel byte with the third pixel set to colour 2 EQUB %00010000 \ Pixel byte with the fourth pixel set to colour 2 EQUB %00000000 \ Pixel byte with the first pixel set to colour 0 EQUB %00000000 \ Pixel byte with the second pixel set to colour 0 EQUB %00000000 \ Pixel byte with the third pixel set to colour 0 EQUB %00000000 \ Pixel byte with the fourth pixel set to colour 0
Name: token8 [Show more] Type: Variable Category: Text Summary: Text for recursive token 8 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token8 * tokenLo calls token8
.token8 EQUS "Amateur" \ Print "Amateur" EQUB 255 \ End token
Name: token51 [Show more] Type: Variable Category: Text Summary: Text for recursive token 51 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token51 * tokenLo calls token51
.token51 EQUS " POINTS" \ Print " POINTS" EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81
Name: dashData10 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData10 * fillDataOffset calls dashData10
.dashData10 SKIP 60 \ Populated with code from &7D3B to &7D76
Name: objectTop [Show more] Type: Variable Category: 3D objects Summary: Scaffold measurements for the top of each object part Deep dive: Object definitions Scaling objects with scaffolds
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdges calls objectTop

Entries contain indexes into the scaledScaffold table. n + 8 points to the negative value of n (as scaledScaffold+8 is filled with the negative of scaledScaffold).
.objectTop EQUB 7 + 8 \ Object 0, Part 0: Scaffolds: (-7, -6, -1, -2) \ Coordinates: (-4, -5, -22, -18) EQUB 7 + 8 \ Object 0, Part 1: Scaffolds: (-7, -6, 2, 1) \ Coordinates: (-4, -5, 18, 22) EQUB 6 + 8 \ Object 0, Part 2: Scaffolds: (-6, -3, -0, -4) \ Coordinates: (-5, -17, -24, -16) EQUB 6 + 8 \ Object 0, Part 3: Scaffolds: (-6, -3, 4, 0) \ Coordinates: (-5, -17, 16, 24) EQUB 5 + 8 \ Object 0, Part 4: Scaffolds: (-5, -3, -2, 2) \ Coordinates: (-8, -17, -18, 18) EQUB 5 \ Object 1, Part 0: Scaffolds: (5, 6, -5, 5) \ Coordinates: (5, 2, -5, 5) EQUB 6 \ Object 1, Part 1: Scaffolds: (6, -7, -3, 3) \ Coordinates: (2, -1, -8, 8) EQUB 7 + 8 \ Object 1, Part 2: Scaffolds: (-7, -5, -1, 1) \ Coordinates: (-1, -5, -12, 12) EQUB 4 \ Object 1, Part 3: Scaffolds: (4, 5, -6, 6) \ Coordinates: (6, 5, -2, 2) EQUB 6 + 8 \ Object 2, Part 0: Scaffolds: (-6, -5, -0, -4) \ Coordinates: (-3, -5, -26, -16) EQUB 0 \ Extra edges: Scaffolds: 0, 4 \ Coordinates: 26, 16 EQUB 5 + 8 \ Object 2, Part 2: Scaffolds: (-5, -3, -0, 0) \ Coordinates: (-5, -17, -26, 26) EQUB 7 + 8 \ Object 2, Part 3: Scaffolds: (-7, -6, -1, -2) \ Coordinates: (-2, -3, -24, -18) EQUB 7 + 8 \ Object 2, Part 4: Scaffolds: (-7, -6, 2, 1) \ Coordinates: (-2, -3, 18, 24) EQUB 2 \ Object 3, Part 0: Scaffolds: (2, 3, -0, 0) \ Coordinates: (6, 4, -16, 16) EQUB 3 \ Object 3, Part 1: Scaffolds: (3, 4, -0, 0) \ Coordinates: (4, 3, -16, 16) EQUB 4 \ Object 3, Part 2: Scaffolds: (4, -1, -5, 5) \ Coordinates: (3, -10, -1, 1) EQUB 1 + 8 \ Object 3, Part 3: Scaffolds: (-1, -0, -5, 5) \ Coordinates: (-10, -16, -1, 1) EQUB 6 \ Object 4, Part 0: Scaffolds: (6, -7, -4, 4) \ Coordinates: (3, -1, -6, 6) EQUB 7 + 8 \ Object 4, Part 1: Scaffolds: (-7, -5, -3, 3) \ Coordinates: (-1, -5, -12, 12) EQUB 6 + 8 \ Object 4, Part 2: Scaffolds: (-6, -5, -0, -2) \ Coordinates: (-3, -5, -26, -16) EQUB 0 \ Extra edges: Scaffolds: 0, 4 \ Coordinates: 26, 16 EQUB 5 + 8 \ Object 4, Part 4: Scaffolds: (-5, -1, -0, 0) \ Coordinates: (-5, -17, -26, 26) EQUB 7 \ Object 4, Part 5: Scaffolds: (7, -5, -7, 7) \ Coordinates: (1, -5, -1, 1) EQUB 4 \ Object 4, Part 6: Scaffolds: (4, 6, -2, 2) \ Coordinates: (6, 3, -16, 16) EQUB 2 + 8 \ Object 5, Part 0: Scaffolds: (-2, -1, -0, 0) \ Coordinates: (-3, -17, -26, 26) EQUB 0 \ Object 6, Part 0: Scaffolds: (0, 2, -1, 1) \ Coordinates: (16, 1, -10, 10) EQUB 1 \ Object 7, Part 0: Scaffolds: (1, -4, -0, 0) \ Coordinates: (20, -8, -28, 28) EQUB 4 + 8 \ Object 7, Part 1: Scaffolds: (-4, -2, -1, -3) \ Coordinates: (-8, -18, -20, -16) EQUB 4 + 8 \ Object 7, Part 2: Scaffolds: (-4, -2, 3, 1) \ Coordinates: (-8, -18, 16, 20) EQUB 2 \ Object 8, Part 0: Scaffolds: (2, -0, -3, 3) \ Coordinates: (3, -18, -2, 2) EQUB 1 \ Object 8, Part 1: Scaffolds: (1, 2, -3, 1) \ Coordinates: (16, 3, -2, 16) EQUB 1 \ Object 9, Part 0: Scaffolds: (1, -2, -0, 0) \ Coordinates: (12, -10, -16, 16) EQUB 2 + 8 \ Object 9, Part 1: Scaffolds: (-2, -0, -3, 3) \ Coordinates: (-10, -16, -3, 3) EQUB 3 \ Object 10, Part 0: Scaffolds: (3, 4, -0, 0) \ Coordinates: (4, 1, -10, 10) EQUB 4 \ Object 10, Part 1: Scaffolds: (4, -2, -0, -1) \ Coordinates: (1, -6, -10, -9) EQUB 0 \ Object 10, Part 2: Scaffolds: (0, 3, 1, 0) \ Coordinates: (10, 4, 9, 10) EQUB 1 \ Object 11, Part 0: Scaffolds: (1, 3, -0, 1) \ Coordinates: (8, 5, -10, 8) EQUB 3 \ Object 11, Part 1: Scaffolds: (3, -2, -0, -1) \ Coordinates: (5, -6, -10, -8) EQUB 1 \ Object 12, Part 0: Scaffolds: (1, 3, -1, 0) \ Coordinates: (8, 5, -8, 10) EQUB 3 \ Object 12, Part 1: Scaffolds: (3, -2, 1, 0) \ Coordinates: (5, -6, 8, 10)
Name: leftTyrePixels [Show more] Type: Variable Category: Dashboard Summary: Pixels along the edge of the left tyre Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 3 of 4) calls leftTyrePixels

Contains a pixel byte for the white border (colour 2) along the edge of the left tyre. The tyreEdgeIndex table maps track line numbers to entries in this table. Each pixel is a colour 2 pixel, so the high nibble contains a 1 and the low nibble contains a 0, to give colour %10. Colour 2 is mapped to white at this point of the custom screen.
.leftTyrePixels EQUB %00000000 EQUB %10000000 EQUB %11000000 EQUB %01000000 EQUB %01100000 EQUB %11100000 EQUB %00100000
Name: token31 [Show more] Type: Variable Category: Text Summary: Text for recursive token 31 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * SetRowColours calls token31 * tokenHi calls token31 * tokenLo calls token31
.token31 EQUS " " \ Print " " EQUB 156 \ Set background colour to black EQUB 134, 157 \ Set background colour (configurable, default is cyan) EQUB 132 \ Set foreground colour (configurable, default is blue \ alphanumeric EQUB 255 \ End token
Name: token3 [Show more] Type: Variable Category: Text Summary: Text for recursive token 3 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token3 * tokenLo calls token3
.token3 EQUS "ACCUMULATED" \ Print "ACCUMULATED" EQUB 200 + 51 \ Print token 51 (" POINTS") EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81
Name: dashData11 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData11 * fillDataOffset calls dashData11
.dashData11 SKIP 56 \ Populated with code from &7D03 to &7D3A
Name: objectBottom [Show more] Type: Variable Category: 3D objects Summary: Scaffold measurements for the bottom of each object part Deep dive: Object definitions Scaling objects with scaffolds
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdges calls objectBottom

Entries contain indexes into the scaledScaffold table. n + 8 points to the negative value of n (as scaledScaffold+8 is filled with the negative of scaledScaffold).
.objectBottom EQUB 6 + 8 \ Object 0, Part 0: Scaffolds: (-7, -6, -1, -2) \ Coordinates: (-4, -5, -22, -18) EQUB 6 + 8 \ Object 0, Part 1: Scaffolds: (-7, -6, 2, 1) \ Coordinates: (-4, -5, 18, 22) EQUB 3 + 8 \ Object 0, Part 2: Scaffolds: (-6, -3, -0, -4) \ Coordinates: (-5, -17, -24, -16) EQUB 3 + 8 \ Object 0, Part 3: Scaffolds: (-6, -3, 4, 0) \ Coordinates: (-5, -17, 16, 24) EQUB 3 + 8 \ Object 0, Part 4: Scaffolds: (-5, -3, -2, 2) \ Coordinates: (-8, -17, -18, 18) EQUB 6 \ Object 1, Part 0: Scaffolds: (5, 6, -5, 5) \ Coordinates: (5, 2, -5, 5) EQUB 7 + 8 \ Object 1, Part 1: Scaffolds: (6, -7, -3, 3) \ Coordinates: (2, -1, -8, 8) EQUB 5 + 8 \ Object 1, Part 2: Scaffolds: (-7, -5, -1, 1) \ Coordinates: (-1, -5, -12, 12) EQUB 5 \ Object 1, Part 3: Scaffolds: (4, 5, -6, 6) \ Coordinates: (6, 5, -2, 2) EQUB 5 + 8 \ Object 2, Part 0: Scaffolds: (-6, -5, -0, -4) \ Coordinates: (-3, -5, -26, -16) EQUB 7 \ Extra edges: Scaffolds: 0, 4 \ Coordinates: 26, 16 EQUB 3 + 8 \ Object 2, Part 2: Scaffolds: (-5, -3, -0, 0) \ Coordinates: (-5, -17, -26, 26) EQUB 6 + 8 \ Object 2, Part 3: Scaffolds: (-7, -6, -1, -2) \ Coordinates: (-2, -3, -24, -18) EQUB 6 + 8 \ Object 2, Part 4: Scaffolds: (-7, -6, 2, 1) \ Coordinates: (-2, -3, 18, 24) EQUB 3 \ Object 3, Part 0: Scaffolds: (2, 3, -0, 0) \ Coordinates: (6, 4, -16, 16) EQUB 4 \ Object 3, Part 1: Scaffolds: (3, 4, -0, 0) \ Coordinates: (4, 3, -16, 16) EQUB 1 + 8 \ Object 3, Part 2: Scaffolds: (4, -1, -5, 5) \ Coordinates: (3, -10, -1, 1) EQUB 0 + 8 \ Object 3, Part 3: Scaffolds: (-1, -0, -5, 5) \ Coordinates: (-10, -16, -1, 1) EQUB 7 + 8 \ Object 4, Part 0: Scaffolds: (6, -7, -4, 4) \ Coordinates: (3, -1, -6, 6) EQUB 5 + 8 \ Object 4, Part 1: Scaffolds: (-7, -5, -3, 3) \ Coordinates: (-1, -5, -12, 12) EQUB 5 + 8 \ Object 4, Part 2: Scaffolds: (-6, -5, -0, -2) \ Coordinates: (-3, -5, -26, -16) EQUB 7 \ Extra edges: Scaffolds: 0, 4 \ Coordinates: 26, 16 EQUB 1 + 8 \ Object 4, Part 4: Scaffolds: (-5, -1, -0, 0) \ Coordinates: (-5, -17, -26, 26) EQUB 5 + 8 \ Object 4, Part 5: Scaffolds: (7, -5, -7, 7) \ Coordinates: (1, -5, -1, 1) EQUB 6 \ Object 4, Part 6: Scaffolds: (4, 6, -2, 2) \ Coordinates: (6, 3, -16, 16) EQUB 1 + 8 \ Object 5, Part 0: Scaffolds: (-2, -1, -0, 0) \ Coordinates: (-3, -17, -26, 26) EQUB 2 \ Object 6, Part 0: Scaffolds: (0, 2, -1, 1) \ Coordinates: (16, 1, -10, 10) EQUB 4 + 8 \ Object 7, Part 0: Scaffolds: (1, -4, -0, 0) \ Coordinates: (20, -8, -28, 28) EQUB 2 + 8 \ Object 7, Part 1: Scaffolds: (-4, -2, -1, -3) \ Coordinates: (-8, -18, -20, -16) EQUB 2 + 8 \ Object 7, Part 2: Scaffolds: (-4, -2, 3, 1) \ Coordinates: (-8, -18, 16, 20) EQUB 0 + 8 \ Object 8, Part 0: Scaffolds: (2, -0, -3, 3) \ Coordinates: (3, -18, -2, 2) EQUB 2 \ Object 8, Part 1: Scaffolds: (1, 2, -3, 1) \ Coordinates: (16, 3, -2, 16) EQUB 2 + 8 \ Object 9, Part 0: Scaffolds: (1, -2, -0, 0) \ Coordinates: (12, -10, -16, 16) EQUB 0 + 8 \ Object 9, Part 1: Scaffolds: (-2, -0, -3, 3) \ Coordinates: (-10, -16, -3, 3) EQUB 4 \ Object 10, Part 0: Scaffolds: (3, 4, -0, 0) \ Coordinates: (4, 1, -10, 10) EQUB 2 + 8 \ Object 10, Part 1: Scaffolds: (4, -2, -0, -1) \ Coordinates: (1, -6, -10, -9) EQUB 3 \ Object 10, Part 2: Scaffolds: (0, 3, 1, 0) \ Coordinates: (10, 4, 9, 10) EQUB 3 \ Object 11, Part 0: Scaffolds: (1, 3, -0, 1) \ Coordinates: (8, 5, -10, 8) EQUB 2 + 8 \ Object 11, Part 1: Scaffolds: (3, -2, -0, -1) \ Coordinates: (5, -6, -10, -8) EQUB 3 \ Object 12, Part 0: Scaffolds: (1, 3, -1, 0) \ Coordinates: (8, 5, -8, 10) EQUB 2 + 8 \ Object 12, Part 1: Scaffolds: (3, -2, 1, 0) \ Coordinates: (5, -6, 8, 10)
Name: rightTyrePixels [Show more] Type: Variable Category: Dashboard Summary: Pixels along the edge of the right tyre Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 3 of 4) calls rightTyrePixels

Contains a pixel byte for the white border (colour 2) along the edge of the right tyre. The tyreEdgeIndex table maps track line numbers to entries in this table. Each pixel is a colour 2 pixel, so the high nibble contains a 1 and the low nibble contains a 0, to give colour %10. Colour 2 is mapped to white at this point of the custom screen.
.rightTyrePixels EQUB %00000000 EQUB %00010000 EQUB %00110000 EQUB %00100000 EQUB %01100000 EQUB %01110000 EQUB %01000000
Name: token0 [Show more] Type: Variable Category: Text Summary: Text for recursive token 0 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token0 * tokenLo calls token0
.token0 EQUS "FORMULA 3 " \ Print "FORMULA 3 " EQUS "CHAMPIONSHIP" \ Print "CHAMPIONSHIP" EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81
Name: dashData12 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData12 * fillDataOffset calls dashData12
.dashData12 SKIP 52 \ Populated with code from &7CCF to &7D02
Name: objectLeft [Show more] Type: Variable Category: 3D objects Summary: Scaffold measurements for the left of each object part Deep dive: Object definitions Scaling objects with scaffolds
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdges calls objectLeft

Entries contain indexes into the scaledScaffold table. n + 8 points to the negative value of n (as scaledScaffold+8 is filled with the negative of scaledScaffold).
.objectLeft EQUB 1 + 8 \ Object 0, Part 0: Scaffolds: (-7, -6, -1, -2) \ Coordinates: (-4, -5, -22, -18) EQUB 2 \ Object 0, Part 1: Scaffolds: (-7, -6, 2, 1) \ Coordinates: (-4, -5, 18, 22) EQUB 0 + 8 \ Object 0, Part 2: Scaffolds: (-6, -3, -0, -4) \ Coordinates: (-5, -17, -24, -16) EQUB 4 \ Object 0, Part 3: Scaffolds: (-6, -3, 4, 0) \ Coordinates: (-5, -17, 16, 24) EQUB 2 + 8 \ Object 0, Part 4: Scaffolds: (-5, -3, -2, 2) \ Coordinates: (-8, -17, -18, 18) EQUB 5 + 8 \ Object 1, Part 0: Scaffolds: (5, 6, -5, 5) \ Coordinates: (5, 2, -5, 5) EQUB 3 + 8 \ Object 1, Part 1: Scaffolds: (6, -7, -3, 3) \ Coordinates: (2, -1, -8, 8) EQUB 1 + 8 \ Object 1, Part 2: Scaffolds: (-7, -5, -1, 1) \ Coordinates: (-1, -5, -12, 12) EQUB 6 + 8 \ Object 1, Part 3: Scaffolds: (4, 5, -6, 6) \ Coordinates: (6, 5, -2, 2) EQUB 0 + 8 \ Object 2, Part 0: Scaffolds: (-6, -5, -0, -4) \ Coordinates: (-3, -5, -26, -16) EQUB 4 \ Extra edges: Scaffolds: 0, 4 \ Coordinates: 26, 16 EQUB 0 + 8 \ Object 2, Part 2: Scaffolds: (-5, -3, -0, 0) \ Coordinates: (-5, -17, -26, 26) EQUB 1 + 8 \ Object 2, Part 3: Scaffolds: (-7, -6, -1, -2) \ Coordinates: (-2, -3, -24, -18) EQUB 2 \ Object 2, Part 4: Scaffolds: (-7, -6, 2, 1) \ Coordinates: (-2, -3, 18, 24) EQUB 0 + 8 \ Object 3, Part 0: Scaffolds: (2, 3, -0, 0) \ Coordinates: (6, 4, -16, 16) EQUB 0 + 8 \ Object 3, Part 1: Scaffolds: (3, 4, -0, 0) \ Coordinates: (4, 3, -16, 16) EQUB 5 + 8 \ Object 3, Part 2: Scaffolds: (4, -1, -5, 5) \ Coordinates: (3, -10, -1, 1) EQUB 5 + 8 \ Object 3, Part 3: Scaffolds: (-1, -0, -5, 5) \ Coordinates: (-10, -16, -1, 1) EQUB 4 + 8 \ Object 4, Part 0: Scaffolds: (6, -7, -4, 4) \ Coordinates: (3, -1, -6, 6) EQUB 3 + 8 \ Object 4, Part 1: Scaffolds: (-7, -5, -3, 3) \ Coordinates: (-1, -5, -12, 12) EQUB 0 + 8 \ Object 4, Part 2: Scaffolds: (-6, -5, -0, -2) \ Coordinates: (-3, -5, -26, -16) EQUB 2 \ Extra edges: Scaffolds: 0, 4 \ Coordinates: 26, 16 EQUB 0 + 8 \ Object 4, Part 4: Scaffolds: (-5, -1, -0, 0) \ Coordinates: (-5, -17, -26, 26) EQUB 7 + 8 \ Object 4, Part 5: Scaffolds: (7, -5, -7, 7) \ Coordinates: (1, -5, -1, 1) EQUB 2 + 8 \ Object 4, Part 6: Scaffolds: (4, 6, -2, 2) \ Coordinates: (6, 3, -16, 16) EQUB 0 + 8 \ Object 5, Part 0: Scaffolds: (-2, -1, -0, 0) \ Coordinates: (-3, -17, -26, 26) EQUB 1 + 8 \ Object 6, Part 0: Scaffolds: (0, 2, -1, 1) \ Coordinates: (16, 1, -10, 10) EQUB 0 + 8 \ Object 7, Part 0: Scaffolds: (1, -4, -0, 0) \ Coordinates: (20, -8, -28, 28) EQUB 1 + 8 \ Object 7, Part 1: Scaffolds: (-4, -2, -1, -3) \ Coordinates: (-8, -18, -20, -16) EQUB 3 \ Object 7, Part 2: Scaffolds: (-4, -2, 3, 1) \ Coordinates: (-8, -18, 16, 20) EQUB 3 + 8 \ Object 8, Part 0: Scaffolds: (2, -0, -3, 3) \ Coordinates: (3, -18, -2, 2) EQUB 3 + 8 \ Object 8, Part 1: Scaffolds: (1, 2, -3, 1) \ Coordinates: (16, 3, -2, 16) EQUB 0 + 8 \ Object 9, Part 0: Scaffolds: (1, -2, -0, 0) \ Coordinates: (12, -10, -16, 16) EQUB 3 + 8 \ Object 9, Part 1: Scaffolds: (-2, -0, -3, 3) \ Coordinates: (-10, -16, -3, 3) EQUB 0 + 8 \ Object 10, Part 0: Scaffolds: (3, 4, -0, 0) \ Coordinates: (4, 1, -10, 10) EQUB 0 + 8 \ Object 10, Part 1: Scaffolds: (4, -2, -0, -1) \ Coordinates: (1, -6, -10, -9) EQUB 1 \ Object 10, Part 2: Scaffolds: (0, 3, 1, 0) \ Coordinates: (10, 4, 9, 10) EQUB 0 + 8 \ Object 11, Part 0: Scaffolds: (1, 3, -0, 1) \ Coordinates: (8, 5, -10, 8) EQUB 0 + 8 \ Object 11, Part 1: Scaffolds: (3, -2, -0, -1) \ Coordinates: (5, -6, -10, -8) EQUB 1 + 8 \ Object 12, Part 0: Scaffolds: (1, 3, -1, 0) \ Coordinates: (8, 5, -8, 10) EQUB 1 \ Object 12, Part 1: Scaffolds: (3, -2, 1, 0) \ Coordinates: (5, -6, 8, 10)
Name: leftTyreMask [Show more] Type: Variable Category: Dashboard Summary: Pixel mask for the edge of the left tyre Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 3 of 4) calls leftTyreMask

Contains a mask byte for the track pixels along the edge of the left tyre. The tyreEdgeIndex table maps track line numbers to entries in this table. Set bits correspond to the track pixels, while clear bits correspond to the tyre pixels.
.leftTyreMask EQUB %11111111 EQUB %01110111 EQUB %00110011 EQUB %00110011 EQUB %00010001 EQUB %00010001 EQUB %00010001
Name: token42 [Show more] Type: Variable Category: Text Summary: Text for recursive token 42 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token42 * tokenLo calls token42
.token42 EQUB 160 + 11 \ Print 11 spaces EQUS "YOUR TIME " \ Print "YOUR TIME " EQUS "IS UP!" \ Print "IS UP!" EQUB 160 + 11 \ Print 11 spaces EQUB 255 \ End token
Name: token17 [Show more] Type: Variable Category: Text Summary: Text for recursive token 17 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token17 * tokenLo calls token17
.token17 EQUS "PRESS " \ Print "PRESS " EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81, &81 EQUB &81
Name: dashData13 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData13 * fillDataOffset calls dashData13
.dashData13 SKIP 41 \ Populated with code from &7CA6 to &7CCE
Name: objectRight [Show more] Type: Variable Category: 3D objects Summary: Scaffold measurements for the right of each object part Deep dive: Object definitions Scaling objects with scaffolds
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdges calls objectRight

Entries contain indexes into the scaledScaffold table. n + 8 points to the negative value of n (as scaledScaffold+8 is filled with the negative of scaledScaffold).
.objectRight EQUB 2 + 8 \ Object 0, Part 0: Scaffolds: (-7, -6, -1, -2) \ Coordinates: (-4, -5, -22, -18) EQUB 1 \ Object 0, Part 1: Scaffolds: (-7, -6, 2, 1) \ Coordinates: (-4, -5, 18, 22) EQUB 4 + 8 \ Object 0, Part 2: Scaffolds: (-6, -3, -0, -4) \ Coordinates: (-5, -17, -24, -16) EQUB 0 \ Object 0, Part 3: Scaffolds: (-6, -3, 4, 0) \ Coordinates: (-5, -17, 16, 24) EQUB 2 \ Object 0, Part 4: Scaffolds: (-5, -3, -2, 2) \ Coordinates: (-8, -17, -18, 18) EQUB 5 \ Object 1, Part 0: Scaffolds: (5, 6, -5, 5) \ Coordinates: (5, 2, -5, 5) EQUB 3 \ Object 1, Part 1: Scaffolds: (6, -7, -3, 3) \ Coordinates: (2, -1, -8, 8) EQUB 1 \ Object 1, Part 2: Scaffolds: (-7, -5, -1, 1) \ Coordinates: (-1, -5, -12, 12) EQUB 6 \ Object 1, Part 3: Scaffolds: (4, 5, -6, 6) \ Coordinates: (6, 5, -2, 2) EQUB 4 + 8 \ Object 2, Part 0: Scaffolds: (-6, -5, -0, -4) \ Coordinates: (-3, -5, -26, -16) EQUB 1 + 8 \ Extra edges: Scaffolds: 0, 4 \ Coordinates: 26, 16 EQUB 0 \ Object 2, Part 2: Scaffolds: (-5, -3, -0, 0) \ Coordinates: (-5, -17, -26, 26) EQUB 2 + 8 \ Object 2, Part 3: Scaffolds: (-7, -6, -1, -2) \ Coordinates: (-2, -3, -24, -18) EQUB 1 \ Object 2, Part 4: Scaffolds: (-7, -6, 2, 1) \ Coordinates: (-2, -3, 18, 24) EQUB 0 \ Object 3, Part 0: Scaffolds: (2, 3, -0, 0) \ Coordinates: (6, 4, -16, 16) EQUB 0 \ Object 3, Part 1: Scaffolds: (3, 4, -0, 0) \ Coordinates: (4, 3, -16, 16) EQUB 5 \ Object 3, Part 2: Scaffolds: (4, -1, -5, 5) \ Coordinates: (3, -10, -1, 1) EQUB 5 \ Object 3, Part 3: Scaffolds: (-1, -0, -5, 5) \ Coordinates: (-10, -16, -1, 1) EQUB 4 \ Object 4, Part 0: Scaffolds: (6, -7, -4, 4) \ Coordinates: (3, -1, -6, 6) EQUB 3 \ Object 4, Part 1: Scaffolds: (-7, -5, -3, 3) \ Coordinates: (-1, -5, -12, 12) EQUB 2 + 8 \ Object 4, Part 2: Scaffolds: (-6, -5, -0, -2) \ Coordinates: (-3, -5, -26, -16) EQUB 1 + 8 \ Extra edges: Scaffolds: 0, 4 \ Coordinates: 26, 16 EQUB 0 \ Object 4, Part 4: Scaffolds: (-5, -1, -0, 0) \ Coordinates: (-5, -17, -26, 26) EQUB 7 \ Object 4, Part 5: Scaffolds: (7, -5, -7, 7) \ Coordinates: (1, -5, -1, 1) EQUB 2 \ Object 4, Part 6: Scaffolds: (4, 6, -2, 2) \ Coordinates: (6, 3, -16, 16) EQUB 0 \ Object 5, Part 0: Scaffolds: (-2, -1, -0, 0) \ Coordinates: (-3, -17, -26, 26) EQUB 1 \ Object 6, Part 0: Scaffolds: (0, 2, -1, 1) \ Coordinates: (16, 1, -10, 10) EQUB 0 \ Object 7, Part 0: Scaffolds: (1, -4, -0, 0) \ Coordinates: (20, -8, -28, 28) EQUB 3 + 8 \ Object 7, Part 1: Scaffolds: (-4, -2, -1, -3) \ Coordinates: (-8, -18, -20, -16) EQUB 1 \ Object 7, Part 2: Scaffolds: (-4, -2, 3, 1) \ Coordinates: (-8, -18, 16, 20) EQUB 3 \ Object 8, Part 0: Scaffolds: (2, -0, -3, 3) \ Coordinates: (3, -18, -2, 2) EQUB 1 \ Object 8, Part 1: Scaffolds: (1, 2, -3, 1) \ Coordinates: (16, 3, -2, 16) EQUB 0 \ Object 9, Part 0: Scaffolds: (1, -2, -0, 0) \ Coordinates: (12, -10, -16, 16) EQUB 3 \ Object 9, Part 1: Scaffolds: (-2, -0, -3, 3) \ Coordinates: (-10, -16, -3, 3) EQUB 0 \ Object 10, Part 0: Scaffolds: (3, 4, -0, 0) \ Coordinates: (4, 1, -10, 10) EQUB 1 + 8 \ Object 10, Part 1: Scaffolds: (4, -2, -0, -1) \ Coordinates: (1, -6, -10, -9) EQUB 0 \ Object 10, Part 2: Scaffolds: (0, 3, 1, 0) \ Coordinates: (10, 4, 9, 10) EQUB 1 \ Object 11, Part 0: Scaffolds: (1, 3, -0, 1) \ Coordinates: (8, 5, -10, 8) EQUB 1 + 8 \ Object 11, Part 1: Scaffolds: (3, -2, -0, -1) \ Coordinates: (5, -6, -10, -8) EQUB 0 \ Object 12, Part 0: Scaffolds: (1, 3, -1, 0) \ Coordinates: (8, 5, -8, 10) EQUB 0 \ Object 12, Part 1: Scaffolds: (3, -2, 1, 0) \ Coordinates: (5, -6, 8, 10)
Name: rightTyreMask [Show more] Type: Variable Category: Dashboard Summary: Pixel mask for the edge of the right tyre Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 3 of 4) calls rightTyreMask

Contains a mask byte for the track pixels along the edge of the right tyre. The tyreEdgeIndex table maps track line numbers to entries in this table. Set bits correspond to the track pixels, while clear bits correspond to the tyre pixels.
.rightTyreMask EQUB %11111111 EQUB %11101110 EQUB %11001100 EQUB %11001100 EQUB %10001000 EQUB %10001000 EQUB %10001000
Name: token23 [Show more] Type: Variable Category: Text Summary: Text for recursive token 23 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token23 * tokenLo calls token23
.token23 EQUB 200 + 54 \ Print token 54 ("FORMULA 3 CHAMPIONSHIP" header) EQUB 200 + 35 \ Print token 35 (cyan, move cursor to prompt position) EQUB 160 + 7 \ Print 7 spaces EQUB 200 + 11 \ Print token 11 ("ENTER ") EQUS "NAME OF" \ Print "NAME OF" EQUB 200 + 12 \ Print token 12 (" DRIVER") EQUB 31, 12, 17 \ Move text cursor to column 12, row 17 EQUB 131 \ Set foreground colour to yellow alphanumeric EQUS "____________" \ Print "____________" EQUB 31, 9, 16 \ Move text cursor to column 9, row 16 EQUB 133 \ Set foreground colour to magenta alphanumeric EQUB 200 + 16 \ Print token 16 (" > ") EQUB 255 \ End token
Name: token35 [Show more] Type: Variable Category: Text Summary: Text for recursive token 35 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token35 * tokenLo calls token35
.token35 EQUB 31, 2, 10 \ Move text cursor to column 2, row 10 EQUB 134 \ Set foreground colour to cyan alphanumeric EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81 EQUB &81
Name: dashData14 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData14 * fillDataOffset calls dashData14
.dashData14 SKIP 36 \ Populated with code from &7C82 to &7CA5
Name: objectColour [Show more] Type: Variable Category: 3D objects Summary: Data for the colour of each object part Deep dive: Object definitions
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdges calls objectColour

Entries contain colour numbers and flags. n + 16 draws an outside edge in the fill colour rather than the edge colour. n + 64 indicates that this is the last part in this object. n + 128 indicates that this is a four-edge object part.
.objectColour EQUB 10 \ Object 0, Part 0: Edge: 2 (white), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 10 \ Object 0, Part 1: Edge: 2 (white), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 \ Object 0, Part 2: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 \ Object 0, Part 3: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 5 + 64 \ Object 0, Part 4: Edge: 1 (red), Fill: 1 (red) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 \ Object 1, Part 0: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 \ Object 1, Part 1: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 9 \ Object 1, Part 2: Edge: 1 (red), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 10 + 64 \ Object 1, Part 3: Edge: 2 (white), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 + 128 \ Object 2, Part 0: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 1 (yes) EQUB 8 \ Extra edges: Fill: 1 (red) EQUB 8 \ Object 2, Part 2: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 10 \ Object 2, Part 3: Edge: 2 (white), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 10 + 64 \ Object 2, Part 4: Edge: 2 (white), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 2 \ Object 3, Part 0: Edge: 2 (white), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 0 \ Object 3, Part 1: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 2 \ Object 3, Part 2: Edge: 2 (white), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 10 + 64 \ Object 3, Part 3: Edge: 2 (white), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 \ Object 4, Part 0: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 5 \ Object 4, Part 1: Edge: 1 (red), Fill: 1 (red) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 + 128 \ Object 4, Part 2: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 1 (yes) EQUB 8 \ Extra edges: Fill: 1 (red) EQUB 8 \ Object 4, Part 4: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 2 \ Object 4, Part 5: Edge: 2 (white), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 2 + 64 \ Object 4, Part 6: Edge: 2 (white), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 + 64 \ Object 5, Part 0: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 2 + 16 + 64 \ Object 6, Part 0: Edge: 2 (white), Fill: 0 (black) \ Outside: 1 (yes), Four-edge: 0 (no) EQUB 8 \ Object 7, Part 0: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 1 + 16 \ Object 7, Part 1: Edge: 1 (red), Fill: 0 (black) \ Outside: 1 (yes), Four-edge: 0 (no) EQUB 1 + 16 + 64 \ Object 7, Part 2: Edge: 1 (red), Fill: 0 (black) \ Outside: 1 (yes), Four-edge: 0 (no) EQUB 0 \ Object 8, Part 0: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 8 + 64 \ Object 8, Part 1: Edge: 0 (black), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 10 \ Object 9, Part 0: Edge: 2 (white), Fill: 2 (white) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 2 + 16 + 64 \ Object 9, Part 1: Edge: 2 (white), Fill: 0 (black) \ Outside: 1 (yes), Four-edge: 0 (no) EQUB 0 \ Object 10, Part 0: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 0 \ Object 10, Part 1: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 0 + 64 \ Object 10, Part 2: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 0 \ Object 11, Part 0: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 0 + 64 \ Object 11, Part 1: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 0 \ Object 12, Part 0: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no) EQUB 0 + 64 \ Object 12, Part 1: Edge: 0 (black), Fill: 0 (black) \ Outside: 0 (no), Four-edge: 0 (no)
Name: gearNumberText [Show more] Type: Variable Category: Text Summary: The character to print on the gear stick for each gear
Context: See this variable on its own page References: This variable is used as follows: * PrintGearNumber calls gearNumberText
.gearNumberText EQUS "RN12345"
Name: token43 [Show more] Type: Variable Category: Text Summary: Text for recursive token 43 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token43 * tokenLo calls token43
.token43 EQUS "Position" \ Print "Position" EQUB 160 + 8 \ Print 8 spaces EQUS "In front:" \ Print "In front:" EQUB 160 + 13 \ Print 13 spaces EQUB 255 \ End token
Name: token44 [Show more] Type: Variable Category: Text Summary: Text for recursive token 44 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token44 * tokenLo calls token44
.token44 EQUS "Laps to go" \ Print "Laps to go" EQUB 160 + 8 \ Print 8 spaces EQUS "Behind:" \ Print "Behind:" EQUB 160 + 18 \ Print 18 spaces EQUB 255 \ End token
Name: token45 [Show more] Type: Variable Category: Text Summary: Text for recursive token 45 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token45 * tokenLo calls token45
.token45 EQUB 160 + 38 \ Print 38 spaces EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused
Name: dashData15 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData15 * fillDataOffset calls dashData15
.dashData15 SKIP 36 \ Populated with code from &7C5E to &7C81
Name: Print2DigitBCD [Show more] Type: Subroutine Category: Text Summary: Print a binary coded decimal (BCD) number in the specified format
Context: See this subroutine on its own page References: This subroutine is called as follows: * Print4DigitBCD calls Print2DigitBCD * PrintDriverTable calls Print2DigitBCD * PrintTimer calls Print2DigitBCD * UpdateLapTimers calls entry point Print2DigitBCD-6 * UpdatePositionInfo calls entry point Print2DigitBCD-6

Arguments: A The number to print (in BCD) G Flags to control how the number is printed: * Bit 7: clear = do not print leading zeroes set = print leading zeroes * Bit 6: clear = print second digit set = do not print second digit Returns: G G is shifted left by two places, so bits 4 and 5 will be used to determine the printing style in the next call to Print2DigitBCD Other entry points: Print2DigitBCD-6 Print the number at screen coordinate (X, Y), where X is the character column and Y is the pixel row of the bottom of the character
STX xCursor \ Set the cursor to (X, Y), so we print the number at STY yCursor \ the specified screen location .Print2DigitBCD PHA \ Store A on the stack so we can retrieve it later LSR A \ Shift the high nibble of A into bits 0-3, so A LSR A \ contains the first digit of the BCD number LSR A LSR A BNE pnum1 \ If the result is non-zero, jump to pnum1 to print the \ digit in A \ Otherwise the first digit is a zero, which we either \ print as a capital "O" (so it doesn't have a line \ through it), or as a space, depending on the setting \ in G, which controls whether or not to print leading \ zeroes LDA #'O'-'0' \ Set A so we print a capital "O" in pnum1 BIT G \ If bit 7 of G is set, jump to pnum1 to print a capital BMI pnum1 \ "O" LDA #LO(' '-'0') \ Otherwise bit 7 of G is clear and we do not print \ leading zeroes, so instead set A so we print a space \ in pnum1 .pnum1 CLC \ Print the high nibble in A as a digit (or, if the high ADC #'0' \ nibble is zero, print a capitel "O" or a space, as per JSR PrintCharacter \ the above) \ Now for the second digit ASL G \ Shift G to the left, so bit 6 is now in bit 7 PLA \ Retrieve the original value of A, which contains the \ BCD number to print ASL G \ If bit 7 of G is set (i.e. bit 6 of the original G), BCS pnum3 \ jump to pnum3 to skip printing the second digit, and \ return from the subroutine AND #%00001111 \ Extract the low nibble of the BCD number into A BNE pnum2 \ If the low nibble is non-zero, jump to pnum2 to skip \ the following instruction LDA #'O'-'0' \ Set A so we print a capital "O" in pnum2 .pnum2 CLC \ Print the low nibble in A as a digit (or, if the low ADC #'0' \ nibble is zero, print a capital "O") JSR PrintCharacter .pnum3 RTS \ Return from the subroutine EQUB &FF \ This byte appears to be unused
Name: token22 [Show more] Type: Variable Category: Text Summary: Text for recursive token 22 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token22 * tokenLo calls token22
.token22 EQUB 200 + 54 \ Print token 54 ("FORMULA 3 CHAMPIONSHIP" header) EQUB 200 + 36 \ Print token 36 (menu option 1 with "PRESS" prompt) EQUB 200 + 18 \ Print token 18 (" 5") EQUB 200 + 13 \ Print token 13 (" mins") EQUB 200 + 37 \ Print token 37 (menu option 2) EQUB 200 + 19 \ Print token 19 ("10") EQUB 200 + 13 \ Print token 13 (" mins") EQUB 200 + 38 \ Print token 38 (menu option 3) EQUB 200 + 20 \ Print token 20 ("20") EQUB 200 + 13 \ Print token 13 (" mins") EQUB 200 + 35 \ Print token 35 (cyan, move cursor to prompt position) EQUB 200 + 10 \ Print token 10 ("SELECT ") EQUS "DURATION OF " \ Print "DURATION OF " EQUS "QUALIFYING LAPS" \ Print "QUALIFYING LAPS" EQUB 255 \ End token
Name: token16 [Show more] Type: Variable Category: Text Summary: Text for recursive token 16 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token16 * tokenLo calls token16
.token16 EQUS " ] " \ Print " ] " EQUB 255 \ End token
Name: dashData16 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData16 * fillDataOffset calls dashData16
.dashData16 SKIP 36 \ Populated with code from &7C3A to &7C5D
Name: carSpeedLo [Show more] Type: Variable Category: Car geometry Summary: Low byte of each car's forward speed
Context: See this variable on its own page References: This variable is used as follows: * MoveCars (Part 1 of 2) calls carSpeedLo * ProcessOvertaking (Part 2 of 3) calls carSpeedLo * ResetVariables calls carSpeedLo

Stored as an 8-bit value (carSpeedHi carSpeedLo).
.carSpeedLo IF _ACORNSOFT OR _4TRACKS EQUB &FF, &88 \ These values are workspace noise and have no meaning EQUB &88, &CC EQUB &CC, &CC EQUB &CC, &CC EQUB &CC, &EE EQUB &EE, &EE EQUB &EE, &FF EQUB &FF, &FF EQUB &88, &88 EQUB &88, &CC ELIF _SUPERIOR OR _REVSPLUS SKIP 20 ENDIF
Name: totalPointsLo [Show more] Type: Variable Category: Drivers Summary: Low byte of total accumulated points for each driver
Context: See this variable on its own page References: This variable is used as follows: * AddRacePoints calls totalPointsLo * InitialiseDrivers calls totalPointsLo * Print4DigitBCD calls totalPointsLo * SortDrivers calls totalPointsLo

Indexed by driver number (0 to 19). Gets set in InitialiseDrivers. Stored as a 24-bit value (totalPointsTop totalPointsHi totalPointsLo).
.totalPointsLo IF _ACORNSOFT OR _4TRACKS EQUB &CC, &CC \ These values are workspace noise and have no meaning EQUB &EE, &FF EQUB &FF, &88 EQUB &CC, &EE EQUB &FF, &FF EQUB &FF, &FF EQUB &FF, &FF EQUB &FF, &FF EQUB &FF, &FF EQUB &FF, &FF ELIF _SUPERIOR OR _REVSPLUS SKIP 20 ENDIF
Name: racePointsLo [Show more] Type: Variable Category: Drivers Summary: Used to store the low byte of the race points being awarded to the driver in race position X
Context: See this variable on its own page References: This variable is used as follows: * AddRacePoints calls racePointsLo * AwardRacePoints calls racePointsLo

Stored as a 16-bit value (racePointsHi racePointsLo).
.racePointsLo IF _ACORNSOFT OR _4TRACKS EQUB &FF, &FF \ These values are workspace noise and have no meaning EQUB &FF, &FF EQUB &FF, &FF EQUB &FF, &FF ELIF _SUPERIOR OR _REVSPLUS SKIP 8 ENDIF
Name: token39 [Show more] Type: Variable Category: Text Summary: Text for recursive token 39 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token39 * tokenLo calls token39
.token39 EQUB 200 + 36 \ Print token 36 (menu option 1 with "PRESS" prompt) EQUS "PRACTICE" \ Print "PRACTICE" EQUB 200 + 37 \ Print token 37 (menu option 2) EQUS "COMPETITION" \ Print "COMPETITION" EQUB 255 \ End token EQUB &FF \ This byte appears to be unused
Name: token48 [Show more] Type: Variable Category: Text Summary: Text for recursive token 48 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token48 * tokenLo calls token48
.token48 EQUB 160 + 13 \ Print 13 spaces EQUS "PLEASE" \ Print "PLEASE" EQUB 160 + 2 \ Print 2 spaces EQUS "WAIT" \ Print "WAIT" EQUB 160 + 13 \ Print 13 spaces EQUB 255 \ End token
Name: token49 [Show more] Type: Variable Category: Text Summary: Text for recursive token 49 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token49 * tokenLo calls token49
.token49 EQUB 31, 9, 2 \ Move text cursor to column 9, row 2 EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81
Name: dashData17 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData17 * fillDataOffset calls dashData17
.dashData17 SKIP 36 \ Populated with code from &7C16 to &7C39
Name: leftDashMask [Show more] Type: Variable Category: Dashboard Summary: Pixel mask for the left edge of the dashboard Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 2 of 4) calls leftDashMask * DrawTrackView (Part 3 of 4) calls leftDashMask

Contains a mask byte for the track pixels along the left edge of the central part of the dashboard. There is a byte for each track line from 43 (the track line at the top of the dashboard) down to 3 (the lowest track line, just above where the wing mirror joins the car body). Lines 0 to 2 are not used. Set bits correspond to the track pixels, while clear bits correspond to the dashboard pixels.
.leftDashMask EQUB %11111111 \ Line 0 EQUB %11111111 \ Line 1 EQUB %10001000 \ Line 2 EQUB %10001000 \ Line 3 EQUB %11001100 \ Line 4 EQUB %11101110 \ Line 5 EQUB %11111111 \ Line 6 EQUB %10001000 \ Line 7 EQUB %10001000 \ Line 8 EQUB %11001100 \ Line 9 EQUB %11101110 \ Line 10 EQUB %11111111 \ Line 11 EQUB %10001000 \ Line 12 EQUB %11001100 \ Line 13 EQUB %11101110 \ Line 14 EQUB %11111111 \ Line 15 EQUB %10001000 \ Line 16 EQUB %11001100 \ Line 17 EQUB %11101110 \ Line 18 EQUB %11111111 \ Line 19 EQUB %10001000 \ Line 20 EQUB %11001100 \ Line 21 EQUB %11101110 \ Line 22 EQUB %11111111 \ Line 23 EQUB %10001000 \ Line 24 EQUB %11001100 \ Line 25 EQUB %11101110 \ Line 26 EQUB %11111111 \ Line 27 EQUB %10001000 \ Line 28 EQUB %10001000 \ Line 29 EQUB %11001100 \ Line 30 EQUB %11001100 \ Line 31 EQUB %11001100 \ Line 32 EQUB %11101110 \ Line 33 EQUB %11101110 \ Line 34 EQUB %11101110 \ Line 35 EQUB %11111111 \ Line 36 EQUB %11111111 \ Line 37 EQUB %11111111 \ Line 38 EQUB %10001000 \ Line 39 EQUB %10001000 \ Line 40 EQUB %10001000 \ Line 41 EQUB %11001100 \ Line 42 EQUB %11001100 \ Line 43
Name: colourPalette [Show more] Type: Variable Category: Drawing pixels Summary: The main colour palette that maps logical colours 0 to 3 to physical colours
.colourPalette EQUB %00000000 \ Four pixels of colour 0 EQUB %00001111 \ Four pixels of colour 1 EQUB %11110000 \ Four pixels of colour 2 EQUB %11111111 \ Four pixels of colour 3
Name: dashDataOffset [Show more] Type: Variable Category: Screen buffer Summary: Offset of the dash data within each dash data block Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * CheckDashData calls dashDataOffset * CopyDashData calls dashDataOffset * DrawFence (Part 1 of 2) calls dashDataOffset * DrawObjectEdge (Part 2 of 5) calls dashDataOffset * GetTyreDashEdges calls dashDataOffset
.dashDataOffset EQUB dashData0 - (dashData + &80 * 0) - 1 EQUB dashData1 - (dashData + &80 * 1) - 1 EQUB dashData2 - (dashData + &80 * 2) - 1 EQUB dashData3 - (dashData + &80 * 3) - 1 EQUB dashData4 - (dashData + &80 * 4) - 1 EQUB dashData5 - (dashData + &80 * 5) - 1 EQUB dashData6 - (dashData + &80 * 6) - 1 EQUB dashData7 - (dashData + &80 * 7) - 1 EQUB dashData8 - (dashData + &80 * 8) - 1 EQUB dashData9 - (dashData + &80 * 9) - 1 EQUB dashData10 - (dashData + &80 * 10) - 1 EQUB dashData11 - (dashData + &80 * 11) - 1 EQUB dashData12 - (dashData + &80 * 12) - 1 EQUB dashData13 - (dashData + &80 * 13) - 1 EQUB dashData14 - (dashData + &80 * 14) - 1 EQUB dashData15 - (dashData + &80 * 15) - 1 EQUB dashData16 - (dashData + &80 * 16) - 1 EQUB dashData17 - (dashData + &80 * 17) - 1 EQUB dashData18 - (dashData + &80 * 18) - 1 EQUB dashData19 - (dashData + &80 * 19) - 1 EQUB dashData20 - (dashData + &80 * 20) - 1 EQUB dashData21 - (dashData + &80 * 21) - 1 EQUB dashData22 - (dashData + &80 * 22) - 1 EQUB dashData23 - (dashData + &80 * 23) - 1 EQUB dashData24 - (dashData + &80 * 24) - 1 EQUB dashData25 - (dashData + &80 * 25) - 1 EQUB dashData26 - (dashData + &80 * 26) - 1 EQUB dashData27 - (dashData + &80 * 27) - 1 EQUB dashData28 - (dashData + &80 * 28) - 1 EQUB dashData29 - (dashData + &80 * 29) - 1 EQUB dashData30 - (dashData + &80 * 30) - 1 EQUB dashData31 - (dashData + &80 * 31) - 1 EQUB dashData32 - (dashData + &80 * 32) - 1 EQUB dashData33 - (dashData + &80 * 33) - 1 EQUB dashData34 - (dashData + &80 * 34) - 1 EQUB dashData35 - (dashData + &80 * 35) - 1 EQUB dashData36 - (dashData + &80 * 36) - 1 EQUB dashData37 - (dashData + &80 * 37) - 1 EQUB dashData38 - (dashData + &80 * 38) - 1 EQUB dashData39 - (dashData + &80 * 39) - 1 EQUB dashData40 - (dashData + &80 * 40) - 1 EQUB &FF, &81 \ These bytes appear to be unused EQUB &81
Name: dashData18 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData18 * fillDataOffset calls dashData18
.dashData18 SKIP 36 \ Populated with code from &7BF2 to &7C15
Name: rightDashMask [Show more] Type: Variable Category: Dashboard Summary: Pixel mask for the right edge of the dashboard Deep dive: Drawing around the dashboard
Context: See this variable on its own page References: This variable is used as follows: * DrawTrackView (Part 2 of 4) calls rightDashMask * DrawTrackView (Part 3 of 4) calls rightDashMask

Contains a mask byte for the track pixels along the right edge of the central part of the dashboard. There is a byte for each track line from 43 (the track line at the top of the dashboard) down to 3 (the lowest track line, just above where the wing mirror joins the car body). Lines 0 to 2 are not used. Set bits correspond to the track pixels, while clear bits correspond to the dashboard pixels.
.rightDashMask EQUB %11111111 \ Line 0 EQUB %11111111 \ Line 1 EQUB %00010001 \ Line 2 EQUB %00010001 \ Line 3 EQUB %00110011 \ Line 4 EQUB %01110111 \ Line 5 EQUB %11111111 \ Line 6 EQUB %00010001 \ Line 7 EQUB %00010001 \ Line 8 EQUB %00110011 \ Line 9 EQUB %01110111 \ Line 10 EQUB %11111111 \ Line 11 EQUB %00010001 \ Line 12 EQUB %00110011 \ Line 13 EQUB %01110111 \ Line 14 EQUB %11111111 \ Line 15 EQUB %00010001 \ Line 16 EQUB %00110011 \ Line 17 EQUB %01110111 \ Line 18 EQUB %11111111 \ Line 19 EQUB %00010001 \ Line 20 EQUB %00110011 \ Line 21 EQUB %01110111 \ Line 22 EQUB %11111111 \ Line 23 EQUB %00010001 \ Line 24 EQUB %00110011 \ Line 25 EQUB %01110111 \ Line 26 EQUB %11111111 \ Line 27 EQUB %00010001 \ Line 28 EQUB %00010001 \ Line 29 EQUB %00110011 \ Line 30 EQUB %00110011 \ Line 31 EQUB %00110011 \ Line 32 EQUB %01110111 \ Line 33 EQUB %01110111 \ Line 34 EQUB %01110111 \ Line 35 EQUB %11111111 \ Line 36 EQUB %11111111 \ Line 37 EQUB %11111111 \ Line 38 EQUB %00010001 \ Line 39 EQUB %00010001 \ Line 40 EQUB %00010001 \ Line 41 EQUB %00110011 \ Line 42 EQUB %00110011 \ Line 43
Name: startDialHi [Show more] Type: Variable Category: Drawing pixels Summary: The high byte of the screen address of the start of the dial hand on the rev counter
Context: See this variable on its own page References: This variable is used as follows: * DrawRevCounter calls startDialHi
.startDialHi EQUB &75 \ Quadrant 0 (12:00 to 3:00) = &7566 EQUB &75 \ Quadrant 1 (3:00 to 6:00) = &7567 EQUB &75 \ Quadrant 2 (6:00 to 9:00) = &755F EQUB &75 \ Quadrant 3 (9:00 to 12:00) = &755E
Name: wheelPixels [Show more] Type: Variable Category: Dashboard Summary: The number of pixels in the longest axis for the steering wheel line at various points in a quadrant Deep dive: Trigonometry
Context: See this variable on its own page References: This variable is used as follows: * UpdateDashboard calls wheelPixels

This table contains values that are used to calculate the coordinates of the end of the line on the steering wheel. The contents of the table are very close to the following (the values from the following calculation are shown in the comments below - they are close, but not quite a perfect match, so I haven't got this exactly right): FOR I%, 0, 37 EQUB INT(0.5 + 53 * COS((PI/4) * I% / 42)) NEXT This gives the length of the adjacent side of a right-angled triangle, with a hypotenuse of length 53, and an angle ranging from 0 to PI/4 (i.e. one eighth of a circle), split up into 42 points per eighth of a circle (so the table's 38 points cover just less than an eighth of a circle). In other words, if we have a clock whose centre is at the origin, then this table contains the x-coordinate of the end of a clock hand of length 53 as it moves from 3 o'clock to half past 4.
.wheelPixels EQUB 53 \ INT(0.5 + 53.00) = 53 EQUB 53 \ INT(0.5 + 52.99) = 53 EQUB 53 \ INT(0.5 + 52.96) = 53 EQUB 53 \ INT(0.5 + 52.92) = 53 EQUB 53 \ INT(0.5 + 52.85) = 53 EQUB 53 \ INT(0.5 + 52.77) = 53 EQUB 53 \ INT(0.5 + 52.67) = 53 EQUB 53 \ INT(0.5 + 52.55) = 53 EQUB 52 \ INT(0.5 + 52.41) = 52 EQUB 52 \ INT(0.5 + 52.25) = 52 EQUB 52 \ INT(0.5 + 52.08) = 52 EQUB 52 \ INT(0.5 + 51.88) = 52 EQUB 52 \ INT(0.5 + 51.67) = 52 EQUB 52 \ INT(0.5 + 51.44) = 51 (doesn't match) EQUB 51 \ INT(0.5 + 51.19) = 51 EQUB 51 \ INT(0.5 + 50.93) = 51 EQUB 51 \ INT(0.5 + 50.65) = 51 EQUB 50 \ INT(0.5 + 50.34) = 50 EQUB 50 \ INT(0.5 + 50.03) = 50 EQUB 50 \ INT(0.5 + 49.69) = 50 EQUB 49 \ INT(0.5 + 49.34) = 49 EQUB 49 \ INT(0.5 + 48.97) = 49 EQUB 48 \ INT(0.5 + 48.58) = 49 (doesn't match) EQUB 48 \ INT(0.5 + 48.17) = 48 EQUB 47 \ INT(0.5 + 47.75) = 48 (doesn't match) EQUB 47 \ INT(0.5 + 47.31) = 47 EQUB 46 \ INT(0.5 + 46.86) = 47 (doesn't match) EQUB 46 \ INT(0.5 + 46.39) = 46 EQUB 45 \ INT(0.5 + 45.90) = 46 (doesn't match) EQUB 45 \ INT(0.5 + 45.40) = 45 EQUB 44 \ INT(0.5 + 44.88) = 45 (doesn't match) EQUB 44 \ INT(0.5 + 44.34) = 44 EQUB 43 \ INT(0.5 + 43.79) = 44 (doesn't match) EQUB 42 \ INT(0.5 + 43.22) = 43 (doesn't match) EQUB 41 \ INT(0.5 + 42.64) = 43 (doesn't match) EQUB 40 \ INT(0.5 + 42.05) = 42 (doesn't match) EQUB 39 \ INT(0.5 + 41.44) = 41 (doesn't match) EQUB 38 \ INT(0.5 + 40.81) = 41 (doesn't match)
Name: token32 [Show more] Type: Variable Category: Text Summary: Text for recursive token 32 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token32 * tokenLo calls token32
.token32 EQUB 160 + 2 \ Print 2 spaces EQUB 156 \ Set background colour to black EQUB 8, 8 \ Backspace to the left by two characters EQUB 200 + 31 \ Print token 31 (two spaces and configurable colours) EQUB 255 \ End token
Name: dashData19 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData19 * fillDataOffset calls dashData19
.dashData19 SKIP 36 \ Populated with code from &7BCE to &7BF1
Name: pixelsToRight [Show more] Type: Variable Category: Drawing pixels Summary: Pixel byte with all the pixels to the right of position X set
Context: See this variable on its own page References: This variable is used as follows: * DrawObjectEdge (Part 3 of 5) calls pixelsToRight
.pixelsToRight EQUB %01110111 EQUB %00110011 EQUB %00010001 EQUB %00000000
Name: configKeys [Show more] Type: Variable Category: Keyboard Summary: Details of the configuration settings that are set by the shifted configuration keys
Context: See this variable on its own page References: This variable is used as follows: * ProcessShiftedKeys calls configKeys

The low nibble of each setting indicates which configuration byte should be updated when this key is pressed, as an offset from configStop, and the high nibble contains the value that it should be set to. The values in this table correspond with the keys defined in the shiftedKeys table.
.configKeys \ SHIFT + key Bits affected Config byte Value EQUB &80 \ Right arrow Set bit 7 configStop &80 EQUB &01 \ f1 Clear all bits configJoystick &00 EQUB &C1 \ f2 Set bits 6 & 7 configJoystick &C0 EQUB &81 \ f2 Set bit 7 configJoystick &80 EQUB &C2 \ f4 Set bits 6 & 7 configVolume &C0 EQUB &42 \ f5 Set bit 6 configVolume &40 EQUB &C0 \ f0 Set bits 6 & 7 configStop &C0 EQUB &83 \ COPY Set bit 7 configPause &80 EQUB &43 \ DELETE Set bit 6 configPause &40 EQUB &20 \ f7 Set bit 5 configStop &20 IF _ACORNSOFT OR _4TRACKS EQUB &77, &BB \ These values are workspace noise and have no meaning ELIF _SUPERIOR OR _REVSPLUS EQUB &04 \ f3 Clear all bits configAssist &00 EQUB &84 \ f6 Set bit 7 configAssist &80 ENDIF
Name: menuKeysSup [Show more] Type: Variable Category: Keyboard Summary: Negative inkey values for the menu keys (SPACE, "1", "2" and "3") for the Superior Software release
Context: See this variable on its own page References: This variable is used as follows: * GetMenuOption calls menuKeysSup
IF _ACORNSOFT OR _4TRACKS EQUB &DD, &EE \ These values are workspace noise and have no meaning EQUB &77, &BB ELIF _SUPERIOR OR _REVSPLUS .menuKeysSup EQUB &9D \ Negative inkey value for SPACE EQUB &CF \ Negative inkey value for "1" EQUB &CE \ Negative inkey value for "2" EQUB &EE \ Negative inkey value for "3" ENDIF
Name: totalPointsHi [Show more] Type: Variable Category: Drivers Summary: High byte of total accumulated points for each driver
Context: See this variable on its own page References: This variable is used as follows: * AddRacePoints calls totalPointsHi * InitialiseDrivers calls totalPointsHi * Print234DigitBCD calls totalPointsHi * PrintDriverTable calls totalPointsHi * SortDrivers calls totalPointsHi

Indexed by driver number (0 to 19). Gets set in InitialiseDrivers. Stored as a 24-bit value (totalPointsTop totalPointsHi totalPointsLo).
.totalPointsHi EQUB &DD, &EE \ These values are workspace noise and have no meaning EQUB 0, 0, 0, 0, 0, 0 EQUB 0, 0, 0, 0, 0, 0 EQUB 0, 0, 0, 0, 0, 0
Name: racePointsHi [Show more] Type: Variable Category: Drivers Summary: High byte of race points calculated for each position
Context: See this variable on its own page References: This variable is used as follows: * AddRacePoints calls racePointsHi * AwardRacePoints calls racePointsHi

Stored as a 16-bit value (racePointsHi racePointsLo).
.racePointsHi EQUB &77, &BB \ These values are workspace noise and have no meaning EQUB &DD, &EE EQUB &77, &BB EQUB &DD, &EE
Name: token30 [Show more] Type: Variable Category: Text Summary: Text for recursive token 30 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token30 * tokenLo calls token30
.token30 EQUB 31, 5, 24 \ Move text cursor to column 5, row 24 EQUB 134 \ Set foreground colour to cyan alphanumeric EQUB 200 + 17 \ Print token 17 ("PRESS ") EQUS "SPACE BAR " \ Print "SPACE BAR " EQUS "TO CONTINUE" \ Print "TO CONTINUE" EQUB 255 \ End token EQUB &45, &FF \ These bytes appear to be unused
Name: token2 [Show more] Type: Variable Category: Text Summary: Text for recursive token 2 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token2 * tokenLo calls token2
.token2 EQUS "GRID POSITIONS" \ Print "GRID POSITIONS" EQUB 255 \ End token
Name: dashData20 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData20 * fillDataOffset calls dashData20
.dashData20 SKIP 36 \ Populated with code from &7BAA to &7BCD
Name: PrintHeaderChecks [Show more] Type: Subroutine Category: Text Summary: Print chequered lines above and below the header
Context: See this subroutine on its own page References: This subroutine is called as follows: * MainLoop (Part 1 of 6) calls PrintHeaderChecks
.PrintHeaderChecks LDY #1 \ We are about to print two chequered lines, so set a \ line counter in Y .head1 LDA endChecks,Y \ Set T to the screen address offset of the end of the STA T \ Y-th chequered line LDX startChecks,Y \ Set A to the screen address offset of the start of the \ Y-th chequered line LDA #151 \ Poke the "white graphics" character into the X-th byte STA row2_column1,X \ of screen memory at column 1, row 2, so the subsequent \ bytes are shown as graphics characters LDA #226 \ Set A to the graphics character with the top-right and \ bottom-right blocks set to white, to form the first \ character of the line (i.e. the first two checks in \ the chequered line) .head2 INX \ Increment the screen address offset to move along one \ character STA row2_column1,X \ Poke character A into screen memory LDA #230 \ Set A to the graphics character with the top-right, \ bottom-right and centre-left blocks set to white, to \ form the rest of the checks on the chequered line CPX T \ Loop back to print the next character in the line BNE head2 \ until we have reached the screen address in T DEY \ Decrement the line counter BPL head1 \ Loop back to print the second line RTS \ Return from the subroutine
Name: startChecks [Show more] Type: Variable Category: Text Summary: The screen address offset of the start of each chequered header line
Context: See this variable on its own page References: This variable is used as follows: * PrintHeaderChecks calls startChecks
.startChecks EQUB 0 \ Start the first line at row 2, column 1 (as the offset \ is added to row2_column1) EQUB 40 * 3 \ Start the second line on row 5, column 1 (as there are \ 40 characters per row)
Name: endChecks [Show more] Type: Variable Category: Text Summary: The screen address offset of the end of each chequered header line
Context: See this variable on its own page References: This variable is used as follows: * PrintHeaderChecks calls endChecks
.endChecks EQUB 35 \ End the first line after 35 characters EQUB 35 + (40 * 3) \ End the first line after 35 characters
Name: token53 [Show more] Type: Variable Category: Text Summary: Text for recursive token 53 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token53 * tokenLo calls token53
.token53 EQUB 160 + 15 \ Print 15 spaces EQUS "FINISHED" \ Print "FINISHED" EQUB 160 + 15 \ Print 15 spaces EQUB 255 \ End token EQUB &00, &00 \ These bytes appear to be unused
Name: token41 [Show more] Type: Variable Category: Text Summary: Text for recursive token 41 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token41 * tokenLo calls token41
.token41 EQUB 160 + 6 \ Print 6 spaces EQUS "Less than one " \ Print "Less than one " EQUS "minute to go" \ Print "minute to go" EQUB 160 + 6 \ Print 6 spaces EQUB 255 \ End token
Name: token38 [Show more] Type: Variable Category: Text Summary: Text for recursive token 38 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token38 * tokenLo calls token38
.token38 EQUB 31, 5, 20 \ Move text cursor to column 5, row 20 EQUB 132, 157 \ Set background colour to blue EQUB 134 \ Set foreground colour to cyan alphanumeric EQUS "3" \ Print "3" EQUB 160 + 2 \ Print 2 spaces EQUB 156 \ Set background colour to black EQUB 160 + 5 \ Print 5 spaces EQUB 131 \ Set foreground colour to yellow alphanumeric EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81
Name: dashData21 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData21 * fillDataOffset calls dashData21
.dashData21 SKIP 36 \ Populated with code from &7B86 to &7BA9
Name: tokenLo [Show more] Type: Variable Category: Text Summary: Low byte of the token address lookup table Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * PrintToken calls tokenLo

Note that token 47 is not used.
.tokenLo EQUB LO(token0) EQUB LO(token1) EQUB LO(token2) EQUB LO(token3) EQUB LO(token4) EQUB LO(token5) EQUB LO(token6) EQUB LO(token7) EQUB LO(token8) EQUB LO(token9) EQUB LO(token10) EQUB LO(token11) EQUB LO(token12) EQUB LO(token13) EQUB LO(token14) EQUB LO(token15) EQUB LO(token16) EQUB LO(token17) EQUB LO(token18) EQUB LO(token19) EQUB LO(token20) EQUB LO(token21) EQUB LO(token22) EQUB LO(token23) EQUB LO(token24) EQUB LO(token25) EQUB LO(token26) EQUB LO(token27) EQUB LO(token28) EQUB LO(token29) EQUB LO(token30) EQUB LO(token31) EQUB LO(token32) EQUB LO(token33) EQUB LO(token34) EQUB LO(token35) EQUB LO(token36) EQUB LO(token37) EQUB LO(token38) EQUB LO(token39) EQUB LO(token40) EQUB LO(token41) EQUB LO(token42) EQUB LO(token43) EQUB LO(token44) EQUB LO(token45) EQUB LO(token46) EQUB 0 EQUB LO(token48) EQUB LO(token49) EQUB LO(token50) EQUB LO(token51) EQUB LO(token52) EQUB LO(token53)
Name: yLookupHi [Show more] Type: Variable Category: Drawing pixels Summary: Lookup table for converting pixel y-coordinate to high byte of screen address
Context: See this variable on its own page References: This variable is used as follows: * GetScreenAddress calls yLookupHi

This table returns the high byte of the screen address of the start of the row, for the custom screen mode. Note that the custom screen mode starts at address &5A80, so the first two entries in this table do not point to screen memory; the first two character rows in this table are off the top of the custom screen, so the first row on-screen is the third row. This is why, when we print the top two lines of text in the custom screen with the PrintCharacter routine, we do so at the following y-coordinates: * yCursor = 24 for the first line of text * yCursor = 33 for the second line of text To see where these are on-screen, we need to subtract 16 for the first two character rows which are off the top of the screen, to give: * y-coordinate = 8 for the first line of text * y-coordinate = 17 for the second line of text The value passed to PrintCharacter points to the bottom row of the character to print, so the first coordinate points to the ninth pixel row (as the first pixel row is row 0), and the second points to the 18th pixel row. There are eight pixels in each character row, so this prints the first row of text so that it has a one-pixel margin between the top of the text and the top of the screen, and i prints the second row so that it has a one-pixel margin between the top of the text and the bottom of the line above. I don't know why this table starts at &5800 and not &5A80, but that's how it is.
.yLookupHi FOR I%, 0, 31 EQUB HI(&5800 + (I% * &140)) NEXT
Name: mirrorAddressLo [Show more] Type: Variable Category: Dashboard Summary: The low byte of the base screen address of each mirror segment Deep dive: Wing mirrors
Context: See this variable on its own page References: This variable is used as follows: * DrawCarInMirror calls mirrorAddressLo
.mirrorAddressLo EQUB LO(mirror0) \ Mirror segment 0 (left mirror, outer segment) EQUB LO(mirror1) \ Mirror segment 1 (left mirror, middle segment) EQUB LO(mirror2) \ Mirror segment 2 (left mirror, inner segment) EQUB LO(mirror3) \ Mirror segment 3 (right mirror, inner segment) EQUB LO(mirror4) \ Mirror segment 4 (right mirror, middle segment) EQUB LO(mirror5) \ Mirror segment 5 (right mirror, outer segment)
Name: dashData22 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData22 * fillDataOffset calls dashData22
.dashData22 SKIP 36 \ Populated with code from &7B62 to &7B85
Name: tokenHi [Show more] Type: Variable Category: Text Summary: high byte of the token address lookup table Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * PrintToken calls tokenHi

Note that token 47 is not used.
.tokenHi EQUB HI(token0) EQUB HI(token1) EQUB HI(token2) EQUB HI(token3) EQUB HI(token4) EQUB HI(token5) EQUB HI(token6) EQUB HI(token7) EQUB HI(token8) EQUB HI(token9) EQUB HI(token10) EQUB HI(token11) EQUB HI(token12) EQUB HI(token13) EQUB HI(token14) EQUB HI(token15) EQUB HI(token16) EQUB HI(token17) EQUB HI(token18) EQUB HI(token19) EQUB HI(token20) EQUB HI(token21) EQUB HI(token22) EQUB HI(token23) EQUB HI(token24) EQUB HI(token25) EQUB HI(token26) EQUB HI(token27) EQUB HI(token28) EQUB HI(token29) EQUB HI(token30) EQUB HI(token31) EQUB HI(token32) EQUB HI(token33) EQUB HI(token34) EQUB HI(token35) EQUB HI(token36) EQUB HI(token37) EQUB HI(token38) EQUB HI(token39) EQUB HI(token40) EQUB HI(token41) EQUB HI(token42) EQUB HI(token43) EQUB HI(token44) EQUB HI(token45) EQUB HI(token46) EQUB 0 EQUB HI(token48) EQUB HI(token49) EQUB HI(token50) EQUB HI(token51) EQUB HI(token52) EQUB HI(token53)
Name: shortAxis [Show more] Type: Variable Category: Dashboard Summary: Code modifications for the DrawDashboardLine line-drawing routine
Context: See this variable on its own page References: This variable is used as follows: * DrawDashboardLine calls shortAxis

When drawing a line, the short axis is only stepped along when the slope error adds up to a whole pixel, so this steps along the shorter axis of the line's vector. See the DrawDashboardLine routine for details.
.shortAxis INX \ V = 0, INX and DEY = Steep slope, right and up DEY \ V = 1, DEY and INX = Shallow slope, right and up INY \ V = 2, INY and INX = Shallow slope, right and down INX \ V = 3, INX and INY = Steep slope, right and down DEX \ V = 4, DEX and INY = Steep slope, left and down INY \ V = 5, INY and DEX DEY \ V = 6, DEY and DEX DEX \ V = 7, DEX and DEY
Name: stepAxis [Show more] Type: Variable Category: Dashboard Summary: Code modifications for the DrawDashboardLine line-drawing routine
Context: See this variable on its own page References: This variable is used as follows: * DrawDashboardLine calls stepAxis

When drawing a line, we step along the longer axis of the line's vector by one pixel for loop around the line-drawing routine. See the DrawDashboardLine routine for details.
.stepAxis DEY \ V = 0, INX and DEY = Steep slope, right and up INX \ V = 1, DEY and INX = Shallow slope, right and up INX \ V = 2, INY and INX = Shallow slope, right and down INY \ V = 3, INX and INY = Steep slope, right and down INY \ V = 4, DEX and INY = Steep slope, left and down DEX \ V = 5, INY and DEX DEX \ V = 6, DEY and DEX DEY \ V = 7, DEX and DEY EQUB &18, &EA EQUB &EA, &18 EQUB &18, &EA EQUB &EA, &18
Name: mirrorAddressHi [Show more] Type: Variable Category: Dashboard Summary: The high byte of the base screen address of each mirror segment Deep dive: Wing mirrors
Context: See this variable on its own page References: This variable is used as follows: * DrawCarInMirror calls mirrorAddressHi
.mirrorAddressHi EQUB HI(mirror0) \ Mirror segment 0 (left mirror, outer segment) EQUB HI(mirror1) \ Mirror segment 1 (left mirror, middle segment) EQUB HI(mirror2) \ Mirror segment 2 (left mirror, inner segment) EQUB HI(mirror3) \ Mirror segment 3 (right mirror, inner segment) EQUB HI(mirror4) \ Mirror segment 4 (right mirror, middle segment) EQUB HI(mirror5) \ Mirror segment 5 (right mirror, outer segment)
Name: mirrorSegment [Show more] Type: Variable Category: Dashboard Summary: Lookup table for working out which mirror segment a car should appear in Deep dive: Wing mirrors
Context: See this variable on its own page References: This variable is used as follows: * UpdateMirrors calls mirrorSegment
.mirrorSegment EQUB &90 / 8 \ Mirror segment 0 (left mirror, outer segment) \ So -14.5 <= yaw < -13.5 (as &90 / 8 = -112 / 8 = -14) EQUB &88 / 8 \ Mirror segment 1 (left mirror, middle segment) \ So -15.5 <= yaw < -14.5 (as &88 / 8 = -120 / 8 = -15) EQUB &80 / 8 \ Mirror segment 2 (left mirror, inner segment) \ So -16.5 <= yaw < -15.5 (as &80 / 8 = -128 / 8 = -16) EQUB 14 \ Mirror segment 3 (right mirror, inner segment) \ So 14.5 <= yaw < 15.5 EQUB 13 \ Mirror segment 4 (right mirror, middle segment) \ So 13.5 <= yaw < 14.5 EQUB 12 \ Mirror segment 5 (right mirror, outer segment) \ So 12.5 <= yaw < 13.5 EQUB &81, &81 \ These bytes appear to be unused
Name: dashData23 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData23 * fillDataOffset calls dashData23
.dashData23 SKIP 36 \ Populated with code from &7B3E to &7B61
Name: xHeader [Show more] Type: Variable Category: Text Summary: Column number for printing mode 7 headers
Context: See this variable on its own page References: This variable is used as follows: * PrintHeader calls xHeader

The values in this table are used by the PrintHeader routine to print out headers in mode 7.
.xHeader EQUB 4 EQUB 7 EQUB 9 EQUB 7 EQUB 0 EQUB 3 + 8 EQUB 7
Name: yHeader [Show more] Type: Variable Category: Text Summary: Row number for printing mode 7 headers
Context: See this variable on its own page References: This variable is used as follows: * PrintHeader calls yHeader

The values in this table are used by the PrintHeader routine to print out headers in mode 7.
.yHeader EQUB 3 EQUB 0 EQUB 0 EQUB 0 EQUB 4 EQUB 4 EQUB 0
Name: headerSpaces [Show more] Type: Variable Category: Text Summary: Number of spaces for printing mode 7 headers
Context: See this variable on its own page References: This variable is used as follows: * PrintHeader calls headerSpaces

The values in this table are used by the PrintHeader routine to print out headers in mode 7.
.headerSpaces EQUB 160 + 10 EQUB 160 + 15 EQUB 160 + 19 EQUB 160 + 15 EQUB 160 + 2 EQUB 160 + 24 EQUB 160 + 15
Name: headerBackground [Show more] Type: Variable Category: Text Summary: Background colour for printing mode 7 headers
Context: See this variable on its own page References: This variable is used as follows: * PrintHeader calls headerBackground

The values in this table are used by the PrintHeader routine to print out headers in mode 7.
.headerBackground EQUB 129 EQUB 129 EQUB 133 EQUB 132 EQUB 163 EQUB 131 EQUB 133
Name: headerForeground [Show more] Type: Variable Category: Text Summary: Foreground colour for printing mode 7 headers
Context: See this variable on its own page References: This variable is used as follows: * PrintHeader calls headerForeground

The values in this table are used by the PrintHeader routine to print out headers in mode 7.
.headerForeground EQUB 131 EQUB 131 EQUB 135 EQUB 135 EQUB 127 EQUB 132 EQUB 135
Name: token46 [Show more] Type: Variable Category: Text Summary: Text for recursive token 46 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token46 * tokenLo calls token46
.token46 EQUB 22, 7 \ Switch to screen mode 7 EQUB 23, 0, 10, 32 \ Disable cursor EQUB 0, 0, 0 EQUB 0, 0, 0 EQUB 255 \ End token
Name: token24 [Show more] Type: Variable Category: Text Summary: Text for recursive token 24 Deep dive: Text tokens
Context: See this variable on its own page References: This variable is used as follows: * tokenHi calls token24 * tokenLo calls token24
.token24 EQUB 200 + 35 \ Print token 35 (cyan, move cursor to prompt position) EQUB 200 + 10 \ Print token 10 ("SELECT ") EQUS "WING SETTINGS" \ Print "WING SETTINGS" EQUB 200 + 16 \ Print token 16 (" > ") EQUS "range 0 to 40" \ Print "range 0 to 40" EQUB 31, 14, 16 \ Move text cursor to column 14, row 16 EQUS "rear" \ Print "rear" EQUB 160 + 2 \ Print 2 spaces EQUB 133 \ Set foreground colour to magenta alphanumeric EQUB 200 + 16 \ Print token 16 (" > ") EQUB 255 \ End token EQUB &81, &81 \ These bytes appear to be unused EQUB &81, &81
Name: dashData24 [Show more] Type: Variable Category: Screen buffer Summary: Contains code that gets moved into screen memory Deep dive: The jigsaw puzzle binary
Context: See this variable on its own page References: This variable is used as follows: * dashDataOffset calls dashData24 * fillDataOffset calls dashData24
.dashData24 SKIP 36 \ Populated with code from &7B1A to &7B3D