Homepage › Forums › RetroPie Project › Controller Configuration in RetroPie › xBox360-Controller don't work in RetroArch
- This topic has 21 replies, 8 voices, and was last updated 8 years, 9 months ago by labelwhore.
-
AuthorPosts
-
12/25/2015 at 01:32 #112473maynerParticipant
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
12/27/2015 at 12:00 #112572gotoParticipantWhen 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\)12/29/2015 at 13:21 #112629maynerParticipantnow 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.
12/30/2015 at 13:20 #112699maynerParticipantNo Idea how to configure the Core-Control?
12/30/2015 at 13:32 #112700InsecureSpikeParticipantso 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
12/30/2015 at 14:43 #112703OmnijaParticipantI 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.
12/30/2015 at 15:21 #112705InsecureSpikeParticipantcome to think of it, i take it we are talking about Wheezy here?
as all is working great in Jessie….12/30/2015 at 15:23 #112706OmnijaParticipantWhen did retropie jumped to jessie?
Try putting this in your opt/retropie/configs/all/retroarch-joypads
https://mega.nz/#!o1tBQLJS!pXdf-umX32eRssYkM9d4cq2X0iGaiifwnZy1NtSIGf4
12/30/2015 at 16:08 #112711InsecureSpikeParticipantlast update, it’s in beta
[quote=112706]When did retropie jumped to jessie?[/quote]
last update, it’s in beta.
look in the downloads area fella, it seams very stable from what I’ve tested12/30/2015 at 16:18 #112713gizmo98Participant@Omnija
Blame the retroarch devs ;-). They removed retroarch-joyconfig. Please post any difference between your working config files and config files created with emulationstation.12/30/2015 at 16:52 #112715fastfalcon94ParticipantThe 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 upinput_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 rightinput_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”
12/30/2015 at 17:29 #112718gizmo98ParticipantYou should configure your xbox controller like this:
https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration#xbox-360-controller12/30/2015 at 17:49 #112719fastfalcon94Participant[quote=112718]You should configure your xbox controller like this:
https://github.com/RetroPie/RetroPie-Setup/wiki/RetroArch-Configuration#xbox-360-controller[/quote]
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.
12/30/2015 at 17:59 #112720herbfargusMemberThe 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.
12/30/2015 at 18:03 #112723gizmo98ParticipantConsider 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.
01/06/2016 at 17:11 #113268maynerParticipantThanks 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?
01/06/2016 at 17:47 #113272labelwhoreParticipantYou 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.
01/06/2016 at 17:55 #113276maynerParticipantThats not the problem. The Controller is working, i just can’t start jstest so that i can change the buttons for the snes-controller.
01/06/2016 at 18:13 #113277labelwhoreParticipantWhy 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.
01/06/2016 at 21:30 #113290maynerParticipantdeleted
01/28/2016 at 13:45 #115431maynerParticipantis it possible to map other keys only for one rom?
01/28/2016 at 14:42 #115449labelwhoreParticipantNo, but xboxdrv gives you a unique solution to that problem. Take a look at the bottom of the wiki for the xbox360 setup.
The xboxdrv manual will give you a good ideo of how flexible this method is.
-
AuthorPosts
- The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.