diff options
author | Michael Pavone <pavone@retrodev.com> | 2019-05-14 23:20:35 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2019-05-14 23:20:35 -0700 |
commit | 8ad096f5309ac7c3876b22b6d048f229cdf5677d (patch) | |
tree | 06534a108068ae6d58e92ee724a1ecaacf61d6d0 /sega_mapper.c | |
parent | adf1a574067b9d8debc86d4984502b018d38b123 (diff) |
Differentiate between the full Sega mapper and the SRAM only one. Fixes crash on save state load for Phantasy Star IV and other games that use the same mapper
Diffstat (limited to 'sega_mapper.c')
-rw-r--r-- | sega_mapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sega_mapper.c b/sega_mapper.c index 1410f0c..a217b8a 100644 --- a/sega_mapper.c +++ b/sega_mapper.c @@ -116,7 +116,7 @@ m68k_context * write_bank_reg_w(uint32_t address, m68k_context * context, uint16 context->mem_pointers[gen->mapper_start_index + i] = gen->cart + 0x40000*gen->bank_regs[i]; } } - } else { + } else if (gen->mapper_type == MAPPER_SEGA) { void *new_ptr = gen->cart + 0x40000*value; if (context->mem_pointers[gen->mapper_start_index + address] != new_ptr) { m68k_invalidate_code_range(gen->m68k, address * 0x80000, (address + 1) * 0x80000); |