Gericom / GBARunner2

A GBA hypervisor for DS. (like nintendont for gc on wii)
732 stars 59 forks source link

prefetchPatch makes bad assumption: not all GBA start at 0x80000C0 #228

Closed khmann closed 2 years ago

khmann commented 2 years ago

While working on a personal GBA project, I noticed the function "prefetchPatch" (gbapatcher/arm9/source/main.cpp) sets the ARM7 PC=0x80000C0 when done, but several hundred of the nointro .GBAs don't actually start there. Perhaps 0x8000000 is more correct?

The 2,3,4 in 1 carts are common offenders, also here are some randoms: ./Asterix & Obelix XXL.gba: 8000000: ea013ffe b 0x8050000 ./Cars.gba: 8000000: ea000031 b 0x80000cc ./Final Fantasy IV Advance.gba: 8000000: ea00041e b 0x8001080 ./Final Fantasy V Advance.gba: 8000000: ea000407 b 0x8001024 ./Incredibles, The.gba: 8000000: ea000031 b 0x80000cc ./Mario Golf - Advance Tour.gba: 8000000: ea00010e b 0x8000440 ./Mario Tennis - Power Tour.gba: 8000000: ea00011a b 0x8000470 ./Pokemon - Ruby Version.gba: 8000000: ea000032 b 0x80000d0 ./Pokemon - Sapphire Version.gba: 8000000: ea000032 b 0x80000d0

EDIT: this is actually TWiLightMenu++ code specific to DS/DS Lite Slot2 usage, but the open issue button dropped me here... whoops.

Epicpkmn11 commented 2 years ago

We can't transfer the issue to TWiLight's repo as this repo is on Gericom's account instead of the DS-Homebrew org so I'd suggest closing this and making a new issue on TWiLight's repo.

Maybe we should make that more clear that only ROMs go here, though it does say that in the description ;P

khmann commented 2 years ago

Created issue in TWiLight's repo as it is not related to this project. Closing here. Thanks for all your hard work!