Homebrew [WIP] ButtonSwap3DS - Remap buttons on your 3DS

rolim91

Member
Newcomer
Joined
Aug 11, 2007
Messages
10
Trophies
0
XP
260
Country
Canada
Sorry, I was wrong

I was checking .allMap


I havent relly tried this out physically. I was just reading the code. And trying it out by hand. I am trying to learn how to write and read assembly code right now.


With A+B = Select code

Using 0x3 for button mask and 0x7 for XOR mask.

A+Select pressed shouldnt go through because of the check.

B+Select pressed shouldnt go through as well.

This is because of: cmp r1, #0

Sorry about that. I'm still trying to learn this stuff.



Also, I think its possible that register R2 gets overwritten when multiple .anyMap and .allMap calls are true.

Eg.

A + B -> Start
B -> Y, Y->B

If code written in this order, then user presses A+B

A+B -> Start call goes through writes to R2
B -> Y, Y -> B call goes through overwrites R2


Instead it should have been:

A+B as A+Y as button pressed since B is Y



To be specific

Code:
@ A + B -> Select

ldr r3, =0x3     @011
ldr r4, =0x7     @111
bl .allMap


@ B -> Y, Y -> B

ldr r3, =0x801  
ldr r4, =0x801
bl .anyMap

In this case if A + B are pressed, Y is pressed since @B -> Y, Y -> B call is last and overwrites R2.


I hope this helps :)

Edit: Formatting and other stuff :(
 
Last edited by rolim91,

thinkingofaname

Member
Newcomer
Joined
Mar 16, 2009
Messages
24
Trophies
0
XP
191
Country
Canada
Hi folks, someone redirected me here saying there is some very helpful people around :). Basically my c-stick broke and is sending random direction non-stop with no way to fix it. I was hoping there is a way to disable the input from c-stick and I'll just use my N3DS as a O3ds.
 

mcaboosec

Active Member
OP
Newcomer
Joined
Sep 15, 2009
Messages
34
Trophies
0
XP
408
Country
United States
Also, I think its possible that register R2 gets overwritten when multiple .anyMap and .allMap calls are true.
I think that's exactly the issue. I had thought it would be OK to keep the temporary values in one register, but now I'm seeing that it's affecting any previous values. The order of mappings may fix this, but I doubt that's a valid fix for every situation.

Hi folks, someone redirected me here saying there is some very helpful people around :). Basically my c-stick broke and is sending random direction non-stop with no way to fix it. I was hoping there is a way to disable the input from c-stick and I'll just use my N3DS as a O3ds.
Well, the easy fix would be to open your N3DS and disconnect the c-stick from the circuit board. I don't have the c-stick mapping working yet, but it should be possible to disable the c-stick once that is working. We'd just redirect the process that looks for c-stick data to an area of memory that has the c-stick at neutral all the time.
 

Benja81

GBATemp Sporaddict
Member
Joined
Dec 24, 2015
Messages
987
Trophies
1
Age
42
XP
2,096
Country
United States
Thanks! I used this to swap L+R for OOT 3D. Using L for the camera was driving me crazy, my finger never wanted to be there, using R is soo much easier.
 
  • Like
Reactions: mcaboosec

mcaboosec

Active Member
OP
Newcomer
Joined
Sep 15, 2009
Messages
34
Trophies
0
XP
408
Country
United States
@Vague Rant, can you test this build? I changed how the swaps work, and it should be much more accurate. If it works, I'll push my changes and update the documentation. The changes I made will also do away with XOR masks, which should make it easier for people to use.
 

Attachments

  • ButtonSwap3DS_newSetup.7z
    316 KB · Views: 236
  • Like
Reactions: Vague Rant

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,464
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,313
Country
@Vague Rant, can you test this build? I changed how the swaps work, and it should be much more accurate. If it works, I'll push my changes and update the documentation. The changes I made will also do away with XOR masks, which should make it easier for people to use.
Works absolutely perfectly, mcaboosec. Two, three and four-button combos all worked correctly. Fantastic stuff!

For reference, I use Snes9x for 3DS with the internal Nintendo "Controller Test Cassette (Japan)" ROM for testing, which shows a visualization of a SNES controller and highlights the buttons when pressed. There's probably better button testers around, but this one's nice and intuitive as long as the SNES layout is all you need (i.e. no analog stick).
 

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,464
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,313
Country
yo can i request a compiled version that swaps X and B?
Here you go. :) Standard version was tested, mode3 not tested.

This is using the updated codebase from mcaboosec, so button combos were also tested and working.
 

Attachments

  • ButtonSwap3DS-SwapB&X.7z
    315.9 KB · Views: 239
Last edited by Vague Rant,

fenderjaguar

Well-Known Member
Member
Joined
Sep 19, 2015
Messages
414
Trophies
0
XP
556
Country
I actually made one to do it a couple days ago. Here it is! For those interested, here is the mapping:
Code:
ldr r3, =0x40
ldr r5, =0x7FF000
bl .cpad            
ldr r3, =0x80
ldr r5, =0x800000
bl .cpad            
ldr r3, =0x10
ldr r5, =0x0007FF
bl .cpad            
ldr r3, =0x20
ldr r5, =0x000800
bl .cpad
The documentation had previously indicated that you should have bl .touch at the end of each mapping. It should have been bl .cpad.

