Skip to content

feat(src): func_L11_00451178 and func_L02_003FE768 in C; Joba state-machine findings - #419

Open
DrLegitamate wants to merge 8 commits into
OpenRAC:masterfrom
DrLegitamate:match/drlegitamate-joba-trio
Open

DrLegitamate wants to merge 8 commits into
OpenRAC:masterfrom
DrLegitamate:match/drlegitamate-joba-trio

Conversation

@DrLegitamate

@DrLegitamate DrLegitamate commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Two functions in matching C, plus retained Joba state-machine findings:

  • func_L11_00451178: the 4,824-byte Joba sentry, in its own -G8 -frac2-gcse-unsplit-edges unit. Particle-template lifetime, the case-12 pointer order and an inline movement helper recover the spill/scheduling layout. Review also restores func_002B1C20's actual unsigned 64-bit return; an equivalent early exit in case 11 preserves the call order and avoids the compound condition's redundant 32-bit normalization.
  • func_L02_003FE768: the 332-byte shared boss bar. Nonempty one-pass groups contain its real rounded-coordinate conversions, following the documented RAC1 source method.
  • func_L11_00453358 remains in nonmatching/. Its four ignored helper returns now follow the matched definitions. The retained diagnostic is locally exact in both USA releases, but its case-9 dead store still prevents promotion. It adds no matching credit.
  • Retain the func_L11_00444400 investigation and compiler findings in the existing notes. Remove the promoted sentry's obsolete functional registration and duplicate functional draft.

Integrates current master (673ce0bf), resolving both merge conflicts while preserving upstream changes. Adds 2 distinct functions, 5,156 distinct USA code bytes, across 7 carrying placements (6,816 bytes). The root README and progress reports are unchanged from that master.

Checked

  • python3 tools/build.py all --strict --version us --jobs 4: 28 programs OK, no C fallbacks.
  • The same command for --version pal and --version us2: 28 programs OK each, no C fallbacks; 84 total.
  • Independently reread all 84 linked ELF load segments against their retail references and checked every placed.json: zero fallbacks, all 7 intended C placements present, held drone absent. Maktar/Joba loaded-byte comparisons: USA 2,227,096 / 2,363,208; PAL 2,253,248 / 2,391,680; USA v2.00 2,233,232 / 2,369,856.
  • tools/check.py func_L11_00451178: 1/1 USA v1.01; its canonical identity is absent from PAL and USA v2.00. tools/check.py func_L02_003FE768: 2/2 in each release.
  • python3 -m unittest discover -s tests: 383 tests OK. python3 tests/check_repository.py: passed, 314 functional registrations. tools/progress.py --check passes for all three releases.
  • All 7,826 production source/build inputs agree between the frozen build runtime, working tree and staged Git blobs. Reviewed all 59 declared helper interfaces of the promoted functions, including the retail-only routines and stack buffer extents.

The retained drone's updated G8 candidate passes 1/1 local placement checks in each USA release; that is separate from the final linked C qualification above. No native-port or gameplay test was run. No compiler/assembler change or progress regeneration.

DrLegitamate and others added 7 commits November 4, 2026 20:18
func_L11_00453358's retained draft is now a complete compilable unit:
4524/4524 bytes, 1131/1131 instructions, only four spill slots differ.
A scratch cc1 with a forced expression-hash size makes it 1 of 1 at
S 539-543 and 561-565, so only the gcse insn count is left. Case 9 uses
the matched twin func_L02_0040BE08's cross-jump guard, pending a ruling.

func_L11_00451178 and func_L11_00444400 keep their bodies, with new
measurements: the bucket requirement, ruled-out spellings and profiles,
and the negative inline-helper test for the HUD boundary.

Checked: tools/check.py per function (results in the notes); unittest,
tests/check_repository.py and tools/progress.py --check pass. No linked
build: nothing in src/ changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017f7s8NCjkajLuj3mdig8Ls
…1178

Record the count-neutral and code-changing spellings measured against
the forced-bucket check, the pos-local result and the block-scoped tmpl
result. Only notes change; src/ is untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017f7s8NCjkajLuj3mdig8Ls
The Joba drone's state machine, in its own -G8 unit
src/levels/11_joba/L11_00453358-state-g8.c (default -g8 profile).
Every instruction had matched except four spilled pointers, which are
gcse reaching registers whose slots follow the expression-hash bucket
count. Two inlined helpers that wrap repeated idioms, anim() and turn(),
are code-neutral and give retail's count (S 543). Case 9 keeps the matched
twin func_L02_0040BE08's `height = 0.0f;` against cross-jumping.

Also records the helper lever and the third pass on func_L11_00451178.

Checked: tools/check.py func_L11_00453358: 1 of 1 places match;
tools/build.py all --strict: 28 programs OK (11_joba: 2363208 loaded
bytes equal, 3675 C functions); unittest 382 OK; check_repository and
progress --check pass. 1 function added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017f7s8NCjkajLuj3mdig8Ls
The Joba sentry's state machine, in its own unit
src/levels/11_joba/L11_00451178-gu-g8.c (-O2 -G8 -ffunction-sections
-frac2-gcse-unsplit-edges). The last six words were stack-slot and
case-12 ordering:
- tmpl = &particle set just before the template is filled: the short
  life wins it a saved register that reload then evicts with case 12's
  reaching registers, giving retail's slot 0xCC, and keeps the particle
  loop at 46 insns for loop.c's first-pass hoist;
