Revs on the BBC Micro

# The Donington Park track

## One of the four extra tracks in the Revs 4 Tracks expansion

Donington Park was one of the four new tracks released by Acornsoft as part of the Revs 4 Tracks expansion in late 1985 (the others being Brands Hatch, Oulton Park and Snetterton).

The track looks like this, if we extract the data from the track data file and draw the results:

The track's elevation profile looks like this:

The track is broken up into 25 sections, as follows:

NumberShapeDescription
0||Coppice to Park Chicane (1/2)
1{}Coppice to Park Chicane (2/2)
2|->|Park Chicane (1/2)
3<-Park Chicane (2/2)
4{}Park Chicane to Redgate (1/2)
5|->|Park Chicane to Redgate (2/2)
6->Redgate
7|->|Redgate to Craner Curves
8->Craner Curves
9{}Craner Curves to The Old Hairpin (1/3)
10<-Craner Curves to The Old Hairpin (2/3)
11|->|Craner Curves to The Old Hairpin (3/3)
12->The Old Hairpin
13||The Old Hairpin to Macleans (1/6)
14<-The Old Hairpin to Macleans (2/6)
15|<-|The Old Hairpin to Macleans (3/6)
16||The Old Hairpin to Macleans (4/6)
17<-The Old Hairpin to Macleans (5/6)
18->The Old Hairpin to Macleans (6/6)
19->Macleans
20{}Macleans to Coppice (1/2)
21{}Macleans to Coppice (2/2)
22->Coppice (1/3)
23->Coppice (2/3)
24->Coppice (3/3)

Each section is one of the following shapes:

• || is a straight section that doesn't curve to the left or right, and has the same gradient throughout the whole section
• {} is a straight section in the sense that it doesn't curve to the left or right, but the gradient can differ between sub-sections
• -> consists of sub-sections that all curve to the right
• <- consists of sub-sections that all curve to the left
• |->| consists of sub-sections that are either straight or curve to the right
• |<-| consists of sub-sections that are either straight or curve to the left
• |<->| consists of sub-sections that are either straight or curve to the left or right

See the deep dives on the extra tracks data file format and dynamic track generation in the extra tracks for information on how the extra tracks are constructed, and how the track segment vectors are dynamically generated in the extra tracks. You may also find it useful to read the deep dives on the original track data file format and building a 3D track from sections and segments.

## Track generation and shapes ---------------------------

Each track section has lots of associated data, most of which is stored in the two track section data blocks. These are split into part 1 and part 2. See the deep dives on the track data file format and the extra tracks data file format for details.

In the extra track files, track sections are broken up into sub-sections, which are then broken up into segments. Each section therefore has an associated size, given as the number of segments. There is also a track segment vector number, which determines which track segment vectors make up the sections; specifically, it points to the position in the segment vector table where the section's first vector is stored. Note, however, that because the track segment vectors are dynamically generated for this track, the vector number points to the position in the table where the first calculated vector will be stored, rather than pointing to the data itself (as the data is only generated when needed).

Finally, each section has inner and outer coordinates that define the inner and outer track edges at the start of the section. These coordinates share the same y-coordinate, as track sections are level from left to right, so the following table shows the coordinates as (x, z), or longitude and latitude, and the section height is shown separately.

The section data for the Donington Park track is as follows:

SectionVectorSizeSegmentsInner coordOuter coordHeight
01790-78(-12000, -12000)(-12252, -12000)7680
136779-145(-12000, -2520)(-12252, -2520)7364
2319146-154(-12000, 5520)(-12252, 5520)6508
3112155-166(-11406, 6195)(-11438, 6444)6508
41474167-240(-10430, 7066)(-10680, 7093)6508
5949241-289(-9468, 15872)(-9718, 15899)5444
61913290-302(-8664, 21672)(-8895, 21770)5324
73326303-328(-7422, 22313)(-7347, 22551)5324
82054329-382(-4788, 20653)(-4646, 20860)5324
93518383-400(-2665, 14825)(-2418, 14781)3572
101415401-415(-3043, 12701)(-2796, 12657)2852
113041416-456(-2645, 10983)(-2430, 11112)2342
12327457-463(-471, 6591)(-237, 6678)1608
13046464-509(-657, 5808)(-461, 5650)1636
1426510-515(-4107, 1484)(-3911, 1326)2372
15924516-539(-4374, 823)(-4127, 779)2468
163428540-567(-4776, -2021)(-4525, -2013)3342
173618568-585(-4664, -5381)(-4413, -5373)4574
181520586-605(-3847, -7349)(-3646, -7197)5288
193613606-618(-2685, -9428)(-2443, -9361)5928
201125619-643(-3152, -10801)(-3008, -11007)6299
213836644-679(-5602, -12526)(-5458, -12732)6825
22365680-684(-9130, -15010)(-8986, -15216)7830
2337685-691(-9707, -15033)(-9791, -15270)7820
241227692-718(-10473, -14690)(-10589, -14915)7792

