• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Issue with wrong buttons in lr-* emulators

Scheduled Pinned Locked Moved Help and Support
beboncoolblueoothlibretrocontrol issueretroarch
6 Posts 3 Posters 1.9k 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
    mark2472
    last edited by mark2472 25 Feb 2018, 18:37

    Note: I figured out how to fix this by manually editing config files, but I still have a question... why are lr-* emulators adding +3 to all buttons? Since I had it typed out, I figured I'd go ahead and post in case it helps anyone and also in case it's a bug that needs reported/fixed etc.

    I'm having trouble with my bluetooth controller in all of the lr-* emulators (specifically tried lr-pcsx-rearmed, lr-snes9x2010, lr-fceumm, lr-picodrive, and more). I've spent hours googling, searching docs, searching forums, fiddling with config menus, fiddling directly with config files, starting over and going through the below steps multiple times in various different ways.

    Anyway, here's the issue:
    After getting the bluetooth controller connected and configured, it works great in menus and works fine in mupen64 (just not the lr one). Game controls work, hotkeys work, everything seems fine. But... when I go to any of the lr emulators, the controls are messed up. The hotkeys are wrong and the buttons are mapped wrong. For instance, R1 (instead of select) appears to be the hotkey enable button. So... R1 + random buttons does things like exit the game, save states, load states, etc. R1 + L2 (instead of start + select) exits the game. It's not just the hotkeys, though, all of the buttons are incorrect for gameplay as well.

    I finally discovered that R1 + A opens the retroarch menu. From here, I was able to navigate this menu using keyboard arrows, z, and x. I can manually set the controls here in Settings>Input>User 1 Binds. All of the buttons seem to be +3 from what they were in EmulationStation. For instance, the A button in ES and in jstest is 0, but in RetroArch in an lr-* emulator it is 3. Select is 10 in ES/jstest, but 13 in the RetroArch menu. This is the case for all buttons on the controller.

    This took me all day yesterday to figure out, and now I can at least get everything working... albeit by manually configuring all /opt/retropie/configs/{lr-* based emulators}/retroarch.cfg to +3 on all buttons.

    Why are all of the buttons +3 in RetroArch in lr-* emulators? Is there a way to get RetroArch and/or libretro to not +3 all buttons?

    Steps:

    1. Followed https://github.com/RetroPie/RetroPie-Setup/wiki/First-Installation using keyboard
    2. Connected bluetooth controller.
    3. sudo nano /etc/udev/rules.d/55-local.rules and set files contents to:
      SUBSYSTEM=="input", ATTRS{name}=="BBC-GAME", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
      per https://www.amazon.com/gp/customer-reviews/R3GVRHP307ROSX/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B01N8WWOE5
    4. Added a few roms for several systems
    5. Reboot, Main Menu => Configure Input and configured bluetooth controller
    6. Issue is present but controller works for ES and config menus.
    7. RetroPie Config => RetroPie Setup => Update RetroPie-Setup Script
    8. Update => Yes to update installed packages => Yes to update underlying OS packages
    9. Issue still persists

    Pi Model or other hardware: 3 B
    Power Supply used: 5V 2.5A from https://www.amazon.com/Miuzei-Raspberry-Cooling-3×Aluminum-Heatsinks/dp/B072BXFC3V/ref=sr_1_7?s=pc&ie=UTF8&qid=1519576906&sr=1-7&keywords=raspberry+pi+3+case
    RetroPie Version Used: 4.3.11
    Built From: Pre made SD Image on RetroPie website (retropie-4.3-rpi2_rpi3.img.gz)
    USB Devices connected: keyboard
    Controller used: https://www.amazon.com/Bluetooth-Controller-BEBONCOOL-Wireless-Emulator/dp/B01N8WWOE5/ref=pd_lpo_vtph_147_bs_t_1?_encoding=UTF8&psc=1&refRID=54D8A9VNRG1Q2Q9CS6YX
    Emulator: All lr-* emulators

    1 Reply Last reply Reply Quote 0
    • M
      mitu Global Moderator
      last edited by 25 Feb 2018, 19:14

      You should be able to re-configure the button mappings in one place. There should be a controller configuration file in /opt/retropie/configs/all/retroarch/autoconfig/ where you can change the input codes, instead of modifying each system's retroarch.cfg file.
      As for why the mapping differ, maybe posting the es_input.cfg file from $HOME/.emulationstation could offer a clue to why the mapping is different.

      M 1 Reply Last reply 25 Feb 2018, 19:56 Reply Quote 0
      • M
        mark2472
        last edited by 25 Feb 2018, 19:22

        /home/pi/.emulationstation/es_input.cfg

        <?xml version="1.0"?>
        <inputList>
          <inputAction type="onfinish">
            <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
          </inputAction>
          <inputConfig type="joystick" deviceName="BBC-GAME" deviceGUID="0500000049190000020400001b010000">
            <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="0" value="1"/>
            <input name="b" type="button" id="1" 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="3" value="1"/>
            <input name="select" type="button" id="10" value="1"/>
            <input name="y" type="button" id="4" value="1"/>
            <input name="left" type="hat" id="0" value="8"/>
          </inputConfig>
        </inputList>
        
        1 Reply Last reply Reply Quote 0
        • M
          mark2472 @mitu
          last edited by 25 Feb 2018, 19:56

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • I
            i2b5k0
            last edited by 20 Aug 2019, 19:38

            Did you ever get this sorted or is manually adjusting al the lr config files the way to go?

            1 Reply Last reply Reply Quote 0
            • I
              i2b5k0
              last edited by 21 Aug 2019, 00:13

              Actually, you can't even manually change the config file. It seems that jstest & emulationsation interpret one button as "0" but retroarch interprets that same button as "3". So yeah, you can fix button 10 by changing the config file to say "7" but retroarch doesn't like buttons to have negative numbers assigned so this doesn't work as a long term solution.

              Many will say "buy a different controller." The Amazon is so far away. Also, the cost-benefit analysis of using a pi and retropie compared to buying something like the Allcade was that I wouldn't be needlessly buying things that I already had!

              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.

                This community forum collects and processes your personal information.
                consent.not_received