Skip to navigation

Revs on the BBC Micro

Screen buffer: staDrawByteTyre

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 in context in the source code 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