Skip to content

Commit 767d41e

Browse files
committed
Keep FAT table decompressed for ROM reads (for NTR-type titles)
1 parent c650136 commit 767d41e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,13 +1496,13 @@ int arm7_main(void) {
14961496
const char* romTid = getRomTid(&dsiHeaderTemp.ndshdr);
14971497
if (gameOnFlashcard || !isDSiWare) {
14981498
extern u32 clusterCacheSize;
1499-
clusterCacheSize = 0x10000;
1499+
clusterCacheSize = 0x14000;
15001500
if (dsiModeConfirmed && ROMsupportsDsiMode(&dsiHeaderTemp.ndshdr)) {
15011501
clusterCacheSize = 0x7B0;
15021502
}
15031503

1504-
if ((memcmp(romTid, "IPG", 3) == 0) || ((memcmp(romTid, "IPK", 3) == 0))) {
1505-
buildFatTableCache(romFile); // Build uncompressed table for HGSS
1504+
if (!ROMsupportsDsiMode(&dsiHeaderTemp.ndshdr) || !dsiModeConfirmed) {
1505+
buildFatTableCache(romFile); // Build uncompressed table for NTR titles
15061506
if (!romFile->fatTableCached) {
15071507
buildFatTableCacheCompressed(romFile);
15081508
}
@@ -1613,12 +1613,12 @@ int arm7_main(void) {
16131613
if (memcmp(romTid, "HND", 3) == 0) {
16141614
add = 0x108000; // 0x02808000
16151615
}
1616-
tonccpy((char*)0x02700000+add, (char*)0x02700000, 0x10000); // Move FAT table cache elsewhere
1616+
tonccpy((char*)0x02700000+add, (char*)0x02700000, 0x14000); // Move FAT table cache elsewhere
16171617
romFile->fatTableCache = (u32*)((u32)romFile->fatTableCache+add);
16181618
savFile->fatTableCache = (u32*)((u32)savFile->fatTableCache+add);
16191619
lastClusterCacheUsed = (u32*)((u32)lastClusterCacheUsed+add);
16201620
clusterCache += add;
1621-
toncset((char*)0x02700000, 0, 0x10000);
1621+
toncset((char*)0x02700000, 0, 0x14000);
16221622
}
16231623

16241624
//if (gameOnFlashcard || !isDSiWare || !dsiWramAccess) {

0 commit comments

Comments
 (0)