diff --git a/arm9/source/patches/arm9/LastWindowCrcPatch.h b/arm9/source/patches/arm9/LastWindowCrcPatch.h index 14db117..6e50dbb 100644 --- a/arm9/source/patches/arm9/LastWindowCrcPatch.h +++ b/arm9/source/patches/arm9/LastWindowCrcPatch.h @@ -11,14 +11,15 @@ /// So the CRC is sensitive not only to code modifications, but also to which encrypted functions /// were run, and how many times they were run. /// -/// The current DS Protect patch modifies NotA1, causes one of its subfunction to run twice, and +/// The current DS Protect patch modifies NotA1, causes one of its subfunctions to run twice, and /// the other subfunction to not be run, which obviously breaks the CRC. /// -/// Another region is also CRCed, from 0202DB34 to 02030334. What resides here is unknown, it does not -/// contain any commonly modified functions such as AP or card reading. +/// Another region is also CRCed, from 0202DB34 to 02030334. What resides here is the game functions +/// that are supplied to DS Protect as callbacks. These are left unmodified, but to be sure, the CRC +/// for them is patched anyway. /// -/// To make things more annoying, the memory location of the correct CRC is randomized, and the code -/// that checks the CRC resides in a compressed overlay which is loaded into ITCM. This same function +/// To make things more annoying, the memory locations of the correct CRCs are randomized, and the code +/// that checks the CRCs resides in a compressed overlay which is loaded into ITCM. This same function /// also receives several dummy checks that are expected to fail, and so cannot be patched to always /// report the CRC matches. /// diff --git a/arm9/source/patches/arm9/LastWindowCrcPatchCode.s b/arm9/source/patches/arm9/LastWindowCrcPatchCode.s index 444b378..aa0a2ad 100644 --- a/arm9/source/patches/arm9/LastWindowCrcPatchCode.s +++ b/arm9/source/patches/arm9/LastWindowCrcPatchCode.s @@ -11,9 +11,9 @@ patch_lastwindowcrc_entry: cmp r1, r3 beq crc_dsprotect - ldr r3, =0x0202DB34 // CRC of other code region (unknown) + ldr r3, =0x0202DB34 // CRC of DS Protect callbacks cmp r1, r3 - beq crc_unk + beq crc_callback swi #0xE // Normal CRC if address does not match (never hit?) bx lr @@ -22,7 +22,7 @@ crc_dsprotect: ldr r0, =0x67D7 bx lr -crc_unk: +crc_callback: ldr r0, =0x0D1E bx lr