From: notaz Date: Fri, 29 Sep 2017 21:17:04 +0000 (+0300) Subject: state: setup banks before CPUs on load X-Git-Tag: v1.92~22 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e23f4494fb0b5bc31f8f8a61db88642c33f85516;p=picodrive.git state: setup banks before CPUs on load --- diff --git a/pico/state.c b/pico/state.c index 88b8655c..3cd41b2b 100644 --- a/pico/state.c +++ b/pico/state.c @@ -589,6 +589,9 @@ readend: if (PicoAHW & PAHW_32X) Pico32xStateLoaded(1); + if (PicoLoadStateHook != NULL) + PicoLoadStateHook(); + // must unpack 68k and z80 after banks are set up if (!(PicoAHW & PAHW_SMS)) SekUnpackCpu(buff_m68k, 0); @@ -683,8 +686,6 @@ static int pico_state_internal(void *afile, int is_save) ret = state_load_legacy(afile); } - if (PicoLoadStateHook != NULL) - PicoLoadStateHook(); Pico.m.dirtyPal = 1; }