Skip to content

chore: clarify IOP stash allocation and transfer contracts - #236

Merged
mateuszklysz merged 2 commits into
lombyte-project:mainfrom
purabshah8:codex/stash-module-20261020
Oct 21, 2026
Merged

mateuszklysz merged 2 commits into
lombyte-project:mainfrom
purabshah8:codex/stash-module-20261020

Conversation

@purabshah8

Copy link
Copy Markdown
Contributor

Before

Stash allocation and transfers were split between storage, world data and a generic resource module. LookupResourceEntry actually returned a stash reservation length, while duplicate table views hid that relationship. Send's two lengths were also easy to confuse: one controls DMA size and the other reserves IOP space.

After

Group the four helpers under storage/stash, give the shared state and table one layout, and rename the count helper to stash_get_reserved_qwords in both callers. Keep its linker symbol, transfer types, expression order, compiler routes and retail preconditions. Add EE layout checks and a module guide with source evidence and research limits. Correct the source-layout note: send submits direct SIF DMA, not stash RPC command 0.

Built on merged #233. No new recovery or native gameplay behavior is claimed.

Verification

  • Full boot byte equality, pinned SHA-256 and symbol-address checks pass.
  • Full overlays pass: 3,001 C functions, 18,736 additional placements and 6,630 level-data objects.
  • All 101 public tests, report/map generation and cleanup checks pass.
  • Five freshly rebuilt objects (1,236 bytes) match retail and the aggregate objects, including relocations.
  • All 20 EE layout checks pass with the verified game compiler profile.

The optional legacy compiler profile remains unset; two unrelated boot units retain their documented oracle fallback. Renamed units reuse unchanged retail reference objects under their new paths. No reference bytes or checker rules changed.

Verification ran on a31e2851a5a91df821d09c889346a8819379a20b. Candidate 4f5578a080351b578c105109e1510eb3ed150bad differs only by the reviewed docs/audio-voices.md trim: all build inputs are byte-identical, so the existing exact-match receipts apply. The branch is based on merge commit 064099d7; it merges cleanly into current main, but the newer compiler-patch rewrite in #235 is not covered by these receipts.

@github-actions

Copy link
Copy Markdown

Decompilation progress

C_EXACT Change Matched bytes Functions C_FUZZY
All code 98.72 % — 3,502,500 / 3,547,932 B (—) 4,218 / 4,244 (—) 98.86 %
Boot executable 98.04 % — 347,548 / 354,504 B (—) 1,222 / 1,230 (—) 99.46 %
Game 98.36 % — 268,988 / 273,476 B (—) 904 / 909 (—) 99.73 %
SDK 96.95 % — 78,560 / 81,028 B (—) 318 / 321 (—) 98.55 %
Level overlays 98.80 % — 3,154,952 / 3,193,428 B (—) 2,996 / 3,014 (—) 98.80 %
Shared level code 97.34 % — 1,100,468 / 1,130,492 B (—) 1,569 / 1,583 (—) 97.34 %
Per-level code 99.59 % — 2,054,484 / 2,062,936 B (—) 1,427 / 1,431 (—) 99.59 %
Data in C Change Matched bytes
All data 43.58 % — 5,418,333 / 12,433,372 B (—)
Boot executable 2.32 % — 16,238 / 699,136 B (—)
Level overlays 46.04 % — 5,402,095 / 11,734,236 B (—)

No function changed its match state compared with main (064099d).

Compared with main (064099d). C_FUZZY uses main's last measurement.

@mateuszklysz mateuszklysz added the enhancement New feature or request label Oct 21, 2026
@mateuszklysz
mateuszklysz merged commit 0d5b2b0 into lombyte-project:main Oct 21, 2026
4 checks passed
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.

2 participants