Homepage Forums RetroPie Project Everything else related to the RetroPie Project Need help with wired Xbox 360 controller

Viewing 34 posts - 1 through 34 (of 34 total)
  • Author
    Posts
  • #8545
    kadaj2302
    Participant

    I am trying to set up a wired Xbox 360 controller and am running into some trouble. It is plugged directly into my Raspberry Pi and I have updated RetroPie through the setup.

    I was following this guide:
    https://github.com/retropie/RetroPie-Setup/wiki/Setting-up-the-XBox360-controller

    And I tried following these videos:

    Overall I’ve been able to get the controller to be recognized as Player 1 and have been able to map all the controls but none of it works when trying to navigate the menu or play games.

    Also, when I type the command:”xboxdrv -D i 0 –next-controller -i 1 –next-controller -i 2 –next-controller -i 3 –deadzone 4000 –dbus disabled &” I get the error message:

    [ERROR] XboxdrvDaemon::run(): fatal exception:
    Error: No stuitable uinput device found, tried:
    /dev/input/uinput: No such file or directory
    /dev/uinput: permission denied
    /dev/misc/uinpit: no such file or directory

    Trying to set up this whole project is my first experience with Linux. I’ve tried following videos and trying commands that are suggested in error messages but I’m just completely stuck.

    I’d appreciate some help.

    #8546
    kadaj2302
    Participant

    Ah, that first video link doesn’t seem to be working.

    #8592
    Anonymous
    Inactive

    How many controllers are you trying to setup?

    #8593
    kadaj2302
    Participant

    Just one for right now.

    I’d like to do 2 in the future but right now I’m just worried about getting one working.

    #8595
    Anonymous
    Inactive

    Okay, if you boot up the pi and dont type any commands at all, does the controller get recognised (does the LED on the controller get set to 1?).

    #8596
    kadaj2302
    Participant

    The LED’s flash but it does not set to player 1.

    #8597
    Anonymous
    Inactive

    Okay, shouldnt be too hard to get this sorted.

    If you could go to this chat room I’ll give you a hand, bit easier than posting on the forum. http://tlk.io/retropie

    #8607
    kadaj2302
    Participant

    It seems the chatroom went down, although the controller is working now!

    It is flashing again, not set as player 1 but it does seem to be working on Cave Story. I have not tried with other emulators yet, need to send them over still.

    Thanks for the help :)

    #8608
    Anonymous
    Inactive

    Hopefully that worked for you, the chat site seems to be 404ed now.

    If you want to run xboxdrv when the raspberry pi boots then you can edit the rc.local file in /etc/.

    cd /etc/
    sudo nano rc.local

    Here is a copy of mine, I’m using 1 xbox controller with analog sticks disabled.

    # shutting down xpad
    sudo rmmod xpad &
    sleep 1
    
    # - xbox driver -
    
    sudo xboxdrv --dpad-only --daemon --id 0 --deadzone 4000 --silent --trigger-as-button --dbus disabled --detach-kernel-driver &
    sleep 1

    So this shuts down xpad
    then loads up xboxdrv,
    then it disables any analong sticks (–dpad-only), you may want to remove that,
    it also runs xboxdrv –daemon, basically it runs it as a system service,
    then it says we want to use the controller with id0,
    then it sets up the deadzone area (dont think this is necessary if your using dpad-only mode),
    then it tells xboxdrv to not output any controller events (normally it will display all the data from the controller when you press buttons/move the stick/dpad etc etc, this can eat up cpu)
    then it disables dbus,
    and then it detaches the kernal driver (which i don’t think is necessary if you’ve stopped xpad already, but it works for me!)

    #8611
    kadaj2302
    Participant

    Great, thank you again :)

    #8618
    Anonymous
    Inactive

    If the LED is flashing you can get xboxdrv to set the LED.

    -l, –led NUM

    Set LED status. Possible values for NUM are:

    Num Behavior
    0 off
    1 all blinking
    2 1/top-left blink, then on
    3 2/top-right blink, then on
    4 3/bottom-left blink, then on
    5 4/bottom-right blink, then on
    6 1/top-left on
    7 2/top-right on
    8 3/bottom-left on
    9 4/bottom-right on
    10 rotate
    11 blink
    12 blink slower
    13 rotate with two lights
    14 blink
    15 blink once

    #8620
    Anonymous
    Inactive

    But I’m not sure how reliable the LED functions are, it may or may not be an issue, for me the controller sets the LED to player 1, if I try adjust this with -l or –led then it just flashes.

    It don’t think its a problem, but come back if you need more help :)

    #8622
    kadaj2302
    Participant

    Uh, silly question – in rc.local does it matter which lines I type this code into? Also when I try doing “#” it ends up displaying as “£”.

    edit: Sort of improvised and just used the available lines, I have no idea if I actually did it right or not, does this look right?

    #8647
    Anonymous
    Inactive

    Kind of :P It should work fine, but I would move all of the code to the bottom, but make sure to keep exit 0 at the bottom. Just makes it easier to understand.

    #8649
    kadaj2302
    Participant

    Gotcha. Also I feel really dumb, but how on earth do I save and exit this menu?

    #8651
    Anonymous
    Inactive

    As a side note, if your having problems with the keyboard layout and keys then you can run sudo raspi-config, then go to 4 internationalisation options

    #8653
    Anonymous
    Inactive

    if your editing rc.local with Nano, if you have added or changed anything, when you press
    Ctrl+X to exit it will ask you if you want to save, then press Y for yes, and then it will show the filename, which you can change if you want, if not just hit enter.

    #8656
    kadaj2302
    Participant

    Alright, this is all working now.

    I don’t suppose it’s possible to navigate the RetroPie GUI with the controller as well? At the moment I need to use the keyboard to navigate it.

    #8657
    Anonymous
    Inactive

    Yes it is, in emulationstation, navigate to the white Input Configuration screen.
    I believe you need es-config, at first it will setup the controller for EmulationStation (which is the GUI), and then it will give you three options, dgen, retroarch and gngeo, this will configure the controller for the various emulators, but you can just exit out at this point.

    #8659
    kadaj2302
    Participant

    That doesn’t seem to work. It maps the buttons but still doesn’t work in the gui

    #8663
    Anonymous
    Inactive

    Hmm, ah okay, try Open RGUI
    Use the arrow keys to navigate.
    Z for cancel
    X for accept

    Then go to settings > input options
    then go to “configure all”

    and setup your joypad from there.

    Then exit that screen, and make sure that “Config Save on Exit” is set to yes.

    Then exit RGUI, should work.

    #8670
    kadaj2302
    Participant

    Still giving me trouble :/

    It looks like the controls are updating because when I go back into RGUI it has the new ones still there but they aren’t working still.

    edit: it does work in RGUI though, after setting it I can navigate RGUI (or retroarch?, this other setup menu) with the controller.

    #8674
    Anonymous
    Inactive

    Hmm….
    Emulationstation isnt configured, I guess it could be the “start basic input configuration”

    It will detect joysticks that are plugged in and then you configure keybinds.
    Try it out.

    #8675
    kadaj2302
    Participant

    Binding all works but still no luck with results.

    #8676
    Anonymous
    Inactive

    You may need to delete es_input.cfg which is located at /home/pi/.emulationstation/
    Then reload emulationstation and it should ask you to configure.

    That may make it work.

    #8677
    kadaj2302
    Participant

    That worked! Thank you so much for all this help :)

    #8678
    Anonymous
    Inactive

    firstly navigate ot the folder
    cd /home/pi/.emulationstation/

    then

    make a backup
    sudo cp es_input.cfg es_inputbackup.cfg

    delete the original
    sudo rm es_input.cfg

    be careful with the rm command, you cant un-delete stuff!

    now reboot emulationstation

    #8686
    kadaj2302
    Participant

    Well, I seem to have done something wrong when trying to copy ROMS using the USB flash drive method, looks like I’m going to have to do all this over again. I should be able to do it pretty easily though from our conversation.

    Looks like I’ll be sticking to transferring over network instead. Ended up getting stuck on the black screen with white dot after retropie splash and can’t F4 out of it.

    Thanks again for the help though :)

    #8690
    Anonymous
    Inactive

    No problem, glad its sorted and running, any issues come back

    Dont run emulationstation as sudo, can cause it to lock up.

    #8736
    kadaj2302
    Participant

    Got everything back up and running to last nights state, learned my lesson there.

    I did overlook something last night though. Is there a way to map multiple button presses as a command to exit the game? At the moment I’m only able to do this with the keyboard.

    I’d like to set Start + Select as exit game / emulator.

    #8897
    Anonymous
    Inactive

    Yes its possible to do this, many emulators already use this as a way to exit the emulator, with it generally being hardcoded into the emulator, some others you can configure it in the .cfg files.

    In retroarch.cfg you are looking for the following bindings, adjust them to whichever buttons you need, with mine #8 is select and #9 is start

    input_enable_hotkey_btn = "8"
    input_exit_emulator_btn = "9"

    What other emulators are you using?

    #8905
    kadaj2302
    Participant

    NES
    SNES
    Gameboy Color
    Gameboy Advance
    Playstation

    #8907
    Anonymous
    Inactive

    NES uses retroarch.cfg
    SNES should use retroarch.cfg if you haven’t changed emulators.
    GameBoy Colour uses retroarch.cfg
    Playstation uses retroarch.cfg

    Gameboy Advance does not use retroarch.cfg, it uses the emulator gpsp.
    The files for it are located at > /home/pi/RetroPie/emulators/gpsp/raspberrypi

    GPSP has a hardcoded menu button, press Select + R and it will bring up a GUI, you can then adjust all the settings, and exit the emulator.

    #8908
    Anonymous
    Inactive

    Here is the GPSP keys.txt details:

    GAMEPAD
    -------
    Up		XAsix -
    Down		XAsix +
    Left		YAsix -
    Right		YAsix +
    A		Button 1
    B		Button 2
    Start		Button 3
    Select		Button 4
    L		Button 5
    R		Button 6

    I believe that select and start would then be left trigger and left button, but it might be different depending on xboxdrv. Try some combinations and see what you can get, alternatively you can use the keyboard and press F10 to enter the menu, then adjust settings from there.

Viewing 34 posts - 1 through 34 (of 34 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.