Files
goldeneye-pc-port/scratch/d318_dis.py
T
James Dansereau cc169874ce D318: port-side watchdog + timeline probe for the Facility ai_22 softlock; D320: D318-class sweep of all level AI scripts; gfx_pc GE_D116 printf format fix
- D318 (RESOLVED): as-authored latent race — gas bit mid-monologue derails
  c78's pre-aim hold into a permanent ACT_ATTACK anim pin
  (actor_fire_or_aim_at_target_update moves only the endframe, never
  re-inits; N64-identical). NOT a port bug. Port-side watchdog
  port/src/d318watchdog.c (hooked in lv.c after g_GlobalTimer += ) detects
  the pinned state and re-inits the attack on confirm; GE_D318T=1 timeline
  diagnostic included. random.c gains an env-gated probe (GE_RANDPROBE) for
  bit-exact PRNG verification. Scratch evidence (dis/seqcmp scripts, addr
  dumps, session handoff) parked per house practice.
- D320 (OPEN): swept every level's AI scripts for the same aim-hold ->
  _update shape: 17 lists in 8 levels. Facility ai_19 and Control ai_9 are
  HIGH (non-self-healing, same as ai_22); Depot ai_12 MED-HIGH (objective
  bit gated behind a stop-check). Bond-combat loops likely safe (sustained
  fire stays inside the shoot window by design; exercised every playtest).
  Classified as-authored latent race(s), faithfully reproduced. Probe-verify
  path + generalize-the-watchdog recommendation documented in findings.md.
- gfx_pc.cpp: GE_D116 debug printf used %f for uint32_t args and %d for
  unsigned tile fields; casts added, build warning-free.

Full ntsc-final configure+compile+link PASS. Accuracy sweep write-up in
docs/dev/ACCURACY-AUDIT-2026-09-20.md (PRNG bit-exact; A1/shift32/wrapv/
PORT-hygiene/Gfx-Vtx/osVirtualToPhysical sweeps all clean or already fixed).
2026-09-19 00:38:14 -04:00

24 lines
867 B
Python

import re, sys
src = open('assets/obseg/setup/UsetuparkZ.c', encoding='utf-8', errors='replace').read()
hdr = open('src/bondaicommands.h', encoding='utf-8', errors='replace').read()
lens = dict(re.findall(r'#define (\w+)_LENGTH (0x[0-9a-f]+)', hdr))
def dis(name):
m = re.search(r'u8 %s\[\] = \{(.*?)\n\};' % name, src, re.S)
body = m.group(1)
off = 0; out=[]
for line in body.splitlines():
line=line.strip().rstrip(',')
if not line: continue
nm = line.split('(')[0].split()[0]
L = lens.get(nm)
if L is None:
out.append(f"{off:5d} ?? {line[:60]}"); continue
L=int(L,16)
out.append(f"{off:5d} +{L:<2d} {line[:70]}")
off+=L
return out, off
for name in sys.argv[1:]:
lines,total = dis(name)
print(f"== {name} (total {total} bytes) ==")
for l in lines: print(l)