New gamepad autoconf process


#1

Updated intructions

Starting with 1.2 we’ve refactored the autoconf system. From 1.2.2 onwards the process to configure and contribute autoconf files is as follows:

Useful tools:

These tools are useful in cases where you can’t navigate the gui (no touchscreen or no supported controllers available) Option 1, navigate the screen with a touchscreen or a mouse

  • Load RetroArch
  • Set your autoconf dir to some directory were you can read/write (if your device is rooted you can skip this step)
  • Update autoconf profiles in case there is something new
  • Navigate to Input Settings (use the touchscreen)
  • Select User 1 default all
  • Select User 1 bind all, bind anything that you don’t have to a single button
  • Go back to the previous menu and select Input 1 User Binds and try to correct anything that might be mapped wrong, the GUI is a bit to sensitive, also clean up any binds for buttons you don’t have
  • Go to input settings and select User 1 Save Autoconfig Then make sure to select User 1 default all so the manual bindings are cleared, restart and test, if everything went smoothly it should now detect your controller just fine

You’ll end up with a file like this:


input_vendor_id = 14368
input_product_id = 9
input_driver = "android"
input_device = "8Bitdo NES30 Pro"
input_b_btn = "97"
input_y_btn = "100"
input_select_btn = "109"
input_start_btn = "108"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "96"
input_x_btn = "99"
input_l_btn = "102"
input_r_btn = "103"
input_l2_btn = "104"
input_r2_btn = "105"
input_l3_btn = "106"
input_r3_btn = "107"
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"

Autoconf now works based on a score system, matching VID/PID adds 3 points, an exact name adds 2 points, and a partial name match adds 1 point so the more information the better. VID/PID won’t be saved unless you’re running commit 766b6b811ee678e847053f215be70c7c995717e3 or later.

Now the touch ups to the file if you want to submit the file

input_display_name = "NES30 Pro Controller"

Add this to add a friendly display name, cosmetic only, many devices just print “Virtual” or “Broadcom Bluetooth”, so this makes the osd message “better”

input_vendor_id = 14368
input_product_id = 9

Add these if they weren’t added to make sure the match is exact

input_b_btn_label = "B"
input_y_btn_label = "A"
input_select_btn_label = "SELECT"
input_start_btn_label = "START"
input_up_axis_label = "D-Pad Up"
input_down_axis_label = "D-Pad Down"
input_left_axis_label = "D-Pad Left"
input_right_axis_label = "D-Pad Right"
input_a_btn_label = "A"
input_x_btn_label = "X"
input_l_btn_label = "L"
input_r_btn_label = "R"
input_l2_btn_label = "L2"
input_r2_btn_label = "R2"
input_l3_btn_label = "L3"
input_r3_btn_label = "R3"
input_l_x_plus_axis_label = "Left Analog X+"
input_l_x_minus_axis_label = "Left Analog X-"
input_l_y_plus_axis_label = "Left Analog Y+"
input_l_y_minus_axis_label = "Left Analog Y-"
input_r_x_plus_axis_label = "Right Analog X+"
input_r_x_minus_axis_label = "Right Analog X-"
input_r_y_plus_axis_label = "Right Analog Y+"
input_r_y_minus_axis_label = "Right Analog Y-"

Add these to have friendly labels in the input binds, follow retropad button naming convention

That should be it, that file should work perfectly to hotplug your pads and you could contribute it to the autoconf repo I’ll try to streamline the process in the future and maybe even have a submit option… who knows

Option 2, use the external tools

  • Load USB host viewer and write down the VID/PID for your device, it should be something like this (if your controller is BT this might not be available):

  • Convert those digits with a calculator (Google will do, just type 0x0955 to decimal) and write them down in a text file:

input_vendor_id = 2389
input_product_id = 29187
  • Go to bluetooth settings and write down the name of the controller EXACTLY as it’s shown there

  • Add that to your cfg

input_vendor_id = 2389
input_product_id = 29187
input_device = "8Bitdo NES30 Pro"

