Skip to content

Commit

Permalink
Clear leftover garbage data before boot when running from Slot-1 with…
Browse files Browse the repository at this point in the history
… SCFG
  • Loading branch information
RocketRobz committed Sep 20, 2024
1 parent 09ea7d3 commit f8f5aa4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion retail/arm9/source/conf_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,13 @@ int loadFromSD(configuration* conf, const char *bootstrapPath) {
newRegion = conf->region;
}

bool displayEsrb = (newRegion == 1 && memcmp(romTid, "UBR", 3) != 0 && memcmp(romTid, "HND", 3) != 0 && memcmp(romTid, "HNE", 3) != 0);
const bool displayEsrb = (newRegion == 1 && memcmp(romTid, "UBR", 3) != 0 && memcmp(romTid, "HND", 3) != 0 && memcmp(romTid, "HNE", 3) != 0);

if (dsiFeatures() && !conf->b4dsMode) {
if (!isDSiMode()) {
toncset((u32*)0x02400000, 0, 0x2B8000); // Clear leftover garbage data
}

dsiEnhancedMbk = (isDSiMode() && *(u32*)0x02FFE1A0 == 0x00403000 && ((REG_SCFG_EXT7 == 0) || (strncmp((const char*)0x04FFFA00, "no$gba", 6) == 0)));

// Load donor ROM's arm7 binary, if needed
Expand Down

0 comments on commit f8f5aa4

Please sign in to comment.