# DKR regression fixture — LONG in-race drive on Ancient Lake (Time Trial).
#
# NO LONGER DRIVEN BY check_race_drive.py. Since the "closedloop" wave that check
# uses nav_to_time_trial_race.txt (this file's navigation, without the driving
# inputs) with MDKR_AUTOPILOT=1, because the LEFT-pulse train below is a blind
# open-loop line that has to be recalibrated every time the simulation changes --
# twice so far. This file is kept, unchanged, for the three checks that need a
# route only to be IDENTICAL TO ITSELF while they compare pixels between two arms:
# check_texture_lineswap.py, check_rom_revision.py and check_determinism.py. For
# those the trajectory is irrelevant, so the open loop is correct here.
#
# Purpose: the SILENT gameplay failures — a racer flung to a non-finite/garbage
# position, after which the BSP walk culls everything and the world stops drawing
# while the race clock keeps counting. Nothing crashes, so a plain "did it exit 0"
# fixture cannot see it. Drive this with tests/check_race_drive.py, which asserts
# on the traced position / checkpoint progress and on sampled frames still
# rendering a real scene.
#
# Navigation (frames 1250..2600) is identical to nav_to_time_trial_race.txt. The
# countdown clears and the race clock starts at ~frame 3120. Then: hold
# ACCELERATE and pulse the stick LEFT for 25 frames every 120. Ancient Lake is a
# counter-clockwise loop, so a short repeating left pulse keeps the kart roughly
# on the racing line — this route crosses ~29 checkpoints, completes a lap, and
# takes a genuine SURFACE_ZIP_PAD boost at ~frame 5650 (~22 units/frame, ~2x top
# speed). It also steers at speed every 120 frames, which is what exercises the
# lateral-velocity path: the ASSET_MISC_8 denormal-divisor bug fired on the very
# first steering input at speed (see docs/OPEN_ITEMS.md).
#
# Budget: 7500 frames. Do not extend it much further without re-tuning the
# pulses — this blind route noses into a canyon wall at ~frame 7700 and the kart
# then sits there with the throttle held (real behaviour, but it would trip the
# stall assertion).

# --- Navigation into the race ---
1250 START 4
1330 START 4
1450 A 4
1540 A 4
1750 A 4
1900 DOWN 4
2000 A 4
2150 A 4
2320 A 4
2460 A 4
2600 A 4

# --- Drive: hold accelerate for the rest of the run ---
2750 A 4800

# --- Steering: short left pulses (25 frames on, 95 off) ---
3000 LEFT 25
3120 LEFT 25
3240 LEFT 25
3360 LEFT 25
3480 LEFT 25
3600 LEFT 25
3720 LEFT 25
3840 LEFT 25
3960 LEFT 25
4080 LEFT 25
4200 LEFT 25
4320 LEFT 25
4440 LEFT 25
4560 LEFT 25
4680 LEFT 25
4800 LEFT 25
4920 LEFT 25
5040 LEFT 25
5160 LEFT 25
5280 LEFT 25
5400 LEFT 25
5520 LEFT 25
5640 LEFT 25
5760 LEFT 25
5880 LEFT 25
6000 LEFT 25
6120 LEFT 25
6240 LEFT 25
6360 LEFT 25
6480 LEFT 25
6600 LEFT 25
6720 LEFT 25
6840 LEFT 25
6960 LEFT 25
7080 LEFT 25
7200 LEFT 25
7320 LEFT 25
7440 LEFT 25
