xbox 360 wireless controller works in UI but not in any emulator

Home Forums RetroPie Project Controller Configuration in RetroPie xbox 360 wireless controller works in UI but not in any emulator

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 54 replies, has 6 voices, and was last updated by Profile photo of catrinisin catrinisin 1 year, 1 month ago.

Viewing 20 posts - 36 through 55 (of 55 total)
  • Author
    Posts
  • #114442
    Profile photo of labelwhore
    labelwhore
    Participant

    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:

    http://www.microcenter.com/product/441187/Micro-USB_Power_Supply_for_Raspberry_Pi_B_with_Built-in_4ft_Cable_-_2_Amp

    This one looks identical, but would probably cause issues:

    http://www.microcenter.com/product/441186/Micro-USB_Power_Supply_for_Raspberry_Pi_with_Built-in_4ft_Cable_-_12_Amp

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    • This reply was modified 1 year, 2 months ago by Profile photo of labelwhore labelwhore.

    #114451
    Profile photo of davidemol
    davidemol
    Participant

    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.

    I solved with above script!

    Thanks a lot my friend!

    #114511
    Profile photo of labelwhore
    labelwhore
    Participant

    Glad to hear it! 🙂

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    #114514
    Profile photo of catrinisin
    catrinisin
    Participant

    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)

    #114523
    Profile photo of labelwhore
    labelwhore
    Participant

    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)

    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

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    #114525
    Profile photo of catrinisin
    catrinisin
    Participant

    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

    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.

    #114527
    Profile photo of labelwhore
    labelwhore
    Participant

    Ok, 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.

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    • This reply was modified 1 year, 2 months ago by Profile photo of labelwhore labelwhore.
    • This reply was modified 1 year, 2 months ago by Profile photo of labelwhore labelwhore.
    #114580
    Profile photo of catrinisin
    catrinisin
    Participant

    Sweet, thanks man!

    #114582
    Profile photo of labelwhore
    labelwhore
    Participant

    Ok, 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  

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    • This reply was modified 1 year, 2 months ago by Profile photo of labelwhore labelwhore.
    • This reply was modified 1 year, 2 months ago by Profile photo of labelwhore labelwhore.
    #114587
    Profile photo of labelwhore
    labelwhore
    Participant

    the mouse emulation .cfg file is attached

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    Attachments:
    1. mouse.cfg_.txt
    #114593
    Profile photo of labelwhore
    labelwhore
    Participant

    I just added ^^ that to the wiki as well

    https://github.com/RetroPie/RetroPie-Setup/wiki/Setting-up-the-XBox360-controller#alternate-controller-configurations

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    #114635
    Profile photo of catrinisin
    catrinisin
    Participant

    This 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?

    #114641
    Profile photo of labelwhore
    labelwhore
    Participant

    It’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.

    http://www.th3rdwave.com/tracks/
    ^^ my other hobby

    • This reply was modified 1 year, 2 months ago by Profile photo of labelwhore labelwhore.
    • This reply was modified 1 year, 2 months ago by Profile photo of labelwhore labelwhore.
    • This reply was modified 1 year, 2 months ago by Profile photo of labelwhore labelwhore.
    #114693
    Profile photo of catrinisin
    catrinisin
    Participant

    Thanks, 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:

    Large Bartop Arcade

    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!

    #115674
    Profile photo of johnhansen
    johnhansen
    Participant

    I 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?

    #115682
    Profile photo of catrinisin
    catrinisin
    Participant

    The answers are in this thread. Read up

    #115683
    Profile photo of johnhansen
    johnhansen
    Participant

    It 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 there

    and 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 gamepad

    so what i need for it to work in games?

    #115687
    Profile photo of catrinisin
    catrinisin
    Participant

    Did 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.

    #115689
    Profile photo of johnhansen
    johnhansen
    Participant

    yes 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

    #115690
    Profile photo of catrinisin
    catrinisin
    Participant

    No i mean map energy button, select the option called “bind all” under the player number you want

Viewing 20 posts - 36 through 55 (of 55 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar