#!/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 REACH_ONLY=1 \ bash "$SD/extras_focus_session.sh"