diff options
author | Made-s <made111@gmx.de> | 2020-05-04 17:15:10 +0200 |
---|---|---|
committer | Made-s <made111@gmx.de> | 2020-05-04 17:15:10 +0200 |
commit | 88d142a33b9973f35c913b3fdad7f6a4394a05cd (patch) | |
tree | c6ad861213ccebb62919e27f6d7f3f1080e1ee76 /arm9/lib/include/consts.h | |
parent | ab28b0b37f2fd9fba6010e48e15bd31170d678d7 (diff) | |
parent | c82690dca094b624944b155e5119631c185bca5c (diff) |
Merge branch 'master' of https://github.com/martmists/pokediamond
Diffstat (limited to 'arm9/lib/include/consts.h')
-rw-r--r-- | arm9/lib/include/consts.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/arm9/lib/include/consts.h b/arm9/lib/include/consts.h index 6fc71be2..e07fe323 100644 --- a/arm9/lib/include/consts.h +++ b/arm9/lib/include/consts.h @@ -9,9 +9,22 @@ #define HW_PSR_CPU_MODE_MASK 0x1f // CPU mode -#define HW_PSR_FIQ_DISABLE 0x40 // Disable FIQ -#define HW_PSR_IRQ_DISABLE 0x80 // Disable IRQ -#define HW_PSR_IRQ_FIQ_DISABLE 0xc0 // Disable FIQ and IRQ +#define HW_PSR_DISABLE_FIQ 0x40 // Disable FIQ +#define HW_PSR_DISABLE_IRQ 0x80 // Disable IRQ +#define HW_PSR_DISABLE_IRQ_FIQ 0xc0 // Disable FIQ and IRQ + +#define HW_REG_BASE 0x04000000 +#define REG_VCOUNT_OFFSET 0x006 +#define REG_VCOUNT_ADDR (HW_REG_BASE + REG_VCOUNT_OFFSET) +#define reg_GX_VCOUNT (*(REGType16v *)REG_VCOUNT_ADDR) + +#define REG_KEYINPUT_OFFSET 0x130 +#define REG_KEYINPUT_ADDR (HW_REG_BASE + REG_KEYINPUT_OFFSET) +#define reg_PAD_KEYINPUT (*(REGType16v *)REG_KEYINPUT_ADDR) + +#define REG_GXSTAT_OFFSET 0x600 +#define REG_GXSTAT_ADDR (HW_REG_BASE + REG_GXSTAT_OFFSET) +#define reg_G3X_GXSTAT (*(REGType32v *)REG_GXSTAT_ADDR) #define HW_C6_PR_4KB 0x16 #define HW_C6_PR_8KB 0x18 @@ -42,4 +55,6 @@ #define OSi_TRUNC(n, a) (((u32) (n)) & ~((a) - 1)) #define OSi_ROUND(n, a) (((u32) (n) + (a) - 1) & ~((a) - 1)) +#define OS_IE_V_BLANK (1UL << 0) + #endif //POKEDIAMOND_CONSTS_H |