button hacking

Discussion in 'NDS - ROM Hacking and Translations' started by Tall Alien, Nov 24, 2008.

  1. Tall Alien
    OP

    Tall Alien Banned

    Banned
    225
    0
    Nov 8, 2008
    United States
    for example starfox command



    i want to hack button controls. how do i open up the rom to where that is?

    "You just have to pick out which memory addresses on the ROM are for B and Y/A and do some fiddling"

    i found that on this website http://www.teamcyclops.com/forum/showthread.php?p=80376

    so i just wanna find out how to do that and get there i'll try the rest on my own


    ps: if toenailed was able to do the same for phantom hourglass, im pretty sure this can be done. nobody else is willing to attemp this, but me. man i gotta do this so badly
     
  2. KiC

    KiC Member

    Newcomer
    43
    1
    Jul 22, 2007
    Gambia, The
    That's pretty simple assembler.
    Two I/O registers:

    As it says, if the bit is cleared, the button is pressed. Games usually read those registers, XOR them so that 1 indicates a pressed button, and save them in memory. All you have to do then is finding where the game checks those variables and change the code accordingly. Will need some assembly knowledge and a debugger.
    If the game doesn't use buttons at all, then you just have to write your own checks.
     
  3. SoulAnger

    SoulAnger MENUdo's Developer

    Member
    743
    12
    Jul 3, 2007
    Interesting. Thanks for the info KiC. [​IMG]
    BTW, do you know if there is a complete tutorial for this?
     
  4. Tall Alien
    OP

    Tall Alien Banned

    Banned
    225
    0
    Nov 8, 2008
    United States
    whats I/O
     
  5. cracker

    cracker Nyah!

    Member
    3,139
    404
    Aug 24, 2005
    United States
    [​IMG]

    I don't think you know how complex a task it is that you want to achieve. It requires hooking into the touchscreen handler so that you can read input from the D-pad (status in 0x4000130) and fake the stylus input (for which you would possibly have to keep track of the virtual point that the stylus is 'touching' at any moment -- might be possible to just put something like x=64 if left is pushed, etc but that might be too tight or too loose). Also I believe the D-pad already controls something (IIRC -- it's been a while since I played it) so you would have to void the D-pad input after you were done polling it. In short, it is a huge task for someone that has never worked on the internals of GBA/DS, and/or ARM programming.
     
  6. Tall Alien
    OP

    Tall Alien Banned

    Banned
    225
    0
    Nov 8, 2008
    United States
    what program do i use for this
     
  7. DarthNemesis

    DarthNemesis GBAtemp Maniac

    Member
    1,213
    40
    Feb 19, 2008
    United States
    This is too complicated for you. Try something simpler or come back after taking a programming class.
     
  8. cracker

    cracker Nyah!

    Member
    3,139
    404
    Aug 24, 2005
    United States
  9. rushpunk

    rushpunk Member

    Newcomer
    20
    0
    Sep 29, 2007
    United States
    so does this mean someone could hack smackdown vs raw 09 and make use of the buttons because that would be awesome.
     
  10. Tall Alien
    OP

    Tall Alien Banned

    Banned
    225
    0
    Nov 8, 2008
    United States
    i havent tried the game yet bet i know it sucks. that would be sick
     
  11. rushpunk

    rushpunk Member

    Newcomer
    20
    0
    Sep 29, 2007
    United States
    i would do it but im a noob when it comes to programing