Xenon 2

Autopilot · write-up

Uninterrupted native campaign validation

xenondoc/UNINTERRUPTED_CAMPAIGN_VALIDATION_20261005.MD · 12 KB · updated 2026-10-06

Endpoint correction (2026-10-05): these historical runs verified defeating the spaceship and reaching the final-shop selection flag. They stopped before the last shop dialogue and Level 1 restart, so they do not prove coverage of the complete ending scene. The gameplay comparisons and incident totals below remain valid. The validator now waits for playable Level 1; the ending was recorded separately from the latest checkpoint in FINAL_SHOP_VALIDATION_20261005.MD.

Validation requested: three independent campaigns from assets/xenonplay.sav through final completion, followed by a fourth with HIGH FPS and HD sprites. Every campaign uses the same resident C autopilot, a visible Sprite Stream window, fast-forward, paired original/sprite AVIs, Level 2–5 trace logs, and 150-frame checkpoint requests. There are no mid-campaign snapshot reloads.

The earlier R561/R562 split coverage is not counted as an uninterrupted run. The original endpoint included destroying the Level 5 spaceship and reaching the game's final-shop flag. A lost life fails the requested acceptance; health recovered by a respawn does not count as a successful repair.

Reproduction

python xenon_tools/validate_campaign_repeats.py campaign-full-uninterrupted-20261005-r564 --count 3 --build
python xenon_tools/validate_campaign_repeats.py campaign-full-hd-highfps-20261005-r565 --count 1 --high-fps --hd-sprites

--build rebuilds Hatari and the replay DLL through the official xenon_tools/hatari_dev.ps1 script. The repeat wrapper checks that the executable digest stays unchanged between campaigns. The native launcher records all arguments and renderer options in manifest.json.

The rendering switches map to Hatari's --xenon-highfps true and --xenon-hires true. They select interpolation and the HD atlas; they do not change the native controller configuration. The official wrapper exposes the same options as -HighFps -HdSprites.

compare_campaign_controls.py compares actual recorded inputs, player/shop state and raw object state by canonical game frame. It excludes VBL timing and draw payloads. This checks renderer independence from captured evidence instead of assuming it from the option names.

Results

All four campaigns completed with zero lives lost and zero detected stalls, each reaching final completion at canonical frame 49987, with three lives and 33 shield. The spaceship is defeated at 49882; all of its 1500 cash is collected before completion.

The Release executable SHA256 is ef90763f6ca0dce23705ae37d37245df289ab93a0241c0c9814f6c2a670aa999. Both native artifacts were rebuilt before the first campaign. No C behavior was changed during this validation.

All three repeats and the HD/high-FPS run have identical controls, player/shop state and raw object state for all 49986 active gameplay frames before final completion. Observer stop latency accounts for their differing final capture frames; it does not represent a different boss outcome or route. Both rendering options therefore leave the tested autopilot's behavior unchanged.

Replaying Run 1 through the current C DLL reproduced 50334/50334 controls and 50334/50334 live status records, with zero replay errors. This is a correctness check, not an isolated performance measurement.

Replaying the HD/high-FPS recording through the same DLL reproduced 49989/49989 controls and 49990/49990 live status records, with zero errors. The control comparison needs a following frame, explaining the one fewer comparison than native status records.

All eight AVIs are readable, including their first and last frames. Their paired frame counts are 172429, 172299, 172317 and 172266. Their canonical gameplay timelines are continuous; periodic checkpoint captures can briefly pause emulation, but no campaign reloads a snapshot during play.

The actual HD launch command contains --xenon-highfps true --xenon-hires true, and Win32 inspection confirms a visible Sprite Stream window. Exported sprite AVI images at frame 1000 / VBL 17666 visibly confirm the HD artwork: standard sprites and HD sprites. Both AVIs retain the 640×400 capture size. The HD sprite AVI is approximately 63.5 GB, compared with about 6.6 GB for each standard sprite AVI. No Hatari instance remains running after all recordings finalized.

These passes are not damage-free or pickup-complete: the Level 1 Cannon is missed, the spider's 1500 cash is missed, and Level 5 ends with six unrecovered shield damage.

Recording filenames

Every incident below occurs at the same canonical frame in all four files. Each folder also contains both AVIs, incidents.jsonl, manifest.json, native level traces, checkpoints and the exact source archive used by that run.

  • R1: E:/xenon_runs/campaign-full-uninterrupted-20261005-r564-1.validation/campaign-full-uninterrupted-20261005-r564-1.x2events
  • R2: E:/xenon_runs/campaign-full-uninterrupted-20261005-r564-2.validation/campaign-full-uninterrupted-20261005-r564-2.x2events
  • R3: E:/xenon_runs/campaign-full-uninterrupted-20261005-r564-3.validation/campaign-full-uninterrupted-20261005-r564-3.x2events
  • HD: E:/xenon_runs/campaign-full-hd-highfps-20261005-r565-1.validation/campaign-full-hd-highfps-20261005-r565-1.x2events
Recording Final completion Lives lost Detected stalls Ending shield
R1 49987 0 0 33
R2 49987 0 0 33
R3 49987 0 0 33
HD 49987 0 0 33

Shield damage and actual restoration

This table is identical for every recording. Restoration includes collected health and paid shop repairs; no respawn or level-entry reset is counted.

Level Damage Actual restoration Ending shield Lives lost
1 0 0 39 0
2 32 32 39 0
3 36 36 39 0
4 28 28 39 0
5 34 28 33 0

Restoration events: Level 2 f11109 (+20, shop), f12686 (+12, gameplay); Level 3 f20554 (+20, shop), f28180 (+16, shop); Level 4 f36180 (+20, shop), f40433 (+8, shop); Level 5 f42452 (+24, gameplay), f44836 (+4, shop).

