Newb with Player 2 not being 'seen' on Picade/Retropie
-
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
). -
Evening:) I believe I did this but give me 30mins and I'll be back with an answer.
TY Sir๐๐ป
-
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๐๐ปโบ๏ธ
-
Still able to help Mitu? Unsure what to do at this point.
KR
Dw๐๐๐ป
-
Can you post the current configuration from
retroarch.cfg
that you have now ?
Do you also have thejoystick-selection
script installed ? If so, then uninstall it and try re-testing again. -
Hello Sir๐
I will post up the .cfg after Ive eaten for you to have a look at๐๐ป
Ive never had that joystick script installed as far as I know so Im hopefully good on that. If I ever did, from the past, this is a new rebuild since the back end of last yr. It's all completely as per default Retropie install apart from the retroarch.cfg changes you asked me to make. Will msg back once pastebin's up.
KR, dwโบ๏ธ
-
Here we go: https://pastebin.com/KbzEVAYd
All I've done, from default, is change P1 to 'nul' and moved all those relevant codes from P1 to P2.
Again, setup is Pi4, Picade HAT (so GPIO seen as Keyboard), Picade-X USB Daughter (seen as Gamepad) and then ran Emulation Station. When I did that, without USB board, it registered codes for GPIO as keyboard (P1) and then I did the same by attaching USB board (P2) seen as Gamepad. I could see, when doing in EmulationStation, that Keyboard appropriated codes like 'CTRL' etc, whereas Gamepad was numbers.
However, when you start 'playing' it only shows Picade-X USB Hat as player Port #0 at bottom of screen and no mention of Keyboard at all. Then, conversely, looking at retroarch.cfg, you see only details for P1 (now moved to P2) showing codes and nothing for USB. Very, very odd.
Anyway, that's where I am at. As said before, both sets of players are using hard controls i.e. buttons and joysticks connected to USB Hat and GPIO Hat. Perhaps I need to add the USB codes now to P1 in retroarch.cfg? Not that I know what they are of course, lol.
KR, dw:)
-
I also just tried the jstest (worked that out, lol) and it's kinda weird.
JS0 detects Picade-X USB Hat only and it I use buttons etc they respond when used on screen. Oddly when I use P2 with JS0 running I see odd control characters at the 'end' of the line 'not' corresponding to the normal 'places' in the script.
JS1+ brings back nothing.
So GPIO main hat seems undetected in this yet is the only codes (now on P2) in Retroarch.cfg
'I' personally don't understand.
KR, dw;)
-
Finally, if I go to /dev/input and list files with both main Hat and USB Hat installed I get the following files shown:
- mice
-event2 - event3
- js0
- event1
- event0
- by-path
- by-id
And if I remove the USB Hat (pull plug out) all that remains is:
- mice
- event2
- event3
- by-path
- by-id
And 2/3 and mice may be related to the usb keyboard I plugged in to test jstest. Hmm.??
- mice
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.