diff --git a/Makefile b/Makefile index 5c5933d..cd65f52 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,8 @@ dir_arm9_exceptions := $(dir_exceptions)/arm9 dir_arm11_exceptions := $(dir_exceptions)/arm11 dir_mset := CakeHax dir_ninjhax := CakeBrah +dir_menuhax := menuhax +dir_pathchanger := pathchanger dir_build := build dir_out := out @@ -47,7 +49,7 @@ title := \"$(name) $(revision) configuration\" endif .PHONY: all -all: launcher a9lh ninjhax +all: launcher a9lh ninjhax menuhax .PHONY: launcher launcher: $(dir_out)/$(name).dat @@ -58,6 +60,9 @@ a9lh: $(dir_out)/arm9loaderhax.bin .PHONY: ninjhax ninjhax: $(dir_out)/3ds/$(name) +.PHONY: menuhax +menuhax: $(dir_out)/menuhax/boot.3dsx + .PHONY: release ifeq ($(strip $(DEV)),TRUE) release: $(dir_out)/$(name)$(revision)-dev.7z @@ -82,6 +87,12 @@ $(dir_out)/$(name).dat: $(dir_build)/main.bin $(dir_out) @$(MAKE) $(FLAGS) -C $(dir_mset) launcher @dd if=$(dir_build)/main.bin of=$@ bs=512 seek=144 +$(dir_out)/menuhax/boot.3dsx: $(dir_menuhax)/menuhax.diff $(dir_out) + @mkdir -p "$(@D)" + @cd $(dir_ninjhax); patch -p1 < ../$(dir_menuhax)/menuhax.diff; $(MAKE) $(FLAGS); git reset --hard + @mv $(dir_out)/$(name).3dsx $@ + @rm $(dir_out)/$(name).smdh + $(dir_out)/arm9loaderhax.bin: $(dir_build)/main.bin $(dir_out) @cp -a $(dir_build)/main.bin $@ @@ -90,10 +101,15 @@ $(dir_out)/3ds/$(name): $(dir_out) @$(MAKE) $(FLAGS) -C $(dir_ninjhax) @mv $(dir_out)/$(name).3dsx $(dir_out)/$(name).smdh $@ -$(dir_out)/$(name)$(revision).7z: launcher a9lh ninjhax +$(dir_out)/pathchanger: $(dir_pathchanger)/pathchanger.py $(dir_pathchanger)/prebuilt $(dir_out) + @mkdir -p "$@" + @cp $(dir_pathchanger)/pathchanger.py $@ + @cp -rfT $(dir_pathchanger)/prebuilt $@ + +$(dir_out)/$(name)$(revision).7z: all $(dir_out)/pathchanger @7z a -mx $@ ./$(@D)/* -$(dir_out)/$(name)$(revision)-dev.7z: launcher a9lh ninjhax +$(dir_out)/$(name)$(revision)-dev.7z: all $(dir_out)/pathchanger @7z a -mx $@ ./$(@D)/* ./$(dir_exceptions)/exception_dump_parser.py $(dir_build)/main.bin: $(dir_build)/main.elf diff --git a/menuhax/menuhax.diff b/menuhax/menuhax.diff new file mode 100644 index 0000000..af9f93c --- /dev/null +++ b/menuhax/menuhax.diff @@ -0,0 +1,11 @@ +diff -uNr a/source/main.c b/source/main.c +--- a/source/main.c 2016-09-11 01:04:25.665231884 +0200 ++++ b/source/main.c 2016-09-14 12:36:28.601439550 +0200 +@@ -9,6 +9,7 @@ + #endif + + int main (void) { ++ svcSleepThread(2500 * 1000000ULL); + if (brahma_init()) { + if (load_arm9_payload_offset("/" LAUNCHER_PATH, 0x12000, 0x10000) != 1) + goto error; diff --git a/pathchanger/prebuilt/Linux/pathchanger b/pathchanger/prebuilt/Linux/pathchanger new file mode 100755 index 0000000..10f3e65 Binary files /dev/null and b/pathchanger/prebuilt/Linux/pathchanger differ diff --git a/pathchanger/prebuilt/Mac OS X/pathchanger b/pathchanger/prebuilt/Mac OS X/pathchanger new file mode 100755 index 0000000..9d6ee99 Binary files /dev/null and b/pathchanger/prebuilt/Mac OS X/pathchanger differ diff --git a/pathchanger/prebuilt/Windows/pathchanger.exe b/pathchanger/prebuilt/Windows/pathchanger.exe new file mode 100755 index 0000000..232a81d Binary files /dev/null and b/pathchanger/prebuilt/Windows/pathchanger.exe differ