Match Net::ROOMHandler::reset()#304
Open
chrisking1981 wants to merge 1 commit into
Open
Conversation
Found 100% match via decomp-permuter. The function zeros out 28 u32 fields, sets a 0xff byte at 0x68, then zeros 4 final u32s (0x74, 0x70, 0x7c, 0x78). The trailing 4 stores require an indirect-via-double-pointer trick (`u8** new_var = &self`) plus a dummy null check to force mwcc to emit the matching instruction sequence — without it the compiler picks a different scheduling that fails to byte-match. Verified: reset__Q23Net11ROOMHandlerFv 100% match (objdiff) ROM-level: build/RMCP01/StaticR/StaticR.rel sha1 unchanged
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.
Summary
Adds a 100% byte-matching implementation for
Net::ROOMHandler::reset()(declared insrc/net/packets/ROOM.hppbut not yet defined).The function zeros out 28
u32fields in the handler, sets a0xffbyte at offset0x68, then zeros 4 finalu32fields at0x74,0x70,0x7c,0x78.How
Found via decomp-permuter. The trailing 4 stores require an indirect-via-double-pointer trick (
u8** new_var = &self) plus a dummy null check to force mwcc into the matching instruction sequence — without it, mwcc picks a different scheduling that fails to byte-match.The class definition only exposes a
_00[0x80]opaque buffer, so the implementation usesu8* self = (u8*)this;to write at raw offsets. This stays consistent with the current header style.Test plan
reset__Q23Net11ROOMHandlerFvreports 100% matchmain.dol(ac7d72448630ade7655fc8bc5fd7a6543cb53a49) andStaticR.rel(887bcc076781f5b005cc317a6e3cc8fd5f911300)🤖 Generated with Claude Code