OLD Gamepad Autoconfig Thread

Check what’s your device name for input1 in /proc/bus/input/devices It may differs for other kernels.

I have jabbt’s ‘S7800b Bloodline 1.0.5’ ROM installed. It’s based on Android 4.2.2 with lots of fixes and is suitable for both 2013 and 2014 JXD models.

I: Bus=0019 Vendor=0001 Product=0001 Version=0100 N: Name=“rk29-keypad” P: Phys=gpio-keys/input0 S: Sysfs=/devices/platform/rk29-keypad/input/input0 U: Uniq= H: Handlers=kbd event0 keychord B: PROP=0 B: EV=3 B: KEY=40008800 1c0040 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name=“jxdkey_driver” P: Phys= S: Sysfs=/devices/virtual/input/input1 U: Uniq= H: Handlers=kbd event1 B: PROP=0 B: EV=f B: KEY=fdb0001 0 0 0 0 0 1680 1000000 0 0 B: REL=0 B: ABS=27

This is my devices. I nave lujii 4.4.4 custom ROM.

Same as mine. I attached my .cfg if that helps. If nothing happens when you hit button in-game check RGUI path setting for joypad autoconfig directory (use overlay for navigation). Try erasing app data and run RetroArch on default. Don’t use Custom Binds in main settings. Place .cfg file in autoconfig directory, load some core and hit any button. If everything’s right you should see ''Joypad Port #0 (jxdkey_driver) configured" message on screen.

Depending on gamepad you have d-pad presses may be recognised as digital buttons or analog axis. Press d-pad in ‘Key Test’ app and look for scanCode. If you see numbers like “308” or else than d-pad is digital and should be set in config as (keycodes may vary!)

input_up_btn = “19” input_down_btn = “20” input_left_btn = “21” input_right_btn = “22”

If scanCode returns ‘zero’ d-pad directions should be set like this

input_up_btn = “h0up” input_down_btn = “h0down” input_left_btn = “h0left” input_right_btn = “h0right”

And in case your gamepad has analog triggers

input_l2_axis = “+6” input_r2_axis = “+7”

[QUOTE=bl@ck_m@ge;20220]Same as mine. I attached my .cfg if that helps. If nothing happens when you hit button in-game check RGUI path setting for joypad autoconfig directory (use overlay for navigation). Try erasing app data and run RetroArch on default. Don’t use Custom Binds in main settings. Place .cfg file in autoconfig directory, load some core and hit any button. If everything’s right you should see ''Joypad Port #0 (jxdkey_driver) configured" message on screen.[/QUOTE]

Already done, mate. No way…in logcat, there are always same error. I think is 4.4.4 Android implementation in this device. Have you tried with last Android? Anyway thank you ^^

Hey All,

I’m trying to wrap my noodle around how this all works. Maybe I can describe my setup and what i’m trying to achieve. Then someone could perhaps provide me details or point me to resources explaining how it all works. Firetv (rooted) running retroarch (2015-03-17_RetroArch) with a bluetooth ds4. I have followed the instructions from http://www.aftvnews.com/fix-ps4-dualshock-4-button-mapping-on-the-fire-tv/ that suggest replacing the keylayout file (Vendor_054c_Product_05c4.kl). See below for the contents of said file.


#
# DualShock 4 Controller
#
# Buttons
key 164   MEDIA_PLAY_PAUSE
key 168   MEDIA_REWIND
key 172   HOME
key 208   MEDIA_FAST_FORWARD
key 304   BUTTON_X
key 305   BUTTON_A
key 306   BUTTON_B
key 307   BUTTON_Y
key 308   BUTTON_L1
key 309   BUTTON_R1
key 310   BUTTON_L2
key 311   BUTTON_R2
key 312   BUTTON_SELECT
key 313   BUTTON_START
key 314   BUTTON_THUMBL
key 315   BUTTON_THUMBR
key 317   MENU

# Joystick and game controller axes.
axis 0x00 X flat 0
axis 0x01 Y flat 0
axis 0x02 Z flat 0
axis 0x05 RZ flat 0
axis 0x09 GAS
axis 0x0a BRAKE
axis 0x10 HAT_X
axis 0x11 HAT_Y

I was hoping that would be sufficient and that when i sparked retroarch and enabled auto ime it would just work. It however doesn’t, start/select/ok don’t seem to work. The touchpad works for retroarch settings. When i look it lists the firetvime as the device, is this accurate?

