mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Made the debugger automatically get the PB address.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@751 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -15,10 +15,13 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include <iostream> // I hope this doesn't break anything
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "Common.h" // for Common::swap
|
||||
#include "Globals.h"
|
||||
#include "gdsp_interpreter.h"
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
@ -27,17 +30,24 @@
|
||||
void DebugLog(const char* _fmt, ...)
|
||||
{
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
/* char Msg[512];
|
||||
char Msg[512];
|
||||
va_list ap;
|
||||
|
||||
va_start( ap, _fmt );
|
||||
vsprintf( Msg, _fmt, ap );
|
||||
va_end( ap );
|
||||
|
||||
OutputDebugString(Msg);
|
||||
// Only show certain messages
|
||||
std::string sMsg = Msg;
|
||||
if(sMsg.find("Mail") != -1 || sMsg.find("AX") != -1)
|
||||
// no match = -1
|
||||
{
|
||||
OutputDebugString(Msg);
|
||||
g_dspInitialize.pLog(Msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
g_dspInitialize.pLog(Msg);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
// =============
|
||||
@ -61,3 +71,21 @@ void ErrorLog(const char* _fmt, ...)
|
||||
}
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
// For PB address detection
|
||||
// --------------
|
||||
u32 RAM_MASK = 0x1FFFFFF;
|
||||
|
||||
|
||||
u16 Memory_Read_U16(u32 _uAddress)
|
||||
{
|
||||
_uAddress &= RAM_MASK;
|
||||
return Common::swap16(*(u16*)&g_dsp.cpu_ram[_uAddress]);
|
||||
}
|
||||
|
||||
u32 Memory_Read_U32(u32 _uAddress)
|
||||
{
|
||||
_uAddress &= RAM_MASK;
|
||||
return Common::swap32(*(u32*)&g_dsp.cpu_ram[_uAddress]);
|
||||
}
|
||||
// =============
|
Reference in New Issue
Block a user