Newb with Player 2 not being 'seen' on Picade/Retropie
-
Hi All,
Relatively recently I bought some Pi 4’s; one, for myself, (a single Pimoroni Picade with USB-C X-Hat) and another, with USB-C Picade and Player X to make a new, dual 2p, unit for a friend who had an old Pandora double unit with odd games. With the single Picade, no issue, all working fine. The 2p version for my friend….big issues with 2 player mode that I cannot seem to get around. Probably lack of knowledge but I've read all I can find and cannot 'see' a solution....
So, hardware for 2p unit is:
Pi 4 2Gb
128Gb Memory Card
Pimoroni Picade USB-C Hat (with player 1 Joystick/Buttons)
Pimoroni Player X USB daughter 'stick' (for player 2 hard Joystick/Buttons)
Pimoroni Looms etc
RPi USB-C 3A OEM Power unit
Basic joysticks, 6 buttons for each player plus 3 at top for usual stuff.Software:
Retropie 4.6 (Buster) for Pi 4, released relatively recently (though I also tried on 4.5.1 Beta previously)Once new SD has the image loaded I do the basics, enabling networking, SSH etc. I then run the BASH script for Picade. At this stage I only have ONE joystick and buttons connected (the ones on the main Picade board). When I run retropie for the first time it sees these as a ‘Keyboard’ and I run through selections, which all work. I then connect the USB lead to Player X board and it sees that as the 'Pimoroni X 0 etc’ (or something similar connected to USB 0). I run through connections with the second joystick and buttons and all seems well.
However, as soon as I load up a game (I used SNES game MarioKart for example but it's the same on any ROM) it only seems to find connection to Player X player and does not respond to player 2 buttons at all (I.e Keyboard connections on Picade main board). I am continually having this issue and I just do not know what to do. I am sure someone must have come across this before and know how to fix it?
Many thanks in advance for your help; I’m really being driven round the bend trying to get this to work so I can give it to my friend. I’ve been at this, on and off, for months with no success and I'd really like to get this to my friend as soon as I can.
Thanks All
KR, Dave
-
I think your issue is because the keyboard is 'merged' to P1 (the gamepad). Can you post your
retroarch.cfg
file, from\\retropie\configs\all
? Use pastebin.com to post its contents, the file is rather large. -
Thankyou so much for the reply Mitu!
I will set it up tomorrow and get a copy. I'm not au fait with 'pastebin' but I will sort it and get back to you asap.
Thanks again. I hope I/we can work this out.
KR, Dave:)
-
Hi Mitu/All,
Hopefully this works....got Retroarch.cfg from /opt/retropie/emulators/retroarch/retroarch.cfg as I couldn't seem to find it anywhere else so I hope this is the right one. If not please let me know.
KR, Dw
-
No, it's not the right one - it's the template config that comes with the emulator, not the one used in RetroPie.
Try looking in/opt/retropie/configs/all
and copy theretroarch.cfg
from that folder, then post it again on pastebin.com. -
Hi Mitu:)
Attempt no.2...exactly from where you said to look. I hope this helps diagnose it this time.
KR, Dave
-
OK, this is the right file. It's quite large, but at some point you have the following lines that configure the keyboard input for Player 1:
input_player1_a = "z" input_player1_b = "shift" input_player1_y = "ctrl" input_player1_x = "alt" input_player1_start = "enter" input_player1_select = "o" input_player1_l = "q" input_player1_r = "w" input_player1_left = "left" input_player1_right = "right" input_player1_up = "up" input_player1_down = "down"
Try switching every input configuration so it applies to P2 and see if this works for you
input_player2_a = "z" input_player2_b = "shift" input_player2_y = "ctrl" input_player2_x = "alt" input_player2_start = "enter" input_player2_select = "o" input_player2_l = "q" input_player2_r = "w" input_player2_left = "left" input_player2_right = "right" input_player2_up = "up" input_player2_down = "down"
Before modifying the file, make a backup for it, just in case.
-
Mitu,
Many MANY thanks for your help so far!! You don't know how long it's taken me to get this much information.
Now, I realise this is going to make me sound like a complete idiot but I don't even understand why it has these values at all, let alone what I'd need to change them to.
- Is it right that one set (let's say P1) is set as 'Keyboard' in the first place? I assume it is (as both joysticks/buttons work 'as' P1) but are the inputs on the Pimoroni Picade HAT supposed to be 'seen' as 'Keyboard' inputs?
- Player 2 'should' be the Pimoroni Player-X USB connection board inputs...what values 'should' they look like for me to change P2 to reflect to?
i.e. If P1 is correct as being seen as 'Keyboard' what readings should the USB Input (at USB0) be reading as i.e. Left seen as 'left'...what should it be for example? I don't know what to change them to if you see what I mean or where to find the values.
Thanks again, hopefully this will be resolved pretty soon now!!!
KR, Dave:)
-
@dw89 said in Newb with Player 2 not being 'seen' on Picade/Retropie:
Now, I realise this is going to make me sound like a complete idiot but I don't even understand why it has these values at all, let alone what I'd need to change them to.
It's probably because those are the keys that your keyboard controller emits and configuring the controller in EmulationStation has added those values in the configuration file.
Is it right that one set (let's say P1) is set as 'Keyboard' in the first place? I assume it is (as both joysticks/buttons work 'as' P1) but are the inputs on the Pimoroni Picade HAT supposed to be 'seen' as 'Keyboard' inputs?
Well yes, didn't you say so in your first post (they're detected as 'Keyboard') ?
Player 2 'should' be the Pimoroni Player-X USB connection board inputs...what values 'should' they look like for me to change P2 to reflect to?
If it's detected as a gamepad and you configured it in EmulationStation, then it's configured in a different file, under
\\retropie\configs\all\retroarch\autoconfig
.If P1 is correct as being seen as 'Keyboard' what readings should the USB Input (at USB0) be reading as i.e. Left seen as 'left'...what should it be for example?
This is usually automatically taken care of when you configure the gamepad in EmulationStation, so there's no need to configure them manually.
EDIT: can you run
cat /proc/bus/input/devices
and post the output ? This should clear up what kind of devices are connected and how they're detected by Linux. -
Hi Mitu,
Sorry this took a while. The below is what is shown when I run that command when just the main 'Picade' Hat and the 'Picade Player X' USB Hat is attached. If I plug in a USB Keyboard it comes up as 'USB Keyboard' on top of this list. What I notice is that the main Picade HAT seems just to be showing up as 'GPIO Keys' in the list below; but when I ran initial Retropie setup (before connecting X Hat USB stick) it registered as 'Keyboard.' Odd (to me anyway!). Many thanks in advance:)
pi@retropie2:~ $ cat /proc/bus/input/devices
I: Bus=0003 Vendor=16d0 Product=0ec4 Version=0111
N: Name="Pimoroni Ltd Picade Player X USB"
P: Phys=usb-0000:01:00.0-1.3/input2
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.2/0003:16D0:0EC4.0001/input/input0
U: Uniq=00000000001A
H: Handlers=event0 js0
B: PROP=0
B: EV=1b
B: KEY=ffff0000 0 0 0 0 0 0 0 0 0
B: ABS=f
B: MSC=10I: Bus=0003 Vendor=16d0 Product=0ec4 Version=0111
N: Name="Pimoroni Ltd Picade Player X USB Consumer Control"
P: Phys=usb-0000:01:00.0-1.3/input2
S: Sysfs=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3/1-1.3:1.2/0003:16D0:0EC4.0001/input/input1
U: Uniq=00000000001A
H: Handlers=kbd event1
B: PROP=0
B: EV=13
B: KEY=78 0 1e0000 0 0 0
B: MSC=10I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio_keys"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/platform/gpio_keys/input/input3
U: Uniq=
H: Handlers=sysrq kbd event3
B: PROP=0
B: EV=3
B: KEY=101680 0 3003400 31800002 -
The listing shows three input devices
- Pimoroni Ltd Picade Player X USB, detected as gamepad/joystick
- Pimoroni Ltd Picade Player X USB Consumer Control, detected a keyboard
- gpio_keys, detected also as a keyboard.
So, yes, if you'd like the Picade controls to show up as different players, then some modifications would be necessary. Did the configuration option change that I posted a while back made any difference ?
-
@mitu said in Newb with Player 2 not being 'seen' on Picade/Retropie:
\retropie\configs\all\retroarch\autoconfig
Hi Mitu,
Ok...slightly confusing as to why Player X is coming up twice?
The Main Hat is the 'Picade' (which sits on the GPIO's) and should be P1 (or 2 I guess). Then
Player X USB Hat should be player 2.When I set it up originally the main Picade HAT was configured as a 'Keyboard' and then I attached the Player X USB Hat and that was configured as a 'Gamepad'. Both HAT's have a joystick and multiple buttons.
I tried to find the file you said (i.e. \retropie\configs\all\retroarch\autoconfig) but I couldn't find it either in the Pi home directory or from root. So I'm not sure what I am doing there...sorry.
Thanks again:)
-
someone else told me to run 'https://github.com/meleu/RetroPie-joystick-selection'.
So, I tried running it and when I did it allows me to select which 'user' for whichever player....but when I do that the only option is 'Player X'...there's no original Picade HAT option for P1 (i.e. the Keyboard I set up).
So it's like it's not seeing the Joystick/Buttons attached to the MAIN Hat at all.
TIA
-
Ok...slightly confusing as to why Player X is coming up twice?
It's one device, but it advertises itself both as a gamepad and keyboard. The 2nd keyboard device (
gpio_keys
) is the GPIO connected HAT.I tried to find the file you said (i.e. \retropie\configs\all\retroarch\autoconfig) but I couldn't find it either in the Pi home directory or from root. So I'm not sure what I am doing there...sorry.
My modifications were intended for the
retroarch.cfg
file that you posted previously - from\\retropie\configs\all\retroarch.cfg
. Hopefully, switching the keyboard controls from P1 to P2 would enable you to use the USB controller as P1 and the Hat as P2.So, I tried running it and when I did it allows me to select which 'user' for whichever player....but when I do that the only option is 'Player X'...there's no original Picade HAT option for P1 (i.e. the Keyboard I set up).
That's because the Hat is not detected as a gamepad and the script only works with gamepads, not with keyboards.
-
Hi Mitu,
Hoping you are still there and kindly able to help? Sorry for the delay, Covid and having to give system back. Just got it back with the hope to carry on/finally fix it.
So, we are where we were with Main board (GPIO) and the X-Hat and both are controlling P1 and P2 is non-existant.
So, all I need to know (and its where we left off) is how to assign the GPIO to P2.
Any help appreciated, I have it all setup and ready to go.
KR
Dw;)
-
@dw89 said in Newb with Player 2 not being 'seen' on Picade/Retropie:
So, all I need to know (and its where we left off) is how to assign the GPIO to P2.
Re-read the topic and see if you can implement the modifications I posted (the lines added to
retroarch.cfg
). -
-
Hi Mitu, adding changes to P2 as we speak. Can you confirm; do I change P1 inputs now to 'nul'?
Thanks👍🏻
-
Wow! Progress at least. I tried them all to see what would happen (both p1 and p2 as set and then removing from P1 and setting P2 only).
All based on Mario Kart Snes in 2p mode:
So 1) (With Both P1/P2 set): no change at all to default. P1 works but no P2
2) (make P1 'nul' and set P2 as per P1 previous) Joy! But not quite there. Both P1 and P2 works. I can set each driver etc with respective player. 'However', very oddly, when driving starts P1 controls BOTH P1 and P2 characters, but P2 controls only works, correctly, for P2.So, getting there but perhaps no cigar quite yet? So, big thanks thus far!!
KR, dw👍🏻
-
Mitu,
I've tried other games with same effect.
Contra, for example, Joystick 1 controls both players, 2 just P2. So weird. By the way, every time a game loads It shows, at bottom of screen, that Picade-X USB connected to Port 0 (zero). Just fyi in case it helps.
KR
Dw👍🏻☺️
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.