Mercurial > repos > blastem
diff multi_game.c @ 1444:14a2834d010c
Save/restore mapper state in native save states
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 27 Aug 2017 18:15:00 -0700 |
parents | 11ac0b511cff |
children | adb62000d296 |
line wrap: on
line diff
--- a/multi_game.c Sat Aug 26 11:29:46 2017 -0700 +++ b/multi_game.c Sun Aug 27 18:15:00 2017 -0700 @@ -4,6 +4,7 @@ { m68k_context *context = vcontext; genesis_context *gen = context->system; + gen->bank_regs[0] = address; uint32_t base = (address & 0x3F) << 16, start = 0, end = 0x400000; //find the memmap chunk, so we can properly mask the base value for (int i = 0; i < context->options->gen.memmap_chunks; i++) @@ -24,3 +25,13 @@ { return write_multi_game_b(address, context, value); } + +void multi_game_serialize(genesis_context *gen, serialize_buffer *buf) +{ + save_int8(buf, gen->bank_regs[0]); +} + +void multi_game_deserialize(deserialize_buffer *buf, genesis_context *gen) +{ + write_multi_game_b(load_int8(buf), gen, 0); +}