summaryrefslogtreecommitdiff
path: root/include/padmgr.h
diff options
context:
space:
mode:
authorTharo <17233964+Thar0@users.noreply.github.com>2022-02-02 21:43:34 +0000
committerGitHub <noreply@github.com>2022-02-02 16:43:34 -0500
commitc8f4d66b009ad400f54538d6293afd5971c87776 (patch)
tree35b628e097b755e512b91fb0706432c8c62be275 /include/padmgr.h
parentcd1d08d34f32ec97396786e83783fc37b7a68858 (diff)
Documentation for fault.c and fault_drawer.c (#1106)
* Mostly document fault and fault_drawer * FaultDrawer printf functions return s32 * Review Suggestions for comments Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> * Some further review suggestions * Further changes from suggestions * Fix Fault_AddClient doc comment * Bug comment for memdump overrun, add more to Fault_PadCallback bug comment * mb -> MB, comment about bss above externs * Fix color codes Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
Diffstat (limited to 'include/padmgr.h')
-rw-r--r--include/padmgr.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/include/padmgr.h b/include/padmgr.h
new file mode 100644
index 000000000..459bcfeba
--- /dev/null
+++ b/include/padmgr.h
@@ -0,0 +1,40 @@
+#ifndef PADMGR_H
+#define PADMGR_H
+
+#include "irqmgr.h"
+
+typedef struct {
+ /* 0x00 */ OSContPad cur;
+ /* 0x06 */ OSContPad prev;
+ /* 0x0C */ OSContPad press; // X/Y store delta from last frame
+ /* 0x12 */ OSContPad rel; // X/Y store adjusted
+} Input; // size = 0x18
+
+typedef struct PadMgr {
+ /* 0x0000 */ OSContStatus padStatus[4];
+ /* 0x0010 */ OSMesg serialMsgBuf[1];
+ /* 0x0014 */ OSMesg lockMsgBuf[1];
+ /* 0x0018 */ OSMesg interruptMsgBuf[4];
+ /* 0x0028 */ OSMesgQueue serialMsgQ;
+ /* 0x0040 */ OSMesgQueue lockMsgQ;
+ /* 0x0058 */ OSMesgQueue interruptMsgQ;
+ /* 0x0070 */ IrqMgrClient irqClient;
+ /* 0x0078 */ IrqMgr* irqMgr;
+ /* 0x0080 */ OSThread thread;
+ /* 0x0230 */ Input inputs[4];
+ /* 0x0290 */ OSContPad pads[4];
+ /* 0x02A8 */ vu8 validCtrlrsMask;
+ /* 0x02A9 */ u8 nControllers;
+ /* 0x02AA */ u8 ctrlrIsConnected[4]; // "Key_switch" originally
+ /* 0x02AE */ u8 pakType[4]; // 1 if rumble pack, 2 if mempak?
+ /* 0x02B2 */ vu8 rumbleEnable[4];
+ /* 0x02B6 */ u8 rumbleCounter[4]; // not clear exact meaning
+ /* 0x02BC */ OSPfs pfs[4];
+ /* 0x045C */ vu8 rumbleOffFrames;
+ /* 0x045D */ vu8 rumbleOnFrames;
+ /* 0x045E */ u8 preNMIShutdown;
+ /* 0x0460 */ void (*retraceCallback)(struct PadMgr* padmgr, s32 unk464);
+ /* 0x0464 */ u32 retraceCallbackValue;
+} PadMgr; // size = 0x468
+
+#endif