Skip to content

Commit

Permalink
incompatibleGameListB4DS is now empty
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Sep 13, 2024
1 parent f6a4b0a commit be513c6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
18 changes: 10 additions & 8 deletions romsel_aktheme/arm9/source/fileBrowse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1003,10 +1003,12 @@ bool donorRomMsg(void) {
return proceedToLaunch;
}

bool checkForCompatibleGame(const char *filename) {
bool checkForCompatibleGame() {
return true;

bool proceedToLaunch = true;

if (!dsiFeatures() && ms().secondaryDevice) {
/* if (!dsiFeatures() && ms().secondaryDevice) {
// TODO: If the list gets large enough, switch to bsearch().
for (unsigned int i = 0; i < sizeof(incompatibleGameListB4DS)/sizeof(incompatibleGameListB4DS[0]); i++) {
if (memcmp(gameTid[cursorPosOnScreen], incompatibleGameListB4DS[i], 3) == 0) {
Expand All @@ -1015,7 +1017,7 @@ bool checkForCompatibleGame(const char *filename) {
break;
}
}
}
} */

/* if (proceedToLaunch && ms().secondaryDevice) {
// TODO: If the list gets large enough, switch to bsearch().
Expand Down Expand Up @@ -1076,7 +1078,7 @@ bool checkForCompatibleGame(const char *filename) {
return proceedToLaunch;
}

bool gameCompatibleMemoryPit(const char* filename) {
bool gameCompatibleMemoryPit(void) {
// TODO: If the list gets large enough, switch to bsearch().
for (unsigned int i = 0; i < sizeof(incompatibleGameListMemoryPit)/sizeof(incompatibleGameListMemoryPit[0]); i++) {
if (memcmp(gameTid[cursorPosOnScreen], incompatibleGameListMemoryPit[i], 3) == 0) {
Expand All @@ -1087,7 +1089,7 @@ bool gameCompatibleMemoryPit(const char* filename) {
return true;
}

bool checkForGbaBiosRequirement(const char* filename) {
bool checkForGbaBiosRequirement(void) {
extern bool gbaBiosFound[2];

if (gbaBiosFound[ms().secondaryDevice]) {
Expand Down Expand Up @@ -1737,8 +1739,8 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {

if (isTwlm[cursorPosOnScreen] || (!isDSiWare[cursorPosOnScreen] && (!dsiFeatures() || bs().b4dsMode) && ms().secondaryDevice && bnrRomType[cursorPosOnScreen] == 0 && gameTid[cursorPosOnScreen][0] == 'D' && romUnitCode[cursorPosOnScreen] == 3 && requiresDonorRom[cursorPosOnScreen] != 51)
|| (isDSiWare[cursorPosOnScreen] && ((((!dsiFeatures() && (!sdFound() || !ms().dsiWareToSD)) || bs().b4dsMode) && ms().secondaryDevice && !dsiWareCompatibleB4DS())
|| (isDSiMode() && memcmp(io_dldi_data->friendlyName, "CycloDS iEvolution", 18) != 0 && sys().arm7SCFGLocked() && !sys().dsiWramAccess() && !gameCompatibleMemoryPit(dirContents.at(fileOffset).name.c_str()))))
|| (bnrRomType[cursorPosOnScreen] == 1 && (!ms().secondaryDevice || dsiFeatures() || ms().gbaBooter == TWLSettings::EGbaGbar2) && checkForGbaBiosRequirement(dirContents.at(fileOffset).name.c_str()))) {
|| (isDSiMode() && memcmp(io_dldi_data->friendlyName, "CycloDS iEvolution", 18) != 0 && sys().arm7SCFGLocked() && !sys().dsiWramAccess() && !gameCompatibleMemoryPit())))
|| (bnrRomType[cursorPosOnScreen] == 1 && (!ms().secondaryDevice || dsiFeatures() || ms().gbaBooter == TWLSettings::EGbaGbar2) && checkForGbaBiosRequirement())) {
proceedToLaunch = cannotLaunchMsg(gameTid[cursorPosOnScreen][0]);
refreshBanners(screenOffset, fileOffset, dirContents);
}
Expand All @@ -1759,7 +1761,7 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {
}
}
if (proceedToLaunch && (useBootstrapAnyway || ((!dsiFeatures() || bs().b4dsMode) && isDSiWare[cursorPosOnScreen])) && bnrRomType[cursorPosOnScreen] == 0 && !dsModeForced && isHomebrew[cursorPosOnScreen] == 0) {
proceedToLaunch = checkForCompatibleGame(dirContents.at(fileOffset).name.c_str());
proceedToLaunch = checkForCompatibleGame();
if (proceedToLaunch && requiresDonorRom[cursorPosOnScreen]) {
const char* pathDefine = "DONORTWL_NDS_PATH"; // SDK5.x (TWL)
if (requiresDonorRom[cursorPosOnScreen] == 52) {
Expand Down
6 changes: 4 additions & 2 deletions romsel_dsimenutheme/arm9/source/fileBrowse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1851,9 +1851,11 @@ bool donorRomMsg(const char *filename) {
}

bool checkForCompatibleGame(const char *filename) {
return true;

bool proceedToLaunch = true;

if (!dsiFeatures() && ms().secondaryDevice) {
/* if (!dsiFeatures() && ms().secondaryDevice) {
// TODO: If the list gets large enough, switch to bsearch().
for (unsigned int i = 0; i < sizeof(incompatibleGameListB4DS)/sizeof(incompatibleGameListB4DS[0]); i++) {
if (memcmp(gameTid[CURPOS], incompatibleGameListB4DS[i], 3) == 0) {
Expand All @@ -1862,7 +1864,7 @@ bool checkForCompatibleGame(const char *filename) {
break;
}
}
}
} */

/* if (proceedToLaunch && ms().secondaryDevice) {
// TODO: If the list gets large enough, switch to bsearch().
Expand Down
14 changes: 8 additions & 6 deletions romsel_r4theme/arm9/source/fileBrowse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,11 @@ void showLocation(void) {
}

bool checkForCompatibleGame(const char *filename) {
return true;

bool proceedToLaunch = true;

if (!dsiFeatures() && ms().secondaryDevice) {
/* if (!dsiFeatures() && ms().secondaryDevice) {
// TODO: If the list gets large enough, switch to bsearch().
for (unsigned int i = 0; i < sizeof(incompatibleGameListB4DS)/sizeof(incompatibleGameListB4DS[0]); i++) {
if (memcmp(gameTid, incompatibleGameListB4DS[i], 3) == 0) {
Expand All @@ -617,7 +619,7 @@ bool checkForCompatibleGame(const char *filename) {
break;
}
}
}
} */

/* if (proceedToLaunch && ms().secondaryDevice) {
// TODO: If the list gets large enough, switch to bsearch().
Expand Down Expand Up @@ -689,7 +691,7 @@ bool checkForCompatibleGame(const char *filename) {
return proceedToLaunch;
}

bool gameCompatibleMemoryPit(const char* filename) {
bool gameCompatibleMemoryPit(void) {
// TODO: If the list gets large enough, switch to bsearch().
for (unsigned int i = 0; i < sizeof(incompatibleGameListMemoryPit)/sizeof(incompatibleGameListMemoryPit[0]); i++) {
if (memcmp(gameTid, incompatibleGameListMemoryPit[i], 3) == 0) {
Expand All @@ -700,7 +702,7 @@ bool gameCompatibleMemoryPit(const char* filename) {
return true;
}

bool checkForGbaBiosRequirement(const char* filename) {
bool checkForGbaBiosRequirement(void) {
extern bool gbaBiosFound[2];

if (gbaBiosFound[ms().secondaryDevice]) {
Expand Down Expand Up @@ -1256,8 +1258,8 @@ std::string browseForFile(const std::vector<std::string_view> extensionList) {

if (isTwlm || (!isDSiWare && (!dsiFeatures() || bs().b4dsMode) && ms().secondaryDevice && bnrRomType == 0 && gameTid[0] == 'D' && romUnitCode == 3 && requiresDonorRom != 51)
|| (isDSiWare && ((((!dsiFeatures() && (!sdFound() || !ms().dsiWareToSD)) || bs().b4dsMode) && ms().secondaryDevice && !dsiWareCompatibleB4DS())
|| (isDSiMode() && memcmp(io_dldi_data->friendlyName, "CycloDS iEvolution", 18) != 0 && sys().arm7SCFGLocked() && !sys().dsiWramAccess() && !gameCompatibleMemoryPit(dirContents.at(fileOffset).name.c_str()))))
|| (bnrRomType == 1 && (!ms().secondaryDevice || dsiFeatures() || ms().gbaBooter == TWLSettings::EGbaGbar2) && checkForGbaBiosRequirement(dirContents.at(fileOffset).name.c_str()))) {
|| (isDSiMode() && memcmp(io_dldi_data->friendlyName, "CycloDS iEvolution", 18) != 0 && sys().arm7SCFGLocked() && !sys().dsiWramAccess() && !gameCompatibleMemoryPit())))
|| (bnrRomType == 1 && (!ms().secondaryDevice || dsiFeatures() || ms().gbaBooter == TWLSettings::EGbaGbar2) && checkForGbaBiosRequirement())) {
proceedToLaunch = cannotLaunchMsg(gameTid[0]);
}
bool useBootstrapAnyway = ((perGameSettings_useBootstrap == -1 ? ms().useBootstrap : perGameSettings_useBootstrap) || !ms().secondaryDevice);
Expand Down
6 changes: 2 additions & 4 deletions universal/include/incompatibleGameMap.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#ifndef INCOMPATIBLEMAP_H
#define INCOMPATIBLEMAP_H

static const char incompatibleGameListB4DS[][4] = {
"AWD", // Diddy Kong Racing
"CP3", // Viva Pinata: Pocket Paradise
};
// static const char incompatibleGameListB4DS[][4] = {
// };

// static const char incompatibleGameListFC[][4] = {
// };
Expand Down

0 comments on commit be513c6

Please sign in to comment.