diff --git a/usb/README.md b/usb/README.md index 3fd887f..597aa72 100644 --- a/usb/README.md +++ b/usb/README.md @@ -26,15 +26,15 @@ This controller has two handles (5 power notches and 8+emergency brake notches) 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 | -| **Standard descriptor** | Unavailable | -| **HID report descriptor** | [Link](dgoc44u_hid-report-descriptor.txt) | +| | | +|-----------------------------|-------------------------------------------| +| **Product name** | 電車でGO! コントローラ USB版 | +| **Manufacturer** | TAITO | +| **Vendor ID** | 0x0AE4 | +| **Product ID** | 0x0003 | +| **Serial number** | TCPP20009 | +| **USB standard descriptor** | Unavailable | +| **HID report descriptor** | [Link](dgoc44u_hid-report-descriptor.txt) | The controller sends reports to the host (PC) formed by 6 bytes: @@ -70,15 +70,15 @@ This controller has two handles (5 power notches and 8+emergency brake notches), 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 | -| **Standard descriptor** | [Link](tcpp20009_standard-descriptor.txt) | -| **HID report descriptor** | Unavailable | +| | | +|-----------------------------|-------------------------------------------| +| **Product name** | TAITO_DENSYA_CON_T01 | +| **Manufacturer** | TAITO | +| **Vendor ID** | 0x0AE4 | +| **Product ID** | 0x0004 | +| **Serial number** | TCPP20010 | +| **USB standard descriptor** | [Link](tcpp20009_standard-descriptor.txt) | +| **HID report descriptor** | Unavailable | #### Input @@ -141,15 +141,15 @@ This controller has two handles (13 power notches and 7+emergency brake notches) 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 | -| **Standard descriptor** | [Link](tcpp20011_standard-descriptor.txt) | -| **HID report descriptor** | Unavailable | +| | | +|-----------------------------|-------------------------------------------| +| **Product name** | TAITO_DENSYA_CON_T02 | +| **Manufacturer** | TAITO | +| **Vendor ID** | 0x0AE4 | +| **Product ID** | 0x0005 | +| **Serial number** | TCPP20011 | +| **USB standard descriptor** | [Link](tcpp20011_standard-descriptor.txt) | +| **HID report descriptor** | Unavailable | #### Input @@ -218,15 +218,15 @@ This controller has two handles (4 power notches and an analogue brake handle wi 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 | -| **Standard descriptor** | [Link](tcpp20014_standard-descriptor.txt) | -| **HID report descriptor** | Unavailable | +| | | +|-----------------------------|-------------------------------------------| +| **Product name** | TAITO_DENSYA_CON_T03 | +| **Manufacturer** | TAITO | +| **Vendor ID** | 0x0AE4 | +| **Product ID** | 0x0007 | +| **Serial number** | TCPP20014 | +| **USB standard descriptor** | [Link](tcpp20014_standard-descriptor.txt) | +| **HID report descriptor** | Unavailable | #### Input @@ -278,7 +278,25 @@ No details are available regarding internal functioning. ### ZKNS-001 -No details are available regarding internal functioning. +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](zkns001_standard-descriptor.txt) | +| **HID report descriptor** | [Link](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 | ## Acknowledgements diff --git a/usb/zkns001_hid-report-descriptor.txt b/usb/zkns001_hid-report-descriptor.txt new file mode 100644 index 0000000..ca57a6f --- /dev/null +++ b/usb/zkns001_hid-report-descriptor.txt @@ -0,0 +1,47 @@ +0x05, 0x01, // Usage Page (Generic Desktop Ctrls) +0x09, 0x05, // Usage (Game Pad) +0xA1, 0x01, // Collection (Application) +0x15, 0x00, // Logical Minimum (0) +0x25, 0x01, // Logical Maximum (1) +0x35, 0x00, // Physical Minimum (0) +0x45, 0x01, // Physical Maximum (1) +0x75, 0x01, // Report Size (1) +0x95, 0x0E, // Report Count (14) +0x05, 0x09, // Usage Page (Button) +0x19, 0x01, // Usage Minimum (0x01) +0x29, 0x0E, // Usage Maximum (0x0E) +0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) +0x95, 0x02, // Report Count (2) +0x81, 0x01, // Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) +0x05, 0x01, // Usage Page (Generic Desktop Ctrls) +0x25, 0x07, // Logical Maximum (7) +0x46, 0x3B, 0x01, // Physical Maximum (315) +0x75, 0x04, // Report Size (4) +0x95, 0x01, // Report Count (1) +0x65, 0x14, // Unit (System: English Rotation, Length: Centimeter) +0x09, 0x39, // Usage (Hat switch) +0x81, 0x42, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,Null State) +0x65, 0x00, // Unit (None) +0x95, 0x01, // Report Count (1) +0x81, 0x01, // Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) +0x26, 0xFF, 0x00, // Logical Maximum (255) +0x46, 0xFF, 0x00, // Physical Maximum (255) +0x09, 0x30, // Usage (X) +0x09, 0x31, // Usage (Y) +0x09, 0x32, // Usage (Z) +0x09, 0x35, // Usage (Rz) +0x75, 0x08, // Report Size (8) +0x95, 0x04, // Report Count (4) +0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) +0x75, 0x08, // Report Size (8) +0x95, 0x01, // Report Count (1) +0x81, 0x01, // Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) +0x0A, 0x4F, 0x48, // Usage (0x484F) +0x75, 0x08, // Report Size (8) +0x95, 0x08, // Report Count (8) +0xB1, 0x02, // Feature (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile) +0x0A, 0x4F, 0x48, // Usage (0x484F) +0x91, 0x02, // Output (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile) +0xC0, // End Collection + +// 94 bytes diff --git a/usb/zkns001_standard-descriptor.txt b/usb/zkns001_standard-descriptor.txt new file mode 100644 index 0000000..5812c5c --- /dev/null +++ b/usb/zkns001_standard-descriptor.txt @@ -0,0 +1,57 @@ +0x12, // bLength +0x01, // bDescriptorType (Device) +0x00, 0x02, // bcdUSB 2.00 +0x00, // bDeviceClass (Use class information in the Interface Descriptors) +0x00, // bDeviceSubClass +0x00, // bDeviceProtocol +0x40, // bMaxPacketSize0 64 +0x0D, 0x0F, // idVendor 0x0F0D +0xC1, 0x00, // idProduct 0xC1 +0x06, 0x01, // bcdDevice 2.06 +0x00, // iManufacturer (String Index) +0x02, // iProduct (String Index) "One Handle MasCon for Nintendo Switch" +0x00, // iSerialNumber (String Index) +0x01, // bNumConfigurations 1 + +0x09, // bLength +0x02, // bDescriptorType (Configuration) +0x29, 0x00, // wTotalLength 41 +0x01, // bNumInterfaces 1 +0x01, // bConfigurationValue +0x00, // iConfiguration (String Index) +0x80, // bmAttributes +0xFA, // bMaxPower 500mA + +0x09, // bLength +0x04, // bDescriptorType (Interface) +0x00, // bInterfaceNumber 0 +0x00, // bAlternateSetting +0x02, // bNumEndpoints 2 +0x03, // bInterfaceClass +0x00, // bInterfaceSubClass +0x00, // bInterfaceProtocol +0x00, // iInterface (String Index) + +0x09, // bLength +0x21, // bDescriptorType (HID) +0x11, 0x01, // bcdHID 1.11 +0x00, // bCountryCode +0x01, // bNumDescriptors +0x22, // bDescriptorType[0] (HID) +0x5E, 0x00, // wDescriptorLength[0] 94 + +0x07, // bLength +0x05, // bDescriptorType (Endpoint) +0x02, // bEndpointAddress (OUT/H2D) +0x03, // bmAttributes (Interrupt) +0x40, 0x00, // wMaxPacketSize 64 +0x0A, // bInterval 10 (unit depends on device speed) + +0x07, // bLength +0x05, // bDescriptorType (Endpoint) +0x81, // bEndpointAddress (IN/D2H) +0x03, // bmAttributes (Interrupt) +0x40, 0x00, // wMaxPacketSize 64 +0x0A, // bInterval 10 (unit depends on device speed) + +// 59 bytes