#!/usr/bin/env bash # Does the game DRAW the sweep leaves (pteff03 / pteff03a) on a SETTLED title? # # ui-resting-pose.md records a tension: two renders one plateau-phase apart differ # by RMSE 11.9 INSIDE the adjudication box, while two captures of that screen from # different sessions differ by 0.32 there, and an --at sweep against a capture is # flat to 1.2. A metric cannot be insensitive to an 11.9 change unless what # changed is largely absent from what it is compared against. # # The leaves are a 400 px-wide strip at scale (100, 600) / (100, 800) -- 1080 and # 1440 px tall, taller than the screen. If the game draws them and they free-run, # the draw stream shows a tall strip whose x translates frame to frame. That is # unmistakable, and the plate's own pulsing is the in-capture control that the # instrument is seeing real variation rather than one frozen frame. set -u export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98 SD="$(cd "$(dirname "$0")" && pwd)" OUT="${1:-/sylph-home/re/titledraw}"; mkdir -p "$OUT"; rm -f "$OUT"/xenia_re_ui_draws_*.log . "$(dirname "${BASH_SOURCE[0]}")/ensure_single_emulator.sh" ensure_single_emulator || exit 3 ( cd "$OUT" && nohup run-canary --mem_watch=false --log_ui_draws=true \ --ui_draw_capture_frames="${FRAMES:-150}" --ui_draw_capture_max=400000 \ --framerate_limit="${FPSLIMIT:-0}" \ --logged_profile_slot_0_xuid=B13EBABEBABEBABE \ >"$OUT/canary.stdout" 2>"$OUT/canary.stderr" & ) sleep 10 ps -C xenia_canary >/dev/null 2>&1 || { echo "EMULATOR DID NOT START:"; tail -3 "$OUT/canary.stderr"; exit 4; } until xdotool search --name "Xenia-canary" >/dev/null 2>&1; do sleep 1; done win="$(xdotool search --name "Xenia-canary" | tail -1)" python3 "$SD/wait_plate_pulse.py" 900 || exit 1 xdotool windowactivate --sync "$win"; sleep 1 # Time the capture window so the run MEASURES its own frame rate instead of # assuming it. Without this, px/frame cannot be turned into px/second and the # leaf-rate question stays fps-bound -- which is exactly the caveat that closed # three earlier routes. t0=$(date +%s.%N) xdotool key F10; sleep 0.6 xdotool mousemove 900 400 click 1 for _ in $(seq 1 400); do ls "$OUT"/xenia_re_ui_draws_*.log >/dev/null 2>&1 && break sleep 0.1 done t1=$(date +%s.%N) echo "CAPTURE-WALL-SECONDS $(awk -v a="$t0" -v b="$t1" "BEGIN{printf \"%.3f\", b-a}")" sleep 6 grep -i "UI-CAP" "$OUT/canary.stdout" | tail -3 ls -l "$OUT"/xenia_re_ui_draws_*.log 2>/dev/null || echo "NO CAPTURE LOG" echo "TITLE DRAW CAPTURE DONE"