Hacking controls in a rom.

Discussion in 'GBA - Game Development, ROM Hacks and Translations' started by askforit666, Jul 18, 2008.

  1. askforit666

    askforit666 Newbie

    Jul 18, 2008
    United States

    I got a mp4 player that can run gba games but i got a problem there's only 4 buttons and im missing the R and there is no way to change the control in the emulator.
    The game im trying to run is Zelda minish cap and without the R button i cant shrink to minish size so im stuck there.Is there a way to change the controls in the rom
    with a hex editor i would like to swap R&L.Well i hope to find someone who tried something like this and can point me out the good direction.

  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    Nov 21, 2005
    United States
    It would probably be easier to hack/recompile the emulator (either add R and replace another button or add R by using more than one button) but you could do a rom as well.
    Although searching for MP4 player GBA emulation says it could be the JXD301 which having onboard stuff could make things harder (I am not a great fan of the idea of hacking the onboard code (MSA/blackfin assembly is not something I know a great deal about)). Post what you have and it might be possible to go that route.

    Controls work using a dedicated register for keys:
    and more low level:

    From here you have several options.
    The register is read only, now whether it will be that way for the emulator or not is a different matter (most emulators are fairly accurate in this regard unless they have but as it stands to get an L press to write the R register probably will not happen. However while I have not hacked the game but a fair few copy the register and operate on that
    Here it would just be a case of operating on that copy, the most simple way I can see would be to abuse the sleep/soft reset hacks as they are "always on" or possibly even as a cheat with something like gabsharky.

    Get the game to think L is the button of choice.
    As mentioned a copy of the register is usually the method of choice so here a check would be done to see if R is pressed, you just alter the check to check for L or something.