From 87d8c7dcc967a53c3b35fb50ce32368acc82eab0 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Fri, 2 Jun 2017 18:19:56 +0300 Subject: [PATCH] PLPA fake MMU emulation (same as 68040 PTEST) --- newcpu.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/newcpu.cpp b/newcpu.cpp index 2e7ae015..c463b483 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -3658,7 +3658,7 @@ void mmu_op (uae_u32 opcode, uae_u32 extra) bool data = (regs.dfc & 3) != 2; regs.mmusr = 0; - if (fake_mmu_match_ttr(addr,super,data) != TTR_NO_MATCH) { + if (fake_mmu_match_ttr(addr, super, data) != TTR_NO_MATCH) { regs.mmusr = MMU_MMUSR_T | MMU_MMUSR_R; } regs.mmusr |= addr & 0xfffff000; @@ -3670,6 +3670,15 @@ void mmu_op (uae_u32 opcode, uae_u32 extra) } else if ((opcode & 0x0FB8) == 0x588) { /* PLPA */ if (currprefs.cpu_model == 68060) { + int regno = opcode & 7; + uae_u32 addr = m68k_areg (regs, regno); + int write = (opcode & 0x40) == 0; + bool data = (regs.dfc & 3) != 2; + bool super = (regs.dfc & 4) != 0; + + if (fake_mmu_match_ttr(addr, super, data) == TTR_NO_MATCH) { + m68k_areg (regs, regno) = addr; + } #if MMUOP_DEBUG > 0 write_log (_T("PLPA\n")); #endif -- 2.47.3