re: the decaying quad is the INCOMING screen -- and (A) and (B) are different shapes
Last iteration left an unidentified full-screen untextured quad decaying 255->15 during a menu->title transition, which build 5's declaration does not account for. Hypothesis: it is the INCOMING screen's own pteff00, which opens at a255 and clears. 8 frames matching build 4's declared 16 units is a FIT, so the test was a transition whose incoming screen declares something else: title->menu brings in build 5, 0->12 = 12 units = 6 frames. Prediction recorded before the run. Measured: menu->title decay 8 frames (incoming build 4, declared 8), title->menu decay 5 frames (incoming build 5, declared 6). Different incoming screen, different decay, in the predicted direction. The second is one frame short of prediction, inside the documented +-1. The tell that clinches it: a screen contributes TWO primitives, pteff00 at 255 and pteff02 at 64. The settled menu's untextured set is [64]; at frame 34 it becomes [64, 255, 64] -- build 4's opening pair, which no single element explains. Bonus, and it closes the alpha puzzle: in capture 2 the outgoing quad ramps with no other untextured quad present -- 63, 127, 191, 255, steps of exactly 64, four frames, against build 4's declared 261->269 = 8 units = 4 frames. Exact and exactly linear. Capture 1's 102/127/255 was a composite of two overlapping quads, as sylpheed-port proposed. The thing neither of us predicted: the two directions are not the same shape. (A) title->menu is SEQUENTIAL with a real black interval of 5 frames (~10 units, against the port's authored 9). (B) menu->title is a CROSS-FADE with no black interval at all -- the incoming title starts drawing at frame 34, before the outgoing menu's quad begins ramping at 40. Authoring one hold for both directions inserts black that (B) does not have. Also fixed: fade_pair.py's automatic rising/decaying classifier worked on capture 1 and produced nonsense on capture 2, where the title has no full-screen primitive at rest and the heuristic latched onto a transient. It now prints and does not decide. Refutation attempted: sylpheed-port's structural prediction of a 6-frame decay for an incoming menu. Measured 5. Survives as direction, one frame short as duration; recorded as both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wuu56cE8vJGTBtn1ppsk8v
This commit is contained in:
@@ -21,7 +21,13 @@
|
||||
# game surface to dismiss before touching the pad.
|
||||
# * a 0.12 s tap gets missed; hold (B) 0.5 s and confirm [RE-INPUT] delivery.
|
||||
#
|
||||
# Usage: fade_decompose.sh [out_dir]
|
||||
# WHERE=menu (default) arms on the main menu and presses (B) -> menu -> title.
|
||||
# WHERE=title arms on the boot title and presses (A) -> title -> menu.
|
||||
# The two transitions have DIFFERENT declared fade-ins for the incoming screen --
|
||||
# build 4 is 0->16 (16 units, 8 frames), build 5 is 0->12 (12 units, 6 frames) --
|
||||
# which is what makes the pair a discriminator rather than a fit.
|
||||
#
|
||||
# Usage: WHERE=title fade_decompose.sh [out_dir]
|
||||
set -u
|
||||
export HOME=/sylph-home/re SDL_AUDIODRIVER=dummy DISPLAY=:98
|
||||
SD="$(cd "$(dirname "$0")" && pwd)"
|
||||
@@ -52,14 +58,22 @@ while [ $SECONDS -lt $deadline ]; do
|
||||
done
|
||||
[ "$s" = "title" ] || { echo "NEVER REACHED THE TITLE"; exit 1; }
|
||||
|
||||
# 2. one (A) on the boot title -> main menu
|
||||
python3 "$SD/pad.py" tap A 0.5
|
||||
for _ in 1 2 3 4 5 6; do
|
||||
sleep 4; s="$(screen)"; echo " after A: $s"
|
||||
[ "$s" = "menu" ] && break
|
||||
done
|
||||
[ "$s" = "menu" ] || { echo "NO MENU (screen=$s)"; exit 2; }
|
||||
shot "$OUT/menu.png"
|
||||
WHERE="${WHERE:-menu}"
|
||||
if [ "$WHERE" = "menu" ]; then
|
||||
# 2. one (A) on the boot title -> main menu; we arm THERE and press (B).
|
||||
python3 "$SD/pad.py" tap A 0.5
|
||||
for _ in 1 2 3 4 5 6; do
|
||||
sleep 4; s="$(screen)"; echo " after A: $s"
|
||||
[ "$s" = "menu" ] && break
|
||||
done
|
||||
[ "$s" = "menu" ] || { echo "NO MENU (screen=$s)"; exit 2; }
|
||||
BTN=B
|
||||
else
|
||||
# arm on the title itself and press (A): the incoming screen is then build 5,
|
||||
# whose declared fade-in is 12 units where build 4's is 16.
|
||||
BTN=A
|
||||
fi
|
||||
shot "$OUT/armed-on-$WHERE.png"
|
||||
|
||||
# 3. arm the capture, dismiss the menu bar F10 opened, then press (B).
|
||||
# Everything between F10 and (B) is spent inside the capture window, so keep
|
||||
@@ -67,10 +81,10 @@ shot "$OUT/menu.png"
|
||||
xdotool windowactivate --sync "$win"; sleep 1
|
||||
xdotool key F10; sleep 0.6
|
||||
xdotool mousemove 900 400 click 1; sleep 0.6
|
||||
echo "-- (B) at $(date +%S.%N) --"
|
||||
python3 "$SD/pad.py" tap B 0.5
|
||||
echo "-- ($BTN) at $(date +%S.%N) --"
|
||||
python3 "$SD/pad.py" tap $BTN 0.5
|
||||
sleep 12
|
||||
shot "$OUT/after-b.png"; echo "screen after B: $(screen)"
|
||||
shot "$OUT/after-press.png"; echo "screen after $BTN: $(screen)"
|
||||
|
||||
grep -c "RE-INPUT" "$OUT/canary.stdout" 2>/dev/null | sed 's/^/[RE-INPUT] lines: /'
|
||||
ls -l "$OUT"/xenia_re_ui_draws_*.log 2>/dev/null || echo "NO CAPTURE LOG"
|
||||
|
||||
61
tools/re-capture/fade_pair.py
Executable file
61
tools/re-capture/fade_pair.py
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Per-frame full-screen UNTEXTURED quads across a screen change.
|
||||
|
||||
The `.prm` primitives are the transition machinery: one RISES to 255 (the
|
||||
outgoing screen going black), one DECAYS from 255 (the incoming screen's own
|
||||
fade-in), and a screen's constant primitive sits at a fixed alpha throughout.
|
||||
This prints them per frame, with draw counts, so the spans can be checked against
|
||||
durations the FILE declares.
|
||||
|
||||
fade_pair.py <capture.log> [--from N] [--to N]
|
||||
|
||||
⚠️ An earlier version of this tool tried to CLASSIFY the quads into rising and
|
||||
decaying series automatically, by picking the constant series as "whatever value
|
||||
appears on a frame with one quad". That worked on a menu->title capture and
|
||||
produced nonsense on a title->menu one, where the title has no full-screen
|
||||
primitive at rest and the heuristic latched onto a transient. The classification
|
||||
is now left to the reader: the tool prints, it does not decide.
|
||||
"""
|
||||
import re
|
||||
import sys
|
||||
|
||||
V = re.compile(r"col=([0-9A-F]{8})")
|
||||
|
||||
|
||||
def main():
|
||||
a = sys.argv
|
||||
lo = int(a[a.index("--from") + 1]) if "--from" in a else 0
|
||||
hi = int(a[a.index("--to") + 1]) if "--to" in a else 10 ** 9
|
||||
frame, pend = None, None
|
||||
untex, tex, nd, nt = {}, {}, {}, {}
|
||||
for line in open(a[1]):
|
||||
if line.startswith("--- frame"):
|
||||
frame = int(line.split()[2])
|
||||
untex.setdefault(frame, []); tex.setdefault(frame, [])
|
||||
nd[frame] = nt[frame] = 0
|
||||
continue
|
||||
if frame is None:
|
||||
continue
|
||||
m = re.match(r"\s*(\d+) prim=(\d+)", line)
|
||||
if m:
|
||||
nd[frame] += 1
|
||||
if "tex[base=" in line:
|
||||
nt[frame] += 1
|
||||
pend = ("tex" if "tex[base=" in line else "untex") if m.group(2) == "13" else None
|
||||
continue
|
||||
if "vb=0x" in line and pend:
|
||||
c = V.findall(line)
|
||||
if c and pend == "untex" and "[-1.00,1.00," in line:
|
||||
untex[frame] += [int(x[:2], 16) for x in c[::4]]
|
||||
elif c and pend == "tex":
|
||||
tex[frame] += [int(x[:2], 16) for x in c[::4]]
|
||||
pend = None
|
||||
print("frame untextured full-screen textured (distinct) draws tex")
|
||||
for f in sorted(untex):
|
||||
if lo <= f <= hi:
|
||||
print(f"{f:5d} {str(untex[f]):22s} {str(sorted(set(tex[f]))):26s} {nd[f]:4d} {nt[f]:3d}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user