PSX pad via USB adapter problems
-
I'm doing a PiStation project and I've just got a cheap PlayStation port to USB adapter. My problem is retropie reads the device as a PS3 pad and I can't get the D-Pad to register properly. Whatever D-PAD button press logs as button 16.
I know this is somehow due to the analogue\digital issues of the old Vs new PSX pad standards (mine is old school digital pad), but is there a way I can force retropie to detect this as a non analogue pad?
Hopefully this can be fixed via settings and is not a hard embedded profile, I.e. hopefully the adapter isn't encoded to advertise a PS3 type pad.
Any ideas guys?
-
The input received in RetroPie has less to do with the specifics of the PSX controller and more to do with how those specifics are translated by a specific adapter. I have a few adapters that report a DPad as a hat switch and others that will report the exact same DPad as a series of buttons. I have to say, I've never seen an adapter report a DPad as one single button though.
If you drop to the command line (f4) and run:
jstest /dev/input/js0
What do you see when you press the DPad? Any variance at all, or does button 16 just toggle on & off?
Also, ctrl-c will exit the test and typing:
emulationstation
will get you back up top.
-
@mediamogul hi thanks for info
So tuning jstest (without pressing anything) shows 18 buttons, however when I press the D-Pad buttons each one causes buttons 16,17 & 18 to turn on\off in different combinations??
-
The combinations are probably because it's on a rocker. Were you not able to invoke a fourth number at all? Perhaps 15?
-
@mediamogul no it seems that just those 3 change state. For example left dpad triggers 16 ON and right dpad triggers 16 + 18 ON. Another example is up dapd triggers 16+17+18 ON.
-
Is your playstation pad a dualshock (or equivalent)? If so, the 'analog' button changes which values the d-pad outputs (either as buttons or as axis values).
I wrote about this in a blog post:
PlayStation Emulation on the Pi: Enhancing the Experience with the Options Menu – Part Three: Analogue Controllers -
That's a really great site you have there. It's like Christmas over there with all the fantastic articles. The format is very stylish as well.
-
@mediamogul thanks! Really great to hear such positive feedback - I really appreciate it.
-
@RetroResolution my pad is the original so no analogue sticks
-
@bobchiba Ah, righto. It was worth checking though.
-
What's the name of the adapter and it's manufacturer?
-
@mediamogul Generic PS1 PS2 to PC USB 2.0 Controller Adapter Converter Compatible for Sony PS2 Wired Controller https://www.amazon.co.uk/dp/B00FBM3JEG/ref=cm_sw_r_other_apa_kCZuxbHCB501W
-
There are many times where drivers are unnecessary for a device like this as some other piece of software can be used to pick up the slack. However, I don't know what to make of the input coming from that DPad. In all the mapping software I've ever used, I wouldn't know how to translate three button inputs, mixing in various combinations into the proper four needed for direction. I'm afraid this might be the rare occurrence where using the proprietary drivers is inescapable. I'm guessing the included driver DVD it talks about in the description is only for Windows-based systems?
-
On fourth thought, I think I might know how to map those combinations after all. Run jstest again and tell me what combinations are occurring. So far we know that 16=Left, 16+18=Right and 16+17+18=Up. Find out what combo equals down and also double check the previous combos while you're there.
Edit: Also, go ahead and give me the code numbers for all the other buttons as well to save time.
-
I just did a trial run using one of my own controllers and it only showed results using event codes rather than js. For those, you'll need to run evtest. What you're looking for there is any listing that starts with "BTN_" after a button is pressed. When a direction is pressed on the DPad, you'll likely see up to three of these. I'll also need to know the event number it's coming from, like "event0" or whatever.
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.