Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › No J0 – YAJSQ – Yet Another Joystick Question
- This topic has 4 replies, 2 voices, and was last updated 10 years, 9 months ago by bmanske.
-
AuthorPosts
-
03/21/2014 at 18:11 #5727bmanskeParticipant
I’ll try to be brief
I have a v1 Pi with 256M, XBOX wired controller new, started with image torrented from this blog, USB WiFi connection.
First run, nothing happened, added WiFi config and ran upgrade and dist-upgrade
Second run, the controller worked partially cause the pi loaded joydev driver
Third try, I had installed xboxdrv with the recomended startup, registered the driver, changed the -w to -i for the wired controller, startup goes fine but no communications with RetroPie.
Skipping a lot like driver debug and jstest.
I have both /dev/input/j0 and /dev/input/j1. retroarch-joyconfig using -j1 works but using -j0 fails.
Ah-Ha I add –controller-slot 0 to /etc/init.d/xboxdrv in the of the daemon arguments. Now I have only a /dev/input/j1. What???
Next I change the player joystick index in retroarch.cfg from 0 to 1 to try to point emulationstation to the j1 device. No luck.
Anybody else have any ideas?Last thing, in the /etc/defaults/xboxdrv file that I got off the forum, in the case under the 4 controller option the last “-l 4” needs to be “-l 5” or maybe I just got it from the wrong place.
03/21/2014 at 20:28 #5732trimmtrabbParticipantMaybe try again with a fresh image, this thread may help you: https://www.petrockblock.com/forums/topic/installation-problem/#post-5225 Somebody else had a similar issues trying to get a wired pad to work
03/21/2014 at 20:55 #5733bmanskeParticipantI’ll give it a shot. Is there anything about the steps outlined above that I should change or just do it the same way? If you recommend loading the driver as a daemon, then I’ll probably retain the xboxdrv in /etc/init.d/ and /etc/defaults/.
Thanks, I’ll let you know what happens.
03/22/2014 at 08:25 #5734bmanskeParticipantI did get it working on my second attempt. I think it runs very nicely but I have only tried the SNES emulator so far.
The difference between this attempt and the first is that I had the xboxdrv files that go in the /etc/default and /etc/init.d dirs prepared. There was some problems on the first attempt and xboxdrv didn’t load so it didn’t unload the default driver for the joystick to unload. That driver must have reserved a joystick slot because from that point I couldn’t get the Xbox360 controller to load as /dev/inout/js0. Even after I forced the driver to be unloaded it still defaulted to js1. This makes me think that the slot was then reserved based on the driver and the UID from the USB HID controller. Does anyone know it this is in fact how it works? There should also be a way to remove this information from the system. Can anyone tell me how to reset the device info. This would save people in the future from starting from scratch in a case like this.
For those interested in why the driver didn’t load… Debian uses dependency based scheduling for loading drivers. The comment at the front of the file actually contains instructions for loading it. It is the format of the text that is very finacky. It is sensitive to multiple spaces so horizontal space should be added with tabs. Some of my editing is done in windows and the line ending chars are different. So I will load a file in nano and write it back out with <ctrl>-o and before accepting the name press <alt>-m if it says that is going to write in MS-DOS format or in MAC format. I think more people would try loading drivers as daemons and writing the needed shell scripts if the shell would ignore white space properly or at least gave you a message that says that the problem is one of those chars that you can’t see instead of telling you that you have a mismatched IF statement or some other bogus indication.
I hope that all this helps someone else
03/24/2014 at 06:31 #5759bmanskeParticipantIn reality the reload did nothing to solve the problem. Reading through the man page for xboxdrv it says in the -EVDEV option (refering to use of xboxdrv to work with non xbox controllers) that the driver can leave joystick devices around when setting up the controllers. The old devices can be deleted and the new devices renamed.
Looking at /etc/init.d/xboxdrv I saw a workaround. It looked like this workaround was for a 4 controller setup and if devices 0-3 were old then devices 4-7 would replace them. What I needed was a solution for my one controller.
This is not a complete solution for the problem. If I boot and the controller comes up in a strange state then it doesn’t automatically reset the joystick. What it does is leave the joystick devices in a state to that when I unplug and plug in my controller then it attaches correctly.
It SHOULD work for up to 4 controllers but I only have one so it hasn’t been tested for 2-4.
The other improvement I made was to allow the choice of wired or wireless controller in the /etc/default/xboxdrv file. This choice can be made for each controller individually.
I changed the LED for the 4th controller on a 4 controller setup. I moved the code for run-time checking of the parameters in the defaults file into the do_start to simplify the signaling of an error.
I’m attaching my files below and hope that it helps out. Let me know if there are any questions or ideas for improvement.
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.