Skip to content

PPC: Fix pooled relocation addends being added twice sometimes #184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

LagoLunatic
Copy link
Contributor

My original pooled relocations implementation had a bug where it wasn't adding multiple addends together when calculating fake relocations:
image
Both sides should resolve to g_dComIfG_gameInfo+0x529c, but instead one showed g_dComIfG_gameInfo+0x51d8 and the other showed just g_dComIfG_gameInfo.

I noticed this and fixed the bad logic when I reimplemented it in #167, which worked in most cases. But I accidentally added the addends twice per instruction, which resulted in the addend being double what it should be in some weird rare cases, like the example I'm using for these screenshots.
image

After removing the second addition it should really be fixed, both sides resolve to the same addend:
image

@encounter encounter merged commit b9ba579 into encounter:main Mar 31, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants