# Quick Race Drift (Stadium Drift 2, Medium, 3 AI drifters): a fixed driving
# programme in game-world time, with the player car's state, its drift score
# and the AI scores traced every frame.  Run with NFSU2_FIXED_DT=60|120 to get
# a deterministic simulation; tools/drift_compare.py compares two runs.
# World time w runs from GO (GRaceStatus [0x890118] state 4).
0     tapuntil RETURN MC_Background.fng 120 4000
+200  tap RETURN
+0    tapuntil RETURN UI_QRModeSelect.fng 150 3000
+40   tap RIGHT
+40   tap RIGHT
+40   tap RIGHT
+60   dump mode_selected
+0    tapuntil RETURN UI_QRTrackSelect.fng 150 1500
+0    tapuntil RETURN UI_QRModeOptions.fng 150 1500
+0    tapuntil RETURN UI_QRCarSelect.fng 150 1500
+0    tapuntil RETURN PC_Loading.fng 150 1500
+0    waitmem 0x8654a4 6 6000
+0    waitexpr i:[0x890118] == 4 6000            # GRaceStatus: 4 = racing (after the countdown)
+0    wzero now
+0    trace 1 x=[[$P+0x1d8]+8]+0x60 y=[[$P+0x1d8]+8]+0x64 z=[[$P+0x1d8]+8]+0x68 vx=[[$P+0x1d8]+8]+0x70 vy=[[$P+0x1d8]+8]+0x74 v=[[$P+0x1d8]+8]+0x430 hd=w:[[$P+0x1d8]+8]+0x40c slip=[$P+0x1d8]+0x44 rate=[$P+0x1d8]+0x34 lvl=i:[$P+0x1d8]+0x1c st=i:[[$P+0x1d4]]+0x14 mult=[[$P+0x1d4]]+0x1c pend=[[$P+0x1d4]]+0x24 tot=[[$P+0x1d4]]+0x2c n=i:[[$P+0x1d4]]+0x20 a0=[[$R0+0x1d4]]+0x2c a1=[[$R1+0x1d4]]+0x2c a2=[[$R2+0x1d4]]+0x2c a3=[[$R3+0x1d4]]+0x2c p0=[[$R0+0x1d4]]+0x24 p1=[[$R1+0x1d4]]+0x24 p2=[[$R2+0x1d4]]+0x24 p3=[[$R3+0x1d4]]+0x24
300wms dump race_start
+0    down UP
+2500wms down LEFT
+250wms tap SPACE 8
+450wms up LEFT
+0    down RIGHT
+350wms up RIGHT
+1200wms down RIGHT
+250wms tap SPACE 8
+450wms up RIGHT
+0    down LEFT
+350wms up LEFT
+1500wms dump d1
+0    down LEFT
+300wms tap SPACE 8
+500wms up LEFT
+0    down RIGHT
+300wms up RIGHT
+2000wms dump d2
+0    down RIGHT
+300wms tap SPACE 8
+500wms up RIGHT
+0    down LEFT
+300wms up LEFT
+3000wms dump d3
+0    up UP
+0    untrace
+0    quit
