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

    Custom USB controller setup not working with RetroArch

    Scheduled Pinned Locked Moved Help and Support
    gamepadcontrollerusbcm3custom system
    4 Posts 3 Posters 878 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.
    • J
      jwf
      last edited by

      Hello RetroPie community!

      I've been working on a project that has a non-standard input arrangement and have run into a roadblock while trying to get RetroPie working. We're using a RPi CM3, a Cypress 4-port hub, and running the latest official RetroPie release.

      The system has two physical USB controllers (each implements half of a full controller, i.e. D-pad on the left half, ABXY on the right). These are opened by a program that reads their input and, via Linux's uinput module, exposes their merged input to userspace as a single logical device.

      This works perfectly with Emulationstation, and a RetroArch autoconfig file is generated, but I'm not able to control RetroArch; when it starts up a core I see 3 gamepad notifications - one for each of the physical controllers, and one for my "virtual" device. The physical controllers have a message saying they are "not configured", and the virtual controller is always assigned to port #3.

      I'm guessing that what's happening is that RetroArch is attaching the physical controllers to ports #1 and #2 - but it will never see input from them since the merging program grabs the devices for exclusive input. I've tried to limit access to the corresponding /dev/input/jsX and /dev/input/eventX files by using udev to set the group to root, but my virtual gamepad is still allocated to port #3.

      Does anybody how I could solve this? Ideally there would be a way to tell RetroArch just to ignore the physical devices entirely, but I'm open to any solution.

      RedMarsBlueMoonR 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Re-arrange the controllers so that P1 is the 3rd (logical device) controller. You can use the Configuration Editor to re-order the joypads.

        1 Reply Last reply Reply Quote 0
        • RedMarsBlueMoonR
          RedMarsBlueMoon @jwf
          last edited by

          @jwf
          Don't know what your time frames and goalas are but you could keep an eye out for this possible SDL2 addition,

          https://github.com/libsdl-org/SDL/pull/4448

          1 Reply Last reply Reply Quote 0
          • J
            jwf
            last edited by

            Thanks @mitu this did the trick! All working well now.

            pitfall.jpg

            1 Reply Last reply Reply Quote 1
            • 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.