Wiimote/Extension Controllers
From WiiLi
The Wiimote includes a 6-pin expansion port that allows external peripherals to be connected to it. Communications are bidirectional synchronous serial (the protocol is unknown), and the devices provide a virtual register block of length 0x100 that is mapped at 0xa40000 in the Wiimote's address space. Communications are obfuscated, as detailed below. Nintendo has currently released two extensions, the Nunchuk and the Classic Controller.
Contents |
[edit] Obfuscation
The data is obfuscated using the following transformation:
c -= 0x17 c ^= 0x17
To undo the obfuscation, use the following transformation:
c ^= 0x17 c += 0x17
[edit] Nunchuk
The Nunchuk is identified by the 16-bit constant 0x0000 (0xFEFE encrypted) at register address 0xa400fe. It provides three-axis acceleration data, two digital buttons, and an X-Y analog stick.
[edit] Data Format
The Nunchuk reports its information as 6 bytes of data, readable at 0xa40008 and streamable using Data Reporting Modes that include Extension bytes (unused bytes are filled with 0x00). The data is packed into the six bytes as follows (after decryption):
| Bit | ||||||||
| Byte | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 0 | SX<7:0> | |||||||
| 1 | SY<7:0> | |||||||
| 2 | AX<7:0> | |||||||
| 3 | AY<7:0> | |||||||
| 4 | AZ<7:0> | |||||||
| 5 | Unknown | BC | BZ | |||||
SX,SY are the Analog Stick X and Y positions, while AX, AY, and AZ are the accelerometer data (in the same format as described in Wiimote#Accelerometer). BC and BZ are the state of the C and Z buttons (0=pressed).
Nintendo games calibrate the center position of the Analog Stick upon power-up or insertion of the Nunchuk.
[edit] Classic Controller
The Classic Controller is identified by the 16-bit constant 0x0101 (0xFDFD encrypted) at register address 0xa400fe. It provides 15 buttons, two of which are analog triggers and provide both "clicked" status and a distance pressed measurement, and two X-Y analog sticks.
[edit] Data Format
The Classic Controller reports its information as 6 bytes of data, readable at 0xa40008 and streamable using Data Reporting Modes that include Extension bytes (unused bytes are filled with 0x00). The data is packed into the six bytes as follows (after deobfuscation):
| Bit | ||||||||
| Byte | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 0 | RX<4:3> | LX<5:0> | ||||||
| 1 | RX<2:1> | LY<5:0> | ||||||
| 2 | RX<0> | LT<4:3> | RY<4:0> | |||||
| 3 | LT<2:0> | RT<4:0> | ||||||
| 4 | BDR | BDD | BLT | B- | BH | B+ | BRT | 1 |
| 5 | BZL | BB | BY | BA | BX | BZR | BDL | BDU |
LX,LY are the left Analog Stick X and Y (0-61), RX and RY are the right Analog Stick X and Y (0-31), and LT and RT are the Left and Right Triggers (0-31). The left Analog Stick has twice the precision of the other analog values.
BD{L,R,U,D} are the D-Pad direction buttons. B{ZR,ZL,A,B,X,Y,+,H,-} are the discrete buttons. B{LT,RT} are the digital button click of LT and RT. All buttons are 0 when pressed.
Nintendo games calibrate the center position of the Analog Sticks upon power-up or insertion of the Classic Controller.
[edit] Guitar Hero Guitar
NOTICE: This section needs verification.
The Guitar is identified by the 16-bit constant 0x0103 (0xFDFB encrypted) at register address 0xa400fe. It provides a two-axis analog thumbstick, a one-axis analog "whammy bar", and 9 buttons (strum bar up, strum bar down, +,- and 5 colored frets).
[edit] Data Format
The Guitar reports its information as 6 bytes of data, readable at 0xa40008 and streamable using Data Reporting Modes that include Extension bytes (unused bytes are filled with 0x00). The data is packed into the six bytes as follows (after deobfuscation):
| Bit | ||||||||
| Byte | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 0 | SX<7:0> | |||||||
| 1 | SY<7:0> | |||||||
| 2 | Unknown | |||||||
| 3 | WB<7:0> | |||||||
| 4 | ? | BD | ? | B- | ? | B+ | ? | ? |
| 5 | BO | BR | BB | BG | BY | ? | ? | BU |
SX,SY are the Analog Stick X and Y positions. BG,BR,BY,BB,BO are the fret buttons by color (Green, Red, Yellow, Blue, Orange). B-,B+ are the + and - buttons at the base of the controller. BU and BD are up and down on the strum bar, respectively. WB is the analog whammy bar.
Linux
WiiLi Link | GameCube Linux | Artwork | Wiimux
Hardware
Wiimote (Drivers, Extension Port, Mii Data) | Wii balance board | Classic Controller | Nunchuk | GameCube Controller (Keyboard, GBA) | Nintendo DS
Bluetooth (BlueZ, Devices) | Ethernet Adapter | USB Devices | Modchips
Homebrew
GameCube | Wii | Action Replay
Specs
Wii | Comparison
File System
Wii Optical Disc | Wii Flash Memory | SD Card
GameCube Optical Disc | GameCube Memory Card

