dolphin icon indicating copy to clipboard operation
dolphin copied to clipboard

Possible Typo in Prime 1 AddressDB

Open milliero-se opened this issue 3 months ago • 1 comments

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_array as described in PrimeHack/AddressDBInit.cpp. View around 32 bytes.
  • Change the active visor, and note that powerups_array + 0x1b is 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.

milliero-se avatar Sep 23 '25 23:09 milliero-se