Configuring For Multiple Different Controllers

Home Forums RetroPie Project Everything else related to the RetroPie Project Configuring For Multiple Different Controllers

This topic contains 5 replies, has 4 voices, and was last updated by Profile photo of white-elephant white-elephant 2 years, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #24377
    Profile photo of katanaswordfish
    katanaswordfish
    Participant

    Hey guys, been putting my RPi to good use with RetroPie, and I’ve been wondering how I might configure RetroArch/EmulationStation/etc. to support multiple different types of controllers (i.e. Dualshock3, Dualshock4, Xbox360, arcade sticks, generic usb controllers, etc.) at the same time.

    I have a bunch of different input devices and controllers lying around, some of which are better for certain games than others. I’d like to be able to write a config for each of them so that whatever I plug into my Pi will work. I’d like to be able to do this for each player as well, if possible. For example, maybe P1 plugs in an arcade stick and player 2 plugs in a dualshock 3.

    I’d don’t mind writing a bunch of config files ahead of time so that a variety of controller will work. Any ideas?

    #27735

    Alex

    I have the same Issue. I’m trying to setup my XBox 360 controller as an alternative to my two SNES controllers if i want to play wireless.
    If you have a solution for this please share it with us.

    #81780
    Profile photo of T33Hud
    T33Hud
    Participant

    Katanaswordfish: to map your controllers for emulationstation, just run the input config with your new device. That will add the device to the needed config and allow you to navigate and launch games. (version 2.3)

    I’m looking for help here too. I am fully configured for mu 2 usb SNES controllers but want to add NES controller mappings within the emulators. I could use some help configuring the retroarch.cfg file to accept multiple types of controllers that would function as player1 or 2

    #82668
    Profile photo of mr9v9
    mr9v9
    Participant

    I could help with mapping out the same controller to use different keys in the other emulators. But I am at a loss as to how to get RetroArch to understand what controller needs to be read in the main config file when you plug in a PS3 controller as player one, and ignore the mappings for the snes usb controller you had plugged in earlier.
    I also noticed there is a slight problem with mapping the PS3 controller for my build as if it writes it’s own config no matter what I change, I suspect it has something to do with not having enough power draw to the controller from the usb port (ps3 controller draws 300amps, but the usb from the pi can only supply 100amps).
    My guess is when you want to map a certain controller you would use input_device somewhere in the file?:

    # SNES CONTROLLERUSB
    input_player1_joypad_index = 0
    <strong>input_device = "USB,2-axis 8-button gamepad  "</strong>
    input_driver = "udev"
    input_b_btn = "1"
    input_y_btn = "3"
    input_select_btn = "6"
    input_start_btn = "7"
    input_up_axis = "-1"
    input_down_axis = "+1"
    input_left_axis = "-0"
    input_right_axis = "+0"
    input_a_btn = "0"
    input_x_btn = "2"
    input_l_btn = "4"
    input_r_btn = "5"
    
    input_enable_hotkey_btn = "6"
    input_exit_emulator_btn = "7"
    
    # PS3 CONTROLLERUSB
    input_player1_joypad_index = 0
    <strong>input_device = "Sony PLAYSTATION(R)3 Controller"</strong>
    input_driver = "udev"
    input_b_btn = "14"
    input_y_btn = "15"
    input_select_btn = "0"
    input_start_btn = "3"
    input_up_btn = "4"
    input_down_btn = "6"
    input_left_btn = "7"
    input_right_btn = "5"
    input_a_btn = "13"
    input_x_btn = "12"
    input_l_btn = "10"
    input_r_btn = "11"
    input_l2_btn = "8"
    input_r2_btn = "9"
    input_l_x_plus_axis = "+0"
    input_l_x_minus_axis = "-0"
    input_l_y_plus_axis = "+1"
    input_l_y_minus_axis = "-1"
    input_r_x_plus_axis = "+2"
    input_r_x_minus_axis = "-2"
    input_r_y_plus_axis = "+3"
    input_r_y_minus_axis = "-3"

    *This is an example config and by no means how I use mine.*
    But then the problem starts as to which hotkeys get mapped to what controller? Because 6 and 7 are down and left on the ps3 controller, & select-start on the snes controller. So you try and map only the controls to the PS3 controller to be used with the PSX emulator inside the PSX Retroarch config file, right? Wrong! It still takes hotkeys from your main config file, and another config file from your controllers folder in the Retroarch emulator folder. Fine so you delete the controls in the main file, and also the controller config, but leave the file how you want it inside the PSX emu config, Wrong again!
    My main problem is no matter which files I manipulate, or even delete…I still get odd anomalies with using my PS3 controller in PSX Retroarch that forces the controller to use weird mappings even though I specifically set up the mappings I wanted for just that emulator with nothing else connected>
    I press R3 and it acts like TRIANGLE, I press L3 it acts like X…so I swap them, boot the game again and they are supposed to be switched but what do you know they register the same input anyway. I hook up my snes usb controller, delete some hotkeys from the PSX emulator, and add some back for the snes controller, and Bam! it works flawless.
    So in closing i am looking for a solution in the config file that would make it easy to play with what config you write and for Retroarch to actually use the correct one for the controller attached at the time…seems easy enough right?

    #82750
    Profile photo of mr9v9
    mr9v9
    Participant

    *update*
    I have a feeling it has to do with these settings in the Retroarch.cfg

    # Sets which libretro device is used for a player.
    # Devices are indentified with a number.
    # This is normally saved by the menu.
    # Device IDs are found in libretro.h.
    # These settings are overridden by explicit command-line arguments which refer to input devices.
    # None: 0
    # Joypad (RetroPad): 1
    # Mouse: 2
    # Keyboard: 3
    # Generic Lightgun: 4
    # Joypad w/ Analog (RetroPad + Analog sticks): 5
    # Multitap (SNES specific): 257
    # Super Scope (SNES specific): 260
    # Justifier (SNES specific): 516
    # Justifiers (SNES specific): 772
    
    # input_libretro_device_p1 =
    # input_libretro_device_p2 =
    # input_libretro_device_p3 =
    # input_libretro_device_p4 =
    # input_libretro_device_p5 =
    # input_libretro_device_p6 =
    # input_libretro_device_p7 =
    # input_libretro_device_p8 =

    I think if you place a controller in device 1, and try another controller for device 2 or even 3 it should work but I don’t have time to test. Maybe I’m wrong and it’s for multitap enabled games ect.
    I need others to chime in on this.

    #82793
    Profile photo of white-elephant
    white-elephant
    Participant

    Hi,

    Just tackled a similar issue, with a wired GPIO nes pads and USB snes pads.

    What made them all work with properly was:

    1. deleting (or commenting) the “input_player#_whatever=” in the
    /opt/retropie/configs/all/retroarch.cfg
    2. making seperate configuration files for each type of joystick in the
    /opt/retropie/emulators/RetroArch/configs/

    for example, I made this file for my USB snes pad:
    /opt/retropie/emulators/RetroArch/configs/USBGamepad.cfg

    
    input_device = "USB Gamepad "
    input_driver = "udev"
    
    input_a_btn = "1"
    input_b_btn = "2"
    input_x_btn = "0"
    input_y_btn = "3"
    input_l_btn = "4"
    input_r_btn = "5"
    input_select_btn = "8"
    input_start_btn = "9"
    input_up_axis = "-1"
    input_down_axis = "+1"
    input_left_axis = "-0"
    input_right_axis = "+0"
    
    input_enable_hotkey_btn = "8"
    input_exit_emulator_btn = "9"

    and my GPIO nes controller has another file (it’s a Japanese Famicom, and different from US wiring)
    /opt/retropie/emulators/RetroArch/configs/NESpad.cfg

    
    input_device = "NES pad"
    input_driver = "udev"
    
    input_b_btn = "1"
    input_select_btn = "2"
    input_start_btn = "3"
    input_up_axis = "-1"
    input_down_axis = "+1"
    input_left_axis = "-0"
    input_right_axis = "+0"
    input_a_btn = "0"
    
    input_enable_hotkey_btn = "2"
    input_exit_emulator_btn = "3"

    * I got the name of the device from running:
    udevadm info --query=all --n /dev/input/js0 --attribute-walk

Viewing 6 posts - 1 through 6 (of 6 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar