Wiimote/Extension Controllers/Classic Controller

From WiiBrew
Jump to navigation Jump to search

The Classic Controller is identified by the 16-bit constant 0x01 (0xFD encrypted) at register address 0x(4)A400FF. 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.

Data Format

The Classic Controller supports three versions of data format: 0x01, 0x02 and 0x03 (register at address 0x(4)A400FE). This register is writable, so you can select data format. The default data format code is 0x01.

Data Format 0x01

The Classic Controller reports its information as 6 bytes of data, readable at 0x(4)A40008 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 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-63), 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.

Data Format 0x02

The main difference from the data format 0x01 is that the Analog Sticks and Triggers have much higher precision: 10 bits (0-1023) and 8 bits (0-255). The Classic Controller reports its information as 9 bytes of data, readable at 0x(4)A40008 (after decryption):

  Bit
Byte 7 6 5 4 3 2 1 0
0 LX<9:2>
1 RX<9:2>
2 LY<9:2>
3 RY<9:2>
4 RY<1:0> LY<1:0> RX<1:0> LX<1:0>
5 LT<7:0>
6 RT<7:0>
7 BDR BDD BLT B- BH B+ BRT 1
8 BZL BB BY BA BX BZR BDL BDU

LX,LY are the left Analog Stick X and Y (0-1023), RX and RY are the right Analog Stick X and Y (0-1023), and LT and RT are the Left and Right Triggers (0-255).

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.

Data Format 0x03

Data format 0x03 is the same as 0x02 but there is no byte #4, e.g. analog sticks have 8 bits precision (0-255). So, the Classic Controller Pro reports its information as 8 bytes of data, readable at 0x(4)A40008 (after decryption):

  Bit
Byte 7 6 5 4 3 2 1 0
0 LX<7:0>
1 RX<7:0>
2 LY<7:0>
3 RY<7:0>
4 LT<7:0>
5 RT<7:0>
6 BDR BDD BLT B- BH B+ BRT 1
7 BZL BB BY BA BX BZR BDL BDU

LX,LY are the left Analog Stick X and Y (0-255), RX and RY are the right Analog Stick X and Y (0-255), and LT and RT are the Left and Right Triggers (0-255).

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.

Calibration

Nintendo games calibrate the center position of the Analog Sticks upon power-up or insertion of the Classic Controller.

Hardware

Wii Classic Controller circuit board, top surface
Wii Classic Controller circuit board, bottom surface

The classic controller uses several different hardware parts for its various inputs.

Input Hardware Circuit board surface and mounting
A membrane switch top
B membrane switch top
- microswitch top
Home microswitch top
+ microswitch top
X membrane switch top
Y membrane switch top
Up membrane switch top
Down membrane switch top
Left membrane switch top
Right membrane switch top
Left joystick X axial potentiometer, 30KΩ daughterboard, through-hole
Left joystick Y axial potentiometer, 30KΩ daughterboard, through-hole
Right joystick X axial potentiometer, 30KΩ linear daughterboard, through-hole
Right joystick Y axial potentiometer, 30KΩ linear daughterboard, through-hole
L trigger range slider potentiometer, 30KΩ linear bottom, through-hole
R trigger range slider potentiometer, 30KΩ linear bottom, through-hole
L trigger bottom-out switch membrane switch daughterboard, through-hole
R trigger bottom-out switch membrane switch daughterboard, through-hole
ZL SPST switch bottom, through-hole
ZR SPST switch bottom, through-hole

The left and right trigger buttons are force-sensitive. As the trigger is pressed, a mechanism slides a 30KΩ linear potentiometer. However, the mechanism only uses about 1/4 of the full travel of the potentiometer. At the bottom of that travel, the mechanism actuates a switch. One might speculate that the bottom-out switch allows the controller to tolerate manufacturing differences between potentiometers without going through a calibration step. Regardless of the variation in the potentiometer, the trigger is considered fully pressed when the bottom-out switch closes.

It appears that all six of the potentiometers on the device: both triggers, both axes of each joystick, appear to be wired in parallel. All of the ends appear to be wired to the unit's power supply and ground, and the wiper (the electrical part that indicates the position of the slider) is probably are connected to analog-to-digital inputs on the microcontroller. Thus, one might speculate that the voltage that the microcontroller sees is between 3.3 and 0 volts. So it may be possible to repurpose these ranged inputs to measure other electrical signals in the same voltage range.

The through-hole switches should be easy to replace with soldered-in leads and moved to an off-board switch. Membrane switches should also be repurposable, but not as readily.