From d75b0a81070b0abe4b7430cf0b3ff18388b5f674 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 9 Jan 2021 16:57:46 +0200 Subject: [PATCH] Always disable DMAL emulation if JIT mode. --- audio.cpp | 5 ++--- custom.cpp | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/audio.cpp b/audio.cpp index b537b7a8..9869b64f 100644 --- a/audio.cpp +++ b/audio.cpp @@ -1428,7 +1428,7 @@ static void setirq (int nr, int which) write_log (_T("SETIRQ%d (%d,%d) PC=%08X\n"), nr, which, isirq (nr) ? 1 : 0, M68K_GETPC); #endif // audio interrupts are delayed by 2 cycles - if (currprefs.cpu_compatible) { + if (!currprefs.cachesize && currprefs.cpu_compatible) { event2_newevent_xx (-1, 2 * CYCLE_UNIT + CYCLE_UNIT / 2, nr, audio_setirq_event); } else { audio_setirq_event(nr); @@ -2334,7 +2334,7 @@ void AUDxDAT (int nr, uae_u16 v, uaecptr addr) cdp->have_dat = true; #endif // AUDxLEN is processed after 2 cycle delay - if (cdp->per < 124 * CYCLE_UNIT || currprefs.cpu_compatible) { + if (!currprefs.cachesize && (cdp->per < 124 * CYCLE_UNIT || currprefs.cpu_compatible)) { event2_newevent_xx(-1, 2 * CYCLE_UNIT, nr | (chan_ena ? 0x100 : 0), audxdat_func); } else { audxdat_func(nr | (chan_ena ? 0x100 : 0)); @@ -2394,7 +2394,6 @@ void AUDxLCL (int nr, uae_u16 v) static int warned = 100; cdp->ptx = cdp->lc; cdp->ptx_written = true; - cdp->ptx_written = true; if (warned > 0) { write_log(_T("AUD%dLCL HACK: %04X %08X (%d) (%d %d %08x)\n"), nr, v, M68K_GETPC, cdp->state, cdp->dsr, cdp->ptx_written, cdp->ptx); warned--; diff --git a/custom.cpp b/custom.cpp index 5890cee1..60e352a4 100644 --- a/custom.cpp +++ b/custom.cpp @@ -8788,7 +8788,9 @@ static void events_dmal(int hp) { if (!dmal) return; - if (currprefs.cpu_compatible) { + if (currprefs.cachesize) { + dmal_func2(0); + } else if (currprefs.cpu_compatible) { while (dmal) { if (dmal & 3) break; @@ -8798,8 +8800,6 @@ static void events_dmal(int hp) } event2_newevent2(hp, dmal_hpos + ((dmal & 2) ? 1 : 0), dmal_func); dmal &= ~3; - } else if (currprefs.cachesize) { - dmal_func2(0); } else { event2_newevent2(hp, 13, dmal_func2); } -- 2.47.3