Homepage Forums RetroPie Project Controller Configuration in RetroPie USB SNES Controller – D-Pad not working in games

Tagged: , ,

Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #95556
    tombofix
    Participant

    Hi All,
    I’m starting to pull my hair out on this one! I bought two (let’s face it, knock off) USB SNES controllers off eBay.

    They plug in and play beautifully in the menu system for EmulationStation once configured as new controllers. I have run the Joystick setup and they are picked up there without issue also.

    Using JStest and the joystick setup I can see the buttons are all working and register on both as the same results:

    a = 1
    b = 2
    y = 3
    x = 0
    Start = 9
    Select = 8
    Left Sh = 4
    Right Sh = 5
    Up = -32767
    Down = +32767
    Left = -32767
    Right = +32767

    The confusing part is that once an Emulator loads and picks up the RetroArch configuration file of USBgamepad.cfg, the D-Pad does not work full stop. All the other buttons do, including the special configurations such as emulator quit, save state, load state etc..

    I close out of the emulator and the D-pad starts working again.

    I’ve tried reconfiguring the cfg file with just +1, -0, +1, -0 etc for the axis and have even added the input buttons for h0up and so on. Still no go.

    I should probably tell you that this is a Pi 2 running the latest RetroPie build Version 3 Beta. I have also plugged the controllers in to a PC and they work fine there.

    HELP!!!

    #95557
    herbfargus
    Member

    I had the same issue with my controller- exact same as yours. For some reason the autoconfig with retroarch had issues and I had to manually set them in the retroarch.cfg file. I put in my custom controls and changed autoenable from true to false (you’ll know if you did it right by the yellow joypad text not showing up when you start a game)

    #95558
    Floob
    Member

    Yes, I’ve just been looking at this. There does seem to be some questionable settings in the default USB_Gamepad_.cfg

    A quick way of updating this to ensure it is specific to your exact controller is to run the setup script for your retroarch controller.

    So
    sudo /home/pi/RetroPie-Setup/retropie_setup.sh
    Option 3 – Setup
    Option 320 – Configure input devices for RetroArch

    #95559
    tombofix
    Participant

    herbfargus:
    I did look at the autoenable feature but I do use a multitude of controllers based on the emulator I’m playing on. Is there a way to specify specific controllers when they are plugged in based on the RetroArch.cfg file?

    Floob:
    I have re-run it several times, even with all the config files deleted so it recreated a fresh version. The content is listed below:

    input_device = “USB gamepad ”
    input_driver = “udev”
    input_b_btn = “2”
    input_y_btn = “3”
    input_select_btn = “8”
    input_start_btn = “9”
    input_up_axis = “-1”
    input_down_axis = “+1”
    input_left_axis = “-0”
    input_right_axis = “+0”
    input_a_btn = “1”
    input_x_btn = “0”
    input_l_btn = “4”
    input_r_btn = “5”
    input_enable_hotkey_btn = “8”
    input_exit_emulator_btn = “9”
    input_menu_toggle_btn = “0”
    input_load_state_btn = “4”
    input_save_state_btn = “5”
    input_reset_btn = “2”
    input_state_slot_increase_axis = “+0”
    input_state_slot_decrease_axis = “-0”

    #95560
    Floob
    Member

    You have some squiffy quote marks there. Are they like that in your file, or all standard?

    You have a mix of:
    “ ″ ”

    Autoenable is on by default, if you can keep it on it can make things easier, but if you only ever use one type of controller you could turn it off like herbfargus says.
    You can set a specific controller per emulator within retroarch, but lets try getting the auto file working.

    Maybe you can your file up here so we can see it?
    I’m just wondering about those quotes

    http://pastebin.com/

    #95561
    tombofix
    Participant

    Hi Floob, thanks for the response! I’d love to get the auto-enable working. I just dug out my last Pi but the image is corrupt so I can’t test the controller on 2.6 or below yet.

    Attached to this is the cfg (without having been opened to preserve it) downloaded via FileZilla. Fingers crossed it might give you an idea.

    #95562
    tombofix
    Participant

    Except .cfg not being permitted on here! See attached .txt file.

    #95566
    Floob
    Member

    Have you tried changing

    input_up_axis = "-32767"
    input_down_axis = "+32767"
    input_left_axis = "-32767"
    input_right_axis = "+32767"

    to

    input_up_axis = "-1"
    input_down_axis = "+1"
    input_left_axis = "-0"
    input_right_axis = "+0"

    The only other difference on mine, is that my first line says
    input_device = “USB Gamepad ”
    rather than
    input_device = “USB gamepad ”

    but then I think thats specific to my controller so I wouldnt worry about that.

    If you manually change it to the -1 etc.. above make sure the quotes are just as the other examples in the file (or just dont change them basically).

    I’m assuming you havent changed anything in any of the retroarch.cfg files.

    #95567
    tombofix
    Participant

    Nothing has changed in the tetrarch.cfg file to my knowledge.

    I’ve just realised that the -32767 was put in by me when the -1 etc wasn’t working. I’ve deleted the config file again and recreated it so it now shows 1 rather than 32767.

    The result.

    Still no D-Pad!

    #95568
    tombofix
    Participant

    I take it there is no need for me to put in the btn code h0up etc?

    #95569
    Floob
    Member

    [quote=95567]Nothing has changed in the tetrarch.cfg file to my knowledge.

    I’ve just realised that the -32767 was put in by me when the -1 etc wasn’t working. I’ve deleted the config file again and recreated it so it now shows 1 rather than 32767.

    The result.

    Still no D-Pad!
    [/quote]

    And the quote marks look correct? No odd ones?

    Which game and emulator are you trying? I’ll try the same.
    I’m assuming the yellow text appears at the bottom of the screen when you start a game?

    #95570
    tombofix
    Participant

    Yes, the yellow text appears with the same amount of space following the end. I tried removing the spaces but then it doesn’t appear as an auto-configure.

    Just performed an interesting test:

    I deleted the config file, re-created using the setup file but this time I set my A, B, X and Y buttons as the D-PAD whilst using the A, B, X and Y buttons as Up, Down, Left, Right. Guess what happens?

    A, B, X and Y buttons remain as action buttons exactly as they always did (shoot, jump etc) whilst the D-Pad mirrors the A, B, X and Y buttons also.

    The config file changed to include the input_up_btn etc

    #95572
    Floob
    Member

    Could you post your retroarch file on pastebin for me to see?
    And let me know which emulator and game you are testing against?

    This file:
    /opt/retropie/configs/all/retroarch.cfg

    #95573
    tombofix
    Participant

    Pastebin: http://pastebin.com/aJ5GbN19

    It happens on all emulators that I’ve tried (NES, SNES, MegaDrive, MasterSystem, Game Boy).

    #95575
    Floob
    Member

    Ok, I think its the spacing next to the hashes maybe.

    Try replacing:
    /opt/retropie/configs/all/retroarch.cfg

    with this contents
    http://pastebin.com/raw.php?i=VJhK2qpy

    I’ve also attached it, renamed as .txt

    Here are the main diffs, mine are in green:
    http://s6.postimg.org/4php5s75t/diffs.png

    #95578
    tombofix
    Participant

    Just recreated it, rebooting now and will let you know. Can I have you USB gamepad file to test too?

    #95579
    tombofix
    Participant

    Interesting.. Direction now works but the buttons don’t! Just reconfiguring using Joystick Setup

    #95580
    Floob
    Member

    Attached to this post.
    Rename to .cfg

    #95582
    tombofix
    Participant

    No need, since I re-did the tetrarch.cfg with your version and the joystick config completed the controller now works! Hallelujah! Floor, if I could buy you a pint right now I would! Thank you!!

    #95622
    herbfargus
    Member

    If any of the above steps didn’t work for anyone, this is what I did to get my dpad to work:

    I went into

    /opt/retropie/configs/all/retroarch.cfg

    and changed

    # Axis for RetroArch D-Pad. 
    # Needs to be either '+' or '-' in the first character signaling either positive or negative direction of the axis, then the axis number. 
    # Do note that every other input option has the corresponding _btn and _axis binds as well; they are omitted here for clarity.
    # input_player1_left_axis = 
    # input_player1_right_axis = 
    # input_player1_up_axis = 
    # input_player1_down_axis = 

    to

    # Axis for RetroArch D-Pad. 
    # Needs to be either '+' or '-' in the first character signaling either positive or negative direction of the axis, then the axis number. 
    # Do note that every other input option has the corresponding _btn and _axis binds as well; they are omitted here for clarity.
     input_player1_left_axis = -0
     input_player1_right_axis = +0
     input_player1_up_axis = -1
     input_player1_down_axis = +1
    #95705
    tombofix
    Participant

    Hi All,

    Thanks again to Floob who resolved my issue, as it turned out in this instance my retroarch.cfg had some spacing issues that resulted in this issue.

    However…

    I recreated the entire system over this weekend as I was unhappy with the card I was using, only to be confronted by exactly the same issue again (this time without me making any configuration changes). To fix it though I deleted all the automatically created config files and let it create a new one. This time it worked perfectly with my SNES controllers working without the need to go near the retroarch.cfg file.

    Many thanks to all that helped, it really was appreciated!
    Tombofix
    ————————–
    Why not check out my blog?
    The most popular post is about Floppy Disks:
    http://www.roughing-it.net/?p=56

    #97065
    halgeir
    Participant

    Hi.

    (I have the Raspberry Pi 2 Model B, with retropie v3.0 beta2 on it and I have these controllers http://www.ebay.com/itm/291352700689 – though that shouldnt matter since they work until I start a game, and I’ve tried a ton)

    I have the same problem. My D-Pad doesn’t work “in-game” , but it works in the menu etc. I’ve tried what’s been written above, copy/pasted the files into my current files, but without any success.
    Though I have not changed (don’t know if it’s the correct one or even if I’m supposed to change that one) /opt/retropie/emulators/retroarch/retroarch.cfg it just says permission denied.

    On the other hand, I have changed the /opt/retropie/configs/all/retroarch.cfg with the text posted above. I have also changed the /opt/retropie/emulators/retroarch/configs/USB_Gamepad_.cfg with the text above.

    Nothing seem to be working, the D-Pad still doesn’t work.

    T

    To fix it though I deleted all the automatically created config files and let it create a new one. This time it worked perfectly with my SNES controllers working without the need to go near the retroarch.cfg file.

    Which files is that exactly? Because I have no idea about this stuff.

    If you are using Version 3 Beta 2 I am starting to think there might be a problem with the autoconfig files.

    My fix was as follows:
    1 – Backup all files under config
    2 – Delete them all
    3 – Reconfigure each joypad using RetroPie Setup script and Joystick setup

    EDIT: Just saw this one. I tried (Im accessing it through filezilla etc, hope thats the correct way to do this?) to delete the files, but I keep getting the ”Permission Denied” error…

    EDIT: Found it on the forum:

    for mame4all-pi, other emulator edits
    sudo chown -R pi:pi /opt/retropie/emulators/

    But still doesn’t work. Just reinstalled retropie and doing everything again to see if it helps.

    EDIT:

    Ok, so I reinstalled the whole thing. Then deleted all the config files /opt/retropie/emulators/retroarch/configs and rebooted – now nothing worked, even after input configure.

    Then put the config files back and edited USB_Gamepad_ in the config folder, and the retroarch.cfg file in /opt/retropie/emulators/retroarch and in /opt/retropie/configs/all.

    Still… D-Pad doesn’t work.

    Hopefully you guys can help me out!

    #97091
    Floob
    Member

    To keep it simple you could remove the existing .cfg files, just to make sure there is no conflict with (I think there *may* be an issue with the gamepad cfg file there by default but I’m just checking that out – by removing it as below it will get rid of the potential issue):

    sudo rm /opt/retropie/emulators/retroarch/configs/*.cfg

    Then create a new one with the setup script:
    sudo /home/pi/RetroPie-Setup/retropie_setup.sh

    And choose 3-Setup, 320-Configure Input for RetroArch

    This shouldn’t really be changed though:
    /opt/retropie/configs/all/retroarch.cfg

    #97092
    tombofix
    Participant

    You beat me to it Floob… What Floob said!

    #97095
    Floob
    Member

    I’d make sure this is original and unedited:
    /opt/retropie/configs/all/retroarch.cfg

    #97137
    halgeir
    Participant

    I just did what you wrote… T H A N K Y O U!

    You have no idea how wonderful it is to finally get it to work after 5-6 hours of failing yesterday! Again – thanks! I can now die happy!

    #101961
    unholypassion84
    Participant

    I know this thread has been inactive for a few months but I would really appreciate some assistance if available.

    I’m having the issue with the D-Pad not working in game. I’m using a wired Xbox 360 controller and have the latest version of Retropie 3 Beta. I tried Floob’s fix but when I type /opt/retropie/configs/all/retroarch/cfg to fix this issue I get

    -bash: /opt/retropie/configs/all/retroarch.cfg: Permission Denied

    What do? Is there a definitive fix for this problem?

    #101981
    Floob
    Member

    If you are using RetroPie 3 beta 4, and the config via Emulation Station isnt working for you, try removing the files here

    “cd /opt/retropie/configs/all/retroarch-joypads”
    Then you can see whats there with “ls”
    You can delete them all
    “rm *.cfg”

    Then recreate by running the retropie-setup script and choosing the register retroarch joypad option.

    #102102
    unholypassion84
    Participant

    For now I have configured the left Joystick as the D-Pad in Retropie which has been a functional work-around, however I would still prefer to use the D-Pad in many games, but at least I’m able to play them now.

    “cd /opt/retropie/configs/all/retroarch-joypads”
    “ls”

    Shows me:

    “Microsoft_X-Box_360_pad.cfg Microsoft_X-Box_360_pad.cfg.bak
    MicrosoftX-Box360pad.cfg”

    Is this not correct? Thanks for your help by the way, and for pardoning my noobishness. I’m learning a lot as I go and this is the first problem that I’m seemingly unable to solve on my own.

    #102122
    Floob
    Member

    If I was you I’d be tempted to remove those configs with
    “rm /opt/retropie/configs/all/retroarch-joypads/*.cfg”

    Then run the controller registration for retroarch.
    You can do this with
    “sudo /home/pi/RetroPie-Setup/./retropie_setup.sh”

    Then choose 3 – Setup
    Then “Configure input devices for RetroArch”

    That will then prompt you to press the buttons on your controller.

    This video shows how to set the analogue stick to work as well.

Viewing 30 posts - 1 through 30 (of 30 total)
  • The forum ‘Controller Configuration in RetroPie’ is closed to new topics and replies.