Difference between revisions of "Trackdata"

From Stunts Wiki
(Created page with "'''Trackdata''' is a set of twenty three data structures which hold key information about the track in use and the lap being driven or replayed on it. Each of the individual d...")
 
(→‎Trackdata data structures: basic table layout)
Line 8: Line 8:
  
 
Offsets and byte sizes assume the 1991 DOS [[Game versions|versions]] of Stunts.
 
Offsets and byte sizes assume the 1991 DOS [[Game versions|versions]] of Stunts.
 
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
!| # !! Offset (hex) !! Size (hex) !! Size    !! Layout !! Description !! Notes
+
!| #       !! Offset (hex) !! Size (hex) !! Size    !! Layout !! Description !! Notes
|
+
|-
|| 01 || 0            || 70a        || 1802    ||        ||            ||
+
|| '''01''' || 0            || 70a        || 1802    ||        ||            ||
|
+
|-
|| 02 || 70a          || 70a        || 1802    ||        ||            ||
+
|| '''02''' || 70a          || 70a        || 1802    ||        ||            ||
|
+
|-
|| 03 || e14          || 70a        || 1802    ||        ||            ||
+
|| '''03''' || e14          || 70a        || 1802    ||        ||            ||
|
+
|-
|| 04 || 151e        || 80        || 128    ||        ||            ||
+
|| '''04''' || 151e        || 80        || 128    ||        ||            ||
|
+
|-
|| 05 || 159e        || 80        || 128    ||        ||            ||
+
|| '''05''' || 159e        || 80        || 128    ||        ||            ||
|
+
|-
|| 06 || 161e        || 80        || 128    ||        ||            ||
+
|| '''06''' || 161e        || 80        || 128    ||        ||            ||
|
+
|-
|| 07 || 169e        || 80        || 128    ||        ||            ||
+
|| '''07''' || 169e        || 80        || 128    ||        ||            ||
|
+
|-
|| 08 || 171e        || 60        || 96      ||        ||            ||
+
|| '''08''' || 171e        || 60        || 96      ||        ||            ||
|
+
|-
|| 09 || 18fe        || 180        || 384    ||        ||            ||
+
|| '''09''' || 18fe        || 180        || 384    ||        ||            ||
|
+
|-
|| 10 || 1a1e        || 120        || 288    ||        ||            ||
+
|| '''10''' || 1a1e        || 120        || 288    ||        ||            ||
|
+
|-
|| 11 || 1b8a        || 16c        || 364    ||        ||            ||
+
|| '''11''' || 1b8a        || 16c        || 364    ||        ||            ||
|
+
|-
|| 12 || 1c7a        || f0        || 240    ||        ||            ||
+
|| '''12''' || 1c7a        || f0        || 240    ||        ||            ||
|
+
|-
|| 13 || 1c9a        || 1a        || 26      ||        ||            ||
+
|| '''13''' || 1c9a        || 1a        || 26      ||        ||            ||
|
+
|-
|| 14 || 2019        || 385        || 901    ||        ||            ||
+
|| '''14''' || 2019        || 385        || 901    ||        ||            ||
|
+
|-
|| 15 || 239e        || 385        || 901    ||        ||            ||
+
|| '''15''' || 239e        || 385        || 901    ||        ||            ||
|
+
|-
|| 16 || 527e        || 2ee0      || 12000  ||        ||            ||
+
|| '''16''' || 527e        || 2ee0      || 12000  ||        ||            ||
|
+
|-
|| 17 || 5603        || 385        || 901    ||        ||            ||
+
|| '''17''' || 5603        || 385        || 901    ||        ||            ||
|
+
|-
|| 18 || 5988        || 385        || 901    ||        ||            ||
+
|| '''18''' || 5988        || 385        || 901    ||        ||            ||
|
+
|-
|| 19 || 5d0d        || 385        || 901    ||        ||            ||
+
|| '''19''' || 5d0d        || 385        || 901    ||        ||            ||
|
+
|-
|| 20 || 64b9        || 7ac        || 1964    ||        ||            ||
+
|| '''20''' || 64b9        || 7ac        || 1964    ||        ||            ||
|
+
|-
|| 21 || 683e        || 385        || 901    ||        ||            ||
+
|| '''21''' || 683e        || 385        || 901    ||        ||            ||
|
+
|-
|| 22 || 6bc3        || 385        || 901    ||        ||            ||
+
|| '''22''' || 6bc3        || 385        || 901    ||        ||            ||
|
+
|-
|| 23 || 6bf3        || 30        || 48      ||        ||            ||
+
|| '''23''' || 6bf3        || 30        || 48      ||        ||            ||
 
|-
 
|-
 
|}
 
|}

Revision as of 01:42, 22 February 2021

Trackdata is a set of twenty three data structures which hold key information about the track in use and the lap being driven or replayed on it. Each of the individual data structures is referred to as trackdataXX, with XX being a two-digit number. The current systematisation of Trackdata is chiefly based on the results of the restunts projects, though parts of it have been independently discovered and rediscovered over the years.

Finding Trackdata in memory

The most convenient targets to look for when using a debugger to locate Trackdata in memory are trackdata11 (highscore table), trackdata13 (replay file header) and trackdata14 (element map as in the track file). Keep in mind that different parts of Trackdata might be loaded or not depending on the current game phase (pre-lap, playing, replaying, or post-lap).

Trackdata data structures

Offsets and byte sizes assume the 1991 DOS versions of Stunts.

# Offset (hex) Size (hex) Size Layout Description Notes
01 0 70a 1802
02 70a 70a 1802
03 e14 70a 1802
04 151e 80 128
05 159e 80 128
06 161e 80 128
07 169e 80 128
08 171e 60 96
09 18fe 180 384
10 1a1e 120 288
11 1b8a 16c 364
12 1c7a f0 240
13 1c9a 1a 26
14 2019 385 901
15 239e 385 901
16 527e 2ee0 12000
17 5603 385 901
18 5988 385 901
19 5d0d 385 901
20 64b9 7ac 1964
21 683e 385 901
22 6bc3 385 901
23 6bf3 30 48