Wiimote/Extension Controllers/uDraw GameTablet

From WiiBrew
Jump to navigation Jump to search

The uDraw GameTablet is a graphics tablet that can be identified by the six bytes FF 00 A4 20 01 12 at register address 0xA400FA after decryption.

The wired stylus has a pressure-sensitive nib and two buttons (named "lower" and "upper" in game manuals, "lower" is closest to the nib) under a single rocker piece.

Data Format

The uDraw GameTablet reports its information as 6 bytes of data, readable at 0xA40008 and streamable using Data Reporting Modes that include Extension bytes. The data is packed into the six bytes as follows (after decryption):

  Bit
Byte 7 6 5 4 3 2 1 0
0 X<7:0>
1 Y<7:0>
2 Y<11:8> X<11:8>
3 P<7:0>
4 1 1 1 1 1 1 1 1
5 1 1 1 1 1 P<8> BL BU

The X and Y coordinates both read 0xFFF (4095) when the stylus is away from the tablet surface. The X coordinate ranges from around 80-1955 units (increasing from left to right) and the Y coordinate ranges from around 95-1450 (increasing from bottom to top) in testing though this likely varies from unit to unit.

P represents the stylus pressure and varies from around 8 when the pen is off the tablet to 505 when fully pressed in. It is a nine-bit value with the upper bit P<8> stored separately in byte 5 to the lower eight bits P<7:0> in byte 3 The pressure value is reported even when the pen is off the tablet surface.

BL is the "lower" button and BU is the "upper" button, and both are active-low values that are 1 when their corresponding button is released and 0 when the button is pressed.