Now use keytest to determine the keycodes for your controller, write them down and add them to the config file, sadly keytest doesn’t support analogs, but this should get you going at least:


input_vendor_id = 14368
input_product_id = 9
input_driver = "android"
input_device = "8Bitdo NES30 Pro"
input_b_btn = "97"
input_y_btn = "100"
input_select_btn = "109"
input_start_btn = "108"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_a_btn = "96"
input_x_btn = "99"
input_l_btn = "102"
input_r_btn = "103"
input_l2_btn = "104"
input_r2_btn = "105"
input_l3_btn = "106"
input_r3_btn = "107"
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"

Then save the cfg and push it to your device somehow, or push them to the repo and wait for the next nightly. If you want to push to the builtin location, you should write to /data/data/com.retroarch/autoconfig/android

Edit: From 4b234a onwards you should be able to get the VID/PID from the system information panel, this only shows once a pad is autoconfigured but it’s still useful to be able to touch up the config after creating it.


Autoconfig for Tomee NES adapter not working?
#2

Thanks for the info, all buttons maps work except when I press back in my Archos Gamepad (joy_key 0) RA reconized like “NVIDIA Corporation NVIDIA Controller v01.01 port 1” and with f the analog sticks RA reconized them like “Ultimarc UHID port 1”


#3

Ugh that means the back button is a separate device and the analogs a third device. It would take some source code Hacks to support that one correctly.


#4

With Key Test in the Archos Gamepad, for all the buttons deviceId = 3, for the analog sticks deviceId = 2 and for the back button deviceId = -1


#5

Sucks, I don’t want to add such a hack since I can’t test it (I don’t have that device) The shield hack works well since it’s only the back button but it introduces a bunch of problems by itself. Can you tell me the device names at least? I can cook up a test build I guess


#6

[QUOTE=Radius;25928]Sucks, I don’t want to add such a hack since I can’t test it (I don’t have that device) The shield hack works well since it’s only the back button but it introduces a bunch of problems by itself. Can you tell me the device names at least? I can cook up a test build I guess[/QUOTE]

Archos Gamepad (joy_key)

deviceId = 3

KEYCODE_DPAD_UP Keycode: 19 scanCode=103 KEYCODE_DPAD_RIGHT Keycode: 22 scanCode=106 KEYCODE_DPAD_DOWN Keycode: 20 scanCode=108 KEYCODE_DPAD_LEFT Keycode: 21 scanCode=105 KEYCODE_BUTTON_X Keycode: 99 scanCode=307 KEYCODE_BUTTON_Y Keycode: 100 scanCode=308 KEYCODE_BUTTON_B Keycode: 97 scanCode=305 KEYCODE_BUTTON_A Keycode: 96 scanCode=304 KEYCODE_BUTTON_L1 Keycode: 102 scanCode=310 KEYCODE_BUTTON_R1 Keycode: 103 scanCode=311 KEYCODE_BUTTON_L2 Keycode: 104 scanCode=312 KEYCODE_BUTTON_R2 Keycode: 105 scanCode=313 KEYCODE_BUTTON_SELECT Keycode: 109 scanCode=314 KEYCODE_BUTTON_START Keycode: 108 scanCode=315

for the analog stick (only the left stick is reconigzed for Key Test)

deviceId = 2

KEYCODE_DPAD_UP Keycode: 19 scanCode=0 KEYCODE_DPAD_RIGHT Keycode: 22 scanCode=0 KEYCODE_DPAD_DOWN Keycode: 20 scanCode=0 KEYCODE_DPAD_LEFT Keycode: 21 scanCode=0

back button

deviceId=-1

KEYCODE_BACK Keycode: 4 scanCode=0

volume buttons

deviceId=0

KEYCODE_VOLUME_UP Keycode: 24 scanCode=115 KEYCODE_VOLUME_DOWN Keycode: 25 scanCode=114


#7

I need the names that appear on input settings for each device


#8

if I press first the pad buttons

screen message is …" joy_key configured in port #0"

Settings - Input:

User 1 Device Index joy_key

