From 340607d9dca4fcb084cd1a2d017ee2e49c5fc03f Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 21 Sep 2019 19:35:19 +0300 Subject: [PATCH] 68060 BUSCR full emulation. --- newcpu.cpp | 13 +++++++++---- newcpu_common.cpp | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) 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; -- 2.47.3