Skip to content

Commit

Permalink
Derp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Dec 27, 2024
1 parent 3380681 commit 784a71d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions retail/bootloaderi/source/arm7/hook_arm9.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ int hookNdsRetailArm9(
configureRomMap(ce9, ndsHeader, dataToPreloadAddr, dsiMode);
for (u32 i = 0; i < dataToPreloadSize/*+dataToPreloadSize[1]*/; i += cacheBlockSize) {
ce9->cacheAddress += cacheBlockSize;
romLocationAdjust(ndsHeader, laterSdk, (ce9->valueBits & b_dsiBios), (ce9->valueBits & b_isSdk5), &ce9->cacheAddress);
romLocationAdjust(ndsHeader, laterSdk, (ce9->valueBits & b_isSdk5), (ce9->valueBits & b_dsiBios), &ce9->cacheAddress);
dataToPreloadSizeAligned += cacheBlockSize;
}
ce9->cacheSlots -= dataToPreloadSizeAligned/cacheBlockSize;
Expand Down Expand Up @@ -382,7 +382,7 @@ int hookNdsRetailArm9(
u32 addr = ce9->cacheAddress;

for (int slot = 0; slot < ce9->cacheSlots; slot++) {
romLocationAdjust(ndsHeader, laterSdk, (ce9->valueBits & b_dsiBios), (ce9->valueBits & b_isSdk5), &addr);
romLocationAdjust(ndsHeader, laterSdk, (ce9->valueBits & b_isSdk5), (ce9->valueBits & b_dsiBios), &addr);
cacheAddressTable[slot] = addr;
addr += cacheBlockSize;
}
Expand Down
2 changes: 1 addition & 1 deletion retail/bootloaderi/source/arm7/main.arm7.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ bool romLocationAdjust(const tNDSHeader* ndsHeader, const bool laterSdk, const b
*romLocation += 0x4000;
} else if (*romLocation == 0x0CFE0000 && !ntrType) {
*romLocation += 0x20000;
} else if (*romLocation == 0x0CFFC000 && dsiBios) {
} else if (*romLocation == 0x0CFFC000 && (dsiBios || isSdk5)) {
*romLocation += 0x4000;
}
if (*romLocation == (consoleModel > 0 ? 0x0E000000 : 0x0D000000)) {
Expand Down

0 comments on commit 784a71d

Please sign in to comment.