Skip to content

feat(overlays): exact-match Gaspar and Rilgar functions - #67

Merged
Lynder063 merged 4 commits into
OpenRAC:mainfrom
cblackler19:codex-exact-matches-oct14
Oct 14, 2026
Merged

Lynder063 merged 4 commits into
OpenRAC:mainfrom
cblackler19:codex-exact-matches-oct14

Conversation

@cblackler19

Copy link
Copy Markdown
Contributor

Summary

Adds two EXACT function matches in the Gaspar and Rilgar overlays, contributing 856 bytes of newly matched code. Both implementations reproduce the retail instructions byte-for-byte using the project's original SN Systems GCC 2.95.3 toolchain.

Matched functions

Function Overlay Matched size Result
func_L09_00306DD8 Gaspar (L09) 488 bytes EXACT
func_L05_00317B68 Rilgar (L05) 368 bytes EXACT
Total 856 bytes

func_L09_00306DD8 — Gaspar

  • Adds a C implementation that matches all 488 bytes of the original function.
  • Corrects the argument typing for a variadic floating-point logging call to reproduce the original calling convention and generated instructions.

func_L05_00317B68 — Rilgar

  • Adds a C implementation of the rotor-related function that matches all 368 bytes of the original.
  • Preserves the compiler's expected global-addressing and instruction generation by keeping the implementation in the appropriate translation-unit context.

Verification

  • Compiled with the project's SN Systems GCC 2.95.3 toolchain and standard matching configuration.
  • Verified both functions against the retail overlay with the project's byte-level matching tooling.
  • Both functions are EXACT: no differing bytes or unmatched instructions.
  • The decompilation progress report is updated in its own commit.

Progress

After these matches, the progress report records:

Metric Matched Total Progress
Functions 4,365 5,109 85.44%
Code bytes 3,016,368 3,712,808 81.24%

Commits

  • 815fab76 — feat(overlays): func_L09_00306DD8 exact match
  • 7aceaf75 — feat(overlays): func_L05_00317B68 exact match
  • 3af68fae — docs: update decompilation progress report

Assisted by GPT-6.

cblackler19 and others added 3 commits October 14, 2026 21:11
Use the variadic hit logger with the original float-to-double conversion; describe sweep state with typed fields.

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
Compile the rotor update in its own translation unit so its full-address pool load is preserved alongside small-data declarations in the neighboring file. Keep the existing compiler flags.

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
Regenerate once after final Linux build and strict overlay verification. Add two exact functions totaling 856 bytes; validate freshness, statistics, and objdiff schema.

Co-Authored-By: Codex (GPT-6) <noreply@openai.com>
@decomp-dev

decomp-dev Bot commented Oct 14, 2026

Copy link
Copy Markdown

Report for SCES_509.16 (9498e87 - 3af68fa)

📈 Matched code: 81.24% (+0.02%, +856 bytes)

✅ 5 new matches
Unit Item Bytes Before After
Level 05: Rilgar func_L05_00317B68 +368 0.00% 100.00%
Shared level code func_L03_002E9AF8 +276 100.00% 100.00%
Shared level code func_L15_002E5770 +148 100.00% 100.00%
Level 09: Gaspar func_L09_00306DD8 +7 98.57% 100.00%
Shared level code func_L02_002DB810 -20 100.00% 100.00%
🥀 4 broken matches
Unit Item Bytes Before After
Shared level code func_L11_0030A8C8 -756 100.00% 0.00%
Shared level code func_L08_00211A38 -748 100.00% 0.00%
Shared level code func_L00_0029AFB8 -544 100.00% 0.00%
Shared level code func_L03_002E99F0 -36 100.00% 0.00%

@Lynder063
Lynder063 merged commit e1ee2ee into OpenRAC:main Oct 14, 2026
1 check passed
@cblackler19
cblackler19 deleted the codex-exact-matches-oct14 branch October 14, 2026 12:12
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