Reads a PE without running it: finds where the code loads a model hash (default Lucia's player model 0xE472B687 and
cs_mandy 0xD7C0CDFF), takes the direct calls right after, and ranks those targets by how many hashes lead to them and
how many direct callers the whole image has. first_look.ps1 writes hash_lookup.json, so the day-one report already
names the RVA for gta6rt --archetype-lookup (docs/modding.md). A packed or encrypted file is refused with that
reason. tests/test_find_hash_lookup.py runs it on synthetic PE images.
test_first_look_shim_report copies every tool first_look.ps1 runs (it had failed since gdk_runtime_calls.py joined
the script in round 43).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
code_hooks.h hooks a function of the mapped game image without patching it: every direct call/jmp rel32 to it in the
image's executable sections is pointed at a thunk that saves rcx/rdx/r8/r9 and xmm0-3, passes the hash (argument 0
or 1) through leonida::mods::active().remap() and jumps on to the original. gta6rt installs it right after mapping,
before any image code runs, and logs how many call sites it redirected, so a --dry-run with a candidate RVA tells
whether it is the archetype lookup. ctest code_hooks runs the thunk on x64 functions written into memory (call and
tail jump remapped, r8 preserved, a branch elsewhere left byte for byte). With the executable's lookup RVA this
applies mods/mandy_prison_intro; docs/modding.md says how to find it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts were both-sides additions: docs/design.md (main's DPP, EXEC and
saveexec row updates kept; this branch's Control flow row kept) and
tools/rdna2spirv.py (main's _out_inside_input and --opt kept next to
_depth_arg and --max-structured-depth).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict in docs/design.md: main moved the "Output modifiers on hardware
(gfx1150)" row to just before "Wave64 handling" and left the Wave64 row
unchanged; kept main's layout and re-applied this branch's FSPX paragraph
and fallback-sentence change to the Wave64 row. tools/rdna2spirv.py merged
cleanly; main did not change the wave-size decision in translate().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wavehs's review: on main every numeric offset:N is refused; only #4177
narrows that to 0xC000-0xFFFF. The game's 105,529 swizzles all print in a
symbolic form, so neither rule touches them. Also names the method (printed
encodings, the 1,473 listings with data words included) and that the FSPX
programs have none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RDNA2 treats offsets 0xC000-0xFFFF as a separate mode (#4177) and the
translator refuses them. Counted over the 1.0.2.1 package's 26,503 DXBC
listings and the FidelityFX DLL's 29 FSPX programs: 105,529 ds_swizzle_b32
in 6,296 programs, 17 distinct offsets, none at or above 0xC000. So the
refusal costs no game shader and a note is enough.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The row said the LDS float adder's denormal and NaN behaviour was unmeasured. 49 cases on gfx1100 now show it
flushes denormal inputs and denormal results to zero, so the OpFAdd the translator loops on keeps values the
hardware drops; NaN is quieted with its payload and sign kept, DATA wins when both operands are NaN, and
inf + -inf gives 0xffc00000. The returning form gives the raw pre-op dword.
vk_compute_test.cpp: keep both includes (vk_validation.h from this branch,
cs_wave_probe_spv.h from main).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
85 cases on gfx1100 match the class bit of each operand word for all ten classes in both widths, taken
against the operand's own bit, all ten bits, none and the nine others, plus both narrowing forms on the
launched lane.