Skip to content

Commit 8efbcdd

Browse files
committed
Bug fix
1 parent c03a77d commit 8efbcdd

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

retail/bootloader/source/arm7/main.arm7.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -621,13 +621,14 @@ static void setMemoryAddress(const tNDSHeader* ndsHeader, const module_params_t*
621621
*((u32*)(isSdk5(moduleParams) ? 0x02fff804 : 0x027ff804)) = chipID; // Command10CardID
622622
*((u16*)(isSdk5(moduleParams) ? 0x02fff808 : 0x027ff808)) = ndsHeader->headerCRC16; // Header Checksum, CRC-16 of [000h-15Dh]
623623
*((u16*)(isSdk5(moduleParams) ? 0x02fff80a : 0x027ff80a)) = ndsHeader->secureCRC16; // Secure Area Checksum, CRC-16 of [ [20h]..7FFFh]
624-
*((u16*)(isSdk5(moduleParams) ? 0x02fffc40 : 0x027ffc40)) = 0x1; // Booted from card -- EXTREMELY IMPORTANT!!! Thanks to cReDiAr
625-
if (isSdk5(moduleParams)) {
626-
*(u32*)(0x02fffc00) = chipID; // CurrentCardID
627-
*(u32*)(0x02fffc04) = chipID; // Command10CardID
628-
*(u16*)(0x02fffc08) = ndsHeader->headerCRC16; // Header Checksum, CRC-16 of [000h-15Dh]
629-
*(u16*)(0x02fffc0a) = ndsHeader->secureCRC16; // Secure Area Checksum, CRC-16 of [ [20h]..7FFFh]
630-
}
624+
625+
// Copies of above
626+
*((u32*)(isSdk5(moduleParams) ? 0x02fffc00 : 0x027ffc00)) = chipID; // CurrentCardID
627+
*((u32*)(isSdk5(moduleParams) ? 0x02fffc04 : 0x027ffc04)) = chipID; // Command10CardID
628+
*((u16*)(isSdk5(moduleParams) ? 0x02fffc08 : 0x027ffc08)) = ndsHeader->headerCRC16; // Header Checksum, CRC-16 of [000h-15Dh]
629+
*((u16*)(isSdk5(moduleParams) ? 0x02fffc0a : 0x027ffc0a)) = ndsHeader->secureCRC16; // Secure Area Checksum, CRC-16 of [ [20h]..7FFFh]
630+
631+
*((u16*)(isSdk5(moduleParams) ? 0x02fffc40 : 0x027ffc40)) = 0x1; // Boot Indicator (Booted from card for SDK5) -- EXTREMELY IMPORTANT!!! Thanks to cReDiAr
631632
}
632633

633634
int arm7_main(void) {

0 commit comments

Comments
 (0)