Repository navigation
feat(functional): backfill for the native port - #389
Merged
Merged
Conversation
…d VU0 leaves as plain floats
…ames that clash in hostgen's units renamed
…lace; rows it would stub go back to the assembly
ByteMatch progress reportSCUS_972.68_v2
No function changes. SCES_516.07
No function changes. SCUS_972.68
No function changes. Commit 578bc4c · Ratchet & Clank: Going Commando on ByteMatch |
…ort branches $RAC2_FCHECK_OPT replaces the unit's -O for the test copy, and a branch the assembler finds out of range goes through a jump of its own. hostgen's console form of a whole hand-written kernel needs both.
Retail reaches it by jal from hand-written code with its inputs in v1, s5 and a1, on a stack of its own in the scratchpad. The row's C took a0-a3, and it won over the translation, so those callers passed it the wrong values. With no row they run it in place. func_002BA0E0's table names func_002BEE70: the catalogue's name for the routine at 0x002BEE78.
func_L00_002A4928, func_L01_00394240, func_L00_00424F98, func_L04_003A21F8, func_L06_00443A38, func_L06_003E5D30. One declaration of D_001A79F0 each, retail addresses in place of ref_ names, the angle's exact bits, three settings read as one array, and the frame retail has, so an unset w left on the stack matches.
…8 on D_L00_0023A6F0 has no value in any level's build, so outside level 0 the name kept level 0's address and the second half of the table was written elsewhere.
… not its position
…n, and wide capture runs
Found by reading retail's unrun blocks against the C: wrong offsets and a wrong table name, missed conditions, extra or missing calls. All SAME at the gate, which does not reach the fixed lines.
… captures caught func_002B0C28 wrote its slot state to 0x1A8FB0 and fell through to return 1 where retail writes 0x1A8C60 and returns 2; func_002B0CE0 the same global. func_003384C0 restored the field of view after its last camera update, where retail restores it in that call's delay slot, before it. The rest came from reading retail's unrun blocks against the C.
…E8 at +0x50 The row held an 80-byte loop driver and, after it, a second function with a frame of its own. tools/build.py all: every program OK as before.
…solve as the port's call_copies.tsv lists the jals of a folded function that target another function in some levels' copies; the port calls what the running copy's jal calls (openrac_call_in_copy). The gate now does the same for a level build: the address at the same offset of that level's copy. func_L00_003603C0's level 9 state differed for want of it.
…is SAME, addresses moved Each has the same instructions as a gated sibling but for addresses; the sibling's C with its addresses read off the two retail codes. Each SAME in its own level on box2's captures (4 calls each, func_L22_0040F1C0 1).
# Conflicts: # nonmatching/functional.tsv
Rebase the functional row on the retained draft of #390. Selector 10's angle clamp now uses retail's strict compares (c.lt.s on both bounds), so an unordered angle is stored unchanged where the earlier C stored +pi/2. The other changes of the draft (hero globals as one object, separate projectile arms in cases 38/39, selector 0's branch order) do the same as before. Case 23 keeps this row's WORD(state, 0x56c) for the func_002B6228 path, which retail reads at 0x4231B8 and 0x4231E0; the draft still has 0x54c. Gate: fcheck SAME on 4 calls; fcheck cover runs 171 of 3,958 retail instructions, and neither selector 10 nor case 23 is among them, so both changes rest on reading retail.
Veradictus
marked this pull request as ready for review
November 2, 2026 07:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Functional C for USA v1.01's remaining assembly, for the native port in OpenRAC. OpenRAC's native port (#191) is pinned to this branch's tip.
No matches here, 0 functions added to the report.
progress/, the README table anddocs/VERSIONS.mdare untouched. Nothing innonmatching/functional/is compiled into the matching build.What's in it
nonmatching/functional.tsv, up from 29. 12 are per-level copies, each SAME on its own level's captures.func_002BA0E0can't place in level 02, whose table holds its own routine (func_L02_0033C8B8) where the row namesfunc_002BEE70.func_002A0558is never called in the capture runs.func_002F2758is out: it's a piece of hand-written code with register inputs, and its row made hostgen call the wrong thing.func_L09_00410200is out too: feat(src): match func_00292078 and retain near misses #388 matched it.tools/fcheck.py:$RAC2_FCHECK_OPTand far branches, for gating a whole kernel in hostgen's console form. Capture scripts for every level, by holding the next-level word through New Game. Levels 1-20 and 22-26 are reached. Level 30 crashes on that load.tests/check_repository.py: now allowsASM_FUNCrows infunctional.tsv.tools/fcheck.py cover): captured calls ran only 53% of the rows' retail bytes, so every row with unrun blocks was read against retail's disassembly. That found 31 real slips (wrong offsets, inverted tests, a misplaced store from a delay slot, wrong globals), all fixed. Most fixed lines still aren't reached by the captures, so treat them as read from the code, not proven by a run.func_L00_00420C38, the hero camera: two slips fixed (+0x44 and the blend rate), checked against retail with scripted hyper strike and double jump captures.func_002F7320, the key table lookup, from the assembly. Not gated yet.func_00131D98split at 0x131DE8.func_L11_00420C88takes that PR's repaired draft (retail's float compare sense in the selector 10 clamp) and keeps our 0x56c fix for case 23, which the draft still reads as 0x54c. SAME on 4 calls; those calls reach neither changed spot.func_002E8368's loading scene phase end: both retail paths return 1. SAME on 4 calls.Checked
tools/build.py allon USA v1.01: 28 of 28 programs byte-identical, one row removal behind this tip. Functional C isn't linked, so that can't change the bytes.tests/check_repository.pypasses.tools/fcheck_gate.py calibratehasn't been rerun on the new levels; the full-row gate ran instead.Still to come
Collision needed no C here: CollLine, CollSphere and
func_00277F48translate, and hostgen's console form of each gates SAME (32, 32 and 6 calls; OpenRAC keeps those verdicts).func_00274D90is the moby draw side, which the port replaces. What's left is the functions the port's translator refuses and that have callers, then the near-miss drafts as the gate proves them.