The shape of each track section is also defined in the track data file. Section coordinates are generated on-the-fly, as described in the deep dive on dynamic track generation in the extra tracks, and bit 6 of the track section flags in trackSectionFlag determines the kind of generator that is used (curved or straight).

The shape data for the Donington Park track is as follows:

SectionSignList sizeGenerator (bit 6)Shape (bit 0)Shape
01330 = Straight0 = Straight||
11411 = Curve0 = Straight{}
21531 = Curve1 = Curve|->|
31521 = Curve1 = Curve<-
4041 = Curve0 = Straight{}
5131 = Curve0 = Straight|->|
6231 = Curve1 = Curve->
7231 = Curve0 = Straight|->|
8351 = Curve1 = Curve->
9451 = Curve0 = Straight{}
10551 = Curve1 = Curve<-
11541 = Curve0 = Straight|->|
12641 = Curve1 = Curve->
13640 = Straight0 = Straight||
14731 = Curve1 = Curve<-
15731 = Curve0 = Straight|<-|
16730 = Straight0 = Straight||
17831 = Curve1 = Curve<-
18831 = Curve0 = Straight->
19931 = Curve1 = Curve->
201031 = Curve0 = Straight{}
211031 = Curve0 = Straight{}
221131 = Curve1 = Curve->
231131 = Curve0 = Straight->
241231 = Curve1 = Curve->

The sign number describes which signs to show when driving around the track (see the next section for details), and the list size determines the size of the track section list in the track verge buffer (see the deep dive on data structures for the track calculations for an explanation).

## Road signs ----------

Revs supports up to 16 road signs per track. Each sign's 3D coordinate is stored as a vector (xTrackSignVector, yTrackSignVector, zTrackSignVector) that is scaled down to fit into 8-bit coordinates. This vector describes the sign's coordinate relative to the inner coordinates of a specified track section. Inner section coordinates are stored in part 1 and part 2 of the section data, in the 16-bit variables (xTrackSectionIHi xTrackSectionILo), (yTrackSectionIHi yTrackSectionILo) and (zTrackSectionIHi zTrackSectionILo). We can therefore calculate the 3D coordinate of a sign by scaling the sign vector and adding it to the relevant section coordinate. See the deep dive on road signs for details of this calculation.

The following table shows the sign number, the sign type, the number of the section to which the sign coordinate is relative, the inner section coordinate, the scaled sign vector and the 3D coordinate of the sign that we calculate from all of the preceding data.

Each track section also has an associated sign number in the trackSectionData entry in the first block of track section data. A sign is drawn if this number changes when we drive into a new track section (so it shows the correct sign whether we are driving forwards or backwards into the new section). The sign numbers are shown in the shape table in the previous section.

The road signs for the Donington Park track are as follows:

SignTypeSectiontrackSectionItrackSignVectorCoordinate
0Start flag4[ -10430 ]
[   6508 ]
[   7066 ]
[   4 ]
[ -26 ]
[  79 ]
[ -10174 ]
[   6092 ]
[  12122 ]
1Right turn6[  -8664 ]
[   5324 ]
[  21672 ]
[ -15 ]
[   9 ]
[ -74 ]
[  -9624 ]
[   5468 ]
[  16936 ]
2Straight8[  -4788 ]
[   5324 ]
[  20653 ]
[ -12 ]
[   8 ]
[  14 ]
[  -5556 ]
[   5452 ]
[  21549 ]
3Straight9[  -2665 ]
[   3572 ]
[  14825 ]
[  -2 ]
[  86 ]
[  57 ]
[  -2793 ]
[   4948 ]
[  18473 ]
4Left turn10[  -3043 ]
[   2852 ]
[  12701 ]
[   5 ]
[  52 ]
[  33 ]
[  -2723 ]
[   3684 ]
[  14813 ]
5Right turn12[   -471 ]
[   1608 ]
[   6591 ]
[ -17 ]
[  29 ]
[  49 ]
[  -1559 ]
[   2072 ]
[   9727 ]
6Left turn14[  -4107 ]
[   2372 ]
[   1484 ]
[  33 ]
[ -20 ]
[  42 ]
[  -1995 ]
[   2052 ]
[   4172 ]
7Left turn17[  -4664 ]
[   4574 ]
[  -5381 ]
[  -2 ]
[ -52 ]
[  41 ]
[  -4792 ]
[   3742 ]
[  -2757 ]
8Right turn19[  -2685 ]
[   5928 ]
[  -9428 ]
[ -10 ]
[ -24 ]
[  29 ]
[  -3325 ]
[   5544 ]
[  -7572 ]
9Straight20[  -3152 ]
[   6299 ]
[ -10801 ]
[   5 ]
[   8 ]
[  -4 ]
[  -2832 ]
[   6427 ]
[ -11057 ]
10Right turn22[  -9130 ]
[   7830 ]
[ -15010 ]
[  66 ]
[ -62 ]
[  41 ]
[  -4906 ]
[   6838 ]
[ -12386 ]
11Straight24[ -10473 ]
[   7792 ]
[ -14690 ]
[   7 ]
[  13 ]
[ -10 ]
[ -10025 ]
[   8000 ]
[ -15330 ]
12Straight0[ -12000 ]
[   7680 ]
[ -12000 ]
[   2 ]
[   8 ]
[  -4 ]
[ -11872 ]
[   7808 ]
[ -12256 ]
13Straight1[ -12000 ]
[   7364 ]
[  -2520 ]
[   1 ]
[  11 ]
[ -42 ]
[ -11936 ]
[   7540 ]
[  -5208 ]
14Chicane2[ -12000 ]
[   6508 ]
[   5520 ]
[  -5 ]
[  34 ]
[ -75 ]
[ -12320 ]
[   7052 ]
[    720 ]
15Straight2[ -12000 ]
[   6508 ]
[   5520 ]
[   5 ]
[   8 ]
[  -2 ]
[ -11680 ]
[   6636 ]
[   5392 ]

