Move controllers to individual pages

This commit is contained in:
Marc Riera Irigoyen 2022-04-18 20:24:59 +02:00
parent 29dc5c1e56
commit 25dc26cc0a
21 changed files with 517 additions and 316 deletions

View file

@ -9,31 +9,6 @@ Besides the official compatibility, it is possible to use unofficial adapters, t
[Autotraintas](https://autotraintas.hariko.com) has created a tool that makes it possible to use nearly any Densha de GO! controller with the PC versions of the games. This includes the classic console controllers (USB adapter required) and the USB controllers for the PlayStation 2. The tool patches the game memory on the fly to reflect the input from the controller.
## PlayStation 2 cheat codes for PlayStation controllers
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](https://github.com/MarcRiera/ddgo-scripts/tree/main/Densha%20de%20GO!%20(PS1-PS2))
Each game requires a specific cheat code:
- [Densha de GO! Ryojouhen](cheats/controller-cheat_ryojouhen.txt)
- [Densha de GO! Professional 2](cheats/controller-cheat_pro2.txt)
- [Densha de GO! Professional 2 (Taito Best)](cheats/controller-cheat_pro2best.txt)
- [Densha de GO! Final](cheats/controller-cheat_final.txt)
There are also cheat codes available for games in the **Train Simulator** series, emulating a Multi Train Controller (MTC):
- [Train Simulator: Midosuji Line](cheats/controller-cheat_midosuji.txt)
- [Train Simulator + Densha de GO!](cheats/controller-cheat_tsddgo.txt)
For retail discs, the codes can be loaded with [ps2rd](https://github.com/mlafeldt/ps2rd) or [Cheat Device](https://github.com/root670/CheatDevicePS2). If you are using OPL, it already includes ps2rd and you just need to copy the codes and enable cheats.
## Input plugins for BVE Trainsim/OpenBVE
BVE Trainsim and OpenBVE both support **input plugins**, which allow expanding the controllers compatible with the program.

View file

@ -0,0 +1,157 @@
---
title: "PlayStation 2 cheat codes"
weight: 1
---
## 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**)
{{% notice 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](https://github.com/MarcRiera/ddgo-scripts/tree/main/Densha%20de%20GO!%20(PS1-PS2))
{{% /notice %}}
Each game requires a specific cheat code:
- [Densha de GO! Ryojouhen](controller-cheat_ryojouhen.txt)
- [Densha de GO! Professional 2](controller-cheat_pro2.txt)
- [Densha de GO! Professional 2 (Taito Best)](controller-cheat_pro2best.txt)
- [Densha de GO! Final](controller-cheat_final.txt)
There are also cheat codes available for games in the **Train Simulator** series, emulating a Multi Train Controller (MTC):
- [Train Simulator: Midosuji Line](controller-cheat_midosuji.txt)
- [Train Simulator + Densha de GO!](controller-cheat_tsddgo.txt)
For retail discs, the codes can be loaded with [ps2rd](https://github.com/mlafeldt/ps2rd) or [Cheat Device](https://github.com/root670/CheatDevicePS2). 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](https://ghidra-sre.org/) and the [ghidra-emotionengine](https://github.com/beardypig/ghidra-emotionengine) plugin. The format of cheat codes is described [here](https://github.com/root670/CheatDevicePS2/wiki/Code-Types).
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.
```
202D3CAC 00000000 // By default, set number of connected USB devices to 0
D02DBA32 58010001 // If there's a controller connected to P2, run the following 0x58 lines (everything)
502DB9C2 00000002 // Copy button data to 0xFE000
000FE000 00000000
D00FE000 55400050 // If the controller in P2 has UP+DOWN pressed, run the following 0x55 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)
003794C6 00000000 // Clear button data for Type 2 controller
D00FE000 01408000 // A
703794C6 00000002
D00FE000 01404000 // B
703794C6 00000001
D00FE000 01402000 // C
703794C6 00000004
D00FE000 01400002 // D (L3)
703794C6 00000008
D00FE000 01400008 // START
703794C6 00000020
D00FE000 01400001 // SELECT
703794C6 00000010
// D-Pad
D00FE002 010100EF // N
003794C5 00000000
D00FE002 010100CF // NE
003794C5 00000001
D00FE002 010100DF // E
003794C5 00000002
D00FE002 0101009F // SE
003794C5 00000003
D00FE002 010100BF // S
003794C5 00000004
D00FE002 0101003F // SW
003794C5 00000005
D00FE002 0101007F // W
003794C5 00000006
D00FE002 0101006F // NW
003794C5 00000007
D00FE002 010100FF // CENTER
003794C5 00000008
// Power handle
D00FE000 01401000 // P5
003794C3 00000005
D00FE000 01400080 // P4
003794C3 00000004
D00FE000 01401080 // P3
003794C3 00000003
D00FE000 01400020 // P2
003794C3 00000002
D00FE000 01401020 // P1
003794C3 00000001
D00FE000 014000A0 // P0
003794C3 00000000
// Brake handle
700FE000 00300F00 // Bitmask: discard all button data besides the 4 bits for brake notches
D00FE000 01000F00 // EB
003794C2 00000009
D00FE000 01000600 // B8
003794C2 00000008
D00FE000 01000200 // B7
003794C2 00000007
D00FE000 01000D00 // B6
003794C2 00000006
D00FE000 01000900 // B5
003794C2 00000005
D00FE000 01000C00 // B4
003794C2 00000004
D00FE000 01000800 // B3
003794C2 00000003
D00FE000 01000500 // B2
003794C2 00000002
D00FE000 01000100 // B1
003794C2 00000001
D00FE000 01000400 // B0
003794C2 00000000
```
### Memory addresses
| | Professional 2 (Taito Best) | Professional 2 | Ryojōhen | Final | Notes |
|:-----------------------------------|:----------------------------|:---------------|:----------|:---------|:----------------------------------------------------------------------------|
| **USB mascon count (int32)** | 0x2D3CAC | 0x2C852C | 0x24B6DC | 0x2C1464 | |
| **USB mascon model (int32)** | 0x3790F0 | 0x36EAF0 | 0x2F24E0 | 0x3DEA10 | 0x40000202=Type 2 |
| **Type 2 brake notch (byte)** | 0x3794C2 | 0x36EEC2 | 0x2F28C2 | 0x3DF242 | Preprocessed, 0 to 9 |
| **Type 2 power notch (byte)** | 0x3794C3 | 0x36EEC3 | 0x2F28C3 | 0x3DF243 | Preprocessed, 0 to 5 |
| **Type 2 D-pad data (byte)** | 0x3794C5 | 0x36EEC5 | 0x2F28C5 | 0x3DF245 | Raw USB data |
| **Type 2 button data (byte)** | 0x3794C6 | 0x36EEC6 | 0x2F28C6 | 0x3DF246 | Raw USB data |
| **P2 controller connected (byte)** | 0x2DBA32 | 0x2D14F2 | 0x2548F2 | 0x2C8172 | 0x00=Disconnected, 0x01=Connected |
| **P2 controller type (byte)** | 0x2DB9C1 | 0x2D1481 | 0x254881 | 0x2C8101 | 0x41=Digital, 0x73=Dualshock |
| **P2 button input (int16)** | 0x2DB9C2 | 0x2D1482 | 0x254882 | 0x2C8102 | |
| **P2 L-stick input (int16)** | 0x2DB9C6 | 0x2D1486 | 0x254886 | 0x2C8106 | |
| **P1 button input (int16)** | 0x2DBAC2 | 0x2D1582 | 0x254982 | 0x2C8202 | |
| **ASM patch** | 0x12BDC0 | 0x12CB60 | 0x135B90 | 0x148928 | Leftover game code binds the C button to the horn and needs to be disabled. |

View file

@ -0,0 +1,5 @@
---
title: "Two handle controller (Sony PlayStation)"
---
{{% controller-page "slph00051" %}}

View file

@ -0,0 +1,5 @@
---
title: "One handle controller (Sony PlayStation)"
---
{{% controller-page "tcpp20001" %}}

View file

@ -0,0 +1,5 @@
---
title: "Mamecon (Sony PlayStation)"
---
{{% controller-page "tcpp20002" %}}

View file

@ -14,289 +14,3 @@ The information in this section applies to the following controllers:
- **TCPP-20014:** Ryojōhen controller (Sony PlayStation 2)
- **MTC:** Multi Train Controller (Sony PlayStation 2)
- **ZKNS-001:** one-handle controller (Nintendo Switch)
### DGC-255
This controller has one handle (5 power notches and 8+emergency brake notches), a D-Pad and 6 buttons (Select, Start, A, B, C, D).
Internally, it is a HID-compliant joystick with two axes, 6 buttons and a PoV hat switch (the handle positions are reported via axes).
Besides the PoV hat switch, it reports the same data as a DGOC-44U controller. The games check if the controller has a PoV hat switch to distinguish between a DGC-255 and a DGOC-44U.
### DGOC-44U
This controller has two handles (5 power notches and 8+emergency brake notches) and 6 buttons (Select, Start, A, B, C, D).
Internally, it is a HID-compliant joystick with two axes and 6 buttons (the handle positions are reported via axes).
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | 電車でGO! コントローラ USB版 |
| **Manufacturer** | TAITO |
| **Vendor ID** | 0x0AE4 |
| **Product ID** | 0x0003 |
| **Serial number** | TCPP20009 |
| **USB standard descriptor** | Unavailable |
| **HID report descriptor** | [Link](descriptors/dgoc44u_hid-report-descriptor.txt) |
The controller sends reports to the host (PC) formed by 6 bytes:
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 |
|:------:|:------:|:------:|:-------:|:------:|:------:|
| Brake | Power | Null | Buttons | Null | Null |
The values for the brake notch byte are the following. There are 5 unmarked positions between **B8** and **Emergency**, but unlike classic controllers, they are all report the value for **Emergency**.
| Released | B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | Emergency | Transition |
|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:---------:|:----------:|
| 0x79 | 0x8A | 0x94 | 0x9A | 0xA2 | 0xA8 | 0xAF | 0xB2 | 0xB5 | 0xB9 | 0xFF |
The values for the power notch byte are listed below.
| N | P1 | P2 | P3 | P4 | P5 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x81 | 0x6D | 0x54 | 0x3F | 0x21 | 0x00 | 0xFF |
The button byte uses six bits to represent the state of the physical buttons. **0** means that the button is released and **1** that it is pressed.
| Button 1 | Button 2 | Button 3 | Button 4 | Button 5 | Button 6 |
|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
| B | A | C | D | SELECT | START |
### DRC-184/DYC-288
No details are available regarding internal functioning.
### TCPP-20009/TCPP-20012
This controller has two handles (5 power notches and 8+emergency brake notches), a D-Pad and 6 buttons (Select, Start, A, B, C, D). In addition, it provides a door lamp and a 3.5 mm jack connector to plug a horn pedal. There are two rumble motors, one in each handle.
Internally, it is a HID device with a vendor-specific class.
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | TAITO_DENSYA_CON_T01 |
| **Manufacturer** | TAITO |
| **Vendor ID** | 0x0AE4 |
| **Product ID** | 0x0004 |
| **Serial number** | TCPP20010 |
| **USB standard descriptor** | [Link](descriptors/tcpp20009_standard-descriptor.txt) |
| **HID report descriptor** | Unavailable |
#### Input
The controller sends reports to the host (PS2) formed by 6 bytes:
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 |
|:------:|:------:|:------:|:------:|:------:|:-------:|
| 0x01 | Brake | Power | Pedal | D-Pad | Buttons |
The values for the brake notch byte are the following.
| Released | B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | Emergency | Transition |
|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:---------:|:----------:|
| 0x79 | 0x8A | 0x94 | 0x9A | 0xA2 | 0xA8 | 0xAF | 0xB2 | 0xB5 | 0xB9 | 0xFF |
The values for the power notch byte are listed below.
| N | P1 | P2 | P3 | P4 | P5 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x81 | 0x6D | 0x54 | 0x3F | 0x21 | 0x00 | 0xFF |
The pedal byte has two possible values depending on the state of the pedal.
| Released | Pressed |
|:--------:|:-------:|
| 0xFF | 0x00 |
The D-pad byte represents the state of the arrow buttons. If two opposite directions are pressed simultaneously, the result is **Center** unless a third button is pressed.
| N | NE | E | SE | S | SW | W | NW | None/Center |
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:-----------:|
| 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 |
The button byte uses six bits to represent the state of the physical buttons. **0** means that the button is released and **1** that it is pressed. A bitmask can be used to retrieve the buttons.
| Button 1 | Button 2 | Button 3 | Button 4 | Button 5 | Button 6 |
|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
| B | A | C | D | SELECT | START |
#### Output
The controller supports receiving data via a control transfer to turn on/off the door lamp and provide rumble. The setup packet is as follows:
| bmRequestType | bRequest | wValue | wIndex | wLength |
|:-------------:|:--------:|:------:|:------:|:-------:|
| 0x40 | 0x09 | 0x0301 | 0x0000 | 0x0002 |
The data sent to the controller follows the structure below.
| Byte 1 | Byte 2 |
|:------:|:--------:|
| Status | Function |
* **Status:** defines whether the function specified in byte 2 is **Off** (**0x00**) or **On** (**0x01**).
* **Function:** **0x01** is **Left rumble**, **0x02** is **Right rumble**, **0x03** is **Door lamp**.
### TCPP-20011
This controller has two handles (13 power notches and 7+emergency brake notches), a D-Pad and 6 buttons (Select, Start, A, B, C, D). In addition, it provides a simple display, a door lamp and a 3.5 mm jack connector to plug a horn pedal. There are two rumble motors, one in each handle.
Internally, it is a HID device with a vendor-specific class.
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | TAITO_DENSYA_CON_T02 |
| **Manufacturer** | TAITO |
| **Vendor ID** | 0x0AE4 |
| **Product ID** | 0x0005 |
| **Serial number** | TCPP20011 |
| **USB standard descriptor** | [Link](descriptors/tcpp20011_standard-descriptor.txt) |
| **HID report descriptor** | Unavailable |
#### Input
The controller sends reports to the host (PS2) formed by 6 bytes:
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 |
|:------:|:------:|:------:|:------:|:-------:|:------:|
| Brake | Power | Pedal | D-Pad | Buttons | Null |
The values for the brake notch byte are the following.
| Released | B1 | B2 | B3 | B4 | B5 | B6 | B7 | Emergency | Transition |
|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:---------:|:----------:|
| 0x1C | 0x38 | 0x54 | 0x70 | 0x8B | 0xA7 | 0xC3 | 0xDF | 0xFB | 0xFF |
The values for the power notch byte are listed below.
| N | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P11 | P12 | P13 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x12 | 0x24 | 0x36 | 0x48 | 0x5A | 0x6C | 0x7E | 0x90 | 0xA2 | 0xB4 | 0xC6 | 0xD7 | 0xE9 | 0xFB | 0xFF |
The pedal byte has two possible values depending on the state of the pedal.
| Released | Pressed |
|:--------:|:-------:|
| 0xFF | 0x00 |
The D-pad byte represents the state of the arrow buttons. If two opposite directions are pressed simultaneously, the result is **Center** unless a third button is pressed.
| N | NE | E | SE | S | SW | W | NW | None/Center |
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:-----------:|
| 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 |
The button byte uses six bits to represent the state of the physical buttons. **0** means that the button is released and **1** that it is pressed. A bitmask can be used to retrieve the buttons.
| Button 1 | Button 2 | Button 3 | Button 4 | Button 5 | Button 6 |
|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
| D | C | B | A | SELECT | START |
#### Output
The controller supports receiving data via a control transfer to update the screen, turn on/off the door lamp and provide rumble. The setup packet is as follows:
| bmRequestType | bRequest | wValue | wIndex | wLength |
|:-------------:|:--------:|:------:|:------:|:-------:|
| 0x40 | 0x09 | 0x0301 | 0x0000 | 0x0008 |
The data sent to the controller follows the structure below.
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Bytes 5-6 | Bytes 7-8 |
|:-----------:|:-----------:|:--------------------------:|:-----------:|:-----------:|:---------:|
| Left rumble | Right rumble| Door lamp + Limit approach | Speed gauge | Speedometer | ATC limit |
* **Left/right rumble:** **0x00** is **Off**, **0x01** is **On**.
* **Door lamp:** **0x0?** is **Off**, **0x8?** is **On**.
* **Limit approach:** values between **0x?0** and **0x?A** representing the number of LEDs lit above the speedometer. In-game, these mark the 10 km/h right below the speed limit.
* **Speed gauge:** values between **0x00** and **0x16** representing the number of LEDs lit on the speed gauge. LED #23 cannot be lit. In-game, these mark 15 km/h increments in the current speed, with one lit when speed is 1-15 km/h, two when 16-30 km/h, etc.
* **Speedometer:** values between **0x0000** and **0x0999** representing the current speed. Values are encoded with **BCD 8421** (i.e. **120 km/h** should be represented as **0x0120**, NOT **0x0078**).
* **ATC limit:** values between **0x0000** and **0x0999** representing the ATC speed limit. Values are encoded with **BCD 8421** (i.e. **120 km/h** should be represented as **0x0120**, NOT **0x0078**).
Multi-byte values should be stored in **Little Endian**.
### TCPP-20014
This controller has two handles (4 power notches and an analogue brake handle with three areas), a D-Pad and 7 buttons (Select, Start, Horn, Announce, Camera, Left doors, Right doors). In addition, it provides a 3.5 mm jack connector to plug a horn pedal.
Internally, it is a HID device with a vendor-specific class.
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | TAITO_DENSYA_CON_T03 |
| **Manufacturer** | TAITO |
| **Vendor ID** | 0x0AE4 |
| **Product ID** | 0x0007 |
| **Serial number** | TCPP20014 |
| **USB standard descriptor** | [Link](descriptors/tcpp20014_standard-descriptor.txt) |
| **HID report descriptor** | Unavailable |
#### Input
The controller sends reports to the host (PS2) formed by 8 bytes:
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Bytes 6-8 |
|:------:|:------:|:------:|:------:|:-------:|:---------:|
| Brake | Power | Pedal | D-Pad | Buttons | Unused |
Unlike traditional controllers, the brake handle is analogue and the brake byte reflects the position of the handle precisely. There are three areas with the ranges listed below, plus the emergency notch.
| Reduce pressure | Keep pressure | Increase pressure | Emergency |
|:---------------:|:-------------:|:-----------------:|:---------:|
| 0x23-0x64 | 0x65-0x89 | 0x8A-0xD6 | 0xD7 |
When using the controller with **Densha de GO! Professional 2** or **Densha de GO! Final**, the brake handle is interpreted as having 6 brake notches + emergency. The aproximate byte range for each notch is listed below (taken from **Densha de GO! Professional 2**).
| Released | B1 | B2 | B3 | B4 | B5 | B6 | Emergency |
|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|
| 0x23-0x2A | 0x2B-0x3C | 0x3D-0x4E | 0x4F-0x63 | 0x64-0x8A | 0x8B-0xB0 | 0xB1-0xD6 | 0xD7 |
The values for the power notch byte are listed below.
| N | P1 | P2 | P3 | P4 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x00 | 0x3C | 0x78 | 0xB4 | 0xF0 | 0xFF |
The pedal byte has two possible values depending on the state of the pedal.
| Released | Pressed |
|:--------:|:-------:|
| 0xFF | 0x00 |
The D-pad byte represents the state of the arrow buttons. If two opposite directions are pressed simultaneously, the result is **Center** unless a third button is pressed.
| N | NE | E | SE | S | SW | W | NW | None/Center |
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:-----------:|
| 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 |
The button byte uses seven bits to represent the state of the physical buttons. **0** means that the button is released and **1** that it is pressed. A bitmask can be used to retrieve the buttons.
| Button 1 | Button 2 | Button 3 | Button 4 | Button 5 | Button 6 | Button 7 |
|:--------:|:--------:|:--------:|:-----------:|:----------:|:--------:|:--------:|
| Horn | Announce | Camera | Right doors | Left doors | SELECT | START |
### MTC
No details are available regarding internal functioning.
### ZKNS-001
This controller has one handle (5 power notches and 8+emergency brake notches) and 16 buttons (the same as a Nintendo Switch Pro Controller, except the stick buttons).
Internally, it is a HID-compliant joystick mimicking a Nintendo Switch Pro Controller. The stick buttons and the right stick are unused, and only the Y axis of the left stick is used.
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | One Handle MasCon for Nintendo Switch |
| **Manufacturer** | *None* |
| **Vendor ID** | 0x0F0D |
| **Product ID** | 0x00C1 |
| **Serial number** | *None* |
| **USB standard descriptor** | [Link](descriptors/zkns001_standard-descriptor.txt) |
| **HID report descriptor** | [Link](descriptors/zkns001_hid-report-descriptor.txt) |
The power/brake handle notches are reported in the Y axis of the left stick. There are no transition values between notches. In addition, when the handle is set to **Emergency**, **ZL** is pressed.
| Emergency | B8 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | N | P1 | P2 | P3 | P4 | P5 |
|:---------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
| 0x00 | 0x05 | 0x13 | 0x20 | 0x2E | 0x3C | 0x49 | 0x57 | 0x65 | 0x80 | 0x9F | 0xB7 | 0xCE | 0xE6 | 0xFF |

View file

@ -0,0 +1,11 @@
---
title: "One handle controller (PC)"
---
{{% controller-page "dgc255" %}}
This controller has one handle (5 power notches and 8+emergency brake notches), a D-Pad and 6 buttons (Select, Start, A, B, C, D).
Internally, it is a HID-compliant joystick with two axes, 6 buttons and a PoV hat switch (the handle positions are reported via axes).
Besides the PoV hat switch, it reports the same data as a DGOC-44U controller. The games check if the controller has a PoV hat switch to distinguish between a DGC-255 and a DGOC-44U.

View file

@ -0,0 +1,43 @@
---
title: "Two handle controller (PC)"
---
{{% controller-page "dgoc44u" %}}
This controller has two handles (5 power notches and 8+emergency brake notches) and 6 buttons (Select, Start, A, B, C, D).
Internally, it is a HID-compliant joystick with two axes and 6 buttons (the handle positions are reported via axes).
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | 電車でGO! コントローラ USB版 |
| **Manufacturer** | TAITO |
| **Vendor ID** | 0x0AE4 |
| **Product ID** | 0x0003 |
| **Serial number** | TCPP20009 |
| **USB standard descriptor** | Unavailable |
| **HID report descriptor** | [Link](/controllers/usb/descriptors/dgoc44u_hid-report-descriptor.txt) |
The controller sends reports to the host (PC) formed by 6 bytes:
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 |
|:------:|:------:|:------:|:-------:|:------:|:------:|
| Brake | Power | Null | Buttons | Null | Null |
The values for the brake notch byte are the following. There are 5 unmarked positions between **B8** and **Emergency**, but unlike classic controllers, they are all report the value for **Emergency**.
| Released | B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | Emergency | Transition |
|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:---------:|:----------:|
| 0x79 | 0x8A | 0x94 | 0x9A | 0xA2 | 0xA8 | 0xAF | 0xB2 | 0xB5 | 0xB9 | 0xFF |
The values for the power notch byte are listed below.
| N | P1 | P2 | P3 | P4 | P5 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x81 | 0x6D | 0x54 | 0x3F | 0x21 | 0x00 | 0xFF |
The button byte uses six bits to represent the state of the physical buttons. **0** means that the button is released and **1** that it is pressed.
| Button 1 | Button 2 | Button 3 | Button 4 | Button 5 | Button 6 |
|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
| B | A | C | D | SELECT | START |

View file

@ -0,0 +1,7 @@
---
title: "Ryojōhen controller (PC)"
---
{{% controller-page "dyc288" %}}
No details are available regarding internal functioning.

View file

@ -0,0 +1,7 @@
---
title: "Sangying one handle controller (PC)"
---
{{% controller-page "ohcpc01" %}}
No details are available regarding internal functioning.

View file

@ -0,0 +1,7 @@
---
title: "Multi Train Controller (Sony PlayStation 2)"
---
{{% controller-page "sotp031201" %}}
No details are available regarding internal functioning.

View file

@ -0,0 +1,74 @@
---
title: 'Two handle controller "Type 2" (Sony PlayStation 2)'
---
{{% controller-page "tcpp20009" %}}
This controller has two handles (5 power notches and 8+emergency brake notches), a D-Pad and 6 buttons (Select, Start, A, B, C, D). In addition, it provides a door lamp and a 3.5 mm jack connector to plug a horn pedal. There are two rumble motors, one in each handle.
Internally, it is a HID device with a vendor-specific class.
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | TAITO_DENSYA_CON_T01 |
| **Manufacturer** | TAITO |
| **Vendor ID** | 0x0AE4 |
| **Product ID** | 0x0004 |
| **Serial number** | TCPP20010 |
| **USB standard descriptor** | [Link](/controllers/usb/descriptors/tcpp20009_standard-descriptor.txt) |
| **HID report descriptor** | Unavailable |
### Input
The controller sends reports to the host (PS2) formed by 6 bytes:
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 |
|:------:|:------:|:------:|:------:|:------:|:-------:|
| 0x01 | Brake | Power | Pedal | D-Pad | Buttons |
The values for the brake notch byte are the following.
| Released | B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | Emergency | Transition |
|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:---------:|:----------:|
| 0x79 | 0x8A | 0x94 | 0x9A | 0xA2 | 0xA8 | 0xAF | 0xB2 | 0xB5 | 0xB9 | 0xFF |
The values for the power notch byte are listed below.
| N | P1 | P2 | P3 | P4 | P5 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x81 | 0x6D | 0x54 | 0x3F | 0x21 | 0x00 | 0xFF |
The pedal byte has two possible values depending on the state of the pedal.
| Released | Pressed |
|:--------:|:-------:|
| 0xFF | 0x00 |
The D-pad byte represents the state of the arrow buttons. If two opposite directions are pressed simultaneously, the result is **Center** unless a third button is pressed.
| N | NE | E | SE | S | SW | W | NW | None/Center |
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:-----------:|
| 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 |
The button byte uses six bits to represent the state of the physical buttons. **0** means that the button is released and **1** that it is pressed. A bitmask can be used to retrieve the buttons.
| Button 1 | Button 2 | Button 3 | Button 4 | Button 5 | Button 6 |
|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
| B | A | C | D | SELECT | START |
### Output
The controller supports receiving data via a control transfer to turn on/off the door lamp and provide rumble. The setup packet is as follows:
| bmRequestType | bRequest | wValue | wIndex | wLength |
|:-------------:|:--------:|:------:|:------:|:-------:|
| 0x40 | 0x09 | 0x0301 | 0x0000 | 0x0002 |
The data sent to the controller follows the structure below.
| Byte 1 | Byte 2 |
|:------:|:--------:|
| Status | Function |
* **Status:** defines whether the function specified in byte 2 is **Off** (**0x00**) or **On** (**0x01**).
* **Function:** **0x01** is **Left rumble**, **0x02** is **Right rumble**, **0x03** is **Door lamp**.

View file

@ -0,0 +1,80 @@
---
title: "Shinkansen controller (Sony PlayStation 2)"
---
{{% controller-page "tcpp20011" %}}
This controller has two handles (13 power notches and 7+emergency brake notches), a D-Pad and 6 buttons (Select, Start, A, B, C, D). In addition, it provides a simple display, a door lamp and a 3.5 mm jack connector to plug a horn pedal. There are two rumble motors, one in each handle.
Internally, it is a HID device with a vendor-specific class.
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | TAITO_DENSYA_CON_T02 |
| **Manufacturer** | TAITO |
| **Vendor ID** | 0x0AE4 |
| **Product ID** | 0x0005 |
| **Serial number** | TCPP20011 |
| **USB standard descriptor** | [Link](/controllers/usb/descriptors/tcpp20011_standard-descriptor.txt) |
| **HID report descriptor** | Unavailable |
### Input
The controller sends reports to the host (PS2) formed by 6 bytes:
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 |
|:------:|:------:|:------:|:------:|:-------:|:------:|
| Brake | Power | Pedal | D-Pad | Buttons | Null |
The values for the brake notch byte are the following.
| Released | B1 | B2 | B3 | B4 | B5 | B6 | B7 | Emergency | Transition |
|:--------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:---------:|:----------:|
| 0x1C | 0x38 | 0x54 | 0x70 | 0x8B | 0xA7 | 0xC3 | 0xDF | 0xFB | 0xFF |
The values for the power notch byte are listed below.
| N | P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P11 | P12 | P13 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x12 | 0x24 | 0x36 | 0x48 | 0x5A | 0x6C | 0x7E | 0x90 | 0xA2 | 0xB4 | 0xC6 | 0xD7 | 0xE9 | 0xFB | 0xFF |
The pedal byte has two possible values depending on the state of the pedal.
| Released | Pressed |
|:--------:|:-------:|
| 0xFF | 0x00 |
The D-pad byte represents the state of the arrow buttons. If two opposite directions are pressed simultaneously, the result is **Center** unless a third button is pressed.
| N | NE | E | SE | S | SW | W | NW | None/Center |
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:-----------:|
| 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 |
The button byte uses six bits to represent the state of the physical buttons. **0** means that the button is released and **1** that it is pressed. A bitmask can be used to retrieve the buttons.
| Button 1 | Button 2 | Button 3 | Button 4 | Button 5 | Button 6 |
|:--------:|:--------:|:--------:|:--------:|:--------:|:--------:|
| D | C | B | A | SELECT | START |
### Output
The controller supports receiving data via a control transfer to update the screen, turn on/off the door lamp and provide rumble. The setup packet is as follows:
| bmRequestType | bRequest | wValue | wIndex | wLength |
|:-------------:|:--------:|:------:|:------:|:-------:|
| 0x40 | 0x09 | 0x0301 | 0x0000 | 0x0008 |
The data sent to the controller follows the structure below.
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Bytes 5-6 | Bytes 7-8 |
|:-----------:|:-----------:|:--------------------------:|:-----------:|:-----------:|:---------:|
| Left rumble | Right rumble| Door lamp + Limit approach | Speed gauge | Speedometer | ATC limit |
* **Left/right rumble:** **0x00** is **Off**, **0x01** is **On**.
* **Door lamp:** **0x0?** is **Off**, **0x8?** is **On**.
* **Limit approach:** values between **0x?0** and **0x?A** representing the number of LEDs lit above the speedometer. In-game, these mark the 10 km/h right below the speed limit.
* **Speed gauge:** values between **0x00** and **0x16** representing the number of LEDs lit on the speed gauge. LED #23 cannot be lit. In-game, these mark 15 km/h increments in the current speed, with one lit when speed is 1-15 km/h, two when 16-30 km/h, etc.
* **Speedometer:** values between **0x0000** and **0x0999** representing the current speed. Values are encoded with **BCD 8421** (i.e. **120 km/h** should be represented as **0x0120**, NOT **0x0078**).
* **ATC limit:** values between **0x0000** and **0x0999** representing the ATC speed limit. Values are encoded with **BCD 8421** (i.e. **120 km/h** should be represented as **0x0120**, NOT **0x0078**).
Multi-byte values should be stored in **Little Endian**.

View file

@ -0,0 +1,63 @@
---
title: "Ryojōhen controller (Sony PlayStation 2)"
---
{{% controller-page "tcpp20014" %}}
This controller has two handles (4 power notches and an analogue brake handle with three areas), a D-Pad and 7 buttons (Select, Start, Horn, Announce, Camera, Left doors, Right doors). In addition, it provides a 3.5 mm jack connector to plug a horn pedal.
Internally, it is a HID device with a vendor-specific class.
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | TAITO_DENSYA_CON_T03 |
| **Manufacturer** | TAITO |
| **Vendor ID** | 0x0AE4 |
| **Product ID** | 0x0007 |
| **Serial number** | TCPP20014 |
| **USB standard descriptor** | [Link](/controllers/usb/descriptors/tcpp20014_standard-descriptor.txt) |
| **HID report descriptor** | Unavailable |
### Input
The controller sends reports to the host (PS2) formed by 8 bytes:
| Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Bytes 6-8 |
|:------:|:------:|:------:|:------:|:-------:|:---------:|
| Brake | Power | Pedal | D-Pad | Buttons | Unused |
Unlike traditional controllers, the brake handle is analogue and the brake byte reflects the position of the handle precisely. There are three areas with the ranges listed below, plus the emergency notch.
| Reduce pressure | Keep pressure | Increase pressure | Emergency |
|:---------------:|:-------------:|:-----------------:|:---------:|
| 0x23-0x64 | 0x65-0x89 | 0x8A-0xD6 | 0xD7 |
When using the controller with **Densha de GO! Professional 2** or **Densha de GO! Final**, the brake handle is interpreted as having 6 brake notches + emergency. The aproximate byte range for each notch is listed below (taken from **Densha de GO! Professional 2**).
| Released | B1 | B2 | B3 | B4 | B5 | B6 | Emergency |
|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|
| 0x23-0x2A | 0x2B-0x3C | 0x3D-0x4E | 0x4F-0x63 | 0x64-0x8A | 0x8B-0xB0 | 0xB1-0xD6 | 0xD7 |
The values for the power notch byte are listed below.
| N | P1 | P2 | P3 | P4 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x00 | 0x3C | 0x78 | 0xB4 | 0xF0 | 0xFF |
The pedal byte has two possible values depending on the state of the pedal.
| Released | Pressed |
|:--------:|:-------:|
| 0xFF | 0x00 |
The D-pad byte represents the state of the arrow buttons. If two opposite directions are pressed simultaneously, the result is **Center** unless a third button is pressed.
| N | NE | E | SE | S | SW | W | NW | None/Center |
|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:-----------:|
| 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x05 | 0x06 | 0x07 | 0x08 |
The button byte uses seven bits to represent the state of the physical buttons. **0** means that the button is released and **1** that it is pressed. A bitmask can be used to retrieve the buttons.
| Button 1 | Button 2 | Button 3 | Button 4 | Button 5 | Button 6 | Button 7 |
|:--------:|:--------:|:--------:|:-----------:|:----------:|:--------:|:--------:|
| Horn | Announce | Camera | Right doors | Left doors | SELECT | START |

View file

@ -0,0 +1,23 @@
---
title: "One handle controller (Nintendo Switch)"
---
{{% controller-page "zkns001" %}}
This controller has one handle (5 power notches and 8+emergency brake notches) and 16 buttons (the same as a Nintendo Switch Pro Controller, except the stick buttons). Internally, it is a HID-compliant joystick mimicking a Nintendo Switch Pro Controller. The stick buttons and the right stick are unused, and only the Y axis of the left stick is used.
| | |
|-----------------------------|-------------------------------------------|
| **Product name** | One Handle MasCon for Nintendo Switch |
| **Manufacturer** | *None* |
| **Vendor ID** | 0x0F0D |
| **Product ID** | 0x00C1 |
| **Serial number** | *None* |
| **USB standard descriptor** | [Link](/controllers/usb/descriptors/zkns001_standard-descriptor.txt) |
| **HID report descriptor** | [Link](/controllers/usb/descriptors/zkns001_hid-report-descriptor.txt) |
The power/brake handle notches are reported in the Y axis of the left stick. There are no transition values between notches. In addition, when the handle is set to **Emergency**, **ZL** is pressed.
| Emergency | B8 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | N | P1 | P2 | P3 | P4 | P5 |
|:---------:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|:----:|
| 0x00 | 0x05 | 0x13 | 0x20 | 0x2E | 0x3C | 0x49 | 0x57 | 0x65 | 0x80 | 0x9F | 0xB7 | 0xCE | 0xE6 | 0xFF |

View file

@ -15,6 +15,7 @@ dyc288:
date: 2005-12-01
code: "DYC-288"
ref: "/controllers/usb/dyc288"
notes: "Also packaged with serial code DRC-184."
ohcpc01:
name: "Sangying one handle controller (PC)"
@ -69,6 +70,7 @@ tcpp20009:
date: 2001-03-15
code: "TCPP-20009"
ref: "/controllers/usb/tcpp20009"
notes: "Also available in purple skeleton colour (TCPP-20012)."
tcpp20011:
name: "Shinkansen controller (Sony PlayStation 2)"
@ -93,4 +95,5 @@ zkns001:
name: "One handle controller (Nintendo Switch)"
date: 2021-08-05
code: "ZKNS-001"
image: "zkns001.jpg"
ref: "/controllers/usb/zkns001"

View file

@ -62,13 +62,34 @@ pc_bve:
name: "BVE Trainsim"
date: 2011-09-05
url: "https://bvets.net/en/"
notes: "Compatibility applies to version 5 or later"
notes: "Compatibility applies to version 5 or later."
controllers:
- model: tcpp20002
notes: "Requires USB adapter."
- model: sotp031201
- model: zkns001
- model: dgc255
- model: tcpp20001
notes: "Requires USB adapter."
- model: dyc288
- model: tcpp20014
- model: ohcpc01
- model: tcpp20003
notes: "Requires USB adapter."
- model: dgoc44u
- model: tcpp20004
notes: "Requires USB adapter."
- model: slph00051
notes: "Requires USB adapter."
- model: tc5175290
notes: "Requires USB adapter."
- model: tcpp20009
pc_openbve:
name: "OpenBVE"
date: 2009-03-23
url: "https://openbve-project.net/"
notes: "Controllers are supported on version 1.8.2.0 or later via built-in input plugin."
notes: "Controllers are supported on version 1.8.2.0 or later via built-in input plugins."
controllers:
- model: tcpp20002
notes: "Requires USB adapter and calibration."

View file

@ -2,7 +2,7 @@
<table>
<tr>
<td rowspan="4" id="image">{{ if (index .Site.Data.controllers (.Get 0)).image}}<img src="/images/controllers/{{ (index .Site.Data.controllers (.Get 0)).image }}"/>{{ end }}</td>
<td rowspan="0" id="image">{{ if (index .Site.Data.controllers (.Get 0)).image}}<img src="/images/controllers/{{ (index .Site.Data.controllers (.Get 0)).image }}"/>{{ end }}</td>
<td><strong>Name</strong></td>
<td>{{ (index .Site.Data.controllers (.Get 0)).name }}</td>
</tr>
@ -20,7 +20,7 @@
</tr>
</table>
## Supported software
## Supported software (WIP)
<table>
<tr>

View file

@ -2,7 +2,7 @@
<table>
<tr>
<td rowspan="5" id="image">{{ if (index .Site.Data.software (.Get 0)).image}}<img src="/images/software/{{ (index .Site.Data.software (.Get 0)).image }}"/>{{ end }}</td>
<td rowspan="0" id="image">{{ if (index .Site.Data.software (.Get 0)).image}}<img src="/images/software/{{ (index .Site.Data.software (.Get 0)).image }}"/>{{ end }}</td>
<td><strong>Name</strong></td>
<td>{{ (index .Site.Data.software (.Get 0)).name }}</td>
</tr>

View file

@ -1,5 +1,6 @@
#body .flex-block-wrapper {
max-width: 100%;
min-width: 100%;
}
.flex-block-wrapper table {

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB