From: Toni Wilen Date: Thu, 3 Aug 2017 17:17:33 +0000 (+0300) Subject: 68030 MMU+CE mode fix. X-Git-Tag: 3600~136 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=ea194e0c6b6096a4e6f6e54d68a4362deb2d6cdd;p=francis%2Fwinuae.git 68030 MMU+CE mode fix. --- diff --git a/newcpu.cpp b/newcpu.cpp index 97b8232a..ab018087 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -5215,13 +5215,23 @@ insretry: for (;;) { regs.opcode = regs.irc = mmu030_opcode; mmu030_idx = 0; + + mmu030_retry = false; + if (!currprefs.cpu_cycle_exact) { + count_instr (regs.opcode); do_cycles (cpu_cycles); + + cpu_cycles = (*cpufunctbl[regs.opcode])(regs.opcode); + + } else { + + (*cpufunctbl[regs.opcode])(regs.opcode); + + wait_memory_cycles(); } - mmu030_retry = false; - cpu_cycles = (*cpufunctbl[regs.opcode])(regs.opcode); cnt--; // so that we don't get in infinite loop if things go horribly wrong if (!mmu030_retry) break; @@ -5235,12 +5245,27 @@ insretry: mmu030_opcode = -1; - cpu_cycles = adjust_cycles (cpu_cycles); - if (regs.spcflags) { - if (do_specialties (cpu_cycles)) - return; + if (!currprefs.cpu_cycle_exact) { + + cpu_cycles = adjust_cycles (cpu_cycles); + if (regs.spcflags) { + if (do_specialties (cpu_cycles)) + return; + } + + } else { + + if (regs.spcflags || time_for_interrupt ()) { + if (do_specialties (0)) + return; + } + + regs.ipl = regs.ipl_pin; + } + } + } CATCH (prb) { if (mmu030_opcode == -1 && currprefs.cpu_compatible) {