Skip to content

Commit b796fa7

Browse files
committed
Hide SNES and Gen. ROMs on flashcards
The emulators (except for new SNEmulDS) which run them do not support arguments
1 parent d100865 commit b796fa7

File tree

2 files changed

+129
-119
lines changed

2 files changed

+129
-119
lines changed

romsel_dsimenutheme/arm9/source/main.cpp

Lines changed: 64 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,65 +1120,6 @@ int dsiMenuTheme(void) {
11201120

11211121
keysSetRepeat(10, 2);
11221122

1123-
std::vector<std::string_view> extensionList = {
1124-
".nds", ".dsi", ".ids", ".srl", ".app", ".argv", // NDS
1125-
".agb", ".gba", ".mb", // GBA
1126-
".a26", // Atari 2600
1127-
".a52", // Atari 5200
1128-
".a78", // Atari 7800
1129-
".xex", ".atr", // Atari XEGS
1130-
".msx", // MSX
1131-
".col", // ColecoVision
1132-
".int", // Intellivision
1133-
".m5", // Sord M5
1134-
".gb", ".sgb", ".gbc", // Game Boy
1135-
".nes", ".fds", // NES
1136-
".sg", // Sega SG-1000
1137-
".sc", // Sega SC-3000
1138-
".sms", // Sega Master System
1139-
".gg", // Sega Game Gear
1140-
".gen", // Sega Mega Drive/Genesis
1141-
".smc", ".sfc", // SNES
1142-
".ws", ".wsc", // WonderSwan
1143-
".ngp", ".ngc", // Neo Geo Pocket
1144-
".pce", // PC Engine/TurboGrafx-16
1145-
".dsk", // Amstrad CPC
1146-
".min", // Pokémon mini
1147-
".avi", // Xvid (AVI)
1148-
".rvid", // Rocket Video
1149-
".fv", // FastVideo
1150-
".gif", // GIF
1151-
".bmp", // BMP
1152-
".png" // Portable Network Graphics
1153-
};
1154-
1155-
if (dsiFeatures() && ms().consoleModel < 2) {
1156-
char currentDate[16];
1157-
time_t Raw;
1158-
time(&Raw);
1159-
const struct tm *Time = localtime(&Raw);
1160-
1161-
strftime(currentDate, sizeof(currentDate), "%m/%d", Time);
1162-
1163-
if (strcmp(currentDate, "04/01") == 0) {
1164-
// 3DS (for April Fools)
1165-
extensionList.emplace_back(".3ds");
1166-
extensionList.emplace_back(".cia");
1167-
extensionList.emplace_back(".cxi");
1168-
}
1169-
}
1170-
1171-
if (memcmp(io_dldi_data->friendlyName, "DSTWO(Slot-1)", 0xD) == 0) {
1172-
extensionList.emplace_back(".plg"); // DSTWO Plugin
1173-
}
1174-
1175-
if(ms().blockedExtensions.size() > 0) {
1176-
auto toErase = std::remove_if(extensionList.begin(), extensionList.end(), [](std::string_view str) {
1177-
return std::find(ms().blockedExtensions.begin(), ms().blockedExtensions.end(), str) != ms().blockedExtensions.end();
1178-
});
1179-
extensionList.erase(toErase, extensionList.end());
1180-
}
1181-
11821123
srand(time(NULL));
11831124

11841125
char path[256] = {0};
@@ -1225,6 +1166,70 @@ int dsiMenuTheme(void) {
12251166
}
12261167

12271168
while (1) {
1169+
std::vector<std::string_view> extensionList = {
1170+
".nds", ".dsi", ".ids", ".srl", ".app", ".argv", // NDS
1171+
".agb", ".gba", ".mb", // GBA
1172+
".a26", // Atari 2600
1173+
".a52", // Atari 5200
1174+
".a78", // Atari 7800
1175+
".xex", ".atr", // Atari XEGS
1176+
".msx", // MSX
1177+
".col", // ColecoVision
1178+
".int", // Intellivision
1179+
".m5", // Sord M5
1180+
".gb", ".sgb", ".gbc", // Game Boy
1181+
".nes", ".fds", // NES/Famicom
1182+
".sg", // Sega SG-1000
1183+
".sc", // Sega SC-3000
1184+
".sms", // Sega Master System
1185+
".gg", // Sega Game Gear
1186+
".ws", ".wsc", // WonderSwan
1187+
".ngp", ".ngc", // Neo Geo Pocket
1188+
".pce", // PC Engine/TurboGrafx-16
1189+
".dsk", // Amstrad CPC
1190+
".min", // Pokémon mini
1191+
".avi", // Xvid (AVI)
1192+
".fv", // FastVideo
1193+
".gif", // GIF
1194+
".bmp", // BMP
1195+
".png" // Portable Network Graphics
1196+
};
1197+
1198+
if (dsiFeatures() && ms().consoleModel < 2) {
1199+
char currentDate[16];
1200+
time_t Raw;
1201+
time(&Raw);
1202+
const struct tm *Time = localtime(&Raw);
1203+
1204+
strftime(currentDate, sizeof(currentDate), "%m/%d", Time);
1205+
1206+
if (strcmp(currentDate, "04/01") == 0) {
1207+
// 3DS (for April Fools)
1208+
extensionList.emplace_back(".3ds");
1209+
extensionList.emplace_back(".cia");
1210+
extensionList.emplace_back(".cxi");
1211+
}
1212+
}
1213+
1214+
if (!ms().secondaryDevice) {
1215+
extensionList.emplace_back(".gen"); // Sega Mega Drive/Genesis
1216+
}
1217+
1218+
if (!ms().secondaryDevice || ms().newSnesEmuVer) {
1219+
extensionList.emplace_back(".smc"); // SNES
1220+
extensionList.emplace_back(".sfc"); // Super Famicom
1221+
}
1222+
1223+
if (memcmp(io_dldi_data->friendlyName, "DSTWO(Slot-1)", 0xD) == 0) {
1224+
extensionList.emplace_back(".plg"); // DSTWO Plugin
1225+
}
1226+
1227+
if(ms().blockedExtensions.size() > 0) {
1228+
auto toErase = std::remove_if(extensionList.begin(), extensionList.end(), [](std::string_view str) {
1229+
return std::find(ms().blockedExtensions.begin(), ms().blockedExtensions.end(), str) != ms().blockedExtensions.end();
1230+
});
1231+
extensionList.erase(toErase, extensionList.end());
1232+
}
12281233

12291234
snprintf(path, sizeof(path), "%s", ms().romfolder[ms().secondaryDevice].c_str());
12301235
// Set directory

romsel_r4theme/arm9/source/main.cpp

Lines changed: 65 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,65 +1095,6 @@ int r4Theme(void) {
10951095

10961096
keysSetRepeat(15, 2);
10971097

1098-
std::vector<std::string_view> extensionList = {
1099-
".nds", ".dsi", ".ids", ".srl", ".app", ".argv", // NDS
1100-
".agb", ".gba", ".mb", // GBA
1101-
".a26", // Atari 2600
1102-
".a52", // Atari 5200
1103-
".a78", // Atari 7800
1104-
".xex", ".atr", // Atari XEGS
1105-
".msx", // MSX
1106-
".col", // ColecoVision
1107-
".int", // Intellivision
1108-
".m5", // Sord M5
1109-
".gb", ".sgb", ".gbc", // Game Boy
1110-
".nes", ".fds", // NES
1111-
".sg", // Sega SG-1000
1112-
".sc", // Sega SC-3000
1113-
".sms", // Sega Master System
1114-
".gg", // Sega Game Gear
1115-
".gen", // Sega Mega Drive/Genesis
1116-
".smc", ".sfc", // SNES
1117-
".ws", ".wsc", // WonderSwan
1118-
".ngp", ".ngc", // Neo Geo Pocket
1119-
".pce", // PC Engine/TurboGrafx-16
1120-
".dsk", // Amstrad CPC
1121-
".min", // Pokémon mini
1122-
".avi", // Xvid (AVI)
1123-
".rvid", // Rocket Video
1124-
".fv", // FastVideo
1125-
".gif", // GIF
1126-
".bmp", // BMP
1127-
".png" // Portable Network Graphics
1128-
};
1129-
1130-
if (dsiFeatures() && ms().consoleModel < 2) {
1131-
char currentDate[16];
1132-
time_t Raw;
1133-
time(&Raw);
1134-
const struct tm *Time = localtime(&Raw);
1135-
1136-
strftime(currentDate, sizeof(currentDate), "%m/%d", Time);
1137-
1138-
if (strcmp(currentDate, "04/01") == 0) {
1139-
// 3DS (for April Fools)
1140-
extensionList.emplace_back(".3ds");
1141-
extensionList.emplace_back(".cia");
1142-
extensionList.emplace_back(".cxi");
1143-
}
1144-
}
1145-
1146-
if (memcmp(io_dldi_data->friendlyName, "DSTWO(Slot-1)", 0xD) == 0) {
1147-
extensionList.emplace_back(".plg"); // DSTWO Plugin
1148-
}
1149-
1150-
if(ms().blockedExtensions.size() > 0) {
1151-
auto toErase = std::remove_if(extensionList.begin(), extensionList.end(), [](std::string_view str) {
1152-
return std::find(ms().blockedExtensions.begin(), ms().blockedExtensions.end(), str) != ms().blockedExtensions.end();
1153-
});
1154-
extensionList.erase(toErase, extensionList.end());
1155-
}
1156-
11571098
srand(time(NULL));
11581099

11591100
bool copyDSiWareSavBack =
@@ -1199,7 +1140,6 @@ int r4Theme(void) {
11991140
}
12001141

12011142
while (1) {
1202-
12031143
if (startMenu) {
12041144
fadeType = true; // Fade in from white
12051145

@@ -1417,6 +1357,71 @@ int r4Theme(void) {
14171357
iprintf ("Start failed. Error %i\n", err);
14181358
}
14191359
} else {
1360+
std::vector<std::string_view> extensionList = {
1361+
".nds", ".dsi", ".ids", ".srl", ".app", ".argv", // NDS
1362+
".agb", ".gba", ".mb", // GBA
1363+
".a26", // Atari 2600
1364+
".a52", // Atari 5200
1365+
".a78", // Atari 7800
1366+
".xex", ".atr", // Atari XEGS
1367+
".msx", // MSX
1368+
".col", // ColecoVision
1369+
".int", // Intellivision
1370+
".m5", // Sord M5
1371+
".gb", ".sgb", ".gbc", // Game Boy
1372+
".nes", ".fds", // NES/Famicom
1373+
".sg", // Sega SG-1000
1374+
".sc", // Sega SC-3000
1375+
".sms", // Sega Master System
1376+
".gg", // Sega Game Gear
1377+
".ws", ".wsc", // WonderSwan
1378+
".ngp", ".ngc", // Neo Geo Pocket
1379+
".pce", // PC Engine/TurboGrafx-16
1380+
".dsk", // Amstrad CPC
1381+
".min", // Pokémon mini
1382+
".avi", // Xvid (AVI)
1383+
".fv", // FastVideo
1384+
".gif", // GIF
1385+
".bmp", // BMP
1386+
".png" // Portable Network Graphics
1387+
};
1388+
1389+
if (dsiFeatures() && ms().consoleModel < 2) {
1390+
char currentDate[16];
1391+
time_t Raw;
1392+
time(&Raw);
1393+
const struct tm *Time = localtime(&Raw);
1394+
1395+
strftime(currentDate, sizeof(currentDate), "%m/%d", Time);
1396+
1397+
if (strcmp(currentDate, "04/01") == 0) {
1398+
// 3DS (for April Fools)
1399+
extensionList.emplace_back(".3ds");
1400+
extensionList.emplace_back(".cia");
1401+
extensionList.emplace_back(".cxi");
1402+
}
1403+
}
1404+
1405+
if (!ms().secondaryDevice) {
1406+
extensionList.emplace_back(".gen"); // Sega Mega Drive/Genesis
1407+
}
1408+
1409+
if (!ms().secondaryDevice || ms().newSnesEmuVer) {
1410+
extensionList.emplace_back(".smc"); // SNES
1411+
extensionList.emplace_back(".sfc"); // Super Famicom
1412+
}
1413+
1414+
if (memcmp(io_dldi_data->friendlyName, "DSTWO(Slot-1)", 0xD) == 0) {
1415+
extensionList.emplace_back(".plg"); // DSTWO Plugin
1416+
}
1417+
1418+
if(ms().blockedExtensions.size() > 0) {
1419+
auto toErase = std::remove_if(extensionList.begin(), extensionList.end(), [](std::string_view str) {
1420+
return std::find(ms().blockedExtensions.begin(), ms().blockedExtensions.end(), str) != ms().blockedExtensions.end();
1421+
});
1422+
extensionList.erase(toErase, extensionList.end());
1423+
}
1424+
14201425
snprintf (path, sizeof(path), "%s", ms().romfolder[ms().secondaryDevice].c_str());
14211426
// Set directory
14221427
chdir (path);

0 commit comments

Comments
 (0)