Skip to content

Commit

Permalink
In the MMC5 mapper fixed the WRAM assignment for roms with the iNES 1…
Browse files Browse the repository at this point in the history
….0 header (#402).
  • Loading branch information
punesemu committed May 25, 2024
1 parent f540b5b commit 61406ec
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/mappers/mapper_005.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ void map_init_005(void) {
m005.snd.S4.length.value = 0;
}

// Because no ExROM game is known to write PRG-RAM with one bank value and then attempt
// to read back the same data with a different bank value, emulating the PRG-RAM as 64K at all times
// can be used as a compatible superset for all games.
if (info.format == iNES_1_0) {
if (info.mapper.battery) {
wram_set_nvram_size(S16K);
wram_set_ram_size(S48K);
} else {
wram_set_ram_size(S64K);
}
}

info.mapper.extend_wr = TRUE;
nes[0].irql2f.present = TRUE;
}
Expand Down

0 comments on commit 61406ec

Please sign in to comment.