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: 234
  • Like
Reactions: Vague Rant

Vague Rant

Deceptively cute
Member
Joined
Aug 7, 2008
Messages
2,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,302
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,463
Trophies
2
Location
Melbourne
Website
vaguerant.tumblr.com
XP
3,302
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: 237
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: 236

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: 241
  • 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
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/@legolambs