diff --git a/Source/Core/DSPCore/Src/DSPCore.cpp b/Source/Core/DSPCore/Src/DSPCore.cpp index 85f2d9269d..2b0e43ae81 100644 --- a/Source/Core/DSPCore/Src/DSPCore.cpp +++ b/Source/Core/DSPCore/Src/DSPCore.cpp @@ -32,6 +32,7 @@ #include "DSPIntUtil.h" SDSP g_dsp; +BreakPoints dsp_breakpoints; static bool LoadRom(const char *fname, int size_in_words, u16 *rom) { diff --git a/Source/Core/DSPCore/Src/DSPCore.h b/Source/Core/DSPCore/Src/DSPCore.h index cfbd891234..c5f1b52dd3 100644 --- a/Source/Core/DSPCore/Src/DSPCore.h +++ b/Source/Core/DSPCore/Src/DSPCore.h @@ -26,6 +26,8 @@ #ifndef _DSPCORE_H #define _DSPCORE_H +#include "Breakpoints.h" + #define DSP_IRAM_BYTE_SIZE 0x2000 #define DSP_IRAM_SIZE 0x1000 #define DSP_IRAM_MASK 0x0fff @@ -180,6 +182,7 @@ struct SDSP }; extern SDSP g_dsp; +extern BreakPoints dsp_breakpoints; bool DSPCore_Init(const char *irom_filename, const char *coef_filename); void DSPCore_Reset(); diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/DSPDebugInterface.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/DSPDebugInterface.cpp index 7150d187a7..79fbd6fa9f 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/DSPDebugInterface.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/DSPDebugInterface.cpp @@ -75,34 +75,49 @@ bool DSPDebugInterface::isAlive() bool DSPDebugInterface::isBreakpoint(unsigned int address) { - return false; //BreakPoints::IsAddressBreakPoint(address); + int real_addr = DSPSymbols::Line2Addr(address); + if (real_addr >= 0) + return dsp_breakpoints.IsAddressBreakPoint(real_addr); + else + return false; } void DSPDebugInterface::setBreakpoint(unsigned int address) { - //if (BreakPoints::Add(address)) - // jit.NotifyBreakpoint(address, true); + int real_addr = DSPSymbols::Line2Addr(address); + if (real_addr >= 0) { + if (dsp_breakpoints.Add(real_addr)) + ; + } } void DSPDebugInterface::clearBreakpoint(unsigned int address) { - //if (BreakPoints::Remove(address)) - // jit.NotifyBreakpoint(address, false); + int real_addr = DSPSymbols::Line2Addr(address); + if (real_addr >= 0) { + if (dsp_breakpoints.Remove(real_addr)) + ; + } } -void DSPDebugInterface::clearAllBreakpoints() {} +void DSPDebugInterface::clearAllBreakpoints() { + dsp_breakpoints.Clear(); +} void DSPDebugInterface::toggleBreakpoint(unsigned int address) { - //if (BreakPoints::IsAddressBreakPoint(address)) - // BreakPoints::Remove(address); - //else - // BreakPoints::Add(address); + int real_addr = DSPSymbols::Line2Addr(address); + if (real_addr >= 0) { + if (dsp_breakpoints.IsAddressBreakPoint(real_addr)) + dsp_breakpoints.Remove(real_addr); + else + dsp_breakpoints.Add(real_addr); + } } void DSPDebugInterface::insertBLR(unsigned int address) { - + PanicAlert("insertBLR functionality not supported in DSP module."); } // ======================================================= diff --git a/Source/Plugins/Plugin_VideoOGL/Src/rasterfont.cpp b/Source/Plugins/Plugin_VideoOGL/Src/rasterfont.cpp index d0794d9eac..d41175811e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/rasterfont.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/rasterfont.cpp @@ -141,7 +141,7 @@ RasterFont::~RasterFont() void RasterFont::printString(const char *s, double x, double y, double z) { - int length = strlen(s); + int length = (int)strlen(s); if (!length) return;