Skip to content

Commit

Permalink
Apply slot2 mpu patch in cardSave as well
Browse files Browse the repository at this point in the history
Fixes sdk 5.4 games not booting
  • Loading branch information
edo9300 authored Jan 26, 2025
1 parent 7747206 commit 710b0ec
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions retail/cardengine/arm9/source/cardengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,9 @@ void inGameMenu(s32* exRegisters) {
void cardSave(u32 src, u32 dst, u32 len, const bool write) {
const u16 exmemcnt = REG_EXMEMCNT;
// Read/Write save
if (__myio_dldi.features & FEATURE_SLOT_GBA) {
slot2MpuFixGbaDldi();
}
setDeviceOwner();

if ((src % ce9->saveSize)+len > ce9->saveSize) {
Expand Down Expand Up @@ -846,6 +849,9 @@ bool cardSave(void) {
bool res = false;

const u16 exmemcnt = REG_EXMEMCNT;
if (__myio_dldi.features & FEATURE_SLOT_GBA) {
slot2MpuFixGbaDldi();
}
setDeviceOwner();

if (cardStruct[7] != 2)
Expand Down

0 comments on commit 710b0ec

Please sign in to comment.