xBox360-Controller don't work in RetroArch

Home Forums RetroPie Project Controller Configuration in RetroPie xBox360-Controller don't work in RetroArch

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 21 replies, has 8 voices, and was last updated by Profile photo of labelwhore labelwhore 1 year, 3 months ago.

Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #112473
    Profile photo of mayner
    mayner
    Participant

    Hi,

    today i’ve installed RetroPie for the very first time and i confifured my xbox360-Gamepad. It works fine in EmulationStation. But when i start Retroarch it doesn’t work. In Retroarch i can’t find something in teh Settings to set up the Gamepad – i’ve tried to use Retroarch in my Ubuntu-Notebook, but i had big Problems with the Controller.

    Is there anything i have to install first? I found some threads where User explained installing xboxdrv. But the Gamepad works (in ES), so it shouldn’t be a problem with missing driver, or?

    Mayner

    #112572
    Profile photo of goto
    goto
    Participant

    When you added the controller the driver was installed?
    Did you try to remove/add again the driver from the Retropié-setup option?
    (In 3.2.1 you need to go to Retropie\Retropie-setup\3\328\)

    #112629
    Profile photo of mayner
    mayner
    Participant

    now it works.

    i want to switch some buttons only for the snes emulator. in the file /opt/retropie/configs/snes/retroarch.cfg there is nothing i can change.

    
    # Settings made here will only override settings in the global retroarch.cfg if$
    
    input_remapping_directory = /opt/retropie/configs/snes/
    # video_smooth = false
    video_shader = /opt/retropie/emulators/retroarch/shader/snes_phosphor.glslp
    # video_shader_enable = true
    
    #include "/opt/retropie/configs/all/retroarch.cfg"

    how can i do this? my goal is to switch the buttons only for the snes emulator and not for others or for the control of emulationstation.

    #112699
    Profile photo of mayner
    mayner
    Participant

    No Idea how to configure the Core-Control?

    #112700
    Profile photo of InsecureSpike
    InsecureSpike
    Participant

    so you configured your controller at the start page on your first boot of retropie?

    did you do the following?

    from the RetroPie sub folder in emulation station,

    select RetroPie-SetUp

    next select 3: SetUp / Configuration (to be used post install)

    scroll all the way down to 328: Xbox / Xbox 360 gamepad driver

    then press 1: Enable xboxdrv

    next press cancel till you get back to the Choose an Option Screen

    then reboot

    if you didn’t do theses steps i recommend you uninstall the driver you installed manually before you try these, if no luck, try with a fresh install

    #112703
    Profile photo of Omnija
    Omnija
    Participant

    I did this yesterday due to xpad pissing me off with the flashing light, the problem is the script to configure joystick/gamepad to retroarch is missing. Normally you could go to retropie scripts and do this https://www.youtube.com/watch?v=9PWO-F4zuaY but the option only does keyboards now.

    I had to manually add my key settings to the retroarch.cfg.

    • This reply was modified 1 year, 3 months ago by Profile photo of Omnija Omnija.
    #112705
    Profile photo of InsecureSpike
    InsecureSpike
    Participant

    come to think of it, i take it we are talking about Wheezy here?
    as all is working great in Jessie….

    #112706
    Profile photo of Omnija
    Omnija
    Participant

    When did retropie jumped to jessie?

    Try putting this in your opt/retropie/configs/all/retroarch-joypads

    https://mega.nz/#!o1tBQLJS!pXdf-umX32eRssYkM9d4cq2X0iGaiifwnZy1NtSIGf4

    #112711
    Profile photo of InsecureSpike
    InsecureSpike
    Participant

    last update, it’s in beta

    When did retropie jumped to jessie?

    last update, it’s in beta.
    look in the downloads area fella, it seams very stable from what I’ve tested

    #112713
    Profile photo of gizmo98
    gizmo98
    Participant

    @omnija
    Blame the retroarch devs ;-). They removed retroarch-joyconfig. Please post any difference between your working config files and config files created with emulationstation.

    #112715
    Profile photo of fastfalcon94
    fastfalcon94
    Participant

    The problem is a lot of the information and youtube videos on controller configs are dated. Everything seems to work differently in 3.3. This is the best thing you can do for setting up a pi…

    1. grab the 3.3 flash and start with that
    2. On first startup don’t have your controller plugged in, just use a keyboard. emulstation will want you to configure it which is fine. You really only need to input the up/down/left/right a and b buttons. skip the rest
    3. Then go the retroarch emulator and into the settings. Here you can enable the xbox 360 driver. Now shut it down and plug in the controller
    4. When it restarts all the xbox lights in the center should be blinking until ES loads. Then it will show one light. Go into the controller config from the start menu and go through the button presses.
    5. At this point the controller should be usable but you should take it a step further…

    6. Using winscp go to /opt/retropie/configs/all/retroarch-joypads. You should see an XboxGamepad(userspacedriver).cfg file. This was created when you installed the 360 driver. The buttons in this file were programmed in step 4. You can see what they are mapped to. But it’s not going to be obvious to you that input_r3_btn = “12” is the right joystick being pressed down or that input_r_btn = “5” is the right elbow button above the trigger. So let’s fix that.

    7. Keep the config file open in winscp. On the keyboard plugged into the pi press f4 and then any key to go to the command prompt. go to root directory and into /dev/input. You should see a js0 or js1 or js2 or js3 depending on where your controller is plugged into. Type in: jstest js1
    Now press some buttons on the controller. Do you see anything going from off to on? If not ctrl+c and try a different joypad (ex jstest js2). You are trying to find the right js number for your pad. Once you find it you can go through the mappings. For instance you press the right elbow button on the controller and you see 5: off go to 5: on. Now in your config file you can put a comment next to that line.

    input_r_btn = “5” #Right elbow button

    For the analog thumbsticks those are a little confusing at first. For instance the right thumbstick, move it to the right. You will see a big number on the screen like 2: 32342343. Now move it to the left and you’ll see a big negative number like 2:-34324322 This means that +2 is the right thumb stick moved to the right and that -2 is the right thumbstick moved to the left. Now go put the comments in your config file. You can re-arrange the buttons in the config file to so that they are grouped together to make more sense. As you comment the file, you’ll end up with stuff you don’t have a button for. These are hotkeys. You can put these at the bottom. Here is my config file all commented and organized:

    input_device = “Xbox Gamepad (userspace driver)”
    input_driver = “udev”
    input_r_x_plus_axis = “+2” #Right Thumb Right
    input_r_x_minus_axis = “-2” #Right Thumb left
    input_r_y_minus_axis = “-3” #Right Thumb down
    input_r_y_plus_axis = “+3” #Right Thumb up

    input_l_y_plus_axis = “+1” #Left Thumb up
    input_l_y_minus_axis = “-1” #Left Thumb down
    input_l_x_minus_axis = “-0” #Left Thumb Left
    input_l_x_plus_axis = “+0” #Left Thumb right

    input_up_btn = “h0up” #Dpad up
    input_left_btn = “h0left”#Dpad left
    input_down_btn = “h0down” #Dpad down
    input_right_btn = “h0right” #Dpad right
    input_l2_btn = “6” #Left Trigger
    input_r2_btn = “7” #Right Trigger
    input_r3_btn = “12” #Right Thumb down
    input_l3_btn = “11” #Left Thumb down
    input_r_btn = “5” #Right elbow button
    input_l_btn = “4” #Left elbow button
    input_select_btn = “8” #select button
    input_start_btn = “9” #Start button
    input_a_btn = “0” #A button on controller
    input_b_btn = “1” #B button on controller
    input_y_btn = “3” #Y button on controller
    input_x_btn = “2” #X button on controller

    #hotkey stuff
    input_enable_hotkey_btn = “8”
    input_save_state_btn = “5”
    input_exit_emulator_btn = “9”
    input_load_state_btn = “4”
    input_reset_btn = “0”
    input_menu_toggle_btn = “3”
    input_state_slot_decrease_btn = “h0left”
    input_state_slot_increase_btn = “h0right”

    8. So now this works great. But in the nes emulator you are trying to play mario and the A/B button seems reversed because on the nes controller B is to the left of the A button, but on the 360 controller B is to the right of the A button. It would be better if these could be reversed for just the nes emulator. Even better the X button seems more natural to push as B. So let’s make the X button on the 360 controller equivalent to the B button on the nes controller. The A button can stay the same.

    You would think you just have to copy/paste/change the button config into /opt/retropie/configs/nes/retroarch.cfg. But that would be wrong. You have to mimic how it works in the configs/all directory.

    So go to /opt/retropie/configs/nes and create a “retroarch-joypads” folder. Now copy the “XboxGamepad(userspacedriver).cfg file from /opt/retropie/configs/all/retroarch-joypads and place it into the folder you just created. Now open the file and swap the number values between B and X. This will be easy as you’ve already commented every button and know exactly what they are. I like to expand on the comment if it’s custom so that if I open it up later I’ll know what I did).

    input_a_btn = “0” #A button on controller
    input_b_btn = “2” #B button on controller (Swapped with x button)
    input_y_btn = “3” #Y button on controller
    input_x_btn = “1” #X button on controller (swapped with b button)

    Now save this config file. Now we need to tell the nes emulator to use this file instead of the one in the all directory. Open up /opt/retropie/configs/nes/retroarch.cfg. Add this line above the bottom #include. When the nes emulator starts it will look at joypads specifically configured for the nes before checking the all directory. Since it’s a first fine/first use logic, it will use the config you just customized.

    joypad_autoconfig_dir = /opt/retropie/configs/nes/retroarch-joypads/

    9. Go enjoy mario. You may also need to repeat this process for other nintendo systems like super nintendo or gameboy.

    This is as far as I’ve got so far. I haven’t dealt with multiple controllers yet. I have some usb nes and usb snes controllers coming next week that I’ll be playing with. I’m hoping I can get it so that I can unplug/plug in new controllers for different emulators and it will just work. In an ideal world I could have 20 controllers plugged in and the emulator would just know what ones to use based on what one I opened the game with. Or have a little screen that says “press any key on the controller you want to use”

    #112718
    Profile photo of gizmo98
    gizmo98
    Participant
    #112719
    Profile photo of fastfalcon94
    fastfalcon94
    Participant

    You should configure your xbox controller like this:
    https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration#xbox-360-controller

    I had tried that initially. I don’t understand why they want you to flip buttons. Pressing B means you are really pressing the A button. I don’t understand the logic in that for a global config. Even on the retropi menu. Pressing “b” for back and “a” for accept makes sense. Thats how it works in all the Xbox 360/one menus. I’d rather have the A button mean A button globally and if you need change it for anything else do it at the emulator level.

    #112720
    Profile photo of herbfargus
    herbfargus
    Moderator

    The default core options for most emulators are Nintendo based which follow the snes pad layout and so its more intuitive for most when generating autoconfigs to match that rather than having to change every emulator manually to match their Xbox controller.

    But each user has the freedom to change any settings they want, but the defaults are organised as a one size fits most.

    #112723
    Profile photo of gizmo98
    gizmo98
    Participant

    Consider it as a mix of snes controller layout and ps1 triggers and analog sticks. 😉

    I’m also not really happy with emulationstation mapping. On my PS3 controller X is abort and O is ok.

    #113268
    Profile photo of mayner
    mayner
    Participant

    Thanks FastFalcon94, this worked very good on my raspberry pi 1. now iÄve switched to pi2 and installed retropie. i could test “jstest /dev/input/js0” an hopur before, but now it doesn’t work anymore. there is nothing i’ve changed on my system.

    On the keyboard plugged into the pi press f4 and then any key to go to the command prompt. go to root directory and into /dev/input. You should see a js0 or js1 or js2 or js3 depending on where your controller is plugged into. Type in: jstest js1

    when i try “jstest /dev/input/js0/1/2” i see this

    jstest: No such file or directory

    when i try “jstest” i see

    Usage: jstest [<mode>] <device>

    Modes:
      --normal           One-line mode showing immediate status
      --old              Same as --normal, using 0.x interface
      --event            Prints events as they come in
      --nonblock         Same as --event, in nonblocking mode
      --select           Same as --event, using select() call

    the same when i use any of the options: normal, old, event, nonblock or select.

    whats the problem now?

    #113272
    Profile photo of labelwhore
    labelwhore
    Participant

    You don’t really need to start without the KB the first time, I never do. I just installed 3.3 on Jessie the other day. The first thing I did was start up with a controller connected, and ran through the initial controller setup, then immediately run raspi-config to expand the available space on the SD card, then run retropie-setup to update the setup script, then install xboxdrv and restart. Then configure the controller again. That’s it.

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

    #113276
    Profile photo of mayner
    mayner
    Participant

    Thats not the problem. The Controller is working, i just can’t start jstest so that i can change the buttons for the snes-controller.

    #113277
    Profile photo of labelwhore
    labelwhore
    Participant

    Why not just take a look at es_input.cfg, then swap them in retroarch.cfg for the snes emulator? I’ve been able to get by without ever running jstest. IDK if it’s actually working for me on 3.3, but I seem to remember having issues with jstest on 2.6.

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

    • This reply was modified 1 year, 3 months ago by Profile photo of labelwhore labelwhore.
    #113290
    Profile photo of mayner
    mayner
    Participant

    deleted

    • This reply was modified 1 year, 3 months ago by Profile photo of mayner mayner.
    #115431
    Profile photo of mayner
    mayner
    Participant

    is it possible to map other keys only for one rom?

    #115449
    Profile photo of labelwhore
    labelwhore
    Participant

    No, but xboxdrv gives you a unique solution to that problem. Take a look at the bottom of the wiki for the xbox360 setup.

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

    The xboxdrv manual will give you a good ideo of how flexible this method is.

    http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html

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

    • This reply was modified 1 year, 3 months ago by Profile photo of labelwhore labelwhore.
Viewing 22 posts - 1 through 22 (of 22 total)

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

Skip to toolbar