Xenon 2

Autopilot · write-up

Level 4 resident-C validation, 3 October 2026

xenondoc/LEVEL4_VALIDATION_20261003.MD · 5 KB · updated 2026-10-05

The pilot completed Level 4 and reached playable Level 5 at 39798, with no lost lives or detected stalls. One projectile caused 4 shield damage. The final shop restored shields 35→39; this was not damage-free gameplay.

Recording and build

  • Events: E:/xenon_runs/level4-full-after-level3-20261003-r278.validation/level4-full-after-level3-20261003-r278.x2events.
  • Original AVI: E:/xenon_runs/level4-full-after-level3-20261003-r278.validation/level4-full-after-level3-20261003-r278-original.avi.
  • Sprite AVI: E:/xenon_runs/level4-full-after-level3-20261003-r278.validation/level4-full-after-level3-20261003-r278-sprite.avi.
  • Start: E:/xenon_runs/level3-full-repaired-20261003-r277.validation/level3-full-repaired-20261003-r277.sav, frame 30215, just after Level 4 starts.
  • Source: cd251e6c, including merged carrier-restart fix 5b74d502.
  • Level 4 trace: D:/src/hatari/work/l2-source-comparison/r278-driver.log.

validate_campaign.py native-run rebuilt Hatari and the replay DLL through hatari_dev.ps1, using Release, visible Hatari, fast-forward, both AVIs and 150-frame checkpoint intervals. Hatari's resident C session supplied input; Python recorded and inspected captures. The wrapper closed its own Hatari instance after recording finalized at Level 5.

The event stream covers 30217–39799. Both AVI containers and indexes passed their structural audits, with 32,154 video frames each. Replay using the rebuilt C DLL agreed with all 7,022 traced Level 4 gameplay decisions in applied movement and verification. The 75 targeted native checks also passed. This establishes consistency for this run, not every loadout or restart.

Incidents and pickups

Frame Problem or outcome
30944 Directional projectile #99903 ($4180) clipped the ship during entry wall-shooter routing; shields 39→35.
31104 Temporary Shield #100327 was inferred collected.
31327–31441 Health Power 1 #101986 appeared and expired; its closest approach was 46.75px at 31408.
32645 Side Shot #108776 was inferred collected; the installed Side Shot became power 1.
35277, 35281 Rear Shot #117512 and #117735 expired deliberately, preserving Side Shot.
35797 Zapper #120748 was inferred collected.

The captured contact at 30944 has source rectangle (132,172)–(137,177) and player rectangle (120,161)–(137,181), at scroll 4065. The preceding recomputed C forecasts already reported no_verified_escape; at 30943 the mission wanted RIGHT along the retained wall-attack route. This supports investigating the earlier approach and escape space. This validation alone does not establish a motion error or the exact cause of the late forecast.

Original AVI at the shield-loss frame

The pickup audit infers 94 cash collections and 37 missed cash items. Another cash item was collected on its allocation update, as described below. Thus 95 cash collections are accounted for. Missed ordinary cash and the health pickup remain improvements to make; the audit does not determine whether each miss had a safe detour.

Both bosses and their cash

The first boss released ten drops at 34040. All ten retired beside the ship by 34135, before the first shop opened at 34136. The audit infers all ten were collected.

The final boss released twenty drops at 38104. Nineteen are inferred collected by 38171, before the final shop opened at 38172. Drop #132197 is already retired ($107C, status 4) in its first capture at 38104, when cash increases 6450→6550. Its allocation and collection occurred in the same update, so the lifetime-only audit never acquired it. The retired object and matching 100-credit increase account for this twentieth drop. There is no evidence of a missed boss cash drop in this run.

Shops

The shop report records the equipment changes. It omits health purchases because they do not alter an equipment slot; that purchase is separately verified below.

Shop Frame Purchase Cost
First 34688 Laser power 0→1 2000
Final 38766 Second Laser 4000
Final 38857 Side Shot power 1→2 1000
Final 38958 New Laser power 0→1 2000
Final 39046 Health Power, restoring shields 35→39 500

Cash was 2400→400 in the first shop, and 7950→450 in the final shop. The 500-credit health debit occurs across 39041–39045, followed by the shield increase at 39046. Level 5's loadout retains Double Shot power 1, Cannon, two Lasers at power 1, Drone and Side Shot power 2.

Reproduce

$env:XAP_LEVEL4_TRACE_FILE='D:/src/hatari/work/level4-validation-trace.log'
python xenon_tools/validate_campaign.py native-run level4-validation-repeat `
  --output-root E:/xenon_runs `
  --resume E:/xenon_runs/level3-full-repaired-20261003-r277.validation/level3-full-repaired-20261003-r277.sav `
  --build-directory out/build/codex-validate --build-type Release --build `
  --fast-forward --checkpoint-interval 150 --frames 40000 --stop-at-level 5 --port 6903

Use a fresh output name. Default incident handling stops on a lost life or detected stall. Use Ctrl+C or the run's stop-request file for manual stops, allowing both AVIs to finalize first.