Vpad.rpl: Difference between revisions

From WiiUBrew
Jump to navigation Jump to search
More data
Added more data, converted values
Line 20: Line 20:
!Description
!Description
|-
|-
|0x2
|2
|2
|2
|Buttons, ABXY, Left, Right, Up, Down in that order (bits)
|Buttons, ABXY, Left, Right, Up, Down in that order (bits)
|-
|-
|0x3
|3
|1
|1
|Buttons, ZL, ZR, L, R, +, -, Power/Home, Sync in that order (bits)
|Buttons, ZL, ZR, L, R, +, -, Power/Home, Sync in that order (bits)
|-
|-
|0xC
|12
|8
|8
|Left Joystick, vectors for X and Y
|Left Joystick, vectors for X and Y
|-
|-
|0x14
|20
|8
|8
|Right Joystick, vectors for X and Y
|Right Joystick, vectors for X and Y
|-
|-
|0x52
!colspan="3"|Touchscreen Input
|-
|82
|2
|2
|Touchscreen X
|Touchscreen X
|-
|-
|0x54
|84
|2
|2
|Touchscreen Y
|Touchscreen Y
|-
|-
|0x56
|86
|2
|2
|Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)
|Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)
|-
|-
|0x58
|88
|2
|2
|Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)
|Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)
|-
|-
|0x5A
|90
|2
|2
|Modified Touchscreen X?
|Modified Touchscreen X?
|-
|-
|0x5C
|92
|2
|2
|Modified Touchscreen Y?
|Modified Touchscreen Y?
|-
|-
|0x5E
|94
|2
|2
|Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)?
|Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)?
|-
|-
|0x60
|96
|2
|2
|Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)?
|Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)?
|-
|-
|0x62
|98
|2
|2
|Modified Touchscreen X?
|Modified Touchscreen X?
|-
|-
|0x64
|100
|2
|2
|Modified Touchscreen Y?
|Modified Touchscreen Y?
|-
|-
|0x66
|102
|2
|2
|Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)?
|Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)?
|-
|-
|0x68
|104
|2
|2
|Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)?
|Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)?
|-
|-
|0x6A
!colspan="3"|Other Data
|-
|160
|1
|1
|Something related to volume slider
|Something related to volume slider
|-
|-
|0xA1
|161
|1
|1
|Battery related. Charge level? out of 6
|Battery related. Charge level? out of 6
|-
|-
|0xA3
|163
|1
|1
|Something related to volume slider(one less than 0xA0)
|Something related to volume slider(one less than 0xA0)
|-
|-
|0xA4
|164
|8
|8
|Padding?
|Padding?

Revision as of 00:52, 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
2 2 Buttons, ABXY, Left, Right, Up, Down in that order (bits)
3 1 Buttons, ZL, ZR, L, R, +, -, Power/Home, Sync in that order (bits)
12 8 Left Joystick, vectors for X and Y
20 8 Right Joystick, vectors for X and Y
Touchscreen Input
82 2 Touchscreen X
84 2 Touchscreen Y
86 2 Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)
88 2 Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)
90 2 Modified Touchscreen X?
92 2 Modified Touchscreen Y?
94 2 Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)?
96 2 Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)?
98 2 Modified Touchscreen X?
100 2 Modified Touchscreen Y?
102 2 Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)?
104 2 Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)?
Other Data
160 1 Something related to volume slider
161 1 Battery related. Charge level? out of 6
163 1 Something related to volume slider(one less than 0xA0)
164 8 Padding?