From 4391058563ba2666e0e0789e837bcac21c020136 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Thu, 25 May 2023 13:02:14 +0200 Subject: [PATCH] aica: dma cycles schedule tweak Increase lower limit to schedule dma callback from 224 to 513 Fixes freeze/crash in Nomad Soul Issue #1080 --- core/hw/aica/aica_if.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/hw/aica/aica_if.cpp b/core/hw/aica/aica_if.cpp index 6805aa908..acdda9c30 100644 --- a/core/hw/aica/aica_if.cpp +++ b/core/hw/aica/aica_if.cpp @@ -12,7 +12,6 @@ #include "hw/sh4/sh4_sched.h" #include "profiler/dc_profiler.h" #include "hw/sh4/dyna/blockmanager.h" -#include "hw/sh4/sh4_interpreter.h" #include "hw/arm7/arm7.h" #include "cfg/option.h" @@ -405,7 +404,7 @@ static void Write_SB_ADST(u32 addr, u32 data) // Schedule the end of DMA transfer interrupt int cycles = len * (SH4_MAIN_CLOCK / 2 / G2_BUS_CLOCK); // 16 bits @ 25 MHz - if (cycles < SH4_TIMESLICE / 2) + if (cycles <= 512) dma_end_sched(0, 0, 0); else sh4_sched_request(dma_sched_id, cycles);