Homepage › Forums › RetroPie Project › Controller Configuration in RetroPie › xbox 360 wireless controller works in UI but not in any emulator
Tagged: xbox controller
- This topic has 54 replies, 6 voices, and was last updated 8 years, 10 months ago by catrinisin.
-
AuthorPosts
-
01/19/2016 at 22:06 #114442labelwhoreParticipant
http://elinux.org/RPi_Hardware#Power_Supply_Problems
That guide says it should be 700ma, but that’s wrong. For this project you NEED a 2 amp power supply, nothing less.
This is what I’m using:
This one looks identical, but would probably cause issues:
01/19/2016 at 23:41 #114451davidemolParticipant[quote=114436]Firstly, exit 0 should be the very last line in rc.local, if it’s missing, add it.
The next thing I see that’s wrong is that you need either this:
xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 1 --led 3 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 2 --led 4 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 3 --led 5 --deadzone 4000 --silent &
You may also need to add a line that says
rmmod xpad
before either of those lines.[/quote]
I solved with above script!
Thanks a lot my friend!
01/20/2016 at 15:33 #114511labelwhoreParticipantGlad to hear it! :)
01/20/2016 at 15:38 #114514catrinisinParticipantMy issue with the xbox controller is also solved thanks to this great community. Thanks everyone!
My only issue left is trying to figure out how to get it to work with the new default mupen64plus emulator which doesn’t use Retroarch. (Retropie 3.3)
01/20/2016 at 16:05 #114523labelwhoreParticipant[quote=114514]My issue with the xbox controller is also solved thanks to this great community. Thanks everyone!
My only issue left is trying to figure out how to get it to work with the new default mupen64plus emulator which doesn’t use Retroarch. (Retropie 3.3)
[/quote]
I haven’t played with that particular emulator, but if you’re having control issues, take a look at the xboxdrv documentation. There are some really handy features for the controller. (IMO the xbox 360 controller is hands down the best controller for the pi.) In particular, look into creating some extra config files and the--next-config
option. The default behaviour of the xbox button is to change controller modes. I use this to be able to control atari 5200, 800, and ST, as well as c64 and Amiga. If you want more details I can provide some of my controller config files, and what you need to modify in rc.local to get that working.01/20/2016 at 16:10 #114525catrinisinParticipant[quote=114523]
I haven’t played with that particular emulator, but if you’re having control issues, take a look at the xboxdrv documentation. There are some really handy features for the controller. (IMO the xbox 360 controller is hands down the best controller for the pi.) In particular, look into creating some extra config files and the--next-config
option. The default behaviour of the xbox button is to change controller modes. I use this to be able to control atari 5200, 800, and ST, as well as c64 and Amiga. If you want more details I can provide some of my controller config files, and what you need to modify in rc.local to get that working.http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html
[/quote]
Oh wow, yes please do share those configs, thanks! I agree that this is the controller I want to use for pi. I’ll start looking at the documentation also.
01/20/2016 at 16:12 #114527labelwhoreParticipantOk, I’m at work at the moment, so it’ll have to be later tonight, but I’ll post them for you then.
Basically there are 3 files, one for a mouse config for the pc type systems, then one for player 1 and one for player 2 that emulate keystrokes. I have it set up so that only the player 1 controller can use the mouse config.
…as a matter of fact, I think I’m gonna update the wiki with my controller configs. I’ve been using them for quite a while now, and they work pretty well.
01/21/2016 at 00:04 #114580catrinisinParticipantSweet, thanks man!
01/21/2016 at 00:59 #114582labelwhoreParticipantOk, so here’s what you need to do for the additional controller configs. I may make several updates to this post, so just be aware of that.
First, copy the attached files to your pi. (Remove the .txt extension first of course.) I placed them in /usr/local/ but they could go anywhere. The two attached to this post are for player 1 and player 2 for atari 800 and vice. One more is coming in the next post which is for mouse emulation.
Next, you need to edit rc.local so that xboxdrv uses the config files.
If you have this line:
xboxdrv -D i 0 --next-controller -i 1 --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled &
change it to this:
xboxdrv -D i 0 --alt-config /usr/local/xboxdrv_player1.cfg --alt-config /usr/local/mouse.cfg --next-controller -i 1 --alt-config /usr/local/xboxdrv_player2.cfg --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled &
if you have this line generated by the xboxdrv install from retropie_setup.sh
"/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --daemon --detach --wid 0 --led 2 --deadzone 4000 --silent --trigger-as-button ---next-controller --wid 1 --led 3 --deadzone 4000 --silent --trigger-as-button --dbus disabled --detach-kernel-driver
change it to this
"/opt/retropie/supplementary/xboxdrv/bin/xboxdrv" --daemon --detach --wid 0 --led 2 --deadzone 4000 --silent --trigger-as-button --alt-config /usr/local/xboxdrv_player1.cfg --alt-config /usr/local/mouse.cfg --next-controller --wid 1 --led 3 --deadzone 4000 --silent --trigger-as-button --alt-config /usr/local/xboxdrv_player2.cfg --dbus disabled --detach-kernel-driver
or if you are using seperate lines like this:
xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 1 --led 3 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 2 --led 4 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 3 --led 5 --deadzone 4000 --silent &
change them so they look lie this:
xboxdrv --trigger-as-button --wid 0 --led 2 --alt-config /usr/local/xboxdrv_player1.cfg --alt-config /usr/local/mouse.cfg --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 1 --led 3 --alt-config /usr/local/xboxdrv_player1.cfg --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 2 --led 4 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --wid 3 --led 5 --deadzone 4000 --silent &
The very last step is to make the .cfg files executable.
sudo chmod +x /usr/local/xboxdrv_player1.cfg
sudo chmod +x /usr/local/xboxdrv_player2.cfg
sudo chmod +x /usr/local/mouse.cfg
Reboot.
Now, whenever you hit the xbox button on either controller 1 or 2, it will change the control scheme. For player 1, the controller starts up in normal mode. Hitting the xbox button will change to player1.cfg. Hitting it again will enable mouse emulation. One more time will bring back normal operation. Player 2 cycles between normal operation and player1.cfg. Controllers 3 and 4 are unaffected.
Here’s a little explanation of xboxdrv_player1.cfg. player2 is similar:
Hopefully this looks ok…
Interface | Mapped to | Atari 800/5200 | Commodore | ------------------------------------------------------------- Right Analog | Arrow Keys | Menu Nav | Menu Nav Left Analog | Mouse | Movement | D-Pad | Joystick | | Joystick port 2 ------------------------------------------------------------- A Button | Right Ctrl | | Fire B Button | Num Pad 0 | Fire | Fire X Button | Enter | | Return Y Button | Space | Space | Space ------------------------------------------------------------- L1 Button | F4 | Start Game | R1 Button | F7 | | L2 Button | PAGEUP | | R2 Button | CAPSLOCK | | Start Game -------------------------------------------------------------- Start | F1 | Menu | Menu Back | Esc | Esc | Esc
01/21/2016 at 01:12 #114587labelwhoreParticipantthe mouse emulation .cfg file is attached
01/21/2016 at 02:06 #114593labelwhoreParticipantI just added ^^ that to the wiki as well
01/21/2016 at 16:05 #114635catrinisinParticipantThis is really cool, I love the different options you can do. How did you learn the syntax for the alt-config files? Is that in the documentation somewhere?
01/21/2016 at 16:43 #114641labelwhoreParticipantIt’s all in the manual. It took me tons of trial an error to get these right lol. I’m not a developer, but I do test crap for a living.
http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html
As you can see xboxdrv is extremely flexible. It is possible to create scripts that restart xboxdrv with the correct .cfg file so that you could avoid having to use the xbox button at all, which is what the init.d start up method is good for. But I’ve never been able to get that to work correctly.
I think maybe because of the way xboxdrv handles the remapping of keys, this doesn’t work for every emulator. For example, the remapped escape key does not work in standalone PPSSPP to bring up the emulator menu. I still have to use my keyboard for that. It’s certainly a start towards a keyboardless setup though.
01/21/2016 at 23:20 #114693catrinisinParticipantThanks, I really appreciate all the info and I’m sure others will too.
In my case the unit I’m doing this with is a bartop arcade I built:
I’m using an ipac controller that has a shift key option that allows me to have many different keyboard buttons available so it isn’t the end of the world if I have to reach over to the arcade controls to perform an action like bringing up a menu, etc.
I’m using the xbox controllers personally for every emulator but my kids use the arcade controls mostly. Originally I needed a controller for emulators like n64, psx, etc. but I love that I’m now going to be able to use it for all the older systems as well. I had no idea it could emulate a mouse!01/30/2016 at 16:57 #115674johnhansenParticipantI still have problem, xbox 360 wireless controller works fine in menus i can start all games
but when entering games it dont work.Any way to fix it?
01/30/2016 at 17:33 #115682catrinisinParticipantThe answers are in this thread. Read up
01/30/2016 at 18:06 #115683johnhansenParticipantIt dont work.
Seems it is retroarch not working with xbox360
i go in the green configure retroarch
settings input
input user 2
then it sees xbox gamepad in thereand every time i load a game it says box controller on port 2
so it is like the xbox driver is loaded and it works in menus
in the user 2 device type i have retropad
ananlog to digital none
device index xbox gamepadso what i need for it to work in games?
01/30/2016 at 19:24 #115687catrinisinParticipantDid you actually go through and map each button in the green retroarch menu? Also make sure it is set to save settings on exit. Watch the video above for a complete how to.
01/30/2016 at 19:41 #115689johnhansenParticipantyes when i do the mapping and it ask type on the 360 crontroller nothing happens.
so it is like when i am in the green part the xbox controller can not be recognized the clicks.In the main menu where i choose gameboy, snes etc it works fine.
in the green menu my other usb cable controller works fine
01/30/2016 at 20:18 #115690catrinisinParticipantNo i mean map energy button, select the option called “bind all” under the player number you want
-
AuthorPosts
- The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.