Skip to content

decomp: name libmpeg and SDK fields, define the Hoven colour tables - #282

Merged
nickyyOO merged 5 commits into
mainfrom
decomp/name-mpeg-sdk-fields
Nov 21, 2026
Merged

nickyyOO merged 5 commits into
mainfrom
decomp/name-mpeg-sdk-fields

Conversation

@nickyyOO

@nickyyOO nickyyOO commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Before

899 placeholder names (unkXXX), most of them in libmpeg. The Hoven scrolling colour tables, their pointer table and their counts were unsized externs in asm.

After

617 placeholder names are left.

  • libmpeg: the PES and pack header fields take their names from the MPEG-2 system syntax (stream id, packet length, PTS/DTS, SCR). The motion vector predictors are PMV[r][s][t], and dual-prime vectors are dmvector. Decoder fields are named by the code that uses them: image buffer, temporal reference, IPU bit window, the colour conversion switch. FinishMpegReferenceImage now reads the decoder struct, and its wrong comment is gone.
  • SDK: pad2 port fields, the dbc receive buffer, sceSifInitRpc / SIF command fields (ps2sdk names), the SetSyscall table, mcNameParam table, fp-bit sub() work areas.
  • Game: menu head/pack gadget locks, draw config GIF paging flags, texture upload CLUT format, moby animation bounding sphere, debug menu single-step fields, grind rail camera position spring.
  • Data: Hoven (level 12) scrolling colour tables, their pointer table and counts. The sizes come from the scale_rgba_tables count (5) and the per-table counts.

What is left has no reader, has a size no code proves, or is read by several units with no proven owner. Examples: baked vertex colours in level data, zero buffers next to _gp, the per-level item_defs copies.

Verification

  • make elf ends with PASS: reconstructed boot ELF matches retail
  • make overlays ends with PASS (clean overlay rebuild after the header renames)
  • scripts/check-cleanup.py: no new problems
  • mpeg, menu and other layout checks compile

@nickyyOO nickyyOO added the enhancement New feature or request label Nov 21, 2026 — with Claude
@github-actions

Copy link
Copy Markdown

Decompilation progress

C_EXACT Change Matched bytes Functions C_FUZZY
All code 100.00 % — 3,547,932 / 3,547,932 B (—) 4,244 / 4,244 (—) 100.00 %
Boot executable 100.00 % — 354,504 / 354,504 B (—) 1,230 / 1,230 (—) 100.00 %
Game 100.00 % — 264,872 / 264,872 B (—) 850 / 850 (—) 100.00 %
SDK 100.00 % — 89,632 / 89,632 B (—) 380 / 380 (—) 100.00 %
Level overlays 100.00 % — 3,193,428 / 3,193,428 B (—) 3,014 / 3,014 (—) 100.00 %
Shared level code 100.00 % — 1,130,492 / 1,130,492 B (—) 1,583 / 1,583 (—) 100.00 %
Per-level code 100.00 % — 2,062,936 / 2,062,936 B (—) 1,431 / 1,431 (—) 100.00 %
Data in C Change Matched bytes
All data 77.19 % +0.01 pp 9,597,496 / 12,433,372 B (+1,392 B)
Boot executable 38.55 % — 269,525 / 699,136 B (—)
Level overlays 79.49 % +0.01 pp 9,327,971 / 11,734,236 B (+1,392 B)

No function changed its match state compared with main (4974c24).

Compared with main (4974c24). C_FUZZY uses main's last measurement.

@nickyyOO
nickyyOO merged commit 1901ffd into main Nov 21, 2026
4 of 5 checks passed
@nickyyOO
nickyyOO deleted the decomp/name-mpeg-sdk-fields branch November 21, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant