Repository navigation
decomp: name unknown fields from evidence and define more data in C - #280
Merged
Merged
Conversation
Field names from the SIF RPC packet layout, the TTY handler's own error strings (ti->wlen), newlib's FILE and _reent, and the memory card RPC parameter blocks. init_moby_instance and process_menu_entry use the struct Moby / MobyClass names and name their menu entry fields.
sceIpuRestartDMA takes the SDK's sceIpuDmaEnv, the BCD clock helpers the sceCdCLOCK layout, sceDmaSend the channel's chcr/qwc/tadr; the SIF command, load-module and close parameter blocks get names from their use.
update_camera_tracking_state names the hero motion it tracks (up vector, move along and across it, the ground moby and its height step); the controls help screen reads the left and right picture halves from the disc table; the cutscene loader and the frame helper use struct Moby's field names (lights, lod_dist, metal_alpha, pvars).
Camera mode, hidden and hand-item-hidden flags, the weapon raised and lowered at a wall, wall and platform mobys, the magnetic floor, the velocity curve, jump, swim, swing, wake and head-look fields, the sound slot mobys and timers, each named from the code that reads and writes it. Level code follows in the next commit.
lod_dist and metal_alpha come from the class header's lod_trans and metal_count at init; seq_sound is the sequence's looping sound (AnimSeq + 0x11, 0xFF none) that update_moby_voice plays; the class header gains metal_count, lod_trans, shadow_count and glow_rgba.
…t fields attach_manipulator names the manipulator node (joint list, target matrix, next, rotation w, scale); the sky shells read the cluster header (vertex/tri counts and offsets, data size); draw_config names the switches the world draw reads (sky, effects, particles, sprites, hud, screen overlays, aa blur); the resident render object uses struct Moby's names (lights, lod_dist, metal_alpha, shadow_range, collision).
…es come from check-unit copies the checkout's changed headers into the baseline workspace and rebuilds the unit, so a header-only rename is measured instead of the stale copy.
Puffoid, psytcopus, resort owner, teleporter, blarg ship, ammo crate and smaller l11 pvars: hit points, knockback motion block, path goal and reach, gates and volumes, teleporter destinations and part motion.
Veldin robot (ElectroidVars and its moby view), blarg trooper, extermitank, snagglebeast, blarg helicopter and blarg heavy interceptor pvars: knockback block, hit response class, manipulators, paths, velocities, voices and child mobys.
Grind speed and boost, rail jump arming, jump impulse and target height, swing rope spring, wall push-out, face expression, item swap timers, drone and suction slots, glow phases and more, each from what the code does with the field or the hero block notes by address.
…ields Offsets follow the moby animation and shadow notes: +0x5C rate, +0x60 pose layers, +0x84/+0x88 shadow slab, +0xA8 change counter, +0xAC grid index, +0xBD shadow direction.
… pvars, frame headers and the race path
… hit and the hit descriptor
… fields in shared enemies and level copies
…slot cell after MapState
…g flag and the boot channel slide/timer
…m rate/flags; pad unread manipulator and move bytes
…me/variant and language fields
…r count and quaternion w
…ertex batch transform
…d and name the card sync result
…ips, race moby, shadow pitch and glow count
…rotation and the reverb request owner
…ffset projection; format three files
Decompilation progress
No function changed its match state compared with main (6513252). Compared with main (6513252). C_FUZZY uses main's last measurement. |
…, unproven l05 classes, Drek boss mine, bombthrower bomb
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
The code had about 2200 placeholder names (
unkXXX), many weak struct and function names, and level and boot data tables that were still bytes in asm. Data in C stood at 63.95 %.After
Names. Placeholder names fell from about 2200 to 899. 309 of those are libmpeg internals with no public names.
MobyTargetInfoat enemy pvars+0x20,GroundMoveControl,KnockbackMotion,HitColorFlash, and MobyHitattack_type/attack_subtypewith the values each weapon writes.struct Moby, the menus, the follow, level and update cameras, the disc table, map, HUD, vendor, sound defs, rendering, and every level directory.triggered_*are now hinged hatch, swinging flap, sliding block and water spout.moby_248is now the blarg bomb, and l18moby_568the drifting mine. Their files are renamed to match.D_L05_0015FFD8is nowl05_moby_array.Data. Data in C went from 63.95 % to 77.18 %. New tables include:
Boot tables that the levels copy are also proven in every level, through
exe_data.tsv.Code stays 3547932 / 3547932 B.
Verification
make elfends withbaseline build OK, so the boot ELF matches retailmake overlaysends withPASS(3014 functions, 18869 copies, 24955 level data objects)make checkpassesscripts/check-cleanup.py --base origin/main: no new problems