<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://xboxdevwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=QuantX</id>
		<title>xboxdevwiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://xboxdevwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=QuantX"/>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/Special:Contributions/QuantX"/>
		<updated>2026-05-21T06:26:38Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>https://xboxdevwiki.net/index.php?title=Xbox_Input_Devices&amp;diff=7357</id>
		<title>Xbox Input Devices</title>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/index.php?title=Xbox_Input_Devices&amp;diff=7357"/>
				<updated>2024-02-06T07:42:46Z</updated>
		
		<summary type="html">&lt;p&gt;QuantX: Updated description of Steel Battalion Controller input/output format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== XID Overview ==&lt;br /&gt;
&lt;br /&gt;
XIDs are USB devices.&lt;br /&gt;
&lt;br /&gt;
The hardware side is USB with a different plug while the software side is USB without HID-descriptors.&lt;br /&gt;
Technicly a XID is a USB-hub for the Memory-Units and the XBL Communicator.&lt;br /&gt;
The logical XID gamepad USB device is internally connected to that hub.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== USB Adapters ===&lt;br /&gt;
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).                              &lt;br /&gt;
&lt;br /&gt;
[[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.]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;                                                          &lt;br /&gt;
|- &lt;br /&gt;
! Port (From)&lt;br /&gt;
! Plug (To)&lt;br /&gt;
! Link&lt;br /&gt;
|-&lt;br /&gt;
| Xbox&lt;br /&gt;
| USB-A &lt;br /&gt;
| [https://www.amazon.com/gp/product/B000RT2868 Amazon] [https://www.aliexpress.com/item/32948906701.html Aliexpress]&lt;br /&gt;
|-&lt;br /&gt;
| USB-A&lt;br /&gt;
| Xbox&lt;br /&gt;
| [https://www.amazon.com/gp/product/B00F52LQHO Amazon] [https://www.aliexpress.com/item/4000452932782.html Aliexpress]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Wiring ===&lt;br /&gt;
&lt;br /&gt;
Untested / unverified! Take this with a grain of salt.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Pin&lt;br /&gt;
!Typical cable color&lt;br /&gt;
!Description&lt;br /&gt;
|-                                                            &lt;br /&gt;
|1&lt;br /&gt;
|Red&lt;br /&gt;
|VCC&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|White&lt;br /&gt;
|USB D+&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|Green&lt;br /&gt;
|USB D-&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|Yellow&lt;br /&gt;
|VBlank signal from video output (for Lightguns)&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|Black&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Protocol ===&lt;br /&gt;
&lt;br /&gt;
XID are similar to HID but have custom Vendor requests&lt;br /&gt;
&lt;br /&gt;
==== Control Transfers ====&lt;br /&gt;
&lt;br /&gt;
===== GET_DESCRIPTOR =====&lt;br /&gt;
&lt;br /&gt;
* bmRequestType: 0xC1&lt;br /&gt;
* bRequest: 6&lt;br /&gt;
* wValue: 0x4200&lt;br /&gt;
* wIndex: Interface number&lt;br /&gt;
* wLength: &amp;lt;length of respective report; typically 16&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Actual length is truncated to size of descriptor or wLength. Whichever is smaller. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef struct XIDDescriptor {&lt;br /&gt;
    uint8_t bLength;&lt;br /&gt;
    uint8_t bDescriptorType;&lt;br /&gt;
    uint16_t bcdXid;&lt;br /&gt;
    uint8_t bType;&lt;br /&gt;
    uint8_t bSubType;&lt;br /&gt;
    uint8_t bMaxInputReportSize;&lt;br /&gt;
    uint8_t bMaxOutputReportSize;&lt;br /&gt;
    uint16_t wAlternateProductIds[4];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
bDescriptorType is probably always 0x42.&lt;br /&gt;
&lt;br /&gt;
====== bType = 1: Xbox Gamecontroller ======&lt;br /&gt;
&lt;br /&gt;
* bSubType:&lt;br /&gt;
** 0x01 = Gamepad (Duke)&lt;br /&gt;
** 0x02 = Gamepad (Controller-S)&lt;br /&gt;
** 0x10 = Steering wheel&lt;br /&gt;
** 0x20 = Arcade Stick&lt;br /&gt;
** 0x50 = Light gun&lt;br /&gt;
&lt;br /&gt;
====== bType = 3: Xbox DVD Movie Playback IR Dongle======&lt;br /&gt;
&lt;br /&gt;
* bSubType:&lt;br /&gt;
** 0x00&lt;br /&gt;
&lt;br /&gt;
====== bType = 128: Steel Battalion ======&lt;br /&gt;
&lt;br /&gt;
* bSubType:&lt;br /&gt;
** 0x01&lt;br /&gt;
&lt;br /&gt;
====== Example XID reports ======&lt;br /&gt;
&lt;br /&gt;
This is an example XID descriptor taken from a Controller-S (VID 0x045E / PID 0x0289).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bLength              0x10 (16 bytes)&lt;br /&gt;
bDescriptorType      0x42&lt;br /&gt;
bcdXid               0x0100 (USB 1.0)&lt;br /&gt;
bType                0x01&lt;br /&gt;
bSubType             0x02&lt;br /&gt;
bMaxInputReportSize  0x14 (20 bytes)&lt;br /&gt;
bMaxOutputReportSize 0x06 (6 bytes)&lt;br /&gt;
wAlternateProductIds 4 x 0xFFFF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an example XID descriptor taken from a Steel Battalion controller.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bLength              0x10 (16 bytes)&lt;br /&gt;
bDescriptorType      0x42&lt;br /&gt;
bcdXid               0x0100 (USB 1.0)&lt;br /&gt;
bType                0x80&lt;br /&gt;
bSubType             0x01&lt;br /&gt;
bMaxInputReportSize  0x1A (26 bytes)&lt;br /&gt;
bMaxOutputReportSize 0x16 (22 bytes)&lt;br /&gt;
wAlternateProductIds 4 x 0xFFFF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is an example XID descriptor taken from an official Microsoft DVD Movie Playback IR dongle.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bLength              0x08 (8 bytes)&lt;br /&gt;
bDescriptorType      0x42&lt;br /&gt;
bcdXid               0x0100 (USB 1.0)&lt;br /&gt;
bType                0x03&lt;br /&gt;
bSubType             0x00&lt;br /&gt;
bMaxInputReportSize  0x06 (6 bytes)&lt;br /&gt;
bMaxOutputReportSize 0x00 (0 bytes)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== GET_CAPABILITIES =====&lt;br /&gt;
&lt;br /&gt;
* bmRequestType: 0xC1&lt;br /&gt;
* bRequest: 1&lt;br /&gt;
* wValue:&lt;br /&gt;
** 0x0100 for input&lt;br /&gt;
** 0x0200 for output&lt;br /&gt;
* wIndex: Interface number&lt;br /&gt;
* wLength: &amp;lt;length of respective report&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* STALL if wValue not supported.&lt;br /&gt;
&lt;br /&gt;
Actual length is truncated to size of report or wLength. Whichever is smaller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef struct XIDGamepadCapabilities {&lt;br /&gt;
    uint8_t bReportId;&lt;br /&gt;
    uint8_t bLength;&lt;br /&gt;
    &amp;lt;Data&amp;gt;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
If the bit is auto-generated, it will be cleared (0).&lt;br /&gt;
&lt;br /&gt;
===== SET_REPORT =====&lt;br /&gt;
&lt;br /&gt;
* bmRequestType: 0x21&lt;br /&gt;
* bRequest: 9&lt;br /&gt;
* wValue: 0x0200&lt;br /&gt;
* wIndex: Interface number&lt;br /&gt;
* wLength: &amp;lt;length of report; typically 6&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* STALL if wValue not supported.&lt;br /&gt;
&lt;br /&gt;
====== Typical report ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef struct XIDGamepadReport {&lt;br /&gt;
    uint8_t bReportId;&lt;br /&gt;
    uint8_t bLength;&lt;br /&gt;
    &amp;lt;Data&amp;gt;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== GET_REPORT =====&lt;br /&gt;
&lt;br /&gt;
* bmRequestType: 0xA1&lt;br /&gt;
* bRequest: 1&lt;br /&gt;
* wValue: 0x0100&lt;br /&gt;
* wIndex: Interface number&lt;br /&gt;
* wLength: &amp;lt;length of report; typically 20&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* STALL if wValue not supported or if wLength is greater than report size.&lt;br /&gt;
* ACK if supported.&lt;br /&gt;
&lt;br /&gt;
====== Typical report ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef struct XIDGamepadOutputReport {&lt;br /&gt;
    uint8_t report_id; //FIXME: is this correct?&lt;br /&gt;
    uint8_t length;&lt;br /&gt;
    &amp;lt;Data&amp;gt;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Interrupt transfers ====&lt;br /&gt;
&lt;br /&gt;
Alternatively interrupt-in and interrupt-out transfers can be used for GET_REPORT and SET_REPORT respectively.&lt;br /&gt;
&lt;br /&gt;
In case of the interrupt-in, there is another status which can occur now:&lt;br /&gt;
&lt;br /&gt;
* NAK if supported but no changes since last ACK.&lt;br /&gt;
&lt;br /&gt;
== Standard Gamepads ==&lt;br /&gt;
&lt;br /&gt;
=== Microsoft Hardware Variants ===&lt;br /&gt;
&lt;br /&gt;
There are a few hardware re-designs of the Microsoft Gamepad.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Controller Name&lt;br /&gt;
!Part Number&lt;br /&gt;
!Board Model&lt;br /&gt;
!Notes&lt;br /&gt;
!Datasheets&lt;br /&gt;
|-&lt;br /&gt;
|Xbox Game Controller (AKA &amp;quot;Duke&amp;quot;)&lt;br /&gt;
|X08-17160&lt;br /&gt;
|23-0819B&lt;br /&gt;
|Earliest known model{{FIXME|Reason=Small sample size (5), can't confirm}}. 3 IC's: Dedicated ST 92163/JFL Micro Controller, dedicated AT43USB401 USB Controller, 4 Channel Analog Mux LW052A.&lt;br /&gt;
|[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]&lt;br /&gt;
|-&lt;br /&gt;
|Xbox Game Controller (AKA &amp;quot;Duke&amp;quot;)&lt;br /&gt;
|X08-17160&lt;br /&gt;
|K023B121&lt;br /&gt;
|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 &amp;quot;KD&amp;quot;.&lt;br /&gt;
|[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]&lt;br /&gt;
|-&lt;br /&gt;
|Xbox Game Controller (AKA &amp;quot;Duke&amp;quot;)&lt;br /&gt;
|X08-17160&lt;br /&gt;
|23-0819C&lt;br /&gt;
|Last known Duke model.{{FIXME|Reason=Small sample size (5), can't confirm}}. Identical to 23-0819B in hardware, new silkscreen markings show this model is [https://en.wikipedia.org/wiki/UL_94 UL-94 V-0 compliant]. All boards after this are V-0 compliant.&lt;br /&gt;
|[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]&lt;br /&gt;
|-&lt;br /&gt;
|Xbox Game Controller (Looks like an S, with green Xbox jewel)&lt;br /&gt;
|X08-19383&lt;br /&gt;
|23-0923A&lt;br /&gt;
|Japan and Australia exclusive model{{FIXME|Reason=Speculation, no hard source for this}}.Minification of &amp;quot;Duke&amp;quot; PCB Design. Has exact same IC's as the Duke, only in an S controller design.&lt;br /&gt;
|[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]&lt;br /&gt;
|-&lt;br /&gt;
|Xbox Controller S&lt;br /&gt;
|X08-69873&lt;br /&gt;
|23-0923B&lt;br /&gt;
|Minification of &amp;quot;Duke&amp;quot; PCB Design. Has exact same IC's as the Duke, only in an S controller design&lt;br /&gt;
|[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]&lt;br /&gt;
|-&lt;br /&gt;
|Xbox Controller S&lt;br /&gt;
|X08-69873&lt;br /&gt;
|23-0923H&lt;br /&gt;
|Entirely new PCB design. Single IC on the board, AT43USB355M-AC&lt;br /&gt;
|[https://archive.org/details/AT43USB355 AT43USB355M-AC]&lt;br /&gt;
|-&lt;br /&gt;
|Xbox Controller S&lt;br /&gt;
|X08-69873&lt;br /&gt;
|23-0923I&lt;br /&gt;
|PCB Design almost exactly the same as H revision. Only difference is the IC is smaller: AT43USB353M-AC &lt;br /&gt;
|[https://archive.org/details/AT43USB353M-AC AT43USB353M-AC]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There are also dedicated Part Numbers for color variants:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Controller Part Number&lt;br /&gt;
!Controller Description&lt;br /&gt;
!Board Model&lt;br /&gt;
|-&lt;br /&gt;
|X02332-001&lt;br /&gt;
|Crystal S Controller&lt;br /&gt;
|23-0923I&lt;br /&gt;
|-&lt;br /&gt;
|X09-64240-01&lt;br /&gt;
|Transparent Green Controller&lt;br /&gt;
|23-0923I&lt;br /&gt;
|-&lt;br /&gt;
|X800679-100&lt;br /&gt;
|Black S With Halo Jewel&lt;br /&gt;
|23-0923I&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== USB Descriptors ===&lt;br /&gt;
&lt;br /&gt;
See https://github.com/xboxdrv/xboxdrv/blob/stable/src/xpad_device.cpp for a list of devices.&lt;br /&gt;
&lt;br /&gt;
==== 23-0819B ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            0 &lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  idVendor           0x045e Microsoft Corp.&lt;br /&gt;
  idProduct          0x0202 Xbox Controller&lt;br /&gt;
  bcdDevice            1.00&lt;br /&gt;
  iManufacturer           0 &lt;br /&gt;
  iProduct                0 &lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           32&lt;br /&gt;
    bNumInterfaces          1&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          0 &lt;br /&gt;
    bmAttributes         0x80&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
    MaxPower              100mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        88 Xbox&lt;br /&gt;
      bInterfaceSubClass     66 Controller&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x82  EP 2 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0020  1x 32 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0020  1x 32 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== K023B121 ====&lt;br /&gt;
&lt;br /&gt;
Identical to 23-0819B {{FIXME|Reason=Confirm with xid-dumper tool}}&lt;br /&gt;
&lt;br /&gt;
==== 23-0819C ====&lt;br /&gt;
&lt;br /&gt;
Identical to 23-0819B {{FIXME|Reason=Confirm with xid-dumper tool}}&lt;br /&gt;
&lt;br /&gt;
==== 23-0923A ====&lt;br /&gt;
&lt;br /&gt;
Changes from 23-0819B&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  idProduct: 0x0285&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 23-0923B ====&lt;br /&gt;
&lt;br /&gt;
{{FIXME|Reason=No Descriptor Dump}}&lt;br /&gt;
&lt;br /&gt;
==== 23-0923H ====&lt;br /&gt;
&lt;br /&gt;
Changes from 23-0819B&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor&lt;br /&gt;
  bMaxPacketSize0: 8&lt;br /&gt;
  idProduct: 0x0289&lt;br /&gt;
  bcdDevice: 1.20&lt;br /&gt;
  Configuration Descriptor&lt;br /&gt;
    Interface Descriptor&lt;br /&gt;
      Endpoint Descriptor&lt;br /&gt;
        bEndpointAddress: 0x81&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== 23-0923I ====&lt;br /&gt;
&lt;br /&gt;
Changes from 23-0923H&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor&lt;br /&gt;
  bcdDevice: 1.21&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Controller to Xbox ===&lt;br /&gt;
&lt;br /&gt;
20 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field&lt;br /&gt;
!Offset (Bytes)&lt;br /&gt;
!Mask&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|{{input-dy+}}&lt;br /&gt;
|2&lt;br /&gt;
|0x01&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-dy-}}&lt;br /&gt;
|2&lt;br /&gt;
|0x02&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-dx-}}&lt;br /&gt;
|2&lt;br /&gt;
|0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-dx+}}&lt;br /&gt;
|2&lt;br /&gt;
|0x08&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-start}}&lt;br /&gt;
|2&lt;br /&gt;
|0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-back}}&lt;br /&gt;
|2&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-ls}}&lt;br /&gt;
|2&lt;br /&gt;
|0x40&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-rs}}&lt;br /&gt;
|2&lt;br /&gt;
|0x80&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-a}}&lt;br /&gt;
|4&lt;br /&gt;
|0xFF&lt;br /&gt;
|Button is analog&lt;br /&gt;
|-&lt;br /&gt;
|{{input-b}}&lt;br /&gt;
|5&lt;br /&gt;
|0xFF&lt;br /&gt;
|Button is analog&lt;br /&gt;
|-&lt;br /&gt;
|{{input-x}}&lt;br /&gt;
|6&lt;br /&gt;
|0xFF&lt;br /&gt;
|Button is analog&lt;br /&gt;
|-&lt;br /&gt;
|{{input-y}}&lt;br /&gt;
|7&lt;br /&gt;
|0xFF&lt;br /&gt;
|Button is analog&lt;br /&gt;
|-&lt;br /&gt;
|{{input-black}}&lt;br /&gt;
|8&lt;br /&gt;
|0xFF&lt;br /&gt;
|Button is analog&lt;br /&gt;
|-&lt;br /&gt;
|{{input-white}}&lt;br /&gt;
|9&lt;br /&gt;
|0xFF&lt;br /&gt;
|Button is analog&lt;br /&gt;
|-&lt;br /&gt;
|{{input-lt}}&lt;br /&gt;
|10&lt;br /&gt;
|0xFF&lt;br /&gt;
|Trigger is analog&lt;br /&gt;
|-&lt;br /&gt;
|{{input-rt}}&lt;br /&gt;
|11&lt;br /&gt;
|0xFF&lt;br /&gt;
|Trigger is analog&lt;br /&gt;
|-&lt;br /&gt;
|{{input-lx}}&lt;br /&gt;
|12&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|Negative = Left; Positive = Right&lt;br /&gt;
|-&lt;br /&gt;
|{{input-ly}}&lt;br /&gt;
|14&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|Negative = Down; Positive = Up&lt;br /&gt;
|-&lt;br /&gt;
|{{input-rx}}&lt;br /&gt;
|16&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|Negative = Left; Positive = Right&lt;br /&gt;
|-&lt;br /&gt;
|{{input-ry}}&lt;br /&gt;
|18&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|Negative = Down; Positive = Up&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Xbox to Controller ===&lt;br /&gt;
&lt;br /&gt;
6 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field&lt;br /&gt;
!Offset (Bytes)&lt;br /&gt;
!Mask&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Left actuator strength&lt;br /&gt;
|2&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Right actuator strength&lt;br /&gt;
|4&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Microsoft Controller S will not react to packets which don't have a value of 6 in the &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; field of the header.&lt;br /&gt;
The Fanatec Speedster 3 ForceShock will still react to those. Further testing is necessary with other gamepads.&lt;br /&gt;
&lt;br /&gt;
== Steering wheels ==&lt;br /&gt;
&lt;br /&gt;
=== MadCatz Wheel ===&lt;br /&gt;
&lt;br /&gt;
{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
=== Fanatec Speedster 3 ForceShock ===&lt;br /&gt;
&lt;br /&gt;
==== Pedals ====&lt;br /&gt;
&lt;br /&gt;
The Pedals are ''not'' a USB device.&lt;br /&gt;
&lt;br /&gt;
Note that the cable going to the pedals is also ''not'' a USB port despite using the Xbox controller breakaway plug.&lt;br /&gt;
Likewise, plugging the pedals to a PC / Xbox won't provide a USB / XID (it is detected as garbage):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new full-speed USB device number 14 using xhci_hcd&lt;br /&gt;
device descriptor read/64, error -71&lt;br /&gt;
device descriptor read/64, error -71&lt;br /&gt;
new full-speed USB device number 15 using xhci_hcd&lt;br /&gt;
device descriptor read/64, error -71&lt;br /&gt;
device descriptor read/64, error -71&lt;br /&gt;
new full-speed USB device number 16 using xhci_hcd&lt;br /&gt;
Device not responding to setup address.&lt;br /&gt;
Device not responding to setup address.&lt;br /&gt;
device not accepting address 16, error -71&lt;br /&gt;
new full-speed USB device number 17 using xhci_hcd&lt;br /&gt;
Device not responding to setup address.&lt;br /&gt;
Device not responding to setup address.&lt;br /&gt;
device not accepting address 17, error -71&lt;br /&gt;
unable to enumerate USB device&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Internal HUB ====&lt;br /&gt;
&lt;br /&gt;
===== USB Descriptors =====&lt;br /&gt;
&lt;br /&gt;
Power not connected, pedals not connected, not in Tuning mode:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            9 Hub&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 Full speed (or root) hub&lt;br /&gt;
  bMaxPacketSize0         8&lt;br /&gt;
  idVendor           0x3767 &lt;br /&gt;
  idProduct          0x0102 &lt;br /&gt;
  bcdDevice            0.01&lt;br /&gt;
  iManufacturer           0 &lt;br /&gt;
  iProduct                1 End&lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           25&lt;br /&gt;
    bNumInterfaces          1&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          0 &lt;br /&gt;
    bmAttributes         0xa0&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
      Remote Wakeup&lt;br /&gt;
    MaxPower               64mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         9 Hub&lt;br /&gt;
      bInterfaceSubClass      0 &lt;br /&gt;
      bInterfaceProtocol      0 Full speed (or root) hub&lt;br /&gt;
      iInterface              0 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0001  1x 1 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
Hub Descriptor:&lt;br /&gt;
  bLength               9&lt;br /&gt;
  bDescriptorType      41&lt;br /&gt;
  nNbrPorts             3&lt;br /&gt;
  wHubCharacteristic 0x000d&lt;br /&gt;
    Per-port power switching&lt;br /&gt;
    Compound device&lt;br /&gt;
    Per-port overcurrent protection&lt;br /&gt;
  bPwrOn2PwrGood       50 * 2 milli seconds&lt;br /&gt;
  bHubContrCurrent     64 milli Ampere&lt;br /&gt;
  DeviceRemovable    0x02&lt;br /&gt;
  PortPwrCtrlMask    0xff&lt;br /&gt;
 Hub Port Status:&lt;br /&gt;
   Port 1: 0000.0103 power enable connect&lt;br /&gt;
   Port 2: 0000.0100 power&lt;br /&gt;
   Port 3: 0000.0100 power&lt;br /&gt;
can't get debug descriptor: Resource temporarily unavailable&lt;br /&gt;
Device Status:     0x0003&lt;br /&gt;
  Self Powered&lt;br /&gt;
  Remote Wakeup Enabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steering wheel (and Pedals) ====&lt;br /&gt;
&lt;br /&gt;
Always connected to port 1 of the internal HUB&lt;br /&gt;
&lt;br /&gt;
===== USB Descriptors =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            0 &lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0         8&lt;br /&gt;
  idVendor           0x3767 &lt;br /&gt;
  idProduct          0x0101 &lt;br /&gt;
  bcdDevice            2.80&lt;br /&gt;
  iManufacturer           0 &lt;br /&gt;
  iProduct                0 &lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           32&lt;br /&gt;
    bNumInterfaces          1&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          0 &lt;br /&gt;
    bmAttributes         0x80&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
    MaxPower              100mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        88 Xbox&lt;br /&gt;
      bInterfaceSubClass     66 Controller&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x82  EP 2 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0020  1x 32 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0020  1x 32 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
can't get debug descriptor: Resource temporarily unavailable&lt;br /&gt;
Device Status:     0x0000&lt;br /&gt;
  (Bus Powered)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arcade Sticks ==&lt;br /&gt;
&lt;br /&gt;
=== Xbox TECMO Dead or Alive 3 ARCADE Stick Joystick Controller Japan ===&lt;br /&gt;
&lt;br /&gt;
{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
=== Street Fighter 15th Anniversary Edition Arcade Stick ===&lt;br /&gt;
&lt;br /&gt;
{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
=== Gamester Xbox Arcade Stick ===&lt;br /&gt;
&lt;br /&gt;
{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
=== Nuby Xbox Fighter Arcade Stick ===&lt;br /&gt;
&lt;br /&gt;
{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
=== Nuby Xbox Arcade Super Stick ===&lt;br /&gt;
&lt;br /&gt;
{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
The source image of the box and on device has item&amp;lt;nowiki&amp;gt;#:&amp;lt;/nowiki&amp;gt;36020.&lt;br /&gt;
&lt;br /&gt;
=== Naki Ultimate Fighting Stick ===&lt;br /&gt;
&lt;br /&gt;
{{FIXME}}&lt;br /&gt;
&lt;br /&gt;
[https://www.youtube.com/watch?v=4GphUsTzgds YouTube reviewer] report this joystick to have rumble support.&lt;br /&gt;
&lt;br /&gt;
== Light guns ==&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
&lt;br /&gt;
=== Controller to Xbox ===&lt;br /&gt;
&lt;br /&gt;
20 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field&lt;br /&gt;
!Offset (Bytes)&lt;br /&gt;
!Mask&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|{{input-dy+}}&lt;br /&gt;
|2&lt;br /&gt;
|0x01&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-dy-}}&lt;br /&gt;
|2&lt;br /&gt;
|0x02&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-dx-}}&lt;br /&gt;
|2&lt;br /&gt;
|0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-dx+}}&lt;br /&gt;
|2&lt;br /&gt;
|0x08&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-start}}&lt;br /&gt;
|2&lt;br /&gt;
|0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|{{input-back}}&lt;br /&gt;
|2&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Light visible&lt;br /&gt;
|3&lt;br /&gt;
|0x20&lt;br /&gt;
|Set to 1 if the gun is pointed to a bright screen, 0 if no light visible.&lt;br /&gt;
|-&lt;br /&gt;
|Unknown 1&lt;br /&gt;
|3&lt;br /&gt;
|0x40&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot; | 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.&lt;br /&gt;
|-&lt;br /&gt;
|Unknown 2&lt;br /&gt;
|3&lt;br /&gt;
|0x80&lt;br /&gt;
|-&lt;br /&gt;
|{{input-a}} Trigger&lt;br /&gt;
|4&lt;br /&gt;
|0xFF&lt;br /&gt;
|rowspan=&amp;quot;6&amp;quot; | Digital only, either 0 or 255&lt;br /&gt;
|-&lt;br /&gt;
|{{input-b}}&lt;br /&gt;
|5&lt;br /&gt;
|0xFF&lt;br /&gt;
|-&lt;br /&gt;
|{{input-x}}&lt;br /&gt;
|6&lt;br /&gt;
|0xFF&lt;br /&gt;
|-&lt;br /&gt;
|{{input-y}}&lt;br /&gt;
|7&lt;br /&gt;
|0xFF&lt;br /&gt;
|-&lt;br /&gt;
|{{input-black}}&lt;br /&gt;
|8&lt;br /&gt;
|0xFF&lt;br /&gt;
|-&lt;br /&gt;
|{{input-white}}&lt;br /&gt;
|9&lt;br /&gt;
|0xFF&lt;br /&gt;
|-&lt;br /&gt;
|{{input-lx}}&lt;br /&gt;
|12&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot; | Absolute position using the full stick range.&lt;br /&gt;
(0, 0) is the center of the screen and is also reported if the light gun is pointed off-screen.&lt;br /&gt;
|-&lt;br /&gt;
|{{input-ly}}&lt;br /&gt;
|14&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Xbox to Controller ===&lt;br /&gt;
&lt;br /&gt;
==== Force feedback: wValue: 0x0200, wLength: 6 ====&lt;br /&gt;
&lt;br /&gt;
6 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field&lt;br /&gt;
!Offset (Bytes)&lt;br /&gt;
!Mask&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Actuator strength&lt;br /&gt;
|2&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|(Unused)&lt;br /&gt;
|4&lt;br /&gt;
|0x0000&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Calibration: wValue: 0x0201, wLength: 10 ====&lt;br /&gt;
&lt;br /&gt;
10 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field&lt;br /&gt;
!Offset (Bytes)&lt;br /&gt;
!Mask&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Center calibration X&lt;br /&gt;
|2&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Gun's reported value subtracted from (0,0)&lt;br /&gt;
|-&lt;br /&gt;
|Center calibration Y&lt;br /&gt;
|4&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|-&lt;br /&gt;
|Top left calibration X&lt;br /&gt;
|6&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Gun's reported value subtracted from (-25000,25000)&lt;br /&gt;
|-&lt;br /&gt;
|Top left calibration Y&lt;br /&gt;
|8&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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:&lt;br /&gt;
&lt;br /&gt;
# The game will first send a calibration report with all four offsets reset to (0, 0), (0, 0) to reset any offsets and scaling.&lt;br /&gt;
# The game will now display a target in the centre of the screen and ask you to shoot it. This will tell it how &amp;quot;wrong&amp;quot; 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.&lt;br /&gt;
# 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.&lt;br /&gt;
# 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 &amp;quot;wrong&amp;quot; the gun is when aimed at the top left of the screen.&lt;br /&gt;
# 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 &amp;quot;perfect&amp;quot; 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).&lt;br /&gt;
&lt;br /&gt;
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''.&lt;br /&gt;
&lt;br /&gt;
=== EMS TopGun II ===&lt;br /&gt;
&lt;br /&gt;
''This is an unlicensed / unofficial Xbox accessory.''&lt;br /&gt;
&lt;br /&gt;
The website for this product can be found at http://www.hkems.com/product/xbox/EMSTopGun2.htm&lt;br /&gt;
&lt;br /&gt;
The gun presents itself as a standard Xbox gamepad. It uses a different USB descriptor for Xbox (X) and the other mode (P).&lt;br /&gt;
There is no internal hub in this device.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! EMS TopGun II !! Xbox Gamepad !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Stick || {{input-d}} ||&lt;br /&gt;
|-&lt;br /&gt;
| Trigger || {{input-a}} || rowspan=&amp;quot;4&amp;quot; | Digital only, either 0 or 255&lt;br /&gt;
|-&lt;br /&gt;
| Grip || {{input-b}}&lt;br /&gt;
|-&lt;br /&gt;
| A || {{input-x}}&lt;br /&gt;
|-&lt;br /&gt;
| B || {{input-y}}&lt;br /&gt;
|-&lt;br /&gt;
| START || {{input-start}} ||&lt;br /&gt;
|-&lt;br /&gt;
| SE/BA || {{input-back}} ||&lt;br /&gt;
|-&lt;br /&gt;
| Aim Left / Right || {{input-lx}} || rowspan=&amp;quot;2&amp;quot; | Absolute position using the full stick range&lt;br /&gt;
|-&lt;br /&gt;
| Aim Up / Down || {{input-ly}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is no right thumbstick, thumbstick presses, black/white button or trigger buttons (All of those read constant zeros).&lt;br /&gt;
&lt;br /&gt;
===== Turbo Mode =====&lt;br /&gt;
&lt;br /&gt;
* Turbo mode 0 keeps {{input-a}} pressed  while trigger is held&lt;br /&gt;
* Turbo mode 1 toggles {{input-a}} rapidly while trigger is held&lt;br /&gt;
* Turbo mode 2 toggles {{input-a}} rapidly and once in a while {{input-b}} while trigger is held&lt;br /&gt;
&lt;br /&gt;
===== Force Feedback =====&lt;br /&gt;
&lt;br /&gt;
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).&lt;br /&gt;
I could not get the force feedback working, but I'm sure I've had it working in the past on PC.{{citation needed}}&lt;br /&gt;
&lt;br /&gt;
==== USB Descriptors ====&lt;br /&gt;
&lt;br /&gt;
This is the descriptor in the Xbox mode (X).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Bus 003 Device 016: ID 0b9a:016b  &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            0 &lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0        64&lt;br /&gt;
  idVendor           0x0b9a &lt;br /&gt;
  idProduct          0x016b &lt;br /&gt;
  bcdDevice            4.57&lt;br /&gt;
  iManufacturer           1 EMS̖E&lt;br /&gt;
  iProduct                2 EMS TopGun&lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           32&lt;br /&gt;
    bNumInterfaces          1&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          0 &lt;br /&gt;
    bmAttributes         0x80&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
    MaxPower              100mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        88 Xbox&lt;br /&gt;
      bInterfaceSubClass     66 Controller&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0040  1x 64 bytes&lt;br /&gt;
        bInterval               8&lt;br /&gt;
