refactor ghost handling by removing hardcoded Mario graph node offsets - #73
Merged
FramePerfection merged 1 commit intoSep 25, 2026
Merged
Conversation
FramePerfection
approved these changes
Sep 25, 2026
FramePerfection
left a comment
Owner
There was a problem hiding this comment.
No idea how I ended up scuffing that address, I can't remember coding that in but the evidence is there 🙈
Thanks for the fix, I'll release this right away!
Merged
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.
Fixes #72
Since c50ef50, the ghost loop sets each Mario ghost's
sharedChildto a hardcoded0x800F0860every frame. That address is Mario's graph node only on US, so on JP and on some romhacks the game freezes as soon as a ghost is spawned.The loop now reads the graph node from
gMarioObject(lw t1, 0x14 (RegMarioObject)+nop). The routine keeps the same size, so no other offsets change.ghost_loop.asm,GhostHackUS.hckandGhostHackJP.hck.hckbytes match the armips outputTested on JP (no freeze anymore, ghost uses
0x800ED9E0) and US (unchanged).