}
#endif
- x_do_cycles_post(CYCLE_UNIT, 0);
+ x_do_cycles_post(CYCLE_UNIT, v);
regs.chipset_latch_rw = regs.chipset_latch_read = v;
extern void savestate_restore_final(void);
extern void savestate_memorysave(void);
extern bool is_savestate_incompatible(void);
+extern uae_u32 get_statefile_version(void);
extern void custom_prepare_savestate(void);
}
}
check_trace();
+
+ // Partially fix 6.0.x statefiles where 68000 word read value was stored as a zero.
+ // This can be only fixed when it was 68000 instruction prefetch.
+ if ((get_statefile_version() & 0xffffff00) == 0x00060000) {
+ if (!ctm->data && accessmode == 2 && currprefs.cpu_model <= 68010 && currprefs.cpu_cycle_exact && addr > regs.pc && addr < regs.pc + 20) {
+ return true;
+ }
+ }
+
*data = ctm->data;
return false;
}
#define SAVESTATE_ALWAYSUSEPATH 16
#define SAVESTATE_SPECIALDUMP (SAVESTATE_SPECIALDUMP1 | SAVESTATE_SPECIALDUMP2)
static int savestate_flags;
+static uae_u32 statefile_version;
TCHAR savestate_fname[MAX_DPATH];
TCHAR path_statefile[MAX_DPATH];
return src;
}
+uae_u32 get_statefile_version(void)
+{
+ return statefile_version;
+}
+
static void restore_header (uae_u8 *src)
{
TCHAR *emuname, *emuversion, *description;
description = restore_string ();
write_log (_T("Saved with: '%s %s', description: '%s'\n"),
emuname, emuversion, description);
+
+ statefile_version = 0;
+ TCHAR *tmpp = _tcschr(emuversion, '.');
+ if (tmpp) {
+ *tmpp++ = 0;
+ TCHAR *tmpp2 = tmpp;
+ statefile_version = _tstol(emuversion) << 16;
+ tmpp = _tcschr(tmpp, '.');
+ if (tmpp) {
+ *tmpp++ = 0;
+ statefile_version |= _tstol(tmpp2) << 8;
+ statefile_version |= _tstol(tmpp);
+ }
+ }
+
xfree (description);
xfree (emuversion);
xfree (emuname);