Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Controllers' Buttons Not Working in RetroPie #1092

Closed
DoogyR3V opened this issue May 6, 2023 · 8 comments
Closed

Multiple Controllers' Buttons Not Working in RetroPie #1092

DoogyR3V opened this issue May 6, 2023 · 8 comments
Assignees
Labels
bug fixed in master Fixed in the master branch

Comments

@DoogyR3V
Copy link

DoogyR3V commented May 6, 2023

I am having an issue when using multiple (identical) controllers where only the first registered controller's buttons work. I'm running Amiberry 5.6 on Retropie.

In the emulator, the D-pads and analogue sticks work correctly on all controllers whichever port they are assigned to but the buttons only work on the first controller.

In the GUI, the D-pad and buttons only work on the first controller but the analog sticks work on all of them.

It might be related or not but in the amiberry.conf file under default_controllerX and default_mouseX, joy0 doesn't represent the first joystick, joy1 does.

A little bit more info, hopefully relevant. All controllers can enter the GUI with the Retroarch hotkey combo. Only the first controller can exit with this combo. Oddly, this behavior is the same whether the menu combo is disabled or not. Disabling the quit combo seems to work correctly, though, and only the first controller can quit when it's enabled

@DoogyR3V DoogyR3V changed the title Multiple Controller Buttons Not Working Multiple Controllers' Buttons Not Working May 10, 2023
@midwan midwan self-assigned this May 11, 2023
@willindernet
Copy link

I have a similar problem. Retropie with Amiberry and Gamecondriver (db9_gpio_rpi).

Gamecondriver is installed and loaded (options db9_gpio_rpi map=1,1). I checked all the buttons on my two joysticks with jstest /dev/input/jsX. They all work.

In Amiberry, however, the fire button of the second joystick does not work. All other functions are available.

With UAE4ARM it worked.

@willindernet
Copy link

If you need help with the test or logfiles, I can support you

@midwan
Copy link
Collaborator

midwan commented Jun 5, 2023

Do you have the same problematic behavior on a diagnostic tool?
I usually test things with AmigaTestKit (available here: https://github.com/keirf/amiga-stuff/releases/tag/testkit-v1.20), which can visualize the controller input from each port.

Check that you have your controllers correctly configured in the Input Ports as well (Port 0 and 1). The mode is important, the Default is a standard 1-2 fire button joystick, use CD32 mode if you want to support all the buttons. And make sure to also set the same option in AmigaTestKit, so you can see what is being pressed.

EDIT: for the record, I cannot recreate this in a normal environment outside RetroPie, using 2 PS4 controllers and AmigaTestKit. So it may be related to retroarch mapping only, which I didn't get a chance to try yet.

EDIT2: I can recreate it when using Retroarch mapping, so it must be a bug in there somewhere

@midwan midwan added the bug label Jun 5, 2023
@midwan midwan changed the title Multiple Controllers' Buttons Not Working Multiple Controllers' Buttons Not Working in Retroarch Jun 5, 2023
@willindernet
Copy link

Hi Dimitris,

Thank you very much for your answer.
I use original Competition Pro (DB9). I have connected them to the GPIO pins of the Raspberry Pi. I use the gamecondriver (db9_gpio_rpi) as driver. I did this as described at
Retropie. It also worked under UAE4ARM. Then I wanted WHDLoad and switched to Amiberry. Here the fire button of the second joystick no longer works. All other functions are there. With the diagnostic tool
/dev/input/Jess and /dev/input/js1 the joysticks can be tested. They both work.
will test with AmigaTestKit in the next few days.
I have described what I did in German. But Google Translate does a good job: https://ichwillinsindernet.de/retropie-mit-amiga-emulator/

Thanks and greetings
Norman

@DoogyR3V
Copy link
Author

DoogyR3V commented Jun 5, 2023

I've tried it with DiagROM. It's exactly the same as with a game. Set up Port 0 as first controller in list, type default or joystick; all movement and fire button on Port 0 registers. Set up Port 1 as second controller, either type; all movement registers on Port 1, no button register on Port 1. Swap controller positions in list >> Set up Port 1 as first controller in list, type default or joystick; all movement and fire button on Port 1registers. Set up Port 0 as second controller, either type; all movement registers on Port 0, no button register on Port 0.

If I map second controller (Port 0) directions to Joy1 fire button input it registers, e.g. dpad up can work as fire button, up registers as Port 0 fire. Button inputs do not work when manually mapped, e.g. north button or leftjoy press on second controller (Port 0) to Joy1 fire button, no fire registers on Port 0. First controller buttons can be mapped to the other port fire button and this works correctly, e.g. first controller (Port 1) North button mapped to Joy1 fire, North button register Port 0 fire South button registers Port 1 fire. Obviously, both these configurations are useless because either you lose a control direction or the fire button is on the wrong controller, but they prove that the button inputs of the second (or third or higher) controller are not being picked up inside the emulator.

@DoogyR3V DoogyR3V changed the title Multiple Controllers' Buttons Not Working in Retroarch Multiple Controllers' Buttons Not Working in RetroPie Jun 5, 2023
@midwan midwan closed this as completed in 2faa257 Jun 5, 2023
midwan added a commit that referenced this issue Jun 5, 2023
fixes #1092)

When using retroach mappings, only the first controllers buttons would trigger
midwan added a commit that referenced this issue Jun 5, 2023
fixes #1092)

When using retroach mappings, only the first controllers buttons would trigger
@midwan
Copy link
Collaborator

midwan commented Jun 5, 2023

Bug located and fixed. Will be part of the next release.

@midwan midwan added the fixed in master Fixed in the master branch label Jun 5, 2023
@willindernet
Copy link

Great, thank you

@DoogyR3V
Copy link
Author

DoogyR3V commented Jun 5, 2023

Bug located and fixed. Will be part of the next release.

Excellent, thanks!

Can confirm this works. Buttons now working on the second and subsequent controllers in the emulator. Great work!

The bugs with the hotkey combos and analogue sticks in the GUI are still present and are obviously separate (extremely minor) issues.

The amiberry.conf joy0 thing is probably just a typo in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixed in master Fixed in the master branch
Projects
None yet
Development

No branches or pull requests

3 participants