From 73bf90eb8ded174fd621ba0f8be6a6fb5ac2cde7 Mon Sep 17 00:00:00 2001 From: sylph-decoder Date: Mon, 31 Aug 2026 04:11:47 +0000 Subject: [PATCH] tools: a ja capture of DIFFICULTY, to settle whether GP_DIALOG 2/3 are a language pair The byte comparison showed 2/3 differ in 2.77 % while sharing every element name -- what a language pair looks like -- but that they are ENGLISH and JAPANESE rested on the disc's convention rather than on this screen. This captures it in ja. Reuses submenu_focus_sweep.py with SWEEP_TARGETS=0 rather than a new probe, so the JP capture is taken by the same navigation that produced the English one. The locale is restored on ANY exit including a crash, and the probe never presses A inside a submenu, so it cannot reach SELECT DATA and the guest throw. Committed before running. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v --- tools/re-capture/jp_difficulty_session.sh | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 tools/re-capture/jp_difficulty_session.sh diff --git a/tools/re-capture/jp_difficulty_session.sh b/tools/re-capture/jp_difficulty_session.sh new file mode 100755 index 00000000..5faf3eb1 --- /dev/null +++ b/tools/re-capture/jp_difficulty_session.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Capture the DIFFICULTY screen in JAPANESE, and ALWAYS put the locale back. +# +# QUESTION: GP_DIALOG entries 2/3 differ in 2.77 % of bytes while sharing every +# element name, which is what a language pair looks like -- but I have never +# captured DIFFICULTY in `ja`, so "English and Japanese" rested on the disc's +# convention rather than on this screen (dialog-0-1-is-a-duplicate.txt). +# +# ⚠️ SAFE ON THIS PATH AND ONLY THIS ONE. DIFFICULTY's forward path -- Ⓐ on a +# difficulty -> SELECT DATA -> guest throw at PC 0x82307128 -- crashes the game. +# submenu_focus_sweep.py presses Ⓐ to ENTER, one DOWN, then Ⓑ to leave, and never +# presses Ⓐ inside a submenu. Do not add one. +# +# Reuses the sweep with SWEEP_TARGETS=0 rather than a new probe, so the capture is +# taken by the same navigation that produced the English one. +set -u +export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98 +SD="$(cd "$(dirname "$0")" && pwd)" +OUT="${OUT:-/sylph-home/re/jpdifficulty}"; mkdir -p "$OUT" + +restore() { echo "-- restoring locale --"; python3 "$SD/set_console_language.py" en || true; } +trap restore EXIT INT TERM + +python3 "$SD/set_console_language.py" ja || { echo "LOCALE SET FAILED"; exit 2; } +echo "── EFFECTIVE CONFIG ──" +echo " locale = ja (restored on ANY exit, including a crash)" +echo " out = $OUT" +echo " probe = submenu_focus_sweep.py SWEEP_TARGETS=0 (never presses A inside)" + +OUT="$OUT" SWEEP="$SD/submenu_focus_sweep.py" SWEEP_TARGETS=0 \ + bash "$SD/extras_focus_session.sh"