From 993e564fbb5451668e0dfeec3cb63af3c0e2ddac Mon Sep 17 00:00:00 2001 From: Aurora Date: Sat, 2 Apr 2016 22:02:08 +0200 Subject: [PATCH] u32-ify --- loader/source/buttons.h | 2 +- loader/source/main.c | 2 +- source/buttons.h | 2 +- source/firm.c | 4 ++-- source/firm.h | 4 ++-- source/utils.c | 4 ++-- source/utils.h | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/loader/source/buttons.h b/loader/source/buttons.h index 1cf40be..3d3f589 100644 --- a/loader/source/buttons.h +++ b/loader/source/buttons.h @@ -2,7 +2,7 @@ #include "types.h" -#define HID_PAD (*(vu16 *)0x10146000 ^ 0xFFF) +#define HID_PAD (*(vu32 *)0x10146000 ^ 0xFFF) #define BUTTON_X (1 << 10) #define BUTTON_Y (1 << 11) #define BUTTON_SELECT (1 << 2) diff --git a/loader/source/main.c b/loader/source/main.c index 75f65bd..97f4756 100644 --- a/loader/source/main.c +++ b/loader/source/main.c @@ -26,7 +26,7 @@ void main(void) f_mount(&fs, "0:", 1); //Get pressed buttons - u16 pressed = HID_PAD; + u32 pressed = HID_PAD; if(((pressed & BUTTON_X) && loadPayload("/aurei/payloads/x.bin")) || ((pressed & BUTTON_Y) && loadPayload("/aurei/payloads/y.bin")) || diff --git a/source/buttons.h b/source/buttons.h index 214d7f7..ea7de82 100644 --- a/source/buttons.h +++ b/source/buttons.h @@ -8,7 +8,7 @@ #include "types.h" -#define HID_PAD (*(vu16 *)0x10146000 ^ 0xFFF) +#define HID_PAD (*(vu32 *)0x10146000 ^ 0xFFF) #define BUTTON_R1 (1 << 8) #define BUTTON_L1 (1 << 9) #define BUTTON_A 1 diff --git a/source/firm.c b/source/firm.c index 107e8f1..e84446a 100755 --- a/source/firm.c +++ b/source/firm.c @@ -44,13 +44,13 @@ void setupCFW(void) u32 a9lhBoot = !PDN_SPI_CNT ? 1 : 0; //Retrieve the last booted FIRM - u8 previousFirm = CFG_BOOTENV; + u32 previousFirm = CFG_BOOTENV; //Detect the console being used console = (PDN_MPCORE_CFG == 1) ? 0 : 1; //Get pressed buttons - u16 pressed = HID_PAD; + u32 pressed = HID_PAD; //Attempt to read the configuration file const char configPath[] = "aurei/config.bin"; diff --git a/source/firm.h b/source/firm.h index e1fc108..f647f43 100644 --- a/source/firm.h +++ b/source/firm.h @@ -8,8 +8,8 @@ #include "types.h" -#define PDN_MPCORE_CFG (*(vu8 *)0x10140FFC) -#define PDN_SPI_CNT (*(vu8 *)0x101401C0) +#define PDN_MPCORE_CFG (*(vu32 *)0x10140FFC) +#define PDN_SPI_CNT (*(vu32 *)0x101401C0) //FIRM Header layout typedef struct firmSectionHeader { diff --git a/source/utils.c b/source/utils.c index c1c0963..29094f6 100644 --- a/source/utils.c +++ b/source/utils.c @@ -21,10 +21,10 @@ struct option { u32 enabled; }; -static u16 waitInput(void) +static u32 waitInput(void) { u32 pressedKey = 0; - u16 key; + u32 key; //Wait for no keys to be pressed while(HID_PAD); diff --git a/source/utils.h b/source/utils.h index e86f4aa..e64482a 100644 --- a/source/utils.h +++ b/source/utils.h @@ -8,7 +8,7 @@ #include "types.h" -#define CFG_BOOTENV (*(vu8 *)0x10010000) +#define CFG_BOOTENV (*(vu32 *)0x10010000) void configureCFW(const char *configPath, const char *firm90Path); void deleteFirms(const char *firmPaths[], u32 firms);