Zero Delay Encoder, USB Hub, Random /dev/input/js*
-
I built my first cabinet and I put way too many controls in it.
I have separate zero delay encoders for each joystick/button sets. I had to hook them up via a USB hub. Each encoder identifies itself as "DragonRise Inc. Generic USB Joystick ". Some of the joystick/button sets have six buttons, some have nine; another one is going to have six and a 4-way joystick (I haven't hooked that one up yet).
With the hub, it seems like order of controllers is not consistent. js0, js1, js2, etc. seem to switch around after reboot.
When I configure them via Retroarch, there's a single .cfg file for the encoder name (/opt/retropie/configs/all/DragonRise Inc. Generic USB Joystick .cfg). I was hoping to rename them so they are independently identifiable and configurable, but I can't find a way to do this with udev. I was able to create symlinks for each of the encoders, but I haven't figured out if there's anything I can do with those.
I tried using xboxdrv, which I was able to get custom names for each of the encoders. When I configure them via Retroarch, it says it's identified 11 devices (it's doubled the encoders, plus a keyboard and gamepad that I'm using for configuration, plus one more encoder that I didn't configure in xboxdrv yet). Seems to work during configuring the inputs. But when I launch a game, the games crash right away, like it's a bad ROM.
Sorry for the long post. Any suggestions?
Pi Model or other hardware: 3 B+
Power Supply used: 5v
RetroPie Version Used: 4.5.1
Built From: BerryBoot (10 months ago)
USB Devices connected: Amazon Basics USB hub, 5 DragonRise Generic USB Joystick zero delay encoder, Dell Keyboard (for debugging/configuring), Logitech Gamepad F310 (for debugging/configuring), IL joysticks and buttons, USB thumb drive (roms, may move these to the SD card, but would still need the hub), will eventually plug in a USB Happ trackball -
Can you run
lsusb
andcat /proc/bus/input/devices
with all controllers connected and post the output here ? -
@elarson said in Zero Delay Encoder, USB Hub, Random /dev/input/js*:
But when I launch a game, the games crash right away, like it's a bad ROM.
https://github.com/RetroPie/RetroPie-Setup/wiki/Arcade should give you some pointers. i expect you have invalid roms for the emulator you're using
-
@elarson said in Zero Delay Encoder, USB Hub, Random /dev/input/js*:
But when I launch a game, the games crash right away, like it's a bad ROM.
For more information from the emulator, start the game in question with verbose logging via the Runcommand menu and look into the logfile
/dev/shm/runcommand.log
. -
lsusb
Bus 001 Device 004: ID 046d:c216 Logitech, Inc. F310 Gamepad [DirectInput Mode] Bus 001 Device 006: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive Bus 001 Device 012: ID 0079:0006 DragonRise Inc. PC TWIN SHOCK Gamepad Bus 001 Device 011: ID 0079:0006 DragonRise Inc. PC TWIN SHOCK Gamepad Bus 001 Device 010: ID 0079:0006 DragonRise Inc. PC TWIN SHOCK Gamepad Bus 001 Device 009: ID 0079:0006 DragonRise Inc. PC TWIN SHOCK Gamepad Bus 001 Device 007: ID 1a40:0101 Terminus Technology Inc. Hub Bus 001 Device 005: ID 413c:2106 Dell Computer Corp. Dell QuietKey Keyboard Bus 001 Device 008: ID 0424:7800 Standard Microsystems Corp. Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
cat /proc/bus/input/devices
I: Bus=0003 Vendor=413c Product=2106 Version=0110 N: Name="Dell Dell QuietKey Keyboard" P: Phys=usb-3f980000.usb-1.1.2/input0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:413C:2106.0002/input/input0 U: Uniq= H: Handlers=sysrq kbd leds event0 B: PROP=0 B: EV=120013 B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe B: MSC=10 B: LED=7 I: Bus=0003 Vendor=046d Product=c216 Version=0111 N: Name="Logitech Logitech Dual Action" P: Phys=usb-3f980000.usb-1.3/input0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:046D:C216.0001/input/input1 U: Uniq=8798A4CC H: Handlers=event1 js0 B: PROP=0 B: EV=1b B: KEY=fff 0 0 0 0 0 0 0 0 0 B: ABS=30027 B: MSC=10 I: Bus=0003 Vendor=0079 Product=0006 Version=0110 N: Name="DragonRise Inc. Generic USB Joystick " P: Phys=usb-3f980000.usb-1.1.3.1/input0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.1/1-1.1.3.1:1.0/0003:0079:0006.0003/input/input2 U: Uniq= H: Handlers=event2 js1 B: PROP=0 B: EV=1b B: KEY=fff 0 0 0 0 0 0 0 0 0 B: ABS=3002f B: MSC=10 I: Bus=0003 Vendor=0079 Product=0006 Version=0110 N: Name="DragonRise Inc. Generic USB Joystick " P: Phys=usb-3f980000.usb-1.1.3.2/input0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.2/1-1.1.3.2:1.0/0003:0079:0006.0004/input/input3 U: Uniq= H: Handlers=event3 js2 B: PROP=0 B: EV=1b B: KEY=fff 0 0 0 0 0 0 0 0 0 B: ABS=3002f B: MSC=10 I: Bus=0003 Vendor=0079 Product=0006 Version=0110 N: Name="DragonRise Inc. Generic USB Joystick " P: Phys=usb-3f980000.usb-1.1.3.3/input0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.3/1-1.1.3.3:1.0/0003:0079:0006.0005/input/input4 U: Uniq= H: Handlers=event4 js3 B: PROP=0 B: EV=1b B: KEY=fff 0 0 0 0 0 0 0 0 0 B: ABS=3002f B: MSC=10 I: Bus=0003 Vendor=0079 Product=0006 Version=0110 N: Name="DragonRise Inc. Generic USB Joystick " P: Phys=usb-3f980000.usb-1.1.3.4/input0 S: Sysfs=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4:1.0/0003:0079:0006.0006/input/input5 U: Uniq= H: Handlers=event5 js4 B: PROP=0 B: EV=1b B: KEY=fff 0 0 0 0 0 0 0 0 0 B: ABS=3002f B: MSC=10 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="Xbox Gamepad (userspace driver)" P: Phys= S: Sysfs=/devices/virtual/input/input6 U: Uniq= H: Handlers=event6 js5 B: PROP=0 B: EV=b B: KEY=7fdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3001b I: Bus=0003 Vendor=045e Product=028e Version=0110 N: Name="Joystick Blue" P: Phys= S: Sysfs=/devices/virtual/input/input8 U: Uniq= H: Handlers=event7 js6 B: PROP=0 B: EV=20000b B: KEY=7cdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3003f B: FF=1 3f870000 0 0 I: Bus=0000 Vendor=0000 Product=0000 Version=0000 N: Name="Xbox Gamepad (userspace driver) #2" P: Phys= S: Sysfs=/devices/virtual/input/input7 U: Uniq= H: Handlers=event8 js7 B: PROP=0 B: EV=b B: KEY=7fdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3001b I: Bus=0003 Vendor=045e Product=028e Version=0110 N: Name="Joystick Red" P: Phys= S: Sysfs=/devices/virtual/input/input9 U: Uniq= H: Handlers=event9 js8 B: PROP=0 B: EV=20000b B: KEY=7cdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3003f B: FF=1 3f870000 0 0 I: Bus=0003 Vendor=045e Product=028e Version=0110 N: Name="Joystick Yellow" P: Phys= S: Sysfs=/devices/virtual/input/input10 U: Uniq= H: Handlers=event10 js9 B: PROP=0 B: EV=20000b B: KEY=7cdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3003f B: FF=1 3f870000 0 0 I: Bus=0003 Vendor=045e Product=028e Version=0110 N: Name="Joystick Green" P: Phys= S: Sysfs=/devices/virtual/input/input11 U: Uniq= H: Handlers=event11 js10 B: PROP=0 B: EV=20000b B: KEY=7cdb0000 0 0 0 0 0 0 0 0 0 B: ABS=3003f B: FF=1 3f870000 0 0
-
I'm having a similar problem, but it somehow leaks over into the main usb indexing.
I have 2 zero delay encoders for player 1 and 2. Based on this article with the usb port order:
https://retropie.org.uk/forum/topic/10099/usb-port-order-when-using-usb-hub
I have
Player 1 in port 0
Player 2 in port 1
Unplugged port 2
usb drive with rom files port 3This always 100% works and keeps them in the correct order.
But if I plug a 4 port usb hub into port 2, and plug 2 gamepads into the hub, I would expect that the hub ports would become ports 2, 3, 4, and 5 and then the original port 3 now becomes port 6
or maybe port 2 becomes port 2, 4, 5, 6 and port 3 stays the same.But! I'm occasionally seeing the gamepads take over for Player 1 or Player 2 sometimes.... which is absolutely bonkers because the hardwired physical port location should not be line jumped by a hub on a lower ranked port. So I was trying to figure out if there is a way around this. I am thinking that perhaps the gamepad initializes faster than the ZD encoders and that is why it sometimes takes over priority position.. so maybe some way of delaying the initialization of the ports 2 and 3 until after 0 and 1 are properly initialized?
-
@Clyde said in Zero Delay Encoder, USB Hub, Random /dev/input/js*:
/dev/shm/runcommand.log
bash: /opt/retropie/supplementary/joystick-selection/js-onstart.sh: No such file or directory Parameters: Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg "/home/pi/RetroPie/roms/mame-libretro/MyGame.zip" --verbose --appendconfig /dev/shm/retroarch.cfg [INFO] RetroArch 1.7.6 (Git 9750719) [INFO] Redirecting save file to "/home/pi/RetroPie/roms/mame-libretro/MyGame.srm". [INFO] Redirecting savestate to "/home/pi/RetroPie/roms/mame-libretro/MyGame.state". [INFO] === Build ======================================= Capabilities: NEON VFPv3 VFPv4 Built: Feb 4 2019 [INFO] Version: 1.7.6 [INFO] Git: 9750719 [INFO] ================================================= [INFO] Loading dynamic libretro core from: "/opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so" [INFO] [overrides] no core-specific overrides found at /home/pi/.config/retroarch/config/MAME 2003 (0.78)/MAME 2003 (0.78).cfg. [INFO] [overrides] no content-dir-specific overrides found at /home/pi/.config/retroarch/config/MAME 2003 (0.78)/mame-libretro.cfg. [INFO] [overrides] no game-specific overrides found at /home/pi/.config/retroarch/config/MAME 2003 (0.78)/MyGame.cfg. [INFO] Shaders: preset directory: /home/pi/.config/retroarch/shaders/presets [INFO] Shaders: no game-specific preset found at /home/pi/.config/retroarch/shaders/presets/MAME 2003 (0.78)/MyGame.cgp. [INFO] Shaders: no game-specific preset found at /home/pi/.config/retroarch/shaders/presets/MAME 2003 (0.78)/MyGame.glslp. [INFO] Shaders: no content-dir-specific preset found at /home/pi/.config/retroarch/shaders/presets/MAME 2003 (0.78)/mame-libretro.cgp. [INFO] Shaders: no content-dir-specific preset found at /home/pi/.config/retroarch/shaders/presets/MAME 2003 (0.78)/mame-libretro.glslp. [INFO] Shaders: no core-specific preset found at /home/pi/.config/retroarch/shaders/presets/MAME 2003 (0.78)/MAME 2003 (0.78).cgp. [INFO] Shaders: no core-specific preset found at /home/pi/.config/retroarch/shaders/presets/MAME 2003 (0.78)/MAME 2003 (0.78).glslp. [INFO] Remaps: remap directory: /opt/retropie/configs/mame-libretro/ [INFO] Remaps: no game-specific remap found at /opt/retropie/configs/mame-libretro/MAME 2003 (0.78)/MyGame.rmp. [INFO] Remaps: no content-dir-specific remap found at /opt/retropie/configs/mame-libretro/MAME 2003 (0.78)/mame-libretro.rmp. [INFO] Remaps: no core-specific remap found at /opt/retropie/configs/mame-libretro/MAME 2003 (0.78)/MAME 2003 (0.78).rmp. [INFO] Redirecting save file to "/home/pi/RetroPie/roms/mame-libretro/MyGame.srm". [INFO] Redirecting savestate to "/home/pi/RetroPie/roms/mame-libretro/MyGame.state". [INFO] Environ GET_LOG_INTERFACE. [INFO] Environ PERFORMANCE_LEVEL: 10. [INFO] Content loading skipped. Implementation will load it on its own. [INFO] CRC32: 0xcf4748c6 . [libretro INFO] [MAME 2003] Content path: /home/pi/RetroPie/roms/mame-libretro/MyGame.zip. [libretro INFO] [MAME 2003] Content lookup name: MyGame. [libretro INFO] [MAME 2003] Driver index counter: 2918. Matched game driver: MyGame. [libretro INFO] [MAME 2003] Content identified as having a service button. [libretro INFO] [MAME 2003] Content identified as using 8-way joystick controls. [libretro INFO] [MAME 2003] Content identified by controls.c as having joysticks on axis with respect to the cabinet. [libretro INFO] [MAME 2003] Content identified as supporting 4 players with 4 distinct controls. [libretro INFO] [MAME 2003] Content identified as supporting 2 button controls. [libretro INFO] [MAME 2003] Content identified by controls.c as having mirrored multiplayer control labels. [INFO] Environ SYSTEM_DIRECTORY: "/home/pi/RetroPie/BIOS". [libretro INFO] [MAME 2003] content path: /home/pi/RetroPie/roms/mame-libretro/ [libretro INFO] [MAME 2003] system path: /home/pi/RetroPie/BIOS [libretro INFO] [MAME 2003] save path: /home/pi/RetroPie/roms/mame-libretro/ [INFO] Environ SET_VARIABLES. [INFO] Environ GET_VARIABLE mame2003_four_way_emulation: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_mouse_device: [INFO] mouse [INFO] Environ GET_VARIABLE mame2003_crosshair_enabled: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_skip_disclaimer: [INFO] enabled [INFO] Environ GET_VARIABLE mame2003_skip_warnings: [INFO] disabled [INFO] Environ GET_VARIABLE mame2003_display_setup: [INFO] disabled [INFO] Environ GET_VARIABLE mame2003_neogeo_bios: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_stv_bios: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_use_alt_sound: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_dialsharexy: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_dual_joysticks: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_rstick_to_btns: [INFO] enabled [INFO] Environ GET_VARIABLE mame2003_vector_resolution: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_vector_antialias: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_vector_beam_width: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_vector_translucency: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_vector_flicker: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_vector_intensity: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_dcs_speedhack: [INFO] enabled [INFO] Environ GET_VARIABLE mame2003_core_sys_subfolder: [INFO] enabled [INFO] Environ GET_VARIABLE mame2003_core_save_subfolder: [INFO] enabled [INFO] Environ GET_VARIABLE mame2003_tate_mode: [INFO] disabled [INFO] Environ GET_VARIABLE mame2003_brightness: [INFO] 1.0 [INFO] Environ GET_VARIABLE mame2003_gamma: [INFO] 1.0 [INFO] Environ GET_VARIABLE mame2003_frameskip: [INFO] 0 [INFO] Environ GET_VARIABLE mame2003_sample_rate: [INFO] 48000 [INFO] Environ GET_VARIABLE mame2003_input_interface: [INFO] simultaneous [INFO] Environ GET_VARIABLE mame2003_mame_remapping: [INFO] enabled [INFO] Environ GET_VARIABLE mame2003_display_artwork: [INFO] enabled [INFO] Environ GET_VARIABLE mame2003_art_resolution: [INFO] 1 [INFO] Environ GET_VARIABLE mame2003_nvram_bootstraps: [INFO] N/A [INFO] Environ GET_VARIABLE mame2003_cheat_input ports: [INFO] disabled [INFO] Environ GET_VARIABLE mame2003_machine_timing: [INFO] N/A [INFO] Environ SET_INPUT_DESCRIPTORS: [INFO] RetroPad, User 1, Button "B (bottom)" => "Button 1" [INFO] RetroPad, User 1, Button "Y (left)" => "Button 2" [INFO] RetroPad, User 1, Button "Select" => "Insert Coin" [INFO] RetroPad, User 1, Button "Start" => "Start" [INFO] RetroPad, User 1, Button "D-Pad Up" => "Joystick Up" [INFO] RetroPad, User 1, Button "D-Pad Down" => "Joystick Down" [INFO] RetroPad, User 1, Button "D-Pad Left" => "Joystick Left" [INFO] RetroPad, User 1, Button "D-Pad Right" => "Joystick Right" [INFO] RetroPad, User 1, Button "A (right)" => "Button 4" [INFO] RetroPad, User 1, Button "X (up)" => "Button 3" [INFO] RetroPad, User 1, Button "L" => "Button 5" [INFO] RetroPad, User 1, Button "R" => "Button 6" [INFO] RetroPad, User 1, Button "L2" => "Button 7" [INFO] RetroPad, User 1, Button "R2" => "Button 8" [INFO] RetroPad, User 1, Button "L3" => "Button 9" [INFO] RetroPad, User 1, Button "R3" => "Button 10" [INFO] RetroPad, User 2, Button "B (bottom)" => "Button 1" [INFO] RetroPad, User 2, Button "Y (left)" => "Button 2" [INFO] RetroPad, User 2, Button "Select" => "Insert Coin" [INFO] RetroPad, User 2, Button "Start" => "Start" [INFO] RetroPad, User 2, Button "D-Pad Up" => "Joystick Up" [INFO] RetroPad, User 2, Button "D-Pad Down" => "Joystick Down" [INFO] RetroPad, User 2, Button "D-Pad Left" => "Joystick Left" [INFO] RetroPad, User 2, Button "D-Pad Right" => "Joystick Right" [INFO] RetroPad, User 2, Button "A (right)" => "Button 4" [INFO] RetroPad, User 2, Button "X (up)" => "Button 3" [INFO] RetroPad, User 2, Button "L" => "Button 5" [INFO] RetroPad, User 2, Button "R" => "Button 6" [INFO] RetroPad, User 2, Button "L2" => "Button 7" [INFO] RetroPad, User 2, Button "R2" => "Button 8" [INFO] RetroPad, User 2, Button "L3" => "Button 9" [INFO] RetroPad, User 2, Button "R3" => "Button 10" [INFO] RetroPad, User 3, Button "B (bottom)" => "Button 1" [INFO] RetroPad, User 3, Button "Y (left)" => "Button 2" [INFO] RetroPad, User 3, Button "Select" => "Insert Coin" [INFO] RetroPad, User 3, Button "Start" => "Start" [INFO] RetroPad, User 3, Button "D-Pad Up" => "Joystick Up" [INFO] RetroPad, User 3, Button "D-Pad Down" => "Joystick Down" [INFO] RetroPad, User 3, Button "D-Pad Left" => "Joystick Left" [INFO] RetroPad, User 3, Button "D-Pad Right" => "Joystick Right" [INFO] RetroPad, User 3, Button "A (right)" => "Button 4" [INFO] RetroPad, User 3, Button "X (up)" => "Button 3" [INFO] RetroPad, User 3, Button "L" => "Button 5" [INFO] RetroPad, User 3, Button "R" => "Button 6" [INFO] RetroPad, User 3, Button "L2" => "Button 7" [INFO] RetroPad, User 3, Button "R2" => "Button 8" [INFO] RetroPad, User 3, Button "L3" => "Button 9" [INFO] RetroPad, User 3, Button "R3" => "Button 10" [INFO] RetroPad, User 4, Button "B (bottom)" => "Button 1" [INFO] RetroPad, User 4, Button "Y (left)" => "Button 2" [INFO] RetroPad, User 4, Button "Select" => "Insert Coin" [INFO] RetroPad, User 4, Button "Start" => "Start" [INFO] RetroPad, User 4, Button "D-Pad Up" => "Joystick Up" [INFO] RetroPad, User 4, Button "D-Pad Down" => "Joystick Down" [INFO] RetroPad, User 4, Button "D-Pad Left" => "Joystick Left" [INFO] RetroPad, User 4, Button "D-Pad Right" => "Joystick Right" [INFO] RetroPad, User 4, Button "A (right)" => "Button 4" [INFO] RetroPad, User 4, Button "X (up)" => "Button 3" [INFO] RetroPad, User 4, Button "L" => "Button 5" [INFO] RetroPad, User 4, Button "R" => "Button 6" [INFO] RetroPad, User 4, Button "L2" => "Button 7" [INFO] RetroPad, User 4, Button "R2" => "Button 8" [INFO] RetroPad, User 4, Button "L3" => "Button 9" [INFO] RetroPad, User 4, Button "R3" => "Button 10" [libretro INFO] [MAME 2003] Opening ROM file: g02.16c [libretro INFO] [MAME 2003] Opening ROM file: g01.17c [libretro INFO] [MAME 2003] Opening ROM file: j13.13c [libretro INFO] [MAME 2003] Opening ROM file: j12.15c [libretro INFO] [MAME 2003] Opening ROM file: e03.6g [libretro INFO] [MAME 2003] Opening ROM file: simp_18h.rom [libretro INFO] [MAME 2003] Opening ROM file: simp_16h.rom [libretro INFO] [MAME 2003] Opening ROM file: simp_3n.rom [libretro INFO] [MAME 2003] Opening ROM file: simp_8n.rom [libretro INFO] [MAME 2003] Opening ROM file: simp_12n.rom [libretro INFO] [MAME 2003] Opening ROM file: simp_16l.rom [libretro INFO] [MAME 2003] Opening ROM file: simp_1f.rom [libretro INFO] [MAME 2003] Opening ROM file: simp_1d.rom [libretro INFO] [MAME 2003] Succesfully loaded ROMs. [libretro ERROR] cpunum_get_localtime() called for invalid cpu num! [INFO] Environ SET_ROTATION: 0 [INFO] Environ SET_PIXEL_FORMAT: RGB565. [libretro INFO] [MAME 2003] CONTROLS: GAMEINFO: The My Game (4 Players) CPU: KONAMI 3.000000 MHz Z80 3.579545 MHz (sound) Sound (stereo): 1xYM2151 3.579545 MHz 1x053260 3.579545 MHz Screen Resolution: 288 x 224 (H) 60.000000 Hz [INFO] Skipping SRAM load.. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Video @ 897x672 [INFO] [Video]: Starting threaded video driver ... [INFO] [EGL] Falling back to eglGetDisplay [INFO] [EGL]: EGL version: 1.4 [INFO] [EGL]: Current context: 0x1. [INFO] [GL]: Found GL context: videocore [INFO] [GL]: Detecting screen resolution 1366x768. [INFO] [EGL]: eglSwapInterval(1) [INFO] [GL]: Vendor: Broadcom, Renderer: VideoCore IV HW. [INFO] [GL]: Version: OpenGL ES 2.0. [INFO] Querying EGL extension: KHR_image => exists [WARN] [GL]: GLES implementation does not have BGRA8888 extension. 32-bit path will require conversion. [INFO] [GL]: Using resolution 1366x768 [INFO] [GL]: Default shader backend found: glsl. [INFO] [Shader driver]: Using GLSL shader backend. [WARN] [GL]: Stock GLSL shaders will be used. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: Compiled [INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: Compiled [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: Compiled [INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: Compiled [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] Shader log: Compiled [INFO] [GLSL]: Found GLSL fragment shader. [INFO] Shader log: Compiled [INFO] [GLSL]: Linking GLSL program. [INFO] Resetting shader to defaults ... [INFO] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver. [INFO] [udev]: Keyboard #0 (/dev/input/event0). [INFO] [udev]: Plugged pad: DragonRise Inc. Generic USB Joystick (121:6) on port #0. [INFO] [udev]: Pad #0 (/dev/input/event2) supports 0 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/DragonRise Inc. Generic USB Joystick .cfg [INFO] [udev]: Plugged pad: DragonRise Inc. Generic USB Joystick (121:6) on port #1. [INFO] [udev]: Pad #1 (/dev/input/event3) supports 0 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/DragonRise Inc. Generic USB Joystick .cfg [INFO] [udev]: Plugged pad: DragonRise Inc. Generic USB Joystick (121:6) on port #2. [INFO] [udev]: Pad #2 (/dev/input/event4) supports 0 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/DragonRise Inc. Generic USB Joystick .cfg [INFO] [udev]: Plugged pad: DragonRise Inc. Generic USB Joystick (121:6) on port #3. [INFO] [udev]: Pad #3 (/dev/input/event5) supports 0 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/DragonRise Inc. Generic USB Joystick .cfg [INFO] [udev]: Plugged pad: Logitech Logitech Dual Action (1133:49686) on port #4. [INFO] [udev]: Pad #4 (/dev/input/event1) supports 0 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Logitech Logitech Dual Action.cfg [INFO] [udev]: Plugged pad: Joystick Blue (1118:654) on port #5. [INFO] [udev]: Pad #5 (/dev/input/event10) supports force feedback. [INFO] [udev]: Pad #5 (/dev/input/event10) supports 16 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Joystick Blue.cfg [INFO] [udev]: Plugged pad: Joystick Green (1118:654) on port #6. [INFO] [udev]: Pad #6 (/dev/input/event11) supports force feedback. [INFO] [udev]: Pad #6 (/dev/input/event11) supports 16 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Joystick Green.cfg [INFO] [udev]: Plugged pad: Xbox Gamepad (userspace driver) (0:0) on port #7. [INFO] [udev]: Pad #7 (/dev/input/event6) supports 0 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [Autoconf]: no profiles found for Xbox Gamepad (userspace driver) (0/0). [INFO] [udev]: Plugged pad: Xbox Gamepad (userspace driver) #2 (0:0) on port #8. [INFO] [udev]: Pad #8 (/dev/input/event7) supports 0 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [Autoconf]: no profiles found for Xbox Gamepad (userspace driver) #2 (0/0). [INFO] [udev]: Plugged pad: Joystick Red (1118:654) on port #9. [INFO] [udev]: Pad #9 (/dev/input/event8) supports force feedback. [INFO] [udev]: Pad #9 (/dev/input/event8) supports 16 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Joystick Red.cfg [INFO] [udev]: Plugged pad: Joystick Yellow (1118:654) on port #10. [INFO] [udev]: Pad #10 (/dev/input/event9) supports force feedback. [INFO] [udev]: Pad #10 (/dev/input/event9) supports 16 force feedback effects. [INFO] [Autoconf]: 7 profiles found. [INFO] [autoconf]: selected configuration: /home/pi/.config/retroarch/autoconfig/Joystick Yellow.cfg /opt/retropie/supplementary/runcommand/runcommand.sh: line 1006: 1089 Illegal instruction /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg "/home/pi/RetroPie/roms/mame-libretro/MyGame.zip" --verbose --appendconfig /dev/shm/retroarch.cfg
-
The ROM is good. It was working before I started messing with xboxdrv and worked again after disabling xboxdrv.
-
I've debated about getting rid of the individual encoders and going with something like an ipac-4, then I wouldn't need the hub. What's another $65? I could save the individual encoders for a bartop. It'd be nice to get this working though.
-
@elarson Since all of them have the same Vendor/Product ID AND Name, there is no way to distinguish between them. RetroArch auto-configuration doesn't support other means of assigning a configuration other than these 2 filters.
One way of doing that is by:
- identifying the USB port they're connected
- start
xboxdrv
to rename the controller based on the port you're using (like you've already discovered) and use--detach-kernel-driver
to mask the original controller (so you don't have duplicates).
The trick is finding out which
/dev/input/js*
is Port X and runxboxdrv
for the Port X configuration with the appropriate name, so the joysticks detection order done by the OS doesn't affect the mapping. You can see in the 2nd output you posted thePhys
line which should get the port # (well some sort of numbering), that would be persistent. -
So in my testing this afternoon, I've broken xboxdrv and the joysticks no longer register as "Joystick Red" etc. when configuring them in Retroarch.
Hopefully xboxdrv wasn't the route route to take. Not sure what I did to get it using xboxdrv last night. I guess that's the problem with staying up till 1 AM trying things.
I've commented out the xboxdrv commands to register the joysticks and removed the xboxdrv driver for now.
-
I was using the devpath to create symlinks for the encoders, which I think was being consistent, but I haven't tested enough to be positive, but I think it is.
KERNEL=="js[0-9]*", SUBSYSTEM=="input", ATTRS{idVendor}=="0079", ATTRS{idProduct}=="0006", ATTRS{devpath}=="1.1.3.3", SYMLINK+="input/js_blue"
for xboxdrv, I was finding the device by its path
"/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --detach-kernel-driver --evdev "/dev/input/by-path/platform-3f980000.usb-usb-0:1.1.3.3:1.0-event-joystick" --device-name "Joystick Blue" --evdev-keymap "BTN_BASE=a,BTN_BASE3=b,BTN_BASE5=back,BTN_BASE6=start,BTN_TOP2=black,BTN_BASE4=y,BTN_BASE2=x,BTN_PINKIE=white" --evdev-absmap "ABS_X=y1,ABS_Y=x1" --axismap "" --mimic-xpad --silent
-
so figured out why xboxdrv wasn't working today. it was a copy-and-paste error.
Got it working with one controller and it loads the game. Going to try two now.
-
So xboxdrv seems to be working, but my ROM crashes when I have all four joysticks configured. If I have three of them configured through xboxdrv, it works. But if I add a fourth, the ROM crashes.
You can see the output of my previous runcommand.sh up above.
#red "/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --detach-kernel-driver --evdev "/dev/input/by-path/platform-3f980000.usb-usb-0:1.1.3.1:1.0-event-joystick" --evdev-keymap "BTN_BASE=a,BTN_BASE3=b,BTN_BASE5=back,BTN_BASE6=start,BTN_TOP2=black,BTN_BASE4=y,BTN_BASE2=x,BTN_PINKIE=white" --evdev-absmap "ABS_X=y1,ABS_Y=x1" --axismap "" --mimic-xpad --silent --device-name "Joystick Red" & #blue "/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --detach-kernel-driver --evdev "/dev/input/by-path/platform-3f980000.usb-usb-0:1.1.3.3:1.0-event-joystick" --evdev-keymap "BTN_BASE=a,BTN_BASE3=b,BTN_BASE5=back,BTN_BASE6=start,BTN_TOP2=black,BTN_BASE4=y,BTN_BASE2=x,BTN_PINKIE=white" --evdev-absmap "ABS_X=y1,ABS_Y=x1" --axismap "" --mimic-xpad --silent --device-name "Joystick Blue" & #green "/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --detach-kernel-driver --evdev "/dev/input/by-path/platform-3f980000.usb-usb-0:1.1.3.4:1.0-event-joystick" --evdev-keymap "BTN_BASE=a,BTN_BASE3=b,BTN_BASE5=back,BTN_BASE6=start,BTN_BASE4=y,BTN_BASE2=x" --evdev-absmap "ABS_X=y1,ABS_Y=x1" --axismap "" --mimic-xpad --silent --device-name "Joystick Green" & #yellow "/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --detach-kernel-driver --evdev "/dev/input/by-path/platform-3f980000.usb-usb-0:1.1.3.2:1.0-event-joystick" --evdev-keymap "BTN_BASE=a,BTN_BASE3=b,BTN_BASE5=back,BTN_BASE6=start,BTN_BASE4=y,BTN_BASE2=x" --evdev-absmap "ABS_X=y1,ABS_Y=x1" --axismap "" --mimic-xpad --silent --device-name "Joystick Yellow" &
-
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.
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.