# HG changeset patch # User Mike Pavone # Date 1541964818 28800 # Node ID d2775a242dc6579111c819204350d3788655eb25 # Parent 022d01b6449604a1cf09fdc9a9595a6b7f63afad Make sure M68K sync and target cycles are updated after loading a savestate. Fixes an issue in which loading a savestate would result in things being unresponsive until emulation cycle caught up to whatever the pre-state load sync cycle was diff -r 022d01b64496 -r d2775a242dc6 genesis.c --- a/genesis.c Sat Nov 10 15:27:39 2018 -0800 +++ b/genesis.c Sun Nov 11 11:33:38 2018 -0800 @@ -127,6 +127,7 @@ gen->z80->bank_reg = load_int16(buf) & 0x1FF; } +static void adjust_int_cycle(m68k_context * context, vdp_context * v_context); void genesis_deserialize(deserialize_buffer *buf, genesis_context *gen) { register_section_handler(buf, (section_handler){.fun = m68k_deserialize, .data = gen->m68k}, SECTION_68000); @@ -146,6 +147,7 @@ load_section(buf); } update_z80_bank_pointer(gen); + adjust_int_cycle(gen->m68k, gen->vdp); } uint16_t read_dma_value(uint32_t address)