The run survives, but reaches only seven shield in early Level 2 and Level 3. Those concentrations of damage remain significant risks despite subsequent repairs. Level 5's final six damage is unrecovered and exceeds the previously accepted four net shield per level.

Damage incidents

The recording column refers to the complete filenames above. Descriptions identify captured hit sources; they do not infer a prediction failure from the update-procedure address alone.

Recording Level Frame(s) Damage Short description
R1, R2, R3, HD 2 7617 16 Object-list contact on the first active Level 2 capture, source #12577 ($50C48); initialization/contact ordering still needs investigation.
R1, R2, R3, HD 2 7991 16 Enemy #13754 ($E1E) contacts the ship, leaving seven shield.
R1, R2, R3, HD 3 17312 16 Scripted swarm member #42509 ($4F244) contacts the ship.
R1, R2, R3, HD 3 17889 16 Scripted swarm member #45332 ($4F244) contacts the ship, leaving seven shield.
R1, R2, R3, HD 3 21998 4 Directional projectile #59189 ($4180) hits the ship.
R1, R2, R3, HD 4 29208, 29209, 29214 8 + 4 + 8 Enemies #85969/#85970 ($E1E) and projectile #86067 ($4180) cause a short damage cluster.
R1, R2, R3, HD 4 30244 4 Directional projectile #90996 ($4180) hits the ship.
R1, R2, R3, HD 4 32827 4 Directional projectile #103985 ($4180) hits the ship.
R1, R2, R3, HD 5 42116–42118 8 + 8 + 8 Three enemy bodies #134386/#134451/#134460 ($4FA1E) contact the ship before the tank; a later health pickup restores all 24.
R1, R2, R3, HD 5 43301 4 Directional projectile #141028 ($4180) hits the ship; the following shop restores four.
R1, R2, R3, HD 5 49718, 49719 2 + 4 Source #169171 changes from $5025E to $E54 across two contacts during the spaceship fight; six damage remains unrecovered.

Boss rewards

All four recordings give the same results. The final spaceship's 100 cash credited during allocation is included once, alongside 1400 observed live collections.

Level / reward Drop frame Collected / available
Level 1 boss 6184 1350 / 1350
Level 2 three-eye boss 10475 750 / 750
Level 2 spider 14936 0 / 1500
Level 3 first boss 19863 750 / 750
Level 3 final boss 27387 1500 / 1500
Level 4 first boss 35436 750 / 750
Level 4 final boss 39544 1450 / 1500
Level 5 tank 44148 750 / 750
Level 5 spaceship 49882 1500 / 1500

Missed valuable pickups

These observed lifetimes and outcomes are the same in all four recordings. This records misses without asserting that every approach was safe. Full pickup inventories, including ordinary cash, are retained in the JSON audits.

Recording Level Frames visible Pickup Comment
R1, R2, R3, HD 1 5011–5067 Cannon #9655 Valuable equipment pickup expires uncollected.
R1, R2, R3, HD 2 8241–8285 Health Power 1 #14707 Missed while the ship is damaged; the first shop subsequently repairs it.
R1, R2, R3, HD 3 18078–18146 Health Power 1 #46341 Missed after the two swarm hits.
R1, R2, R3, HD 3 22130–22236 Zapper #59896 Valuable temporary attack pickup expires uncollected.
R1, R2, R3, HD 3 23724–23813 Health Power 2 #67195 Missed while shield is below maximum.
R1, R2, R3, HD 3 26581–26649 Health Power 2 #80458 Missed before the final boss and end shop.
R1, R2, R3, HD 4 30163–30258 Health Power 1 #90714 Missed during the damaged corridor passage.
R1, R2, R3, HD 4 31594–31681 Side Shot #97769 Missed while the recorded loadout is below maximum side-shot power.

Rear Shot pickups are deliberately skipped. The two missed Level 5 Side Shot pickups are already at maximum power and do not improve the recorded loadout. The pickup audit also records the existing C policy's Homing Missile skip to preserve Side Shot; this is a policy decision, not a collection claim.

Follow-up priorities

  1. Investigate the early Level 2 contact and the Level 3 swarm hits; both passages reduce shield to seven. Preserve the successful routes and boss state machines while resolving the actual contact/prediction cause.
  2. Restore the local Level 1 Cannon pickup and Level 2 spider reward behavior. The spider is defeated, but missing its entire reward is a clear remaining failure. A changed loadout must be checked with another fresh campaign.
  3. Resolve the final spaceship's six damage locally and the one missed Level 4 boss coin. Both are consistent, reproducible encounter incidents.
  4. Review safe collection of the Zapper, side-shot upgrade and damaged-ship health pickups. Avoid globally overriding checked navigation or hazard avoidance simply to increase pickup count.

The new navigation passes every level without a detected stall in these four campaigns. No more expensive navigation algorithm was added for this test. The deferred cannon-model work remains deferred.

Audit artifacts

D:/src/hatari/work/campaign-r564/ contains:

  • run1-audit.json through run4-audit.json: damage, restoration, equipment, pickup lifetimes, boss cash, observer incidents and recorded run configuration.
  • run1-shops.md through run4-shops.md: all shop visits and transactions.
  • comparison-with-hd.json: common incident families and identical binary/snapshot checks.
  • control-comparison.json: exact per-frame gameplay comparison across all four runs.
  • all-avi-checks.json: all eight AVI indexes and successful first/last-frame decoding.
  • low-f1000.png, hd-highfps-f1000.png: direct AVI exports confirming different artwork.

Native replay parity output is in work/r564-replay-parity.log and work/r565-replay-parity.log; launch/window evidence is in work/r565-window-check.log. The final process check confirms no remaining Hatari instance.