]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Update also 040/060 MMU indirect functions to prevent crash if CPU type is changed...
authorToni Wilen <twilen@winuae.net>
Wed, 21 Jan 2015 16:07:32 +0000 (18:07 +0200)
committerToni Wilen <twilen@winuae.net>
Wed, 21 Jan 2015 16:07:32 +0000 (18:07 +0200)
cpummu.cpp
include/cpummu.h
newcpu.cpp

index eec7c75abc0fa3566d4846bd4a9335b93d6200e6..a19fcd822a8a6cb3166412390c061f2c82b1e8b3 100644 (file)
@@ -1242,10 +1242,10 @@ void REGPARAM2 mmu_flush_atc_all(bool global)
        }
 }
 
-void REGPARAM2 mmu_reset(void)
+void REGPARAM2 mmu_set_funcs(void)
 {
-       mmu_flush_atc_all(true);
-
+       if (currprefs.mmu_model != 68040 && currprefs.mmu_model != 68060)
+               return;
        if (currprefs.cpu_cycle_exact || currprefs.cpu_compatible) {
                x_phys_get_iword = get_word_icache040;
                x_phys_get_ilong = get_long_icache040;
@@ -1267,6 +1267,11 @@ void REGPARAM2 mmu_reset(void)
        }
 }
 
+void REGPARAM2 mmu_reset(void)
+{
+       mmu_flush_atc_all(true);
+       mmu_set_funcs();
+}
 
 void REGPARAM2 mmu_set_tc(uae_u16 tc)
 {
index 542643962e38a4880f68c1e9effeb0caf69a86a9..c7c2de91aa801883a8d7c93faf77500f34594d62 100644 (file)
@@ -384,6 +384,7 @@ extern void REGPARAM3 mmu_flush_atc_all(bool global) REGPARAM;
 extern void REGPARAM3 mmu_op_real(uae_u32 opcode, uae_u16 extra) REGPARAM;
 
 extern void REGPARAM3 mmu_reset(void) REGPARAM;
+extern void REGPARAM3 mmu_set_funcs(void) REGPARAM;
 extern void REGPARAM3 mmu_set_tc(uae_u16 tc) REGPARAM;
 extern void REGPARAM3 mmu_set_super(bool super) REGPARAM;
 
index 346a956d1a8c8ce631ba8cd0b939b8d359c78798..b7f3646f5f6ef248d3abe9a2f210428c378e0e09 100644 (file)
@@ -1016,6 +1016,7 @@ static void set_x_funcs (void)
        }
 
        set_x_cp_funcs();
+       mmu_set_funcs();
        mmu030_set_funcs();
 
 }