# Shared step script; screens align by step index. `next` = wait for a new, settled screen.
#
# Steps 0..8 and the guard pairs are gameplay_probe.txt's path, verbatim: the controller-
# configuration 'save to memory card?' dialog lands on a step index that moves with how many
# controller-configuration screens the boot shows, so every step it can land on carries an
# ifref pair (RIGHT moves the highlight YES -> NO, then CROSS answers NO; a blind CROSS = YES
# and the probe then loops on slot select / 'overwritten data will be lost'). ifref presses only
# on a match, so an unused pair costs ~2 s and no press. Rows 47..62 of the 160x112 thumbnail
# are the dialog text only (63..75 are the YES/NO buttons), so the second guard of a pair still
# matches after the RIGHT. Measured on this binary (logs/parity/gate/tfix1, tfix2 and
# hostdraw_fix/mission.drive.log, 2026-09-11): dist 0.00 on the prompt at steps 9/10, 25.7..33.0
# on every screen the later pairs saw; threshold 8.
#
# Without those guards this script stalled on the dialog at step 9 and never reached the
# briefing -- and because black_rows.py counted black frames from anywhere in the run, the
# transition gate went on passing on the boot's black screens (STATUS 2026-09-11).
#
# THE TRANSITION -- the black screen between the dialog and the mission briefing -- is what this
# script exists to capture, at 5 fps. Answering NO takes the game straight to it, so the burst has
# to start on the NO press. It used to be a plain `burst` pinned to step 11, immediately after the
# FIRST guard pair; when the boot was longer and the dialog landed on a later pair the burst fired
# on a controller-configuration screen instead and the fade was left to the 1 Hz wait captures
# (logs/parity/gate/s4_mb, 2026-09-12: matched at steps 13/14, gate FAIL "4 black-screen frames
# examined, need 5"). So each guard pair now carries its own `ifburst`, which fires only when the
# ifref immediately above it matched -- exactly one does, wherever the dialog lands, and the burst
# is always on the NO press. gate.observed_burst_step() reads the step back off the
# `sNN_burst_*.png` the run wrote, and score_transition counts ONLY frames from it on, so neither
# the boot's black screens nor the controller-configuration screens can stand in for the fade.
#
# When the card already holds a controller configuration (the owner's free play saved one on 2026-09-16)
# the boot shows no configuration screens and no dialog: no ifburst fires, and the fade to black happens
# during the rank press's own settle wait, at a step index that drifts with the boot (s05 in s6_fade, s07
# nominal). gate.score_fade then scores by content -- the black run immediately before the first frame
# matching scripts/parity/ref_briefing_ours.png -- from the 5 fps wait captures the gate runs this
# script with (--wait-period 0.2). The guard pairs below stay: they answer the dialog when it does show.
next+1.0:CROSS      # loading logo (press has no effect; establishes the first screen)
next+1.0:CROSS      # Select MEMORY CARD slot -> slot 1
next+1.0:CROSS      # card notice -> CONTINUE
next+1.0:CROSS      # SONY COMPUTER ENTERTAINMENT AMERICA
next+1.0:CROSS      # DEVELOPED BY
next+1.0:CROSS      # intro / warning screen
next+1.0:CROSS      # intro movie -> skip
next+2.0:CROSS      # main menu -> NEW GAME
next+2.0:CROSS      # select rank
ifref(scripts/parity/ref_save_prompt_ours.png,47,62,36,125,8)+1.0:RIGHT   # 'save to memory card?': move the highlight YES -> NO
ifref(scripts/parity/ref_save_prompt_ours.png,47,62,36,125,8)+1.0:CROSS   # ... and answer NO (a blind CROSS = YES loops on slot select / overwrite?)
ifburst+12.0:NONE   # THE TRANSITION, if the dialog was answered just above
next+2.0:CROSS      # black / cinematic -> skip
ifref(scripts/parity/ref_save_prompt_ours.png,47,62,36,125,8)+1.0:RIGHT   # 'save to memory card?': move the highlight YES -> NO
ifref(scripts/parity/ref_save_prompt_ours.png,47,62,36,125,8)+1.0:CROSS   # ... and answer NO (a blind CROSS = YES loops on slot select / overwrite?)
ifburst+12.0:NONE   # THE TRANSITION, if the dialog was answered just above
next+2.0:CROSS      # controller presets (2) / briefing
ifref(scripts/parity/ref_save_prompt_ours.png,47,62,36,125,8)+1.0:RIGHT   # 'save to memory card?': move the highlight YES -> NO
ifref(scripts/parity/ref_save_prompt_ours.png,47,62,36,125,8)+1.0:CROSS   # ... and answer NO (a blind CROSS = YES loops on slot select / overwrite?)
ifburst+12.0:NONE   # THE TRANSITION, if the dialog was answered just above
next+2.0:CROSS      # briefing
next+2.0:CROSS      # briefing
burst+8.0:NONE      # the briefing settled
wait+2.0:NONE
