OLD Gamepad Autoconfig Thread

Hi! in the last nighly build there is a malfunction with the saves and states folders per core, for example, if I load a core and make the config and next, load another core, the saves and states folders for the new core it makes inside the saves and states folders for previous core, like this \save es … \save es\picodrive, this doesn’t happend with per core config off.

Hi!

I tried RetroArch 1.2 on a Mad Catz M.O.J.O using a Mad Catz C.T.R.L.R which is supported by the gamepad autoconfig feature. Wenn starting the XMB GUI the controller is recognized so far. Unfortunately when I start a game the “Media Play/Pause” button doesn’t toggle the menu even if the Mad_Catz_C.T.R.L.R_(Smart).cfg contains the line

input_menu_toggle_btn = “85”

Is there anything I missed or does anyone have an idea what went wrong?

The menu button toggling issue seems to be a bug in RA 1.2 related to a commit made shortly before it was released. I first reported it in the nightly thread but several others have reported it here since.

Okay, thank you. Then I’m going to test the current and upcoming nightly builds.

The OUYA Controller doesnt work in the new RGUI. Can this be fixed or will you guys release a specific OUYA version on the Ouya Store?

I think there’s going to be a little bit of work done for Ouya, though I don’t know if it will make it to the official store.

So, are you able to use manual binds via settings > input settings? I guess I should also ask if you’re able to navigate at all…?

i can navigate on the Android Gui that boots up when you start Retroarch. but there is no option to use manual binds via Settings > input settings.

Here’s my autoconfig for HORI’s Fighting Commander 4. I’ve tested it and everything seems to work (except the menu toggle. I can’t test it since it seems to be broken in RetroArch at the moment).

HORI_CO.,LTD._Fighting_Commander_4.cfg (for L1-L3/L2-R3)

HORI_CO.,LTD._Fighting_Commander_4alt.cfg (for R1-L1/R2-L2)

Edit: I have absolutely no idea what to do with the extra two buttons. Should I leave them blank or does RetroArch have input variables for those as well?

Hi!

I noticed a wrong key code assignment for the start button in the auto-configuration file Mad_Catz_Micro_C.T.R.L.R.cfg:

input_start_btn = “82”

The Mad Catz Micro C.T.R.L.R doesn’t have a menu button, but a start button like the Mad Catz C.T.R.L.R (Smart). So the correct setting is:

input_start_btn = “108”

I am trying to contribute. I have some of the keycodes already. I have an NVidia Shield Portable and Mojo Retro Adapter and Mojo Retro Adapter Mod.

Questions:

  • How do I see the input_device string on a device without having root? Key Test is not reporting it.
  • If above is not possible, I know exactly the usb device name and usb vendor name strings, as well as vid and pid. So is input_device equal to usb device name, or is it a concatenation of vendor name + ’ ’ + device name?
  • Key test is not reporting the right analog stick analog axes. This is also true for built-in Nvidia Shield Portable controller, regardless whether I select “use right analog stick as virtual mouse” in settings or not. The right analog stick does not trigger any output on Key Test. How do I find out all the analog axes mapping?
  • Key test reports the left analog stick as a digital button press “KEYCODE_DPAD_LEFT” etc. How do I find out the analog axis?
  • Do I report Keycode or Scancode?
  • I know the digital DPAD is reported as hat directions, but Key Test is not reporting it. Shall I put in “h0up” etc.?
  • Is there any place I can save a controller config after rebinding all keys from inside retroarch rgui, and then read it in plain text WITHOUT having root access on my device? I think if I could do that, it would help with almost all my troubles.

Thanks for help and for a great emulator.

You don’t need keytest anymore, you can save the maps from within the GUI. Here is the recommended workflow

  • Load RetroArch
  • Change your autoconf directory to some folder you can read/write, most likely some place in the internal SD card
  • Go to input settings and RESET the binds for the port you are configuring
  • Bind All
  • Binding is sometimes too sensitive, so go to user # bindings and correct whatever is missing
  • Select save autoconf
  • Clean binds again and restart to verify

That’s what I did with the 8bitdo controllers (and I implemented saving) VID/PID saving are not implemented in the android input driver yet but I’l try to add that in the future

