• Sign in / Join

Login

Forgot your password?
Do not have an account ?Register here
X

Register

Have an account?Login here
X
  • Home
  • Blog
  • Image Gallery
  • News Archive
    • Hardware News
    • Gaming News
    • Affiliate News
Trending now

Xbox Disc to Digital – What They’re…

Honey-Roasted Gaming news

The Reason Steam Frame Will Clobber Meta

800,000 Views on YouTube channel

New time for podcast

Xbox Starts FIre; Complains About Heat |…

FSR 4.1 Black Flag Resynced | Driver…

The Steam Leveling Trick Nobody Knows

Xbox layoffs (PARODY) | The real reason…

Assassin’s Creed Black Flag Remastered completely crashes…

OCmodshop.com

  • Hardware
    • Audio
    • Cases
    • Coolers
    • Gadgets
    • Home Theater
    • Input Devices
    • Laptops
    • Memory (RAM)
    • Motherboards
    • Networking
    • Power Supplies
    • Processors (CPU)
    • Storage
    • Video Cards
  • Gaming
    • Gaming Accessories
    • Game Walkthroughs
    • PC Games
    • Xbox
    • Playstation
    • Nintendo
  • Articles
    • How-To Guides
    • Case Mod Projects
    • Software
    • Event Coverage
    • Movies
    • Interviews
  • Podcast
FacebookTwitterYoutubeTwitchSteam
How-To Guides

Classic Xbox Controller Programming

by OCmodshopJuly 20, 2003July 21, 201409
Share0

This document describes the Xbox controller as a USB device. Readers are expected to have working knowledge on USB 1.1 and USB HID class.

Throughout this document, the term “controller” refers to the whole controller product and “gamepad” refers to the gamepad portion thereof (excluding the integrated hub and the memory unit slots).

Overview

The Xbox controller is in brief a USB compound device that consists of a USB gamepad and a two-port USB hub. The hub internally has three ports, to one of which the gamepad is attached. The other two ports are the memory unit slots; it means the memory unit is also a USB device (mass storage class). The USB cable and the memory unit connector carries five signals, four of which are standard USB signals and the rest is a clock signal(?). The extra signal is not used by the gamepad and the memory unit; it seems to be provided for upcoming expansion devices.

You can connect the controller to a PC by ripping the cable and soldering a USB connector. However, the controller does not work either with the generic USB joystick driver or with the generic mass storage driver, because the interface class/subclass values are strange, the HID descriptor and the HID report descriptor are missing, and so on.

USB Device Model

Here are descriptor dumps of the hub, the gamepad and the memory unit.

  • Descriptors of the integrated hub
  • Descriptors of the gamepad (American)
  • Descriptors of the memory unit

Vendor / Product IDs

The vendor ID is 0x045e (Microsoft). Product IDs are as follows:

ID product
0x001c integrated hub
0x0202 gamepad (American)
0x0280 memory unit
0x0284 DVD remote receiver
0x0285 gamepad (Japanese)

It is not recommended to distinguish Xbox gamepads by vendor/product IDs because third-party controllers may have their own vendor/product IDs.

Device Class

The gamepad has interface class 0x58 (‘X’), subclass 0x42 (‘B’), protocol 0x00. I believe this should be also common to third-party controllers, but I have no evidence. In fact the gamepad conforms to the HID class and behaves like a USB HID gamepad except that it lacks the HID descriptor and the HID report descriptor.

The memory unit has interface class 0x08 (mass storage), subclass 0x42 (‘B’=???), protocol 0x50 (bulk-only). It seems to conform to the mass storage device class with bulk-only transport, though the “true” subclass must be revealed to access the unit.

HID Report Format

The input report is 20-byte.

offset data
+0 0x00
+1 0x14 (size of the whole report)
+2 digital buttons

bit0 D-pad up
bit1 D-pad down
bit2 D-pad left
bit3 D-pad right
bit4 start button
bit5 back button
bit6 left stick press
bit7 right stick press
+3 0x00 (reserved for more digital buttons?)
+4 A button (*)
+5 B button (*)
+6 X button (*)
+7 Y button (*)
+8 black button (*)
+9 white button (*)
+10 L trigger (*)
+11 R trigger (*)
+12 left stick x (**)
+14 left stick y (**)
+16 right stick x (**)
+18 right stick y (**)
  • (*) unsigned 8-bit
  • (**) signed 16-bit, little-endian, north/east positive

Output Report

The output report (rumble control) is 6-byte.

offset data
+0 0x00
+1 0x06 (size of the whole report)
+2 0x00
+3 left actuator (*)
+4 0x00
+5 right actuator (*)

(*) unsigned 8-bit

Example of the HID Report Descriptor

The Xbox gamepad lacks the HID report descriptor that describes the input/output report formats. Based on the above report formats I have tried writing the report descriptor for your information. This is a mere example; neither official nor verified. Accuracy is not guaranteed.

  • Text format
  • Binary format
  • HID Descriptor Tool format (to be loaded into HID Descriptor Tool)

*For convenience, the text files have been included with the XBCD driver on the download page.

This page is an archive of the original post found here.

 

Post Views: 15
Xbox ControllerShare0
previous post
Modder’s Mesh Review
next post
Problems MS & Co. Try to Push
OCmodshop

Related posts

Intensafire Xbox 360 Controller Mod

Alan McCloskeySeptember 5, 2009June 24, 2014

Recent Posts

  • Xbox Disc to Digital – What They’re NOT Telling You
  • Honey-Roasted Gaming news
  • The Reason Steam Frame Will Clobber Meta
  • 800,000 Views on YouTube channel
  • New time for podcast
OCmodshop.com
FacebookTwitterYoutubeTwitchSteam
@2026 - ocmodshop.com. All Right Reserved.
  • About Us
  • Terms of Use / Privacy Policy
  • Copyrights
  • Our Rating System
  • Publish an Article on OCmodshop
  • Contest Rules
OCmodshop.com
FacebookTwitterYoutubeTwitchSteam
  • Hardware
    • Audio
    • Cases
    • Coolers
    • Gadgets
    • Home Theater
    • Input Devices
    • Laptops
    • Memory (RAM)
    • Motherboards
    • Networking
    • Power Supplies
    • Processors (CPU)
    • Storage
    • Video Cards
  • Gaming
    • Gaming Accessories
    • Game Walkthroughs
    • PC Games
    • Xbox
    • Playstation
    • Nintendo
  • Articles
    • How-To Guides
    • Case Mod Projects
    • Software
    • Event Coverage
    • Movies
    • Interviews
  • Podcast
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}