Difference between revisions of "Xbox Input Devices"

From xboxdevwiki
Jump to: navigation, search
(Document USB Descriptor changes)
(Add Chihiro baseboard)
 
(26 intermediate revisions by 6 users not shown)
Line 9: Line 9:
  
 
=== USB Adapters ===
 
=== USB Adapters ===
The Xbox input devices are USB devices. As such, you can connect a keyboard to the Xbox, or a gamepad to your PC. In fact, Linux already has drivers for the gamepad. In order to preserve Xbox hardware, please do not cut OEM Xbox cables to make an adapter. Decent adapters can be acquired cheaply (~$10 USD ea. on 2017.04.30).                               
+
The Xbox's Input devices are USB devices. As such, you can connect a keyboard to the Xbox, or a gamepad to your PC. In fact, Linux already has drivers for the gamepad. In order to preserve Xbox hardware, please do not cut OEM Xbox cables to make an adapter; decent adapters can be acquired cheaply (~$10 USD ea. on 2017.04.30).                               
  
 
[[File:Xboxmaletousbfemale.png|thumb|right|Wiring diagram to show how male Xbox controller plug maps to standard female USB connector. White cable color is depicted as gray for better visibility. The yellow cable is not connected to the USB side, as it's exclusive to Xbox.]]
 
[[File:Xboxmaletousbfemale.png|thumb|right|Wiring diagram to show how male Xbox controller plug maps to standard female USB connector. White cable color is depicted as gray for better visibility. The yellow cable is not connected to the USB side, as it's exclusive to Xbox.]]
Line 21: Line 21:
 
| Xbox
 
| Xbox
 
| USB-A  
 
| USB-A  
| [https://www.amazon.com/gp/product/B000RT2868 Amazon]
+
| [https://www.amazon.com/gp/product/B000RT2868 Amazon] [https://www.aliexpress.com/item/32948906701.html Aliexpress]
 
|-
 
|-
 
| USB-A
 
| USB-A
 
| Xbox
 
| Xbox
| [https://www.amazon.com/gp/product/B00F52LQHO Amazon]
+
| [https://www.amazon.com/gp/product/B00F52LQHO Amazon] [https://www.aliexpress.com/item/4000452932782.html Aliexpress]
 
|}
 
|}
  
Line 96: Line 96:
 
** 0x02 = Gamepad (Controller-S)
 
** 0x02 = Gamepad (Controller-S)
 
** 0x10 = Steering wheel
 
** 0x10 = Steering wheel
 +
** 0x20 = Arcade Stick
 +
** 0x50 = Light gun
 +
 +
====== bType = 3: Xbox DVD Movie Playback IR Dongle======
 +
 +
* bSubType:
 +
** 0x00
 +
 +
====== bType = 128: Steel Battalion ======
 +
 +
* bSubType:
 +
** 0x01
 +
 +
====== Example XID reports ======
 +
 +
This is an example XID descriptor taken from a Controller-S (VID 0x045E / PID 0x0289).
 +
<pre>
 +
bLength              0x10 (16 bytes)
 +
bDescriptorType      0x42
 +
bcdXid              0x0100 (USB 1.0)
 +
bType                0x01
 +
bSubType            0x02
 +
bMaxInputReportSize  0x14 (20 bytes)
 +
bMaxOutputReportSize 0x06 (6 bytes)
 +
wAlternateProductIds 4 x 0xFFFF
 +
</pre>
 +
 +
This is an example XID descriptor taken from a Steel Battalion controller.
 +
<pre>
 +
bLength              0x10 (16 bytes)
 +
bDescriptorType      0x42
 +
bcdXid              0x0100 (USB 1.0)
 +
bType                0x80
 +
bSubType            0x01
 +
bMaxInputReportSize  0x1A (26 bytes)
 +
bMaxOutputReportSize 0x16 (22 bytes)
 +
wAlternateProductIds 4 x 0xFFFF
 +
</pre>
 +
 +
This is an example XID descriptor taken from an official Microsoft DVD Movie Playback IR dongle.
 +
<pre>
 +
bLength              0x08 (8 bytes)
 +
bDescriptorType      0x42
 +
bcdXid              0x0100 (USB 1.0)
 +
bType                0x03
 +
bSubType            0x00
 +
bMaxInputReportSize  0x06 (6 bytes)
 +
bMaxOutputReportSize 0x00 (0 bytes)
 +
</pre>
  
 
===== GET_CAPABILITIES =====
 
===== GET_CAPABILITIES =====
Line 205: Line 254:
 
|[https://archive.org/details/ST92163 ST 92163/JFL], AT43USB401{{FIXME|Reason=Can't find datasheet}}, [https://web.archive.org/web/20191230174412/https://www.rockbox.org/wiki/pub/Main/DataSheets/TexasInstrumentsLW052ADataSheet.pdf LW052A]
 
|[https://archive.org/details/ST92163 ST 92163/JFL], AT43USB401{{FIXME|Reason=Can't find datasheet}}, [https://web.archive.org/web/20191230174412/https://www.rockbox.org/wiki/pub/Main/DataSheets/TexasInstrumentsLW052ADataSheet.pdf LW052A]
 
|-
 
|-
|Xbox Controller S {{FIXME|Reason=Missing Sticker on sample, name extrapolated from other models}}
+
|Xbox Controller S
|Unknown{{FIXME|Reason=Missing Sticker}}
+
|X08-69873
 
|23-0923B
 
|23-0923B
 
|Minification of "Duke" PCB Design. Has exact same IC's as the Duke, only in an S controller design
 
|Minification of "Duke" PCB Design. Has exact same IC's as the Duke, only in an S controller design
Line 232: Line 281:
 
|X02332-001
 
|X02332-001
 
|Crystal S Controller
 
|Crystal S Controller
 +
|23-0923I
 +
|-
 +
|X09-64240-01
 +
|Transparent Green Controller
 
|23-0923I
 
|23-0923I
 
|-
 
|-
Line 243: Line 296:
 
See https://github.com/xboxdrv/xboxdrv/blob/stable/src/xpad_device.cpp for a list of devices.
 
See https://github.com/xboxdrv/xboxdrv/blob/stable/src/xpad_device.cpp for a list of devices.
  
==== 23-0819B Descriptors ====
+
==== 23-0819B ====
  
 
<pre>
 
<pre>
Line 479: Line 532:
 
|
 
|
 
|}
 
|}
 
Xbox games use the full range from 0x0000 to 0xFFFF for both the left and right actuators.
 
  
 
The Microsoft Controller S will not react to packets which don't have a value of 6 in the <code>length</code> field of the header.
 
The Microsoft Controller S will not react to packets which don't have a value of 6 in the <code>length</code> field of the header.
Line 660: Line 711:
 
</pre>
 
</pre>
  
== Light guns ==
+
== Arcade Sticks ==
  
=== EMS TopGun II ===
+
=== Xbox TECMO Dead or Alive 3 ARCADE Stick Joystick Controller Japan ===
  
''This is an unlicensed / unofficial Xbox accessory.''
+
{{FIXME}}
  
The website for this product can be found at http://www.hkems.com/product/xbox/EMSTopGun2.htm
+
=== Street Fighter 15th Anniversary Edition Arcade Stick ===
  
The gun presents itself as a standard Xbox gamepad. It uses a different USB descriptor for Xbox (X) and the other mode (P).
+
{{FIXME}}
There is no internal hub in this device.
 
  
{| class="wikitable"
+
=== Gamester Xbox Arcade Stick ===
! EMS TopGun II !! Xbox Gamepad !! Notes
 
|-
 
| Stick || {{input-d}} ||
 
|-
 
| Trigger || {{input-a}} || rowspan="4" | Digital only, either 0 or 255
 
|-
 
| Grip || {{input-b}}
 
|-
 
| A || {{input-x}}
 
|-
 
| B || {{input-y}}
 
|-
 
| START || {{input-start}} ||
 
|-
 
| SE/BA || {{input-back}} ||
 
|-
 
| Aim Left / Right || {{input-lx}} || rowspan="2" | Absolute position using the full stick range
 
|-
 
| Aim Up / Down || {{input-ly}}
 
|}
 
  
There is no right thumbstick, thumbstick presses, black/white button or trigger buttons (All of those read constant zeros).
+
{{FIXME}}
  
===== Turbo Mode =====
+
=== Nuby Xbox Fighter Arcade Stick ===
  
* Turbo mode 0 keeps {{input-a}} pressed  while trigger is held
+
{{FIXME}}
* Turbo mode 1 toggles {{input-a}} rapidly while trigger is held
+
 
* Turbo mode 2 toggles {{input-a}} rapidly and once in a while {{input-b}} while trigger is held
+
=== Nuby Xbox Arcade Super Stick ===
 +
 
 +
{{FIXME}}
 +
 
 +
The source image of the box and on device has item<nowiki>#:</nowiki>36020.
 +
 
 +
=== Naki Ultimate Fighting Stick ===
 +
 
 +
{{FIXME}}
  
===== Force Feedback =====
+
[https://www.youtube.com/watch?v=4GphUsTzgds YouTube reviewer] report this joystick to have rumble support.
  
The upper part of the gun is moveable and should push back to simulate recoil (possibly hurting your thumb while you are using the stick).
+
== Light guns ==
I could not get the force feedback working, but I'm sure I've had it working in the past on PC.{{citation needed}}
 
  
==== USB Descriptors ====
+
Light guns use similar input and output reports to standard gamepads. Their bSubType is set to 0x50. They report where they are aimed in place of the left stick coordinates, and an extra bit at offset 3 in their input reports flags whether the light gun is currently pointed at the screen or not. Light guns may not function properly if they are not supplied with a video sync signal (they may not populate their input reports correctly, or even fail to enumerate as USB devices entirely).
  
This is the descriptor in the Xbox mode (X).
+
=== Controller to Xbox ===
  
<pre>
+
20 bytes
Bus 003 Device 016: ID 0b9a:016b 
+
 
Device Descriptor:
+
{| class="wikitable"
  bLength                18
+
!Field
  bDescriptorType        1
+
!Offset (Bytes)
  bcdUSB              1.10
+
!Mask
  bDeviceClass            0
+
!Notes
  bDeviceSubClass        0
+
|-
  bDeviceProtocol        0
+
|{{input-dy+}}
  bMaxPacketSize0        64
+
|2
  idVendor          0x0b9a
+
|0x01
  idProduct          0x016b
+
|
  bcdDevice            4.57
+
|-
  iManufacturer          1 EMS̖E
+
|{{input-dy-}}
  iProduct                2 EMS TopGun
+
|2
  iSerial                0
+
|0x02
  bNumConfigurations      1
+
|
  Configuration Descriptor:
+
|-
    bLength                9
+
|{{input-dx-}}
    bDescriptorType        2
+
|2
    wTotalLength          32
+
|0x04
    bNumInterfaces          1
+
|
    bConfigurationValue    1
+
|-
    iConfiguration          0
+
|{{input-dx+}}
    bmAttributes        0x80
+
|2
      (Bus Powered)
+
|0x08
    MaxPower              100mA
+
|
    Interface Descriptor:
+
|-
      bLength                9
+
|{{input-start}}
      bDescriptorType        4
+
|2
      bInterfaceNumber        0
+
|0x10
      bAlternateSetting      0
+
|
      bNumEndpoints          2
+
|-
      bInterfaceClass        88 Xbox
+
|{{input-back}}
      bInterfaceSubClass    66 Controller
+
|2
      bInterfaceProtocol      0
+
|0x20
      iInterface              0
+
|
      Endpoint Descriptor:
+
|-
        bLength                7
+
|Light visible
        bDescriptorType        5
+
|3
        bEndpointAddress    0x81  EP 1 IN
+
|0x20
        bmAttributes            3
+
|Set to 1 if the gun is pointed to a bright screen, 0 if no light visible.
          Transfer Type            Interrupt
+
|-
          Synch Type              None
+
|Unknown 1
          Usage Type              Data
+
|3
        wMaxPacketSize    0x0040  1x 64 bytes
+
|0x40
        bInterval              4
+
|rowspan="2" | Light guns from different manufacturers include these two bits in their GET_CAPABILITIES reports, but they always seem to read back as 0 in GET_REPORT.
      Endpoint Descriptor:
 
        bLength                7
 
        bDescriptorType        5
 
        bEndpointAddress    0x02  EP 2 OUT
 
        bmAttributes            3
 
          Transfer Type            Interrupt
 
          Synch Type              None
 
          Usage Type              Data
 
        wMaxPacketSize    0x0040  1x 64 bytes
 
        bInterval              8
 
can't get debug descriptor: Resource temporarily unavailable
 
Device Status:    0x0000
 
  (Bus Powered)
 
</pre>
 
 
 
=== Joytech Sharp Shooter ===
 
 
 
''This is an unlicensed / unofficial Xbox accessory.''
 
 
 
The third party light gun from Joytech reports itself as 2 devices and mentions pattent [http://www.google.com/patents/US6287198 US6287198]
 
it came with a detachable viewfinder scope without any magnification. a red dot apears in the viewfinder, its a reflection of a red led, powered by the gun over usb.
 
 
 
model numer: JS-901D
 
 
 
{| class="wikitable"
 
! Joytech Sharp Shooter !! Xbox Gamepad !! Notes
 
 
|-
 
|-
| Stick || {{input-d}} ||
+
|Unknown 2
 +
|3
 +
|0x80
 
|-
 
|-
| Trigger || {{input-a}} || rowspan="6" | Digital only, either 0 or 255 {{citation needed}}
+
|{{input-a}} Trigger
 +
|4
 +
|0xFF
 +
|rowspan="6" | Digital only, either 0 or 255
 
|-
 
|-
| B (Left side) || rowspan="3" | {{input-b}}
+
|{{input-b}}
 +
|5
 +
|0xFF
 
|-
 
|-
| B (Right side)
+
|{{input-x}}
 +
|6
 +
|0xFF
 
|-
 
|-
| B (Magazine button)
+
|{{input-y}}
 +
|7
 +
|0xFF
 
|-
 
|-
| x || {{input-x}}
+
|{{input-black}}
 +
|8
 +
|0xFF
 
|-
 
|-
| y || {{input-y}}
+
|{{input-white}}
 +
|9
 +
|0xFF
 
|-
 
|-
| START || {{input-start}} ||
+
|{{input-lx}}
 +
|12
 +
|0xFFFF
 +
|rowspan="2" | Absolute position using the full stick range.
 +
(0, 0) is the center of the screen and is also reported if the light gun is pointed off-screen.
 
|-
 
|-
| BACK || {{input-back}} ||
+
|{{input-ly}}
 +
|14
 +
|0xFFFF
 +
|}
 +
 
 +
=== Xbox to Controller ===
 +
 
 +
==== Force feedback: wValue: 0x0200, wLength: 6 ====
 +
 
 +
6 bytes
 +
 
 +
{| class="wikitable"
 +
!Field
 +
!Offset (Bytes)
 +
!Mask
 +
!Notes
 
|-
 
|-
| Aim Left / Right || {{input-lx}} || {{citation needed}}
+
|Actuator strength
 +
|2
 +
|0xFFFF
 +
|
 
|-
 
|-
| Aim Up / Down || {{input-ly}} || {{citation needed}}
+
|(Unused)
 +
|4
 +
|0x0000
 +
|
 
|}
 
|}
  
There is no right thumbstick, thumbstick presses, black/white button or trigger buttons {{citation needed}}
+
The 4Gamers-branded gun (which appears to be sold by a number of different manufacturers) only reports it has the left actuator, however it only responds to force feedback output reports for the ''right'' actuator. Games appear to always enable both actuators, whether the controller reports it has both or not.
 +
 
 +
==== Calibration: wValue: 0x0201, wLength: 10 ====
  
===== Fire/Reload Mode =====
+
10 bytes
  
* Normal mode does nothing, normal operation
+
{| class="wikitable"
* Auto reload mode toggles {{input-b}} rapidly to rappidly reload {{citation needed}}
+
!Field
* Auto fire+reload mode toggles {{input-a}} + {{input-b}} rapidly  {{citation needed}}
+
!Offset (Bytes)
 +
!Mask
 +
!Notes
 +
|-
 +
|Center calibration X
 +
|2
 +
|0xFFFF
 +
|rowspan="2"|Gun's reported value subtracted from (0,0)
 +
|-
 +
|Center calibration Y
 +
|4
 +
|0xFFFF
 +
|-
 +
|Top left calibration X
 +
|6
 +
|0xFFFF
 +
|rowspan="2"|Gun's reported value subtracted from (-25000,25000)
 +
|-
 +
|Top left calibration Y
 +
|8
 +
|0xFFFF
 +
|}
 +
 
 +
Light guns are expected to handle their own calibration, i.e. the game will tell the gun the offsets between its reported position and the expected position and then expect the gun to offset and scale its output to compensate. The calibration process runs as follows:
  
==== USB Descriptors ====
+
# The game will first send a calibration report with all four offsets reset to (0, 0), (0, 0) to reset any offsets and scaling.
 +
# The game will now display a target in the centre of the screen and ask you to shoot it. This will tell it how "wrong" the gun is when aimed at where it thinks (0, 0) should be on the screen. If the gun normally shoots slightly too high and further to the right, it might report (1000, 3000) for example.
 +
# The game sends a calibration report to the gun to negate the offset, e.g. (-1000, -3000), (0, 0) using our example of (1000, 3000) from before.
 +
# The game will now display a target in at (-25000, 25000) on the screen and ask you to shoot it. This will tell it how "wrong" the gun is when aimed at the top left of the screen.
 +
# The coordinates received from the gun will be subtracted from the expected (-25000, 25000) and sent back to the gun in the second part of the calibration report along with the values previously determined for the centre position. If the first calibration was enough to adjust the screen offset we might have seen the "perfect" coordinates of (-25000, 25000) in which case the report would be (-1000, -3000), (0, 0) again. However, if our gun read the coordinates slightly closer the the middle of the screen at (-20000, 22000) then the report would be (-1000, -3000), (5000, -3000).
  
<pre>
+
If the light gun does not handle the calibration output report then you will not be able to get past the calibration screen in ''The House of the Dead III''.
  
Bus 003 Device 025: ID 1292:3006 Innomedia
+
=== EMS TopGun II ===
Device Descriptor:
+
 
  bLength                18
+
''This is an unlicensed / unofficial Xbox accessory.''
  bDescriptorType        1
+
 
  bcdUSB              1.10
+
The website for this product can be found at http://www.hkems.com/product/xbox/EMSTopGun2.htm
  bDeviceClass            0
+
 
  bDeviceSubClass        0
+
The gun presents itself as a standard Xbox gamepad. It uses a different USB descriptor for Xbox (X) and the other mode (P).
  bDeviceProtocol        0
+
There is no internal hub in this device.
  bMaxPacketSize0        8
+
 
  idVendor          0x1292 Innomedia
+
{| class="wikitable"
  idProduct          0x3006
+
! EMS TopGun II !! Xbox Gamepad !! Notes
  bcdDevice            1.50
+
|-
  iManufacturer          0
+
| Stick || {{input-d}} ||
  iProduct                0
+
|-
  iSerial                0  
+
| Trigger || {{input-a}} || rowspan="4" | Digital only, either 0 or 255
  bNumConfigurations      1
+
|-
  Configuration Descriptor:
+
| Grip || {{input-b}}
    bLength                9
+
|-
    bDescriptorType        2
+
| A || {{input-x}}
    wTotalLength          32
+
|-
    bNumInterfaces          1
+
| B || {{input-y}}
    bConfigurationValue    1
+
|-
    iConfiguration          1 (error)
+
| START || {{input-start}} ||
    bmAttributes        0x80
+
|-
      (Bus Powered)
+
| SE/BA || {{input-back}} ||
    MaxPower              100mA
+
|-
    Interface Descriptor:
+
| Aim Left / Right || {{input-lx}} || rowspan="2" | Absolute position using the full stick range
      bLength                9
+
|-
      bDescriptorType        4
+
| Aim Up / Down || {{input-ly}}
      bInterfaceNumber        0
+
|}
      bAlternateSetting      0
+
 
      bNumEndpoints          2
+
There is no right thumbstick, thumbstick presses, black/white button or trigger buttons (All of those read constant zeros).
      bInterfaceClass        88 Xbox
+
 
      bInterfaceSubClass    66 Controller
+
===== Turbo Mode =====
      bInterfaceProtocol      0
+
 
      iInterface              2 (error)
+
* Turbo mode 0 keeps {{input-a}} pressed while trigger is held
      Endpoint Descriptor:
+
* Turbo mode 1 toggles {{input-a}} rapidly while trigger is held
        bLength                7
+
* Turbo mode 2 toggles {{input-a}} rapidly and once in a while {{input-b}} while trigger is held
        bDescriptorType        5
+
 
        bEndpointAddress    0x81 EP 1 IN
+
===== Force Feedback =====
        bmAttributes            3
+
 
          Transfer Type            Interrupt
+
The upper part of the gun is moveable and should push back to simulate recoil (possibly hurting your thumb while you are using the stick).
          Synch Type              None
+
I could not get the force feedback working, but I'm sure I've had it working in the past on PC.{{citation needed}}
          Usage Type              Data
+
 
        wMaxPacketSize    0x0020  1x 32 bytes
+
==== USB Descriptors ====
        bInterval              4
+
 
      Endpoint Descriptor:
+
This is the descriptor in the Xbox mode (X).
        bLength                7
 
        bDescriptorType        5
 
        bEndpointAddress    0x02  EP 2 OUT
 
        bmAttributes            3
 
          Transfer Type            Interrupt
 
          Synch Type              None
 
          Usage Type              Data
 
        wMaxPacketSize    0x0020  1x 32 bytes
 
        bInterval              4
 
  
Bus 003 Device 024: ID 1292:3006 Innomedia
+
<pre>
 +
Bus 003 Device 016: ID 0b9a:016b 
 
Device Descriptor:
 
Device Descriptor:
 
   bLength                18
 
   bLength                18
 
   bDescriptorType        1
 
   bDescriptorType        1
 
   bcdUSB              1.10
 
   bcdUSB              1.10
   bDeviceClass            9 Hub
+
   bDeviceClass            0
 
   bDeviceSubClass        0  
 
   bDeviceSubClass        0  
   bDeviceProtocol        0 Full speed (or root) hub
+
   bDeviceProtocol        0  
   bMaxPacketSize0         8
+
   bMaxPacketSize0       64
   idVendor          0x1292 Innomedia
+
   idVendor          0x0b9a
   idProduct          0x3006
+
   idProduct          0x016b
   bcdDevice            1.50
+
   bcdDevice            4.57
   iManufacturer          1 (c) 2004 R0R3 Inc.
+
   iManufacturer          1 EMS̖E
   iProduct                2 US Patent 6,287,198
+
   iProduct                2 EMS TopGun
 
   iSerial                0  
 
   iSerial                0  
 
   bNumConfigurations      1
 
   bNumConfigurations      1
Line 895: Line 967:
 
     bLength                9
 
     bLength                9
 
     bDescriptorType        2
 
     bDescriptorType        2
     wTotalLength          25
+
     wTotalLength          32
 
     bNumInterfaces          1
 
     bNumInterfaces          1
 
     bConfigurationValue    1
 
     bConfigurationValue    1
     iConfiguration          4 (c) R0R3 Devices Inc. US Patent 6,287,19Ē
+
     iConfiguration          0
     bmAttributes        0xa0
+
     bmAttributes        0x80
 
       (Bus Powered)
 
       (Bus Powered)
      Remote Wakeup
+
     MaxPower             100mA
     MaxPower               64mA
 
 
     Interface Descriptor:
 
     Interface Descriptor:
 
       bLength                9
 
       bLength                9
Line 908: Line 979:
 
       bInterfaceNumber        0
 
       bInterfaceNumber        0
 
       bAlternateSetting      0
 
       bAlternateSetting      0
       bNumEndpoints          1
+
       bNumEndpoints          2
       bInterfaceClass         9 Hub
+
       bInterfaceClass       88 Xbox
       bInterfaceSubClass     0
+
       bInterfaceSubClass     66 Controller
       bInterfaceProtocol      0 Full speed (or root) hub
+
       bInterfaceProtocol      0  
       iInterface              5 (error)
+
       iInterface              0
 
       Endpoint Descriptor:
 
       Endpoint Descriptor:
 
         bLength                7
 
         bLength                7
Line 921: Line 992:
 
           Synch Type              None
 
           Synch Type              None
 
           Usage Type              Data
 
           Usage Type              Data
         wMaxPacketSize    0x0001 1x 1 bytes
+
         wMaxPacketSize    0x0040 1x 64 bytes
         bInterval             255
+
         bInterval               4
Hub Descriptor:
+
      Endpoint Descriptor:
  bLength               9
+
        bLength                 7
  bDescriptorType     41
+
        bDescriptorType         5
  nNbrPorts            3
+
        bEndpointAddress    0x02  EP 2 OUT
  wHubCharacteristic 0x000d
+
        bmAttributes            3
    Per-port power switching
+
          Transfer Type            Interrupt
    Compound device
+
          Synch Type              None
     Per-port overcurrent protection
+
          Usage Type              Data
  bPwrOn2PwrGood      32 * 2 milli seconds
+
        wMaxPacketSize     0x0040 1x 64 bytes
  bHubContrCurrent    64 milli Ampere
+
        bInterval              8
  DeviceRemovable    0x02
+
can't get debug descriptor: Resource temporarily unavailable
  PortPwrCtrlMask    0x0e
 
Hub Port Status:
 
  Port 1: 0000.0103 power enable connect
 
  Port 2: 0000.0100 power
 
  Port 3: 0100.0100 power
 
 
Device Status:    0x0000
 
Device Status:    0x0000
 
   (Bus Powered)
 
   (Bus Powered)
 
</pre>
 
</pre>
  
== Steel Battalion Controller ==
+
=== Joytech Sharp Shooter ===
 +
 
 +
''This is an unlicensed / unofficial Xbox accessory.''
  
[[File:SBC.jpg|thumb|200px|Steel Battalion Controller Layout]]
+
The third party light gun from Joytech reports itself as 2 devices and mentions pattent [http://www.google.com/patents/US6287198 US6287198]
 +
it came with a detachable viewfinder scope without any magnification. a red dot apears in the viewfinder, its a reflection of a red led, powered by the gun over usb.
  
=== USB Descriptors ===
+
model numer: JS-901D
  
<pre>
+
{| class="wikitable"
Device Descriptor:
+
! Joytech Sharp Shooter !! Xbox Gamepad !! Notes
  bLength                18
+
|-
  bDescriptorType        1
+
| Stick || {{input-d}} ||
  bcdUSB              1.10
+
|-
  bDeviceClass            0 (Defined at Interface level)
+
| Trigger || {{input-a}} || rowspan="6" | Digital only, either 0 or 255 {{citation needed}}
  bDeviceSubClass        0
+
|-
  bDeviceProtocol        0
+
| B (Left side) || rowspan="3" | {{input-b}}
  bMaxPacketSize0        8
+
|-
  idVendor          0x0a7b
+
| B (Right side)
  idProduct          0xd000
+
|-
  bcdDevice            1.00
+
| B (Magazine button)
  iManufacturer          0
+
|-
  iProduct                0
+
| x || {{input-x}}
  iSerial                0
+
|-
  bNumConfigurations      1
+
| y || {{input-y}}
  Configuration Descriptor:
+
|-
    bLength                9
+
| START || {{input-start}} ||
    bDescriptorType        2
+
|-
    wTotalLength          32
+
| BACK || {{input-back}} ||
    bNumInterfaces          1
+
|-
    bConfigurationValue    1
+
| Aim Left / Right || {{input-lx}} || {{citation needed}}
    iConfiguration          0
+
|-
    bmAttributes        0x80
+
| Aim Up / Down || {{input-ly}} || {{citation needed}}
      (Bus Powered)
+
|}
    MaxPower              500mA
+
 
    Interface Descriptor:
+
There is no right thumbstick, thumbstick presses, black/white button or trigger buttons {{citation needed}}
      bLength                9
+
 
      bDescriptorType        4
+
===== Fire/Reload Mode =====
      bInterfaceNumber        0
+
 
      bAlternateSetting      0
+
* Normal mode does nothing, normal operation
      bNumEndpoints          2
+
* Auto reload mode toggles {{input-b}} rapidly to rappidly reload {{citation needed}}
      bInterfaceClass        88 Xbox
+
* Auto fire+reload mode toggles {{input-a}} + {{input-b}} rapidly {{citation needed}}
      bInterfaceSubClass    66 Controller
 
      bInterfaceProtocol      0
 
      iInterface              0
 
      Endpoint Descriptor:
 
        bLength                7
 
        bDescriptorType        5
 
        bEndpointAddress    0x82  EP 2 IN
 
        bmAttributes            3
 
          Transfer Type            Interrupt
 
          Synch Type              None
 
          Usage Type              Data
 
        wMaxPacketSize    0x0020  1x 32 bytes
 
        bInterval              4
 
      Endpoint Descriptor:
 
        bLength                7
 
        bDescriptorType        5
 
        bEndpointAddress    0x01 EP 1 OUT
 
        bmAttributes            3
 
          Transfer Type            Interrupt
 
          Synch Type              None
 
          Usage Type              Data
 
        wMaxPacketSize    0x0020  1x 32 bytes
 
        bInterval              4
 
</pre>
 
  
=== Controller to Xbox ===
+
==== USB Descriptors ====
  
From http://steelbattalionnet.codeplex.com/SourceControl/latest#SBC/SteelBattalionController.cs
+
<pre>
  
26 bytes
+
Bus 003 Device 025: ID 1292:3006 Innomedia
 
+
Device Descriptor:
{| class="wikitable"
+
  bLength                18
!Field
+
  bDescriptorType        1
!Offset (Bytes)
+
  bcdUSB              1.10
!Mask
+
  bDeviceClass            0
!Notes
+
  bDeviceSubClass        0
|-
+
  bDeviceProtocol        0
|RightJoyMainWeapon
+
  bMaxPacketSize0        8
|2
+
  idVendor          0x1292 Innomedia
|0x01
+
  idProduct          0x3006
|
+
  bcdDevice            1.50
|-
+
  iManufacturer          0
|RightJoyFire
+
  iProduct                0
|2
+
  iSerial                0
|0x02
+
  bNumConfigurations      1
|
+
  Configuration Descriptor:
|-
+
    bLength                9
|RightJoyLockOn
+
    bDescriptorType        2
|2
+
    wTotalLength          32
|0x04
+
    bNumInterfaces          1
|
+
    bConfigurationValue    1
|-
+
    iConfiguration          1 (error)
|Eject
+
    bmAttributes        0x80
|2
+
      (Bus Powered)
|0x08
+
    MaxPower              100mA
|
+
    Interface Descriptor:
|-
+
      bLength                9
|CockpitHatch
+
      bDescriptorType        4
|2
+
      bInterfaceNumber        0
|0x10
+
      bAlternateSetting      0
|
+
      bNumEndpoints          2
|-
+
      bInterfaceClass        88 Xbox
|Ignition
+
      bInterfaceSubClass    66 Controller
|2
+
      bInterfaceProtocol      0
|0x20
+
      iInterface              2 (error)
|
+
      Endpoint Descriptor:
|-
+
        bLength                7
|Start
+
        bDescriptorType        5
|2
+
        bEndpointAddress    0x81  EP 1 IN
|0x40
+
        bmAttributes            3
|
+
          Transfer Type            Interrupt
|-
+
          Synch Type              None
|MultiMonOpenClose
+
          Usage Type              Data
|2
+
        wMaxPacketSize    0x0020  1x 32 bytes
|0x80
+
        bInterval              4
|
+
      Endpoint Descriptor:
|-
+
        bLength                7
|MultiMonMapZoomInOut
+
        bDescriptorType        5
|3
+
        bEndpointAddress    0x02  EP 2 OUT
|0x01
+
        bmAttributes            3
|
+
          Transfer Type            Interrupt
|-
+
          Synch Type              None
|MultiMonModeSelect
+
          Usage Type              Data
|3
+
        wMaxPacketSize    0x0020  1x 32 bytes
|0x02
+
        bInterval              4
|
+
 
|-
+
Bus 003 Device 024: ID 1292:3006 Innomedia
|MultiMonSubMonitor
+
Device Descriptor:
|3
+
  bLength                18
|0x04
+
  bDescriptorType        1
|
+
  bcdUSB              1.10
|-
+
  bDeviceClass            9 Hub
|MainMonZoomIn
+
  bDeviceSubClass        0
|3
+
  bDeviceProtocol        0 Full speed (or root) hub
|0x08
+
  bMaxPacketSize0        8
|
+
  idVendor          0x1292 Innomedia
|-
+
  idProduct          0x3006
|MainMonZoomOut
+
  bcdDevice            1.50
|3
+
  iManufacturer          1 (c) 2004 R0R3 Inc.
|0x10
+
  iProduct                2 US Patent 6,287,198
|
+
  iSerial                0
|-
+
  bNumConfigurations      1
|FunctionFSS
+
  Configuration Descriptor:
|3
+
    bLength                9
|0x20
+
    bDescriptorType        2
|
+
    wTotalLength          25
|-
+
    bNumInterfaces          1
|FunctionManipulator
+
    bConfigurationValue    1
|3
+
    iConfiguration          4 (c) R0R3 Devices Inc. US Patent 6,287,19Ē
|0x40
+
    bmAttributes        0xa0
|
+
      (Bus Powered)
|-
+
      Remote Wakeup
|FunctionLineColorChange
+
    MaxPower              64mA
|3
+
    Interface Descriptor:
|0x80
+
      bLength                9
|
+
      bDescriptorType        4
|-
+
      bInterfaceNumber        0
|Washing
+
      bAlternateSetting      0
|4
+
      bNumEndpoints          1
|0x01
+
      bInterfaceClass        9 Hub
|
+
      bInterfaceSubClass      0
|-
+
      bInterfaceProtocol      0 Full speed (or root) hub
|Extinguisher
+
      iInterface              5 (error)
|4
+
      Endpoint Descriptor:
|0x02
+
        bLength                7
|
+
        bDescriptorType        5
|-
+
        bEndpointAddress    0x81  EP 1 IN
|Chaff
+
        bmAttributes            3
|4
+
          Transfer Type            Interrupt
|0x04
+
          Synch Type              None
|
+
          Usage Type              Data
|-
+
        wMaxPacketSize    0x0001  1x 1 bytes
|FunctionTankDetach
+
        bInterval            255
|4
+
Hub Descriptor:
|0x08
+
  bLength              9
|
+
  bDescriptorType      41
|-
+
  nNbrPorts            3
|FunctionOverride
+
  wHubCharacteristic 0x000d
|4
+
    Per-port power switching
|0x10
+
    Compound device
|
+
    Per-port overcurrent protection
|-
+
  bPwrOn2PwrGood      32 * 2 milli seconds
|FunctionNightScope
+
  bHubContrCurrent    64 milli Ampere
|4
+
  DeviceRemovable    0x02
|0x20
+
  PortPwrCtrlMask    0x0e
|
+
Hub Port Status:
|-
+
  Port 1: 0000.0103 power enable connect
|FunctionF1
+
  Port 2: 0000.0100 power
|4
+
  Port 3: 0100.0100 power
|0x40
+
Device Status:    0x0000
|
+
  (Bus Powered)
|-
+
</pre>
|FunctionF2
+
 
|4
+
== Microphones ==
|0x80
+
 
|
+
=== Xbox Communicator ===
|-
+
 
|FunctionF3
+
==== USB Descriptor ====
|5
+
 
|0x01
+
<pre>
|
+
Device Descriptor:
|-
+
  bLength                18
|WeaponConMain
+
  bDescriptorType        1
|5
+
  bcdUSB              1.10
|0x02
+
  bDeviceClass            0
|
+
  bDeviceSubClass        0
|-
+
  bDeviceProtocol        0
|WeaponConSub
+
  bMaxPacketSize0        8
|5
+
  idVendor          0x045e Microsoft Corp.
|0x04
+
  idProduct          0x0283 Xbox Communicator
|
+
  bcdDevice            1.58
|-
+
  iManufacturer          0
|WeaponConMagazine
+
  iProduct                0
|5
+
  iSerial                0
|0x08
+
  bNumConfigurations      1
|
+
  Configuration Descriptor:
|-
+
    bLength                9
|Comm1
+
    bDescriptorType        2
|5
+
    wTotalLength      0x002d
|0x10
+
    bNumInterfaces          2
|
+
    bConfigurationValue    1
|-
+
    iConfiguration          0
|Comm2
+
    bmAttributes        0x80
|5
+
      (Bus Powered)
|0x20
+
    MaxPower              100mA
|
+
    Interface Descriptor:
|-
+
      bLength                9
|Comm3
+
      bDescriptorType        4
|5
+
      bInterfaceNumber        0
|0x40
+
      bAlternateSetting      0
|
+
      bNumEndpoints          1
|-
+
      bInterfaceClass      120
|Comm4
+
      bInterfaceSubClass      0
|5
+
      bInterfaceProtocol      0
|0x80
+
      iInterface              0
|
+
      Endpoint Descriptor:
|-
+
        bLength                9
|Comm5
+
        bDescriptorType        5
|6
+
        bEndpointAddress    0x04  EP 4 OUT
|0x01
+
        bmAttributes            5
|
+
          Transfer Type            Isochronous
|-
+
          Synch Type              Asynchronous
|LeftJoySightChange
+
          Usage Type              Data
|6
+
        wMaxPacketSize    0x0030  1x 48 bytes
|0x02
+
        bInterval              1
|
+
        bRefresh                0
|-
+
        bSynchAddress          0
|ToggleFilterControl
+
    Interface Descriptor:
|6
+
      bLength                9
|0x04
+
      bDescriptorType        4
|
+
      bInterfaceNumber        1
|-
+
      bAlternateSetting      0
|ToggleOxygenSupply
+
      bNumEndpoints          1
|6
+
      bInterfaceClass      120
|0x08
+
      bInterfaceSubClass      0
|
+
      bInterfaceProtocol      0
|-
+
      iInterface              0
|ToggleFuelFlowRate
+
      Endpoint Descriptor:
|6
+
        bLength                9
|0x10
+
        bDescriptorType        5
|
+
        bEndpointAddress    0x85  EP 5 IN
|-
+
        bmAttributes            5
|ToggleBuffreMaterial
+
          Transfer Type            Isochronous
|6
+
          Synch Type              Asynchronous
|0x20
+
          Usage Type              Data
|
+
        wMaxPacketSize    0x0030  1x 48 bytes
|-
+
        bInterval              1
|ToggleVTLocation
+
        bRefresh                0
|6
+
        bSynchAddress          0
|0x40
+
</pre>
|
+
 
|-
+
=== Xbox Karaoke ===
|
+
 
|6
+
==== USB Descriptor ====
|0x80
+
 
|
+
<pre>
|-
+
Device Descriptor:
|
+
  bLength                18
|7
+
  bDescriptorType        1
|0xFF
+
  bcdUSB              1.10
|
+
  bDeviceClass            0
|-
+
  bDeviceSubClass        0
|
+
  bDeviceProtocol        0
|8
+
  bMaxPacketSize0        8
|0xFF
+
  idVendor          0x045e Microsoft Corp.
|
+
  idProduct          0x0501
|-
+
  bcdDevice            1.00
|AimingX
+
  iManufacturer          1 Licensed 3PP Vendor
|9
+
  iProduct                2 Karaoke Microphone Module
|0xFF, maybe 0xFFFF at offset 8?
+
  iSerial                0
|"Aiming Lever" joystick on the right.  X Axis value.
+
  bNumConfigurations      1
|-
+
  Configuration Descriptor:
|AimingY
+
    bLength                9
|11
+
    bDescriptorType        2
|0xFF, maybe 0xFFFF at offset 10?
+
    wTotalLength      0x001b
|"Aiming Lever" joystick on the right.  Y Axis value.
+
    bNumInterfaces          1
|-
+
    bConfigurationValue    1
|RotationLever
+
    iConfiguration          0
|13
+
    bmAttributes        0x80
|0xFF, maybe 0xFFFF at offset 12?
+
      (Bus Powered)
|"Rotation Lever" joystick on the left.
+
    MaxPower              100mA
|-
+
    Interface Descriptor:
|SightChangeX
+
      bLength                9
|15
+
      bDescriptorType        4
|0xFF, maybe 0xFFFF at offset 14?
+
      bInterfaceNumber        0
|"Sight Change" analog stick on the "Rotation Lever" joystick.  X Axis value.
+
      bAlternateSetting      0
|-
+
      bNumEndpoints          1
|SightChangeY
+
      bInterfaceClass      121
|17
+
      bInterfaceSubClass      1
|0xFF, maybe 0xFFFF at offset 16?
+
      bInterfaceProtocol      0
|"Sight Change" analog stick on the "Rotation Lever" joystick.  Y Axis value.
+
      iInterface              0
|-
+
      Endpoint Descriptor:
|LeftPedal
+
        bLength                9
|19
+
        bDescriptorType        5
|0xFF, maybe 0xFFFF at offset 18?
+
        bEndpointAddress    0x81  EP 1 IN
|
+
        bmAttributes            5
|-
+
          Transfer Type            Isochronous
|MiddlePedal
+
          Synch Type              Asynchronous
|21
+
          Usage Type              Data
|0xFF, maybe 0xFFFF at offset 20?
+
        wMaxPacketSize    0x0060  1x 96 bytes
|
+
        bInterval              1
|-
+
        bRefresh                0
|RightPedal
+
        bSynchAddress          0
|23
+
</pre>
|0xFF, maybe 0xFFFF at offset 22?
+
 
|
+
== Steel Battalion Controller ==
|-
+
 
|TunerDial
+
[[File:SBC.jpg|thumb|200px|Steel Battalion Controller Layout]]
|24
+
 
|0x0F
+
=== USB Descriptors ===
|The 9 o'clock postion is 0, and the 6 o'clock position is 12. The blank area between the 6 and 9 o'clock positions is 13, 14, and 15 clockwise.
+
 
|-
+
<pre>
|
+
Device Descriptor:
|24
+
  bLength                18
|0xF0
+
  bDescriptorType        1
|
+
  bcdUSB              1.10
|-
+
  bDeviceClass            0 (Defined at Interface level)
|GearLever
+
  bDeviceSubClass        0
|25
+
  bDeviceProtocol        0
|0xFF
+
  bMaxPacketSize0        8
|The gear lever on the left block.
+
  idVendor          0x0a7b
|}
+
  idProduct          0xd000
 +
  bcdDevice            1.00
 +
  iManufacturer          0
 +
  iProduct                0
 +
  iSerial                0
 +
  bNumConfigurations      1
 +
  Configuration Descriptor:
 +
    bLength                9
 +
    bDescriptorType        2
 +
    wTotalLength          32
 +
    bNumInterfaces          1
 +
    bConfigurationValue    1
 +
    iConfiguration          0
 +
    bmAttributes        0x80
 +
      (Bus Powered)
 +
    MaxPower              500mA
 +
    Interface Descriptor:
 +
      bLength                9
 +
      bDescriptorType        4
 +
      bInterfaceNumber        0
 +
      bAlternateSetting      0
 +
      bNumEndpoints          2
 +
      bInterfaceClass        88 Xbox
 +
      bInterfaceSubClass    66 Controller
 +
      bInterfaceProtocol      0
 +
      iInterface              0
 +
      Endpoint Descriptor:
 +
        bLength                7
 +
        bDescriptorType        5
 +
        bEndpointAddress    0x82  EP 2 IN
 +
        bmAttributes            3
 +
          Transfer Type            Interrupt
 +
          Synch Type              None
 +
          Usage Type              Data
 +
        wMaxPacketSize    0x0020  1x 32 bytes
 +
        bInterval              4
 +
      Endpoint Descriptor:
 +
        bLength                7
 +
        bDescriptorType        5
 +
        bEndpointAddress    0x01  EP 1 OUT
 +
        bmAttributes            3
 +
          Transfer Type            Interrupt
 +
          Synch Type              None
 +
          Usage Type              Data
 +
        wMaxPacketSize    0x0020  1x 32 bytes
 +
        bInterval              4
 +
</pre>
  
=== Xbox to Controller ===
+
=== Controller to Xbox ===
  
 
From http://steelbattalionnet.codeplex.com/SourceControl/latest#SBC/SteelBattalionController.cs
 
From http://steelbattalionnet.codeplex.com/SourceControl/latest#SBC/SteelBattalionController.cs
  
34 bytes
+
26 bytes
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 1,297: Line 1,388:
 
!Notes
 
!Notes
 
|-
 
|-
|EmergencyEject
+
|RightJoyMainWeapon
 
|2
 
|2
|0x0F
+
|0x01
 
|
 
|
 
|-
 
|-
|CockpitHatch
+
|RightJoyFire
 
|2
 
|2
|0xF0
+
|0x02
 
|
 
|
 
|-
 
|-
|Ignition
+
|RightJoyLockOn
|3
+
|2
|0x0F
+
|0x04
 
|
 
|
 
|-
 
|-
|Start
+
|Eject
|3
+
|2
|0xF0
+
|0x08
 
|
 
|
 
|-
 
|-
|OpenClose
+
|CockpitHatch
|4
+
|2
|0x0F
+
|0x10
 
|
 
|
 
|-
 
|-
|MapZoomInOut
+
|Ignition
|4
+
|2
|0xF0
+
|0x20
 
|
 
|
 
|-
 
|-
|ModeSelect
+
|Start
|5
+
|2
|0x0F
+
|0x40
 
|
 
|
 
|-
 
|-
|SubMonitorModeSelect
+
|MultiMonOpenClose
|5
+
|2
|0xF0
+
|0x80
 
|
 
|
 
|-
 
|-
|MainMonitorZoomIn
+
|MultiMonMapZoomInOut
|6
+
|3
|0x0F
+
|0x01
 
|
 
|
 
|-
 
|-
|MainMonitorZoomOut
+
|MultiMonModeSelect
|6
+
|3
|0xF0
+
|0x02
 
|
 
|
 
|-
 
|-
|ForecastShootingSystem
+
|MultiMonSubMonitor
|7
+
|3
|0x0F
+
|0x04
 
|
 
|
 
|-
 
|-
|Manipulator
+
|MainMonZoomIn
|7
+
|3
|0xF0
+
|0x08
 
|
 
|
 
|-
 
|-
|LineColorChange
+
|MainMonZoomOut
|8
+
|3
|0x0F
+
|0x10
 
|
 
|
 
|-
 
|-
|Washing
+
|FunctionFSS
|8
+
|3
|0xF0
+
|0x20
 
|
 
|
 
|-
 
|-
|Extinguisher
+
|FunctionManipulator
|9
+
|3
|0x0F
+
|0x40
 
|
 
|
 
|-
 
|-
|Chaff
+
|FunctionLineColorChange
|9
+
|3
|0xF0
+
|0x80
 
|
 
|
 
|-
 
|-
|TankDetach
+
|Washing
|10
+
|4
|0x0F
+
|0x01
 
|
 
|
 
|-
 
|-
|Override
+
|Extinguisher
|10
+
|4
|0xF0
+
|0x02
 
|
 
|
 
|-
 
|-
|NightScope
+
|Chaff
|11
+
|4
|0x0F
+
|0x04
 
|
 
|
 
|-
 
|-
|F1
+
|FunctionTankDetach
|11
+
|4
|0xF0
+
|0x08
 
|
 
|
 
|-
 
|-
|F2
+
|FunctionOverride
|12
+
|4
|0x0F
+
|0x10
 
|
 
|
 
|-
 
|-
|F3
+
|FunctionNightScope
|12
+
|4
|0xF0
+
|0x20
 
|
 
|
 
|-
 
|-
|MainWeaponControl
+
|FunctionF1
|13
+
|4
|0x0F
+
|0x40
 
|
 
|
 
|-
 
|-
|SubWeaponControl
+
|FunctionF2
|13
+
|4
|0xF0
+
|0x80
 
|
 
|
 
|-
 
|-
|MagazineChange
+
|FunctionF3
|14
+
|5
|0x0F
+
|0x01
 
|
 
|
 
|-
 
|-
|Comm1
+
|WeaponConMain
|14
+
|5
|0xF0
+
|0x02
 
|
 
|
 
|-
 
|-
|Comm2
+
|WeaponConSub
|15
+
|5
|0x0F
+
|0x04
 
|
 
|
 
|-
 
|-
|Comm3
+
|WeaponConMagazine
|15
+
|5
|0xF0
+
|0x08
 
|
 
|
 
|-
 
|-
|Comm4
+
|Comm1
|16
+
|5
|0x0F
+
|0x10
 
|
 
|
 
|-
 
|-
|Comm5
+
|Comm2
|16
+
|5
|0xF0
+
|0x20
 
|
 
|
 
|-
 
|-
|
+
|Comm3
|17
+
|5
|0x0F
+
|0x40
 
|
 
|
 
|-
 
|-
|GearR
+
|Comm4
|17
+
|5
|0xF0
+
|0x80
 
|
 
|
 
|-
 
|-
|GearN
+
|Comm5
|18
+
|6
|0x0F
+
|0x01
 +
|
 +
|-
 +
|LeftJoySightChange
 +
|6
 +
|0x02
 +
|
 +
|-
 +
|ToggleFilterControl
 +
|6
 +
|0x04
 +
|
 +
|-
 +
|ToggleOxygenSupply
 +
|6
 +
|0x08
 +
|
 +
|-
 +
|ToggleFuelFlowRate
 +
|6
 +
|0x10
 
|
 
|
 
|-
 
|-
|Gear1
+
|ToggleBuffreMaterial
|18
+
|6
|0xF0
+
|0x20
|
+
|
|-
+
|-
|Gear2
+
|ToggleVTLocation
|19
+
|6
|0x0F
+
|0x40
|
+
|
|-
+
|-
|Gear3
+
|
|19
+
|6
|0xF0
+
|0x80
|
+
|
|-
+
|-
|Gear4
+
|
|20
+
|7
|0x0F
+
|0xFF
|
+
|
|-
+
|-
|Gear5
+
|
|20
+
|8
|0xF0
+
|0xFF
|
+
|
|}
+
|-
 +
|AimingX
 +
|9
 +
|0xFFFF
 +
|"Aiming Lever" joystick on the right. Unsigned X Axis value: 0 (Left) to 0xFFFF (Right).
 +
|-
 +
|AimingY
 +
|11
 +
|0xFFFF
 +
|"Aiming Lever" joystick on the right. Unsigned Y Axis value: 0 (Top) to 0xFFFF (Bottom).
 +
|-
 +
|RotationLever
 +
|13
 +
|0xFFFF
 +
|"Rotation Lever" joystick on the left. Signed X Axis value: -0x7FFF (Left) to 0x7FFF (Right)
 +
|-
 +
|SightChangeX
 +
|15
 +
|0xFFFF
 +
|"Sight Change" analog stick on the "Rotation Lever" joystick. Signed X Axis value: -0x7FFF (Left) to 0x7FFF (Right)
 +
|-
 +
|SightChangeY
 +
|17
 +
|0xFFFF
 +
|"Sight Change" analog stick on the "Rotation Lever" joystick. Signed Y Axis value: -0x7FFF (Top) to 0x7FFF (Bottom)
 +
|-
 +
|LeftPedal
 +
|19
 +
|0xFFFF
 +
|
 +
|-
 +
|MiddlePedal
 +
|21
 +
|0xFFFF
 +
|
 +
|-
 +
|RightPedal
 +
|23
 +
|0xFFFF
 +
|
 +
|-
 +
|TunerDial
 +
|24
 +
|0x0F
 +
|The 9 o'clock postion is 0, and the 6 o'clock position is 12. The blank area between the 6 and 9 o'clock positions is 13, 14, and 15 clockwise.
 +
|-
 +
|
 +
|24
 +
|0xF0
 +
|
 +
|-
 +
|GearLever
 +
|25
 +
|0xFF
 +
|The gear lever on the left block. R = -2, N = -1, 1st = 1, 2nd = 2, 3rd = 3, 4th = 4, 5th = 5. If the shifter is between two gears this value will be 0.
 +
|}
 +
 
 +
=== Xbox to Controller ===
 +
 
 +
From http://steelbattalionnet.codeplex.com/SourceControl/latest#SBC/SteelBattalionController.cs
 +
 
 +
22 bytes
 +
 
 +
{| class="wikitable"
 +
!Field
 +
!Offset (Bytes)
 +
!Mask
 +
!Notes
 +
|-
 +
|Start
 +
|0
 +
|0x00
 +
|This will always be 0x00
 +
|-
 +
|bLen
 +
|1
 +
|0x16
 +
|This will always be 0x16 (22 bytes)
 +
|-
 +
|EmergencyEject
 +
|2
 +
|0x0F
 +
|
 +
|-
 +
|CockpitHatch
 +
|2
 +
|0xF0
 +
|
 +
|-
 +
|Ignition
 +
|3
 +
|0x0F
 +
|
 +
|-
 +
|Start
 +
|3
 +
|0xF0
 +
|
 +
|-
 +
|OpenClose
 +
|4
 +
|0x0F
 +
|
 +
|-
 +
|MapZoomInOut
 +
|4
 +
|0xF0
 +
|
 +
|-
 +
|ModeSelect
 +
|5
 +
|0x0F
 +
|
 +
|-
 +
|SubMonitorModeSelect
 +
|5
 +
|0xF0
 +
|
 +
|-
 +
|MainMonitorZoomIn
 +
|6
 +
|0x0F
 +
|
 +
|-
 +
|MainMonitorZoomOut
 +
|6
 +
|0xF0
 +
|
 +
|-
 +
|ForecastShootingSystem
 +
|7
 +
|0x0F
 +
|
 +
|-
 +
|Manipulator
 +
|7
 +
|0xF0
 +
|
 +
|-
 +
|LineColorChange
 +
|8
 +
|0x0F
 +
|
 +
|-
 +
|Washing
 +
|8
 +
|0xF0
 +
|
 +
|-
 +
|Extinguisher
 +
|9
 +
|0x0F
 +
|
 +
|-
 +
|Chaff
 +
|9
 +
|0xF0
 +
|
 +
|-
 +
|TankDetach
 +
|10
 +
|0x0F
 +
|
 +
|-
 +
|Override
 +
|10
 +
|0xF0
 +
|
 +
|-
 +
|NightScope
 +
|11
 +
|0x0F
 +
|
 +
|-
 +
|F1
 +
|11
 +
|0xF0
 +
|
 +
|-
 +
|F2
 +
|12
 +
|0x0F
 +
|
 +
|-
 +
|F3
 +
|12
 +
|0xF0
 +
|
 +
|-
 +
|MainWeaponControl
 +
|13
 +
|0x0F
 +
|
 +
|-
 +
|SubWeaponControl
 +
|13
 +
|0xF0
 +
|
 +
|-
 +
|MagazineChange
 +
|14
 +
|0x0F
 +
|
 +
|-
 +
|Comm1
 +
|14
 +
|0xF0
 +
|
 +
|-
 +
|Comm2
 +
|15
 +
|0x0F
 +
|
 +
|-
 +
|Comm3
 +
|15
 +
|0xF0
 +
|
 +
|-
 +
|Comm4
 +
|16
 +
|0x0F
 +
|
 +
|-
 +
|Comm5
 +
|16
 +
|0xF0
 +
|
 +
|-
 +
|
 +
|17
 +
|0x0F
 +
|
 +
|-
 +
|GearR
 +
|17
 +
|0xF0
 +
|
 +
|-
 +
|GearN
 +
|18
 +
|0x0F
 +
|
 +
|-
 +
|Gear1
 +
|18
 +
|0xF0
 +
|
 +
|-
 +
|Gear2
 +
|19
 +
|0x0F
 +
|
 +
|-
 +
|Gear3
 +
|19
 +
|0xF0
 +
|
 +
|-
 +
|Gear4
 +
|20
 +
|0x0F
 +
|
 +
|-
 +
|Gear5
 +
|20
 +
|0xF0
 +
|
 +
|-
 +
|Unused?
 +
|21
 +
|
 +
|-
 +
|}
 +
 
 +
== SEGA Chihiro Baseboard ==
 +
 
 +
Contains 2 USB devices which directly attach to USB ports 3 & 4 (player 0, 1)
 +
 
 +
=== USB Descriptors ===
 +
 
 +
<pre>
 +
[Device Descriptor]
 +
----------------------------------------------
 +
  Length              = 18
 +
  DescriptorType      = 0x01
 +
  USB version        = 1.00
 +
  Vendor:Product      = 0ca3:0003
 +
  MaxPacketSize0      = 64
 +
  NumConfigurations  = 1
 +
  Device version      = 1.03
 +
  Device Class:SubClass:Protocol = 60:01:00
 +
 
 +
[Configuration Descriptor]
 +
----------------------------------------------
 +
  Length              =  9
 +
  DescriptorType      = 02
 +
  wTotalLength        = 60
 +
  bNumInterfaces      = 1
 +
  bConfigurationValue = 1
 +
  iConfiguration      = 0
 +
  bmAttributes        = 0x80
 +
  MaxPower            = 150
 +
 
 +
    [Interface Descriptor]
 +
    ----------------------------------------------
 +
      Length              =  9
 +
      DescriptorType      = 04
 +
      bInterfaceNumber    = 0
 +
      bAlternateSetting  = 0
 +
      bNumEndpoints      = 6
 +
      bInterfaceClass    = 0xff
 +
      bInterfaceSubClass  = 0x00
 +
      bInterfaceProtocol  = 0x00
 +
      iInterface          = 0
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x01
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x02
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x03
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x81
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x82
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x83
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 0
 +
          bSynchAddress      = 0
 +
</pre>
 +
<pre>
 +
[Device Descriptor]
 +
----------------------------------------------
 +
  Length              = 18
 +
  DescriptorType      = 0x01
 +
  USB version        = 1.00
 +
  Vendor:Product      = 0ca3:0002
 +
  MaxPacketSize0      = 64
 +
  NumConfigurations  = 1
 +
  Device version      = 1.03
 +
  Device Class:SubClass:Protocol = 60:00:00
 +
 
 +
[Configuration Descriptor]
 +
----------------------------------------------
 +
  Length              =  9
 +
  DescriptorType      = 02
 +
  wTotalLength        = 88
 +
  bNumInterfaces      = 1
 +
  bConfigurationValue = 1
 +
  iConfiguration      = 0
 +
  bmAttributes        = 0x80
 +
  MaxPower            = 150
 +
 
 +
    [Interface Descriptor]
 +
    ----------------------------------------------
 +
      Length              =  9
 +
      DescriptorType      = 04
 +
      bInterfaceNumber    = 0
 +
      bAlternateSetting  = 0
 +
      bNumEndpoints      = 10
 +
      bInterfaceClass    = 0xff
 +
      bInterfaceSubClass  = 0x00
 +
      bInterfaceProtocol  = 0x00
 +
      iInterface          = 0
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x01
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x02
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x03
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x04
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x05
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x81
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x82
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x83
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x84
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 7
 +
          bSynchAddress      = 5
 +
 
 +
        [Endpoint Descriptor]
 +
        ----------------------------------------------
 +
          Length              =  7
 +
          DescriptorType      = 05
 +
          bEndpointAddress    = 0x85
 +
          bmAttributes        = 0x02
 +
          wMaxPacketSize      = 64
 +
          bInterval          = 0
 +
          bRefresh            = 0
 +
          bSynchAddress      = 0
 +
</pre>
 +
 
 +
== Related links ==
 +
[https://github.com/xqemu/xqemu/blob/xbox/hw/xbox/xid.c XID emulation in XQEMU]
  
== Related links ==
+
[https://docs.google.com/spreadsheets/d/1-c1tXfOMvaWuno3ixQyI_rPCQVAZA24N4v9OPZUSrCk/edit?usp=sharing Compilation of Xbox Controller Hardware Research]
[https://github.com/xqemu/xqemu/blob/xbox/hw/xbox/xid.c XID emulation in XQEMU]
 

Latest revision as of 13:26, 7 August 2024

Contents

XID Overview

XIDs are USB devices.

The hardware side is USB with a different plug while the software side is USB without HID-descriptors. Technicly a XID is a USB-hub for the Memory-Units and the XBL Communicator. The logical XID gamepad USB device is internally connected to that hub.


USB Adapters

The Xbox's Input devices are USB devices. As such, you can connect a keyboard to the Xbox, or a gamepad to your PC. In fact, Linux already has drivers for the gamepad. In order to preserve Xbox hardware, please do not cut OEM Xbox cables to make an adapter; decent adapters can be acquired cheaply (~$10 USD ea. on 2017.04.30).

Wiring diagram to show how male Xbox controller plug maps to standard female USB connector. White cable color is depicted as gray for better visibility. The yellow cable is not connected to the USB side, as it's exclusive to Xbox.
Port (From) Plug (To) Link
Xbox USB-A Amazon Aliexpress
USB-A Xbox Amazon Aliexpress

Wiring

Untested / unverified! Take this with a grain of salt.

Pin Typical cable color Description
1 Red VCC
2 White USB D+
3 Green USB D-
4 Yellow VBlank signal from video output (for Lightguns)
5 Black GND

Protocol

XID are similar to HID but have custom Vendor requests

Control Transfers

GET_DESCRIPTOR
  • bmRequestType: 0xC1
  • bRequest: 6
  • wValue: 0x4200
  • wIndex: Interface number
  • wLength: <length of respective report; typically 16>

Actual length is truncated to size of descriptor or wLength. Whichever is smaller.

typedef struct XIDDescriptor {
    uint8_t bLength;
    uint8_t bDescriptorType;
    uint16_t bcdXid;
    uint8_t bType;
    uint8_t bSubType;
    uint8_t bMaxInputReportSize;
    uint8_t bMaxOutputReportSize;
    uint16_t wAlternateProductIds[4];
};

bDescriptorType is probably always 0x42.

bType = 1: Xbox Gamecontroller
  • bSubType:
    • 0x01 = Gamepad (Duke)
    • 0x02 = Gamepad (Controller-S)
    • 0x10 = Steering wheel
    • 0x20 = Arcade Stick
    • 0x50 = Light gun
bType = 3: Xbox DVD Movie Playback IR Dongle
  • bSubType:
    • 0x00
bType = 128: Steel Battalion
  • bSubType:
    • 0x01
Example XID reports

This is an example XID descriptor taken from a Controller-S (VID 0x045E / PID 0x0289).

bLength              0x10 (16 bytes)
bDescriptorType      0x42
bcdXid               0x0100 (USB 1.0)
bType                0x01
bSubType             0x02
bMaxInputReportSize  0x14 (20 bytes)
bMaxOutputReportSize 0x06 (6 bytes)
wAlternateProductIds 4 x 0xFFFF

This is an example XID descriptor taken from a Steel Battalion controller.

bLength              0x10 (16 bytes)
bDescriptorType      0x42
bcdXid               0x0100 (USB 1.0)
bType                0x80
bSubType             0x01
bMaxInputReportSize  0x1A (26 bytes)
bMaxOutputReportSize 0x16 (22 bytes)
wAlternateProductIds 4 x 0xFFFF

This is an example XID descriptor taken from an official Microsoft DVD Movie Playback IR dongle.

bLength              0x08 (8 bytes)
bDescriptorType      0x42
bcdXid               0x0100 (USB 1.0)
bType                0x03
bSubType             0x00
bMaxInputReportSize  0x06 (6 bytes)
bMaxOutputReportSize 0x00 (0 bytes)
GET_CAPABILITIES
  • bmRequestType: 0xC1
  • bRequest: 1
  • wValue:
    • 0x0100 for input
    • 0x0200 for output
  • wIndex: Interface number
  • wLength: <length of respective report>


  • STALL if wValue not supported.

Actual length is truncated to size of report or wLength. Whichever is smaller.

typedef struct XIDGamepadCapabilities {
    uint8_t bReportId;
    uint8_t bLength;
    <Data>
}

The data will be similar to the GET_REPORT, but instead of storing actual values, it will have bits set (1) where the bit is valid in the respective report. If the bit is auto-generated, it will be cleared (0).

SET_REPORT
  • bmRequestType: 0x21
  • bRequest: 9
  • wValue: 0x0200
  • wIndex: Interface number
  • wLength: <length of report; typically 6>


  • STALL if wValue not supported.
Typical report
typedef struct XIDGamepadReport {
    uint8_t bReportId;
    uint8_t bLength;
    <Data>
}
GET_REPORT
  • bmRequestType: 0xA1
  • bRequest: 1
  • wValue: 0x0100
  • wIndex: Interface number
  • wLength: <length of report; typically 20>


  • STALL if wValue not supported or if wLength is greater than report size.
  • ACK if supported.
Typical report
typedef struct XIDGamepadOutputReport {
    uint8_t report_id; //FIXME: is this correct?
    uint8_t length;
    <Data>
}

Interrupt transfers

Alternatively interrupt-in and interrupt-out transfers can be used for GET_REPORT and SET_REPORT respectively.

In case of the interrupt-in, there is another status which can occur now:

  • NAK if supported but no changes since last ACK.

Standard Gamepads

Microsoft Hardware Variants

There are a few hardware re-designs of the Microsoft Gamepad.

Controller Name Part Number Board Model Notes Datasheets
Xbox Game Controller (AKA "Duke") X08-17160 23-0819B Earliest known model[FIXME]. 3 IC's: Dedicated ST 92163/JFL Micro Controller, dedicated AT43USB401 USB Controller, 4 Channel Analog Mux LW052A. ST 92163/JFL, AT43USB401[FIXME], LW052A
Xbox Game Controller (AKA "Duke") X08-17160 K023B121 Same as 23-0819B, but manufactured in China. Only Board Model that does not follow naming conventions. Hardware identical. Easily identified by a serial number that starts with "KD". ST 92163/JFL, AT43USB401[FIXME], LW052A
Xbox Game Controller (AKA "Duke") X08-17160 23-0819C Last known Duke model.[FIXME]. Identical to 23-0819B in hardware, new silkscreen markings show this model is UL-94 V-0 compliant. All boards after this are V-0 compliant. ST 92163/JFL, AT43USB401[FIXME], LW052A
Xbox Game Controller (Looks like an S, with green Xbox jewel) X08-19383 23-0923A Japan and Australia exclusive model[FIXME].Minification of "Duke" PCB Design. Has exact same IC's as the Duke, only in an S controller design. ST 92163/JFL, AT43USB401[FIXME], LW052A
Xbox Controller S X08-69873 23-0923B Minification of "Duke" PCB Design. Has exact same IC's as the Duke, only in an S controller design ST 92163/JFL, AT43USB401[FIXME], LW052A
Xbox Controller S X08-69873 23-0923H Entirely new PCB design. Single IC on the board, AT43USB355M-AC AT43USB355M-AC
Xbox Controller S X08-69873 23-0923I PCB Design almost exactly the same as H revision. Only difference is the IC is smaller: AT43USB353M-AC AT43USB353M-AC

There are also dedicated Part Numbers for color variants:

Controller Part Number Controller Description Board Model
X02332-001 Crystal S Controller 23-0923I
X09-64240-01 Transparent Green Controller 23-0923I
X800679-100 Black S With Halo Jewel 23-0923I

USB Descriptors

See https://github.com/xboxdrv/xboxdrv/blob/stable/src/xpad_device.cpp for a list of devices.

23-0819B

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x045e Microsoft Corp.
  idProduct          0x0202 Xbox Controller
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        88 Xbox
      bInterfaceSubClass     66 Controller
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4

K023B121

Identical to 23-0819B [FIXME]

23-0819C

Identical to 23-0819B [FIXME]

23-0923A

Changes from 23-0819B

Device Descriptor:
  idProduct: 0x0285

23-0923B

[FIXME]

23-0923H

Changes from 23-0819B

Device Descriptor
  bMaxPacketSize0: 8
  idProduct: 0x0289
  bcdDevice: 1.20
  Configuration Descriptor
    Interface Descriptor
      Endpoint Descriptor
        bEndpointAddress: 0x81

23-0923I

Changes from 23-0923H

Device Descriptor
  bcdDevice: 1.21

Controller to Xbox

20 bytes

Field Offset (Bytes) Mask Notes
Alt=Digital-Pad-Up 2 0x01
Alt=Digital-Pad-Down 2 0x02
Alt=Digital-Pad-Left 2 0x04
Alt=Digital-Pad-Right 2 0x08
Alt=START button 2 0x10
Alt=BACK button 2 0x20
Alt=Left-Thumbstick-Press 2 0x40
Alt=Right-Thumbstick-Press 2 0x80
Alt=A button 4 0xFF Button is analog
Alt=B button 5 0xFF Button is analog
Alt=X button 6 0xFF Button is analog
Alt=Y button 7 0xFF Button is analog
Alt=Black button 8 0xFF Button is analog
Alt=White button 9 0xFF Button is analog
Left-Trigger 10 0xFF Trigger is analog
Right-Trigger 11 0xFF Trigger is analog
Alt=Left-Thumbstick-Horizontal 12 0xFFFF Negative = Left; Positive = Right
Alt=Left-Thumbstick-Vertical 14 0xFFFF Negative = Down; Positive = Up
Alt=Right-Thumbstick-Horizontal 16 0xFFFF Negative = Left; Positive = Right
Alt=Right-Thumbstick-Vertical 18 0xFFFF Negative = Down; Positive = Up

Xbox to Controller

6 bytes

Field Offset (Bytes) Mask Notes
Left actuator strength 2 0xFFFF
Right actuator strength 4 0xFFFF

The Microsoft Controller S will not react to packets which don't have a value of 6 in the length field of the header. The Fanatec Speedster 3 ForceShock will still react to those. Further testing is necessary with other gamepads.

Steering wheels

MadCatz Wheel

[FIXME]

Fanatec Speedster 3 ForceShock

Pedals

The Pedals are not a USB device.

Note that the cable going to the pedals is also not a USB port despite using the Xbox controller breakaway plug. Likewise, plugging the pedals to a PC / Xbox won't provide a USB / XID (it is detected as garbage):

new full-speed USB device number 14 using xhci_hcd
device descriptor read/64, error -71
device descriptor read/64, error -71
new full-speed USB device number 15 using xhci_hcd
device descriptor read/64, error -71
device descriptor read/64, error -71
new full-speed USB device number 16 using xhci_hcd
Device not responding to setup address.
Device not responding to setup address.
device not accepting address 16, error -71
new full-speed USB device number 17 using xhci_hcd
Device not responding to setup address.
Device not responding to setup address.
device not accepting address 17, error -71
unable to enumerate USB device

Internal HUB

USB Descriptors

Power not connected, pedals not connected, not in Tuning mode:

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0         8
  idVendor           0x3767 
  idProduct          0x0102 
  bcdDevice            0.01
  iManufacturer           0 
  iProduct                1 End
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               64mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             3
  wHubCharacteristic 0x000d
    Per-port power switching
    Compound device
    Per-port overcurrent protection
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent     64 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0100 power
   Port 3: 0000.0100 power
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0003
  Self Powered
  Remote Wakeup Enabled

Steering wheel (and Pedals)

Always connected to port 1 of the internal HUB

USB Descriptors
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x3767 
  idProduct          0x0101 
  bcdDevice            2.80
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        88 Xbox
      bInterfaceSubClass     66 Controller
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

Arcade Sticks

Xbox TECMO Dead or Alive 3 ARCADE Stick Joystick Controller Japan

[FIXME]

Street Fighter 15th Anniversary Edition Arcade Stick

[FIXME]

Gamester Xbox Arcade Stick

[FIXME]

Nuby Xbox Fighter Arcade Stick

[FIXME]

Nuby Xbox Arcade Super Stick

[FIXME]

The source image of the box and on device has item#:36020.

Naki Ultimate Fighting Stick

[FIXME]

YouTube reviewer report this joystick to have rumble support.

Light guns

Light guns use similar input and output reports to standard gamepads. Their bSubType is set to 0x50. They report where they are aimed in place of the left stick coordinates, and an extra bit at offset 3 in their input reports flags whether the light gun is currently pointed at the screen or not. Light guns may not function properly if they are not supplied with a video sync signal (they may not populate their input reports correctly, or even fail to enumerate as USB devices entirely).

Controller to Xbox

20 bytes

Field Offset (Bytes) Mask Notes
Alt=Digital-Pad-Up 2 0x01
Alt=Digital-Pad-Down 2 0x02
Alt=Digital-Pad-Left 2 0x04
Alt=Digital-Pad-Right 2 0x08
Alt=START button 2 0x10
Alt=BACK button 2 0x20
Light visible 3 0x20 Set to 1 if the gun is pointed to a bright screen, 0 if no light visible.
Unknown 1 3 0x40 Light guns from different manufacturers include these two bits in their GET_CAPABILITIES reports, but they always seem to read back as 0 in GET_REPORT.
Unknown 2 3 0x80
Alt=A button Trigger 4 0xFF Digital only, either 0 or 255
Alt=B button 5 0xFF
Alt=X button 6 0xFF
Alt=Y button 7 0xFF
Alt=Black button 8 0xFF
Alt=White button 9 0xFF
Alt=Left-Thumbstick-Horizontal 12 0xFFFF Absolute position using the full stick range.

(0, 0) is the center of the screen and is also reported if the light gun is pointed off-screen.

Alt=Left-Thumbstick-Vertical 14 0xFFFF

Xbox to Controller

Force feedback: wValue: 0x0200, wLength: 6

6 bytes

Field Offset (Bytes) Mask Notes
Actuator strength 2 0xFFFF
(Unused) 4 0x0000

The 4Gamers-branded gun (which appears to be sold by a number of different manufacturers) only reports it has the left actuator, however it only responds to force feedback output reports for the right actuator. Games appear to always enable both actuators, whether the controller reports it has both or not.

Calibration: wValue: 0x0201, wLength: 10

10 bytes

Field Offset (Bytes) Mask Notes
Center calibration X 2 0xFFFF Gun's reported value subtracted from (0,0)
Center calibration Y 4 0xFFFF
Top left calibration X 6 0xFFFF Gun's reported value subtracted from (-25000,25000)
Top left calibration Y 8 0xFFFF

Light guns are expected to handle their own calibration, i.e. the game will tell the gun the offsets between its reported position and the expected position and then expect the gun to offset and scale its output to compensate. The calibration process runs as follows:

  1. The game will first send a calibration report with all four offsets reset to (0, 0), (0, 0) to reset any offsets and scaling.
  2. The game will now display a target in the centre of the screen and ask you to shoot it. This will tell it how "wrong" the gun is when aimed at where it thinks (0, 0) should be on the screen. If the gun normally shoots slightly too high and further to the right, it might report (1000, 3000) for example.
  3. The game sends a calibration report to the gun to negate the offset, e.g. (-1000, -3000), (0, 0) using our example of (1000, 3000) from before.
  4. The game will now display a target in at (-25000, 25000) on the screen and ask you to shoot it. This will tell it how "wrong" the gun is when aimed at the top left of the screen.
  5. The coordinates received from the gun will be subtracted from the expected (-25000, 25000) and sent back to the gun in the second part of the calibration report along with the values previously determined for the centre position. If the first calibration was enough to adjust the screen offset we might have seen the "perfect" coordinates of (-25000, 25000) in which case the report would be (-1000, -3000), (0, 0) again. However, if our gun read the coordinates slightly closer the the middle of the screen at (-20000, 22000) then the report would be (-1000, -3000), (5000, -3000).

If the light gun does not handle the calibration output report then you will not be able to get past the calibration screen in The House of the Dead III.

EMS TopGun II

This is an unlicensed / unofficial Xbox accessory.

The website for this product can be found at http://www.hkems.com/product/xbox/EMSTopGun2.htm

The gun presents itself as a standard Xbox gamepad. It uses a different USB descriptor for Xbox (X) and the other mode (P). There is no internal hub in this device.

EMS TopGun II Xbox Gamepad Notes
Stick Alt=Digital-Pad
Trigger Alt=A button Digital only, either 0 or 255
Grip Alt=B button
A Alt=X button
B Alt=Y button
START Alt=START button
SE/BA Alt=BACK button
Aim Left / Right Alt=Left-Thumbstick-Horizontal Absolute position using the full stick range
Aim Up / Down Alt=Left-Thumbstick-Vertical

There is no right thumbstick, thumbstick presses, black/white button or trigger buttons (All of those read constant zeros).

Turbo Mode
  • Turbo mode 0 keeps Alt=A button pressed while trigger is held
  • Turbo mode 1 toggles Alt=A button rapidly while trigger is held
  • Turbo mode 2 toggles Alt=A button rapidly and once in a while Alt=B button while trigger is held
Force Feedback

The upper part of the gun is moveable and should push back to simulate recoil (possibly hurting your thumb while you are using the stick). I could not get the force feedback working, but I'm sure I've had it working in the past on PC.[citation needed]

USB Descriptors

This is the descriptor in the Xbox mode (X).

Bus 003 Device 016: ID 0b9a:016b  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0b9a 
  idProduct          0x016b 
  bcdDevice            4.57
  iManufacturer           1 EMS̖E
  iProduct                2 EMS TopGun
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        88 Xbox
      bInterfaceSubClass     66 Controller
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               8
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

Joytech Sharp Shooter

This is an unlicensed / unofficial Xbox accessory.

The third party light gun from Joytech reports itself as 2 devices and mentions pattent US6287198 it came with a detachable viewfinder scope without any magnification. a red dot apears in the viewfinder, its a reflection of a red led, powered by the gun over usb.

model numer: JS-901D

Joytech Sharp Shooter Xbox Gamepad Notes
Stick Alt=Digital-Pad
Trigger Alt=A button Digital only, either 0 or 255 [citation needed]
B (Left side) Alt=B button
B (Right side)
B (Magazine button)
x Alt=X button
y Alt=Y button
START Alt=START button
BACK Alt=BACK button
Aim Left / Right Alt=Left-Thumbstick-Horizontal [citation needed]
Aim Up / Down Alt=Left-Thumbstick-Vertical [citation needed]

There is no right thumbstick, thumbstick presses, black/white button or trigger buttons [citation needed]

Fire/Reload Mode
  • Normal mode does nothing, normal operation
  • Auto reload mode toggles Alt=B button rapidly to rappidly reload [citation needed]
  • Auto fire+reload mode toggles Alt=A button + Alt=B button rapidly [citation needed]

USB Descriptors


Bus 003 Device 025: ID 1292:3006 Innomedia 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x1292 Innomedia
  idProduct          0x3006 
  bcdDevice            1.50
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          1 (error)
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        88 Xbox
      bInterfaceSubClass     66 Controller
      bInterfaceProtocol      0 
      iInterface              2 (error)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4

Bus 003 Device 024: ID 1292:3006 Innomedia 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0         8
  idVendor           0x1292 Innomedia
  idProduct          0x3006 
  bcdDevice            1.50
  iManufacturer           1 (c) 2004 R0R3 Inc.
  iProduct                2 US Patent 6,287,198
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 (c) R0R3 Devices Inc. US Patent 6,287,19Ē
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               64mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              5 (error)
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval             255
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             3
  wHubCharacteristic 0x000d
    Per-port power switching
    Compound device
    Per-port overcurrent protection
  bPwrOn2PwrGood       32 * 2 milli seconds
  bHubContrCurrent     64 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0x0e
 Hub Port Status:
   Port 1: 0000.0103 power enable connect
   Port 2: 0000.0100 power
   Port 3: 0100.0100 power
Device Status:     0x0000
  (Bus Powered)

Microphones

Xbox Communicator

USB Descriptor

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x045e Microsoft Corp.
  idProduct          0x0283 Xbox Communicator
  bcdDevice            1.58
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x002d
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       120 
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0030  1x 48 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       120 
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0030  1x 48 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0

Xbox Karaoke

USB Descriptor

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x045e Microsoft Corp.
  idProduct          0x0501 
  bcdDevice            1.00
  iManufacturer           1 Licensed 3PP Vendor
  iProduct                2 Karaoke Microphone Module
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x001b
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       121 
      bInterfaceSubClass      1 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0060  1x 96 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0

Steel Battalion Controller

Steel Battalion Controller Layout

USB Descriptors

Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0a7b
  idProduct          0xd000
  bcdDevice            1.00
  iManufacturer           0
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        88 Xbox
      bInterfaceSubClass     66 Controller
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               4

Controller to Xbox

From http://steelbattalionnet.codeplex.com/SourceControl/latest#SBC/SteelBattalionController.cs

26 bytes

Field Offset (Bytes) Mask Notes
RightJoyMainWeapon 2 0x01
RightJoyFire 2 0x02
RightJoyLockOn 2 0x04
Eject 2 0x08
CockpitHatch 2 0x10
Ignition 2 0x20
Start 2 0x40
MultiMonOpenClose 2 0x80
MultiMonMapZoomInOut 3 0x01
MultiMonModeSelect 3 0x02
MultiMonSubMonitor 3 0x04
MainMonZoomIn 3 0x08
MainMonZoomOut 3 0x10
FunctionFSS 3 0x20
FunctionManipulator 3 0x40
FunctionLineColorChange 3 0x80
Washing 4 0x01
Extinguisher 4 0x02
Chaff 4 0x04
FunctionTankDetach 4 0x08
FunctionOverride 4 0x10
FunctionNightScope 4 0x20
FunctionF1 4 0x40
FunctionF2 4 0x80
FunctionF3 5 0x01
WeaponConMain 5 0x02
WeaponConSub 5 0x04
WeaponConMagazine 5 0x08
Comm1 5 0x10
Comm2 5 0x20
Comm3 5 0x40
Comm4 5 0x80
Comm5 6 0x01
LeftJoySightChange 6 0x02
ToggleFilterControl 6 0x04
ToggleOxygenSupply 6 0x08
ToggleFuelFlowRate 6 0x10
ToggleBuffreMaterial 6 0x20
ToggleVTLocation 6 0x40
6 0x80
7 0xFF
8 0xFF
AimingX 9 0xFFFF "Aiming Lever" joystick on the right. Unsigned X Axis value: 0 (Left) to 0xFFFF (Right).
AimingY 11 0xFFFF "Aiming Lever" joystick on the right. Unsigned Y Axis value: 0 (Top) to 0xFFFF (Bottom).
RotationLever 13 0xFFFF "Rotation Lever" joystick on the left. Signed X Axis value: -0x7FFF (Left) to 0x7FFF (Right)
SightChangeX 15 0xFFFF "Sight Change" analog stick on the "Rotation Lever" joystick. Signed X Axis value: -0x7FFF (Left) to 0x7FFF (Right)
SightChangeY 17 0xFFFF "Sight Change" analog stick on the "Rotation Lever" joystick. Signed Y Axis value: -0x7FFF (Top) to 0x7FFF (Bottom)
LeftPedal 19 0xFFFF
MiddlePedal 21 0xFFFF
RightPedal 23 0xFFFF
TunerDial 24 0x0F The 9 o'clock postion is 0, and the 6 o'clock position is 12. The blank area between the 6 and 9 o'clock positions is 13, 14, and 15 clockwise.
24 0xF0
GearLever 25 0xFF The gear lever on the left block. R = -2, N = -1, 1st = 1, 2nd = 2, 3rd = 3, 4th = 4, 5th = 5. If the shifter is between two gears this value will be 0.

Xbox to Controller

From http://steelbattalionnet.codeplex.com/SourceControl/latest#SBC/SteelBattalionController.cs

22 bytes

Field Offset (Bytes) Mask Notes
Start 0 0x00 This will always be 0x00
bLen 1 0x16 This will always be 0x16 (22 bytes)
EmergencyEject 2 0x0F
CockpitHatch 2 0xF0
Ignition 3 0x0F
Start 3 0xF0
OpenClose 4 0x0F
MapZoomInOut 4 0xF0
ModeSelect 5 0x0F
SubMonitorModeSelect 5 0xF0
MainMonitorZoomIn 6 0x0F
MainMonitorZoomOut 6 0xF0
ForecastShootingSystem 7 0x0F
Manipulator 7 0xF0
LineColorChange 8 0x0F
Washing 8 0xF0
Extinguisher 9 0x0F
Chaff 9 0xF0
TankDetach 10 0x0F
Override 10 0xF0
NightScope 11 0x0F
F1 11 0xF0
F2 12 0x0F
F3 12 0xF0
MainWeaponControl 13 0x0F
SubWeaponControl 13 0xF0
MagazineChange 14 0x0F
Comm1 14 0xF0
Comm2 15 0x0F
Comm3 15 0xF0
Comm4 16 0x0F
Comm5 16 0xF0
17 0x0F
GearR 17 0xF0
GearN 18 0x0F
Gear1 18 0xF0
Gear2 19 0x0F
Gear3 19 0xF0
Gear4 20 0x0F
Gear5 20 0xF0
Unused? 21

SEGA Chihiro Baseboard

Contains 2 USB devices which directly attach to USB ports 3 & 4 (player 0, 1)

USB Descriptors

[Device Descriptor]
----------------------------------------------
  Length              = 18
  DescriptorType      = 0x01
  USB version         = 1.00
  Vendor:Product      = 0ca3:0003
  MaxPacketSize0      = 64
  NumConfigurations   = 1
  Device version      = 1.03
  Device Class:SubClass:Protocol = 60:01:00

[Configuration Descriptor]
----------------------------------------------
  Length              =  9
  DescriptorType      = 02
  wTotalLength        = 60
  bNumInterfaces      = 1
  bConfigurationValue = 1
  iConfiguration      = 0
  bmAttributes        = 0x80
  MaxPower            = 150

    [Interface Descriptor]
    ----------------------------------------------
      Length              =  9
      DescriptorType      = 04
      bInterfaceNumber    = 0
      bAlternateSetting   = 0
      bNumEndpoints       = 6
      bInterfaceClass     = 0xff
      bInterfaceSubClass  = 0x00
      bInterfaceProtocol  = 0x00
      iInterface          = 0

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x01
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x02
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x03
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x81
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x82
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x83
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 0
          bSynchAddress       = 0
[Device Descriptor]
----------------------------------------------
  Length              = 18
  DescriptorType      = 0x01
  USB version         = 1.00
  Vendor:Product      = 0ca3:0002
  MaxPacketSize0      = 64
  NumConfigurations   = 1
  Device version      = 1.03
  Device Class:SubClass:Protocol = 60:00:00

[Configuration Descriptor]
----------------------------------------------
  Length              =  9
  DescriptorType      = 02
  wTotalLength        = 88
  bNumInterfaces      = 1
  bConfigurationValue = 1
  iConfiguration      = 0
  bmAttributes        = 0x80
  MaxPower            = 150

    [Interface Descriptor]
    ----------------------------------------------
      Length              =  9
      DescriptorType      = 04
      bInterfaceNumber    = 0
      bAlternateSetting   = 0
      bNumEndpoints       = 10
      bInterfaceClass     = 0xff
      bInterfaceSubClass  = 0x00
      bInterfaceProtocol  = 0x00
      iInterface          = 0

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x01
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x02
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x03
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x04
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x05
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x81
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x82
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x83
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x84
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 7
          bSynchAddress       = 5

        [Endpoint Descriptor]
        ----------------------------------------------
          Length              =  7
          DescriptorType      = 05
          bEndpointAddress    = 0x85
          bmAttributes        = 0x02
          wMaxPacketSize      = 64
          bInterval           = 0
          bRefresh            = 0
          bSynchAddress       = 0

Related links

XID emulation in XQEMU

Compilation of Xbox Controller Hardware Research