re: fix wait_title.sh's stale oracle; the JP title still is not reached
Last iteration's "never reached the title in 787 s" was a broken tool reporting on the world. wait_title.sh was still sampling the single pixel (625,618) that is_title.py had already been written to replace -- its docstring says why: a 1280x720 coordinate sampled against the 1279x675 game surface, so it always reads the copyright line. The replacement sat in the same directory. wait_title.sh now delegates to it. is_title.py passes its own controls before being trusted here: 753 green-glyph pixels on the committed English title capture, 327 on the main menu, threshold 400. Re-ran with the working oracle and the profile flag the English captures use. The game STILL did not present the interactive title -- but that is now a measurement rather than an artefact: not one frame showed a single green-(A) glyph pixel, and content correlation against either build-7 render never exceeded 0.22. Canary was alive and polling XamInputGetKeystrokeEx (601 calls), sitting in the attract movie. So the open question narrowed again, and is written into MISSION.md: whether the attract loop returns to the INTERACTIVE title without a pad press. title_states_capture.sh claims it does on the English boot with no pad input; if that holds, the difference is the locale. Nothing decided about the keyframe-time association or the rest() rule. Emulator stopped, lock cleared, locale restored to English.
This commit is contained in:
@@ -1,16 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Poll the framebuffer for the "PRESS (A) BUTTON" title screen (the green A glyph
|
||||
# at ~625,618) and tap A the instant it appears — the title auto-returns to the
|
||||
# attract loop after a few seconds, which is why a human-paced tap misses it.
|
||||
# Poll the framebuffer for the "PRESS (A) BUTTON" title screen and tap A the
|
||||
# instant it appears — the title auto-returns to the attract loop after a few
|
||||
# seconds, which is why a human-paced tap misses it.
|
||||
#
|
||||
# 🔴 FIXED 2026-08-29. This used to sample the SINGLE PIXEL (625,618) and test it
|
||||
# for green. That is the exact oracle `is_title.py` was written to replace, and
|
||||
# its docstring says why: it is a 1280x720 coordinate sampled against the
|
||||
# 1279x675 game surface, so it always reads the copyright line. The stale copy
|
||||
# survived here and cost a 787 s run that reported "title not seen" while the
|
||||
# game was cycling through the title perfectly normally.
|
||||
# Now delegates to is_title.py, which COUNTS the green (A) glyph's pixels
|
||||
# anywhere in the frame — geometry-independent, and it passes its own controls
|
||||
# (753 px on a real title capture, 327 on the main menu, threshold 400).
|
||||
set -u
|
||||
export HOME=/sylph-home/re
|
||||
TMP=/tmp/title-probe.png
|
||||
deadline=$(( SECONDS + ${1:-900} ))
|
||||
while [ $SECONDS -lt $deadline ]; do
|
||||
if screenshot "$TMP" >/dev/null 2>&1; then
|
||||
read -r r g b < <(convert "$TMP" -format "%[fx:int(255*p{625,618}.r)] %[fx:int(255*p{625,618}.g)] %[fx:int(255*p{625,618}.b)]" info:)
|
||||
if [ "$g" -gt 130 ] && [ $((g - r)) -gt 45 ] && [ $((g - b)) -gt 45 ]; then
|
||||
echo "TITLE detected (rgb $r,$g,$b) at ${SECONDS}s — tapping A"
|
||||
if python3 "$(dirname "$0")/is_title.py" "$TMP" >/dev/null 2>&1; then
|
||||
echo "TITLE detected at ${SECONDS}s — tapping A"
|
||||
vgamepad tap A 200
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user