From 9675faa2329ab0aa6d55231ae56edacc90ace2c0 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sat, 25 Jun 2022 14:06:55 -0700 Subject: [PATCH] DSPHLE: Properly reflect initial halt state in mail handler DSPHLE::Initialize sets the halt and init bits to true (i.e. m_dsp_control.Hex starts as 0x804), which is reasonable behavior (this is the state the DSP will be in when starting a game from the IPL, as after `__OSStopAudioSystem` the control register is 0x804). However, CMailHandler::m_halted defaults to false, and we only call CMailHandler::SetHalted in DSPHLE::DSP_WriteControlRegister when m_dsp_control.DSPHalt changes, so since DSPHalt defaults to true, if the first thing that happens is writing true to DSPHalt, we won't properly halt the mail handler. Now, we call CMailHandler::SetHalted on startup. This fixes Datel titles when the IPL is skipped with DSP HLE (though this configuration only works once https://bugs.dolphin-emu.org/issues/8223 is fixed). --- Source/Core/Core/HW/DSPHLE/DSPHLE.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp b/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp index b8d3b8e5a2..d756aabdd1 100644 --- a/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp +++ b/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp @@ -28,6 +28,7 @@ bool DSPHLE::Initialize(bool wii, bool dsp_thread) m_dsp_control.Hex = 0; m_dsp_control.DSPHalt = 1; m_dsp_control.DSPInit = 1; + m_mail_handler.SetHalted(m_dsp_control.DSPHalt); m_dsp_state.Reset();