From 7277eb0e6c53a9bf23c9c83e521635c7993e18e2 Mon Sep 17 00:00:00 2001 From: degasus Date: Wed, 19 Aug 2015 16:19:06 +0200 Subject: [PATCH] AX-HLE: Call HLE on mailbox write It was done on Update() which was called exactly every 5ms. But the game is allowed to use the DSP more often, eg to generate 48kHz audio. --- Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp | 11 +++-------- Source/Core/Core/HW/DSPHLE/UCodes/AX.h | 3 --- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp index 8c9c65fea1..f3cecfe64e 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/AX.cpp @@ -14,7 +14,6 @@ AXUCode::AXUCode(DSPHLE* dsphle, u32 crc) : UCodeInterface(dsphle, crc) - , m_work_available(false) , m_cmdlist_size(0) { WARN_LOG(DSPHLE, "Instantiating AXUCode: crc=%08x", crc); @@ -609,7 +608,9 @@ void AXUCode::HandleMail(u32 mail) if (next_is_cmdlist) { CopyCmdList(mail, cmdlist_size); - m_work_available = true; + HandleCommandList(); + m_cmdlist_size = 0; + SignalWorkEnd(); } else if (m_upload_setup_in_progress) { @@ -669,12 +670,6 @@ void AXUCode::Update() m_mail_handler.PushMail(DSP_RESUME); DSP::GenerateDSPInterruptFromDSPEmu(DSP::INT_DSP); } - else if (m_work_available) - { - HandleCommandList(); - m_cmdlist_size = 0; - SignalWorkEnd(); - } } u32 AXUCode::GetUpdateMs() diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/AX.h b/Source/Core/Core/HW/DSPHLE/UCodes/AX.h index 1af79ebb4f..466bbf7b9d 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/AX.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/AX.h @@ -84,9 +84,6 @@ protected: int m_samples_auxB_right[32 * 5]; int m_samples_auxB_surround[32 * 5]; - // This flag is set if there is anything to process. - bool m_work_available; - u16 m_cmdlist[512]; u32 m_cmdlist_size;