From 723dd542ee5bf6c08d940c0a526bfc42ccae769a Mon Sep 17 00:00:00 2001 From: Aurora Date: Sat, 20 Feb 2016 15:32:52 +0100 Subject: [PATCH] Forgot useless stuff --- Makefile | 6 +---- reboot/rebootCode90.s | 59 ------------------------------------------- source/firm.c | 6 ++--- 3 files changed, 3 insertions(+), 68 deletions(-) delete mode 100644 reboot/rebootCode90.s diff --git a/Makefile b/Makefile index 347c992..f5b81a8 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ emunand: $(dir_out)/rei-n3ds/emunand/emunand.bin emunando3ds: $(dir_out)/rei-o3ds/emunand/emunand.bin .PHONY: reboot -reboot: $(dir_out)/rei-o3ds/reboot/reboot1.bin $(dir_out)/rei-o3ds/reboot/reboot2.bin $(dir_out)/rei-o3ds/reboot/reboot190.bin +reboot: $(dir_out)/rei-o3ds/reboot/reboot1.bin $(dir_out)/rei-o3ds/reboot/reboot2.bin .PHONY: rebootntr rebootntr: $(dir_out)/ntr-o3ds/reboot/reboot1.bin $(dir_out)/ntr-o3ds/reboot/reboot2.bin @@ -98,10 +98,6 @@ $(dir_out)/rei-o3ds/reboot/reboot1.bin: $(dir_reboot)/rebootCode.s $(dir_out)/rei-o3ds/reboot/reboot2.bin: reboot2.bin @cp -av reboot2.bin $(dir_out)/rei-o3ds/reboot -$(dir_out)/rei-o3ds/reboot/reboot190.bin: $(dir_reboot)/rebootCode90.s - @armips $< - @mv reboot1.bin $(dir_out)/rei-o3ds/reboot/reboot190.bin - $(dir_out)/ntr-o3ds/reboot/reboot1.bin: $(dir_reboot)/rebootCodeNtr.s @armips $< @mkdir -p "$(dir_out)/ntr-o3ds/reboot" diff --git a/reboot/rebootCode90.s b/reboot/rebootCode90.s deleted file mode 100644 index 43f2cad..0000000 --- a/reboot/rebootCode90.s +++ /dev/null @@ -1,59 +0,0 @@ -.nds - -firm_size equ 0x000E9000 -firm_addr equ 0x24000000 -fopen equ 0x0805AF20 -fread equ 0x0804D828 -pxi_wait_recv equ 0x08054FB0 - -.macro svc, num - .if isArm() - .word 0xEF000000 | num - .else - .if num > 0xFF - .error "bitch you crazu" - .endif - .halfword 0xDF00 | num - .endif -.endmacro - -.create "reboot1.bin", 0x080858E0 -.org 0x080858E0 -.arm -patch005: - ldr r0, =0x2000E000 - mov r1, #0x200 - mov r2, #0 - add r1, r1, r0 -@@memset_loop: - str r2, [r0] - add r0, r0, #4 - cmp r0, r1 - blt @@memset_loop - ldr r0, =0x2000E000 - ldr r1, =firm_fname - mov r2, #1 - blx fopen - ldr r0, =0x2000E000 - ldr r1, =0x2000E100 - mov r2, #firm_addr - mov r3, #firm_size - blx fread - - ldr r4, =0x44846 - blx pxi_wait_recv - cmp r0, r4 - bne patch005 - mov r2, #0 - mov r3, r2 - mov r1, r2 - mov r0, r2 - svc 0x7C - ldr r0, =0x80FF4FC - svc 0x7B - -@@inf_loop: - b @@inf_loop -.pool -firm_fname: -.close diff --git a/source/firm.c b/source/firm.c index f19f367..faca11f 100755 --- a/source/firm.c +++ b/source/firm.c @@ -145,12 +145,10 @@ u8 patchFirm(void){ //Read reboot code from SD and write patched FIRM path in memory char path[] = "/rei/reboot/reboot1.bin"; - char path2[] = "/rei/reboot/reboot190.bin"; - char *pathPtr = mode ? path : path2; - u32 size = fileSize(pathPtr); + u32 size = fileSize(path); if (!size) return 1; getReboot(firmLocation, firmSize, &rebootOffset, &rebootOffset2); - fileRead((u8*)rebootOffset, pathPtr, size); + fileRead((u8*)rebootOffset, path, size); memcpy((u8*)rebootOffset + size, L"sdmc:", 10); memcpy((u8*)rebootOffset + size + 10, L"" PATCHED_FIRM_PATH, sizeof(PATCHED_FIRM_PATH) * 2); path[18] = '2';