## Corner markers and verge markings ---------------------------------

Each track section can optionally have a set of corner markers (three markers are shown for each curve when configured, while one marker is shown for each applicable straight). The markers can either be a combination of red and white markers, or just white, according to bit 5 of the track section flags in trackSectionFlag. They can also appear on the left or the right of the track, according to bits 3-4 of the section flags.

Track sections can also have differently coloured verge markings. These are black-and-white by default, but can be configured in bits 1-2 of the section flags to be red-and-white on the left or the right of the track.

See the deep dive on corner markers for details of how corner markers work, and the deep dive on the track verges for more on how the verge markings are implemented.

The corner markers and verge markings for the Donington Park track are as follows:

SectionMarker colours
(bit 5)
Marker positions
(bits 3-4)
Verge colours
(bits 1-2)
00 = White00 = None00 = Both black/white
11 = Red/white10 = Left00 = Both black/white
21 = Red/white01 = Right10 = Red/white on right
31 = Red/white10 = Left01 = Red/white on left
40 = White00 = None10 = Red/white on right
51 = Red/white10 = Left00 = Both black/white
61 = Red/white01 = Right10 = Red/white on right
70 = White00 = None01 = Red/white on left
81 = Red/white01 = Right10 = Red/white on right
91 = Red/white01 = Right00 = Both black/white
101 = Red/white10 = Left01 = Red/white on left
111 = Red/white10 = Left00 = Both black/white
121 = Red/white01 = Right10 = Red/white on right
131 = Red/white01 = Right01 = Red/white on left
141 = Red/white10 = Left01 = Red/white on left
150 = White00 = None00 = Both black/white
161 = Red/white01 = Right00 = Both black/white
171 = Red/white10 = Left01 = Red/white on left
181 = Red/white10 = Left00 = Both black/white
191 = Red/white01 = Right10 = Red/white on right
200 = White00 = None01 = Red/white on left
211 = Red/white10 = Left00 = Both black/white
221 = Red/white01 = Right10 = Red/white on right
230 = White00 = None01 = Red/white on left
241 = Red/white01 = Right10 = Red/white on right

## Driver speeds and approaches ----------------------------

The track data also contains data that influences how the non-player drivers drive (see the deep dive on tactics of the non-player drivers for details). This data latter is not only used to control non-player drivers, but feeds into computer assisted steering (CAS) as well; see the deep dive computer assisted steering (CAS) for more on this.

This data includes the segment number in each section where non-player drivers should start turning (in trackSectionTurn), the optimum speed for each section (in trackSectionSpeed), the optimum steering to apply for this section (in trackSteering), and whether this section has a maximum speed (in bit 7 of trackSectionFlag).

The non-player driver data for the Donington Park track is as follows:

SectionTurn at segmentOptimum speedSpeed as bit 7:0-6Section shapeOptimum steeringMaximum speed
02552551:127||<- 6*-
163810:81{}<- 6*-
2800:0|->|-> 1781
318100:10<-<- 33*-
42552551:127{}<- 6*-
545910:91|->|<- 6*-
625150:15->-> 1791
72551381:10|->|-> 6*-
82552551:127->-> 6*138
962551:127{}-> 6*-
1030100:10<-<- 22*-
11351200:120|->|<- 8*-
1219130:13->-> 23120
13322551:127||-> 13*-
1429140:14<-<- 22*-
152552551:127|<-|<- 0*-
16142551:127||<- 0*-
173300:0<-<- 22*-
18151140:114-><- 25*-
1927170:17->-> 15114
202552551:127{}<- 6*-
21271110:111{}<- 6*-
221880:8->-> 20111
2361180:118-><- 6*-
2437140:14->-> 22*118

The speed is shown as-is, and with bit 7 split out, which is used in the driver tactic calculations. The optimum steering is shown as a direction and a magnitude, and if there is an asterisk (*), then the magnitude is scaled by the track's base speed for the chosen class.