- tools/delever_permute.py: one exemplar per RESIDUE text class from the ledger (copies desc, needed asc) prepared as a
single-function TU (delever's rung-A rewrite; other definitions -> prototypes; shared-header includes -> their prototypes;
INCLUDE_ASM and file-scope asm dropped; the build's own CPPFLAGS through cpp -P), the target regenerated from the ROM image in
BOTH forms (--gas for target.o, splat for match_one), permuter_ils with the profile from the NEEDED kinds, a winner banked only
through delever --apply-body + the GTE re-fold. Scratch/winners keyed alias+fn (R48).
- the control (R39/R56, new): every attempt first requires the LEVERED body to be match_one MATCH against the regenerated target,
then records the lever-free body's distance. --calibrate --limit 12: 12 of 12 MATCH; starting distance min 8 / median 78 / max 276.
- delever: ("B","gte-lever") joins REMOVABLE — a direct statement's clobbers reset to its canonical set, a variant-macro use pointed
at the canonical macro whose name comes from the variant definition's SIGNATURE (gte_rt_m -> gte_rtv0tr, not Sony's gte_rt);
462 of 462 gte-lever sites now offered to the ladder, 0 before. gte_consolidate.canonical_match() is the one reader of the
canonical table (R33), direct_rewrite refactored onto it; both selftests green.
- p16_permute.setup(outdir=) + permuter_ils --pd: a scratch dir keyed by the caller, defaults unchanged.
- four harness defects found by running it: the splat listing is not assemblable (R98 in a second place); pycparser rejects
__attribute__ and the permuter then silently permutes nothing; include_asm.h injects a file-scope .include "labels.inc" that
collides with the permuter's own macro.inc; an asm-LABEL clause is not an asm statement (a bare scan ate one and left a headless
K&R body). SETUP row (R21), dictionary row (R87), .gitignore allowlist for the outcomes ledger.
tools/
Everything under tools/ that this project wrote — the extractor, the byte gate, the matching harness, the campaign
machinery, the audits, the Ghidra scripts, the public-flip rewrite package — is licensed under the GNU Affero General
Public License v3.0 (the repository's LICENSE). There are no per-file license headers; this statement covers them.
Third-party pieces under tools/ keep their own licenses and are listed in the top-level THIRD_PARTY.md:
tools/brave-CUE/ (GPL-3.0, vendored source), the pinned submodules tools/maspsx (MIT), tools/decomp-permuter
(MIT), tools/asm-differ (Unlicense) and tools/m2c (GPL-3.0), and the gcc-2.7.2 compiler tarballs under tools/bin/
(GCC, GPL). The Sony SDK directory tools/psyq/ is never part of the repository — it is user-supplied and gitignored.
Where each tool fits and how to run it: docs/SETUP.md ("Tooling inventory"), docs/wave-playbook.md (the matching
procedure) and docs/public-flip-runbook.md (the publication procedure).