Skip to content

Commit

Permalink
Hide card read DMA on flashcards
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Feb 24, 2025
1 parent 320f5e1 commit 4e00750
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions romsel_aktheme/arm9/source/perGameSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ void perGameSettings (std::string filename) {
u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BE0000 : 0xBE0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? (sharedWramEnabled ? 0x88000 : 0x80000) : (sharedWramEnabled ? 0x8000 : 0));
romSizeLimit -= 0x400000; // Account for DSi mode setting
const u32 romSizeLimitTwl = (ms().consoleModel > 0 ? 0x1000000 : 0);
const bool romLoadableInRam = (romSize <= (romUnitCode[cursorPosOnScreen] > 0 ? romSizeLimitTwl : romSizeLimit));

extern bool dsiWareCompatibleB4DS(void);
bool showPerGameSettings = (bnrRomType[cursorPosOnScreen] == 0 && !isDSiWare[cursorPosOnScreen]);
Expand Down Expand Up @@ -561,7 +562,7 @@ void perGameSettings (std::string filename) {
perGameOp[perGameOps] = 13; // DSiWare booter
}
if ((perGameSettings_dsiwareBooter == -1 ? ms().dsiWareBooter : perGameSettings_dsiwareBooter) || !dsiFeatures() || (ms().secondaryDevice && bs().b4dsMode) || !ms().dsiWareToSD || sys().arm7SCFGLocked() || ms().consoleModel > 0) {
if (ms().secondaryDevice && (!isDSiMode() || !sys().scfgSdmmcEnabled() || bs().b4dsMode) && !blacklisted_cardReadDma) {
if (ms().secondaryDevice && (!isDSiMode() || !sys().scfgSdmmcEnabled() || bs().b4dsMode) && dsiFeatures() && romLoadableInRam && !blacklisted_cardReadDma) {
perGameOps++;
perGameOp[perGameOps] = 5; // Card Read DMA
}
Expand Down Expand Up @@ -607,7 +608,7 @@ void perGameSettings (std::string filename) {
perGameOps++;
perGameOp[perGameOps] = 4; // VRAM Boost
}
if (bootstrapEnabled && !blacklisted_cardReadDma) {
if (bootstrapEnabled && (!ms().secondaryDevice || (dsiFeatures() && romLoadableInRam)) && !blacklisted_cardReadDma) {
perGameOps++;
perGameOp[perGameOps] = 5; // Card Read DMA
}
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 @@ -523,6 +523,7 @@ void perGameSettings (std::string filename, bool* dsiBinariesFound, bool* dsiBin
u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BE0000 : 0xBE0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? (sharedWramEnabled ? 0x88000 : 0x80000) : (sharedWramEnabled ? 0x8000 : 0));
romSizeLimit -= 0x400000; // Account for DSi mode setting
const u32 romSizeLimitTwl = (ms().consoleModel > 0 ? 0x1000000 : 0);
const bool romLoadableInRam = (romSize <= (unitCode[CURPOS] > 0 ? romSizeLimitTwl : romSizeLimit));

extern bool dsiWareCompatibleB4DS(void);
bool showPerGameSettings = (bnrRomType[CURPOS] == 0 && !isDSiWare[CURPOS]);
Expand Down Expand Up @@ -606,7 +607,7 @@ void perGameSettings (std::string filename, bool* dsiBinariesFound, bool* dsiBin
perGameOp[perGameOps] = 13; // DSiWare booter
}
if ((perGameSettings_dsiwareBooter == -1 ? ms().dsiWareBooter : perGameSettings_dsiwareBooter) || !dsiFeatures() || (ms().secondaryDevice && bs().b4dsMode) || !ms().dsiWareToSD || sys().arm7SCFGLocked() || ms().consoleModel > 0) {
if (ms().secondaryDevice && (!isDSiMode() || !sys().scfgSdmmcEnabled() || bs().b4dsMode) && !blacklisted_cardReadDma) {
if (ms().secondaryDevice && (!isDSiMode() || !sys().scfgSdmmcEnabled() || bs().b4dsMode) && dsiFeatures() && romLoadableInRam && !blacklisted_cardReadDma) {
perGameOps++;
perGameOp[perGameOps] = 5; // Card Read DMA
}
Expand Down Expand Up @@ -659,7 +660,7 @@ void perGameSettings (std::string filename, bool* dsiBinariesFound, bool* dsiBin
perGameOps++;
perGameOp[perGameOps] = 4; // VRAM Boost
}
if (bootstrapEnabled && !blacklisted_cardReadDma) {
if (bootstrapEnabled && (!ms().secondaryDevice || (dsiFeatures() && romLoadableInRam)) && !blacklisted_cardReadDma) {
perGameOps++;
perGameOp[perGameOps] = 5; // Card Read DMA
}
Expand All @@ -668,7 +669,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 && !romLoadableInRam && !blacklisted_asyncCardRead) {
perGameOps++;
perGameOp[perGameOps] = 12; // Async Card Read
}
Expand Down
5 changes: 3 additions & 2 deletions romsel_r4theme/arm9/source/perGameSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ void perGameSettings (std::string filename) {
u32 romSizeLimit = (ms().consoleModel > 0 ? 0x1BE0000 : 0xBE0000) + ((sys().dsiWramAccess() && !sys().dsiWramMirrored()) ? (sharedWramEnabled ? 0x88000 : 0x80000) : (sharedWramEnabled ? 0x8000 : 0));
romSizeLimit -= 0x400000; // Account for DSi mode setting
const u32 romSizeLimitTwl = (ms().consoleModel > 0 ? 0x1000000 : 0);
const bool romLoadableInRam = (romSize <= (romUnitCode > 0 ? romSizeLimitTwl : romSizeLimit));

extern bool dsiWareCompatibleB4DS(void);
bool showPerGameSettings = (bnrRomType == 0 && !isDSiWare);
Expand Down Expand Up @@ -564,7 +565,7 @@ void perGameSettings (std::string filename) {
perGameOp[perGameOps] = 13; // DSiWare booter
}
if ((perGameSettings_dsiwareBooter == -1 ? ms().dsiWareBooter : perGameSettings_dsiwareBooter) || !dsiFeatures() || (ms().secondaryDevice && bs().b4dsMode) || !ms().dsiWareToSD || sys().arm7SCFGLocked() || ms().consoleModel > 0) {
if (ms().secondaryDevice && (!isDSiMode() || !sys().scfgSdmmcEnabled() || bs().b4dsMode) && !blacklisted_cardReadDma) {
if (ms().secondaryDevice && (!isDSiMode() || !sys().scfgSdmmcEnabled() || bs().b4dsMode) && dsiFeatures() && romLoadableInRam && !blacklisted_cardReadDma) {
perGameOps++;
perGameOp[perGameOps] = 5; // Card Read DMA
}
Expand Down Expand Up @@ -610,7 +611,7 @@ void perGameSettings (std::string filename) {
perGameOps++;
perGameOp[perGameOps] = 4; // VRAM Boost
}
if (bootstrapEnabled && !blacklisted_cardReadDma) {
if (bootstrapEnabled && (!ms().secondaryDevice || (dsiFeatures() && romLoadableInRam)) && !blacklisted_cardReadDma) {
perGameOps++;
perGameOp[perGameOps] = 5; // Card Read DMA
}
Expand Down

0 comments on commit 4e00750

Please sign in to comment.