Homebrew Modify godmode9 buttons

alx4130

New Member
OP
Newbie
Joined
May 25, 2022
Messages
1
Trophies
0
Age
21
Location
CDMX
XP
28
Country
Mexico
I need help with godmode9, I need to decrypt many cias for citra but it takes me a long time because I can't select many cias at the same time because my L and R buttons don't work, is there a way or something to modify the godmode9 buttons?
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
I can't even compile it. maybe @Pk11 can help both of us:

C:\Users\GODREBORN\Desktop\a\GodMode9>make firm
Building arm9/arm9.elf
make[1]: Nothing to be done for 'all'.
Building arm11/arm11.elf
make[1]: Nothing to be done for 'all'.
Creating output/vram0.tar
add: aeskeydb.bin
add: easter.bin
add: font_default.frf
add: GodMode9_splash.png
[FLAVOR] GodMode9
[VERSION] v2.1.1-1-g658c9b49
[BUILD] 2022-05-24 19:07:12
[FIRM] output/GodMode9.firm
/opt/devkitpro/msys2/usr/bin/python3.exe: No module named firmtool
make: *** [Makefile:99: firm] Error 1
 

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
xn--rck9c.xn--tckwe
XP
3,902
Country
United States
I can't even compile it. maybe @Pk11 can help both of us:

C:\Users\GODREBORN\Desktop\a\GodMode9>make firm
Building arm9/arm9.elf
make[1]: Nothing to be done for 'all'.
Building arm11/arm11.elf
make[1]: Nothing to be done for 'all'.
Creating output/vram0.tar
add: aeskeydb.bin
add: easter.bin
add: font_default.frf
add: GodMode9_splash.png
[FLAVOR] GodMode9
[VERSION] v2.1.1-1-g658c9b49
[BUILD] 2022-05-24 19:07:12
[FIRM] output/GodMode9.firm
/opt/devkitpro/msys2/usr/bin/python3.exe: No module named firmtool
make: *** [Makefile:99: firm] Error 1
I think to fix that error you just need to install firmtool, should just be pip install -U git+https://github.com/TuxSH/firmtool.git as per the README. (Depending on how Python is installed you may need to swap pip for pip3, python3 -m pip, or py -3 -m pip)

I need help with godmode9, I need to decrypt many cias for citra but it takes me a long time because I can't select many cias at the same time because my L and R buttons don't work, is there a way or something to modify the godmode9 buttons?
It seems it's very simple to swap around the buttons, just gotta swap around a couple defines. I've attached a build with L/SELECT and R/START swapped, I didn't change anything visually so just press SELECT whenever it says L and START whenever it says R, I picked those since they're rarely used but I can do something else if needed.

Diff:
diff --git a/common/hid_map.h b/common/hid_map.h
index 7f2ac2a..083f04b 100755
--- a/common/hid_map.h
+++ b/common/hid_map.h
@@ -2,14 +2,14 @@
 
 #define BUTTON_A      ((u32)1 << 0)
 #define BUTTON_B      ((u32)1 << 1)
-#define BUTTON_SELECT ((u32)1 << 2)
-#define BUTTON_START  ((u32)1 << 3)
+#define BUTTON_SELECT ((u32)1 << 9)
+#define BUTTON_START  ((u32)1 << 8)
 #define BUTTON_RIGHT  ((u32)1 << 4)
 #define BUTTON_LEFT   ((u32)1 << 5)
 #define BUTTON_UP     ((u32)1 << 6)
 #define BUTTON_DOWN   ((u32)1 << 7)
-#define BUTTON_R1     ((u32)1 << 8)
-#define BUTTON_L1     ((u32)1 << 9)
+#define BUTTON_R1     ((u32)1 << 3)
+#define BUTTON_L1     ((u32)1 << 2)
 #define BUTTON_X      ((u32)1 << 10)
 #define BUTTON_Y      ((u32)1 << 11)
 #define BUTTON_ANY    0x00000FFF
 

