From 8ec8d1d6dd7ff25526444ab44c13c983d04d7ce7 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Thu, 13 Mar 2014 20:31:20 +0200 Subject: [PATCH] 68040 MMU works again. --- cpummu.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cpummu.cpp b/cpummu.cpp index 122e28ba..4fc9c54a 100644 --- a/cpummu.cpp +++ b/cpummu.cpp @@ -277,8 +277,6 @@ void mmu_bus_error(uaecptr addr, int fc, bool write, int size, bool rmw, uae_u32 } ssw |= fc & MMU_SSW_TM; /* TM = FC */ - regs.wb3_status = write ? 0x80 | (ssw & 0x7f) : 0; - regs.wb2_status = 0; switch (size) { case sz_byte: @@ -290,7 +288,14 @@ void mmu_bus_error(uaecptr addr, int fc, bool write, int size, bool rmw, uae_u32 case sz_long: ssw |= MMU_SSW_SIZE_L; break; - case 16: // MOVE16 + } + + regs.wb3_status = write ? 0x80 | (ssw & 0x7f) : 0; + regs.wb2_status = 0; + if (!write) + ssw |= MMU_SSW_RW; + + if (size == 16) { // MOVE16 ssw |= MMU_SSW_SIZE_L; // ?? maybe MMU_SSW_SIZE_CL? ssw |= MMU_SSW_TT0; regs.mmu_effective_addr &= ~15; @@ -302,12 +307,8 @@ void mmu_bus_error(uaecptr addr, int fc, bool write, int size, bool rmw, uae_u32 regs.wb2_address = regs.mmu_effective_addr; write_log (_T("040 MMU MOVE16 WRITE FAULT!\n")); } - break; } - if (!write) - ssw |= MMU_SSW_RW; - if (mmu040_movem) { ssw |= MMU_SSW_CM; regs.mmu_effective_addr = mmu040_movem_ea; -- 2.47.3