I updated the first post with the new instructions.

[QUOTE=Radius;25302]You don’t need keytest anymore, you can save the maps from within the GUI. Here is the recommended workflow

  • Load RetroArch
  • Change your autoconf directory to some folder you can read/write, most likely some place in the internal SD card
  • Go to input settings and RESET the binds for the port you are configuring
  • Bind All
  • Binding is sometimes too sensitive, so go to user # bindings and correct whatever is missing
  • Select save autoconf
  • Clean binds again and restart to verify

That’s what I did with the 8bitdo controllers (and I implemented saving) VID/PID saving are not implemented in the android input driver yet but I’l try to add that in the future[/QUOTE]

Thank you. I tried this route on my Nvidia shield with OTG cable and controller connected.

  • My controller DPAD and right analog stick cannot be bound (no reaction, it acts as if I am not pressing anything).
  • I know the controller DPAD data and right analog stick are submitted as POV hat data and rx/ry axes. That is how it shows up under Windows.
  • Maybe I should try “HID” Driver? Can I switch drivers from within Retroarch between Android and HID?
  • I have full control over how the controller is submitting data, so I could fix things on the controller side, too. I suspect android detects the controller, does some internal remapping, and decides to ignore the POV hat and the rx/ry axes for some reason.
  • This is a minor problem: When I saved the autoconfig, the device name and file name was still “Nvidia Corp…” instead of Mojo Retropad Adapter Mod. However in Retroarch, the device name showed up correctly after bind all.

[QUOTE=rsn8887;25326]Thank you. I tried this route on my Nvidia shield with OTG cable and controller connected.

  • My controller DPAD and right analog stick cannot be bound (no reaction, it acts as if I am not pressing anything).
  • I know the controller DPAD data and right analog stick are submitted as POV hat data and rx/ry axes. That is how it shows up under Windows.
  • Maybe I should try “HID” Driver? Can I switch drivers from within Retroarch between Android and HID?
  • I have full control over how the controller is submitting data, so I could fix things on the controller side, too. I suspect android detects the controller, does some internal remapping, and decides to ignore the POV hat and the rx/ry axes for some reason.
  • This is a minor problem: When I saved the autoconfig, the device name and file name was still “Nvidia Corp…” instead of Mojo Retropad Adapter Mod. However in Retroarch, the device name showed up correctly after bind all.[/QUOTE]

Yes, you can change the drivers from Android to HID, which would help you in this case, I think, I have a Bluetooth controller and I would assume it needs to be HID as well.

Edit: Using the Key Test app on my phone and my Classic Controller, I came up with the right key IDs for the corresponding buttons and made a new auto_config file. Just to be sure, I change the location for that on the Nexus 7 and have it load it up?

I want to be sure that I got this correctly, so here’s what I did with Notepad++


input_device = "Wii Classic Controller"
input_driver = "hid"
input_b_btn = "34"
input_y_btn = "33"
input_select_btn = "41"
input_start_btn = "44"
input_up_btn = "10"
input_down_btn = "11"
input_left_btn = "12"
input_right_btn = "13"
input_a_btn = "35"
input_x_btn = "30"
input_l_btn = "31"
input_r_btn = "54"
input_l2_axis = "+6"
input_r2_axis = "+7"
input_l2_btn = "71"
input_r2_btn = "72"
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 = "82"

input_b_btn_label = "A"
input_y_btn_label = "X"
input_select_btn_label = "Back"
input_start_btn_label = "Start"
input_up_btn_label = "D-Pad Up"
input_down_btn_label = "D-Pad Down"
input_left_btn_label = "D-Pad Left"
input_right_btn_label = "D-Pad Right"
input_a_btn_label = "B"
input_x_btn_label = "Y"
input_l_btn_label = "LB"
input_r_btn_label = "RB"
input_l2_axis_label = "LT"
input_r2_axis_label = "RT"
input_l3_btn_label = "Left Thumb"
input_r3_btn_label = "Right Thumb"
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-"
input_menu_toggle_btn_label = "Guide"

