Commit Graph

32 Commits

Author SHA1 Message Date
Drew T c3ae8d6da2 T5.1.c2b: lift_types --census: batch main moved (223 groups, 236 defs) 2026-09-30 10:46:02 -06:00
Drew T b0b9c4c465 T5.1.c2b: lift_types --census: batch md moved (297 groups, 359 defs) 2026-09-30 10:37:58 -06:00
Drew T aa70308cf1 src(phase-36): T4 batch tus9 — delever: batch tus9 — 300 files (TUs; 383 drawable) · 1901 bodies: 454 lever-free, 1430 residue, 8 refused · sites removed 2244 / needed 2937 / refused 42 / deferred 9 · replays 522 (0 disagreed) · compiles 5262 in 294 s wall · final 300/300 identical · written 297 files | R22 check-all: 218 passed, 0 failed of 218 | census: THE PHASE'S NUMBER (pins + asm statements, GTE excluded): 34,459 sites in 12,656 bodies (1,909 distinct) · marked !FAKE 32,473 · UNMARKED 1,986 (delever_cycle) 2026-09-09 04:15:14 -06:00
Drew T 35fa116741 feat(phase-32): T4b (10) — main: func_80011380 (192 ins, boot -O0) BANKED byte-identical 143dbb89 via gate_main — the §474 "PROVED C-level floor" falls: a proved TREE wall is not an RTL wall — (D_80074784 * 2 + 1) * 2 - 2 keeps MULT(PLUS(MULT(i,2),1),2) past fold and the expander's distributive law rebuilds the nested multiply (Fable agent)
- pinned since S76/S79 as PROVED (§474: fold-const.c:882 split_tree merges MULT(MULT(i,2),2) in every C spelling; the two escapes
  each cost one instruction — stupid.c adjacency / expand_decl use-brackets); 20 spellings + statement-expression + register
  temp forms measured; the S83 hand pass measured four block-scoped forms at 193/131
- the mechanism (dumps + source): split_tree only decomposes MULT/PLUS/MINUS and never distributes MULT over PLUS, so
  MULT(PLUS(MULT(i,2),1),2) survives fold; expr.c:5368's EXPAND_SUM distributive law returns (plus (mult (mult X 2) 2) 2);
  both_summands (expr.c:5248) + plus_constant cancel the +2 against the -2 into the bare symbol; memory_address -> force_operand
  expands the two expand_mult copy;sll pairs adjacent (expmed.c:2227/2244) with no note or variable, so stupid.c's born+2
  rule 2-colours v1/a0 exactly as the target and expand_binop's late copy_to_mode_reg(sym) gives la $a0 / addu / lbu 0()
