diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp index f5ee3ba13a..2f3be39796 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Jac.cpp @@ -148,7 +148,7 @@ void CUCode_Jac::ExecuteList() break; default: - PanicAlert("UCode Jac unknown cmd: %s (size %)", cmd, m_numSteps); + PanicAlert("UCode Jac unknown cmd: %s (size %i)", cmd, m_numSteps); DebugLog("Jac UCode - unknown cmd: %x (size %i)", cmd, m_numSteps); break; } diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp index f3038a616f..c2096e953a 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.cpp @@ -23,6 +23,11 @@ #include "UCode_Zelda.h" #include "../MailHandler.h" +#ifdef _WIN32 +#include "../PCHW/DSoundStream.h" +#endif +#include "../PCHW/Mixer.h" + CUCode_Zelda::CUCode_Zelda(CMailHandler& _rMailHandler) : IUCode(_rMailHandler) @@ -75,6 +80,10 @@ void CUCode_Zelda::HandleMail(u32 _uMail) } } +void CUCode_Zelda::MixAdd(short* buffer, int size) +{ + //TODO(XK): Zelda UCode MixAdd? +} void CUCode_Zelda::ExecuteList() { @@ -115,6 +124,13 @@ void CUCode_Zelda::ExecuteList() tmp[1] = Read32(); tmp[2] = Read32(); + // We're ready to mix + mixer_HLEready = true; +#ifdef _WIN32 + DebugLog("Update the SoundThread to be in sync"); + DSound::DSound_UpdateSound(); //do it in this thread to avoid sync problems +#endif + DebugLog("DsyncFrame"); DebugLog("???: 0x%08x", tmp[0]); DebugLog("???: 0x%08x", tmp[1]); diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h index e2013b0a7f..760e76d883 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda.h @@ -68,6 +68,7 @@ public: void HandleMail(u32 _uMail); void Update(); + void MixAdd(short* buffer, int size); }; #endif diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp index e5827fe3ac..26d41c3547 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp @@ -66,7 +66,7 @@ bool AXTask(u32& _uMail); bool bCanWork = false; // Set this if you want to log audio. search for log_ai in this file to see the filename. -static bool log_ai = true; +static bool log_ai = false; WaveFileWriter g_wave_writer; // ============== @@ -258,10 +258,12 @@ void DSP_Initialize(DSPInitialize _dspInitialize) // -------------- // Dump UCode to file... - FILE* t = fopen("C:\\_\\DSP_UC_09CD143F.txt", "wb"); - gd_globals_t gdg; - gd_dis_file(&gdg, "C:\\_\\DSP_UC_09CD143F.bin", t); - fclose(t); + FILE* t = fopen("DSP_UC_09CD143F.txt", "wb"); + if(t) { + gd_globals_t gdg; + gd_dis_file(&gdg, "DSP_UC_09CD143F.bin", t); + fclose(t); + } // -------------- #ifdef _WIN32