Vpad.rpl: Difference between revisions

From WiiUBrew
Jump to navigation Jump to search
m Put VPAD Data under new Structures section
m Remove another subsection
Line 15: Line 15:
===VPAD Data===
===VPAD Data===
Can be gotten using VPADRead(), length seems to control the max amount of "datasets" to keep. A single dataset containing raw controller data is 0xAC bytes.
Can be gotten using VPADRead(), length seems to control the max amount of "datasets" to keep. A single dataset containing raw controller data is 0xAC bytes.
===Structure===
{| class="wikitable"
{| class="wikitable"
!Offset
!Offset

Revision as of 00:18, 5 April 2015

This controls communication with the Gamepad, using VPADBASE internally.

Functions

Name Prototype Description
VPADRead int VPADRead(int padnum, void *buffer, int length, int *err); Stores raw controller data in buffer

Structures

VPAD Data

Can be gotten using VPADRead(), length seems to control the max amount of "datasets" to keep. A single dataset containing raw controller data is 0xAC bytes.

Offset Length Description
0x2 2 Buttons, ABXY, Left, Right, Up, Down in that order (bits)
0x3 1 Buttons, ZL, ZR, L, R, +, -, Power/Home, Sync in that order (bits)
0xC 8 Left Joystick, vectors for X and Y
0x14 8 Right Joystick, vectors for X and Y
0xA0 1 Something related to volume slider
0xA1 1 Battery related. Charge level? out of 6
0xA3 1 Something related to volume slider(one less than 0xA0)
0xA4 8 Padding?