Autopilot · write-up
Level 2 r150 worm launch and post-shop swarm fixes
All decisions are made by Hatari's resident C autopilot. Both Release Hatari
and the replay DLL were rebuilt using xenon_tools/hatari_dev.ps1. Live tests
use validate_campaign.py native-run: visible emulator, fast-forward, both
AVIs, Level 2 trace, checkpoints every 150 frames. Validation completed before
the user-requested commit on xenone2-l2.
Causes and local changes
r150 frame 10438: destroying the incoming right leader triggered an unchecked Up-Left override. Left-origin followers were still leaving their hole, so the ship crossed their bodies. The controller now reads the original hole selector and script delay, keeps firing until the outgoing train has emerged, and checks successive route waypoints against the actual C body predictions before allowing the launch override. A leader's death does not mean its followers are gone. The transfer crosses at screen Y=16, above the right train's upper turn; the Y=32 crossing still took two hits in r166 even though its worm predictions matched reality. The ascent tolerates half a horizontal ship step instead of oscillating around an exact column.
r150-part2 frame 13708: formation holding retained the displaced X near the right wall, and the combined Level 2 survival pass did not cover this world region. Its lower-edge clamp could also turn Down into Up despite remaining backscroll room. The local world-Y=2160..2496 strategy now uses central X=160..176, screen-Y=144..164, restores that lane before hazard scoring, and permits a checked downward retreat. The combined body/projectile scorer retains final authority. This also prevents a generic lateral prefix from becoming an unintended trip to the opposite emitter.
Both sections exposed another local forecast defect: only the first dodge step checked walls. Subsequent simulated steps went through terrain, making an impossible escape look safe. Their forecasts now stop blocked axes and allow movement along an open axis. Body/shot queries reuse a prepared ship trajectory instead of recomputing it for each enemy. The deferred Cannon estimation and spider tactics were not changed.
Original failure recordings:
E:/xenon_runs/level2-full-lip-retreat-20261002-r150.validation/level2-full-lip-retreat-20261002-r150.x2eventsE:/xenon_runs/level2-full-lip-retreat-20261002-r150-part2.validation/level2-full-lip-retreat-20261002-r150-part2.x2events
ReVa evidence, failed experiments and source-history comparisons are in LEVEL2_LIFE_LOSS_ANALYSIS_20261002.MD.
Three-eye boss: five independent starts
All five starts defeated all three eyes, reached the shop, collected 750 cash before the shop, and retained shield 23 and three lives. No damage or stall incidents were reported. The first start is before the POWERUP; the other starts cover different states of the approach.
| Source checkpoint | Boss cleared | Shield | Result |
|---|---|---|---|
| 9990 | 11187 | 23 -> 23 | PASS |
| 10015 | 11171 | 23 -> 23 | PASS |
| 10038 | 11134 | 23 -> 23 | PASS |
| 10059 (restores 10060) | 11209 | 23 -> 23 | PASS |
| 10081 | 11267 | 23 -> 23 | PASS |
Generated report with checkpoint, recording and AVI paths.
Recordings:
999010015100381005910081
Post-shop stream and remainder of Level 2
| Recording | Start | Requested passage | Later result |
|---|---|---|---|
r170-f13421 |
13422 | No damage, stall or life loss | Later 16-point hit at 13996, outside the local world-Y bounds |
r171-f13572 |
13572 | No damage, stall or life loss | Ended at 14227, shield 39 -> 39 |
r172 |
13040 | No damage, stall or life loss | Spider defeated, shop passed, Level 3 entered; shield 39 -> 39 and two lives retained |
r172 continued through the remainder of Level 2, rather than stopping just after the repaired passage. It finalized at frame 17895 when native session state confirmed Level 3 gameplay. Recorded level telemetry first changes to Level 3 at 17526 during the transition.
Remaining observations, with exact recordings:
- r170-f13421, 13996: scripted enemy #34938 touches the ship, costing
16 shield. It uses movement update
$E1Ebefore contact; the recorded hit captures its subsequent destroy/unlink procedure$107C, not its movement procedure. Scroll is about 1913 and player world Y about 2081, below the repaired stream. This is an unresolved later incident; the other two continuations pass that area without damage. - r172, 14359: ZAPPER #36211 leaves the screen uncollected. Audit records a closest gap of 11.7px at 14321. This is a remaining pickup observation, not a shield-loss incident.
- r172, 14713: the campaign monitor reports a collision-time event while shield remains 39. The recording also retires HEALTH POWER 1 #37655 beside the ship at that frame; there is no measured shield loss or life loss.
- r172, 14726: SIDE SHOT replaces the existing rear attachment. Recorded inventory confirms the side attachment was acquired; no rear pickup was collected in these tests.
Verification
27 targeted C decoder, mission, driver and session tests pass, including delayed outgoing tails, surviving incoming bodies, unsafe override rejection, column stability and post-shop lane recovery. Both AVIs for all five boss runs and r170/r171/r172 have contiguous VBL indexes and decodable first/last frames. Debug logs and source snapshots are beside each recording. Completed owned Hatari processes were closed after recording finalized.
Example replay with the latest DLL, in cmd.exe:
cd /d D:\src\hatari
python xenon_tools\replay_ui.py "E:\xenon_runs\level2-upper-crossing-20261002-r169-f10038.validation\level2-upper-crossing-20261002-r169-f10038.x2events" --kernel-backend c --level2-boss-trace "E:\xenon_runs\level2-upper-crossing-20261002-r169-f10038.validation\level2-boss.trace"