#!/usr/bin/env bash # Does the game DRAW the sweep leaves on the JAPANESE title, and do they cross # the adjudication box? # # ui-resting-pose.md carries an unresolved tension. On the EN title the leaves are # drawn and free-run: two strips taller than the screen, sweeping in opposite # directions at ~4.3 px/frame. Two renders one plateau-phase apart differ by RMSE # 11.9 INSIDE the box the ptlogo_eff3 adjudication uses. Yet two JP captures from # different sessions differ by only 0.32 there. Two candidates, neither tested: # the two JP shutters fell at similar phases (~1 % coincidence on a 600-unit # cycle), or build 7's denser logo stack -- the katakana plus the crystalline # burst the English title lacks -- OCCLUDES the sweep inside that box. # # A draw capture of the JP title distinguishes them: if the strips are present and # crossing the box, the 0.32 was luck; if absent or clipped there, it is occlusion. # # Locale is set and ALWAYS restored, as in jp_title_session.sh. set -u export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98 SD="$(cd "$(dirname "$0")" && pwd)" OUT="${1:-/sylph-home/re/jpdraw}"; mkdir -p "$OUT"; rm -f "$OUT"/xenia_re_ui_draws_*.log restore() { echo "-- restoring locale --" python3 "$SD/set_console_language.py" en || echo "RESTORE FAILED — check by hand" python3 "$SD/set_console_language.py" --show; } trap restore EXIT INT TERM . "$SD/ensure_single_emulator.sh"; ensure_single_emulator || exit 3 python3 "$SD/set_console_language.py" ja python3 "$SD/set_console_language.py" --show ( cd "$OUT" && nohup run-canary --mem_watch=false --log_ui_draws=true \ --ui_draw_capture_frames=150 --ui_draw_capture_max=400000 \ --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; } echo "── EFFECTIVE CONFIG ──" echo " locale = ja (restored on exit)" echo " emulator = $(ps -C xenia_canary --no-headers | wc -l) instance(s)" echo " capture = log_ui_draws, 150 frames, armed by F10 at the plate pulse" 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 xdotool key F10; sleep 0.6 xdotool mousemove 900 400 click 1 sleep 12 grep -i "UI-CAP" "$OUT/canary.stdout" | tail -2 ls -l "$OUT"/xenia_re_ui_draws_*.log 2>/dev/null || echo "NO CAPTURE LOG" echo "JP DRAW CAPTURE DONE"