mk_arcade_joystick_rpi 2 joysticks custom GPIOs
-
Pi Model: 4B
Power Supply used: official
RetroPie Version Used: 4.7.15
Built From: Pre made SD Image on RetroPie website
USB Devices connected: sometimes keyboard
Controller used: 1/2 2 button joysticks via DB9 connected to GPIOs, USB snes controller, USB keyboardHi,
I've just started to migrate retropie from my rpi3 to rpi4. I say migrate, it's a clean install that I'm going to transfer config files over to.
I've started with getting the joysticks working.On the pi3 that I setup about 3 years ago I was using mk_arcade_joystick_rpi installed from github, using map=4,5 to use custom GPIOs and it worked flawlessly.
However, on the pi4 I'm having an issue getting 2 joysticks to work with the same build.
If I set to map=1 or map=1,2, or map=4 then I can successfully test with jstest.
if I set it to map=4,5 or just map=5 then I get the following error:modprobe: ERROR: could not insert 'mk_arcade_joystick_rpi': No such device
For clarity, this is the line I used on the pi3 in the modprobe.d conf file and would like to use on the pi4:
options mk_arcade_joystick_rpi map=4,5 gpio=17,27,22,24,-1,-1,18,23,-1,-1,-1,-1,-1 gpio2=10,9,11,7,-1,-1,25,8,-1,-1,-1,-1,-1
I have also tried installing the driver from the retropie-setup and get the same error.
I'm not using any GPIO expanders, just the pins on the Pi.
Any help greatly appreciated!
-
I should have said, I have tried with 0.1.5 , and I believe the version from retropie-setup shows as 0.1.7? Tried both with same error.
-
@craggus2000 Hi Bender ;-) Another GPIO
mk_arcade_joystick
user here.I assume from your config your want to address 13 buttons? (4 for the axis, 9 push buttons).
If yes: Do remove the current
mk_arcade_joystick
module viaretropie_setup.sh
script.Then do change to the
retropie-hotkeybtn
branch: Edit this file and line inside your~/RetroPie-Setup
folder. Change the lastretropie
toretropie-hotkeybtn
. This selects a different branch.Afterwards enter the
retropie_setup.sh
again and install the modulemk_arcade_joystick
.Reboot and retry if
a) the module is loaded:sudo lsmod | grep arcade
b) you see some input devices at/dev/input
:ls -l /dev/input/js*
Rationale: The current
retropie
branch expects a MCP23017 (or similar) as GPIO expander. Theretropie-hotkeybtn
does use "barebone" GPIO.HTH
-
@lolonois said in mk_arcade_joystick_rpi 2 joysticks custom GPIOs:
@craggus2000 Hi Bender ;-) Another GPIO
mk_arcade_joystick
user here.I assume from your config your want to address 13 buttons? (4 for the axis, 7 push buttons).
If yes: Do remove the current
mk_arcade_joystick
module viaretropie_setup.sh
script.Then do change to the
retropie-hotkeybtn
branch: Edit this file and line inside your~/RetroPie-Setup
folder. Change the lastretropie
toretropie-hotkeybtn
. This selects a different branch.Afterwards enter the
retropie_setup.sh
again and install the modulemk_arcade_joystick
.Reboot and retry if
a) the module is loaded:sudo lsmod | grep arcade
b) you see some input devices at/dev/input
:ls -l /dev/input/js*
Rationale: The current
retropie
branch expects a MCP23017 (or similar) as GPIO expander. Theretropie-hotkeybtn
does use "barebone" GPIO.HTH
@Lolonois , Thanks very much for that advice, it worked perfectly!
-
@craggus2000 Thanks for reporting back. Have fun. Please edit your first post and add in the something like [solved], so it is more likely to be picked up by search engines.
Your question made me updating my hint from last year on that topic.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.