Files
BFM-decomp/docs/progress.fleet.md
T
Drew T ec34c31b68 feat(phase-29): T65 — extract_unit definition-detection fixed; func_80156044 137/137 (+10,138 ins)
Item 3, and it banked the third family. extract_unit located a definition with "the line matches
<type> func_<addr>( and does not end in `;`" — wrong whenever ONE LINE holds both a declaration and a
definition, which the handwritten inline-asm wrappers do:

    extern void func_80156044(int, int); int func_80155FF8(int, int) { __asm__ … }

The line does not end in `;`, so func_80156044 — appearing there only in the DECLARATION — was taken
as a definition head. extract_unit lifted the neighbouring WRAPPER instead of the real definition
seven lines below; every sibling already defines that wrapper via its shared DEFINE_ macro, so all
137 failed with `redefinition of func_80155FF8` and it read as a compiler wall.

FIX: ask what follows the PARAMETER LIST, not what ends the line (`_def_head_at`) — `;` is a
declaration, `{` or end-of-line is a definition. Plus the R32 assertion: a unit that defines a
function other than its target cannot template, so refuse LOUDLY (`_foreign_defs`).

TWO TRAPS HIT WHILE WRITING THAT ASSERTION, both caught by regression-checking against families known
to bank: (1) _def_head_at ALONE over-fires — a call whose args wrap has nothing after the `(` on its
line, which "end of line => definition" reads as a definition; it refused THREE families that had
just banked 137/137. (2) The type-prefix test ALONE under-fires — it is what missed the wrapper
originally. The predicate needs both: split the prefix on its last `;`, require the remainder to look
like a return type, then check what follows the parameter list. All five known-banking families
extract byte-identically before and after.

RESULT: func_80156044 0/137 -> 137/137, 0 failed.

GATES: R22 clean-fleet 140 passed, 0 failed of 140; tools-health OK (corpus 0 PHANTOM + 0 TRUNCATED,
cdecl, audit-binaries, dedup 1886/0); 0 NON_MATCHING (G4).

METRICS: instr 86.2% -> 86.3% (11328601 -> 11338739 = +10,138 ins); fn-count 90.84% -> 90.88%
(321335 -> 321472 = +137); distinct-code 76.7% -> 76.9% (67937 -> 68066 = +129).

cookbook §110.
2026-07-28 22:29:56 -06:00

9.1 KiB
Raw Blame History

BFM FLEET matching progress (generated by tools/progress.py --fleet — authoritative)

140 binaries: main + resident + 138 location overlays. DETERMINISTIC,

source-derived (committed src/*.c + config/dedup.us.yaml). Live byte gate: make check-all;

cross-binary collapsible-byte leverage: docs/duplicates.cross.md.

THREE progress metrics (all matter — see the labels):

FLEET fn-count byte-ident: 321472 / 353720 = 90.88% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay) FLEET instr-weighted : 11338739 / 13141652 = 86.3% (shipped .text across main + resident + 138 overlays; the decomp.dev-DISPLAY number) FLEET distinct-code(uniq): 4332063 / 5634875 = 76.9% (68066/87459 unique fns; the DISTINCT-RE number) MAIN game-code weighted : 436 / 60201 = 0.7% (INCLUDED in the fleet numbers above since 2026-07-22 — roadmap §1 metrics contract; LINKED-excluding Ghidra sig dated 2026-06-14; caveat is R34: no independent second oracle for a PS-X EXE, NOT drift) (fleet EXCLUDING main, for continuity with pre-2026-07-22 readings: 11338303 / 13081451 = 86.7%)

FLEET REAL substantive : 319617 (of which dedup-shared 239530 via 1886 groups / 239604 instances) FLEET LINKED PsyQ objs : 959 FLEET NON_MATCHING : 7 (0 in any default build — G4) FLEET INCLUDE_ASM stubs : 32241 FLEET matchable : 353720

binary REAL shared LINKED byte-ident matchable byte-ident %
main 54 2 959 1055 2096 50.3%
resident 129 0 0 131 145 90.3%
ov_SC01_000 2290 1742 0 2290 2403 95.3%
ov_SC01_001 2295 1743 0 2297 2466 93.1%
ov_SC01_004 2285 1734 0 2286 2414 94.7%
ov_SC01_005 2315 1757 0 2315 2503 92.5%
ov_SC01_006 2315 1757 0 2315 2503 92.5%
ov_SC01_008 2285 1734 0 2287 2426 94.3%
ov_SC01_009 2311 1735 0 2312 2507 92.2%
ov_SC01_074 2289 1735 0 2291 2425 94.5%
ov_SC01_077 2467 1702 0 2469 2585 95.5%
ov_SC01_080 2327 1738 0 2327 2512 92.6%
ov_SC01_084 2334 1738 0 2339 2579 90.7%
ov_SC02_000 2387 1773 0 2387 2683 89.0%
ov_SC02_003 2387 1773 0 2387 2683 89.0%
ov_SC02_004 2293 1738 0 2293 2401 95.5%
ov_SC02_005 2401 1734 0 2411 2927 82.4%
ov_SC02_011 2414 1741 0 2425 2893 83.8%
ov_SC02_015 2295 1740 0 2295 2414 95.1%
ov_SC02_016 2329 1740 0 2332 2545 91.6%
ov_SC02_017 2373 1740 0 2381 2732 87.2%
ov_SC02_021 2301 1740 0 2301 2437 94.4%
ov_SC02_026 2316 1738 0 2322 2572 90.3%
ov_SC02_027 2339 1738 0 2348 2692 87.2%
ov_SC02_028 2341 1738 0 2351 2701 87.0%
ov_SC02_031 2327 1739 0 2332 2562 91.0%
ov_SC02_035 2302 1738 0 2305 2520 91.5%
ov_SC02_039 2286 1738 0 2286 2416 94.6%
ov_SC02_041 2324 1738 0 2327 2561 90.9%
ov_SC03_001 2421 1739 0 2438 2869 85.0%
ov_SC03_002 2347 1743 0 2362 2631 89.8%
ov_SC03_003 2296 1738 0 2297 2423 94.8%
ov_SC03_006 2364 1744 0 2373 2767 85.8%
ov_SC03_007 2341 1738 0 2345 2623 89.4%
ov_SC03_010 2304 1738 0 2304 2471 93.2%
ov_SC03_011 2310 1738 0 2316 2527 91.7%
ov_SC03_012 2288 1738 0 2289 2406 95.1%
ov_SC03_013 2309 1738 0 2309 2493 92.6%
ov_SC03_014 2367 1763 0 2367 2685 88.2%
ov_SC03_015 2367 1763 0 2367 2685 88.2%
ov_SC03_023 2295 1738 0 2296 2435 94.3%
ov_SC03_024 2355 1743 0 2362 2641 89.4%
ov_SC03_028 2335 1738 0 2339 2664 87.8%
ov_SC03_029 2337 1740 0 2347 2644 88.8%
ov_SC03_030 2310 1743 0 2312 2495 92.7%
ov_SC03_031 2306 1738 0 2309 2514 91.8%
ov_SC03_089 2323 1738 0 2330 2581 90.3%
ov_SC03_090 2324 1738 0 2332 2625 88.8%
ov_SC03_091 2327 1738 0 2335 2640 88.4%
ov_SC03_092 2337 1738 0 2349 2587 90.8%
ov_SC03_093 2313 1738 0 2317 2563 90.4%
ov_SC03_094 2308 1738 0 2314 2577 89.8%
ov_SC03_095 2298 1738 0 2301 2474 93.0%
ov_SC03_096 2298 1738 0 2301 2465 93.3%
ov_SC03_097 2328 1738 0 2335 2603 89.7%
ov_SC03_098 2306 1738 0 2309 2541 90.9%
ov_SC03_099 2299 1738 0 2302 2504 91.9%
ov_SC03_100 2309 1738 0 2313 2539 91.1%
ov_SC03_101 2309 1738 0 2313 2528 91.5%
ov_SC03_102 2302 1738 0 2305 2492 92.5%
ov_SC03_103 2305 1740 0 2308 2510 92.0%
ov_SC03_104 2331 1738 0 2338 2616 89.4%
ov_SC03_105 2322 1738 0 2329 2597 89.7%
ov_SC03_108 2289 1738 0 2289 2443 93.7%
ov_SC03_109 2293 1738 0 2295 2424 94.7%
ov_SC03_110 2297 1738 0 2297 2468 93.1%
ov_SC03_111 2308 1738 0 2311 2510 92.1%
ov_SC03_112 2304 1740 0 2306 2526 91.3%
ov_SC03_113 2297 1740 0 2300 2468 93.2%
ov_SC03_114 2286 1738 0 2288 2415 94.7%
ov_SC03_115 2303 1738 0 2305 2472 93.2%
ov_SC03_116 2294 1738 0 2297 2438 94.2%
ov_SC03_117 2321 1738 0 2327 2557 91.0%
ov_SC03_118 2367 1762 0 2368 2685 88.2%
ov_SC03_119 2366 1762 0 2367 2685 88.2%
ov_SC03_121 2301 1738 0 2304 2459 93.7%
ov_SC03_124 2379 1734 0 2399 2741 87.5%
ov_SC03_125 2335 1738 0 2347 2588 90.7%
ov_SC03_126 2298 1740 0 2298 2423 94.8%
ov_SC04_000 2314 1742 0 2323 2546 91.2%
ov_SC04_002 2333 1738 0 2337 2636 88.7%
ov_SC04_003 2309 1738 0 2313 2502 92.4%
ov_SC04_004 2318 1738 0 2320 2558 90.7%
ov_SC04_005 2328 1738 0 2334 2612 89.4%
ov_SC04_006 2298 1738 0 2300 2454 93.7%
ov_SC04_007 2322 1738 0 2326 2569 90.5%
ov_SC04_008 2290 1738 0 2290 2415 94.8%
ov_SC04_009 2305 1738 0 2308 2441 94.6%
ov_SC04_010 2295 1738 0 2296 2419 94.9%
ov_SC04_011 2353 1738 0 2359 2803 84.2%
ov_SC04_012 2292 1738 0 2293 2420 94.8%
ov_SC04_015 2357 1739 0 2368 2611 90.7%
ov_SC04_016 2295 1738 0 2297 2440 94.1%
ov_SC04_018 2405 1773 0 2405 2857 84.2%
ov_SC04_019 2411 1773 0 2411 2857 84.4%
ov_SC04_020 2322 1738 0 2334 2567 90.9%
ov_SC04_021 2299 1740 0 2299 2423 94.9%
ov_SC05_000 2296 1742 0 2299 2422 94.9%
ov_SC05_001 2318 1738 0 2323 2574 90.2%
ov_SC05_002 2301 1738 0 2304 2442 94.3%
ov_SC05_003 2298 1738 0 2299 2481 92.7%
ov_SC05_004 2294 1738 0 2296 2464 93.2%
ov_SC05_005 2299 1738 0 2300 2491 92.3%
ov_SC05_006 2292 1738 0 2292 2430 94.3%
ov_SC05_007 2302 1738 0 2307 2482 92.9%
ov_SC05_008 2319 1738 0 2321 2543 91.3%
ov_SC05_009 2298 1738 0 2302 2438 94.4%
ov_SC05_010 2325 1738 0 2329 2588 90.0%
ov_SC05_011 2294 1738 0 2295 2409 95.3%
ov_SC05_017 2401 1735 0 2412 2842 84.9%
ov_SC05_018 2348 1738 0 2361 2673 88.3%
ov_SC05_019 2299 1740 0 2299 2423 94.9%
ov_SC06_000 2363 1747 0 2366 2691 87.9%
ov_SC06_006 2315 1738 0 2316 2511 92.2%
ov_SC06_008 2335 1740 0 2341 2542 92.1%
ov_SC06_010 2315 1738 0 2320 2517 92.2%
ov_SC06_011 2303 1738 0 2307 2468 93.5%
ov_SC06_013 2297 1738 0 2298 2425 94.8%
ov_SC06_014 2303 1738 0 2305 2453 94.0%
ov_SC06_015 2300 1738 0 2300 2421 95.0%
ov_SC06_016 2318 1738 0 2320 2549 91.0%
ov_SC06_018 2327 1740 0 2334 2665 87.6%
ov_SC06_020 2307 1740 0 2308 2518 91.7%
ov_SC06_022 2326 1738 0 2334 2642 88.3%
ov_SC06_024 2336 1738 0 2342 2667 87.8%
ov_SC06_025 2320 1738 0 2325 2572 90.4%
ov_SC06_027 2285 1738 0 2286 2408 94.9%
ov_SC06_029 2346 1738 0 2358 2662 88.6%
ov_SC06_030 2299 1738 0 2299 2456 93.6%
ov_SC06_032 2321 1739 0 2328 2658 87.6%
ov_SC06_033 2323 1739 0 2330 2631 88.6%
ov_SC07_000 2314 1742 0 2316 2521 91.9%
ov_SC07_001 2298 1738 0 2300 2454 93.7%
ov_SC07_002 2326 1738 0 2330 2579 90.3%
ov_SC07_006 2092 1555 0 2172 2456 88.4%
ov_SC07_007 2090 1586 0 2174 2613 83.2%
ov_SC07_008 2283 1738 0 2283 2386 95.7%
ov_SC07_009 2292 1738 0 2294 2430 94.4%
ov_SC07_010 2123 1608 0 2206 2524 87.4%
ov_SC07_011 2090 1585 0 2170 2449 88.6%