From a13df9b251d5a43938737fa535d021de57f032a7 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 31 May 2021 05:12:32 +0100 Subject: [PATCH 1/2] DSP: use CR_* enum values --- Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp | 4 ++-- Source/Core/Core/HW/DSPLLE/DSPLLE.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp b/Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp index d6bfc092e4..c0b2e9a3d7 100644 --- a/Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp +++ b/Source/Core/Core/DSP/Interpreter/DSPInterpreter.cpp @@ -200,14 +200,14 @@ int Interpreter::RunCycles(int cycles) void Interpreter::WriteCR(u16 val) { // reset - if ((val & 1) != 0) + if ((val & CR_RESET) != 0) { INFO_LOG_FMT(DSPLLE, "DSP_CONTROL RESET"); m_dsp_core.Reset(); val &= ~CR_RESET; } // init - else if (val == 4) + else if (val == CR_HALT) { // HAX! // OSInitAudioSystem ucode should send this mail - not DSP core itself diff --git a/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp b/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp index 2dc420864d..038a33f17e 100644 --- a/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp +++ b/Source/Core/Core/HW/DSPLLE/DSPLLE.cpp @@ -186,7 +186,7 @@ u16 DSPLLE::DSP_WriteControlRegister(u16 value) { m_dsp_core.GetInterpreter().WriteCR(value); - if ((value & 2) != 0) + if ((value & CR_EXTERNAL_INT) != 0) { if (m_is_dsp_on_thread) { From f2c4041d393ee8a247cd59997c43915d2afbae70 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Mon, 31 May 2021 17:51:18 +0100 Subject: [PATCH 2/2] DSPHLE: remove unused function --- Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp | 4 ---- Source/Core/Core/HW/DSPHLE/UCodes/INIT.h | 1 - 2 files changed, 5 deletions(-) diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp index af4d5ad1ee..fa91725c6b 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/INIT.cpp @@ -26,10 +26,6 @@ void INITUCode::Initialize() m_mail_handler.PushMail(0x80544348); } -void INITUCode::Init() -{ -} - void INITUCode::Update() { } diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/INIT.h b/Source/Core/Core/HW/DSPHLE/UCodes/INIT.h index 73f2dd5860..19cf93d795 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/INIT.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/INIT.h @@ -20,6 +20,5 @@ public: void Initialize() override; void HandleMail(u32 mail) override; void Update() override; - void Init(); }; } // namespace DSP::HLE