can't get debug descriptor: Resource temporarily unavailable&lt;br /&gt;
Device Status:     0x0000&lt;br /&gt;
  (Bus Powered)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Joytech Sharp Shooter ===&lt;br /&gt;
&lt;br /&gt;
''This is an unlicensed / unofficial Xbox accessory.''&lt;br /&gt;
&lt;br /&gt;
The third party light gun from Joytech reports itself as 2 devices and mentions pattent [http://www.google.com/patents/US6287198 US6287198]&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
model numer: JS-901D&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Joytech Sharp Shooter !! Xbox Gamepad !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| Stick || {{input-d}} ||&lt;br /&gt;
|-&lt;br /&gt;
| Trigger || {{input-a}} || rowspan=&amp;quot;6&amp;quot; | Digital only, either 0 or 255 {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| B (Left side) || rowspan=&amp;quot;3&amp;quot; | {{input-b}}&lt;br /&gt;
|-&lt;br /&gt;
| B (Right side)&lt;br /&gt;
|-&lt;br /&gt;
| B (Magazine button)&lt;br /&gt;
|-&lt;br /&gt;
| x || {{input-x}}&lt;br /&gt;
|-&lt;br /&gt;
| y || {{input-y}}&lt;br /&gt;
|-&lt;br /&gt;
| START || {{input-start}} ||&lt;br /&gt;
|-&lt;br /&gt;
| BACK || {{input-back}} ||&lt;br /&gt;
|-&lt;br /&gt;
| Aim Left / Right || {{input-lx}} || {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| Aim Up / Down || {{input-ly}} || {{citation needed}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There is no right thumbstick, thumbstick presses, black/white button or trigger buttons {{citation needed}}&lt;br /&gt;
&lt;br /&gt;
===== Fire/Reload Mode =====&lt;br /&gt;
&lt;br /&gt;
* Normal mode does nothing, normal operation&lt;br /&gt;
* Auto reload mode toggles {{input-b}} rapidly to rappidly reload {{citation needed}} &lt;br /&gt;
* Auto fire+reload mode toggles {{input-a}} + {{input-b}} rapidly  {{citation needed}}&lt;br /&gt;
&lt;br /&gt;
==== USB Descriptors ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Bus 003 Device 025: ID 1292:3006 Innomedia &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            0 &lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0         8&lt;br /&gt;
  idVendor           0x1292 Innomedia&lt;br /&gt;
  idProduct          0x3006 &lt;br /&gt;
  bcdDevice            1.50&lt;br /&gt;
  iManufacturer           0 &lt;br /&gt;
  iProduct                0 &lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           32&lt;br /&gt;
    bNumInterfaces          1&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          1 (error)&lt;br /&gt;
    bmAttributes         0x80&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
    MaxPower              100mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        88 Xbox&lt;br /&gt;
      bInterfaceSubClass     66 Controller&lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              2 (error)&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0020  1x 32 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x02  EP 2 OUT&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0020  1x 32 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
&lt;br /&gt;
Bus 003 Device 024: ID 1292:3006 Innomedia &lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            9 Hub&lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 Full speed (or root) hub&lt;br /&gt;
  bMaxPacketSize0         8&lt;br /&gt;
  idVendor           0x1292 Innomedia&lt;br /&gt;
  idProduct          0x3006 &lt;br /&gt;
  bcdDevice            1.50&lt;br /&gt;
  iManufacturer           1 (c) 2004 R0R3 Inc.&lt;br /&gt;
  iProduct                2 US Patent 6,287,198&lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           25&lt;br /&gt;
    bNumInterfaces          1&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          4 (c) R0R3 Devices Inc. US Patent 6,287,19Ē&lt;br /&gt;
    bmAttributes         0xa0&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
      Remote Wakeup&lt;br /&gt;
    MaxPower               64mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass         9 Hub&lt;br /&gt;
      bInterfaceSubClass      0 &lt;br /&gt;
      bInterfaceProtocol      0 Full speed (or root) hub&lt;br /&gt;
      iInterface              5 (error)&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0001  1x 1 bytes&lt;br /&gt;
        bInterval             255&lt;br /&gt;
Hub Descriptor:&lt;br /&gt;
  bLength               9&lt;br /&gt;
  bDescriptorType      41&lt;br /&gt;
  nNbrPorts             3&lt;br /&gt;
  wHubCharacteristic 0x000d&lt;br /&gt;
    Per-port power switching&lt;br /&gt;
    Compound device&lt;br /&gt;
    Per-port overcurrent protection&lt;br /&gt;
  bPwrOn2PwrGood       32 * 2 milli seconds&lt;br /&gt;
  bHubContrCurrent     64 milli Ampere&lt;br /&gt;
  DeviceRemovable    0x02&lt;br /&gt;
  PortPwrCtrlMask    0x0e&lt;br /&gt;
 Hub Port Status:&lt;br /&gt;
   Port 1: 0000.0103 power enable connect&lt;br /&gt;
   Port 2: 0000.0100 power&lt;br /&gt;
   Port 3: 0100.0100 power&lt;br /&gt;
Device Status:     0x0000&lt;br /&gt;
  (Bus Powered)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Microphones ==&lt;br /&gt;
&lt;br /&gt;
=== Xbox Communicator ===&lt;br /&gt;
&lt;br /&gt;
==== USB Descriptor ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            0 &lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0         8&lt;br /&gt;
  idVendor           0x045e Microsoft Corp.&lt;br /&gt;
  idProduct          0x0283 Xbox Communicator&lt;br /&gt;
  bcdDevice            1.58&lt;br /&gt;
  iManufacturer           0 &lt;br /&gt;
  iProduct                0 &lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength       0x002d&lt;br /&gt;
    bNumInterfaces          2&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          0 &lt;br /&gt;
    bmAttributes         0x80&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
    MaxPower              100mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass       120 &lt;br /&gt;
      bInterfaceSubClass      0 &lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 9&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x04  EP 4 OUT&lt;br /&gt;
        bmAttributes            5&lt;br /&gt;
          Transfer Type            Isochronous&lt;br /&gt;
          Synch Type               Asynchronous&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0030  1x 48 bytes&lt;br /&gt;
        bInterval               1&lt;br /&gt;
        bRefresh                0&lt;br /&gt;
        bSynchAddress           0&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        1&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass       120 &lt;br /&gt;
      bInterfaceSubClass      0 &lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 9&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x85  EP 5 IN&lt;br /&gt;
        bmAttributes            5&lt;br /&gt;
          Transfer Type            Isochronous&lt;br /&gt;
          Synch Type               Asynchronous&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0030  1x 48 bytes&lt;br /&gt;
        bInterval               1&lt;br /&gt;
        bRefresh                0&lt;br /&gt;
        bSynchAddress           0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Xbox Karaoke ===&lt;br /&gt;
&lt;br /&gt;
==== USB Descriptor ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            0 &lt;br /&gt;
  bDeviceSubClass         0 &lt;br /&gt;
  bDeviceProtocol         0 &lt;br /&gt;
  bMaxPacketSize0         8&lt;br /&gt;
  idVendor           0x045e Microsoft Corp.&lt;br /&gt;
  idProduct          0x0501 &lt;br /&gt;
  bcdDevice            1.00&lt;br /&gt;
  iManufacturer           1 Licensed 3PP Vendor&lt;br /&gt;
  iProduct                2 Karaoke Microphone Module&lt;br /&gt;
  iSerial                 0 &lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength       0x001b&lt;br /&gt;
    bNumInterfaces          1&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          0 &lt;br /&gt;
    bmAttributes         0x80&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
    MaxPower              100mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           1&lt;br /&gt;
      bInterfaceClass       121 &lt;br /&gt;
      bInterfaceSubClass      1 &lt;br /&gt;
      bInterfaceProtocol      0 &lt;br /&gt;
      iInterface              0 &lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 9&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x81  EP 1 IN&lt;br /&gt;
        bmAttributes            5&lt;br /&gt;
          Transfer Type            Isochronous&lt;br /&gt;
          Synch Type               Asynchronous&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0060  1x 96 bytes&lt;br /&gt;
        bInterval               1&lt;br /&gt;
        bRefresh                0&lt;br /&gt;
        bSynchAddress           0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Steel Battalion Controller ==&lt;br /&gt;
&lt;br /&gt;
[[File:SBC.jpg|thumb|200px|Steel Battalion Controller Layout]]&lt;br /&gt;
&lt;br /&gt;
=== USB Descriptors ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Device Descriptor:&lt;br /&gt;
  bLength                18&lt;br /&gt;
  bDescriptorType         1&lt;br /&gt;
  bcdUSB               1.10&lt;br /&gt;
  bDeviceClass            0 (Defined at Interface level)&lt;br /&gt;
  bDeviceSubClass         0&lt;br /&gt;
  bDeviceProtocol         0&lt;br /&gt;
  bMaxPacketSize0         8&lt;br /&gt;
  idVendor           0x0a7b&lt;br /&gt;
  idProduct          0xd000&lt;br /&gt;
  bcdDevice            1.00&lt;br /&gt;
  iManufacturer           0&lt;br /&gt;
  iProduct                0&lt;br /&gt;
  iSerial                 0&lt;br /&gt;
  bNumConfigurations      1&lt;br /&gt;
  Configuration Descriptor:&lt;br /&gt;
    bLength                 9&lt;br /&gt;
    bDescriptorType         2&lt;br /&gt;
    wTotalLength           32&lt;br /&gt;
    bNumInterfaces          1&lt;br /&gt;
    bConfigurationValue     1&lt;br /&gt;
    iConfiguration          0&lt;br /&gt;
    bmAttributes         0x80&lt;br /&gt;
      (Bus Powered)&lt;br /&gt;
    MaxPower              500mA&lt;br /&gt;
    Interface Descriptor:&lt;br /&gt;
      bLength                 9&lt;br /&gt;
      bDescriptorType         4&lt;br /&gt;
      bInterfaceNumber        0&lt;br /&gt;
      bAlternateSetting       0&lt;br /&gt;
      bNumEndpoints           2&lt;br /&gt;
      bInterfaceClass        88 Xbox&lt;br /&gt;
      bInterfaceSubClass     66 Controller&lt;br /&gt;
      bInterfaceProtocol      0&lt;br /&gt;
      iInterface              0&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x82  EP 2 IN&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0020  1x 32 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
      Endpoint Descriptor:&lt;br /&gt;
        bLength                 7&lt;br /&gt;
        bDescriptorType         5&lt;br /&gt;
        bEndpointAddress     0x01  EP 1 OUT&lt;br /&gt;
        bmAttributes            3&lt;br /&gt;
          Transfer Type            Interrupt&lt;br /&gt;
          Synch Type               None&lt;br /&gt;
          Usage Type               Data&lt;br /&gt;
        wMaxPacketSize     0x0020  1x 32 bytes&lt;br /&gt;
        bInterval               4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Controller to Xbox ===&lt;br /&gt;
&lt;br /&gt;
From http://steelbattalionnet.codeplex.com/SourceControl/latest#SBC/SteelBattalionController.cs&lt;br /&gt;
&lt;br /&gt;
26 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field&lt;br /&gt;
!Offset (Bytes)&lt;br /&gt;
!Mask&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|RightJoyMainWeapon&lt;br /&gt;
|2&lt;br /&gt;
|0x01&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RightJoyFire&lt;br /&gt;
|2&lt;br /&gt;
|0x02&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RightJoyLockOn&lt;br /&gt;
|2&lt;br /&gt;
|0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Eject&lt;br /&gt;
|2&lt;br /&gt;
|0x08&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|CockpitHatch&lt;br /&gt;
|2&lt;br /&gt;
|0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Ignition&lt;br /&gt;
|2&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Start&lt;br /&gt;
|2&lt;br /&gt;
|0x40&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MultiMonOpenClose&lt;br /&gt;
|2&lt;br /&gt;
|0x80&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MultiMonMapZoomInOut&lt;br /&gt;
|3&lt;br /&gt;
|0x01&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MultiMonModeSelect&lt;br /&gt;
|3&lt;br /&gt;
|0x02&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MultiMonSubMonitor&lt;br /&gt;
|3&lt;br /&gt;
|0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MainMonZoomIn&lt;br /&gt;
|3&lt;br /&gt;
|0x08&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MainMonZoomOut&lt;br /&gt;
|3&lt;br /&gt;
|0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionFSS&lt;br /&gt;
|3&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionManipulator&lt;br /&gt;
|3&lt;br /&gt;
|0x40&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionLineColorChange&lt;br /&gt;
|3&lt;br /&gt;
|0x80&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Washing&lt;br /&gt;
|4&lt;br /&gt;
|0x01&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Extinguisher&lt;br /&gt;
|4&lt;br /&gt;
|0x02&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Chaff&lt;br /&gt;
|4&lt;br /&gt;
|0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionTankDetach&lt;br /&gt;
|4&lt;br /&gt;
|0x08&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionOverride&lt;br /&gt;
|4&lt;br /&gt;
|0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionNightScope&lt;br /&gt;
|4&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionF1&lt;br /&gt;
|4&lt;br /&gt;
|0x40&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionF2&lt;br /&gt;
|4&lt;br /&gt;
|0x80&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|FunctionF3&lt;br /&gt;
|5&lt;br /&gt;
|0x01&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|WeaponConMain&lt;br /&gt;
|5&lt;br /&gt;
|0x02&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|WeaponConSub&lt;br /&gt;
|5&lt;br /&gt;
|0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|WeaponConMagazine&lt;br /&gt;
|5&lt;br /&gt;
|0x08&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm1&lt;br /&gt;
|5&lt;br /&gt;
|0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm2&lt;br /&gt;
|5&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm3&lt;br /&gt;
|5&lt;br /&gt;
|0x40&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm4&lt;br /&gt;
|5&lt;br /&gt;
|0x80&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm5&lt;br /&gt;
|6&lt;br /&gt;
|0x01&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|LeftJoySightChange&lt;br /&gt;
|6&lt;br /&gt;
|0x02&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|ToggleFilterControl&lt;br /&gt;
|6&lt;br /&gt;
|0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|ToggleOxygenSupply&lt;br /&gt;
|6&lt;br /&gt;
|0x08&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|ToggleFuelFlowRate&lt;br /&gt;
|6&lt;br /&gt;
|0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|ToggleBuffreMaterial&lt;br /&gt;
|6&lt;br /&gt;
|0x20&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|ToggleVTLocation&lt;br /&gt;
|6&lt;br /&gt;
|0x40&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|6&lt;br /&gt;
|0x80&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|7&lt;br /&gt;
|0xFF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|8&lt;br /&gt;
|0xFF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|AimingX&lt;br /&gt;
|9&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&amp;quot;Aiming Lever&amp;quot; joystick on the right. Unsigned X Axis value: 0 (Left) to 0xFFFF (Right).&lt;br /&gt;
|-&lt;br /&gt;
|AimingY&lt;br /&gt;
|11&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&amp;quot;Aiming Lever&amp;quot; joystick on the right. Unsigned Y Axis value: 0 (Top) to 0xFFFF (Bottom).&lt;br /&gt;
|-&lt;br /&gt;
|RotationLever&lt;br /&gt;
|13&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&amp;quot;Rotation Lever&amp;quot; joystick on the left. Signed X Axis value: -0x7FFF (Left) to 0x7FFF (Right)&lt;br /&gt;
|-&lt;br /&gt;
|SightChangeX&lt;br /&gt;
|15&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&amp;quot;Sight Change&amp;quot; analog stick on the &amp;quot;Rotation Lever&amp;quot; joystick. Signed X Axis value: -0x7FFF (Left) to 0x7FFF (Right)&lt;br /&gt;
|-&lt;br /&gt;
|SightChangeY&lt;br /&gt;
|17&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&amp;quot;Sight Change&amp;quot; analog stick on the &amp;quot;Rotation Lever&amp;quot; joystick. Signed Y Axis value: -0x7FFF (Top) to 0x7FFF (Bottom)&lt;br /&gt;
|-&lt;br /&gt;
|LeftPedal&lt;br /&gt;
|19&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MiddlePedal&lt;br /&gt;
|21&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|RightPedal&lt;br /&gt;
|23&lt;br /&gt;
|0xFFFF&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TunerDial&lt;br /&gt;
|24&lt;br /&gt;
|0x0F&lt;br /&gt;
|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.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|24&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|GearLever&lt;br /&gt;
|25&lt;br /&gt;
|0xFF&lt;br /&gt;
|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.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Xbox to Controller ===&lt;br /&gt;
&lt;br /&gt;
From http://steelbattalionnet.codeplex.com/SourceControl/latest#SBC/SteelBattalionController.cs&lt;br /&gt;
&lt;br /&gt;
22 bytes&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Field&lt;br /&gt;
!Offset (Bytes)&lt;br /&gt;
!Mask&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|Start&lt;br /&gt;
|0&lt;br /&gt;
|0x00&lt;br /&gt;
|This will always be 0x00&lt;br /&gt;
|-&lt;br /&gt;
|bLen&lt;br /&gt;
|1&lt;br /&gt;
|0x16&lt;br /&gt;
|This will always be 0x16 (22 bytes)&lt;br /&gt;
|-&lt;br /&gt;
|EmergencyEject&lt;br /&gt;
|2&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|CockpitHatch&lt;br /&gt;
|2&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Ignition&lt;br /&gt;
|3&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Start&lt;br /&gt;
|3&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|OpenClose&lt;br /&gt;
|4&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MapZoomInOut&lt;br /&gt;
|4&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|ModeSelect&lt;br /&gt;
|5&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SubMonitorModeSelect&lt;br /&gt;
|5&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MainMonitorZoomIn&lt;br /&gt;
|6&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MainMonitorZoomOut&lt;br /&gt;
|6&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|ForecastShootingSystem&lt;br /&gt;
|7&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Manipulator&lt;br /&gt;
|7&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|LineColorChange&lt;br /&gt;
|8&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Washing&lt;br /&gt;
|8&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Extinguisher&lt;br /&gt;
|9&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Chaff&lt;br /&gt;
|9&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|TankDetach&lt;br /&gt;
|10&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Override&lt;br /&gt;
|10&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|NightScope&lt;br /&gt;
|11&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|F1&lt;br /&gt;
|11&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|F2&lt;br /&gt;
|12&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|F3&lt;br /&gt;
|12&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MainWeaponControl&lt;br /&gt;
|13&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|SubWeaponControl&lt;br /&gt;
|13&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|MagazineChange&lt;br /&gt;
|14&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm1&lt;br /&gt;
|14&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm2&lt;br /&gt;
|15&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm3&lt;br /&gt;
|15&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm4&lt;br /&gt;
|16&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Comm5&lt;br /&gt;
|16&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|17&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|GearR&lt;br /&gt;
|17&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|GearN&lt;br /&gt;
|18&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gear1&lt;br /&gt;
|18&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gear2&lt;br /&gt;
|19&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gear3&lt;br /&gt;
|19&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gear4&lt;br /&gt;
|20&lt;br /&gt;
|0x0F&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Gear5&lt;br /&gt;
|20&lt;br /&gt;
|0xF0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Unused?&lt;br /&gt;
|21&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Related links ==&lt;br /&gt;
[https://github.com/xqemu/xqemu/blob/xbox/hw/xbox/xid.c XID emulation in XQEMU]&lt;br /&gt;
&lt;br /&gt;
[https://docs.google.com/spreadsheets/d/1-c1tXfOMvaWuno3ixQyI_rPCQVAZA24N4v9OPZUSrCk/edit?usp=sharing Compilation of Xbox Controller Hardware Research]&lt;/div&gt;</summary>
		<author><name>QuantX</name></author>	</entry>

	<entry>
		<id>https://xboxdevwiki.net/index.php?title=Xbe&amp;diff=7335</id>
		<title>Xbe</title>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/index.php?title=Xbe&amp;diff=7335"/>
				<updated>2023-09-26T07:32:42Z</updated>
		
		<summary type="html">&lt;p&gt;QuantX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:XBE}}&lt;br /&gt;
XBE files (XBox Executable) are the main files that are executed in the Xbox System. In official games, these files are created by game developers, and then signed by Microsoft. &lt;br /&gt;
&lt;br /&gt;
The file structure is adapted from Windows PE files. It is very similar, however it has important changes for the Xbox. The file is composed of an image header, a certificate, a collection of section headers, a collection of library versions, thread local storage data, a Microsoft bitmap, and the sections that contain the code and resources.&lt;br /&gt;
&lt;br /&gt;
= Image Header = &lt;br /&gt;
&lt;br /&gt;
The image header contains the information that describes where the other parts of the executable are located within the file, and how the executable should be treated and loaded. It has the following layout (all fields are little-endian):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
! 0x0000&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Magic Number&lt;br /&gt;
| This field must always equal 0x48454258 (&amp;quot;XBEH&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
! 0x0004&lt;br /&gt;
! 0x0100&lt;br /&gt;
| Digital Signature&lt;br /&gt;
| 256 Bytes. This is where a game is signed. Only on officially signed games is this field worthwhile.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0104&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Base Address&lt;br /&gt;
| Address at which to load this .XBE. Typically this will be 0x00010000.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0108&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Size of Headers&lt;br /&gt;
| Number of bytes that should be reserved for headers.&lt;br /&gt;
|-&lt;br /&gt;
! 0x010C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Size of Image&lt;br /&gt;
| Number of bytes that should be reserved for this image.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0110&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Size of Image Header&lt;br /&gt;
| Number of bytes that should be reserved for the image header. The header size varies by XDK version, but is at least 0x178.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0114&lt;br /&gt;
! 0x0004&lt;br /&gt;
| TimeDate&lt;br /&gt;
| Time and Date when this image was created. UNIX timestamp format.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0118&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Certificate Address&lt;br /&gt;
| Address to a [[#Certificate|Certificate]] structure, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x011C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Number of Sections&lt;br /&gt;
| Number of sections contained in this .XBE.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0120&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Section Headers Address&lt;br /&gt;
| Address to an array of SectionHeader structures, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0124&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Initialization Flags&lt;br /&gt;
| Various flags for this .XBE file. Known flags are:&lt;br /&gt;
&lt;br /&gt;
  MountUtilityDrive  = 0x00000001&lt;br /&gt;
  FormatUtilityDrive = 0x00000002&lt;br /&gt;
  Limit64Megabytes   = 0x00000004&lt;br /&gt;
  DontSetupHarddisk  = 0x00000008&lt;br /&gt;
|-&lt;br /&gt;
! 0x0128&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Entry Point&lt;br /&gt;
| Address to the Image entry point, after the .XBE is loaded into memory. This is where execution starts.&lt;br /&gt;
&lt;br /&gt;
This value is encoded with an XOR key. Considering this is far too weak to be considered security, I assume this XOR is a clever method for discerning between Debug/Retail .XBE files without adding another field to the .XBE header. The XOR key is dependant on the build:&lt;br /&gt;
&lt;br /&gt;
  Beta = 0xE682F45B, Debug = 0x94859D4B, Retail = 0xA8FC57AB&lt;br /&gt;
&lt;br /&gt;
To encode an entry point, you simply XOR the real entry point with either Debug or Retail key, depending on if you want the XBox to see this as a Debug or Retail executable.&lt;br /&gt;
&lt;br /&gt;
To decode an entry point, you XOR with the debug key, then check if it is a valid entry point. If it is not, then you try again with the retail key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Note: The Kernel Image Thunk Address member of this header must also be encoded as described later in this document.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! 0x012C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| TLS Address&lt;br /&gt;
| Address to a [[#TLS Table|TLS]] (Thread Local Storage) structure.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0130&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Stack Size&lt;br /&gt;
| Default stack size. As the Xbox does not allow for stacks to grow, this needs to be copied from the SizeOfStackReserve PE field, not SizeOfStackCommit!&lt;br /&gt;
|-&lt;br /&gt;
! 0x0134&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Heap Reserve&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0138&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Heap Commit&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x013C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Base Address&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0140&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Size of Image&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0144&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Checksum&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0148&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE TimeDate&lt;br /&gt;
| Copied from the PE file this .XBE was created from (UNIX timestamp format).&lt;br /&gt;
|-&lt;br /&gt;
! 0x014C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Debug PathName Address&lt;br /&gt;
| Address to the debug pathname (i.e. &amp;quot;D:\Nightlybuilds\011026.0\code\build\xbox\Release\simpsons.exe&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
! 0x0150&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Debug FileName Address&lt;br /&gt;
| Address to the debug filename (i.e. &amp;quot;simpsons.exe&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
! 0x0154&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Address to the UTF-16 debug filename (i.e. L&amp;quot;simpsons.exe&amp;quot;)&lt;br /&gt;
| UTF-16 Debug FileName Address&lt;br /&gt;
|-&lt;br /&gt;
! 0x0158&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Kernel Image Thunk Address&lt;br /&gt;
| Address to the Kernel Image Thunk Table, after the .XBE is loaded into memory. This is how .XBE files import kernel functions and data.&lt;br /&gt;
&lt;br /&gt;
This value is encoded with an XOR key. Considering this is far too weak to be considered security, I assume this XOR is a clever method for discerning between Debug/Retail .XBE files without adding another field to the .XBE header. The XOR key is dependant on the build:&lt;br /&gt;
&lt;br /&gt;
  Beta = 0x46437DCD, Debug = 0xEFB1F152, Retail = 0x5B6D40B6&lt;br /&gt;
&lt;br /&gt;
To encode a kernel thunk address, you simply XOR the real address with either Debug or Retail key, depending on if you want the XBox to see this as a Debug or Retail executable.&lt;br /&gt;
&lt;br /&gt;
To decode a kernel thunk address, you XOR with the debug key, then check if it is a valid address. If it is not, then you try again with the retail key.&lt;br /&gt;
&lt;br /&gt;
The Kernel Thunk Table itself is simply an array of pointers to Kernel imports. There are 366 possible imports, and the table is terminated with a zero dword (0x00000000). Typically the values in this table can be generated with the following formula:&lt;br /&gt;
&lt;br /&gt;
  KernelThunkTable[v] = ImportThunk + 0x80000000;&lt;br /&gt;
&lt;br /&gt;
so, for example, the import PsCreateSystemThreadEx, which has a thunk value of 255 (0xFF) would be...&lt;br /&gt;
&lt;br /&gt;
  KernelThunkTable[v] = 0xFF + 0x80000000; // (0x800000FF)&lt;br /&gt;
&lt;br /&gt;
When the .XBE is loaded by the OS (or the CXBX Emulator), all kernel imports are replaced by a valid function or data type address. In the case of CXBX, the import table entry at which (KernelThunkTable[v] &amp;amp; 0x1FF == 0xFF) will be replaced by &amp;amp;cxbx_PsCreateSystemThreadEx (which is a wrapper function).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Note: The Entry Point member of this header must also be encoded as described earlier in this document.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! 0x015C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Non-Kernel Import Directory Address&lt;br /&gt;
| Address to the Non-Kernel Import Directory. It is typically safe to set this to zero.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0160&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Number of Library Versions&lt;br /&gt;
| Number of Library Versions pointed to by Library Versions Address.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0164&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Library Versions Address&lt;br /&gt;
| Address to an array of LibraryVersion structures, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0168&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Kernel Library Version Address&lt;br /&gt;
| Address to a LibraryVersion structure, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x016C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| XAPI Library Version Address&lt;br /&gt;
| Address to a LibraryVersion structure, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0170&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Logo Bitmap Address&lt;br /&gt;
| Address to the Logo Bitmap (Typically a &amp;quot;Microsoft&amp;quot; logo). The format of this image is described here. This field can be set to zero, meaning there is no bitmap present.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0174&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Logo Bitmap Size&lt;br /&gt;
| Size (in bytes) of the Logo Bitmap data. The format of this image is described here.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0178&lt;br /&gt;
! 0x0008&lt;br /&gt;
| Unknown1&lt;br /&gt;
| The meaning of this field hasn't been figured out yet. It only exists on XBEs built with an XDK version &amp;gt;= 5028.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0180&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Unknown2&lt;br /&gt;
| The meaning of this field hasn't been figured out yet. It only exists on XBEs built with an XDK version &amp;gt;= 5455.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LibraryVersion Table ==&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
! 0x0000&lt;br /&gt;
! 0x0008&lt;br /&gt;
| Library Name&lt;br /&gt;
| 8-byte ASCII-name of this library. (i.e. &amp;quot;XAPILIB&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
! 0x0008&lt;br /&gt;
! 0x0002&lt;br /&gt;
| Major Version&lt;br /&gt;
| Major version for this library (2-byte WORD). &lt;br /&gt;
|-&lt;br /&gt;
! 0x000A&lt;br /&gt;
! 0x0002&lt;br /&gt;
| Minor Version &lt;br /&gt;
| Minor version for this library (2-byte WORD). &lt;br /&gt;
|-&lt;br /&gt;
! 0x000C&lt;br /&gt;
! 0x0002&lt;br /&gt;
| Build Version&lt;br /&gt;
| Build version for this library (2-byte WORD).&lt;br /&gt;
|-&lt;br /&gt;
! 0x000E&lt;br /&gt;
! 0x0002&lt;br /&gt;
| Library Flags&lt;br /&gt;
| Various flags for this library. The fields are:&lt;br /&gt;
&lt;br /&gt;
  QFEVersion  = 0x1FFF (13-Bit Mask)&lt;br /&gt;
  Approved    = 0x6000 (02-Bit Mask)&lt;br /&gt;
  Debug Build = 0x8000 (01-Bit Mask)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TLS Table ==&lt;br /&gt;
&lt;br /&gt;
The TLS Table contains all the information needed by the XBE to properly set up thread-local storage. It is structurally identical to the TLS Directory found in PE32 files&amp;lt;ref&amp;gt;https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#the-tls-section&amp;lt;/ref&amp;gt;, and can be directly copied from there. If the XBE does not use any thread-local storage, this table may be omitted, and the respective field in the image header set to zero.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
! 0x0000&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Raw Data Start&lt;br /&gt;
| Absolute (i.e. not an RVA) address of start of the TLS variable data in the program image.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0004&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Raw Data End&lt;br /&gt;
| Absolute (i.e. not an RVA) address of end of the TLS variable data in the program image.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0008&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Address of Index&lt;br /&gt;
| Absolute (i.e. not an RVA) address of the TLS Index variable.&lt;br /&gt;
|-&lt;br /&gt;
! 0x000C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Address of Callbacks&lt;br /&gt;
| Absolute (i.e. not an RVA) address of the null-terminated TLS callback functions table.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0010&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Size of Zero Fill&lt;br /&gt;
| The number of bytes following the raw data that should be set to zero in memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0014&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Characteristics&lt;br /&gt;
| Describes alignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Certificate =&lt;br /&gt;
&lt;br /&gt;
Each Xbox executable has a certificate that contains information about the title.&lt;br /&gt;
&lt;br /&gt;
* Time and date when the certificate was created&lt;br /&gt;
* Title ID&lt;br /&gt;
* Title name&lt;br /&gt;
* Alternative title IDs&lt;br /&gt;
* Allowed types of media that the executable can be run from (HD, DVD, CD, etc.)&lt;br /&gt;
* Game region&lt;br /&gt;
* Game ratings&lt;br /&gt;
* Disk number&lt;br /&gt;
* Version&lt;br /&gt;
* LAN key raw data used for [[System Link]]&lt;br /&gt;
* Signature key raw data (used to sign [[Xbox Savegame System|savegames]])&lt;br /&gt;
* Alternate signature keys&lt;br /&gt;
* Original size of the certificate&lt;br /&gt;
* Online service name (not present in early executables)&lt;br /&gt;
* Run time security flags (not present in early executables)&lt;br /&gt;
&lt;br /&gt;
=== Title ID ===&lt;br /&gt;
&lt;br /&gt;
A title ID is usually 2 ASCII letters for the publisher, followed by a u16 integer game number (Above 2000 for non-original Xbox games)&lt;br /&gt;
&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Publisher ID !! Name&lt;br /&gt;
|-&lt;br /&gt;
| AC || Acclaim Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| AH || ARUSH Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| AP || Aquaplus&lt;br /&gt;
|-&lt;br /&gt;
| AQ || Aqua System&lt;br /&gt;
|-&lt;br /&gt;
| AS || ASK&lt;br /&gt;
|-&lt;br /&gt;
| AT || Atlus&lt;br /&gt;
|-&lt;br /&gt;
| AV || Activision&lt;br /&gt;
|-&lt;br /&gt;
| AY || Aspyr Media&lt;br /&gt;
|-&lt;br /&gt;
| BA || Bandai&lt;br /&gt;
|-&lt;br /&gt;
| BL || Black Box&lt;br /&gt;
|-&lt;br /&gt;
| BM || BAM! Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| BR || Broccoli Co.&lt;br /&gt;
|-&lt;br /&gt;
| BS || Bethesda Softworks&lt;br /&gt;
|-&lt;br /&gt;
| BU || Bunkasha Co.&lt;br /&gt;
|-&lt;br /&gt;
| BV || Buena Vista Games&lt;br /&gt;
|-&lt;br /&gt;
| BW || BBC Multimedia&lt;br /&gt;
|-&lt;br /&gt;
| BZ || Blizzard&lt;br /&gt;
|-&lt;br /&gt;
| CC || Capcom&lt;br /&gt;
|-&lt;br /&gt;
| CK || Kemco Corporation {{citation needed|reason=Did they realy swapped the ASCII letters? is KC a curced acroniem in Japan? Just want to be sure its Kemco|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| CM || Codemasters&lt;br /&gt;
|-&lt;br /&gt;
| CT || CTO S.p.A.&lt;br /&gt;
|-&lt;br /&gt;
| CV || Crave Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| DC || DreamCatcher Interactive&lt;br /&gt;
|-&lt;br /&gt;
| DX || Davilex&lt;br /&gt;
|-&lt;br /&gt;
| EA || Electronic Arts (EA)&lt;br /&gt;
|-&lt;br /&gt;
| EC || Encore inc&lt;br /&gt;
|-&lt;br /&gt;
| EL || Enlight Software&lt;br /&gt;
|-&lt;br /&gt;
| EM || Empire Interactive&lt;br /&gt;
|-&lt;br /&gt;
| ES || Eidos Interactive&lt;br /&gt;
|-&lt;br /&gt;
| FI || Fox Interactive&lt;br /&gt;
|-&lt;br /&gt;
| FS || From Software&lt;br /&gt;
|-&lt;br /&gt;
| GE || Genki Co.&lt;br /&gt;
|-&lt;br /&gt;
| GV || Groove Games&lt;br /&gt;
|-&lt;br /&gt;
| HE || Tru Blu (Entertainment division of Home Entertainment Suppliers)&lt;br /&gt;
|-&lt;br /&gt;
| HP || Hip games&lt;br /&gt;
|-&lt;br /&gt;
| HU || Hudson Soft&lt;br /&gt;
|-&lt;br /&gt;
| HW || Highwaystar&lt;br /&gt;
|-&lt;br /&gt;
| IA || Mad Catz Interactive&lt;br /&gt;
|-&lt;br /&gt;
| IF || Idea Factory&lt;br /&gt;
|-&lt;br /&gt;
| IG || Infogrames&lt;br /&gt;
|-&lt;br /&gt;
| IL || [[Interlex Corporation]]&lt;br /&gt;
|-&lt;br /&gt;
| IM || Imagine Media&lt;br /&gt;
|-&lt;br /&gt;
| IO || Ignition Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| IP || Interplay Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| IX || InXile Entertainment {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| JA || Jaleco&lt;br /&gt;
|-&lt;br /&gt;
| JW || JoWooD&lt;br /&gt;
|-&lt;br /&gt;
| KB || Kemco {{citation needed|reason=CK is also Kemco, is this a diferent subsidairy or country based? Just want to be sure its Kemco|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| KI || Kids Station Inc. {{citation needed|reason=Games info page was in japanese, I dont read japanese. but this seemed very logicaly the publisher, can a japanese reader confirm?|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| KK || KiKi&lt;br /&gt;
|-&lt;br /&gt;
| KN || Konami&lt;br /&gt;
|-&lt;br /&gt;
| KO || KOEI&lt;br /&gt;
|-&lt;br /&gt;
| KT || Konami Tokyo&lt;br /&gt;
|-&lt;br /&gt;
| KU || Kobi and/or GAE (formerly Global A Entertainment){{citation needed|reason=What name did the publisher use at the time of release?|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| LA || LucasArts&lt;br /&gt;
|-&lt;br /&gt;
| LS || Black Bean Games (publishing arm of Leader S.p.A.)&lt;br /&gt;
|-&lt;br /&gt;
| MD || Metro3D&lt;br /&gt;
|-&lt;br /&gt;
| ME || Medix&lt;br /&gt;
|-&lt;br /&gt;
| MI || Microïds&lt;br /&gt;
|-&lt;br /&gt;
| MJ || Majesco Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| MM || Myelin Media&lt;br /&gt;
|-&lt;br /&gt;
| MP || MediaQuest {{citation needed|reason=Where is the P? I dont trust my source yet... but seems close|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| MS || Microsoft Game Studios&lt;br /&gt;
|-&lt;br /&gt;
| MW || Midway Games&lt;br /&gt;
|-&lt;br /&gt;
| MX || Empire Interactive {{citation needed|reason=What happend to the publisher, who published this game?|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| NK || NewKidCo&lt;br /&gt;
|-&lt;br /&gt;
| NL || NovaLogic&lt;br /&gt;
|-&lt;br /&gt;
| NM || Namco&lt;br /&gt;
|-&lt;br /&gt;
| OX || Oxygen Interactive&lt;br /&gt;
|-&lt;br /&gt;
| PC || Playlogic Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| PL || Phantagram Co., Ltd.&lt;br /&gt;
|-&lt;br /&gt;
| RA || Rage&lt;br /&gt;
|-&lt;br /&gt;
| SA || Sammy&lt;br /&gt;
|-&lt;br /&gt;
| SC || SCi Games&lt;br /&gt;
|-&lt;br /&gt;
| SE || SEGA&lt;br /&gt;
|-&lt;br /&gt;
| SN || SNK&lt;br /&gt;
|-&lt;br /&gt;
| SS || Simon &amp;amp; Schuster&lt;br /&gt;
|-&lt;br /&gt;
| SU || Success Corporation&lt;br /&gt;
|-&lt;br /&gt;
| SW || Swing! Deutschland&lt;br /&gt;
|-&lt;br /&gt;
| TA || Takara&lt;br /&gt;
|-&lt;br /&gt;
| TC || Tecmo&lt;br /&gt;
|-&lt;br /&gt;
| TD || The 3DO Company (or just 3DO)&lt;br /&gt;
|-&lt;br /&gt;
| TK || Takuyo&lt;br /&gt;
|-&lt;br /&gt;
| TM || TDK Mediactive&lt;br /&gt;
|-&lt;br /&gt;
| TQ || THQ&lt;br /&gt;
|-&lt;br /&gt;
| TS || Titus Interactive&lt;br /&gt;
|-&lt;br /&gt;
| TT || Take-Two Interactive Software&lt;br /&gt;
|-&lt;br /&gt;
| US || Ubisoft&lt;br /&gt;
|-&lt;br /&gt;
| VC || Victor Interactive Software&lt;br /&gt;
|-&lt;br /&gt;
| VN || Vivendi Universal (just took Interplays publishing rights) {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| VU || Vivendi Universal Games&lt;br /&gt;
|-&lt;br /&gt;
| VV || Vivendi Universal Games {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| WE || Wanadoo Edition&lt;br /&gt;
|-&lt;br /&gt;
| WR || Warner Bros. Interactive Entertainment {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| XD || ''Xbox demo disk? (Japan?)''&lt;br /&gt;
|-&lt;br /&gt;
| XI || XPEC Entertainment and Idea Factory &lt;br /&gt;
|-&lt;br /&gt;
| XK || ''Xbox kiosk disk?'' {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| XL || ''Xbox special bundled or live demo disk?'' {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| XM || Evolved Games {{citation needed|reason=Probably not, game &amp;quot;Malice&amp;quot;|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| XP || XPEC Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| XR || Panorama&lt;br /&gt;
|-&lt;br /&gt;
| XX || Microsoft Windows Media Center Extender for Xbox&lt;br /&gt;
|-&lt;br /&gt;
| YB || YBM Sisa (South-Korea)&lt;br /&gt;
|-&lt;br /&gt;
| ZD || Zushi Games (formerly Zoo Digital Publishing)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The title ID seems to double the information from the [[Xbox Game Disc]] mastering code etched into the ring or readable from the DMI.&lt;br /&gt;
The game number is expressed in 3 decimal digits here which suggests that it will always be below 1000.&lt;br /&gt;
&lt;br /&gt;
'''Examples''':&lt;br /&gt;
&lt;br /&gt;
[[FIFA Soccer 2003]]:&lt;br /&gt;
* DMI and mastering code: EA02302E (Meaning: publisher EA, game number 023, version 02, region Europe)&lt;br /&gt;
* Title ID: 45410017 [EA-023]&lt;br /&gt;
&lt;br /&gt;
[[Halo: Combat Evolved]]:&lt;br /&gt;
* DMI and mastering code: MS00402A (Meaning: publisher Microsoft, game number 004, version 02, region America)&lt;br /&gt;
* Title ID: 4D530004 [MS-004]&lt;br /&gt;
&lt;br /&gt;
[[Halo: Combat Evolved]]:&lt;br /&gt;
* DMI and mastering code: MS00404E (Meaning: publisher Microsoft, game number 004, version 04, region Europe)&lt;br /&gt;
* Title ID: 4D530004 [MS-004]&lt;br /&gt;
&lt;br /&gt;
== Allowed media types ==&lt;br /&gt;
Allowed media types off which the executable is allowed to be run from. The following values are known:&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Media type !! Value&lt;br /&gt;
|-&lt;br /&gt;
|HARD_DISK        || 0x00000001&lt;br /&gt;
|-&lt;br /&gt;
|DVD_X2           || 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
|DVD_CD           || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
|CD               || 0x00000008&lt;br /&gt;
|-&lt;br /&gt;
|DVD_5_RO         || 0x00000010&lt;br /&gt;
|-&lt;br /&gt;
|DVD_9_RO         || 0x00000020&lt;br /&gt;
|-&lt;br /&gt;
|DVD_5_RW         || 0x00000040&lt;br /&gt;
|-&lt;br /&gt;
|DVD_9_RW         || 0x00000080&lt;br /&gt;
|-&lt;br /&gt;
|DONGLE           || 0x00000100&lt;br /&gt;
|-&lt;br /&gt;
|MEDIA_BOARD      || 0x00000200&lt;br /&gt;
|-&lt;br /&gt;
|NONSECURE_HARD_DISK || 0x40000000&lt;br /&gt;
|-&lt;br /&gt;
|NONSECURE_MODE   || 0x80000000&lt;br /&gt;
|-&lt;br /&gt;
|MEDIA_MASK       || 0x00FFFFFF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sections =&lt;br /&gt;
The sections are described by the section headers. The section headers start right after the certificate and contain describe where in the file the actual sections reside. Each header contains a 20 byte SHA-1 hash of the section that is checked by the Xbox to ensure the integrity of the sections. &lt;br /&gt;
&lt;br /&gt;
The SHA-1 hash is computed by prepending the length of the section (excluding any padding) as an unsigned 32-bit integer followed by the contents of the section itself.&lt;br /&gt;
&lt;br /&gt;
At least two sections are always present in an Xbox executable: .text and .rdata. There might be more sections that contain either executable code or resources such as images, text, etc.&lt;br /&gt;
&lt;br /&gt;
== .text ==&lt;br /&gt;
&lt;br /&gt;
The .text section contains all x86 subroutines to be executed by the [[CPU|processor]].&lt;br /&gt;
&lt;br /&gt;
== .rdata ==&lt;br /&gt;
&lt;br /&gt;
The .rdata section contains the [[Kernel|kernel thunk table]]. The ordinals in the table are to be resolved to the kernel's actual calling routine, when loaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Xbox Alpha executable format =&lt;br /&gt;
&lt;br /&gt;
Binaries from early Xbox development (Alpha units), are using a different binary format. There are no known public tools that can read them.&lt;br /&gt;
Known differences include that the first bytes of the file are 'XE' instead the 'XBEH' from the final XBE format. The format is rumored to be more like the Windows PE format.{{citation needed}}&lt;br /&gt;
&lt;br /&gt;
= Resources and links =&lt;br /&gt;
* [http://www.caustik.com/cxbx/download/xbe.htm .XBE File Format 1.1]&lt;br /&gt;
&lt;br /&gt;
[[Category:Fileformats]]&lt;/div&gt;</summary>
		<author><name>QuantX</name></author>	</entry>

	<entry>
		<id>https://xboxdevwiki.net/index.php?title=Xbe&amp;diff=7334</id>
		<title>Xbe</title>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/index.php?title=Xbe&amp;diff=7334"/>
				<updated>2023-09-24T11:18:39Z</updated>
		
		<summary type="html">&lt;p&gt;QuantX: Specify hashing algorithm used to check each section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:XBE}}&lt;br /&gt;
XBE files (XBox Executable) are the main files that are executed in the Xbox System. In official games, these files are created by game developers, and then signed by Microsoft. &lt;br /&gt;
&lt;br /&gt;
The file structure is adapted from Windows PE files. It is very similar, however it has important changes for the Xbox. The file is composed of an image header, a certificate, a collection of section headers, a collection of library versions, thread local storage data, a Microsoft bitmap, and the sections that contain the code and resources.&lt;br /&gt;
&lt;br /&gt;
= Image Header = &lt;br /&gt;
&lt;br /&gt;
The image header contains the information that describes where the other parts of the executable are located within the file, and how the executable should be treated and loaded. It has the following layout (all fields are little-endian):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
! 0x0000&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Magic Number&lt;br /&gt;
| This field must always equal 0x48454258 (&amp;quot;XBEH&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
! 0x0004&lt;br /&gt;
! 0x0100&lt;br /&gt;
| Digital Signature&lt;br /&gt;
| 256 Bytes. This is where a game is signed. Only on officially signed games is this field worthwhile.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0104&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Base Address&lt;br /&gt;
| Address at which to load this .XBE. Typically this will be 0x00010000.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0108&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Size of Headers&lt;br /&gt;
| Number of bytes that should be reserved for headers.&lt;br /&gt;
|-&lt;br /&gt;
! 0x010C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Size of Image&lt;br /&gt;
| Number of bytes that should be reserved for this image.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0110&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Size of Image Header&lt;br /&gt;
| Number of bytes that should be reserved for the image header. The header size varies by XDK version, but is at least 0x178.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0114&lt;br /&gt;
! 0x0004&lt;br /&gt;
| TimeDate&lt;br /&gt;
| Time and Date when this image was created. UNIX timestamp format.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0118&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Certificate Address&lt;br /&gt;
| Address to a [[#Certificate|Certificate]] structure, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x011C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Number of Sections&lt;br /&gt;
| Number of sections contained in this .XBE.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0120&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Section Headers Address&lt;br /&gt;
| Address to an array of SectionHeader structures, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0124&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Initialization Flags&lt;br /&gt;
| Various flags for this .XBE file. Known flags are:&lt;br /&gt;
&lt;br /&gt;
  MountUtilityDrive  = 0x00000001&lt;br /&gt;
  FormatUtilityDrive = 0x00000002&lt;br /&gt;
  Limit64Megabytes   = 0x00000004&lt;br /&gt;
  DontSetupHarddisk  = 0x00000008&lt;br /&gt;
|-&lt;br /&gt;
! 0x0128&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Entry Point&lt;br /&gt;
| Address to the Image entry point, after the .XBE is loaded into memory. This is where execution starts.&lt;br /&gt;
&lt;br /&gt;
This value is encoded with an XOR key. Considering this is far too weak to be considered security, I assume this XOR is a clever method for discerning between Debug/Retail .XBE files without adding another field to the .XBE header. The XOR key is dependant on the build:&lt;br /&gt;
&lt;br /&gt;
  Beta = 0xE682F45B, Debug = 0x94859D4B, Retail = 0xA8FC57AB&lt;br /&gt;
&lt;br /&gt;
To encode an entry point, you simply XOR the real entry point with either Debug or Retail key, depending on if you want the XBox to see this as a Debug or Retail executable.&lt;br /&gt;
&lt;br /&gt;
To decode an entry point, you XOR with the debug key, then check if it is a valid entry point. If it is not, then you try again with the retail key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Note: The Kernel Image Thunk Address member of this header must also be encoded as described later in this document.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! 0x012C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| TLS Address&lt;br /&gt;
| Address to a [[#TLS Table|TLS]] (Thread Local Storage) structure.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0130&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Stack Size&lt;br /&gt;
| Default stack size. As the Xbox does not allow for stacks to grow, this needs to be copied from the SizeOfStackReserve PE field, not SizeOfStackCommit!&lt;br /&gt;
|-&lt;br /&gt;
! 0x0134&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Heap Reserve&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0138&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Heap Commit&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x013C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Base Address&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0140&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Size of Image&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0144&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE Checksum&lt;br /&gt;
| Copied from the PE file this .XBE was created from.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0148&lt;br /&gt;
! 0x0004&lt;br /&gt;
| PE TimeDate&lt;br /&gt;
| Copied from the PE file this .XBE was created from (UNIX timestamp format).&lt;br /&gt;
|-&lt;br /&gt;
! 0x014C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Debug PathName Address&lt;br /&gt;
| Address to the debug pathname (i.e. &amp;quot;D:\Nightlybuilds\011026.0\code\build\xbox\Release\simpsons.exe&amp;quot;).&lt;br /&gt;
|-&lt;br /&gt;
! 0x0150&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Debug FileName Address&lt;br /&gt;
| Address to the debug filename (i.e. &amp;quot;simpsons.exe&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
! 0x0154&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Address to the UTF-16 debug filename (i.e. L&amp;quot;simpsons.exe&amp;quot;)&lt;br /&gt;
| UTF-16 Debug FileName Address&lt;br /&gt;
|-&lt;br /&gt;
! 0x0158&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Kernel Image Thunk Address&lt;br /&gt;
| Address to the Kernel Image Thunk Table, after the .XBE is loaded into memory. This is how .XBE files import kernel functions and data.&lt;br /&gt;
&lt;br /&gt;
This value is encoded with an XOR key. Considering this is far too weak to be considered security, I assume this XOR is a clever method for discerning between Debug/Retail .XBE files without adding another field to the .XBE header. The XOR key is dependant on the build:&lt;br /&gt;
&lt;br /&gt;
  Beta = 0x46437DCD, Debug = 0xEFB1F152, Retail = 0x5B6D40B6&lt;br /&gt;
&lt;br /&gt;
To encode a kernel thunk address, you simply XOR the real address with either Debug or Retail key, depending on if you want the XBox to see this as a Debug or Retail executable.&lt;br /&gt;
&lt;br /&gt;
To decode a kernel thunk address, you XOR with the debug key, then check if it is a valid address. If it is not, then you try again with the retail key.&lt;br /&gt;
&lt;br /&gt;
The Kernel Thunk Table itself is simply an array of pointers to Kernel imports. There are 366 possible imports, and the table is terminated with a zero dword (0x00000000). Typically the values in this table can be generated with the following formula:&lt;br /&gt;
&lt;br /&gt;
  KernelThunkTable[v] = ImportThunk + 0x80000000;&lt;br /&gt;
&lt;br /&gt;
so, for example, the import PsCreateSystemThreadEx, which has a thunk value of 255 (0xFF) would be...&lt;br /&gt;
&lt;br /&gt;
  KernelThunkTable[v] = 0xFF + 0x80000000; // (0x800000FF)&lt;br /&gt;
&lt;br /&gt;
When the .XBE is loaded by the OS (or the CXBX Emulator), all kernel imports are replaced by a valid function or data type address. In the case of CXBX, the import table entry at which (KernelThunkTable[v] &amp;amp; 0x1FF == 0xFF) will be replaced by &amp;amp;cxbx_PsCreateSystemThreadEx (which is a wrapper function).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Note: The Entry Point member of this header must also be encoded as described earlier in this document.&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! 0x015C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Non-Kernel Import Directory Address&lt;br /&gt;
| Address to the Non-Kernel Import Directory. It is typically safe to set this to zero.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0160&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Number of Library Versions&lt;br /&gt;
| Number of Library Versions pointed to by Library Versions Address.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0164&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Library Versions Address&lt;br /&gt;
| Address to an array of LibraryVersion structures, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0168&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Kernel Library Version Address&lt;br /&gt;
| Address to a LibraryVersion structure, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x016C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| XAPI Library Version Address&lt;br /&gt;
| Address to a LibraryVersion structure, after the .XBE is loaded into memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0170&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Logo Bitmap Address&lt;br /&gt;
| Address to the Logo Bitmap (Typically a &amp;quot;Microsoft&amp;quot; logo). The format of this image is described here. This field can be set to zero, meaning there is no bitmap present.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0174&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Logo Bitmap Size&lt;br /&gt;
| Size (in bytes) of the Logo Bitmap data. The format of this image is described here.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0178&lt;br /&gt;
! 0x0008&lt;br /&gt;
| Unknown1&lt;br /&gt;
| The meaning of this field hasn't been figured out yet. It only exists on XBEs built with an XDK version &amp;gt;= 5028.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0180&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Unknown2&lt;br /&gt;
| The meaning of this field hasn't been figured out yet. It only exists on XBEs built with an XDK version &amp;gt;= 5455.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LibraryVersion Table ==&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
! 0x0000&lt;br /&gt;
! 0x0008&lt;br /&gt;
| Library Name&lt;br /&gt;
| 8-byte ASCII-name of this library. (i.e. &amp;quot;XAPILIB&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
! 0x0008&lt;br /&gt;
! 0x0002&lt;br /&gt;
| Major Version&lt;br /&gt;
| Major version for this library (2-byte WORD). &lt;br /&gt;
|-&lt;br /&gt;
! 0x000A&lt;br /&gt;
! 0x0002&lt;br /&gt;
| Minor Version &lt;br /&gt;
| Minor version for this library (2-byte WORD). &lt;br /&gt;
|-&lt;br /&gt;
! 0x000C&lt;br /&gt;
! 0x0002&lt;br /&gt;
| Build Version&lt;br /&gt;
| Build version for this library (2-byte WORD).&lt;br /&gt;
|-&lt;br /&gt;
! 0x000E&lt;br /&gt;
! 0x0002&lt;br /&gt;
| Library Flags&lt;br /&gt;
| Various flags for this library. The fields are:&lt;br /&gt;
&lt;br /&gt;
  QFEVersion  = 0x1FFF (13-Bit Mask)&lt;br /&gt;
  Approved    = 0x6000 (02-Bit Mask)&lt;br /&gt;
  Debug Build = 0x8000 (01-Bit Mask)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TLS Table ==&lt;br /&gt;
&lt;br /&gt;
The TLS Table contains all the information needed by the XBE to properly set up thread-local storage. It is structurally identical to the TLS Directory found in PE32 files&amp;lt;ref&amp;gt;https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#the-tls-section&amp;lt;/ref&amp;gt;, and can be directly copied from there. If the XBE does not use any thread-local storage, this table may be omitted, and the respective field in the image header set to zero.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Size&lt;br /&gt;
! Name&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
! 0x0000&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Raw Data Start&lt;br /&gt;
| Absolute (i.e. not an RVA) address of start of the TLS variable data in the program image.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0004&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Raw Data End&lt;br /&gt;
| Absolute (i.e. not an RVA) address of end of the TLS variable data in the program image.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0008&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Address of Index&lt;br /&gt;
| Absolute (i.e. not an RVA) address of the TLS Index variable.&lt;br /&gt;
|-&lt;br /&gt;
! 0x000C&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Address of Callbacks&lt;br /&gt;
| Absolute (i.e. not an RVA) address of the null-terminated TLS callback functions table.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0010&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Size of Zero Fill&lt;br /&gt;
| The number of bytes following the raw data that should be set to zero in memory.&lt;br /&gt;
|-&lt;br /&gt;
! 0x0014&lt;br /&gt;
! 0x0004&lt;br /&gt;
| Characteristics&lt;br /&gt;
| Describes alignment.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Certificate =&lt;br /&gt;
&lt;br /&gt;
Each Xbox executable has a certificate that contains information about the title.&lt;br /&gt;
&lt;br /&gt;
* Time and date when the certificate was created&lt;br /&gt;
* Title ID&lt;br /&gt;
* Title name&lt;br /&gt;
* Alternative title IDs&lt;br /&gt;
* Allowed types of media that the executable can be run from (HD, DVD, CD, etc.)&lt;br /&gt;
* Game region&lt;br /&gt;
* Game ratings&lt;br /&gt;
* Disk number&lt;br /&gt;
* Version&lt;br /&gt;
* LAN key raw data used for [[System Link]]&lt;br /&gt;
* Signature key raw data (used to sign [[Xbox Savegame System|savegames]])&lt;br /&gt;
* Alternate signature keys&lt;br /&gt;
* Original size of the certificate&lt;br /&gt;
* Online service name (not present in early executables)&lt;br /&gt;
* Run time security flags (not present in early executables)&lt;br /&gt;
&lt;br /&gt;
=== Title ID ===&lt;br /&gt;
&lt;br /&gt;
A title ID is usually 2 ASCII letters for the publisher, followed by a u16 integer game number (Above 2000 for non-original Xbox games)&lt;br /&gt;
&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Publisher ID !! Name&lt;br /&gt;
|-&lt;br /&gt;
| AC || Acclaim Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| AH || ARUSH Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| AP || Aquaplus&lt;br /&gt;
|-&lt;br /&gt;
| AQ || Aqua System&lt;br /&gt;
|-&lt;br /&gt;
| AS || ASK&lt;br /&gt;
|-&lt;br /&gt;
| AT || Atlus&lt;br /&gt;
|-&lt;br /&gt;
| AV || Activision&lt;br /&gt;
|-&lt;br /&gt;
| AY || Aspyr Media&lt;br /&gt;
|-&lt;br /&gt;
| BA || Bandai&lt;br /&gt;
|-&lt;br /&gt;
| BL || Black Box&lt;br /&gt;
|-&lt;br /&gt;
| BM || BAM! Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| BR || Broccoli Co.&lt;br /&gt;
|-&lt;br /&gt;
| BS || Bethesda Softworks&lt;br /&gt;
|-&lt;br /&gt;
| BU || Bunkasha Co.&lt;br /&gt;
|-&lt;br /&gt;
| BV || Buena Vista Games&lt;br /&gt;
|-&lt;br /&gt;
| BW || BBC Multimedia&lt;br /&gt;
|-&lt;br /&gt;
| BZ || Blizzard&lt;br /&gt;
|-&lt;br /&gt;
| CC || Capcom&lt;br /&gt;
|-&lt;br /&gt;
| CK || Kemco Corporation {{citation needed|reason=Did they realy swapped the ASCII letters? is KC a curced acroniem in Japan? Just want to be sure its Kemco|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| CM || Codemasters&lt;br /&gt;
|-&lt;br /&gt;
| CT || CTO S.p.A.&lt;br /&gt;
|-&lt;br /&gt;
| CV || Crave Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| DC || DreamCatcher Interactive&lt;br /&gt;
|-&lt;br /&gt;
| DX || Davilex&lt;br /&gt;
|-&lt;br /&gt;
| EA || Electronic Arts (EA)&lt;br /&gt;
|-&lt;br /&gt;
| EC || Encore inc&lt;br /&gt;
|-&lt;br /&gt;
| EL || Enlight Software&lt;br /&gt;
|-&lt;br /&gt;
| EM || Empire Interactive&lt;br /&gt;
|-&lt;br /&gt;
| ES || Eidos Interactive&lt;br /&gt;
|-&lt;br /&gt;
| FI || Fox Interactive&lt;br /&gt;
|-&lt;br /&gt;
| FS || From Software&lt;br /&gt;
|-&lt;br /&gt;
| GE || Genki Co.&lt;br /&gt;
|-&lt;br /&gt;
| GV || Groove Games&lt;br /&gt;
|-&lt;br /&gt;
| HE || Tru Blu (Entertainment division of Home Entertainment Suppliers)&lt;br /&gt;
|-&lt;br /&gt;
| HP || Hip games&lt;br /&gt;
|-&lt;br /&gt;
| HU || Hudson Soft&lt;br /&gt;
|-&lt;br /&gt;
| HW || Highwaystar&lt;br /&gt;
|-&lt;br /&gt;
| IA || Mad Catz Interactive&lt;br /&gt;
|-&lt;br /&gt;
| IF || Idea Factory&lt;br /&gt;
|-&lt;br /&gt;
| IG || Infogrames&lt;br /&gt;
|-&lt;br /&gt;
| IL || [[Interlex Corporation]]&lt;br /&gt;
|-&lt;br /&gt;
| IM || Imagine Media&lt;br /&gt;
|-&lt;br /&gt;
| IO || Ignition Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| IP || Interplay Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| IX || InXile Entertainment {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| JA || Jaleco&lt;br /&gt;
|-&lt;br /&gt;
| JW || JoWooD&lt;br /&gt;
|-&lt;br /&gt;
| KB || Kemco {{citation needed|reason=CK is also Kemco, is this a diferent subsidairy or country based? Just want to be sure its Kemco|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| KI || Kids Station Inc. {{citation needed|reason=Games info page was in japanese, I dont read japanese. but this seemed very logicaly the publisher, can a japanese reader confirm?|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| KK || KiKi&lt;br /&gt;
|-&lt;br /&gt;
| KN || Konami&lt;br /&gt;
|-&lt;br /&gt;
| KO || KOEI&lt;br /&gt;
|-&lt;br /&gt;
| KT || Konami Tokyo&lt;br /&gt;
|-&lt;br /&gt;
| KU || Kobi and/or GAE (formerly Global A Entertainment){{citation needed|reason=What name did the publisher use at the time of release?|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| LA || LucasArts&lt;br /&gt;
|-&lt;br /&gt;
| LS || Black Bean Games (publishing arm of Leader S.p.A.)&lt;br /&gt;
|-&lt;br /&gt;
| MD || Metro3D&lt;br /&gt;
|-&lt;br /&gt;
| ME || Medix&lt;br /&gt;
|-&lt;br /&gt;
| MI || Microïds&lt;br /&gt;
|-&lt;br /&gt;
| MJ || Majesco Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| MM || Myelin Media&lt;br /&gt;
|-&lt;br /&gt;
| MP || MediaQuest {{citation needed|reason=Where is the P? I dont trust my source yet... but seems close|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| MS || Microsoft Game Studios&lt;br /&gt;
|-&lt;br /&gt;
| MW || Midway Games&lt;br /&gt;
|-&lt;br /&gt;
| MX || Empire Interactive {{citation needed|reason=What happend to the publisher, who published this game?|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| NK || NewKidCo&lt;br /&gt;
|-&lt;br /&gt;
| NL || NovaLogic&lt;br /&gt;
|-&lt;br /&gt;
| NM || Namco&lt;br /&gt;
|-&lt;br /&gt;
| OX || Oxygen Interactive&lt;br /&gt;
|-&lt;br /&gt;
| PC || Playlogic Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| PL || Phantagram Co., Ltd.&lt;br /&gt;
|-&lt;br /&gt;
| RA || Rage&lt;br /&gt;
|-&lt;br /&gt;
| SA || Sammy&lt;br /&gt;
|-&lt;br /&gt;
| SC || SCi Games&lt;br /&gt;
|-&lt;br /&gt;
| SE || SEGA&lt;br /&gt;
|-&lt;br /&gt;
| SN || SNK&lt;br /&gt;
|-&lt;br /&gt;
| SS || Simon &amp;amp; Schuster&lt;br /&gt;
|-&lt;br /&gt;
| SU || Success Corporation&lt;br /&gt;
|-&lt;br /&gt;
| SW || Swing! Deutschland&lt;br /&gt;
|-&lt;br /&gt;
| TA || Takara&lt;br /&gt;
|-&lt;br /&gt;
| TC || Tecmo&lt;br /&gt;
|-&lt;br /&gt;
| TD || The 3DO Company (or just 3DO)&lt;br /&gt;
|-&lt;br /&gt;
| TK || Takuyo&lt;br /&gt;
|-&lt;br /&gt;
| TM || TDK Mediactive&lt;br /&gt;
|-&lt;br /&gt;
| TQ || THQ&lt;br /&gt;
|-&lt;br /&gt;
| TS || Titus Interactive&lt;br /&gt;
|-&lt;br /&gt;
| TT || Take-Two Interactive Software&lt;br /&gt;
|-&lt;br /&gt;
| US || Ubisoft&lt;br /&gt;
|-&lt;br /&gt;
| VC || Victor Interactive Software&lt;br /&gt;
|-&lt;br /&gt;
| VN || Vivendi Universal (just took Interplays publishing rights) {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| VU || Vivendi Universal Games&lt;br /&gt;
|-&lt;br /&gt;
| VV || Vivendi Universal Games {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| WE || Wanadoo Edition&lt;br /&gt;
|-&lt;br /&gt;
| WR || Warner Bros. Interactive Entertainment {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| XD || ''Xbox demo disk? (Japan?)''&lt;br /&gt;
|-&lt;br /&gt;
| XI || XPEC Entertainment and Idea Factory &lt;br /&gt;
|-&lt;br /&gt;
| XK || ''Xbox kiosk disk?'' {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| XL || ''Xbox special bundled or live demo disk?'' {{citation needed}}&lt;br /&gt;
|-&lt;br /&gt;
| XM || Evolved Games {{citation needed|reason=Probably not, game &amp;quot;Malice&amp;quot;|date=May 2017}}&lt;br /&gt;
|-&lt;br /&gt;
| XP || XPEC Entertainment&lt;br /&gt;
|-&lt;br /&gt;
| XR || Panorama&lt;br /&gt;
|-&lt;br /&gt;
| XX || Microsoft Windows Media Center Extender for Xbox&lt;br /&gt;
|-&lt;br /&gt;
| YB || YBM Sisa (South-Korea)&lt;br /&gt;
|-&lt;br /&gt;
| ZD || Zushi Games (formerly Zoo Digital Publishing)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The title ID seems to double the information from the [[Xbox Game Disc]] mastering code etched into the ring or readable from the DMI.&lt;br /&gt;
The game number is expressed in 3 decimal digits here which suggests that it will always be below 1000.&lt;br /&gt;
&lt;br /&gt;
'''Examples''':&lt;br /&gt;
&lt;br /&gt;
[[FIFA Soccer 2003]]:&lt;br /&gt;
* DMI and mastering code: EA02302E (Meaning: publisher EA, game number 023, version 02, region Europe)&lt;br /&gt;
* Title ID: 45410017 [EA-023]&lt;br /&gt;
&lt;br /&gt;
[[Halo: Combat Evolved]]:&lt;br /&gt;
* DMI and mastering code: MS00402A (Meaning: publisher Microsoft, game number 004, version 02, region America)&lt;br /&gt;
* Title ID: 4D530004 [MS-004]&lt;br /&gt;
&lt;br /&gt;
[[Halo: Combat Evolved]]:&lt;br /&gt;
* DMI and mastering code: MS00404E (Meaning: publisher Microsoft, game number 004, version 04, region Europe)&lt;br /&gt;
* Title ID: 4D530004 [MS-004]&lt;br /&gt;
&lt;br /&gt;
== Allowed media types ==&lt;br /&gt;
Allowed media types off which the executable is allowed to be run from. The following values are known:&lt;br /&gt;
{| class=wikitable&lt;br /&gt;
! Media type !! Value&lt;br /&gt;
|-&lt;br /&gt;
|HARD_DISK        || 0x00000001&lt;br /&gt;
|-&lt;br /&gt;
|DVD_X2           || 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
|DVD_CD           || 0x00000004&lt;br /&gt;
|-&lt;br /&gt;
|CD               || 0x00000008&lt;br /&gt;
|-&lt;br /&gt;
|DVD_5_RO         || 0x00000010&lt;br /&gt;
|-&lt;br /&gt;
|DVD_9_RO         || 0x00000020&lt;br /&gt;
|-&lt;br /&gt;
|DVD_5_RW         || 0x00000040&lt;br /&gt;
|-&lt;br /&gt;
|DVD_9_RW         || 0x00000080&lt;br /&gt;
|-&lt;br /&gt;
|DONGLE           || 0x00000100&lt;br /&gt;
|-&lt;br /&gt;
|MEDIA_BOARD      || 0x00000200&lt;br /&gt;
|-&lt;br /&gt;
|NONSECURE_HARD_DISK || 0x40000000&lt;br /&gt;
|-&lt;br /&gt;
|NONSECURE_MODE   || 0x80000000&lt;br /&gt;
|-&lt;br /&gt;
|MEDIA_MASK       || 0x00FFFFFF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sections =&lt;br /&gt;
The sections are described by the section headers. The section headers start right after the certificate and contain describe where in the file the actual sections reside. Each header contains a 20 byte SHA-1 hash of the section that is checked by the Xbox to ensure the integrity of the sections. &lt;br /&gt;
&lt;br /&gt;
At least two sections are always present in an Xbox executable: .text and .rdata. There might be more sections that contain either executable code or resources such as images, text, etc.&lt;br /&gt;
&lt;br /&gt;
== .text ==&lt;br /&gt;
&lt;br /&gt;
The .text section contains all x86 subroutines to be executed by the [[CPU|processor]].&lt;br /&gt;
&lt;br /&gt;
== .rdata ==&lt;br /&gt;
&lt;br /&gt;
The .rdata section contains the [[Kernel|kernel thunk table]]. The ordinals in the table are to be resolved to the kernel's actual calling routine, when loaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Xbox Alpha executable format =&lt;br /&gt;
&lt;br /&gt;
Binaries from early Xbox development (Alpha units), are using a different binary format. There are no known public tools that can read them.&lt;br /&gt;
Known differences include that the first bytes of the file are 'XE' instead the 'XBEH' from the final XBE format. The format is rumored to be more like the Windows PE format.{{citation needed}}&lt;br /&gt;
&lt;br /&gt;
= Resources and links =&lt;br /&gt;
* [http://www.caustik.com/cxbx/download/xbe.htm .XBE File Format 1.1]&lt;br /&gt;
&lt;br /&gt;
[[Category:Fileformats]]&lt;/div&gt;</summary>
		<author><name>QuantX</name></author>	</entry>

	<entry>
		<id>https://xboxdevwiki.net/index.php?title=XPR&amp;diff=7333</id>
		<title>XPR</title>
		<link rel="alternate" type="text/html" href="https://xboxdevwiki.net/index.php?title=XPR&amp;diff=7333"/>
				<updated>2023-09-22T03:17:02Z</updated>
		
		<summary type="html">&lt;p&gt;QuantX: Complete rewrite based on my reverse engineering of the XPR0 format as used by Steel Battalion and Steel Battalion: Line of Contact&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''XPR''' probably stands for '''Xbox Packed Resource'''. It's a structure and file-format used by the [[Microsoft XDK]].&lt;br /&gt;
It is being used in parts of [[XAPI]].&lt;br /&gt;
&lt;br /&gt;
XPRs can store a variety of different data types that are useful for Xbox D3D.&lt;br /&gt;
XPRs are storing data similar to internal structures in the D3D driver. So D3D has mechanisms to simply load such resources into D3D objects (by moving them into GPU accessible memory).&lt;br /&gt;
&lt;br /&gt;
An XPR header consists of a number of resource entries which each look something like this{{FIXME|Incomplete}}:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct {&lt;br /&gt;
  union {&lt;br /&gt;
    uint32_t resource_type; // Type information and who &amp;quot;owns&amp;quot; this resource&lt;br /&gt;
    struct {&lt;br /&gt;
      uint32_t ref_count:16; // (lowest bits)&lt;br /&gt;
      uint32_t type:3;&lt;br /&gt;
      uint32_t unk3:13; // (highest bits)&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
  uint32_t data; // Offset of this resource's data in the file&lt;br /&gt;
  uint32_t unknown; // Always zero&lt;br /&gt;
&lt;br /&gt;
  union {&lt;br /&gt;
    struct XPR_Vertexbuffer; // Vertexbuffer (type 0x0)&lt;br /&gt;
      ...&lt;br /&gt;
    } XPR_Vertexbuffer;&lt;br /&gt;
    struct { // Indexbuffer (type 0x1)&lt;br /&gt;
      ...&lt;br /&gt;
    } XPR_Indexbuffer;&lt;br /&gt;
    struct { // Unknown (type 0x2)&lt;br /&gt;
      ...&lt;br /&gt;
    } ...;&lt;br /&gt;
    struct { // Unknown (type 0x3)&lt;br /&gt;
      ...&lt;br /&gt;
    } ...;&lt;br /&gt;
    struct { // Texture (type 0x4)&lt;br /&gt;
      ...;&lt;br /&gt;
    } XPR_Texture;&lt;br /&gt;
    struct { // Unknown (type 0x5)&lt;br /&gt;
      ...&lt;br /&gt;
    } ...;&lt;br /&gt;
    struct { // Unknown (type 0x6)&lt;br /&gt;
      ...&lt;br /&gt;
    } ...;&lt;br /&gt;
    struct { // Unknown (type 0x7)&lt;br /&gt;
      ...&lt;br /&gt;
    } ...;&lt;br /&gt;
  };&lt;br /&gt;
} XPR_Resource;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The XPR header as a whole looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
union {&lt;br /&gt;
  struct {&lt;br /&gt;
    char magic[4]; // Always &amp;quot;XPR0&amp;quot; / 0x30525058&lt;br /&gt;
    uint32_t size; // Size of XPR (including magic and this field)&lt;br /&gt;
    uint32_t header_size; // Size of this header rounded up to the nearest 2048 byte boundary&lt;br /&gt;
    XPR_Resource resources[]; // An array of XPR_Resource entries&lt;br /&gt;
    uint32_t last_resource; // Always 0xFFFFFFFF&lt;br /&gt;
  };&lt;br /&gt;
  uint8_t pad[XPR.header_size]; // Padded with 0xAD bytes&lt;br /&gt;
} XPR;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The headers are then followed by the resource data.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Texture data can be stored in a variety of hardware defined formats as specified by the architecture of the NV2A GPU.&lt;br /&gt;
The format used, along with other information such as width, height, depth, and mipmap levels is stored in the resource header for the texture.&lt;br /&gt;
&lt;br /&gt;
The format for an XPR texture resource is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct {&lt;br /&gt;
  union {&lt;br /&gt;
    uint32_t gpu; // This 32-bit value is placed in the NV097_SET_TEXTURE_FORMAT GPU register&lt;br /&gt;
    struct {&lt;br /&gt;
      uint32_t dma : 4; (lowest bits)&lt;br /&gt;
      uint32_t dimensions : 4; // Is this a 1D, 2D, or 3D texture&lt;br /&gt;
      uint32_t format : 8; // The format of the texture data (see the table below)&lt;br /&gt;
      uint32_t levels : 4; // Number of mipmap levels&lt;br /&gt;
      uint32_t width : 4; // Width of the texture in the following format: actual_width = (1 &amp;lt;&amp;lt; width)&lt;br /&gt;
      uint32_t height : 4; // Height of the texture in the following format: actual_height = (1 &amp;lt;&amp;lt; height)&lt;br /&gt;
      uint32_t depth: 4; (highest bits) // Depth of the texture (for 3D textures) in the following format: actual_depth = (1 &amp;lt;&amp;lt; depth)&lt;br /&gt;
    };&lt;br /&gt;
  };&lt;br /&gt;
  union {&lt;br /&gt;
    uint32_t size; // Describes the size of a texture who's dimensions are not a power-of-2&lt;br /&gt;
    struct {&lt;br /&gt;
      uint32_t width : 12; (lowest bits) // The width of the texture in the following format: actual_width = width + 1&lt;br /&gt;
      uint32_t height : 12; // The height of the texture in the following format: actual_height = height + 1&lt;br /&gt;
      uint32_t depth : 8; (highest bits) // The depth of the texture (for 3D textures) in the following format: actual_depth = depth + 1&lt;br /&gt;
    }&lt;br /&gt;
  };&lt;br /&gt;
} XPR_Texture;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For textures that use arbitrary dimensions the width, height, and depth attributes of the gpu field should be zero. For textures such as DXT that use power-of-2 dimensions the size field should be zero.&lt;br /&gt;
&lt;br /&gt;
The following as a list of texture formats which can be used for the format attribute of the gpu field:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A1R5G5B5       0x02&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_X1R5G5B5       0x03&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A4R4G4B4       0x04&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_R5G6B5         0x05&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8R8G8B8       0x06&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_X8R8G8B8       0x07&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_I8_A8R8G8B8    0x0B&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_L_DXT1_A1R5G5B5   0x0C&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_L_DXT23_A8R8G8B8  0x0E&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_L_DXT45_A8R8G8B8  0x0F&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_R5G6B5   0x11&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8R8G8B8 0x12&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8             0x19&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_X8R8G8B8 0x1E&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_DEPTH_Y16_FIXED 0x30&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_SZ_A8B8G8R8       0x3A&lt;br /&gt;
NV097_SET_TEXTURE_FORMAT_COLOR_LU_IMAGE_A8B8G8R8 0x3F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>QuantX</name></author>	</entry>

	</feed>