OrangePI Club
[SOLVED] 2-player USB encoder not recognized in retroarch - Printable Version

+- OrangePI Club (
+-- Forum: International (English) Forums (
+--- Forum: *nix Distro (
+---- Forum: RetrOrangePi v4 (
+----- Forum: SUPPORT (
+----- Thread: [SOLVED] 2-player USB encoder not recognized in retroarch (/showthread.php?tid=2678)

[SOLVED] 2-player USB encoder not recognized in retroarch - YiorgosH - 09-08-2018

I was trying to configure my joysticks via this encoder on the latest 4.2 image for OrangePi PC.

Here's the issue description:

The joystick is recognized as "D_R_M JUYAO Dual Arcade" in ES. I can configure it and navigate through all ES menus normally. But retroarch does not recognize it at all. I even tried launching a game, entered the MAME menu and attempted to configure the joystick manually, but it didn't work, it's as if it's not connected. Back to ES, it works ok.

After some research, here's the solution that worked for me:

  1. Open Desktop, and from a terminal issue sudo pluma (to open it with admin rights).
  2. Open /etc/udev/rules.d/99-input.rules
  3. Add the following line:
    SUBSYSTEM=="input",ATTRS{name}=="D_R_M JUYAO Dual Arcade",KERNEL=="event*",MODE="0666",ENV{ID_INPUT_JOYSTICK}="1"
    (the name should be the same name your joypad gets in configs/all/retroarch-joypads/ folder)
  4. Reboot system
  5. Re-configure input for the joysticks connected via this encoder
NOTE: Another issue is that the two joysticks connected to this encoder are recognized as one gamepad with two hats (hat0 for player 1 and hat1 for player 2). I'll come back when I figure out the best solution for this as well.

RE: [SOLVED] 2-player USB encoder not recognized in retroarch - alexkidd - 09-08-2018

Sweet, thanks! Any suggestion on how to make this fix persistant?

RE: [SOLVED] 2-player USB encoder not recognized in retroarch - YiorgosH - 09-08-2018

I found the solution above in a forum, referring to a different controller name. I just changed the name and it worked for me, so I suppose that's the way to go. Maybe you can add the procedure to the script that is executed after the end of input configuration, to add that line automatically?

By the way, I tried configuring the gamepads in retroarch and in mame menu, but player 1 up-down-left-right also move player 2, no matter what. Something is mixed up. I found this thread that suggests a way to identify the controller as 2 different gamepads, but there is no /boot/cmdline.txt in your build so I can't test it.

Well, I solved that issue the ugly way.

It seems the problem with the p1 stick moving both players lies in the cfg file in configs/all/retroarch-joypads.
I deleted the file altogether, then everything worked just fine except the hotkeys. So I recreated the file with only the following content:

input_device = "D_R_M JUYAO Dual Arcade"
input_driver = "udev"
input_load_state_btn = "4"
input_exit_emulator_btn = "7"
input_reset_btn = "1"
input_enable_hotkey_btn = "6"
input_save_state_btn = "5"
input_state_slot_increase_btn = "h0right"
input_menu_toggle_btn = "2"
input_state_slot_decrease_btn = "h0left"
Finally, the gamepads work in ES and in Retroarch as expected. I bet my hat it is NOT the ideal solution, but it works so I'll leave it as it is Smile