RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Bluetooth Controller works fine in EmulationStation, but not in emulators

    Scheduled Pinned Locked Moved Help and Support
    bluetoothcontrollerretroarch
    8 Posts 5 Posters 4.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mendingo
      last edited by

      Hi,

      I'm using a Pi 3 with v4.1 from the website SD image. I've connected a cheap bluetooth controller (https://www.amazon.co.uk/gp/product/B01LKN9LVO/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1) successfully using pi3's built in bluetooth, mapped the buttons , and it navigates EmulationStation correctly.

      However, when I launch an emulator (tested with default megadrive and nes), the direction keys work, but not the buttons. The shortcuts don't work either (select & start doesn't exit).

      I tested the gamepad with jstest, and it's registering 20 buttons, with 0,1,3,4,6,7,8,9,11,12 being used (and correctly mapped in the cfg file).

      Is it possible that the bluetooth controller be compatible with EmulationStation but not RetroArch? Is there a way to map the buttons from within RetroArch, to find out what it's seeing them as? Has anyone encountered this issue before?

      Thanks for any help or suggestions.

      BuZzB 1 Reply Last reply Reply Quote 0
      • BuZzB
        BuZz administrators @mendingo
        last edited by

        @mendingo yes the mapping is probably different.

        you can map the buttons manually from RGUI. go to retropie menu in ES, and launch RetroArch. Navigate with keyboard (or another configured controller) to Settings -> Input -> Input User 1 Binds -> and do "User 1 Bind All" and then do "Save Autoconfig" when happy with the settings.

        you should also check /opt/retropie/configs/all/retroarch/autoconfig to make sure that you only have one new config in there - as retroarch uses slightly different names for it's configuration.

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        1 Reply Last reply Reply Quote 2
        • M
          mendingo
          last edited by

          That did it, thankyou (although running the "Bind All" option with its 4 second timeout was like the most stressful quicktime event ever!). I'm curious as to what's happened here. Why are the button mappings different? In jstest and in emulationstation, the button mappings are, for example - start=8, select=9, but in retroarch, start=19, select=20. How come they're different?

          BuZzB 1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators @mendingo
            last edited by

            @mendingo I don't exactly know - some difference in how the device reports it between the sdl input code and the retroarch udev code. Another option is to switch input to "sdl2" in retroarch config (then the mapping should be the same).

            If you give me the name of your controller and your ES vs retroarch config I can put in a workaround. the 8bitdo controllers used to have an offset of 11, but it was fixed in a firmware, which suggests it may also be linked to how the device reports itself.

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            1 Reply Last reply Reply Quote 0
            • M
              mendingo
              last edited by

              The different drivers explains it. Is there an advantage to using "udev" as the driver for Retroarch instead of "sdl2"?

              The controller is a cheap Chinese off-brand one. Looking on Amazon and ebay, it's a very common one, which shows up in various different guises. Mine identifies as "GEN GAME S5". The original post has a link to it at Amazon.co.uk.

              The Retroarch cfg which correctly maps is:

              input_driver = "udev"
              input_device = "GEN GAME S5"
              input_b_btn = "9"
              input_y_btn = "12"
              input_select_btn = "19"
              input_start_btn = "20"
              input_up_btn = "h0up"
              input_down_btn = "h0down"
              input_left_btn = "h0left"
              input_right_btn = "h0right"
              input_a_btn = "10"
              input_x_btn = "13"
              input_l_btn = "15"
              input_r_btn = "16"
              input_l2_btn = "17"
              input_r2_btn = "18"
              input_l3_btn = "22"
              input_r3_btn = "23"
              input_l_x_plus_axis = "+0"
              input_l_x_minus_axis = "-0"
              input_l_y_plus_axis = "+1"
              input_l_y_minus_axis = "-1"
              input_r_x_plus_axis = "+2"
              input_r_x_minus_axis = "-2"
              input_r_y_plus_axis = "+3"
              input_r_y_minus_axis = "-3"
              input_r2_axis = "8"
              

              The emulationstation cfg is:

              <?xml version="1.0"?>
              <inputList>
                <inputAction type="onfinish">
                  <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
                </inputAction>
              
                <inputConfig type="joystick" deviceName="GEN GAME S5">
                  <input name="pageup" type="button" id="6" value="1"/>
                  <input name="start" type="button" id="11" value="1"/>
                  <input name="up" type="hat" id="0" value="1"/>
                  <input name="a" type="button" id="1" value="1"/>
                  <input name="b" type="button" id="0" value="1"/>
                  <input name="down" type="hat" id="0" value="4"/>
                  <input name="pagedown" type="button" id="7" value="1"/>
                  <input name="right" type="hat" id="0" value="2"/>
                  <input name="x" type="button" id="4" value="1"/>
                  <input name="select" type="button" id="10" value="1"/>
                  <input name="y" type="button" id="3" value="1"/>
                  <input name="left" type="hat" id="0" value="8"/>
                </inputConfig>
              </inputList>
              

              Not sure why the triggers aren't there.

              1 Reply Last reply Reply Quote 0
              • M
                martinwuff
                last edited by

                Hi. I have the same controller, the S5. How did you get it to pair with your RetroPie? I know it says to long hold X/Y/B+Gen Game, but two of them are Newgamepad N1 and one is Gen Game Pad. Which did you have to use? Did you do it through RetripPie GUI Bluetooth menu, or to the pi itself via the bluetooth connection in the main desktop? I'm having issues getting this game controller to connect, and any info you could provide would be appreciated.

                Thank you!

                1 Reply Last reply Reply Quote 0
                • M
                  marine88
                  last edited by

                  @martinwuff i can´t put gen game s5 connected to retropie either any tips ?

                  1 Reply Last reply Reply Quote 0
                  • S
                    stando
                    last edited by

                    @buzz said in Bluetooth Controller works fine in EmulationStation, but not in emulators:

                    @mendingo I don't exactly know - some difference in how the device reports it between the sdl input code and the retroarch udev code. Another option is to switch input to "sdl2" in retroarch config (then the mapping should be the same).

                    If you give me the name of your controller and your ES vs retroarch config I can put in a workaround. the 8bitdo controllers used to have an offset of 11, but it was fixed in a firmware, which suggests it may also be linked to how the device reports itself.

                    Sorry for resurrecting old thread, but it took me quite a lot of time to solve this issue and I would like to share this simple fix. I recently bought a bluetooth controller - a chinese cheap one - called Gen Game New S3. It is identifying as "GEN GAME" in retropie. There was the same issue as OP had - only cursor button worked in games, but no action buttons. Simple "hack" is to "switch input from udev to "sdl2" in retroarch config" as @mendingo mentioned. Once this is done and gamepad is remapped in emulation station gui, all buttons work perfectly in games as well.
                    Maybe this can help to people who bought similar controller.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                    Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.