Attachments

  • GodMode9_lr_swap.firm.zip
    272.5 KB · Views: 37
  • Like
Reactions: CoolMe and alx4130

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
I think to fix that error you just need to install firmtool, should just be pip install -U git+https://github.com/TuxSH/firmtool.git as per the README. (Depending on how Python is installed you may need to swap pip for pip3, python3 -m pip, or py -3 -m pip)


It seems it's very simple to swap around the buttons, just gotta swap around a couple defines. I've attached a build with L/SELECT and R/START swapped, I didn't change anything visually so just press SELECT whenever it says L and START whenever it says R, I picked those since they're rarely used but I can do something else if needed.

Diff:
diff --git a/common/hid_map.h b/common/hid_map.h
index 7f2ac2a..083f04b 100755
--- a/common/hid_map.h
+++ b/common/hid_map.h
@@ -2,14 +2,14 @@
 
 #define BUTTON_A      ((u32)1 << 0)
 #define BUTTON_B      ((u32)1 << 1)
-#define BUTTON_SELECT ((u32)1 << 2)
-#define BUTTON_START  ((u32)1 << 3)
+#define BUTTON_SELECT ((u32)1 << 9)
+#define BUTTON_START  ((u32)1 << 8)
 #define BUTTON_RIGHT  ((u32)1 << 4)
 #define BUTTON_LEFT   ((u32)1 << 5)
 #define BUTTON_UP     ((u32)1 << 6)
 #define BUTTON_DOWN   ((u32)1 << 7)
-#define BUTTON_R1     ((u32)1 << 8)
-#define BUTTON_L1     ((u32)1 << 9)
+#define BUTTON_R1     ((u32)1 << 3)
+#define BUTTON_L1     ((u32)1 << 2)
 #define BUTTON_X      ((u32)1 << 10)
 #define BUTTON_Y      ((u32)1 << 11)
 #define BUTTON_ANY    0x00000FFF
That's what I tried doing, but it still errors. It built firmware tool, but it's not in devkitPro. Do I need to put it in tools?
 

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
xn--rck9c.xn--tckwe
XP
3,902
Country
United States
That's what I tried doing, but it still errors. It built firmware tool, but it's not in devkitPro. Do I need to put it in tools?
Hmm, maybe try /opt/devkitpro/msys2/usr/bin/python3.exe -m pip install -U git+https://github.com/TuxSH/firmtool.git actually, looks like msys2 has its own special Python so try explicitly using its pip.
 
  • Like
Reactions: godreborn

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
Hmm, maybe try /opt/devkitpro/msys2/usr/bin/python3.exe -m pip install -U git+https://github.com/TuxSH/firmtool.git actually, looks like msys2 has its own special Python so try explicitly using its pip.
this error'd in windows. and, it says that it has to do with the package.
 

Pk11

A catgirl with a DSi
Member
Joined
Jun 26, 2019
Messages
1,285
Trophies
1
Age
22
Location
米国
Website
xn--rck9c.xn--tckwe
XP
3,902
Country
United States
this error'd in windows. and, it says that it has to do with the package.
Are you using msys2 or cmd? If you're using cmd might need to do C:\opt\devkitpro\msys2\usr\bin\python3.exe -m pip install -U git+https://github.com/TuxSH/firmtool.git (or whatever the exact path is, might need to leave out the "opt\")

I don't use Windows much so not sure exactly... I know it can be a bit of a pain with all the different msys2 and cmd and such, could also help to just run it in msys2 instead of cmd or the other way around.

Might also help to quote the URL in the command.
 
  • Like
Reactions: godreborn

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
1653445240020.png


I got it to work in linux easily. there always seem to be issues with windows. here's the error:

1653445319517.png
 
  • Like
Reactions: Pk11

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
Ah weird... Afraid I'm not sure why that would happen...
I give up on it. I figured out where the files are supposed to go, but once I got to no module _cffi_backend, I couldn't figure out how to fix it. it may not work in windows cmd prompt or at least, it takes a lot of struggling to force it to work.
 

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
@Pk11 , I was successful in windows cmd prompt:

