Skip to content

Commit

Permalink
Search irqEnableStartSignature5Debug for SDK 4 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Mar 1, 2024
1 parent acfa6a3 commit 6ca785b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions retail/bootloader/source/arm7/find_arm9.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static const u32 initLockEndSignatureDebug[3] = {0x02FFFFB0, 0x02FFFFB4, 0x02FFF
static const u32 irqEnableStartSignature1[4] = {0xE59FC028, 0xE3A01000, 0xE1DC30B0, 0xE59F2020}; // SDK <= 3
static const u32 irqEnableStartSignature2Alt[4] = {0xE92D000F, 0xE92D4030, 0xE24DD004, 0xEBFFFFDB}; // SDK 2
static const u32 irqEnableStartSignature4[4] = {0xE59F3024, 0xE3A01000, 0xE1D320B0, 0xE1C310B0}; // SDK >= 4
static const u32 irqEnableStartSignature5Debug[4] = {0xE92D000F, 0xE92D4038, 0xEBFFFFE5, 0xE1A05000}; // IS-TWL-DEBUGGER SDK 5
static const u32 irqEnableStartSignature4Debug[4] = {0xE92D000F, 0xE92D4038, 0xEBFFFFE5, 0xE1A05000}; // SDK >= 4 (DEBUG)
static const u32 irqEnableStartSignatureThumb[5] = {0x4D07B430, 0x2100882C, 0x4B068029, 0x1C11681A, 0x60194301}; // SDK <= 3
static const u32 irqEnableStartSignatureThumbAlt[4] = {0x4C07B418, 0x88232100, 0x32081C22, 0x68118021}; // SDK >= 3

Expand Down Expand Up @@ -1253,15 +1253,15 @@ u32* a9FindCardIrqEnableOffset(const tNDSHeader* ndsHeader, const module_params_
}
}

if (!cardIrqEnableOffset && moduleParams->sdk_version > 0x5000000) {
if (!cardIrqEnableOffset && moduleParams->sdk_version > 0x4000000) {
cardIrqEnableOffset = findOffset(
(u32*)ndsHeader->arm9destination, iUncompressedSize,//, ndsHeader->arm9binarySize,
irqEnableStartSignature5Debug, 4
irqEnableStartSignature4Debug, 4
);
if (cardIrqEnableOffset) {
dbg_printf("irq enable SDK 5 debugger found: ");
dbg_printf("irq enable SDK 4 debugger found: ");
} else {
dbg_printf("irq enable SDK 5 debugger not found\n");
dbg_printf("irq enable SDK 4 debugger not found\n");
}
}

Expand Down
10 changes: 5 additions & 5 deletions retail/bootloaderi/source/arm7/find_arm9.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static const u16 fileIoReadSignatureThumb[4] = {0xB538, 0xB082, 0x1C05, 0xAB00
static const u32 irqEnableStartSignature1[4] = {0xE59FC028, 0xE3A01000, 0xE1DC30B0, 0xE59F2020}; // SDK <= 3
static const u32 irqEnableStartSignature2Alt[4] = {0xE92D000F, 0xE92D4030, 0xE24DD004, 0xEBFFFFDB}; // SDK 2
static const u32 irqEnableStartSignature4[4] = {0xE59F3024, 0xE3A01000, 0xE1D320B0, 0xE1C310B0}; // SDK >= 4
static const u32 irqEnableStartSignature5Debug[4] = {0xE92D000F, 0xE92D4038, 0xEBFFFFE5, 0xE1A05000}; // IS-TWL-DEBUGGER SDK 5
static const u32 irqEnableStartSignature4Debug[4] = {0xE92D000F, 0xE92D4038, 0xEBFFFFE5, 0xE1A05000}; // SDK >= 4 (DEBUG)
static const u32 irqEnableStartSignatureThumb[5] = {0x4D07B430, 0x2100882C, 0x4B068029, 0x1C11681A, 0x60194301}; // SDK <= 3
static const u32 irqEnableStartSignatureThumbAlt[4] = {0x4C07B418, 0x88232100, 0x32081C22, 0x68118021}; // SDK >= 3

Expand Down Expand Up @@ -1670,15 +1670,15 @@ u32* a9FindCardIrqEnableOffset(const tNDSHeader* ndsHeader, const module_params_
}
}

if (!cardIrqEnableOffset && moduleParams->sdk_version > 0x5000000) {
if (!cardIrqEnableOffset && moduleParams->sdk_version > 0x4000000) {
cardIrqEnableOffset = findOffset(
(u32*)ndsHeader->arm9destination, iUncompressedSize,//, ndsHeader->arm9binarySize,
irqEnableStartSignature5Debug, 4
irqEnableStartSignature4Debug, 4
);
if (cardIrqEnableOffset) {
dbg_printf("irq enable SDK 5 debugger found: ");
dbg_printf("irq enable SDK 4 debugger found: ");
} else {
dbg_printf("irq enable SDK 5 debugger not found\n");
dbg_printf("irq enable SDK 4 debugger not found\n");
}
}

Expand Down

0 comments on commit 6ca785b

Please sign in to comment.