Skip to content

feat(src): match shared steering update and repair retained large functions - #391

Merged
Lynder063 merged 1 commit into
masterfrom
match/large-state-and-hud
Nov 2, 2026
Merged

Lynder063 merged 1 commit into
masterfrom
match/large-state-and-hud

Conversation

@llesieur99

Copy link
Copy Markdown
Collaborator

What

Match func_L04_003FA7E0, the shared steering and impact-effect update: 4,516
distinct USA code bytes
, placed in Barlow and Joba in both USA v1.01 and v2.00.
PAL has no row with this canonical identity.

The current compiler already produces the normal aligned 0x50-byte template copy.
Restoring the helpers' real float, integer and pointer return declarations closes
the remaining camera-store/call scheduling difference. The return contracts were
checked against consuming callers and deliberate return sequences in retail. The
implementation uses canonical external names and the existing per-file profile;
no compiler patch, register pin, synthetic dependency or ad-hoc assembly is added.

The full investigation covered 16 large functions / 68,664 retail bytes. The
other 15 remain nonmatching; they add no matching or functional credit. Retain
their useful corrections and reopening conditions in the existing source/index:

  • Restore missing collision arguments, software-double and other return types,
    64-bit render/style parameters, and the loader's heap-pointer contract.
  • Reconstruct the waypoint pair's 64-bit sentinel and the actual reset field.
  • Give the collision request its complete 40-byte footprint, sharing its tail with
    the later direction vector as retail does. Keep the real three-quadword matrix
    extents. The unexplained request scalar is not filled with an invented value.
  • Remove fourteen unreferenced declarations that only changed stack or pseudo
    numbering. Preserve unsigned alpha packing and the measured camera-route layout.
  • Record failed loop/address controls without promoting equal sizes or using fake
    rounding barriers. The final countdown loop in func_L00_003C9978 exists in
    retail; it is preserved, not mistaken for dummy code.

The promoted function replaces its marker and old nonmatching copy. No catalogue,
compiler, shared-header, functional-manifest or progress-report changes are included.
All private disassembly, objects and trial evidence remain outside the repository.

Checked

Validation:

  • tools/check.py: the new C matches all four carrying USA placements; PAL identity absent.
  • tools/build.py all --strict --version us: 28 programs OK, zero C fallbacks.
  • tools/build.py all --strict --version us2: 28 programs OK, zero C fallbacks.
  • tools/build.py all --strict --version pal: 28 programs OK, zero C fallbacks.
  • python3 -m unittest discover -s tests: 339 tests passed.
  • tests/check_repository.py and tools/progress.py --check for all three releases passed.
  • All 7,568 qualified production-input hashes agree with the host checkout; LF/diff checks passed.
  • No native gameplay test or functional capture replay was run; reports were not regenerated.

All 384 applicable candidate placements were checked across the three releases:
four complete placements match, and the remaining 380 do not. Missing canonical
identities do not imply the absence of related gameplay code in another release.

No native gameplay test or functional capture replay was run. Strict production
builds do not qualify the code retained in nonmatching/.

This PR is ready for maintainer review and is intentionally left open.

…airs

Promote func_L04_003FA7E0 from its retained reconstruction: 4,516 distinct USA
bytes, with two placements in each USA release. The current quadword block-move
support reproduces the template assignment. Correct helper return contracts
resolve the remaining camera-store/call scheduling difference. Canonical names,
the real buffers and the existing compiler profile are retained.

The sixteen-function investigation also repairs the retained caller contracts,
the waypoint pair's 64-bit sentinel/reset, complete collision-request storage,
unsigned alpha packing and camera-route layout. Remove fourteen dummy local
declarations instead of using them to influence stack or pseudo numbering.

Keep fifteen unmatched reconstructions and their negative results in the existing
nonmatching index and compiler/blocker notes. Equal size, local corrections and
allocation experiments receive no matching or functional credit. The old
nonmatching copy of the promoted function is retired.

No compiler, catalogue, shared-header, functional-manifest or progress-report
change is included. Game data, generated evidence and trial outputs stay private.

Validation:
- tools/check.py: the new C matches all four carrying USA placements; PAL identity absent.
- tools/build.py all --strict --version us: 28 programs OK, zero C fallbacks.
- tools/build.py all --strict --version us2: 28 programs OK, zero C fallbacks.
- tools/build.py all --strict --version pal: 28 programs OK, zero C fallbacks.
- python3 -m unittest discover -s tests: 339 tests passed.
- tests/check_repository.py and tools/progress.py --check for all three releases passed.
- All 7,568 qualified production-input hashes agree with the host checkout; LF/diff checks passed.
- No native gameplay test or functional capture replay was run; reports were not regenerated.
@bytematchdev

bytematchdev Bot commented Nov 2, 2026

Copy link
Copy Markdown

ByteMatch progress report

SCES_516.07

Code matched 54.15% · 3.09 MB of 5.70 MB
Fuzzy match 54.15%
Functions 6,996 / 8,672
Data matched 0.00%
Units complete 958 / 1,196

No function changes.

SCUS_972.68_v2

Code matched 81.01% · 4.52 MB of 5.58 MB
Fuzzy match 81.01%
Functions 7,595 / 8,634
Data matched 0.00%
Units complete 973 / 1,156

No function changes.

SCUS_972.68

Code matched 84.74% · 4.68 MB of 5.53 MB
Fuzzy match 84.74%
Functions 7,760 / 8,579
Data matched 0.00%
Units complete 924 / 1,018

No function changes.

Commit 364ccfe · Ratchet & Clank: Going Commando on ByteMatch

@Lynder063
Lynder063 merged commit fe9a713 into master Nov 2, 2026
2 checks passed
Veradictus added a commit to DrLegitamate/rac2-decomp that referenced this pull request Nov 3, 2026
…o HUD rows

func_002859C8 declared func_0028E640 and func_0027C878 as returning int and
passed their results to func_0028F410 and func_0027FC70 as int, but both
build a 64-bit GS TEX0 word (dsll32/ld) that the callee keeps whole: on the
host the high half was lost. func_0027FAA8 returns int. func_0034B2C8
declared the formatter func_00115DA8 with fixed arguments; it is variadic.
Prototypes as llesieur99's OpenRAC#391 found them in the near-miss drafts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants