Zero Delay Encoder, USB Hub, Random /dev/input/js*
-
Can you try by disconnecting the keyboard and the mouse and leaving only the joysticks connected ? I've seen a similar report sometime ago when RA crashes with lots of gamepads connected, I wonder what's the magic number before it crashes.
-
Unhooking the keyboard and extra gamepad keeps it from crashing.
But not all the joysticks are working in the game. In the lower left, while the ROM starts up, it shows it's initializing the controllers.
- DragonRise Inc. Generic USB Joystick
- Joystick Red
- Joystick Yellow
- Joystick Green
- Joystick Blue
- DragonRise Inc. Generic USB Joystick
- DragonRise Inc. Generic USB Joystick
It may have done a fourth DragonRise, maybe I missed two that were back-to-back.
Only players two and four worked, which were Blue and Green respectively. I suspect it used DragonRise devices for players one and three. These are consistent though. It always seems to be players two and four, but it did it with Red and Green on a different boot.
When I configure devices through Retroarch, it shows my xboxdrv names I gave them. I thought the --detach-kernel-driver might help it from registering the DragonRise controllers, but they still register. It'd be nice if I could get rid of these somehow.
-
@elarson said in Zero Delay Encoder, USB Hub, Random /dev/input/js*:
When I configure devices through Retroarch, it shows my xboxdrv names I gave them. I thought the --detach-kernel-driver might help it from registering the DragonRise controllers, but they still register. It'd be nice if I could get rid of these somehow.
I had the same impression, but it looks like it's not hiding them. What happens if you remove the
.cfg
file for the DragonRise controllers , so that only the named controllers are auto-configured ? -
It still registered them during initialization of the ROM. Players two and four were still controllable, but this time by yellow and green.
-
Well, since all your controller get detected (and configured, it seems), you can re-order them using @meleu's joystick reordering tool - https://github.com/meleu/RetroPie-joystick-selection. It can re-order them by name, so you can push back the DragonRise controllers and have your named controller be P1-P4.
But it's getting a bit complicated and I'm not sure if plugging in more controllers wouldn't complicate things further.
-
Thanks, I had forgotten about that tool. I hadn't used it since I got xboxdrv to rename the inputs.
That works. The only problem I have now is that player 1 (red), when I hit the start button it, it exits the game. Verbose logging has the following once I hit that button, nothing too exciting. Outside the game (I've tried multiple games, all do the same), hitting the red start button brings up the main menu, just like the other players. I've tried reconfiguring red.
[INFO] Unloading game.. [libretro INFO] [MAME 2003] saving mygame.hi hiscore memory file... [INFO] Unloading core.. [INFO] Unloading core symbols.. [INFO] Saved core options file to "/opt/retropie/configs/all/retroarch-core-options.cfg" [INFO] Threaded video stats: Frames pushed: 1919, Frames dropped: 1.
-
@elarson said in Zero Delay Encoder, USB Hub, Random /dev/input/js*:
The only problem I have now is that player 1 (red), when I hit the start button it, it exits the game
That seems like a you've not set the hotkey for that controller and
start
maps to the exit hotkey. Post the.cfg
auto-configuration file for that controller. -
That's what I was thinking too. I compared it to my blue joystick, which works fine, and they're identical (other than input_device name). I wired each of the controller sets up to the encoders the same way, skipping spots if they didn't have a particular button. But blue and red have the same buttons.
If I take out input_exit_emulator_btn, then it doesn't exit the emulator when I press red's start. But it also doesn't exit when I press both Select + Start. If I take it out of red's, but leave it in the others, it was exiting the emulator when I pressed Start on another controller (only tried one, not all of them)
input_exit_emulator_btn = "7"
input_device = "Joystick Red" input_driver = "udev" input_l_btn = "5" input_load_state_btn = "5" input_start_btn = "7" input_exit_emulator_btn = "7" input_down_axis = "+1" input_r_btn = "4" input_save_state_btn = "4" input_right_axis = "+0" input_state_slot_increase_axis = "+0" input_select_btn = "6" input_left_axis = "-0" input_state_slot_decrease_axis = "-0" input_up_axis = "-1" input_a_btn = "0" input_b_btn = "1" input_reset_btn = "1" input_enable_hotkey_btn = "6" input_x_btn = "2" input_menu_toggle_btn = "2" input_y_btn = "3"
input_device = "Joystick Blue" input_driver = "udev" input_l_btn = "5" input_load_state_btn = "5" input_start_btn = "7" input_exit_emulator_btn = "7" input_down_axis = "+1" input_r_btn = "4" input_save_state_btn = "4" input_right_axis = "+0" input_state_slot_increase_axis = "+0" input_select_btn = "6" input_left_axis = "-0" input_state_slot_decrease_axis = "-0" input_up_axis = "-1" input_a_btn = "0" input_b_btn = "1" input_reset_btn = "1" input_enable_hotkey_btn = "6" input_x_btn = "2" input_menu_toggle_btn = "2" input_y_btn = "3"
-
I may be able to live with it. I over did it with the buttons and can wire a dedicated exit button. I can wire the exit button to player one and modify the config files to not have an exit button.
If you have any other suggestions, I'd be open. But otherwise, thank you for all your help with this!
-
The mapping is ok, so Start+Select should exit - I don't know why it wouldn't work. P1 is the only one able to exit or toggle the menu - that's how RetroArch works - but there might be some confusion on the RA's part because of duplicate inputs from the original controller and the virtual (xboxdrv) one.
-
One idea - to hide the original controllers - is to change the permissions on the
/dev/input/eventX
files corresponding to the original controllers - removing theinput
group read/write permissions on those devices.
That would work only if you startxboxdrv
asroot
. -
@elarson
Go with Xarcade's encoder. https://shop.xgaming.com/collections/arcade-parts/products/x-arcade-build-your-own-arcade-control-panel-kit
It's a keyboard encoder and has a proper harness. $35 (for the 2018 model) and supports a full keyboard of keys which would give enough for 4 players as you can simply map up to 101 keys to movements. It's the same one used in their Tanksticks.But don't use the xarcade userdriver found here as that just converts it into a joystick instead of keyboard, but retroarch doesn't allow as many features with joypads as it does with keyboards so its pointless and de-features it. Plus you can default keyboard as the primary device and it won't get confused as "just another gamepad" and get out of order. I did one of my units with that encoder and it's the best encoder I've used.
My second unit was with 2 ZD's and they work great normally.. its just when plugging in 2 additional gamepads... rpi gets confused suddenly one which is supposed to be index 0 and 1.
-
How can you hook up 101 inputs? There are only 54 (by my count) male connections, and 11 of those I assume are daisy-chained grounds.
-
But the /dev/input/event* are random so I can't script it to disable those. I could probably do it for testing. Or if I was better a Linux...
-
Here'a one-liner that will provide the
event
device from an joystick input device (here for/dev/input/js0
):readlink -f /dev/input/by-path/`udevadm info /dev/input/js0 | grep ID_PATH= | awk -F= ' { print $2 }'`-event-joystick
You can also check with
cat /proc/bus/input/devices
to see whichevent
device is associated with a/dev/input/jsX
device. -
@mitu
Any Chance you can break this down.
i am new to this and setup 1 set of controls with no problem but when i plug in second it neither one works.
noticed that its showing as same. -
@jerrymrivera Please don't bump old forum posts.
Create a new topic and explain your problem, adding the relevant info about your setup, as explained in https://retropie.org.uk/forum/topic/3/read-this-first.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.