[Feature Request] Specify a pointer bitmask for indirect notes in the inspector #1062
redwizard42
started this conversation in
Ideas
Replies: 1 comment
-
The conversion from 32-bit pointer to RetroAchievements address was added in #932. It's not working for GameCube because it only kicks in for "32-bit Pointers", not "32-bit BE Pointers". I've included that change in #1066. I'm going to leave this open because there may still be merit in explicitly defining a translation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On GameCube, hardware addresses its ram from 0x80000000 to 817FFFFF. So when we use the pointer, we are going to use this:
Add Address 32-Bit BE PointerAddress & 0x1ffffff
Similarly PSP hardware addresses its ram from 0x08000000-0x081FFFFF
Since we now often use the masking in logic in case the pointer crosses the boundary, our offsets in notes will often match the masked value rather than the unmasked, but the inspector will assume the unmasked value is being used.
This could be solved by being able to specify a pointer mask in the note, so that the mask gets apply before the indirect notes' addresses are solved.
Example:
Pointer to Player Data [32-Bit BE] [Mask=0x1ffffff]
+0x04=Player Health [Float BE]
+0x1c=Equipped Weapon ID [32-Bit BE]
etc. Unsure of what the best format would be for this, but I think it'd be helpful so that the offsets used in logic match offsets for indirect note address calculation
Beta Was this translation helpful? Give feedback.
All reactions