Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Dec 17, 2024
1 parent ac07657 commit ea4013d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion romsel_aktheme/arm9/source/perGameSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ void perGameSettings (std::string filename) {
}
}

const u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BC0000 : 0xBC0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? 0x78000 : 0);
u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BC0000 : 0xBC0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? ((!sys().arm7SCFGLocked() || *(u32*)0x02FFE1A0 != 0x00403000) ? 0x88000 : 0x80000) : 0);
romSizeLimit -= 0x400000; // Account for DSi mode setting
const u32 romSizeLimitTwl = (ms().consoleModel > 0 ? 0x1000000 : 0);

extern bool dsiWareCompatibleB4DS(void);
Expand Down
7 changes: 4 additions & 3 deletions romsel_dsimenutheme/arm9/source/perGameSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,8 @@ void perGameSettings (std::string filename, bool* dsiBinariesFound, bool* dsiBin
}
}

const u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BC0000 : 0xBC0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? 0x78000 : 0);
u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BC0000 : 0xBC0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? ((!sys().arm7SCFGLocked() || *(u32*)0x02FFE1A0 != 0x00403000) ? 0x88000 : 0x80000) : 0);
romSizeLimit -= 0x400000; // Account for DSi mode setting
const u32 romSizeLimitTwl = (ms().consoleModel > 0 ? 0x1000000 : 0);

extern bool dsiWareCompatibleB4DS(void);
Expand Down Expand Up @@ -627,7 +628,7 @@ void perGameSettings (std::string filename, bool* dsiBinariesFound, bool* dsiBin
donorRomTextShown = false;
}
} else if (showPerGameSettings) { // Per-game settings for retail/commercial games
bool bootstrapEnabled = ((perGameSettings_useBootstrap == -1 ? ms().useBootstrap : perGameSettings_useBootstrap) || (dsiFeatures() && unitCode[CURPOS] > 0) || (ms().secondaryDevice && ((io_dldi_data->ioInterface.features & FEATURE_SLOT_GBA) || unitCode[CURPOS] == 3)) || !ms().secondaryDevice);
const bool bootstrapEnabled = ((perGameSettings_useBootstrap == -1 ? ms().useBootstrap : perGameSettings_useBootstrap) || (dsiFeatures() && unitCode[CURPOS] > 0) || (ms().secondaryDevice && ((io_dldi_data->ioInterface.features & FEATURE_SLOT_GBA) || unitCode[CURPOS] == 3)) || !ms().secondaryDevice);
if (bootstrapEnabled) {
perGameOps++;
perGameOp[perGameOps] = 0; // Language
Expand Down Expand Up @@ -662,7 +663,7 @@ void perGameSettings (std::string filename, bool* dsiBinariesFound, bool* dsiBin
perGameOp[perGameOps] = 14; // Game Loader
}
if (bootstrapEnabled) {
if (!ms().secondaryDevice && (romSize > (unitCode[CURPOS] > 0 ? romSizeLimitTwl : romSizeLimit)) && !blacklisted_asyncCardRead) {
if (!ms().secondaryDevice && (romSize > (unitCode[CURPOS] == 3 ? romSizeLimitTwl : romSizeLimit)) && !blacklisted_asyncCardRead) {
perGameOps++;
perGameOp[perGameOps] = 12; // Async Card Read
}
Expand Down
3 changes: 2 additions & 1 deletion romsel_r4theme/arm9/source/perGameSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ void perGameSettings (std::string filename) {
}
}

const u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BC0000 : 0xBC0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? 0x78000 : 0);
u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BC0000 : 0xBC0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? ((!sys().arm7SCFGLocked() || *(u32*)0x02FFE1A0 != 0x00403000) ? 0x88000 : 0x80000) : 0);
romSizeLimit -= 0x400000; // Account for DSi mode setting
const u32 romSizeLimitTwl = (ms().consoleModel > 0 ? 0x1000000 : 0);

extern bool dsiWareCompatibleB4DS(void);
Expand Down

0 comments on commit ea4013d

Please sign in to comment.