1. Steel-Winged_Pegasus

    OP Steel-Winged_Pegasus Advanced Member
    Newcomer

    Joined:
    Mar 2, 2018
    Messages:
    77
    Country:
    United States
    Yeah, the title is what it says on the tin, that's the short story.

    The long story: I was recently wanting my SM64 DS fix, and I just... really find it a bit awkward (not unplayable, just awkward) to use the Circle Pad for the game, because it only emulates the D-pad. Was looking into making a super simple hack to just remap some of the buttons (B for attack, A jump, X and Y for camera controls, etc), but wondering if possible. I know someone made an analog mod of sorts, where the touch input movement is mapped to the D-pad (or maybe Circle Pad, I don't remember), so I know that much is possible, though IIRC, that's possible only in an emulator, and not on 3DS via DSiMenu++ (due to TWL firm needing to be hacked, or something like that), but I could be wrong. The Wii U VC version has an option to map the touch input to the analog stick on the Gamepad, apparently, but I really doubt it'll work like that on the 3DS.

    Now, I really don't have any experience in hacking, so obviously, the first step for me is to read up on it and learn how the game's innards work. I VERY much doubt this will actually go anywhere, though. This was just me wondering if it's possible to make a hack like that. I know I could use DeSmuME, but if I can play such a hack on the 3DS, that'd be stellar!
     
  2. anotherperson

    anotherperson Member
    Newcomer

    Joined:
    Nov 23, 2017
    Messages:
    13
    Country:
    Guatemala
  3. Sono

    Sono cripple piss
    Developer

    Joined:
    Oct 16, 2015
    Messages:
    2,434
    Country:
    Hungary
    I'm pretty sure button remapping is possible, even if the game uses LSL/BMI slide, Branch table, or simple bit tests (ordered from hardest to easiest).

    As for analog input, that's another story. Since there is no unified analog input other than the touch screen, you need to come up with your own data transmission method which is compatible with the host of your choice.
    On emulator you could hack it to be almost anything, because the emulator's CPU core must have a way to add or intercept memory values to act as analog input, and at that point you could directly map that memory value to the ARM9, so you won't even have to touch ARM7, making for easier patches.

    On the 3DS it's a different story... you need to compile parts of Rtc3DS, namely rtcom.cpp from arm7, and the entirety of arm11 (which you need to modify).
    After that you need to hack the compiled arm7 code into the game's ARM7 binary, write some initialization code which initializes rtcom (see arm7/main.cpp), and after a successful init, install rtcom's VBlank handler so it gets triggered on each VBlank (or you can also do ARM9 --> ARM7 --> ARM11 trigger if that sounds better for you, but you'll still need to wait for ARM11 to enter VBlank).
    Once you have confirmed that rtcom integration was successful (the ARM11 doesn't hang during comms while still hearing sound), then you need to hack your own ARM7 code into ARM7 which communicates with your own ARM11 code. From there you're free to do whatever with the values. What Rtc3DS does is that it writes the values to an unused region in memory, which the ARM9 can read. This is probably the best solution, but other solutions are also possible (like sending the values over FIFO).
    Now that the hardest(?) part is done, you just need to hack the ARM9-side code to read the values from the shared memory, and write it to its own analog input values (if it has any).
     
  4. BORTZ

    BORTZ The Amazing
    Supervisor

    Joined:
    Dec 2, 2007
    Messages:
    13,157
    Country:
    United States
    Be a real man and play the whole game with the DS thumb strap.

    Like sad Bortz did in the summer of 2005.
     
    Sono and smileyhead like this.
  5. smileyhead

    smileyhead I like cute stuff.
    Member

    Joined:
    Aug 31, 2015
    Messages:
    4,546
    Country:
    Hungary
    I just looked it up and I never knew it existed, and Jesus Christ that thing looks terrible.
     
    Sono likes this.
  6. BORTZ

    BORTZ The Amazing
    Supervisor

    Joined:
    Dec 2, 2007
    Messages:
    13,157
    Country:
    United States
    So joking aside I did actually play the whole game with the strap and it actually worked really well. Obviously I wouldn't really suggest it to anyone as a serious play option but it actually works.
     
    Garcimak, Sono and smileyhead like this.
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - Question), Control, (Real