Repository navigation
Match 165 PAL functions - #96
Shaar-games wants to merge 45 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ByteMatch progress reportSCES_532.85
✅ Newly matched (183)
SCUS_974.65
No function changes. Commit a6c59dd · Ratchet: Deadlocked on ByteMatch |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 361872b7d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| row = native_row(name, path, built, table) | ||
| if row[2] not in ("match", "other"): | ||
| raise ValueError("native bytes or object definition differ: %s" % name) | ||
| replacements[name] = serialize_row(row) |
There was a problem hiding this comment.
Preserve frontbin placements when updating native US rows
For an existing native US menu source such as src/game/00406838.c, this replaces its two-placement baseline row with the single canonical placement returned by native_row(). The existing frontbin:.text:004065B8:16 match disappears even when the compiled bytes are unchanged. Unlike the full writer, which explicitly records the second link, this path consequently removes that function's verified extent from inventory.proven_extents('frontbin'). Revalidate secondary placements, or reject rows requiring the full workflow, rather than silently discarding them.
Useful? React with 👍 / 👎.
Adds 165 matching PAL functions (+26,488 code bytes). Shared source helpers retain one owner for each marker; matching grouped functions use their genuine function sections at their retail addresses.
Matching functions
func_0012C680func_0014DE80func_004A3180func_004A3968func_004A3B38func_004B0398func_004C09B0func_004C1E20func_004C3010func_004CFDB8func_004CFE50func_004D2D48func_004F4BE0func_00501A90func_00505C28func_00505E00func_005064A8func_00506978func_0050AAC8func_0050AC20func_0050AD58func_0050B488func_0050BB78func_0050C250func_0054B628func_L00_00520988func_L00_00521390func_L00_00541ED8func_L00_0059A318func_L00_005ABA00func_L00_00621DECfunc_L00_0062D8B0func_L00_00641BE8func_L00_00641C08func_L00_0065A198func_L00_0065D090func_L00_0069F6B8func_L00_0069F7B8func_L00_0069F870func_L00_0069F928func_L00_0069F9D0func_L00_0069FA78func_L00_0069FB20func_L00_0069FC18func_L00_0069FD10func_L00_0069FE88func_L00_0069FF88func_L00_006A0070func_L00_006A0168func_L00_006A0250func_L00_006A0340func_L00_006A0428func_L00_006A0520func_L00_006A0618func_L00_006A0710func_L00_006A0AF8func_L00_006A0BE8func_L00_006A0CD0func_L00_006A0DB8func_L00_006A0EA0func_L00_006A10A0func_L00_006A1230func_L00_006A1328func_L00_006A1898func_L00_006A1960func_L00_006A2048func_L00_006A2108func_L00_006A21F8func_L00_006A22C0func_L00_006A3750func_L00_006A3840func_L00_006A3C40func_L00_006A4060func_L00_006A4188func_L00_006A4370func_L00_006A4488func_L00_006A4598func_L00_006A47D0func_L00_006A49D0func_L00_006A4AF8func_L00_006A4C98func_L00_006A4E10func_L00_006A4EF8func_L00_006A5008func_L00_006A5298func_L00_006A5700func_L00_006A5858func_L00_006A5990func_L00_006A60C0func_L00_006A6230func_L00_006A67B0func_L00_006A6B00func_L00_006A6E88func_L00_006A7390func_L00_006A75B8func_L00_006A7720func_L00_0070F328func_L00_007139B0func_L00_00725A48func_L00_007292F8func_L00_00761C88func_L00_00776DE8func_L00_00783270func_L00_007834D0func_L01_003C9D50func_L01_003CB420func_L01_003CC998func_L01_004133F0func_L01_00435C00func_L01_004909D8func_L01_00494EE0func_L01_00498F80func_L01_004AFF80func_L01_004C0048func_L01_004FC530func_L02_004CCE90func_L04_004A0DD0func_L04_004A20B0func_L05_004663D8func_L05_004942B8func_L05_004E17E0func_L08_004CE858func_L10_004D5E10func_L15_00499000func_L15_004A2140func_L15_004D8970func_L15_00502480func_L41_003E3480func_L41_00412548func_L41_00446E50func_L41_00447490func_L41_00449C08func_L41_00449D88func_L41_0044DA48func_00159718func_01EE98D8func_L00_005AC338func_L00_006212B0func_L00_006213D8func_L00_00621410func_L00_0068B1F8func_L00_007145E0func_L01_00453E78func_L01_00453EB0func_L01_00576370func_L01_005763B8func_L01_00589E38func_L01_00594170func_L01_00599FA8func_L02_0049EA00func_L02_004C7578func_L02_004CDEE0func_L02_004E5C18func_L05_0048A078func_L05_00494310func_L05_004E1C30func_L01_005A3798func_L01_005A3878func_01EF0604func_01F088BCfunc_L01_0049AA70func_L02_004CCEA0func_L02_005056F8func_L05_004C3820func_L05_003E2AD0Source integration
The table lookup and insertion routines share their marker in one translation unit. Shared headers avoid repeating the eight-slot and three-slot probe/insertion bodies. Object dispatch and bounds helpers likewise share their proved views and lookup contracts. Both functions and the complete allocated data are independently linked and compared; relocation-masked equality alone is not accepted. The newly added PAL rows describe their canonical selected program placement; equivalent catalogue copies in other overlays are not claimed as separately linked C builds.
Existing callers now agree with the reconstructed callee declarations, including explicit raw-address conversions, the status/output-buffer contract, and the release-wrapper pointer argument. These declaration corrections retain their complete executable code and allocated data. Shared record headers expose only proved fields while retaining the existing opaque regions and layout. The request routine shares its existing context owner; all eight profile consumers and the separate dialog caller now use the same checked contracts. Their complete existing code/data and relocations are preserved; only the new routine adds coverage. An existing PAL method also now uses the correct scalar global declaration: its former array declaration produced 28 linked byte differences; the corrected complete 100-byte function passes strict verification. This does not add another matched-map row. The RAC3-derived allocation wrapper identifies its original donor file, function and pinned upstream commit in the source comment. THIRD_PARTY_NOTICES.md is unchanged.
Why the Python tools change
The original readers assumed every function belonged to
.text. With-ffunction-sections,.textmay be empty and several executable sections may each contain a function at offset zero. That assumption loses functions or applies another section's relocations.tools/elf_layout.pyresolves symbols throughst_shndx, checks section bounds and keeps relocation ownership distinct. It supports section-relative relocatable objects and linked virtual addresses.match_map.py --update-nativechecks selected native source files while preserving unrelated baseline rows, including USotherrows for PAL-only sources. It rejects duplicate/moved definitions and mismatches.bash.docs/WORKFLOW.mddocuments the generic metadata command with placeholder paths.The standalone solver, agent orchestration, benchmarks and private workflow are outside this PR.
Validation
The November 5 continuation adds 22 PAL functions from its frozen 50-target cohort (1,020 further code bytes). The last two overlay routines were rebuilt independently with strict native/stock object equality, no byte differences after linking and both PAL/US map-progress checks passing. No additional public support code was required for those two. The standalone full build is presently blocked on Windows by CRLF parsing in the existing
tools/cc.sh(pipefail\r); per-function independent proofs remain complete.The latest frozen 50-function PAL cohort is complete: 30 isolated strict matches; 20 have been integrated and published in its lifetime (1,100 canonical PAL code bytes). This commit adds two 28-byte L01 wrappers, returning the observed 64-bit caller result after forwarding the original 128-bit value. Both pass native/stock object identity and full linked checks, with no allocated data. Ten other isolated matches remain withheld pending shared overlay data ownership; remaining failures keep their retained evidence.
The November 5, 14:00 PAL cohort completed 50/50 solver evaluations: 44 compiled, 25 passed isolated strict linking (1,524 bytes). This integration adds 7 newly reviewed, canonical PAL functions (336 bytes). All 7 were rebuilt from final source paths with warning-free native/stock shell object equality, complete linked code/data checks, and refreshed PAL/US maps and progress checks. Existing libm ownership blocked one otherwise isolated strict candidate, and shared-overlay data ownership blocked three; neither was published. No public support code was needed for this batch.