Vpad.rpl: Difference between revisions
Jump to navigation
Jump to search
Marionumber1 (talk | contribs) m Remove another subsection |
NWPlayer123 (talk | contribs) More data |
||
| Line 36: | Line 36: | ||
|Right Joystick, vectors for X and Y | |Right Joystick, vectors for X and Y | ||
|- | |- | ||
| | |0x52 | ||
|2 | |||
|Touchscreen X | |||
|- | |||
|0x54 | |||
|2 | |||
|Touchscreen Y | |||
|- | |||
|0x56 | |||
|2 | |||
|Flag for if touchscreen is currently being touched (1 = Yes, 0 = No) | |||
|- | |||
|0x58 | |||
|2 | |||
|Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid) | |||
|- | |||
|0x5A | |||
|2 | |||
|Modified Touchscreen X? | |||
|- | |||
|0x5C | |||
|2 | |||
|Modified Touchscreen Y? | |||
|- | |||
|0x5E | |||
|2 | |||
|Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)? | |||
|- | |||
|0x60 | |||
|2 | |||
|Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)? | |||
|- | |||
|0x62 | |||
|2 | |||
|Modified Touchscreen X? | |||
|- | |||
|0x64 | |||
|2 | |||
|Modified Touchscreen Y? | |||
|- | |||
|0x66 | |||
|2 | |||
|Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)? | |||
|- | |||
|0x68 | |||
|2 | |||
|Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)? | |||
|- | |||
|0x6A | |||
|1 | |1 | ||
|Something related to volume slider | |Something related to volume slider | ||
Revision as of 00:42, 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 |
| 0x52 | 2 | Touchscreen X |
| 0x54 | 2 | Touchscreen Y |
| 0x56 | 2 | Flag for if touchscreen is currently being touched (1 = Yes, 0 = No) |
| 0x58 | 2 | Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid) |
| 0x5A | 2 | Modified Touchscreen X? |
| 0x5C | 2 | Modified Touchscreen Y? |
| 0x5E | 2 | Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)? |
| 0x60 | 2 | Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)? |
| 0x62 | 2 | Modified Touchscreen X? |
| 0x64 | 2 | Modified Touchscreen Y? |
| 0x66 | 2 | Modified Flag for if touchscreen is currently being touched (1 = Yes, 0 = No)? |
| 0x68 | 2 | Modified Coordinate validation (0 = All Valid, 1 = Invalid X, 2 = Invalid Y, 3 = Both Invalid)? |
| 0x6A | 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? |