Autoconfig with 2 identical Gamepads

Hello! I’m have a Reto Pie box with two Xbox360 controllers using xboxdrv as driver. And I want RetroArch to configure them both via the autoconfig feature. Currently only one controller gets configured.

My autoconfig file looks like this:


input_device = "Xbox Gamepad (userspace driver)"
input_driver = "udev"
input_b_btn = "4"
input_y_btn = "6"
input_select_btn = "12"
input_start_btn = "13"
input_up_btn = "0"
input_down_btn = "1"
input_left_btn = "2"
input_right_btn = "3"
input_a_btn = "5"
input_x_btn = "7"
input_l_btn = "8"
input_r_btn = "9"
input_l2_btn = "10"
input_r2_btn = "11"
input_l3_btn = "15"
input_r3_btn = "16"
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"
input_menu_toggle_btn = "14"

And the retroarch.cfg:


# Path to core options config file.
# This config file is used to expose core-specific options.
# It will be written to by RetroArch.
# A default path will be assigned if not set.
core_options_path = /opt/retropie/configs/all/retroarch-core-options.cfg

# Sets the "system" directory.
# Implementations can query for this directory to load BIOSes, system-specific configs, etc.
system_directory = /home/pi/RetroPie/roms/../BIOS

# Flushes config to disk on exit. Useful for menu as settings can be modified.
# Overwrites the config. #include's and comments are not preserved.
config_save_on_exit = false

#### Video

# Use threaded video driver. Using this might improve performance at possible cost of latency and more video stuttering.
video_threaded = true

# Smoothens picture with bilinear filtering. Should be disabled if using pixel shaders.
video_smooth = false

# A floating point value for video aspect ratio (width / height).
# If this is not set, aspect ratio is assumed to be automatic.
# Behavior then is defined by video_aspect_ratio_auto.
video_aspect_ratio = 1.33

# Defines a directory where shaders (Cg, CGP, GLSL) are kept for easy access.
video_shader_dir = /opt/retropie/emulators/RetroArch/shader/

#### Input

# Enable input auto-detection. Will attempt to autoconfigure
# joypads, Plug-and-Play style.
input_autodetect_enable = true

# Directory for joypad autoconfigs (PC).
# If a joypad is plugged in, that joypad will be autoconfigured if a config file
# corresponding to that joypad is present in joypad_autoconfig_dir.
# Input binds which are made explicit (input_playerN_*_btn/axis) will take priority over autoconfigs.
# Autoconfigs can be created with retroarch-joyconfig, manually, or with a frontend.
# Requires input_autodetect_enable to be enabled.
joypad_autoconfig_dir = /opt/retropie/emulators/RetroArch/configs/

# Keyboard input. Will recognize letters ("a" to "z") and the following special keys (where "kp_"
# is for keypad keys):
#
#   left, right, up, down, enter, kp_enter, tab, insert, del, end, home,
#   rshift, shift, ctrl, alt, space, escape, add, subtract, kp_plus, kp_minus,
#   f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12,
#   num0, num1, num2, num3, num4, num5, num6, num7, num8, num9, pageup, pagedown,
#   keypad0, keypad1, keypad2, keypad3, keypad4, keypad5, keypad6, keypad7, keypad8, keypad9,
#   period, capslock, numlock, backspace, multiply, divide, print_screen, scroll_lock,
#   tilde, backquote, pause, quote, comma, minus, slash, semicolon, equals, leftbracket,
#   backslash, rightbracket, kp_period, kp_equals, rctrl, ralt
#
# Keyboard input, Joypad and Joyaxis will all obey the "nul" bind, which disables the bind completely, 
# rather than relying on a default.
input_player1_a = x
input_player1_b = z
input_player1_y = a
input_player1_x = s
input_player1_start = enter
input_player1_select = rshift
input_player1_l = q
input_player1_r = w
input_player1_left = left
input_player1_right = right
input_player1_up = up
input_player1_down = down

# Key to exit RetroArch cleanly. 
# Killing it in any hard way (SIGKILL, etc) will terminate RetroArch without saving RAM, etc.
# On Unix-likes, SIGINT/SIGTERM allows a clean deinitialization.
input_exit_emulator = escape

# Applies next and previous shader in directory.
input_shader_next = m
input_shader_prev = n

# Hold button down to rewind. Rewinding must be enabled.
input_rewind = r

#### Misc

# Enable rewinding. This will take a performance hit when playing, so it is disabled by default.
rewind_enable = false

# Rewinding buffer size in megabytes. Bigger rewinding buffer means you can rewind longer.
# The buffer should be approx. 20MB per minute of buffer time.
rewind_buffer_size = 10

# Rewind granularity. When rewinding defined number of frames, you can rewind several frames at a time, increasing the rewinding speed.
rewind_granularity = 2

# Screenshots output of GPU shaded material if available.
video_gpu_screenshot = true

What needs to be changed in order to get RetroArch to configure both controllers for example for player one and two?

Is xboxdrv exposing both the control pads as “Xbox Gamepad (userspace driver)”? By default doesn’t it just grab the first one? However, why are you using xboxdrv when there is already an autoconfig for the raw udev device at https://github.com/libretro/retroarch-j … aster/udev that you could use. For the record I’ve used auto config with 4 Sony DS3 pads and it just detected and assigned them all correctly, so I don’t see why it won’t for 360 pads if they are exposed to the system correctly.

Yes they are both recognized as “Xbox Gamepad (userspace driver)” by RetroArch and one gets configured for player one, but the second one doesn’t get configured for player two. I’m using xboxdrv because I could never really get RetroArch working with the xpad driver and it’s often suggested to use xboxdrv instead.

Looks like I figured it out. The issue was in

input_device = "Xbox Gamepad (userspace driver)"

So I just dublicated my autoconfig file and changed that line in the copy to

input_device = "Xbox Gamepad (userspace driver) #2"

If someone knows how to make this work without the second file please let me know.

I think this behavior is wrong, autoconfig should use id_vendor/id_product instead of name of the device. Using name of the device cause problems with different adapter (different id_vendor/id_product) with same name (usb huijia controllers) and same controllers with different names (multiple ps3, xbox, … gamepad connected) but same id_vendor/id_product. A change on this would be really nice.

In most cases you would be right and that is afaik possible with the autoconfig. But since I’m using xboxdrv to wrap those endless variations of xbox gamepads I can’t uses that option.

I recently stumbled upon this as well. I have two x360 controllers going through one receiver. I was able to get auto configs for them fine but i am having an issue with assignment.

Since one receiver is being used both controllers count as one port. I have a third controller connected in my case its a generic dinput controller so then i shut off both x360 controllers while in-game. My dinput controller gets assigned to player 1 and player 2 because the dinput controller is now considered port 0 whereas before both x360 controllers were considered port 0.

Expected behavior would be that the dinput controller would be assigned to player 1 only on port 0, player 2 would become unassigned.

I am using 1/4/2015 nightly on win8.1.

I am also unable to use a second, identical 360 controller. I have tried with two wired ones, and two wireless ones, and a combination of both. Nothing works. Was there ever a resolution to this? Thanks!

Just to chime in, with the latest nightly (1/31 build), I plugged up 2 wired 360 arcade sticks and was able to map them in RGUI and use them in-game with no problem. The only potential sticking point I had was that when I first went back into game, they both controlled P1, but I just went back into the input menu and set one of them back to user 1: screenshot That’s it.