diff --git a/haxloader/source/fatfs/ffconf.h b/haxloader/source/fatfs/ffconf.h index 88ade1f..7d41dcb 100755 --- a/haxloader/source/fatfs/ffconf.h +++ b/haxloader/source/fatfs/ffconf.h @@ -15,7 +15,7 @@ / and optional writing functions as well. */ -#define _FS_MINIMIZE 1 +#define _FS_MINIMIZE 3 /* This option defines minimization level to remove some basic API functions. / / 0: All basic functions are enabled. diff --git a/haxloader/source/fatfs/sdmmc/delay.s b/haxloader/source/fatfs/sdmmc/delay.s index 588fad4..0bf19c2 100644 --- a/haxloader/source/fatfs/sdmmc/delay.s +++ b/haxloader/source/fatfs/sdmmc/delay.s @@ -4,15 +4,13 @@ .global waitcycles .type waitcycles, %function - -@waitcycles ( u32 us ) waitcycles: - PUSH {R0-R2,LR} - STR R0, [SP,#4] - waitcycles_loop: - LDR R3, [SP,#4] - SUBS R2, R3, #1 - STR R2, [SP,#4] - CMP R3, #0 - BNE waitcycles_loop - POP {R0-R2,PC} + push {r0-r2, lr} + str r0, [sp, #4] + waitcycles_loop: + ldr r3, [sp, #4] + subs r2, r3, #1 + str r2, [sp, #4] + cmp r3, #0 + bne waitcycles_loop + pop {r0-r2, pc} diff --git a/injector/source/memory.c b/injector/source/memory.c index 5a17f38..ec7a392 100644 --- a/injector/source/memory.c +++ b/injector/source/memory.c @@ -11,13 +11,13 @@ void memcpy(void *dest, const void *src, u32 size) int memcmp(const void *buf1, const void *buf2, u32 size) { - const u8 *buf1c = (const u8 *)buf1; - const u8 *buf2c = (const u8 *)buf2; + const u8 *buf1c = (const u8 *)buf1, + *buf2c = (const u8 *)buf2; for(u32 i = 0; i < size; i++) { int cmp = buf1c[i] - buf2c[i]; - if(cmp) return cmp; + if(cmp != 0) return cmp; } return 0; diff --git a/loader/source/cache.s b/loader/source/cache.s index 7e0a501..b2a8319 100644 --- a/loader/source/cache.s +++ b/loader/source/cache.s @@ -18,10 +18,12 @@ @ reasonable legal notices or author attributions in that material or in the Appropriate Legal @ Notices displayed by works containing it. +.text .arm -.global flushCaches -.type flushCaches STT_FUNC +.align 4 +.global flushCaches +.type flushCaches, %function flushCaches: @ Clean and flush data cache @ Adpated from http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0155a/ch03s03s05.html , diff --git a/loader/source/memory.c b/loader/source/memory.c index f84295b..b6aefe1 100644 --- a/loader/source/memory.c +++ b/loader/source/memory.c @@ -20,7 +20,6 @@ * Notices displayed by works containing it. */ - /* * memcpy adapted from https://github.com/mid-kid/CakesForeveryWan/blob/557a8e8605ab3ee173af6497486e8f22c261d0e2/source/memfuncs.c */ diff --git a/loader/source/memory.h b/loader/source/memory.h index 8531326..da8751a 100644 --- a/loader/source/memory.h +++ b/loader/source/memory.h @@ -20,7 +20,6 @@ * Notices displayed by works containing it. */ - /* * memcpy adapted from https://github.com/mid-kid/CakesForeveryWan/blob/557a8e8605ab3ee173af6497486e8f22c261d0e2/source/memfuncs.c */ diff --git a/source/fatfs/sdmmc/delay.s b/source/fatfs/sdmmc/delay.s index 588fad4..0bf19c2 100644 --- a/source/fatfs/sdmmc/delay.s +++ b/source/fatfs/sdmmc/delay.s @@ -4,15 +4,13 @@ .global waitcycles .type waitcycles, %function - -@waitcycles ( u32 us ) waitcycles: - PUSH {R0-R2,LR} - STR R0, [SP,#4] - waitcycles_loop: - LDR R3, [SP,#4] - SUBS R2, R3, #1 - STR R2, [SP,#4] - CMP R3, #0 - BNE waitcycles_loop - POP {R0-R2,PC} + push {r0-r2, lr} + str r0, [sp, #4] + waitcycles_loop: + ldr r3, [sp, #4] + subs r2, r3, #1 + str r2, [sp, #4] + cmp r3, #0 + bne waitcycles_loop + pop {r0-r2, pc}