PlayStation 2 cheat codes

Overview

While Densha de GO! 3 and Densha de GO! Shinkansen officially support the original (non-USB) PlayStation controllers, other games are only compatible with USB controllers. Via cheat codes, it is possible to use the original PlayStation controllers on real hardware, either with retail discs or via OPL.

The codes emulate a Type 2 controller. You will need to connect the controller as follows:

  • Port 1: Dualshock or Dualshock 2 (D-pad, SELECT)
  • Port 2: PlayStation controller (handles and buttons, SELECT is mapped to D)
Note

Other controllers may be used like this with an adapter (Titan One/Two + Brook/PADEMU). In this case, buttons are not remapped and the Dualshock on port 1 is not needed. More information

Each game requires a specific cheat code:

There are also cheat codes available for games in the Train Simulator series, emulating a Multi Train Controller (MTC):

For retail discs, the codes can be loaded with ps2rd or Cheat Device. If you are using OPL, it already includes ps2rd and you just need to copy the codes and enable cheats.

Technical description

These cheat codes have become possible after disassembling and inspecting each game with Ghidra and the ghidra-emotionengine plugin. The format of cheat codes is described here.

Here you can find a commented version of the cheat code for Densha de GO! Professional 2 (Taito Best). Input data is copied to 0xFE000 (two bytes for button data and one byte for D-pad data) before processing. Simulated controller data is first written to 0xFE004 before being copied all at once to the final location in memory where the game expects USB input data.

202D3CAC 00000000 // By default, set number of connected USB devices to 0
D02DBA32 5A010001 // If there's a controller connected to P2, run the following 0x5A lines (everything)
502DB9C2 00000002 // Copy button data to 0xFE000
000FE000 00000000
D00FE000 57400050 // If the controller in P2 has UP+DOWN pressed, run the following 0x57 lines (everything)
203790F0 40000202 // Set USB controller model to Type 2
202D3CAC 00000001 // Set number of connected USB devices to 1

// Remapping
D02DB9C1 07010041 // If the controller in P2 is a digital gamepad (PS1 mascon), run the following 0x7 lines
D00FE000 01400001 // Remap SELECT to L3 (for use as "D")
700FE000 00500002
700FE000 00100001 // Clear SELECT
D02DBAC2 01400001 // Remap P1 SELECT to SELECT
700FE000 00500001
502DBAC2 00000001 // Remap P1 D-pad to D-pad
000FE002 00000000
D02DB9C1 09010073 // If the controller in P2 is a Dualshock (mascon connected via adapter or PADEMU), run the following 0x9 lines
000FE002 000000FF // Clear D-pad data
D02DB9C6 01010000 // LEFT
700FE002 00400080
D02DB9C6 010100FF // RIGHT
700FE002 00400020
D02DB9C7 01010000 // UP
700FE002 00400010
D02DB9C7 010100FF // DOWN
700FE002 00400040

// Buttons
2012BDC0 34420000 // ASM patch (disables game function that reads input from P2)
000FE008 00000000 // Clear button data for Type 2 controller
D00FE000 01408000 // A
000FE008 00000002
D00FE000 01404000 // B
000FE008 00000001
D00FE000 01402000 // C
000FE008 00000004
D00FE000 01400002 // D (L3)
000FE008 00000008
D00FE000 01400008 // START
000FE008 00000020
D00FE000 01400001 // SELECT
000FE008 00000010

// D-Pad
D00FE002 010100EF // N
000FE007 00000000
D00FE002 010100CF // NE
000FE007 00000001
D00FE002 010100DF // E
000FE007 00000002
D00FE002 0101009F // SE
000FE007 00000003
D00FE002 010100BF // S
000FE007 00000004
D00FE002 0101003F // SW
000FE007 00000005
D00FE002 0101007F // W
000FE007 00000006
D00FE002 0101006F // NW
000FE007 00000007
D00FE002 010100FF // CENTER
000FE007 00000008

// Power handle
D00FE000 01401000 // P5
000FE005 00000005
D00FE000 01400080 // P4
000FE005 00000004
D00FE000 01401080 // P3
000FE005 00000003
D00FE000 01400020 // P2
000FE005 00000002
D00FE000 01401020 // P1
000FE005 00000001
D00FE000 014000A0 // P0
000FE005 00000000

// Brake handle
700FE000 00300F00 // Bitmask: discard all button data besides the 4 bits for brake notche
D00FE000 01000F00 // EB
000FE004 00000009
D00FE000 01000600 // B8
000FE004 00000008
D00FE000 01000200 // B7
000FE004 00000007
D00FE000 01000D00 // B6
000FE004 00000006
D00FE000 01000900 // B5
000FE004 00000005
D00FE000 01000C00 // B4
000FE004 00000004
D00FE000 01000800 // B3
000FE004 00000003
D00FE000 01000500 // B2
000FE004 00000002
D00FE000 01000100 // B1
000FE004 00000001
D00FE000 01000400 // B0
000FE004 00000000

// Send data to game
500FE004 00000006  // Copy 6 bytes (all input) to memory location where game expects USB input data
003794C2 00000000

Memory addresses

Professional 2 (Taito Best)Professional 2RyojōhenFinalNotes
USB mascon count (int32)0x2D3CAC0x2C852C0x24B6DC0x2C1464
USB mascon model (int32)0x3790F00x36EAF00x2F24E00x3DEA100x40000202=Type 2
Type 2 USB data (5 bytes)0x3794C20x36EEC20x2F28C20x3DF242Raw USB data, except notches, which are preprocessed to notch index
P2 controller connected (byte)0x2DBA320x2D14F20x2548F20x2C81720x00=Disconnected, 0x01=Connected
P2 controller type (byte)0x2DB9C10x2D14810x2548810x2C81010x41=Digital, 0x73=Dualshock
P2 button input (int16)0x2DB9C20x2D14820x2548820x2C8102
P2 L-stick input (int16)0x2DB9C60x2D14860x2548860x2C8106
P1 button input (int16)0x2DBAC20x2D15820x2549820x2C8202
ASM patch0x12BDC00x12CB600x135B900x148928Leftover game code binds the C button to the horn and needs to be disabled.