Skip to content

Commit

Permalink
Merge pull request #403 from TuxSH/master
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoSONIC committed Feb 10, 2016
2 parents d2ee1bc + 8b5dfea commit 55d2622
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rxmode/twl_firm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $(BUILD):
%_unstrip.elf: %_linked.elf
$(call Q,LINK,$@)$(LD) -i -Tscript.ld $< -o $@

$(BUILD)/$(TARGET)_linked.elf: $(BUILD)/p9_signatures_spoof.o
$(BUILD)/$(TARGET)_linked.elf: $(BUILD)/p9_signatures_spoof.o $(BUILD)/p9_sha_compare_stub.o $(BUILD)/p9_whitelist_check_disable.o $(BUILD)/p9_cartridge_save_type_check_disable.o $(BUILD)/p9_dsi_cartridge_save_exploit_check_disable.o $(BUILD)/p9_ninlogo_check_disable.o $(BUILD)/p9_blacklist_check_disable.o
$(call Q,LINK,$@)$(LD) -Tscript.ld $^ -o $@

$(BUILD)/%.o: $(SOURCE)/%.s $(BUILD)
Expand Down
22 changes: 21 additions & 1 deletion rxmode/twl_firm/script.ld
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
twl_p9 = 0x8014A00;

SECTIONS
{
. = 0x080182C0;
. = twl_p9 + 0x38C0;
.patch.p9.sig : { *(.patch.p9.sig) }

. = twl_p9 + 0x13656;
.patch.p9.sha_compare_stub : { *(.patch.p9.sha_compare_stub) }

. = twl_p9 + 0x13164;
.patch.p9.whitelist_check_disable : { *(.patch.p9.whitelist_check_disable) }

. = twl_p9 + 0x1355E;
.patch.p9.cartridge_save_type_check_disable : { *(.patch.p9.cartridge_save_type_check_disable) }

. = twl_p9 + 0x1356A;
.patch.p9.dsi_cartridge_save_exploit_check_disable : { *(.patch.p9.dsi_cartridge_save_exploit_check_disable) }

. = twl_p9 + 0x13002;
.patch.p9.ninlogo_check_disable : { *(.patch.p9.ninlogo_check_disable) }

. = twl_p9 + 0x13552;
.patch.p9.blacklist_check_disable : { *(.patch.p9.blacklist_check_disable) }
}
8 changes: 8 additions & 0 deletions rxmode/twl_firm/source/p9_blacklist_check_disable.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@ Blacklist check patch found by TuxSH (see https://gist.github.com/Steveice10/8a6965c59192ac970832).
@ Disables the cartridge blacklist check (mostly, if not entirely, demo carts). This check was introduced in firmware 4.4.0-10.

.section .patch.p9.blacklist_check_disable, "a"
.thumb
mov r0, #1
nop
.pool
8 changes: 8 additions & 0 deletions rxmode/twl_firm/source/p9_cartridge_save_type_check_disable.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@ Cartridge save type check patch found by TuxSH (see https://gist.github.com/Steveice10/8a6965c59192ac970832).
@ This check was introduced firmware 4.4.0-10, and blocked most DSi-compatible flashcarts as a result.

.section .patch.p9.cartridge_save_type_check_disable, "a"
.thumb
mov r0, #1
nop
.pool
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@ DSi cartridge save file exploit check patch found by Steveice10 (see https://gist.github.com/Steveice10/8a6965c59192ac970832).
@ This check was blocking, for instance, the "Classic Word Games" and "Cooking Coach" DSi-mode exploits.

.section .patch.p9.dsi_cartridge_save_exploit_check_disable, "a"
.thumb
mov r0, #1
nop
.pool
8 changes: 8 additions & 0 deletions rxmode/twl_firm/source/p9_ninlogo_check_disable.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@ Nintendo logo check patch found by Steveice10 (see https://gist.github.com/Steveice10/8a6965c59192ac970832)
@ It isn't generally needed

.section .patch.p9.ninlogo_check_disable, "a"
.thumb
mov r0, #0
nop
.pool
8 changes: 8 additions & 0 deletions rxmode/twl_firm/source/p9_sha_compare_stub.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@ Signature/hash patch found by Steveice10, see https://gist.github.com/Steveice10/8a6965c59192ac970832
@ This stubs the function commonly used to compare SHA hashes to always succeed. It's at least used to check SRL (DSi titles) signatures and SHA hashes in general.

.section .patch.p9.sha_compare_stub, "a"
.thumb
mov r0, #1
bx lr
.pool
7 changes: 7 additions & 0 deletions rxmode/twl_firm/source/p9_whitelist_check_disable.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@ Whitelist check patch found by Steveice10, see https://gist.github.com/Steveice10/8a6965c59192ac970832

.section .patch.p9.whitelist_check_disable, "a"
.thumb
mov r0, #0
nop
.pool

0 comments on commit 55d2622

Please sign in to comment.