if I press first any of the sticks

screen message is …“Ultimarc UHID configured in port #0

Settings - Input:

User 1 Device Index joystick

if I press first menu back

screen message is… “NVIDIA Corporation NVIDIA Controller v01.01 configured in port #0

Settings - Input:

User 1 Device index NVIDIA Corporation NVIDIA Controller v01.01


#9

Ugh, I dunno how to fix this, the names are so generic… I’ll rename gpio/virtual to remove the nvidia reference and it should work fine for the back button but about the other two I see no easy way to make them behave as one controller

Edit: ok, try this build please http://bot.libretro.com/.radius/retroarch-debug.apk It should make the back button work as back without mapping it to another port, making both joy_key and joystick work as one is trickier and this user has reported this before, I might tackle that tomorrow like we tackled the xperia play

Please try to get pid/vid of joy_key and joystick with this tool https://play.google.com/store/apps/details?id=com.synchack.android.usbhostviewer&hl=es Or you can check with adb and RetroArch with verbose logging enabled


#10

Well first at all thanks for the effort and attention…the weid part is that for the second player I can remap all the buttons including the sticks, maybe an option to swap the pads, it could work to cheat RA.


#11

Then I guess it should work fine if you set autoconfigure to off and just map the stuff manually Does the build I linked fix the back button at least?


#12

[QUOTE=Radius;25960]Ugh, I dunno how to fix this, the names are so generic… I’ll rename gpio/virtual to remove the nvidia reference and it should work fine for the back button but about the other two I see no easy way to make them behave as one controller

Edit: ok, try this build please http://bot.libretro.com/.radius/retroarch-debug.apk It should make the back button work as back without mapping it to another port, making both joy_key and joystick work as one is trickier and this user has reported this before, I might tackle that tomorrow like we tackled the xperia play

Please try to get pid/vid of joy_key and joystick with this tool https://play.google.com/store/apps/details?id=com.synchack.android.usbhostviewer&hl=es Or you can check with adb and RetroArch with verbose logging enabled[/QUOTE]

Well I did try the debug build, when you press menu back, it go out completely to the start launcher or to the android menu, RA debug detect my ARCHOS like Generic GPIO device, now I can map all buttons and sticks like one pad , so when I use the analog it works in game but sometimes randomly RA crash to the android menu.

The data about pid/vid is this USB\VID_0E79&PID_14A0\L7H03HG1DR

(With the stable release is I set autoconfigure to off, I can map all buttons but when I start to map the sticks, the pad buttons are disable, and when I start to map the buttons pad, then the sticks are disable)


#13

I tried connecting my ipega controller with Bluez IME and it did not detect the controller at all. I also tried the binding thing and nothing has changed. Used on bungbungame miss 4.1.


#14

[QUOTE=Quickgold;25964]Well I did try the debug build, when you press menu back, it go out completely to the start launcher or to the android menu, RA debug detect my ARCHOS like Generic GPIO device, now I can map all buttons and sticks like one pad , so when I use the analog it works in game but sometimes randomly RA crash to the android menu.

The data about pid/vid is this USB\VID_0E79&PID_14A0\L7H03HG1DR

(With the stable release is I set autoconfigure to off, I can map all buttons but when I start to map the sticks, the pad buttons are disable, and when I start to map the buttons pad, then the sticks are disable)[/QUOTE]

Ok, do this please, change your autoconf directory to some place you can read/write, then follow the process above and post the generated config. Do this only for the digital buttons (no back button)

Then do the same for analogs only.


#15

Sorry not sure about IME based input methods This is about real HID devices


#16

[QUOTE=Radius;26027]Ok, do this please, change your autoconf directory to some place you can read/write, then follow the process above and post the generated config. Do this only for the digital buttons (no back button)

Then do the same for analogs only.[/QUOTE]

Hi for the digital buttons