1653468038550.png


I installed setuptools via pip (that's what was causing the error before, as it didn't know what to do with setup python scripts), then I install cffi, which created the backend file via the python3 that was in devkitpro's folder, and I installed pycryptodome as you can see above. And, I needed to install libffi and libffi-devel to get ffi.h via pacman. :D
 
Last edited by godreborn,
  • Like
Reactions: Pk11

godreborn

Welcome to the Machine
Member
Joined
Oct 10, 2009
Messages
38,471
Trophies
3
XP
29,138
Country
United States
@Pk11 , I had a great idea, to make an mklink for the python3.9 in the devkitpro folder, and naming it python4.exe. it should work. btw, you also don't need to install Crypto or pycryptodome. using that command to install firmtool will install pycryptodome as well. I fixed and optimized my setup, so now I'm making a disk image:

1653493705629.png


1653494075041.png
 
Last edited by godreborn,

alerene

New Member
Newbie
Joined
Aug 8, 2009
Messages
4
Trophies
1
XP
43
Country
Italy
HI.
I know it's been a long time, I have the same problem.

error make godmode9.png


I have already installed:
setuptools and cffi and via pip
libffi and libffi-devel via pacman
also pip install .... /firmtool.git
which also installs "pycryptodome"

I don't know what else to try, anyone who can help me, Thanks ... :nds:
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    I think I did then it broke a few months later
  • Psionic Roshambo @ Psionic Roshambo:
    Used it as a web cam for a day for fun, sooo shitty it was hilarious
  • Psionic Roshambo @ Psionic Roshambo:
    I had two Ken one regular black one and a silver special edition one lol
  • K3Nv2 @ K3Nv2:
    Speaking of old stuff those green og Logitech Xbox controllers still being listed around $100
  • The Real Jdbye @ The Real Jdbye:
    eyetoy was fun yeah
  • The Real Jdbye @ The Real Jdbye:
    super basic, but the minigames were well designed
  • The Real Jdbye @ The Real Jdbye:
    i'm sure there's at least 1 emulator out there that works with it
  • Psionic Roshambo @ Psionic Roshambo:
    I had the PS3 one too and The Eye of Judgement game lol was ass
  • The Real Jdbye @ The Real Jdbye:
    i had eye toy play on ps2
  • K3Nv2 @ K3Nv2:
    Microsoft ruined it with kinect
  • Psionic Roshambo @ Psionic Roshambo:
    @The Real Jdbye, PCSX2 works with any web cam and emulates the EyeToy with it
  • K3Nv2 @ K3Nv2:
    I remember mic support for the n64 being janky
  • K3Nv2 @ K3Nv2:
    Emulation wise
  • Psionic Roshambo @ Psionic Roshambo:
    I had a kinnect.... It blew rotting goat balls
  • Psionic Roshambo @ Psionic Roshambo:
    Ken amazingly DraStic microphone support works better than real hardware lol
  • Psionic Roshambo @ Psionic Roshambo:
    On a phone of course
  • Psionic Roshambo @ Psionic Roshambo:
    Also touch is better.... Well at least better than the launch DS, the lite one improved that a ton
  • K3Nv2 @ K3Nv2:
    Touch
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I really need to dig out my USB Wii sensor bar and experiment with Wii emulation and synching Wii remotes with BT lol
  • Psionic Roshambo @ Psionic Roshambo:
    Sort of redundant since I have a Wii lol
  • Psionic Roshambo @ Psionic Roshambo:
    With HDMI lol
  • K3Nv2 @ K3Nv2:
    I also have a Wii
  • K3Nv2 @ K3Nv2:
    Tomorrow be may 4th
  • Psionic Roshambo @ Psionic Roshambo:
    Getting Wiid from Street Pharmacist Mario?
  • K3Nv2 @ K3Nv2:
    1tb SD card for whatever reason
    K3Nv2 @ K3Nv2: 1tb SD card for whatever reason