]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
m68k RESET instruction activates warp mode reset
authorToni Wilen <twilen@winuae.net>
Tue, 25 Jul 2023 17:56:48 +0000 (20:56 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 25 Jul 2023 17:56:48 +0000 (20:56 +0300)
newcpu.cpp

index 76df8fe31c16f87f4e842136bd5c5663825bd142..e51799c160c081f169c530eda634fe0501086f76 100644 (file)
@@ -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();