Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Setting up XBox 360 Wireless Controllers–Hints and Tips
- This topic has 5 replies, 3 voices, and was last updated 10 years, 1 month ago by methylamine.
-
AuthorPosts
-
11/24/2014 at 04:44 #83028methylamineParticipant
First–huge Thank You to all the contributors on this forum! Score one for voluntary human interaction.
I had great difficulty getting the XBox 360 wireless controllers to work; nothing went well. Not a total Linux n00b but not expert either.
First: the “retroarch.cfg” file is your best friend. If all else fails, manually editing this file to achieve correct controller mappings will solve controller problems.
Second: /opt/retropie/emulators/RetroArch/installdir/bin/retroarch-joyconfig is your other friend; it quickly maps joystick inputs to the parameters for the retroarch.cfg files. It just takes a bit of doing to get it to work; my issue was it didn’t see my controller until I had them registered properly–see below.
Third: if joyconfig doesn’t see your controller, not to worry. Go here:
https://github.com/retropie/RetroPie-Setup/wiki/Setting-up-the-XBox360-controller
And use method #3. Method #1 gave me inconsistent results; the controller would jump around between js0, js1, and js3. Joyconfig couldn’t see it half the time. And it made SNES games jumpy or slow. Method #3 consistently registers the controller. It also solved my other perplexing problem–even when method #1 properly registered the controller, and the controller worked in EmulationStation, the games couldn’t see the controller.Fourth: Get “jstest”–as in “sudo apt-get install joystick”. Once installed, find your controller with “jstest /dev/input/jsX” where “X” is 0 to 3. When you hit the right one, you’ll have zero values for the analog sticks and “off” for the buttons. Wiggle them around, press buttons, witness the magic of an XBox 360 controller talking to Linux on a 20-dollar computer*.
Now you’ve got the XBox controller reliably and stably registered with that shell script/demon trick (method #3). You’ve got the tool to tell you where it is and what its buttons do (jstest).
Use retroarch-joyconfig to create a mapping file:
“./retroarch-joyconfig -o p1.cfg -p 1 -j 0”Copy the text that’s generated to the end of your “/opt/retropie/configs/all/retroarch.cfg” file.
Don’t assume that just because it’s mapped it’ll work in all emulators; it won’t. You now have to map that general controller to specific console’s expectations.
Individual emulator’s retroarch.cfg files are located in /opt/retropie/configs/NameOfEmulator directories. The main one under ‘all’ is overridden by the individual emulators.
If you have issues with mis-mapped keys in a game, make note of which buttons invoke which activities; for some reason I had the hat button left mapped to the fire key in NES games. Open the /opt/retropie/configs/nes/retroarch.cfg file; note which action is mapped to the number “2” (see below). Change its mapping from “2” to “11”–the right trigger.
And so forth.
XBox button/stick numerical mappings derived from jstest:
0–D-pad Up
1–D-pad Down
2–D-pad Left
3–D-pad Right
4–A
5–B
6–X
7–Y
8–Left shoulder
9–Right shoulder
10–Left trigger
11–Right trigger
12–back
13–start
14–xbox button
15–Left stick depressed
16–Right stick depressed* I simply can’t believe how amazing the Raspberry Pi is. I didn’t have a laptop this powerful until around 2001.
11/25/2014 at 05:51 #83085natecbcParticipantIs there a video that demonstrates how to do any of these configurations? Preferably the one you recommended from github?
Is there a particular reason why this is so difficult to set up? I would think that with such a popular emulation platform for the Raspberry Pi that even the 10 most common controllers would be pre-mapped or you could at least easily configure them.
This has been an extremely frustrating process. Raspberry Pi is my first experience with Linux and terminal commands. I feel absolutely lost.
I watched the following videos to set up retropie:
Install: https://www.youtube.com/watch?v=BL4bcQOkULM
Add Roms: https://www.youtube.com/watch?v=dhQ3Vs2tyUw,
Controller Config: https://www.youtube.com/watch?v=dhQ3Vs2tyUwFor the life of me I can not figure out the controller issue. Help please!!!
11/25/2014 at 06:24 #83089methylamineParticipantHey nate–don’t get frustrated, it just takes some patience.
Totally worthwhile–my kids, wife, and I spent practically all of Sunday enjoying old Sega, NES, SNES games, what a blast!If you’re totally new to Linux command line just take it slow, read some tutorials on the basics.
Easiest way to get set up: have the RPi attached to the XBox adapter, a keyboard and your TV. Sit on your couch with your XBox controller and a laptop. Connect to the RPi with SSH.
Now, you have the RPi visible on TV and on your SSH session; you can do all the Linux command-line stuff in the SSH, you can push files and ROM’s to it from your laptop via a network share, and you can fool with the controller and keyboard.
Don’t be afraid to re-image the RPi’s SD card if you get too fubared; start fresh. I re-imaged once after I’d gotten really close but still wasn’t working.
And above all, follow the instructions in:
https://github.com/retropie/RetroPie-Setup/wiki/Setting-up-the-XBox360-controllerAfter getting the initial setup…that is, writing the 2.3 image to the SD card, doing “raspi-config” to expand the partition, and installing the XBox driver….do method 3 of the above.
I’m working on getting MAME going now; none of my classic arcade game ROM’s work :(
11/25/2014 at 07:12 #83091natecbcParticipantmethylamine,
Thank you for your response. I do appreciate you getting back to me.
Do you have any insight into why this is such a complicated process or why there isn’t one straightforward way of doing this?Second…I honestly have no clue what I’m doing. When reading through the github aid I’m at a loss.
It says: “The third possibility, you can use an init.d script with the daemon -D Option. Save the follwing content to /etc/init.d/xboxdrv”
Am I supposed to type out that long section of code? Am I supposed to see some prompt? File manager shows that the directory /etc/init.d/xboxdrv doesn’t exist and the SSH shows the same. Is that because I’m supposed to create it? If so it doesn’t explain how to do that.
I made sure to run the $ sudo apt-get install xboxdrv first with success but after that I might as well be playing marco polo in the dark, in a place I’ve never been before all tied up.
I really want to learn but it seems like people who know linux talk to others in language that people who know linux would understand; and everyone else sinks or swims. Tribal knowledge type stuff.
I’m a much better visual learner so reading articles and forums that have lots of terminology I don’t know with code and functions I don’t understand is like being dropped in a foreign country with people that doesn’t speak English and being nearly blind.
Can you tell I’m a bit stressed? :/
11/25/2014 at 16:34 #83100globalvvParticipantBrowsing around on several forums a lot of people seem to have more luck with method 3, but no one really explains how to do it. I’ve been trying to get my controller working for about a week now.
11/25/2014 at 17:32 #83101methylamineParticipantYep I hear you, we all start out lost in Linux.
Best I can tell you is browse around YouTube, there are plenty of How-To tutorials on basic linux use.You can also have a graphic front-end–a GUI, like Windows–to do the file manipulations if you don’t want to use the arcane command-line tools. I force myself to use command-line because ultimately it’s faster and more accurate. But if you “startx”, you’ll get a basic GUI in Debian.
Sounds like you’re starting from ground zero, with a steep learning curve. The benefit is you’ve got an incentive–and if you learn it you’ve got a new professional skill :)
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.