Repository navigation
overlay: move 48 level functions and 3 boot functions to C - #208
Merged
Merged
Conversation
GNU as asserts (tc-mips.c:11454) on some bare symbol loads in a noreorder delay slot: with -G0 on a Hoven unit with a new port, without it on two others. obj/ only checks that a file compiles as written, so try -G0 first and fall back to the default.
Ports of functions that rac1-decomp has exact (its main and the open PR 88), translated to the US level programs and proved byte for byte: 30,524 bytes in 24 functions across shared code and levels 3, 6, 7, 8, 12, 13, 14, 15 and 18. make overlays: 2852 -> 2876 functions in C. Hoven's 0x3064e8 reads the moby array through the unit's existing .sdata alias; Blarg's 0x2feb40 uses the US help text id (5 lower).
13,532 bytes. What the first pass of the port missed: - Rilgar's sharkigator update: two data symbols paired the wrong way round, and the dust table keeps rac1-decomp's section(.sdata) so its address is set late, as retail does; - Fred's update: the moby's +0xBC byte, which the port had folded into another symbol; - the bomb update: the float-to-int callee FUN_001fa6d0; - four more ports that only needed rac1-decomp's NOT_SDA/MACRO_ADDR placement kept, with clashing declarations renamed in the port. make overlays: 2876 -> 2883 functions in C.
Both bodies follow the rac1-decomp C for the same functions. The capture glyph tables move into the vendor unit as C data.
FUN_L12_00303540 stores D_L12_00161F00/04 through $gp outside delay slots, while FUN_L12_003054b0 and FUN_L12_003069d0 load them with lui. One assembler pass cannot do both, so the functions from FUN_L12_003054b0 on live in their own file. Both then match with the rac1-decomp C (7068 bytes).
Two units whose functions all match on the SN route move there. A dropped typedef, callee prototypes and data placement are fixed by hand, and the hero position is written as the hero base + 0x80.
These functions are exact in rac1-decomp but their fingerprints differ from the US ones; OpenRAC's US map pairs them (11 KB).
The sentrybot draft moves into the stub's #else block, where promote expects it (2.9 KB).
The RPC buffer is an array (SDK globals are not small data), and the header words are copied as pointers, which keeps their loads ahead of the port and mode stores as in retail.
Decompilation progress
51 newly matched functions (73,536 B)
Compared with main (606bc76). C_FUZZY uses main's last measurement. |
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.
Before
Many level functions that rac1-decomp has exact (its main and the open PR 88) were still INCLUDE_ASM here, and so were three boot functions.
After
make overlays: 2852 -> 2900 functions in C.render_capture_scrolling_text,vi_buf_restart_dmaandsceDbcCreateSocketmatch.game/folder is removed.Verification
make elfends withPASS: reconstructed boot ELF matches retailmake overlaysends withPASS(overlay changes)scripts/check-cleanup.py: no new problemsmake checkpasses