From: Toni Wilen Date: Tue, 25 Jul 2023 17:56:48 +0000 (+0300) Subject: m68k RESET instruction activates warp mode reset X-Git-Tag: 5.1.0~143 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=a4ede41e742807bdc770004e1c37c821c7225fd8;p=francis%2Fwinuae.git m68k RESET instruction activates warp mode reset --- diff --git a/newcpu.cpp b/newcpu.cpp index 76df8fe3..e51799c1 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -6464,6 +6464,14 @@ bool is_keyboardreset(void) return cpu_keyboardreset; } +static void warpmode_reset(void) +{ + if (currprefs.turbo_boot && currprefs.turbo_emulation < 2) { + warpmode(1); + currprefs.turbo_emulation = changed_prefs.turbo_emulation = 2; + } +} + void m68k_go (int may_quit) { int hardboot = 1; @@ -6618,11 +6626,7 @@ void m68k_go (int may_quit) protect_roms(true); } if ((cpu_keyboardreset || hardboot) && !restored) { - if (currprefs.turbo_boot) { - warpmode(1); - currprefs.turbo_emulation = changed_prefs.turbo_emulation = 2; - - } + warpmode_reset(); } cpu_hardreset = false; cpu_keyboardreset = false; @@ -7821,7 +7825,6 @@ void exception2_fetch(uae_u32 opcode, int offset, int pcoffset) Exception(2); } - bool cpureset (void) { /* RESET hasn't increased PC yet, 1 word offset */ @@ -7836,6 +7839,7 @@ bool cpureset (void) set_special(SPCFLAG_CHECK); unset_special(SPCFLAG_CPUINRESET); send_internalevent(INTERNALEVENT_CPURESET); + warpmode_reset(); if (cpuboard_forced_hardreset()) { custom_reset_cpu(false, false); m68k_reset();