give the DSP breakpoints that can be toggled but don't work yet :p

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3568 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-06-28 12:30:34 +00:00
parent 8e7fdbc150
commit 6c52ab1c39
4 changed files with 31 additions and 12 deletions

View File

@ -32,6 +32,7 @@
#include "DSPIntUtil.h" #include "DSPIntUtil.h"
SDSP g_dsp; SDSP g_dsp;
BreakPoints dsp_breakpoints;
static bool LoadRom(const char *fname, int size_in_words, u16 *rom) static bool LoadRom(const char *fname, int size_in_words, u16 *rom)
{ {

View File

@ -26,6 +26,8 @@
#ifndef _DSPCORE_H #ifndef _DSPCORE_H
#define _DSPCORE_H #define _DSPCORE_H
#include "Breakpoints.h"
#define DSP_IRAM_BYTE_SIZE 0x2000 #define DSP_IRAM_BYTE_SIZE 0x2000
#define DSP_IRAM_SIZE 0x1000 #define DSP_IRAM_SIZE 0x1000
#define DSP_IRAM_MASK 0x0fff #define DSP_IRAM_MASK 0x0fff
@ -180,6 +182,7 @@ struct SDSP
}; };
extern SDSP g_dsp; extern SDSP g_dsp;
extern BreakPoints dsp_breakpoints;
bool DSPCore_Init(const char *irom_filename, const char *coef_filename); bool DSPCore_Init(const char *irom_filename, const char *coef_filename);
void DSPCore_Reset(); void DSPCore_Reset();

View File

@ -75,34 +75,49 @@ bool DSPDebugInterface::isAlive()
bool DSPDebugInterface::isBreakpoint(unsigned int address) 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) void DSPDebugInterface::setBreakpoint(unsigned int address)
{ {
//if (BreakPoints::Add(address)) int real_addr = DSPSymbols::Line2Addr(address);
// jit.NotifyBreakpoint(address, true); if (real_addr >= 0) {
if (dsp_breakpoints.Add(real_addr))
;
}
} }
void DSPDebugInterface::clearBreakpoint(unsigned int address) void DSPDebugInterface::clearBreakpoint(unsigned int address)
{ {
//if (BreakPoints::Remove(address)) int real_addr = DSPSymbols::Line2Addr(address);
// jit.NotifyBreakpoint(address, false); 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) void DSPDebugInterface::toggleBreakpoint(unsigned int address)
{ {
//if (BreakPoints::IsAddressBreakPoint(address)) int real_addr = DSPSymbols::Line2Addr(address);
// BreakPoints::Remove(address); if (real_addr >= 0) {
//else if (dsp_breakpoints.IsAddressBreakPoint(real_addr))
// BreakPoints::Add(address); dsp_breakpoints.Remove(real_addr);
else
dsp_breakpoints.Add(real_addr);
}
} }
void DSPDebugInterface::insertBLR(unsigned int address) void DSPDebugInterface::insertBLR(unsigned int address)
{ {
PanicAlert("insertBLR functionality not supported in DSP module.");
} }
// ======================================================= // =======================================================

View File

@ -141,7 +141,7 @@ RasterFont::~RasterFont()
void RasterFont::printString(const char *s, double x, double y, double z) void RasterFont::printString(const char *s, double x, double y, double z)
{ {
int length = strlen(s); int length = (int)strlen(s);
if (!length) if (!length)
return; return;