- ruled out from source: a hard-reg pin + shift outer form (191, LENGTH-DRIFT — a REG index makes (plus sym reg) a legitimate
  MIPS address so la/addu vanish: the target's la;addu;lbu shape REQUIRES the index to reach memory_address as a MULT rtx),
  COMPOUND_EXPR shield (fold distributes), SAVE_EXPR via ?:, COND shields, builtin pseudo-constants, pin+MULT
- draft .run/P32/t5x/fable/func_80011380.c; report .run/P32/t5x/reports/func_80011380.md; coordinator rtu_match MATCH 192/192
  in src/boot.c (--o0); gate_main slate_11380: BANKED, 143dbb89 BYTE-IDENTICAL; all 15 jal callees + data-symbol counts equal
- main open 3 -> 2 (func_80032A74 pinned NEAR 1; func_80039308 NEAR 4)
2026-09-05 23:21:54 -06:00
Drew T fc644dddb4 feat(decomp): bank 9 main functions, including main itself and the 670-ins giant
BANKED 9 of 28 after bisection, 143dbb89 BYTE-IDENTICAL. Verified from the
SOURCE (every stub gone), not from the gate's own count.

  main            509 ins  the game's entry point
  func_800226C0   670 ins  the largest function in the project
  func_800215F4   465
  func_800623A4    36 · func_80062434 36 · func_8005D410 42
  func_8005D4B8    14 · func_8005D4F0 18 · StopRCnt 13

Reached by iterating the gate and dropping the compile-conflict culprit it
named each round: func_8005E79C, func_8005E3AC, func_8005EAE8, func_8001FC08.
Each of those is a §376/§378 declaration conflict, not a bad body — they go to
the recovery chain, not the bin.

Several were only reachable because of this session's oracle fixes: the 800c3
functions had been recorded as §182/§188 epilogue walls by an oracle modelling
maspsx + as -O1 for a TU the Makefile builds through reorder_passthrough +
as -O2. func_800226C0 came from the §476 finding that a hard-register pin
strips nonzero_bits and reg_n_sets==1.
2026-09-03 17:05:47 -06:00
Drew T d7a9f471b4 refactor(fleet): convert 26 DECOMPILE-NOW verbatim bodies to stubs
Every remaining DECOMPILE-NOW row in config/verbatim_manifest.json that was
still a §265 verbatim __asm__ body: main 13 (incl. `main` itself, 509 ins,
in src/boot.c), md_MAIN_003 11, md_MAIN_020 1, ov_SC06_010 1. They were
byte-identical by construction and completely undecompiled, and no gate or
draw could see them — draw_waves reported only 26 drawable stubs fleet-wide
while 27 more sat locked in this form.

Byte-neutral, verified per binary: main 143dbb89, md_MAIN_003 dd1b32ec,
md_MAIN_020 0990e041, ov_SC06_010 05c2d8c4.

SKIPPED ov_SC03_107:func_8017D878. The manifest marks it DECOMPILE-NOW but
the cookbook's §265 addendum documents it as a DELIBERATE verbatim bank: its
only use in the TU is address-taken, forcing a `void f(void)` declaration
the real body contradicts, and no C spelling reconciles them. Two sources
disagree; the one with the byte evidence wins.

md_MAIN_020 and ov_SC06_010 needed --asm-subdir: both are single-TU overlays
with zero INCLUDE_ASM lines left, so there is no prefix in the binary to
derive from. Spelling confirmed against a sibling overlay's own stubs.
2026-09-03 14:02:09 -06:00
Drew T 9184ab9c8d feat(decomp): main batch-gate batch 0 — 143dbb89 byte-identical 2026-08-30 21:26:52 -06:00
Drew T 96afb09c59 feat(decomp): main lane n02 — 3 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_80012B04
  func_800130D0
  main
2026-08-26 11:29:32 -06:00
Drew T ece1584f40 feat(decomp): main lane m74 — 15 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  DeliverEvent
  FGO_02_OBJ_CC
  FGO_03_OBJ_CC
  OpenEvent
  SetDrawArea
  func_80010A08
  func_800116E0
  func_80011818
  func_80015AD0
  func_80018918
  func_8001C14C
  func_80029C44
  func_8002AB64
  func_80037EA0
  func_80037F3C
2026-08-26 08:39:53 -06:00
Drew T d42cb94484 feat(decomp): main lane m74ab — 8 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_800112C8
  func_80011998
  func_80011CFC
  func_800120DC
  func_80012A60
  func_80012F74
  func_8001534C
  func_8005E188
2026-08-26 08:29:10 -06:00
Drew T df75110f0d feat(decomp): main lane m74aaba — 2 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_80011D54
  func_80012C6C
2026-08-26 08:28:37 -06:00
Drew T 585f4bac3f feat(decomp): main lane m74aaa — 5 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  SYS_OBJ_1B78
  func_80010A98
  func_800119F0
  func_80012ABC
  func_8003819C
2026-08-26 08:28:04 -06:00
Drew T 64c3f0e17a feat(decomp): main lane m74 — 39 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  GetGraphDebug
  GetGraphType
  SYS_OBJ_1964
  SYS_OBJ_1A30
  SYS_OBJ_1AF0
  SYS_OBJ_2F7C
  SetDQA
  SetDQB
  SetData32
  SetVertex1
  SetVertex2
  _96_remove
  _SsSndPlay
  func_8001096C
  func_80010B10
  func_80010D60
  func_80010DE0
  func_80010E14
  func_80010E48
  func_80011220
  func_800112A8
  func_80011320
  func_80011350
  func_80011DF4
  func_8001311C
  func_800191BC
  func_800388E8
  func_80039F14
  func_8003A098
  func_8003A404
  func_8003D424
  func_8005AB58
  func_8005AC24
  func_8005CF08
  func_8005CF18
  func_8005E194
  func_8005F384
  func_80062394
  func_800626C8
2026-08-26 08:26:19 -06:00
Drew T b82a070c49 feat(decomp): main lane m74 — 3 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  DisableEvent
  func_80011EB4
  func_8002F80C
2026-08-26 08:22:33 -06:00
Drew T 2cdbda9268 feat(decomp): main lane m74a — 9 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  CloseEvent
  WaitEvent
  func_80010ED4
  func_80011778
  func_80011A3C
  func_80011ADC
  func_80012D0C
  func_80013028
  func_80041448
2026-08-26 08:09:49 -06:00
Drew T 24c94e82b9 feat(decomp): main lane m74 — 19 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  FlushCache
  InitHeap
  SYS_OBJ_191C
  SYS_OBJ_1C28
  func_80010C7C
  func_800110CC
  func_800118AC
  func_80011928
  func_80011C10
  func_80011C8C
  func_8001B710
  func_80029690
  func_80031D70
  func_80031E94
  func_80031FC8
  func_80034650
  func_800347C8
  func_800348A8
  func_8003916C
2026-08-26 08:03:15 -06:00
Drew T 6a20663df7 feat(decomp): main lane m28bb — 1 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_80010DA0
2026-08-25 10:04:01 -06:00
Drew T 72078c804b feat(decomp): main lane m27bbaa — 1 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_8001125C
2026-08-25 09:43:18 -06:00
Drew T 04da346ec3 feat(decomp): main lane m25ba — 1 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_80010E7C
2026-08-25 08:36:21 -06:00
Drew T 352d0b6c31 feat(decomp): main lane m24ba — 2 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_80011680
  vmNoiseOn
2026-08-25 08:20:29 -06:00
Drew T f3501ee527 feat(decomp): main lane m23 — 3 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_800111BC
  func_80028DBC
  func_800495EC
2026-08-25 07:38:49 -06:00
Drew T eb6048a536 feat(decomp): main lane m21 — 6 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  ApplyMatrix
  FGO_01_OBJ_160
  SetMAC123
  func_80010CEC
  func_80028E44
  func_80052430
2026-08-25 05:58:48 -06:00
Drew T 2f65dea685 feat(decomp): main lane m20 — 8 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  DrawPrim
  DsDataCallback
  DsSyncCallback
  Intpl
  SpuWrite
  __do_global_dtors
  func_80013F98
  func_80028E88
2026-08-25 05:26:57 -06:00
Drew T fd8ae5327f feat(decomp): main lane m19 — 10 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  DpqColorLight
  FGO_02_OBJ_160
  SsUtReverbOff
  StoreImage
  __main
  func_80013FBC
  func_80014564
  func_80028ECC
  func_8002A28C
  func_80062768
2026-08-25 04:59:44 -06:00
Drew T 89373beb95 feat(decomp): main lane m11ab — 10 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  FGO_06_OBJ_64
  LightColor
  OuterProduct0
  VM_NO1_OBJ_1F4
  VM_NO1_OBJ_264
  VM_NO1_OBJ_28C
  VM_NO1_OBJ_4A4
  func_80010AE0
  func_800144D4
  start
2026-08-25 00:55:56 -06:00
Drew T 656aa4f514 feat(decomp): main lane m09b — 16 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  SYS_OBJ_16C
  SYS_OBJ_1A70
  SYS_OBJ_FD8
  SetPriority
  SetRGBfifo
  SetRii
  SquareRoot12
  func_80010BB4
  func_80028304
  func_8002EA10
  func_80047D3C
  func_8005AB00
  func_8005B75C
  gfx2D_BG0_OBJ_1B4
  gfx2D_BG0_OBJ_4A0
  gteMIMefunc
2026-08-24 23:39:41 -06:00
Drew T 0f5c76da81 feat(decomp): main lane m09aa — 4 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  func_80011DA0
  func_80011E84
  func_800273F4
  func_8002D4C8
2026-08-24 23:30:32 -06:00
Drew T 65ef0ebae6 feat(decomp): main lane m08 — 19 banked
One clean whole-EXE rebuild verified the batch (gate_main), and main re-checked
BYTE-IDENTICAL against config/check.us.sha before anything was credited.

  AverageZ4
  SYS_OBJ_1D84
  SetSZfifo4
  SetVertexTri
  VM_NOWON_OBJ_3D4
  func_80011DCC
  func_8001282C
  func_80018450
  func_80018E9C
  func_8001BDA0
  func_8002109C
  func_800234E4
  func_800249F0
  func_80026128
  func_8002D29C
  func_80047E58
  func_800594CC
  func_800596F4
  func_8005ACF0
2026-08-24 22:51:16 -06:00
Drew T e960382de7 feat(phase-31): wave R — 18 main functions banked (EXE 143dbb89 byte-identical) 2026-08-16 20:03:03 -06:00
Drew T df24dc091e feat(phase-31): FIRST 4 MAIN-EXE FUNCTIONS BANKED — main is not blocked, it needs clean-rebuild gating
- func_80013228, func_8001CB00, func_800142C8 (src/800.c) + func_8001099C (src/boot.c, the -O0
  boot module) all byte-gated together: make clean && make extract BINARY=main && make build
  BINARY=main -> 143dbb89f34491258bbc27810d0a12ec8b43a8dd BYTE-IDENTICAL.
- these are the drafts the incremental gate rejected 0/4 last night. The drafts were CORRECT;
  the gate path was wrong. R22's own rationale names this exact trap: psyq_integrate rewrites
  the .ld in place, so an incremental build re-runs it on an already-rewritten script and
  produces a FALSE diff. main cannot be gated incrementally -- it needs make clean first.
- main was 0.5% matched and treated as the project's hardest remaining mass. It is minable.
2026-08-15 03:10:28 -06:00
Drew T 0cda15c6de fix(phase-24): T5c — restore main's clean-rebuild: propagate the Phase-21 PsyQ renames to 62 stub refs
Pre-existing latent breakage (Phase-21 close commit:0292, "+62 PsyQ names"), found during T5b's
R22 fleet verify. A genuinely-clean `make clean` + re-extract + build of `main` failed with
dozens of `can't open asm/nonmatchings/800c3/func_*.s` — clean-rebuild broken since Phase 21,
masked all along by incremental builds reusing stale pre-rename .s/.o (the exact R22 failure mode).

- Root cause (byte-proven): Phase-21 xdedup renamed 62 PsyQ library functions to their proper
  names (InitHeap, FlushCache, GetTPage, SysEnqIntRP, SpuWrite, CdMix, __main …) in
  symbols.us.txt, but never regenerated/renamed the committed src/*.c stub refs that call them by
  the OLD func_<ADDR> name. splat's FRESH regeneration of a stub .c uses the CURATED names (move
  src/800c3.c aside -> splat writes INCLUDE_ASM(InitHeap) + emits InitHeap.s); the committed stubs
  were simply stale.
- Fix: rename all 62 INCLUDE_ASM(func_<ADDR>) -> the curated name across 12 files (800c.c 1,
  800c3.c 22, apicard1/2/4 4/6/2, boot.c 1, libcd1.c 8, libetc.c 6, libgpu.c 3, sgap.c 1,
  snd1.c 7, snd2.c 1). Pure rename to match splat's canonical output; byte-neutral.
- VERIFIED: main clean-builds 143dbb89 from a fully clean tree; full clean fleet check-all 136/136.
- Lesson (cookbook): a symbols.us.txt rename must be propagated to (a) shared-macro bodies
  (engine_core.h — the T5b GetTPage fix) AND (b) INCLUDE_ASM stub refs (this), AND verified by a
  genuinely-clean check-all (make clean + full re-extract), never incremental. Added a lint check.
2026-07-03 02:50:03 -06:00
Drew T 8ffb7f0607 feat(phase-7): -O0 split + 4 matches (42 real) + libcd.h — session B checkpoint
- per-file -O0 mechanism: split text c-subseg into boot@-O0 (src/boot.c) + 800@-O2
  via splat resegmentation + Makefile target-specific CC1FLAGS; the boot/main/
  game-mode-dispatch module (0x80010000-0x800123F0) is -O0, not the pinned -O2
  (per-module compiler mixing, SETUP §5.5). Regression-gated byte-identical.
- 4 byte-matches (38->42 real, make check BYTE-IDENTICAL throughout): GameModeDispatch
  (-O0 register-ptr far member), DebugMenuHandler (-O0 reserved-slot local), CdQueueBusy
  (-O2 if/else order + branch polarity), CdReadRequest (-O2 early-return fall-through)
- PsyQ infra: include/psyq/libcd.h (CdlLOC/CdlFILE from the .gdt) + 4 named symbols
  (CdSearchFile/CdPosToInt/CdIntToPos/VSync) in symbols.us.txt; func_* stubs renamed
- loader cluster non-jtbl COMPLETE (6 matched + 2 drafted): NON_MATCHING drafts of
  LoaderInitFileTable + ResourceLoadStateMachine (logically faithful, residuals in-source)
- tooling: progress.py/difficulty.py fixed for the multi-file split (glob src/*.c, all
  asm dirs, skip forward-decls); deterministic; 42 real / 4 NM
- flywheel: matching-cookbook §6 (-O0 detection + idioms), §7 (PsyQ types/symbols), T4
- build byte-identical 143dbb89f34491258bbc27810d0a12ec8b43a8dd from a full clean cycle
2026-06-14 19:37:05 -06:00