Using PlayStation 1 Densha de Go controller on emulators

Items needed

Arduino Leonardo (or equivalent). Note that it has to have at least one 3.3V power output.
A standard PlayStation 1 controller
A Densha de Go controller
6 male-to-female jumper cables

Procedure

Initial Cabling

Using the jumper cable, connect the typical PlayStation 1 controller with the Arduino Leonardo.

PlayStation 1 controller pin numbers

---------------------

\ 1 2 3 4 5 6 7 8 9 /

 -------------------

Connection to Arduino Leonardo

* PlayStation 1 controller pin 1 (DATA) --> Arduino Leonardo digital port 12

 * PlayStation 1 controller pin 2 (CMD) --> Arduino Leonardo digital port 11

 * PlayStation 1 controller pin 4 (GND) --> Arduino Leonardo port GND

 * PlayStation 1 controller pin 5 (VCC) --> Arduino Leonardo port 3.3V

 * PlayStation 1 controller pin 6 (ATT) --> Arduino Leonardo digital port 5

 * PlayStation 1 controller pin 7 (CLK) --> Arduino Leonardo digital port 4

Set up Arduino IDE

Install the IDE is available at https://www.arduino.cc/en/Main/Software.

Note that you may need to fix the avrdude install in the Arduino IDE. To do this, download its latest version at its official site https://www.nongnu.org/avrdude/. Replace arduino-1.8.6\hardware\tools\avr\bin\avrdude.exe and arduino-1.8.6\hardware\tools\avr\etc\avrdude.conf with the ones that you find in the download.

Download and install the following Arduino libraries. They are in the form of zip files.

Program the Arduino Leonardo

In your Arduino IDE, create a text file with content shown at https://github.com/tylau0/DenGo/blob/main/PSX2USB_mod4.ino. It is modified from the PSX2USB.ino example at https://github.com/SukkoPera/PsxNewLib/blob/master/examples/PSX2USB/PSX2USB.ino. The changes are the Arduino Leonardo ports to use (to match my cabling), the Joystick type (so it could be detected by the PC as a typical gamepad device) and most importantly the registration of the D-pad components as buttons rather than axes (so the simultaneous presses of opposite directions could be detected which is crucial for the detection of the controller as a Densha de Go controller by the respective games), and the use of the PsxLibrary which could support both controller types.

Compile and upload the program to the Arduino Leonardo. 

Button mapping with emulator

Start your favorite PlayStation/PlayStation 2 emulator on PC and map the buttons of the gamepad appropriately.

Final cabling

Remove the cables between the standard PlayStation 1 controller and the Arduino Leonardo. Connect the Arduino with the Densha de Go controller instead using the same cabling scheme. Then you are done. Your controller is ready for use in the PlayStation 1 or even some PlayStation 2 emulator. 

Enjoy your game!

P.S. It may be possible to use the controller with the Densha de Go games on Nintendo 64, Sega Dreamcast and Sega Saturn given that you make the correct button remapping. See https://gist.github.com/MarcRiera/075b5651039942b2380dc51f0ec1cbc9

Densha de GO! Nintendo 64 Sony PlayStation 1 Sega Dreamcast Sega Saturn
SELECT R SELECT D ??
START START START START ??
A B SQUARE A ??
B A CROSS ?? ??
C L CIRCLE C ??
POWER 1 RIGHT TRIANGLE Z X
POWER 2 UP LEFT Y Y
POWER 3 Z RIGHT X Z
BRAKE 1 C RIGHT L1 UP L
BRAKE 2 C LEFT L2 DOWN R
BRAKE 3 C DOWN R1 LEFT DOWN
BRAKE 4 C UP R2 RIGHT LEFT

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Thank you for this tutorial! I already bought the switch controller and was looking a way to play the old games. I ordered a psone controller from ebay that should arrive soon. I'll inmediately order an arduino leonardo to try this. It's my first project of this kind. Hope it'll works!

    ReplyDelete
  3. Hello there!

    Found this post a couple of days ago. Thanks for the detailed tutorial! I ordered my first DDG controller (PS1 one-handle) and I'm waiting for it to arrive. I have a PS1/PS2 to USB adapter which I can use with the PC versions of the games, but once I carefully read this post, I just ordered an Arduino Leonardo board with some jumper cables to use with emulators on my PC, which should arrive earlier than the controller itself.
    I have a question, though: in your guide you mark "a standard PlayStation 1 controller" as one of the required items for this procedure; however, I only have a PSOne Dualshock controller (SCPH-110). Will it work just fine with this library, or do I have to track down a standard SCPH-1010 model for this?

    Thanks in advance!

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Hello again :')

      I'm having some issues here... I was able to make the controller work with Densha de GO! 64 via Project64. It was fairly easy, just a matter of mapping the correct inputs (following the chart at the end of this post) to controller port 3 and selecting the DDG controller at the start of the game.

      The thing is, I just can't happen to make it work with the PS1 games... The N64 version has this option to select the controller type as soon as you launch the game, but the PS1 games ALWAYS launch with the standard PS1 digital controller by default.

      I've tested with some emulators, and none of them worked. In DuckStation, I can only use the face buttons to confirm/cancel, and in RetroArch the things got complicated: once I plug in the Arduino Leonardo with the controller plugged in, the menu navigation goes crazy, even disabling some of my keyboard inputs. Also, once I load up a game, the controller simply doesn't work, not even the face buttons.

      I see in your picture that you were running DDG Professional through Beetle PSX HW under RetroArch, and the DDG controller icon is showing just fine at the top right corner of the game's screen. Is there some setting I may be missing in order to set these games up properly?

      Delete
    3. OK... I was finally able to find out what was missing, and it was much more simple than I'd anticipated: keeping both "up" and "down" held down to make the games recognise the controller.

      It was The Yamanote who pointed this out to me on Reddit. I actually DID read some documentation (and I believe it was even yours) detailing this quirk of the DDG train controllers on PS1, but it slipped my mind.

      It was just a matter to set a hotkey up with AutoHotKey. Now, whenever I press F7 inside the games, "A" and "S" on my keyboard (which I mapped to "up" and "down" inside DuckStation) are being pressed down automatically, making the train controller immediately recognised, and navigation and gameplay are working just as they should.

      For anyone interested, the script I'm using is:

      F7::
      KeyDown := !KeyDown
      If KeyDown
      SendInput {a down} {s down}
      Else
      SendInput {a up} {s up}
      Return

      Well, I'll be keeping my comments just in case someone else is having the same issues as me.

      Thanks for creating this method and writing down these tutorials! It's been lovely to be able to use my controller on my PC, especially since I don't own an actual PlayStation console. :D

      Delete
    4. This comment has been removed by the author.

      Delete
  4. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular posts from this blog

Using PS1/PC Densha de Go! controller SLPH-00051/TCPP-20001/DGOC-44U on PS4/Switch Densha de Go!!

Play octoshape stream on windows with VLC player