The key labels are unchanged as I used the Xbox 360 controller template to go off of, I’m not entirely sure if I need to change those or what, or if’d be too risky, I don’t know. Do I need to change it back to Android or HID? And is the controller name correct?

I fixed my problems. New pull request created for updated Mojo_Retro_Adapter_Mod.cfg.

It turns out the controller was reporting the right analog stick as Rx/Ry and not Z/Rz, which is what android expects. Also, the DPAD HAT value was reported as a 4 bit not an 8 bit number.

Since I can change the firmware of the controller, I changed the right stick to Z/Rz and fixed the Hat switch value, too. Those seem to be kind of standard now, I guess.

Anybody with a Mojo Retro Adapter can upgrade to the new modded firmware here by downloading the .hex files and using updatefw.exe (see readme.txt):

  • How exactly could I test HID driver mode? Is there an option in Retroarch hidden somewhere to switch drivers, or do I have to edit autoconf files blindly?

  • What is the “standard” way to report other axes, for example the L2/R2 button axes to Android, so they work using “android” driver? I know Rx/Ry is not recognized, and Key Test does not seem to report every analog axis.

  • It would help if somebody with a wired generic USB controller (not Xbox360) that has two analog sticks AND one or two analog shoulder buttons AND that can be fully mapped in Retroarch using android driver including the analog L2 and/or R2 axes. could plug this controller into windows, go to control panel, go to devices and printers, right click on the controller open up the test panel and tell me what axis names appear next to the shoulder button axes. The right stick should appear as Z/Rz axes.

EDIT: I understand it more now, I think the analog L and R Triggers should be mapped using Axis_Brake and Axis_Gas in Android. Those two correspond to USB HID axes “Brake” and “Accelerator”.

just tried the new version (1.2.1.) on my nvidia shield portable but its still not possible to get back to the Retroarch menu, whether via the back button, nor with selected L3+R3 combo…

I found the android controller specification and how the android axes map to USB HID usages. I found it in the “Android Compatibility Definition Document” here: http://static.googleusercontent.com/media/source.android.com/en//compatibility/android-cdd.pdf

On page 36 it says it all: " HID usages must be declared within a Game pad CA (0x01 0x0005).

Button HID Usage Android Button A 0x09 0x0001 KEYCODE_BUTTON_A (96) B 0x09 0x0002 KEYCODE_BUTTON_B (97) X 0x09 0x0004 KEYCODE_BUTTON_X (99) Y 0x09 0x0005 KEYCODE_BUTTON_Y (100) D-pad up D-pad down 0x01 0x0039 AXIS_HAT_Y* D-pad left D-pad right 0x01 0x0039 AXIS_HAT_X* Left shoulder button 0x09 0x0007 KEYCODE_BUTTON_L1 (102) Right shoulder button 0x09 0x0008 KEYCODE_BUTTON_R1 (103) Left stick click 0x09 0x000E KEYCODE_BUTTON_THUMBL (106) Right stick click 0x09 0x000F KEYCODE_BUTTON_THUMBR (107) Home 0x0c 0x0223 KEYCODE_HOME (3) Back 0x0c 0x0224 KEYCODE_BACK (4)

  • This usage must have a Logical Minimum of 0, a Logical Maximum of 7, a Physical Minimum of 0, a Physical Maximum of 315, Units in Degrees, and a Report Size of 4. The logical value is defined to be the clockwise rotation away from the vertical axis; for example, a logical value of 0 represents no rotation and the up button being pressed, while a logical value of 1 represents a rotation of 45 degrees and both the up and left keys being pressed.

Analog Controls HID Usage Android Button Left Trigger 0x02 0x00C5 AXIS_LTRIGGER Right Trigger 0x02 0x00C4 AXIS_RTRIGGER Left Joystick 0x01 0x0030 AXIS_X 0x01 0x0031 AXIS_Y Right Joystick 0x01 0x0032 AXIS_Z 0x01 0x0035 AXIS_RZ "

Set it under directories under settings

Try the nightlies, it’s fixed or wait for 1.2.2

great news, thanks. will wait for 1.2.2. do you know, if the OUYA controller now works too?