- spin = state + 0x2B0 before case 12's loop (func_L11_0044AFC8's form)
  orders gcse's PRE copies;
- an inlined turn() helper gives gcse retail's bucket count (S 583).

Checked: tools/check.py func_L11_00451178: 1 of 1 places match;
tools/build.py all --strict: 28 programs OK (11_joba: 2363208 loaded
bytes equal, 3676 C functions); unittest 382 OK; check_repository and
progress --check pass. 1 function added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017f7s8NCjkajLuj3mdig8Ls
Record the pass-order explanation of the HUD boundary, the identical-arm
mode test that produces it, the inline rounding helper and the negative
profile, volatile and no-sched2 trials. Only notes change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017f7s8NCjkajLuj3mdig8Ls
…dence

Per AGENTS.md and MATCHING-BLOCKERS blocker 26, an artificial use kept
only to preserve an operation does not land: func_L11_00453358's case-9
`height = 0.0f;` (the twin func_L02_0040BE08's cross-jump guard) is such
a use. The exact source returns to nonmatching/ with a ruling request
and the marker is restored.

func_L02_003FE768 is exact (2 of 2) with a non-empty do-while(0)
float-to-int conversion macro and 0 of 2 without it; the evidence is
added to the open maintainer question rather than landed. The two-agent
findings for func_L11_00444400 are recorded in its note.

Checked: tools/build.py all --strict: 28 programs OK (11_joba: 2363208
loaded bytes equal, 3675 C functions); unittest 382 OK; check_repository
and progress --check pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017f7s8NCjkajLuj3mdig8Ls
The shared boss health bar (Maktar and Joba), in its own -G8 unit
src/levels/shared/L02_003FE768-g8.c. Each screen edge is rounded into t
and converted in a one-pass group, the source method COMPILER-NOTES now
records from RAC1 ("Source methods shared with RAC1"): its loop notes keep
the D_001A7B90 mode load after the conversions, as retail schedules it.
Without the groups the load is hoisted across them (0 of 2).

Checked: tools/check.py func_L02_003FE768: 2 of 2 places match (USA
v1.01; PAL and USA v2.00 not checked, no local data);
tools/build.py all --strict: 28 programs OK (02_maktar_nebula: 2227096
loaded bytes equal; 11_joba: 2363208); unittest 382 OK; check_repository
and progress --check pass. 1 function added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017f7s8NCjkajLuj3mdig8Ls
@bytematchdev

bytematchdev Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

ByteMatch progress report

SCUS_972.68

Code matched 91.80% · 5.07 MB of 5.53 MB
Fuzzy match 91.80%
Functions 8,173 / 8,584
Data matched 0.00%
Units complete 983 / 1,069

No function changes.

SCUS_972.68_v2

Code matched 86.02% · 4.80 MB of 5.58 MB
Fuzzy match 86.02%
Functions 7,932 / 8,639
Data matched 0.00%
Units complete 1,017 / 1,190

No function changes.

SCES_516.07

Code matched 56.58% · 3.23 MB of 5.70 MB
Fuzzy match 56.58%
Functions 7,242 / 8,677
Data matched 0.00%
Units complete 990 / 1,217

No function changes.

Commit 9d38991 · Ratchet & Clank: Going Commando on ByteMatch

@llesieur99 llesieur99 self-assigned this Nov 5, 2026
Merge master 673ce0b into the Joba contribution, resolving the compiler-flag
and retained-source index conflicts without restoring retired upstream drafts.

Preserve func_002B1C20's actual unsigned 64-bit return in the sentry. Express
case 11 as an equivalent early exit so the compiler retains retail's low-bit
tests without a 32-bit normalization pair. The corrected source stays exact.
Restore four ignored helper return contracts in the retained drone, which
remains unpromoted because of its case-9 dead-store diagnostic. Remove the
promoted sentry's stale functional registration and redundant functional C.

Validation on this tree:
- tools/build.py all --strict --version us/pal/us2 --jobs 4: 84 programs OK,
  zero C fallbacks. Independently compared all 84 linked loaded images again.
- All 7 intended C placements verified in placed.json: sentry 1 USA v1.01,
  boss bar 2 in each release. 5,156 distinct USA bytes; 6,816 placed bytes.
- python3 -m unittest discover -s tests: 383 tests OK.
- tests/check_repository.py: passed, 314 functional registrations.
- tools/progress.py --check for all three releases: passed.
- 7,826 production inputs equal the frozen runtime, host and staged Git blobs.
- Retained drone probe: 1/1 in both USA releases, no PAL canonical identity;
  it is not included in the matching C count or final linked C placements.

Reports and root README are unchanged from the integrated master. No native
port or gameplay test was run. No compiler, assembler or matching policy change.
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