If i disable auto ime and manually configure it works…until i use the firetv remote. Then only certain buttons work. Also the touchpad never seems to do retroarch settings with manually configuration.

I’m hoping to be able to use the ds4 have the touchpad work as retroarch settings button and the ps button exit retroarch. So i figured I would create a cfg for my preferences, but looking at this thread and the ps4usb cfg thats already included I’m slightly confused.

I used keytest and record my inputs


button            keycode    scancode
x            96    303
o            97    306
square            99    304
triangle        100    307
dpad up            19    0
dpad down        20    0
dpad left        21    0
dpad right        22    0
l1            102    308
r1            103    309
l2            104    310
r2            105    311
select            109    312
start            108    313
touch pad        82    317
ps            0    316
left thumb up        19    0
left thumb down        20    0
left thumb left        21    0
left thumb right    22    0
left thumb press    106    314
right thumb press    107    315

So first thing I noticed in some example cfg’s, is that they have

input_up_btn = “h0up” input_down_btn = “h0down” input_left_btn = “h0left” input_right_btn = “h0right”

I don’t get these values from keytest. Where do they come from? Also same with the thumbs as you can see from my keytest example above, in fact my right thumb doesn’t register anything (but works within aftv). Another thing that bugs me is that, the ds4 usb examples listed have different keys then what mine register to is that expected? If keys are autoconfig using this method will the touchpad and ps button work?

If anybody can share any recommendations/configurations/resources i would appreciate it.

Keyalout files aren’t necessary at all for RetroArch. You place keycodes and ID for your gamepad in .CFG file and that’s it.

input_up_btn = “h0up”

It’s for analog dpads. Please read my previous post.

will the touchpad and ps button work?

If those work as Home, Back or Menu in Android you can’t map’em. In 1.0.0.2 there’s an option to use ‘Back’ as exit or menu toggle but it’s gone in nightlies. I wish developers bring it back…

Okay, so…

shell@android:/proc/bus/input $ cat devices


I: Bus=0005 Vendor=054c Product=05c4 Version=0100
N: Name="Wireless Controller"
P: Phys=A0:02:DC:2D:06:44
S: Sysfs=/devices/platform/msm_serial_hs.0/tty/ttyHS0/hci0/hci0:22/input24
U: Uniq=D0:27:88:16:F9:A8
H: Handlers=event6 cpufreq
B: PROP=0
B: EV=1b
B: KEY=3fff0000 0 0 0 0 0 0 0 0 0
B: ABS=3003f
B: MSC=10

Then created cfg

root@android:/data/data/com.retroarch/autoconfig/android # cat wireless_controller.cfg


                                                     <
input_device = "Wireless Controller"
input_driver = "android"
input_up_btn = "h0up"
input_down_btn = "h0down"
input_left_btn = "h0left"
input_right_btn = "h0right"
input_select_btn = "109"
input_start_btn = "108"
input_b_btn = "96"
input_y_btn = "99"
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_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"


input_b_btn_label = "Cross"
input_y_btn_label = "Square"
input_select_btn_label = "Select"
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 = "Circle"
input_x_btn_label = "Triangle"
input_l_btn_label = "L1"
input_r_btn_label = "R1"
input_l2_btn_label = "L2"
input_r2_btn_label = "L2"
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-"

Regardless if auto ime is selected it simply doesn’t work

I get stuck at the welcome screen

The build i’m using is 2015-03-17_RetroArch.apk

Any help would be greatly appreciated. I’ll try a dif build in the interim.

Okay, so i up dated to todays build, but i also renamed the cfg file to include uppercase. It is now working…ish

So this is now my issue, I’m not sure if this is a bug or if i simply need to update or modify my syntax.

from

root@android:/system/bin #

I run


am start --user 0 -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -e ROM "/storage/emulated/0/usbStorage/sda1/games/roms/nintendo/1942 (Japan, USA).nes" -e LIBRETRO /data/data/com.retroarch/cores/fceumm_libretro.so -e CONFIGFILE /data/data/com.retroarch/retroarch.cfg -e IME com.android.inputmethod.latin/.LatinIME -n com.retroarch/.browser.retroactivity.RetroActivityFuture

games load but controller does not

This was working with 1.0.0.2

