NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
WPADMem.h
1#ifndef RVL_SDK_WPAD_MEM_H
2#define RVL_SDK_WPAD_MEM_H
3#include <types.h>
4
5#include <revolution/WPAD/WPAD.h>
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#define WM_MEM_ADDR(ADDR) ((ADDR) & 0xFFFF)
11
12#define WM_EXT_REG_ADDR(TYPE, ADDR) \
13 (((ADDR) & 0xFFFF) | ((WPAD_EXT_REG_##TYPE) << 16) | (1 << 26))
14
15typedef enum {
16 WPAD_EXT_REG_SPEAKER = 0xA2,
17 WPAD_EXT_REG_EXTENSION = 0xA4,
18 WPAD_EXT_REG_MOTION_PLUS = 0xA6,
19 WPAD_EXT_REG_DPD = 0xB0
20} WPADExtRegType;
21
22typedef struct WPADMemBlock {
23 int at_0x00; // at 0x00
24 int at_0x04; // at 0x04
25 s16 at_0x08; // at 0x08
26 int at_0x0c; // at 0x0C
27 WPADCallback at_0x10; // at 0x10
29
30typedef struct WPADGameInfo {
31 s64 timestamp; // at 0x0
32 u16 gameName[16 + 1]; // at 0x8
33 char gameID[4]; // at 0x2A
34 u8 gameType; // at 0x2E
35 u8 checksum; // at 0x2F
36 u8 UNK_0x30[8];
38
39extern WPADMemBlock _wmb[WPAD_MAX_CONTROLLERS];
40
41#ifdef __cplusplus
42}
43#endif
44#endif