Skip to content

Commit

Permalink
Fix *Tetris Party Deluxe* not booting on 3DS consoles
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Dec 12, 2024
1 parent a69bf01 commit 435cc7e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions retail/cardenginei/arm9/source/cardengine.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,12 +628,18 @@ static inline void cardReadRAM(u8* dst, u32 src, u32 len/*, int romPartNo*/) {
// tonccpy(dst, (u8*)ce9->romLocation/*[romPartNo]*/+src, len);
u32 newSrc = 0;
u32 newLen = 0;
bool srcFound = false;
int i = 0;
for (i = 0; i < ce9->romMapLines; i++) {
if (src >= ce9->romMap[i][0] && (i == ce9->romMapLines-1 || src < ce9->romMap[i+1][0])) {
srcFound = true;
break;
}
}
if (!srcFound) {
toncset(dst, 0, len); // Fill dst with 0 if ROM area is not within the map
return;
}
while (len > 0) {
newSrc = (ce9->romMap[i][1]-ce9->romMap[i][0])+src;
newLen = len;
Expand Down

0 comments on commit 435cc7e

Please sign in to comment.