If i run retroarch from icon it works, any ideas?

EDIT: droid.zip (62 KB) Added logs

Hello. I just got an iPega PG9023 (the telescope), and can’t figure out how to properly map all the controls in retroarch.

I searched the forums a bit, but people either post a config (which im unsure what to do with), or refer to a “Bind All” option in the “RGUI”, but I definitely see nothing of the sort. The closest is some configuration options for something called “RetroPad” When I try to manually select a map and button, everything comes out as a down input Finally, I tried cycling through the device list, but did not see my device listed.

Any ideas what should be doing?

Are you using one of the nightlies from builbot.libretro.com? If not, you should probably give one a shot, as the Play store version is super-old and input has changed significantly in the meantime.

For the autoconfig files, they go into whatever directory is defined as your ‘config’ directory in the paths settings menu.

[QUOTE=hunterk;21892]Are you using one of the nightlies from builbot.libretro.com? If not, you should probably give one a shot, as the Play store version is super-old and input has changed significantly in the meantime.

For the autoconfig files, they go into whatever directory is defined as your ‘config’ directory in the paths settings menu.[/QUOTE]

Hey, sorry I never replied. I never realized that the play store version was so out of date. Once I upgraded the controller was able to configured and worked! Thank you!

I downgraded again just so I could finish the game i’m playing, since the savestates didn’t work on the new retro, but that’s fine :slight_smile:

Great! I’m glad to hear the new version is working for you :slight_smile:

In 1.0.0.2 r34 there’s an option for ‘Back’ button behavior so it could be mapped for menu toggle (rGUI). I’ve got JXD S7800 with hardware ‘Back’ and ‘Menu’ buttons but none of them can be assigned in nighties using Input Settings. Other buttons, shoulders and d-pad work fine though. Can you fix this please? Thanks in advance :slight_smile:

Here is a working Amazon Fire Game Controller cfg.

All buttons and all sticks are working. Start is mapped to the Fast Forward button. Select is mapped to the Rewind button. Toggle Menu is mapped to the Play button.

The face buttons (A,B,X,Y) on the controller are arranged in the Xbox 360 Controller fashion. Those buttons are mapped in this Retroarch Controller config file to replace the default Snes layout with the default Xbox 360 layout. Meaning - A and B, as well as X and Y are switched. Therefore, when playing a SNES game - all button descriptions on the controller are matching the games input descriptions (but are “switched” if you are very familiar with the original SNES controller layout). You can remap all buttons in the Retroarch settings, if you dont like it.

Hi!

I have been using the autoconfig files with my Xbox Wireless receiver for a while and have been wondering about a few things which I hope you can shed some light on :wink:

When using the xpad kernel driver autoconfig uses the udev config file for the Xbox wireless receiver, which is very complete and works well. The only thing here that I am a little puzzled about is why the analog triggers are mapped to l1/r1 and the shoulder buttons are l2/r2. This leads to SNES cores using the triggers as buttons…which works, but since those were digital inputs on the original SNES input it seems inconsistent. Does the RetroPad model propose to use the analogs as l1/r1?

When using the userspace driver I do have some problem getting the pads to work out of the box:

I am guessing the current config file assumes the driver is called with --triggers-as-buttons, the triggers will send button inputs, the dpad will send axis input. Why is this? Wouldn’t it be more consistent to assume the driver called with --dpad-as-buttons, which then would have the analog triggers as axis and the dpad as buttons (which resembles what these inputs actually are). I have made a config file for this, just wanted to check what the reasoning behind this is. Also, when using the current autoconfig file from the sources which have the dpad mapped as axis I can’t get any movement inputs in the snes9x-next core…not sure if the core does not like having the dpad directionals as axis or if it is another problem entirely…

Any advice on this would be great…

Hi, I’m new here, actually I was following some threads in the “shadows” but as I’m really needing some instructions, here I am.

In short, I have this controller > http://tfg.infocrom.com/images/8b0bcbc2-7c83-4257-a1af-cbbd34759256-2-big.jpg

I promise you all I read two times these 8 pages, followed each instruction to make it recognized by retroarch, it was (partially), but when I restart the app it isn’t anymore, I tried yesterday and today nightlies. This controller is recognized in my Xperia SP as PG-9028, it’s pretty much like the PG-9025, but it has a touchpad and some minor physics differences.

