Skip to content

Commit

Permalink
m441: Add WRAM support
Browse files Browse the repository at this point in the history
  • Loading branch information
negativeExponent committed Dec 14, 2024
1 parent 2f864e5 commit 092fbfb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/mappers/mapper441.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ static DECLFW(M441Write) {
reg = V;
MMC3_FixPRG();
MMC3_FixCHR();
} else {
CartBW(A, V);
}
}
}
Expand All @@ -68,7 +70,15 @@ static void M441Power(void) {
}

void Mapper441_Init(CartInfo *info) {
MMC3_Init(info, MMC3B, 0, 0);
int ws = (info->PRGRamSize + info->PRGRamSaveSize) / 1024;

if (!ws) {
if (info->battery) {
ws = 8;
}
}

MMC3_Init(info, MMC3B, ws, info->battery);
MMC3_cwrap = M441CW;
MMC3_pwrap = M441PW;
info->Power = M441Power;
Expand Down

0 comments on commit 092fbfb

Please sign in to comment.