Skip to content

Commit 784a71d

Browse files
committed
Derp fix
1 parent 3380681 commit 784a71d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

retail/bootloaderi/source/arm7/hook_arm9.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ int hookNdsRetailArm9(
337337
configureRomMap(ce9, ndsHeader, dataToPreloadAddr, dsiMode);
338338
for (u32 i = 0; i < dataToPreloadSize/*+dataToPreloadSize[1]*/; i += cacheBlockSize) {
339339
ce9->cacheAddress += cacheBlockSize;
340-
romLocationAdjust(ndsHeader, laterSdk, (ce9->valueBits & b_dsiBios), (ce9->valueBits & b_isSdk5), &ce9->cacheAddress);
340+
romLocationAdjust(ndsHeader, laterSdk, (ce9->valueBits & b_isSdk5), (ce9->valueBits & b_dsiBios), &ce9->cacheAddress);
341341
dataToPreloadSizeAligned += cacheBlockSize;
342342
}
343343
ce9->cacheSlots -= dataToPreloadSizeAligned/cacheBlockSize;
@@ -382,7 +382,7 @@ int hookNdsRetailArm9(
382382
u32 addr = ce9->cacheAddress;
383383

384384
for (int slot = 0; slot < ce9->cacheSlots; slot++) {
385-
romLocationAdjust(ndsHeader, laterSdk, (ce9->valueBits & b_dsiBios), (ce9->valueBits & b_isSdk5), &addr);
385+
romLocationAdjust(ndsHeader, laterSdk, (ce9->valueBits & b_isSdk5), (ce9->valueBits & b_dsiBios), &addr);
386386
cacheAddressTable[slot] = addr;
387387
addr += cacheBlockSize;
388388
}

retail/bootloaderi/source/arm7/main.arm7.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ bool romLocationAdjust(const tNDSHeader* ndsHeader, const bool laterSdk, const b
831831
*romLocation += 0x4000;
832832
} else if (*romLocation == 0x0CFE0000 && !ntrType) {
833833
*romLocation += 0x20000;
834-
} else if (*romLocation == 0x0CFFC000 && dsiBios) {
834+
} else if (*romLocation == 0x0CFFC000 && (dsiBios || isSdk5)) {
835835
*romLocation += 0x4000;
836836
}
837837
if (*romLocation == (consoleModel > 0 ? 0x0E000000 : 0x0D000000)) {

0 commit comments

Comments
 (0)