Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

2 joystick cabinet configuration issues



  • Setup:

    • RetroPie 4.4 on a Raspberry 3 board (vanilla image)
    • 2 joysticks and 15 hardware button connected via the GPIO pins of RPi
    • Retrogame to produce keyboard commands from my hardware (works fine)
    • setup the Configuration Input with ES to get a configuration to start with

    Problem:

    • I don't know how to change configuration to work for player 2: /opt/retropie/configs/all/emulationstation/es_input.cfg. Do I really have to change this file instead of retroarch.cfg?
    • changes in /opt/retropie/configs/all/retroarch.cfg don't have any effect
    • changes to ~/RetroPie/roms/arcade/pacman.zip.cfg doesn't have any effect


  • Maybe using the deviceGUID for type=keyboard can do the trick (es_input.cfg). But again, it would be nicer to do it in retroarch.cfg.


  • Global Moderator

    @schmiddyman said in 2 joystick cabinet configuration issues:

    I don't know how to change configuration to work for player 2: /opt/retropie/configs/all/emulationstation/es_input.cfg. Do I really have to change this file instead of retroarch.cfg?

    No, that file is only used by Emulationstation, it doesn't directly affect the emulators.

    changes in /opt/retropie/configs/all/retroarch.cfg don't have any effect

    You're not supposed to have the joystick config there.

    changes to ~/RetroPie/roms/arcade/pacman.zip.cfg doesn't have any effect

    They should, if you're using the right emulator - the Libretro based ones.

    Your problem seems to be using the 'RetroGame' stuff to map your controller - it's only a single gamepad seen by RetroArch and that's why P2 cannot be 'detected' or configured. When you configured your input in Emulationstation, how many controllers did it say it detected ?



  • @mitu RetroGame simulates keyboard strokes just as a regular keyboard. It is not a joystick driver as such. I then wanted to map these strokes in the retroarch.cfg file to the according player 1 + 2 controls. But for some reasons this mapping doesn't seem to work. Something must be missing.


  • Global Moderator

    @schmiddyman You can use the mk_arcade_joystick_rpi driver to simulate a gamepad pair (button + joystick). The system (including RetroArch) would see them as 2 separate gamepads. The driver is included in RetroPie and can be installed from the driver package section.



  • @mitu I tried that but couldn't get it to work with a two joystick configuration. First, it didn't install properly through the menu. Then I installed it manually via the link. Calling following would throw an error with invalid argument.
    sudo modprode mk_arcade_joystick_rpi map=4,5 gpio=13,11,15,19,10,8,-1,16,18,-1,-1 gpio2=31,29,33,35,24,-1,-1,26,-1,32,36,-1,-1



  • @schmiddyman I ended up using the RetroGame driver. But had to add following line:
    SUBSYSTEM=="input", ATTRS{name}=="retrogame", ENV{ID_INPUT_KEYBOARD}="1"
    in
    sudo nano /etc/udev/rules.d/10-retrogame.rules
    great description:
    https://learn.adafruit.com/retro-gaming-with-raspberry-pi/
    Now it all works :)



  • Thanks for sharing your solution so others can find it.



  • @schmiddyman said in 2 joystick cabinet configuration issues:

    gpio=13,11,15,19,10,8,-1,16,18,-1,-1 gpio2=31,29,33,35,24,-1,-1,26,-1,32,36,-1,-1

    From a cursory view.
    Unless you used the hotkey-btn branch your provided list for gpio2 is too long.
    In your gpio parameters you provide 16 Pins/Buttons but initially you mention 15 buttons?!

    However, good to see you found a different solution.



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.