From 4c6bbec600ccef4d41245979ff40e6a022053fc8 Mon Sep 17 00:00:00 2001 From: skidau Date: Fri, 1 Mar 2013 20:23:55 +1100 Subject: [PATCH] Changed the maximum slice length to 1000 from 20000. This makes the emulator check external exceptions more regularly. Fixes the audio cutting in and out in the Resident Evil GC games using DSP HLE. Triggered the ARAM interrupt by the scheduler instead of directly in function. Fixes a hang in Mario Super Baseball. Fixes issue 5825. Fixes issue 5096. --- Source/Core/Core/Src/CoreTiming.cpp | 2 +- Source/Core/Core/Src/HW/DSP.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/CoreTiming.cpp b/Source/Core/Core/Src/CoreTiming.cpp index 525f7165f2..a19d1c5cf8 100644 --- a/Source/Core/Core/Src/CoreTiming.cpp +++ b/Source/Core/Core/Src/CoreTiming.cpp @@ -24,7 +24,7 @@ #include "StringUtil.h" #include "VideoBackendBase.h" -#define MAX_SLICE_LENGTH 20000 +#define MAX_SLICE_LENGTH 1000 namespace CoreTiming { diff --git a/Source/Core/Core/Src/HW/DSP.cpp b/Source/Core/Core/Src/HW/DSP.cpp index 78f8ab5ed0..d38b244338 100644 --- a/Source/Core/Core/Src/HW/DSP.cpp +++ b/Source/Core/Core/Src/HW/DSP.cpp @@ -698,7 +698,7 @@ void Do_ARAM_DMA() if (!GetDSPEmulator()->IsLLE()) g_dspState.DSPControl.DMAState = 1; - GenerateDSPInterrupt(INT_ARAM, true); + CoreTiming::ScheduleEvent_Threadsafe(0, et_GenerateDSPInterrupt, INT_ARAM | (1<<16)); // Real hardware DMAs in 32byte chunks, but we can get by with 8byte chunks if (g_arDMA.Cnt.dir)