Browse Source

Don't clobber CHR RAM limit estimation on MMC3 restore

master
Nathaniel Walizer 10 months ago
parent
commit
25e96d4972
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/map/mmc3.c

+ 3
- 1
src/map/mmc3.c View File

@@ -376,7 +376,9 @@ static int mmc3_state_read(void* _map, const void* data,
int base_size = mmc3_state_size(map) - map->chr_ram_lim;
int size = base_size + mmc3_chr_ram_size(map);
if (size > data_len) size = data_len;
map->chr_ram_lim = data_len - base_size;
if (data_len - base_size > map->chr_ram_lim) {
map->chr_ram_lim = data_len - base_size;
}
memcpy(map->r, data, size);

uint8_t new_bank_select = map->bank_select;


Loading…
Cancel
Save