Mercurial > repos > blastem
diff sega_mapper.c @ 1863:d60f2d7c02a5
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
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 14 May 2019 23:20:35 -0700 |
parents | 14a2834d010c |
children | 374a5ae694e8 3748a2a8a4b7 |
line wrap: on
line diff
--- a/sega_mapper.c Wed May 08 23:44:40 2019 -0700 +++ b/sega_mapper.c Tue May 14 23:20:35 2019 -0700 @@ -116,7 +116,7 @@ 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);