DualShock 2 - getting it to work
-
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...
http://seanlee99.blogspot.cz/2013/01/play-arcade-emulators-with-playstation.html
-
Got it!
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:
DualShock Pinout:
RSPi pinout:
DS -> RSPi
1 -> 3
2 -> 8
4 -> 6
5 -> 1 (powering by 3.3V, 5V didn't work)
6 -> 10
7 -> 12UPDATE
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
sudo reboot
after restart:
cd ~/RetroPie-Setup
sudo ./retropie-setup.shSetup script will launch. Hit Manage Packages, Manage driver packages, gamecondriver, Install from binary. Driver should install.
- Configuration
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:
jstest /dev/input/js0
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
-
@edmaul69 said in DualShock 2 - getting it to work:
@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?
-
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...
-
Ok sorry I was so late...
-
Making progress
So I got the adapter working, thanks to my colleagues who assembled it. I've also prepared it for rumble power (see the socket for power adapter), I got a box for it, but I have a problem - no matter what delay I set in the driver, I am getting random start-select presses. Tried 14, 10, 8, 20, 11, 12 - no luck so far, still having issues.
Katemosnter in this thread https://retropie.org.uk/forum/topic/6756/solved-ps1-controllers-random-input/18 had the same problem, probably solved it, but I need to modify the sources probably to get it work. Or what delay was stable for you people?
I am also willing to participate on driver development, but I can't seem to find source codes for the driver...
-
I hate to tell you, but this $5.76 adapter works perfectly for the 3x PS2 Dualshock 2 controllers I've used...others which look EXACTLY like it and flake out similar to how you're describing it in your OP...
Here's a topic on a List of working USB Adapters for original console controllers.
-
Nice, but I don't want to invest any more money to it, I got all the setup I need, now the software needs fixing...
-
Found the source code! It is actually in /usr/src/gamecon_gpio_rpi-1.2/gamecon_gpio_rpi.c, even Makefile is included
-
Hi there!
I'm using a nearly identical setup and discovered the following:
- The psx_delay-parameter does nothing and is disabled in the current version of the GPIO-driver.
- Just supplying 7,5 V to the controller does not make rumble work.
I also had problems with ghost input every few minutes (mostly select and start). Two pullup resistors between 3.3 V and GPIO2/GPIO3 (I used 1,8 kOhm) made the ghost input almost disappear (GPIO driver documentation states that pullups are not necessary because of internal pullups - whatever). I still get a random button press every few hours though...
Would really like to see some progress here because my setup is nearly fully reliable... ;-)
-
I have a variable voltage 1A adapter, but yes, if there is no support in driver, no rumble.
I am looking to the driver, I will need to read documentation about the protocol, but the driver itself is surprisingly small. I hope that I will get some help from Katemonster...
-
I will try it with the pullup resistor - but my colleague said that the pullup resistors on chip must be enabled first, so maybe that's why it does not work and a physical resistor is required...
-
OK so upon discussing it (my colleagues develop HW and boards) and looking into the source code, the on-chip pullup resistor is enabled in the driver and it seems that on such a long cable, the pullup resistor on chip is insufficient, that's why it is probably necessary to solder another such resistor to the controller wire harness. I will try it out today and report progress.
-
@PET2001 we must be blind...
https://github.com/RetroPie/RetroPie-Setup/wiki/GPIO-Modules#gamecon_gpio_rpi section FAQ
Q: PSX pads do not operate reliably or at all
A: GPIO pins P1-07 and P1-26 do not have on-board pullup resistors which are required for reliable operation with PSX/PS2 pads. Connect an external pullup resistor (1.8k-4.7k) between the pin and 3.3V (P1-01) if you use it with PSX/PS2 pad.
So this resistor is needed between physical pins 1-3 and 1-5 (if two controllers). I will try it
-
That makes sense. Onboard pullups tend to be in the 10k-50k range, so I would imagine you need something a little stronger with a long cable. Funn thing is that I have run into this with sensors on Arduino all the time, yet I didn't think og it here. In retrospect, it makes perfect sense: there isn't enough resistance to pull up to a logical 1, so the input is floating between logical 1 and 0, hence the false inputs.
-
I've soldered 1K8 resistors, and so far no luck, still plenty of random input. Even if I leave the joysticks idle in Emulationstation menu...
-
@mrbwa1 do you have a circuit diagram? Post it if you have. Are you trying to hold the input high until a switch is pressed?
-
@rbaker said in DualShock 2 - getting it to work:
@mrbwa1 do you have a circuit diagram? Post it if you have. Are you trying to hold the input high until a switch is pressed?
I don't have a diagram for this circuit. I have just seen similar issues with other sensors. I'm not sure if this needs to be pulled up or down to get rid or random inputs.
There is a bit of info here: http://store.curiousinventor.com/guides/PS2/
Looks like they are calling for a pull up on the ACK line (pin 9). Not sure of the voltage, but if it is 5V, a 4k7 resistor is pretty common. 10k is the next common value used in a lot of stuff. Even 1k should be sufficient.
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.