xboxdrv works in FE / shell but not emulator
-
@markg said in xboxdrv works in FE / shell but not emulator:
it was bound to the handler my first one was which was strange.
I'm not sure I know what you mean here. Could you elaborate?
-
@mediamogul it seems that the device number (js0 or js1) is determined by the order you start the devices. In the xboxdrv configuration you have to specify the event number that's bound to that. So if I have two xboxdrv processes running, one for each of my controllers (xbox and snes30) If I don't turn them on in right order before that process runs they will bind to the wrong configuration file. I was wondering if there is a way to query the device name to determine if it's running as js0 or js1 and use that in the shell script that launches xboxdrv. I guess I could go to the extreme of using some awk/sed to take output of cat /proc/bus/input/devices and look at device names to determine the right handler.
-
OK, I see what you're saying. Ideally, the best way to bind a config to a controller is it's event entry at
/dev/input/by-id/*
. However, not all controllers report an ID and I take it that's why you're using the event number in your mapping example above. Fortunately, I haven't had to deal with this much myself. I've been lucky in that all of the controllers I have an interest in using for RetroPie report an ID. Albeit "extreme", I do really like the solution you're proposing to query the event number. I'd be very interested to hear how you implement it fully if you choose to do so. -
@mediamogul Ah... Thanks, think this was an RTFM thing. I was going from the recipe page on wiki and the instructions on the event name and I got to thinking "number". Re-reading it now I've changed to use by-id/name and that fixes issue of binding orders to event number that change. Thanks so much!
The four way restrictor is a big difference.... I may try to change the analog stick to work like digital and see if that works even better for a 4-way substitute.
-
Glad to see it's working.
The four way restrictor is a big difference.
I love that feature! You'll never get your best score in 'Pac-Man' without something like it.
-
@mediamogul so I did notice that the bluetooth controller never shows up on /dev/input/by-id ls command - but it does show up if I do cat on /proc/bus/input/devices. Expected?
-
It's not uncommon, Bluetooth or otherwise. I believe it's up to the manufacturer to program in an event ID into the firmware.
-
So this works for finding a controller by event ID dynamically
cat /proc/bus/input/devices |grep -A 10 "SNES"|grep Handlers|cut -d'=' -f2|cut -d' ' -f1
Which I used to find the SNES Controller that doesn't show up with other command, then you can dynamically do assignments with the resulting event number.
I seem to have noticed if I pick my newly named "4-way SNES" controller but have a default SNES controller setup in my retroarch-joypads (one 4 way and one from initial setup) it uses the wrong one. I removed the original one and working fine but makes me wonder about how to use this controller two different ways with retroarch (use in "normal" mode and with xboxdrv) if something in retroarch is looking at this other configuration file.
-
@mediamogul the one issue I still have is what you gave me that fixed things doesn't "stick". So the thing I HAVE to do to get an xboxdrv mapped controller to work is to pick it in the retroarch configuration as joy1 and joy2 and magic, it works. However when I unplug controller or disconnect bluetooth it seems those settings are "lost" and I have to go back in there and manually fix them again (they read "unset"). I kinda assumed these settings were just in a retroarch config file and not going to change. Is there a different place I should put this to make it more permanent? I see there is a enable plug/play option - maybe turn that off since I want to make it static? Thanks for any pointers with your help I'm so close to having this 100%!
-
@markg said in xboxdrv works in FE / shell but not emulator:
Is there a different place I should put this to make it more permanent?
This setting can be hardcoded in
/opt/retropie/configs/all/retroarch.cfg
. The entry you're looking for is:input_player1_joypad_index = "x"
Something else that comes to mind and is completely untested by myself is that this setting could be altered alongside xboxdrv launching, so as to accommodate individual mappings and controllers on-the-fly. Try at your own risk, but something like this might work well:
sed -i 's/input_player1_joypad_index = "*"/input_player1_joypad_index = "1"/g' /opt/retropie/configs/all/retroarch.cfg
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.