Files
goldeneye-pc-port/scratch/d318r_cmp.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

38 lines
1006 B
Python

import bisect, sys
syms = []
for line in open("scratch/syms.txt"):
p = line.split()
if len(p) >= 2:
try:
syms.append((int(p[0], 16), p[1]))
except ValueError:
pass
syms.sort()
keys = [s[0] for s in syms]
def resolve(ra):
a = int(ra, 16)
i = bisect.bisect_right(keys, a) - 1
if i < 0:
return "??"
b, n = syms[i]
return "%s+%x" % (n, a - b)
def counts(p):
d = {}
for line in open(p):
q = line.split()
if len(q) >= 2:
d[resolve(q[1].replace("ra=", ""))] = int(q[0])
return d
a = counts("scratch/d318r_addrs1.txt")
b = counts("scratch/d318r_addrs2.txt")
allk = sorted(set(a) | set(b), key=lambda k: -(a.get(k, 0) + b.get(k, 0)))
print("%-45s %5s %5s" % ("caller", "run1", "run2"))
for k in allk[:18]:
mark = " <== DIFFERS" if a.get(k, 0) != b.get(k, 0) else ""
print("%-45s %5d %5d%s" % (k, a.get(k, 0), b.get(k, 0), mark))
print("total draws:", sum(a.values()), sum(b.values()))