Viewing 34 posts - 1 through 34 (of 34 total)
  • Author
    Posts
  • kadaj2302
    Participant
    Post count: 16

    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.

    kadaj2302
    Participant
    Post count: 16

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

    blaxzen
    Participant
    Post count: 57

    How many controllers are you trying to setup?

    kadaj2302
    Participant
    Post count: 16

    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.

    blaxzen
    Participant
    Post count: 57

    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?).

    kadaj2302
    Participant
    Post count: 16

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

    blaxzen
    Participant
    Post count: 57

    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

    kadaj2302
    Participant
    Post count: 16

    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 :)

    blaxzen
    Participant
    Post count: 57

    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!)

    kadaj2302
    Participant
    Post count: 16

    Great, thank you again :)

    blaxzen
    Participant
    Post count: 57

    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

    blaxzen
    Participant
    Post count: 57

    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 :)

    kadaj2302
    Participant
    Post count: 16

    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?

    blaxzen
    Participant
    Post count: 57

    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.

    kadaj2302
    Participant
    Post count: 16

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

    blaxzen
    Participant
    Post count: 57

    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

    blaxzen
    Participant
    Post count: 57

    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.

    kadaj2302
    Participant
    Post count: 16

    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.

    blaxzen
    Participant
    Post count: 57

    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.

    kadaj2302
    Participant
    Post count: 16

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

    blaxzen
    Participant
    Post count: 57

    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.

    kadaj2302
    Participant
    Post count: 16

    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.

    blaxzen
    Participant
    Post count: 57

    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.

    kadaj2302
    Participant
    Post count: 16

    Binding all works but still no luck with results.

    blaxzen
    Participant
    Post count: 57

    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.

    kadaj2302
    Participant
    Post count: 16

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

    blaxzen
    Participant
    Post count: 57

    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

    kadaj2302
    Participant
    Post count: 16

    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 :)

    blaxzen
    Participant
    Post count: 57

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

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

    kadaj2302
    Participant
    Post count: 16

    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.

    blaxzen
    Participant
    Post count: 57

    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?

    kadaj2302
    Participant
    Post count: 16

    NES
    SNES
    Gameboy Color
    Gameboy Advance
    Playstation

    blaxzen
    Participant
    Post count: 57

    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.

    blaxzen
    Participant
    Post count: 57

    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)
  • You must be logged in to reply to this topic.