Line 40:
Line 40:
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
+
typedef struct
+
{
+
float x, y;
+
} Vec2D;
+
+
typedef struct
+
{
+
float x, y, z;
+
} Vec3D;
+
typedef struct
typedef struct
{
{
Line 53:
Line 63:
uint32_t btn_release; /* Released buttons */
uint32_t btn_release; /* Released buttons */
Vec2D lstick, rstick; /* Each contains 4-byte X and Y components */
Vec2D lstick, rstick; /* Each contains 4-byte X and Y components */
−
char unknown1c[0x52 - 0x1c]; /* Contains accelerometer and gyroscope data somewhere */
+
char unknown1c[0x38 - 0x1c]; /* Contains accelerometer data somewhere */
+
Vec3D gyro; /* Gyro data */
+
Vec3D angle; /* Angle data */
+
char unknown50[0x52 - 0x50]; /* Two bytes of unknown data */
VPADTPData tpdata; /* Normal touchscreen data */
VPADTPData tpdata; /* Normal touchscreen data */
VPADTPData tpdata1; /* Modified touchscreen data 1 */
VPADTPData tpdata1; /* Modified touchscreen data 1 */