Thanks so much. I've been wanting this for ages. I never really got into the circle pad for mario kart 7, because it's so slippy, my thumb just keeps slipping off it. I had to keep licking my thumb and rubbing it around on my forefinger to grippy it up. Now I can finally play with the D-pad, as I should always have been able to
 

Demnyx

Well-Known Member
Newcomer
Joined
Jul 1, 2016
Messages
92
Trophies
0
Age
22
XP
330
Country
France
Hello guys
Is it possible to swap ABXY buttons with the circle pad ?
If yes , can someone please compile a version that does it ?
Thanks
 

Demnyx

Well-Known Member
Newcomer
Joined
Jul 1, 2016
Messages
92
Trophies
0
Age
22
XP
330
Country
France
I have a version ready to build, but you'll lose ABXY. Do you want these on the control pad?

I interpreted @Demnyx's request as being for ABXY to be input using the Circle Pad itself, which sounded complicated so I didn't bother trying. :V

Ahh sorry i wasn't clear
I only want for ABXY buttons to be the circle pad no matter if i can't use ABXY buttons anymore
 
Last edited by Demnyx,

fenderjaguar

Well-Known Member
Member
Joined
Sep 19, 2015
Messages
414
Trophies
0
XP
556
Country
I actually made one to do it a couple days ago. Here it is! For those interested, here is the mapping:
Code:
ldr r3, =0x40
ldr r5, =0x7FF000
bl .cpad            
ldr r3, =0x80
ldr r5, =0x800000
bl .cpad            
ldr r3, =0x10
ldr r5, =0x0007FF
bl .cpad            
ldr r3, =0x20
ldr r5, =0x000800
bl .cpad
The documentation had previously indicated that you should have bl .touch at the end of each mapping. It should have been bl .cpad.

Hey mcaboosec, I thank you again for the Cpad.cia. It's excellent in mario kart 7.

But in zelda link between worlds, it seems more like this. So I think it's slightly out (my picture is a little exaggerated)
 

Attachments

  • Cpad.jpg
    Cpad.jpg
    13.9 KB · Views: 237

mcaboosec

Active Member
OP
Newcomer
Joined
Sep 15, 2009
Messages
34
Trophies
0
XP
408
Country
United States
Ahh sorry i wasn't clear
I only want for ABXY buttons to be the circle pad no matter if i can't use ABXY buttons anymore
Alright, here you go! Let me know if anything is broken, I just updated my buildtools.
Hey mcaboosec, I thank you again for the Cpad.cia. It's excellent in mario kart 7.

But in zelda link between worlds, it seems more like this. So I think it's slightly out (my picture is a little exaggerated)
Interesting. I'll test it a bit later to see what I can find.
 

Attachments

  • ButtonSwap3DS_ABXY-Cpad.zip
    712.1 KB · Views: 242
  • Like
Reactions: fenderjaguar

Demnyx

Well-Known Member
Newcomer
Joined
Jul 1, 2016
Messages
92
Trophies
0
Age
22
XP
330
Country
France
Alright, here you go! Let me know if anything is broken, I just updated my buildtools.

Interesting. I'll test it a bit later to see what I can find.
Thanks !
Will try

EDIT : Hum , doesn't work :( i can't use ABXY buttons and they aren't replaced by circle pad
Also i want d-pad to replace ABXY buttons if possible
Thanks again
 
Last edited by Demnyx,

Wishi

Rareware Gamer
Member
Joined
Nov 24, 2015
Messages
219
Trophies
0
Age
27
XP
297
Country
Mexico
Can anyone make one that:
Swaps R to Y Button , and Swap Y button to Up D pad
Please , this would make my MHXX gameplay perfect ! Because I'm having a really bad time with my r button xd Thanks !
 

neobahamut1989

Member
Newcomer
Joined
Apr 24, 2017
Messages
13
Trophies
0
Age
35
XP
184
Country
Malaysia
Sir, can i get remap button for:
Swap L with down D-pad and R with up D-pad
my little brother 3ds R button broken but we still playing ff explorer, monster hunter, with it. I already take a look for debug myself, but damn......confuse with make install, HID, and installation of devkitPro. :(
 
Last edited by neobahamut1989,

R9HAX

Member
Newcomer
Joined
Apr 24, 2017
Messages
16
Trophies
0
Age
26
XP
58
Country
United States
I have a question for you can you use this to disable buttons Id like that option in another update I hate the L2 and R2 buttons on the new3ds
 
  • Like
Reactions: KoalaBoy

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    as to you
  • K3Nv2 @ K3Nv2:
    How do you know if the night will be good when you're asleep
  • BakerMan @ BakerMan:
    because i didn't say i was asleep
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
    Karma177 @ Karma177: do y'all think having an sd card that has a write speed of 700kb/s is a bad idea? trying to...