diff --git a/source/emunand.c b/source/emunand.c index a3d8299..388fed5 100644 --- a/source/emunand.c +++ b/source/emunand.c @@ -35,7 +35,7 @@ void getEmunandSect(u32 *off, u32 *head, u32 emuNAND){ u32 getSDMMC(void *pos, u32 size){ //Look for struct code - const unsigned char pattern[] = {0x21, 0x20, 0x18, 0x20}; + const u8 pattern[] = {0x21, 0x20, 0x18, 0x20}; const u8 *off = (u8 *)memsearch(pos, pattern, size, 4) - 1; return *(u32 *)(off + 0x0A) + *(u32 *)(off + 0x0E); @@ -43,7 +43,7 @@ u32 getSDMMC(void *pos, u32 size){ void getEmuRW(void *pos, u32 size, u32 *readOff, u32 *writeOff){ //Look for read/write code - const unsigned char pattern[] = {0x1E, 0x00, 0xC8, 0x05}; + const u8 pattern[] = {0x1E, 0x00, 0xC8, 0x05}; *writeOff = (u32)memsearch(pos, pattern, size, 4) - 6; *readOff = (u32)memsearch((void *)(*writeOff - 0x1000), pattern, 0x1000, 4) - 6; @@ -51,13 +51,13 @@ void getEmuRW(void *pos, u32 size, u32 *readOff, u32 *writeOff){ u32 *getMPU(void *pos, u32 size){ //Look for MPU pattern - const unsigned char pattern[] = {0x03, 0x00, 0x24, 0x00}; + const u8 pattern[] = {0x03, 0x00, 0x24, 0x00}; return (u32 *)memsearch(pos, pattern, size, 4); } void *getEmuCode(u8 *pos, u32 size, u8 *proc9Offset){ - const unsigned char pattern[] = {0x00, 0xFF, 0xFF, 0xFF}; + const u8 pattern[] = {0x00, 0xFF, 0xFF, 0xFF}; //Looking for the last free space before Process9 return (u8 *)memsearch(pos, pattern, size - (size - (u32)(proc9Offset - pos)), 4) + 0xD; diff --git a/source/patches.c b/source/patches.c index 1f164b6..3ba7dd3 100644 --- a/source/patches.c +++ b/source/patches.c @@ -29,8 +29,8 @@ u8 *getProc9(void *pos, u32 size){ void getSignatures(void *pos, u32 size, u32 *off, u32 *off2){ //Look for signature checks - const unsigned char pattern[] = {0xC0, 0x1C, 0x76, 0xE7}; - const unsigned char pattern2[] = {0xB5, 0x22, 0x4D, 0x0C}; + const u8 pattern[] = {0xC0, 0x1C, 0x76, 0xE7}; + const u8 pattern2[] = {0xB5, 0x22, 0x4D, 0x0C}; *off = (u32)memsearch(pos, pattern, size, 4); *off2 = (u32)memsearch(pos, pattern2, size, 4) - 1; @@ -38,7 +38,7 @@ void getSignatures(void *pos, u32 size, u32 *off, u32 *off2){ void *getReboot(void *pos, u32 size){ //Look for FIRM reboot code - const unsigned char pattern[] = {0xDE, 0x1F, 0x8D, 0xE2}; + const u8 pattern[] = {0xDE, 0x1F, 0x8D, 0xE2}; return (u8 *)memsearch(pos, pattern, size, 4) - 0x10; } @@ -56,7 +56,7 @@ u32 getfOpen(u8 *proc9Offset, void *rebootOffset){ u16 *getFirmWrite(void *pos, u32 size){ //Look for FIRM writing code u8 *const off = (u8 *)memsearch(pos, "exe:", size, 4); - const unsigned char pattern[] = {0x00, 0x28, 0x01, 0xDA}; + const u8 pattern[] = {0x00, 0x28, 0x01, 0xDA}; return (u16 *)memsearch(off - 0x100, pattern, 0x100, 4); } \ No newline at end of file