From b21c361a1a687c3f275f64133d263007287a4ff3 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 27 Dec 2010 22:14:33 +0000 Subject: [PATCH] Make ARAM DMAs take time. Allows WWE Day of Reckoning 1 & 2 to go ingame...then they crash. Not entirely sure if the crash is related. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6670 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp | 2 ++ Source/Core/Core/Src/HW/DSP.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp index d5c61d8736..9fab0aa114 100644 --- a/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Src/Boot/Boot_BS2Emu.cpp @@ -81,6 +81,8 @@ bool CBoot::EmulatedBS2_GC() Memory::Write_U32(0x4c000064, 0x80000C00); // write default Syscall Handler: rfi Memory::Write_U64((u64)CEXIIPL::GetGCTime() * (u64)40500000, 0x800030D8); // preset time base ticks + // HIO checks this + //Memory::Write_U16(0x8200, 0x000030e6); // Console type Memory::Write_U32(((1 & 0x3f) << 26) | 1, 0x81300000); // HLE OSReport for Apploader diff --git a/Source/Core/Core/Src/HW/DSP.cpp b/Source/Core/Core/Src/HW/DSP.cpp index 99c364445c..106e2bd623 100644 --- a/Source/Core/Core/Src/HW/DSP.cpp +++ b/Source/Core/Core/Src/HW/DSP.cpp @@ -644,6 +644,11 @@ void UpdateAudioDMA() void Do_ARAM_DMA() { + // Fake the DMA taking time to complete. The delay is not accurate, but + // seems like a good estimate + CoreTiming::ScheduleEvent_Threadsafe( + g_arDMA.Cnt.count, 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) { @@ -679,8 +684,6 @@ void Do_ARAM_DMA() g_arDMA.Cnt.count -= 8; } } - - GenerateDSPInterrupt(INT_ARAM); }