DualShock 2 - getting it to work
I wanted to use old original DualShocks 2 with RPi3, the USB adapters arrived today, but the way they work is rather weird, I hope it's just an configuration issue...
First of all, before I got these adapters, I borrowed my friend's Logitech F310 and worked just beautifully - after configuration, when I hit the Analog button on the pad, the analog started to work (in game or menu, did not matter).
However, these PSX2 DualShocks (both SCPH-10010, one made in Korea, the other semi-transparent made in China, but the behavior is the same for both) with adapters are a nightmare. One joystick actually gets detected as two joysticks! (called Twin USB Joystick). I've tried to configure them via the wizzard, but when the "Analog" is off, the D-Pad actually registers as AXIS 1 & 2! (= as analog). Thumb buttons don't work at all without analog being turned on. If I turn on Analog, the D-Pad registers as "HAT" and at least in the config the analog sticks and thumbs seem to work. But when I try to play a game, lets say Crash Bandicoot 2, when the analog is off, neither D-Pad nor analog sticks work, when analog is on, at least D-Pad works but not the sticks.
What is wrong?
Out of everything you've noted, it being detected as two joysticks is the most troublesome. Are different parts of the controller being separated in two as well, or does it just duplicate all input as being two fully complete controllers?
mrbwa1 last edited by mrbwa1
PSX/PS2 Joysticks don't configure the way you are thinking they do.
You want to turn analog on and go through the Emulation station configuration. I have a different adapter (the blue one with 2 controller ports on it), but it configures the same. You still have to run the config on each controller (also never mix an analog and original digital PSX controller on that adapter since it does sort re-use the configs even though you have to configure each pad separately).
The catch is that you don't turn analog on and off on the controller. You have to do it in the emulator:
"The standalone pcsx-rearmed controller type can be changed in the in-game menu.
- Use the Retroarch GUI hotkey(default select+X) in-game
- Navigate to Quick Menu -> Core Options
- Change Pad # Type from standard to analog
- retroarch-core-options.cfg will be updated automatically when a game is exited, so there is no need to set save on exit"
So, are the two controllers being detected a way of conforming the analog and digital modes to a standard USB HID interface, with one always being inactive depending on the mode?
@mediamogul - don't know, just says it detected two controllers instead of one
@mrbwa1 - thanks! That actually did work. But that means I have to have the controllers always on analog, not even the menu works without it...
However, how about playing Bomberman '93 on PC Engine? That game supports up to 5 controllers, I got two DualShocks and the logitech controller hooked up, it says 5 joysticks are connected and guess what - I tried to create a 3-player game, but the logitech controller input was ignored, 3rd player must have been bound to one of those PSX duplicates (Dualshocks worked)...
Even the best adapters from somewhere like Raphnet seem to have similar issues to work around. To me, they're endlessly fascinating in how they operate, but they can also be a bit of a chore to deal with as well. One solution to the multiplayer problem is to manually reassign the unwanted controllers to a high number like player 15-16 to keep them out of the way.
How? I mean is it possible to assign the controller to a certain slot, globally?
I'm trying to race the daylight on some yard work and can't get at my Pi at the moment, but you can set the controller assignments globally from the RetroArch settings in the RetroPie menu of Emulation Station. You might have to also set the maximum number of users to a high number before hand. I'll write back with more detail after a while, but someone else might be able to elaborate in the mean time.
Thank You, appreciated ;)
One more thing - I tried NES games with the Logitech controller, and what I like is that analog actually sticks work there as well. But not with Dualshocks... it's like either the adapter sends incorrect messages, or there is a bug interpreting them? I wonder how RetroArch works in this way...
lostless last edited by
@Jofo when using these ps2 cobtroller adapters, you have to configure with analog on and always have it on. When you have analog on, it functions like the Logitech controller. The reason you lose control when turning off analog is the mapping of the dpad is now mapped to nothing since the adaptor just maps the left joystick to the dpad.
Although RetroArch supports up to 16 controllers, it seems as though you can only assign up to four from the configuration editor. However, it should still be possible to assign the "working" controllers to the primary spots and have the inactive ones trail behind. This will still present a problem when adding a new controller, as it will in turn trail behind the rest, resulting in the need to repeat the process at that time.
Anyway, give it a go and see if it works for you. The setting can be found by heading to the 'Configuration Editor' entry of the RetroPie menu in Emulation Station. From there, select 'Configure Basic libretro Options', followed by 'Configure Default Options for all libretro Emulators' and finally 'Choose Joypad Order'.
So it's basically problem of the adapter...
I've seen someone wiring these controllers on GPIO, maybe I will check it out as well. Has anyone any experience, how the Dualshock behaves when hooked on GPIO? Do analogs work?
edmaul69 last edited by edmaul69
@Jofo @mediamogul i believe all of the ps2 adapters except for the radio shack adapter register as 2 players. And the useable player is usually the second player. Buy a 2 player adapter is the best thing. Plus that means only 1 usb port is used. The analog not working at the same time as the dpad is normal. To make them both work the same add this to all your retroarch.cfg files except the ones in the /opt/retropie/configs/all/, .../psx/, .../psp folders and any other systems that have seperate analog and dpad:
input_player1_up_axis = "-1" input_player1_down_axis = "+1" input_player1_left_axis = "-0" input_player1_right_axis = "+0" input_player2_up_axis = "-1" input_player2_down_axis = "+1" input_player2_left_axis = "-0" input_player2_right_axis = "+0"
It was already answered for the psx analog so that i dont need to explain. But yeah always keep the analogs on.
So it means that the system will register only two joysticks when both dualshocks are connected to that dual-port adapter and not four? That seems as a better option...
This looks kinda interesting...
It behaves almost EXACTLY as I wanted - D-Pad works without having to turn the analog on, and when analog is on, D-Pad also works along with the sticks. The only thing how it differs from the logitech controller is that I cannot use sticks in lets say NES games (it worked on the logitech controller), but thats not a big deal. Brilliant!
So what I did:
- Connect pins from DualShock to RSPi GPIO in this fashion:
DS -> RSPi
1 -> 3
2 -> 8
4 -> 6
5 -> 1 (powering by 3.3V, 5V didn't work)
6 -> 10
7 -> 12
It is also necessary to solder a pull-up resistor in range 1K8-4K7 between RSPI physical pins 1-3 (and 1-5 if using two controllers) as mentioned in gamecon_gpio FAQ https://github.com/RetroPie/RetroPie-Setup/wiki/GPIO-Modules. The longer Your wires, the lower the resistor (I use 1K8 on my setup)
- Install gamecon_gpio_rpi driver via setup script
sudo apt-get update
sudo apt-get upgrade
Setup script will launch. Hit Manage Packages, Manage driver packages, gamecondriver, Install from binary. Driver should install.
The installer actually did setup the driver to load on startup, so adding it into /etc/modules was not necessary. What you need to do is
- create file gamecon.conf in /etc/modprobe.d (was a bit tricky for me, sudo and cat refused to work, so I created it elsewhere and then copied via midnight commander running as root)
- put this into the file (I open "sudo mc", mode cursor to file and hit F4 for editor)
options gamecon_gpio_rpi map=0,0,0,0,7,0
save and reboot (sudo reboot)
- Check if it works
Joystick, at least on my system, was /dev/input/js0. So testing it works as follows:
A lot of text should appear, but if you press a button or move sticks, the text should change. If not, you've made a mistake somewhere in the process.
- Go to Emulation Station and configure the input, should be nice & smooth
Hope it helps! I am definitely going to construct that two-port GPIO adapter. And now I understand, why those controllers show up as two - they share the same command bus wire and those adapters probably don't do any sensing on the wires, just telling the system that there are two joysticks. Also now I know, why force feedback does not work - because these pads use 7.6V on pin 3 for vibration motors, I wonder if by connecting the voltage on that pin would make it run in games, will probably try out...
So now it's time to cannibalize those clumsy USB adapters for connectors, hehe :D
mrbwa1 last edited by
@Jofo @mediamogul i believe all of the ps2 adapters except for the radio shack adapter register as 2 players. And the useable player is usually the second player. Buy a 2 player adapter is the best thing.
I can confirm that all the cheap adapters seem to be the same chip, so getting the dual adapter is probably the best bet. (https://www.amazon.com/Trenro-Dual-PlayStation-Controller-Adapter-2/dp/B000F6BGXY) The only thing is that the actual Playstation controller connectors sometimes have cold solder joints and will cut in and out if they are wiggled. I have had to reflow the solder on a couple of them.
The Radio Shack #26-304 is indeed a true 1 controller connector. Not sure how long they sold them for as I probably bought mine in 1999 or 2000 (and they weren't cheap!). considering it was designed during the Windows 98 days, I'm surprised it works without a hitch on Raspberry Pis and even Windows 10.
Last tip, enable the option: input_player1_analog_dpad_mode = "1" so you can use the left analog in emulators. I really only use it for Atari and shooter games where I can set the controller down and use it like a tiny arcade stick.
Well, my adapter to GPIO is almost finished, however - I cant get the rumble motors to operate. I've bought a variable voltage power adapter, can do 1A which is I think way more than necessary, but the rumble does not work, tried 7.5 and 9V - no success. Does anyone know, what might be wrong? Does GPIO even support rumble?
Alucard last edited by
I have PS2 controller also.
So basically the issue is the PS2 controller can work in two ways
- The button to activate analog is off
- The button to activate analog is on
The thing is, the signal for the left analog stick when the button is on is the same as the d-pad when the button is off.
The signal for the d-pad when the analog is on is different from any other button signal when the analog button is off.
Basically if you want to configure through the retropie interface and get all the button working: you need to activate the analog button and configure all the buttons.
The analog will be working and preconfigured in all the emulators.
The only issue with that is...you won't be able to navigate through the menus without activating the analog. Why? Because the signal to navigate is, by default in retropie, associated to the d-pad and the d-pad is configured with the specific signal that is sent when the analog button is on.
I hope I'm clear...else I would try to explain again...
I no longer have the USB adapters, I've used them to build GPIO adapters. But rumble is not working, even though I've put 9V 1A adapter to the pin 3-4. Also, I am looking for gamecon driver source files...
Alucard last edited by Alucard
Ok sorry I was so late...