Add Shinkansen controller info

This commit is contained in:
Marc Riera Irigoyen 2021-04-01 22:19:38 +02:00
parent 1bed1bacc5
commit dc5e3be20d
2 changed files with 81 additions and 8 deletions

View file

@ -17,8 +17,8 @@ This documentation is stored in a [GitHub repository](https://github.com/MarcRie
## References
- General information: http://autotraintas.hariko.com
- Microsoft Windows: http://zarala.g2.xrea.com/koneta/dengo/dengo_win.html
- Microsoft Windows: http://typematic.blog.shinobi.jp/%E3%83%97%E3%83%AC%E3%82%B9%E3%83%86%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E5%A4%89%E6%8F%9B%E5%99%A8/%E3%82%A2%E3%83%B3%E3%83%90%E3%83%A9%E3%83%B3%E3%82%B9%E3%81%AE%E9%9B%BB%E8%BB%8A%E3%81%A7go-%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%81%AE%E8%A7%A3%E6%9E%90
- Nintendo 64: https://sites.google.com/site/consoleprotocols/home/nintendo-joy-bus-documentation/n64-specific/train-controller
- Sega Dreamcast: https://modelrail.otenko.com/arduino/arduino-dreamcast-densha-de-go-controller
- General information: <http://autotraintas.hariko.com>
- Microsoft Windows: <http://zarala.g2.xrea.com/koneta/dengo/dengo_win.html>
- Microsoft Windows: <http://typematic.blog.shinobi.jp/%E3%83%97%E3%83%AC%E3%82%B9%E3%83%86%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E5%A4%89%E6%8F%9B%E5%99%A8/%E3%82%A2%E3%83%B3%E3%83%90%E3%83%A9%E3%83%B3%E3%82%B9%E3%81%AE%E9%9B%BB%E8%BB%8A%E3%81%A7go-%E3%82%B3%E3%83%B3%E3%83%88%E3%83%AD%E3%83%BC%E3%83%A9%E3%81%AE%E8%A7%A3%E6%9E%90>
- Nintendo 64: <https://sites.google.com/site/consoleprotocols/home/nintendo-joy-bus-documentation/n64-specific/train-controller>
- Sega Dreamcast: <https://modelrail.otenko.com/arduino/arduino-dreamcast-densha-de-go-controller>

View file

@ -16,7 +16,9 @@ This controller shares most of its behaviour with DGOC-44U, but internal details
### DGOC-44U
This controller is a HID-compliant joystick with two axes and six buttons. You can find its HID descriptor [here](descriptor-dgoc44u.txt).
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 six buttons (the handle positions are reported via axes). You can find its HID descriptor [here](descriptor-dgoc44u.txt).
| | |
|-------------------|---------------------------|
@ -40,7 +42,7 @@ The values for the brake notch byte are the following. There are 5 unmarked posi
The values for the power notch byte are listed below.
| N | B1 | B2 | B3 | B4 | B5 | Transition |
| N | P1 | P2 | P3 | P4 | P5 | Transition |
|:----:|:----:|:----:|:----:|:----:|:----:|:----------:|
| 0x81 | 0x6D | 0x54 | 0x3F | 0x21 | 0x00 | 0xFF |
@ -60,7 +62,78 @@ No details are available regarding internal functioning.
### TCPP-20011
No details are available regarding internal functioning.
This controller has two handles (13 power notches and 7+emergency brake notches), a D-Pad and six 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 |
#### 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 | 0x0002 |
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 **0xA-0xF** are not used (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 **0xA-0xF** are not used (i.e. **120 km/h** should be represented as **0x0120**, NOT **0x0078**.
Multi-byte values should be stored in **Little Endian**.
### TCPP-20014