X-Arcade Dual Stick not working on Retroarch menus on Android

controller

#1

Hi,

I’ve been trying to make work the X-Arcade Dual Stick to navigate Retroarch menus with no luck, and finally decided to ask for some help. I’m sorry if this is a slightly large first post, as i wan’t to give as much information as possible. I’m surely missing something and the Retroarch logs don’t give much information during controller initialization.

Device: Nvidia Shield TV (2017) -> Android TV 8. NOT ROOTED. Controller: X-Arcade Dual Stick (works as a physical keyboard for Android) Retroarch: 1.7.5 downloaded from Google Play Store. (Other Controllers for tests and side-by-side comparison: Logitech Unifying K400 keyboard and Shield Remote)

The operating system detects de X-Arcade correctly as a physical keyboard, and when I use the joysticks and buttons on a text editor, the correct ascii characters are printed. I can see a system log for every joystick movement and button press with the corresponding keycode. For example, when i move the 1P joystick down, this logs appears in system logcat:

01-06 16:52:47.111 682 757 D WindowManager: handleComboKeys keyCode: 146, keyAction: 1

(This version of X-Arcade has the 1 player joystic mapped to Keypad_2/4/6/8 keys instead of up/down/left/right)

I entered Retroarch and updated everything (databases, core info, autoconfig profiles…etc). As soon as i touched the Shield remote, i could see a message in yellow telling me that the remove has been detected correctly, and i could navigate the menus. When I’ve used the Logitech Keyboard, the same message appeared and I could navigate the menus also with the Keyboard. I used the X-Arcade… and no detection message appeared :-?. It could also not navigate the menus (this i’d say it’s normal because the joystick is mapped to the keypad_X keys insted of up/down…etc). But in the logs it seems that the controller is seen by retroarch

RetroArch: device name: XGaming X-Arcade RetroArch: device vendor id: 43605 RetroArch: device product id: 257

In this situation, I’ve tried the following.

1 - With “input_autodetect_enable=true”, I enter Retroarch and the controller is not detected. I go to input config, User1 binds, and select Bind All. For each key I move the X-Arcade joystick or push a button, and all the correct keys appear bound to the corresponding options. Good! This means that Retroarch sees the X-Arcade as a keyboard. Save auto config ok…but after binding all correctly, i still can’t navigate the menus. I’ve exited retroarch and launched again, and still can’t navigate. Used the remote to go to input settings, User 1 binds, and the X-Arcade binds are correctly configured (i can see each key correctly in the options), but still can’t navigate menus. I’ve tried looking for the autoconfig save file, but i’ve not found it in the external storage, even when i changed the default joypad autoconfig path to the external storage in retroarch.cfg. As the correct bind are loaded upon start, i suppose that retroarch is saving them in the internal storage (no access if not rooted)

2 - Configure Retroarch manually with “input_autodetect_enable=false”. Modify retroarch.cfg file to set the keys manually to input_player1_left/right/up/down to keypad2/4/6/8 (I just wanted to test a simple navigation). Nothing. If i move the joystick nothing happens.
-I’ve tried with the input_libretro_device_p1=“1”, nothing. -I’ve changed it to “3” (keyboard), and i get an error sating that input type is not supported in my retroarch build :-? - I’ve changed the driver to “udev”, and i get an error saying “driver not available”, only valid “android” or “null”. I suppose that ShieldTV doesn’t have udev or linuxraw as the docs say for android.

3- Seeing that the Logitech K400 keyboard works Ok, and the X-Arcade is also a Keyboard, I tried to use autoconfig and create a joypad autoconfig profile based on the K400. Retroarch detects both when they are first used (vendor id, product id…), so I changed the autoconfig path to the external storage, and copied there the K400 autoconfig profile. Then made on for the XArcade changing just the vendor id, product id, and device name to those of the X-Arcade.

This is shown in the logs:

RetroArch: Device model: (SHIELD Android TV RetroArch: ). RetroArch: Using new lookup RetroArch: device name: Logitech Unifying Device. Wireless PID:404d RetroArch: device vendor id: 1133 RetroArch: device product id: 50475 RetroArch: [Autoconf]: 3 profiles found. RetroArch: [autoconf]: selected configuration: /storage/emulated/0/Android/data/com.retroarch/autoconfig/android/Logitech Unifying K400.cfg

(Retroarch finds the autoconfig file for the K400 and loads it

RetroArch: Device model: (SHIELD Android TV RetroArch: ). RetroArch: Using new lookup RetroArch: device name: XGaming X-Arcade RetroArch: device vendor id: 43605 RetroArch: device product id: 257

(Retroarch finds the XArcade, but doesn’t load the autoconfig profile i created for the XArcade, even if it has the correct vendor id, product id and name!)

I’ve followed a bit the code, and when it loads the profiles, retroarch outputs a log saying “X profiles found” or “no profiles found” if none found… with the K400 the log shows the “profiles found line”, but with the XArcade there’s no line about profiles (not found, found… nothing).

Here are some initalization logs when the XArcade doesn’t work. They are the same in nearly every test i’ve done. As you can see, not much logging during input initialization.

https://pastebin.com/jUf2D6pe

I’m lost, I have no clue on how to continue.

  • It’s very strange that even if the “bind all” option works get the XArcade keys, then it can’t use them even if the config shows the correct keys.¿How can this be?
  • It’s strange that it doesn’t work even setting autoconfig=false and changing the bindings manually in the retroarch.cfg.
  • It’s also strange that using the same autoconfig profile as the K400 just changing the vendorId, productId and name, it doesn’t even try to load it! (i’ve tried both leaving the key bindings of the k400, to alter the file as less as possible, and changing the bindings to the keys of XArcade)
  • the input controller loading part of the code has only a few logs. Is there anything I can do to get more logs?
  • The documentation talks about “udev” and “linuxraw” drivers for android, but my system or the build of the play store doesn’t support them
  • The documentation also talks about input_libretro_device_p1 type “3” for keyboard, but my system/build doesn’t seem to recognize it (it gives an error an uses the default joypad).

Any help will be appreciated, and if you need me to do more tests and get more logs and upload to pastebin or similar, feel free to ask.

Thanks for your help in advance.