From: Toni Wilen Date: Sat, 21 Sep 2019 16:35:19 +0000 (+0300) Subject: 68060 BUSCR full emulation. X-Git-Tag: 4300~104 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=340607d9dca4fcb084cd1a2d017ee2e49c5fc03f;p=francis%2Fwinuae.git 68060 BUSCR full emulation. --- diff --git a/newcpu.cpp b/newcpu.cpp index 55d8f85e..81b0350a 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -3007,15 +3007,20 @@ static void ExceptionX (int nr, uaecptr address) Exception_ce000 (nr); else #endif + { + if (currprefs.cpu_model == 68060) { + regs.buscr &= 0xa0000000; + regs.buscr |= regs.buscr >> 1; + } if (currprefs.mmu_model) { if (currprefs.cpu_model == 68030) - Exception_mmu030 (nr, m68k_getpc ()); + Exception_mmu030(nr, m68k_getpc()); else - Exception_mmu (nr, m68k_getpc ()); + Exception_mmu(nr, m68k_getpc()); } else { - Exception_normal (nr); + Exception_normal(nr); } - + } regs.exception = 0; if (cpu_tracer) { cputrace.state = 0; diff --git a/newcpu_common.cpp b/newcpu_common.cpp index 4638e76e..7314172b 100644 --- a/newcpu_common.cpp +++ b/newcpu_common.cpp @@ -153,7 +153,7 @@ int m68k_move2c (int regno, uae_u32 *regp) case 6: regs.dtt0 = *regp & 0xffffe364; mmu_tt_modified (); break; case 7: regs.dtt1 = *regp & 0xffffe364; mmu_tt_modified (); break; /* 68060 only */ - case 8: regs.buscr = *regp & 0xa0000000; break; + case 8: regs.buscr &= 0x50000000; regs.buscr |= *regp & 0xa0000000; break; case 0x800: regs.usp = *regp; break; case 0x801: regs.vbr = *regp; break;