So, I used KeyTest.apk to figure out what keys are what, and they are.

L1 - 104 R1 - 105 L2 - 102 R2 - 103 L3 - 106 R3 - 107 Dpad - Up - 19 Dpad - Down - 20 Dpad - Left - 21 Dpad - Right - 22 Y - 100 X - 99 A - 96 B - 97 Select - 109 Start - 108

One thing that was strange about KeyTest app, is that it recognized the left analog as D-pad, the right analog wasn’t recognized, media buttons were recognized, if I recall correctly, I think it didn’t recognize the volume - and + buttons only.

Below are its media keys I want to map for some feature someday.

Previous track - 88 play-pause - 85 next track - 87

I saved that cfg as PG-9028 and put it in autoconfig default folder, my Xperia SP is rooted and I paired the controller in gamepad mode, i.e., pressing X+Home button.

I don’t know why, but when I restarted retroarch after saving the PG-9028.cfg in autoconfig folder, it only recognizes the buttons, D-pad or analog buttons aren’t recognized, I tried h0up, h0down, etc, tried other numbers from other gamepad models, nothing!

Can someone help me figuring this out?

I think it’s important to point out that emulators like Md.emu, ePsxe, Drastic among others all work flawlessly with this controller, I’m only having issues with retroarch.

Thanks!

No one? Anyone that faced the same problem?

Please can someone help me? I am trying to understand and follow the instructions on the forum but I am not a tech expert - I apologise if I have posted this in the wrong place. I have a Nexus7 tablet (running Android 5.1.1) and am trying to use a SNES gamepad to control RetroArch games. I have tried to configure it using the Custom Binds option - when I load games the A,B,X,Y buttons seem to work, but the D-pad doesn’t. I have run KeyTest.apk and typed out everything that came up onscreen for each button press. However, it gives me a lot of information, more than is shown on the example provided in the link at the top of this thread. Am I supposed to only take certain information from what was returned, and if so, what information?

Below is everything that KeyTest.apk came back with. Thanks.

Keycode: 21 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_LEFT, scanCode=0, metaState=0, flags=0x400, repeatCount=0, eventTime=62204288, downTime=62204288, deviceld=7, source=0x1000010 }

Keycode: 19 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_UP, scanCode=0, metaState=0, flags=0x400, repeatCount=0, eventTime=62343494, downTime=62343494, deviceld=7, source=0x1000010 }

Keycode: 20 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_DOWN, scanCode=0, metaState=0, flags=0x400, repeatCount=0, eventTime=62427928, downTime=62427928, deviceld=7, source=0x1000010 }

Keycode: 22 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_RIGHT, scanCode=0, metaState=0, flags=0x400, repeatCount=0, eventTime=62482375, downTime=62482375, deviceld=7, source=0x1000010 }

Keycode: 191 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BUTTON_4, scanCode=291, metaState=0, flags=0x8, repeatCount=0, eventTime=62539190, downTime=62539190, deviceld=7, source=0x101 }

Keycode: 188 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BUTTON_1, scanCode=288, metaState=0, flags=0x8, repeatCount=0, eventTime=62625703, downTime=62625703, deviceld=7, source=0x101 }

Keycode: 190 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BUTTON_3, scanCode=290, metaState=0, flags=0x8, repeatCount=0, eventTime=62688932, downTime=62688932, deviceld=7, source=0x101 }

Keycode: 189 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BUTTON_2, scanCode=289, metaState=0, flags=0x8, repeatCount=0, eventTime=62750454, downTime=62750454, deviceld=7, source=0x101 }

Keycode: 196 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BUTTON_9, scanCode=296, metaState=0, flags=0x8, repeatCount=0, eventTime=62809478, downTime=62809478, deviceld=7, source=0x101 }

Keycode: 197 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BUTTON_10, scanCode=297, metaState=0, flags=0x8, repeatCount=0, eventTime=62857676, downTime=62857676, deviceld=7, source=0x101 }

Keycode: 192 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BUTTON_5, scanCode=292, metaState=0, flags=0x8, repeatCount=0, eventTime=62906195, downTime=62906195, deviceld=7, source=0x101 }

Keycode: 193 KeyEvent: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BUTTON_6, scanCode=293, metaState=0, flags=0x8, repeatCount=0, eventTime=62953789, downTime=62953789, deviceld=7, source=0x101 }