input_driver = “android” input_device = “joy_key” input_b_btn = “96” input_y_btn = “99” input_select_btn = “109” input_start_btn = “108” input_up_btn = “19” input_down_btn = “20” input_left_btn = “21” input_right_btn = “22” input_a_btn = “97” input_x_btn = “100” input_l_btn = “102” input_r_btn = “103” input_l2_btn = “104” input_r2_btn = “105” 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”

with the analogs only, only save this (even if I save the input for the second player the values are the same) after this seting, the digital buttons are deactivated

input_driver = “android” input_device = “joystick”


#17

You have to repeat the process every time (reset binds, etc) Try using an overlay to do this whole process instead of using physical inputs

https://play.google.com/store/apps/details?id=com.synchack.android.usbhostviewer&hl=es Use this to get vid/pid

Edit: ok I cooked a custom build for you, it shouldn’t autodetect anything but if I understood the xperia play hack it should allow you to map both devices succesfully http://bot.libretro.com/.radius/retroarch-debug.apk

Please map everything and then save the autoconf and paste it. Back button behavior is not fixed yet in this build, I need the autoconf to see what can I do about it. Make sure to uninstall or clean data before trying this

Edit 2 I still need the vid/pid for both devices from the app I posted earlier


#18

[QUOTE=Radius;26040]You have to repeat the process every time (reset binds, etc) Try using an overlay to do this whole process instead of using physical inputs

https://play.google.com/store/apps/details?id=com.synchack.android.usbhostviewer&hl=es Use this to get vid/pid

Edit: ok I cooked a custom build for you, it shouldn’t autodetect anything but if I understood the xperia play hack it should allow you to map both devices succesfully http://bot.libretro.com/.radius/retroarch-debug.apk

Please map everything and then save the autoconf and paste it. Back button behavior is not fixed yet in this build, I need the autoconf to see what can I do about it. Make sure to uninstall or clean data before trying this

Edit 2 I still need the vid/pid for both devices from the app I posted earlier[/QUOTE]

Hi I did use the playstore app and the data that I got was this:

0bda:8176 RTL8188CUS 802.11n WLAN Adapter Device : /dev/bus/usb/002/016 Vendor : 0x0bda Realtek Semiconductor Corp. Product : 0x8176 RTL8188CUS 802.11n WLAN Adapter Class : 0x00 (Defined at Interface level) SubClass : 0x00 Protocol : 0x00

Interface (1/1) Class : 0xff Vendor Specific Class SubClass : 0xff Vendor Specific Subclass Protocol : 0xff Vendor Specific Protocol

Endpoint (1/4) Attr. : 0x81 (num=1,IN) Type : Bulk Interval : 0x00 Packsize : 0x0200 (512)

Endpoint (2/4) Attr. : 0x02 (num=2,OUT) Type : Bulk Interval : 0x00 Packsize : 0x0200 (512)

Endpoint (3/4) Attr. : 0x03 (num=3,OUT) Type : Bulk Interval : 0x00 Packsize : 0x0200 (512)

Endpoint (4/4) Attr. : 0x84 (num=4,IN) Type : Interrupt Interval : 0x01 Packsize : 0x0040 (64)

For the custom build, I have problems for mapping buttons and analogs in the ARCHOS, in some point in the mapping process RA crash to the android menu. I can’t finish the process, the left analog is not recognized and the right analog is recognized like HAT but never finish the mapping always crash.


#19

Did you redownload the APK? it’s the same name but it’s not the same version at all. I’d need to know what causes the crash… I don’t have the device so I can’t really debug it…

A logcat | grep RetroArch would help a bit I guess


#20

[QUOTE=Radius;26066]Did you redownload the APK? it’s the same name but it’s not the same version at all. I’d need to know what causes the crash… I don’t have the device so I can’t really debug it…

A logcat | grep RetroArch would help a bit I guess[/QUOTE]

Hi, Yes! I redownload the APK, the last that you told me…well thanks for all…I almost got a complety function of my ARCHOS it was with the 1.21 stable release, all buttons and the right stick mapped fine (the right analog recognized like HAT) and with the first debug version that you post give me for the archos Generic GPIO device I did map all buttons and analogs for one player, but randomly crash.