Custom USB controller setup not working with RetroArch
-
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 usingudev
to set the group toroot
, 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.
-
Re-arrange the controllers so that P1 is the 3rd (logical device) controller. You can use the Configuration Editor to re-order the joypads.
-
@jwf
Don't know what your time frames and goalas are but you could keep an eye out for this possible SDL2 addition, -
Thanks @mitu this did the trick! All working well now.
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.