dolphin
dolphin copied to clipboard
Possible Typo in Prime 1 AddressDB
I believe the active_visor offset for Prime 1 in PrimeHack/AddressDBInit.cpp is off by one.
Line 41 is currently
addr_db.register_dynamic_address(Game::PRIME_1, "active_visor", "powerups_array", {mrt1(0x1c)});
but I think 0x1c should be 0x1b.
Reproduction steps:
- Open PrimeHack 1.0.8 flatpak and a dolphin debugger/memory viewer.
- Start Trilogy NTSC_U and start Prime 1.
- In the memory viewer, follow the address chain for
powerups_arrayas described inPrimeHack/AddressDBInit.cpp. View around 32 bytes. - Change the active visor, and note that
powerups_array + 0x1bis changing to the visor.
I'm not sure if this is actually causing any problems, but if I'm right, it's probably better to fix it now as opposed to rediscovering this in later code changes. I only skimmed the AddressDB code, so it's also possible my understanding is off by one.