nakee's new logmanager. added a console window for windows builds (prints to parent console on non-win32). also fix some random wxw bugs: main window's position is saved when using debugger, disabling windows from the tools menu are saved settings, some other small fixes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2675 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman
2009-03-18 17:17:58 +00:00
parent 03ba466b5b
commit 2301d072a6
120 changed files with 1758 additions and 1103 deletions

View File

@ -23,55 +23,6 @@
#include "Globals.h"
#include "gdsp_interpreter.h"
// =======================================================================================
// This is to verbose, it has to be turned on manually for now
// --------------
void DebugLog(const char* _fmt, ...)
{
#if defined(_DEBUG) || defined(DEBUGFAST)
char Msg[512];
va_list ap;
va_start( ap, _fmt );
vsprintf( Msg, _fmt, ap );
va_end( ap );
// Only show certain messages
std::string sMsg = Msg;
if(sMsg.find("Mail") != -1 || sMsg.find("AX") != -1)
// no match = -1
{
#ifdef _WIN32
OutputDebugString(Msg);
#endif
g_dspInitialize.pLog(Msg,0);
}
#endif
}
// =============
void ErrorLog(const char* _fmt, ...)
{
char Msg[512];
va_list ap;
va_start(ap, _fmt);
vsprintf(Msg, _fmt, ap);
va_end(ap);
g_dspInitialize.pLog(Msg,0);
#ifdef _WIN32
::MessageBox(NULL, Msg, "Error", MB_OK);
#endif
DSP_DebugBreak(); // NOTICE: we also break the emulation if this happens
}
// =======================================================================================
// For PB address detection
// --------------

View File

@ -27,8 +27,6 @@
#define PROFILE 1
extern DSPInitialize g_dspInitialize;
void DebugLog(const char* _fmt, ...);
void ErrorLog(const char* _fmt, ...);
void DSP_DebugBreak();

View File

@ -30,8 +30,8 @@ extern u32 m_addressPBs;
bool AXTask(u32& _uMail)
{
u32 uAddress = _uMail;
DebugLog("AXTask - ================================================================");
DebugLog("AXTask - AXCommandList-Addr: 0x%08x", uAddress);
DEBUG_LOG(DSPHLE, "AXTask - ================================================================");
DEBUG_LOG(DSPHLE, "AXTask - AXCommandList-Addr: 0x%08x", uAddress);
bool bExecuteList = true;
@ -50,7 +50,7 @@ bool AXTask(u32& _uMail)
case 0: // AXLIST_STUDIOADDR: //00
{
uAddress += 4;
DebugLog("AXLIST AXLIST_SBUFFER: %08x", uAddress);
DEBUG_LOG(DSPHLE, "AXLIST AXLIST_SBUFFER: %08x", uAddress);
}
break;
// ---------------------------------------------------------------------------------------
@ -61,7 +61,7 @@ bool AXTask(u32& _uMail)
{
m_addressPBs = Memory_Read_U32(uAddress);
uAddress += 4;
DebugLog("AXLIST PB address: %08x", m_addressPBs);
DEBUG_LOG(DSPHLE, "AXLIST PB address: %08x", m_addressPBs);
bExecuteList = false;
}
break;
@ -71,7 +71,7 @@ bool AXTask(u32& _uMail)
{
// Hopefully this is where in main ram to write.
uAddress += 4;
DebugLog("AXLIST AXLIST_SBUFFER: %08x", uAddress);
DEBUG_LOG(DSPHLE, "AXLIST AXLIST_SBUFFER: %08x", uAddress);
}
break;
@ -81,7 +81,7 @@ bool AXTask(u32& _uMail)
{
// ---------------------------------------------------------------------------------------
// Stop the execution of this TaskList
DebugLog("AXLIST default: %08x", uAddress);
DEBUG_LOG(DSPHLE, "AXLIST default: %08x", uAddress);
bExecuteList = false;
// ---------------------------------------------------------------------------------------
}
@ -89,8 +89,8 @@ bool AXTask(u32& _uMail)
} // end of switch
}
DebugLog("AXTask - done, send resume");
DebugLog("AXTask - ================================================================");
DEBUG_LOG(DSPHLE, "AXTask - done, send resume");
DEBUG_LOG(DSPHLE, "AXTask - ================================================================");
// now resume
return true;

View File

@ -30,7 +30,6 @@
#include "Common.h"
#include "UCode_AXStructs.h" // they are only in a virtual dir called UCodes AX
#include "ConsoleWindow.h" // For Console::Print, Console::ClearScreen
// =====================
@ -362,8 +361,8 @@ void Logging()
// =======================================================================================
// Print
// ---------------
Console::ClearScreen();
Console::Print("%s", sbuff.c_str());
// Console::ClearScreen();
INFO_LOG(DSPHLE, "%s", sbuff.c_str());
sbuff.clear(); strcpy(buffer, "");
// ---------------
k=0;

View File

@ -28,7 +28,6 @@
#include "CommonTypes.h" // Pluginspecs
#include "UCode_AXStructs.h" // For the AXParamBlock structure
#include "ConsoleWindow.h" // For Console::Print, Console::ClearScreen
u32 m_addressPBs = 0;
@ -54,7 +53,7 @@ int ReadOutPBs(AXParamBlock * _pPBs, int _num)
// reading and 'halfword' swap
n++;
if (n > 20 && logall) {Console::ClearScreen();}
//FIXME if (n > 20 && logall) {Console::ClearScreen();}
for (int i = 0; i < _num; i++)
{
// ---------------------------------------------------------------------------------------
@ -68,7 +67,7 @@ int ReadOutPBs(AXParamBlock * _pPBs, int _num)
// Create a shortcut that let us update struct members
short * pDest = (short *) & _pPBs[i];
if (n > 20 && logall) {Console::Print("%c%i:", 223, i);} // logging
if (n > 20 && logall) {DEBUG_LOG(DSPHLE, "%c%i:", 223, i);} // logging
// --------------
// Here we update the PB. We do it by going through all 192 / 2 = 96 u16 values
@ -80,7 +79,7 @@ int ReadOutPBs(AXParamBlock * _pPBs, int _num)
{
if (pSrc[p] != 0 && n > 20 && logall)
{
Console::Print("%i %04x | ", p, Common::swap16(pSrc[p]));
DEBUG_LOG(DSPHLE, "%i %04x | ", p, Common::swap16(pSrc[p]));
}
}
@ -88,7 +87,7 @@ int ReadOutPBs(AXParamBlock * _pPBs, int _num)
}
if(n > 20 && logall) {Console::Print("\n");} // logging
if(n > 20 && logall) {DEBUG_LOG(DSPHLE, "\n");} // logging
// --------------
// Here we update the block address to the starting point of the next PB
blockAddr = (_pPBs[i].next_pb_hi << 16) | _pPBs[i].next_pb_lo;

View File

@ -258,7 +258,7 @@ char* gd_dis_params(gd_globals_t* gdg, opc_t* opc, uint16 op1, uint16 op2, char*
break;
default:
ErrorLog("Unknown parameter type: %x\n", opc->params[j].type);
ERROR_LOG(DSPHLE, "Unknown parameter type: %x\n", opc->params[j].type);
exit(-1);
break;
}
@ -313,7 +313,7 @@ uint16 gd_dis_get_opcode_size(gd_globals_t* gdg)
if (!opc)
{
ErrorLog("get_opcode_size ARGH");
ERROR_LOG(DSPHLE, "get_opcode_size ARGH");
exit(0);
}
@ -341,7 +341,7 @@ uint16 gd_dis_get_opcode_size(gd_globals_t* gdg)
if (!opc_ext)
{
ErrorLog("get_opcode_size ext ARGH");
ERROR_LOG(DSPHLE, "get_opcode_size ext ARGH");
}
return(opc_ext->size);

View File

@ -91,7 +91,7 @@ uint16 dsp_read_aram()
default:
val = (g_dspInitialize.pARAM_Read_U8(Address) << 8) | g_dspInitialize.pARAM_Read_U8(Address + 1);
Address += 2;
ErrorLog("Unknown DSP Format %i", gdsp_ifx_regs[DSP_FORMAT]);
ERROR_LOG(DSPHLE, "Unknown DSP Format %i", gdsp_ifx_regs[DSP_FORMAT]);
break;
}

View File

@ -41,7 +41,7 @@ void dsp_op_ext_r_epi(uint16 _Opcode)
switch (op)
{
case 0x00:
ErrorLog("dsp_op_ext_r_epi");
ERROR_LOG(DSPHLE, "dsp_op_ext_r_epi");
break;
case 0x01:

View File

@ -133,7 +133,7 @@ void gdsp_mbox_write_l(uint8 mbx, uint16 val)
if (mbx == GDSP_MBOX_DSP)
{
DebugLog("- Write DSP Mail: 0x%08x (pc=0x%04x)\n", gdsp_mbox_peek(GDSP_MBOX_DSP), g_dsp.err_pc);
DEBUG_LOG(DSPHLE, "- Write DSP Mail: 0x%08x (pc=0x%04x)\n", gdsp_mbox_peek(GDSP_MBOX_DSP), g_dsp.err_pc);
}
}
@ -199,9 +199,9 @@ void gdsp_ifx_write(uint16 addr, uint16 val)
default:
/* if ((addr & 0xff) >= 0xa0 && reg_names[addr - 0xa0])
DebugLog("%04x MW %s (%04x)\n", g_dsp.pc, reg_names[addr - 0xa0], val);
DEBUG_LOG(DSPHLE, "%04x MW %s (%04x)\n", g_dsp.pc, reg_names[addr - 0xa0], val);
else
DebugLog("%04x MW %04x (%04x)\n", g_dsp.pc, addr, val);*/
DEBUG_LOG(DSPHLE, "%04x MW %04x (%04x)\n", g_dsp.pc, addr, val);*/
gdsp_ifx_regs[addr] = val;
break;
}
@ -259,7 +259,7 @@ void gdsp_idma_in(uint16 dsp_addr, uint32 addr, uint32 size)
}
g_dsp.iram_crc = GenerateCRC(g_dsp.cpu_ram + (addr & 0x0fffffff), size);
DebugLog("*** Copy new UCode from 0x%08x to 0x%04x (crc: %8x)\n", addr, dsp_addr, g_dsp.iram_crc);
DEBUG_LOG(DSPHLE, "*** Copy new UCode from 0x%08x to 0x%04x (crc: %8x)\n", addr, dsp_addr, g_dsp.iram_crc);
#if DUMP_DSP_IMEM
DumpDSPCode(addr, size, g_dsp.iram_crc );
@ -269,7 +269,7 @@ void gdsp_idma_in(uint16 dsp_addr, uint32 addr, uint32 size)
void gdsp_idma_out(uint16 dsp_addr, uint32 addr, uint32 size)
{
ErrorLog("*** idma_out IRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
ERROR_LOG(DSPHLE, "*** idma_out IRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
}
@ -277,7 +277,7 @@ void gdsp_ddma_in(uint16 dsp_addr, uint32 addr, uint32 size)
{
if ((addr & 0x7FFFFFFF) > 0x01FFFFFF)
{
ErrorLog("*** ddma_in read from invalid addr (0x%08x)\n", addr);
ERROR_LOG(DSPHLE, "*** ddma_in read from invalid addr (0x%08x)\n", addr);
return;
}
@ -288,7 +288,7 @@ void gdsp_ddma_in(uint16 dsp_addr, uint32 addr, uint32 size)
*(uint16*)&dst[dsp_addr + i] = *(uint16*)&g_dsp.cpu_ram[(addr + i) & 0x7FFFFFFF];
}
DebugLog("*** ddma_in RAM (0x%08x) -> DRAM_DSP (0x%04x) : size (0x%08x)\n", addr, dsp_addr / 2, size);
DEBUG_LOG(DSPHLE, "*** ddma_in RAM (0x%08x) -> DRAM_DSP (0x%04x) : size (0x%08x)\n", addr, dsp_addr / 2, size);
}
@ -296,7 +296,7 @@ void gdsp_ddma_out(uint16 dsp_addr, uint32 addr, uint32 size)
{
if ((addr & 0x7FFFFFFF) > 0x01FFFFFF)
{
ErrorLog("*** gdsp_ddma_out to invalid addr (0x%08x)\n", addr);
ERROR_LOG(DSPHLE, "*** gdsp_ddma_out to invalid addr (0x%08x)\n", addr);
return;
}
@ -307,7 +307,7 @@ void gdsp_ddma_out(uint16 dsp_addr, uint32 addr, uint32 size)
*(uint16*)&g_dsp.cpu_ram[(addr + i) & 0x7FFFFFFF] = *(uint16*)&src[dsp_addr + i];
}
DebugLog("*** ddma_out DRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
DEBUG_LOG(DSPHLE, "*** ddma_out DRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
}
@ -330,7 +330,7 @@ void gdsp_dma()
if ((ctl > 3) || (len > 0x4000))
{
ErrorLog("DMA ERROR pc: %04x ctl: %04x addr: %08x da: %04x size: %04x\n", g_dsp.pc, ctl, addr, dsp_addr, len);
ERROR_LOG(DSPHLE, "DMA ERROR pc: %04x ctl: %04x addr: %08x da: %04x size: %04x\n", g_dsp.pc, ctl, addr, dsp_addr, len);
exit(0);
}

View File

@ -88,7 +88,7 @@ uint16 dsp_dmem_read(uint16 addr)
break;
case 0x8: // 8xxx DROM
DebugLog("someone reads from ROM\n");
DEBUG_LOG(DSPHLE, "someone reads from ROM\n");
val = g_dsp.drom[addr & DSP_DROM_MASK];
val = dsp_swap16(val);
break;
@ -103,7 +103,7 @@ uint16 dsp_dmem_read(uint16 addr)
break;
default: // error
// ErrorLog("%04x DSP ERROR: Read from UNKNOWN (%04x) memory\n", g_dsp.pc, addr);
// ERROR_LOG(DSPHLE, "%04x DSP ERROR: Read from UNKNOWN (%04x) memory\n", g_dsp.pc, addr);
val = 0;
break;
}
@ -117,7 +117,7 @@ bool dsp_dmem_write(uint16 addr, uint16 val)
switch (addr >> 12)
{
case 0x8: // 8xxx DROM
DebugLog("someone writes to ROM\n");
DEBUG_LOG(DSPHLE, "someone writes to ROM\n");
/* val = dsp_swap16(val);
g_dsp.drom[addr & DSP_DROM_MASK] = val;*/
break;
@ -132,7 +132,7 @@ bool dsp_dmem_write(uint16 addr, uint16 val)
break;
default: // error
DebugLog("%04x DSP ERROR: Write to UNKNOWN (%04x) memory\n", g_dsp.pc, addr);
DEBUG_LOG(DSPHLE, "%04x DSP ERROR: Write to UNKNOWN (%04x) memory\n", g_dsp.pc, addr);
break;
}

View File

@ -187,7 +187,7 @@ bool CheckCondition(uint8 _Condition)
break;
default:
// DebugLog("Unknown condition check: 0x%04x\n", _Condition & 0xf);
// DEBUG_LOG(DSPHLE, "Unknown condition check: 0x%04x\n", _Condition & 0xf);
break;
}
@ -200,7 +200,7 @@ bool CheckCondition(uint8 _Condition)
void dsp_op_unknown(uint16 opc)
{
_assert_msg_(MASTER_LOG, !g_dsp.exception_in_progress_hack, "assert while exception");
ErrorLog("dsp_op_unknown somewhere");
ERROR_LOG(DSPHLE, "dsp_op_unknown somewhere");
g_dsp.pc = g_dsp.err_pc;
}
@ -244,7 +244,7 @@ void dsp_opc_jmpa(uint16 opc)
if ((opc & 0xf) != 0xf)
{
ErrorLog("dsp_opc_jmpa");
ERROR_LOG(DSPHLE, "dsp_opc_jmpa");
}
reg = (opc >> 5) & 0x7;
@ -274,7 +274,7 @@ void dsp_opc_rti(uint16 opc)
{
if ((opc & 0xf) != 0xf)
{
ErrorLog("dsp_opc_rti");
ERROR_LOG(DSPHLE, "dsp_opc_rti");
}
g_dsp.r[R_SR] = dsp_reg_load_stack(DSP_STACK_D);
@ -452,7 +452,7 @@ void dsp_opc_ilrr(uint16 opc)
break;
default:
ErrorLog("dsp_opc_ilrr");
ERROR_LOG(DSPHLE, "dsp_opc_ilrr");
}
}
@ -544,14 +544,14 @@ void dsp_opc_mulc(uint16 opc)
// NEW
void dsp_opc_mulcmvz(uint16 opc)
{
ErrorLog("dsp_opc_mulcmvz ni");
ERROR_LOG(DSPHLE, "dsp_opc_mulcmvz ni");
}
// NEW
void dsp_opc_mulcmv(uint16 opc)
{
ErrorLog("dsp_opc_mulcmv ni");
ERROR_LOG(DSPHLE, "dsp_opc_mulcmv ni");
}
@ -735,7 +735,7 @@ void dsp_opc_andfc(uint16 opc)
{
if (opc & 0xf)
{
ErrorLog("dsp_opc_andfc");
ERROR_LOG(DSPHLE, "dsp_opc_andfc");
}
uint8 reg = (opc >> 8) & 0x1;
@ -761,7 +761,7 @@ void dsp_opc_andf(uint16 opc)
if (opc & 0xf)
{
ErrorLog("dsp_opc_andf");
ERROR_LOG(DSPHLE, "dsp_opc_andf");
}
reg = 0x1e + ((opc >> 8) & 0x1);
@ -783,7 +783,7 @@ void dsp_opc_subf(uint16 opc)
{
if (opc & 0xf)
{
ErrorLog("dsp_opc_subf");
ERROR_LOG(DSPHLE, "dsp_opc_subf");
}
uint8 reg = 0x1e + ((opc >> 8) & 0x1);
@ -800,7 +800,7 @@ void dsp_opc_xori(uint16 opc)
{
if (opc & 0xf)
{
ErrorLog("dsp_opc_xori");
ERROR_LOG(DSPHLE, "dsp_opc_xori");
}
uint8 reg = 0x1e + ((opc >> 8) & 0x1);
@ -815,7 +815,7 @@ void dsp_opc_andi(uint16 opc)
{
if (opc & 0xf)
{
ErrorLog("dsp_opc_andi");
ERROR_LOG(DSPHLE, "dsp_opc_andi");
}
uint8 reg = 0x1e + ((opc >> 8) & 0x1);
@ -832,7 +832,8 @@ void dsp_opc_ori(uint16 opc)
{
if (opc & 0xf)
{
return(ErrorLog("dsp_opc_ori"));
ERROR_LOG(DSPHLE, "dsp_opc_ori");
return;
}
uint8 reg = 0x1e + ((opc >> 8) & 0x1);
@ -980,7 +981,7 @@ void dsp_opc_neg(uint16 opc)
void dsp_opc_movnp(uint16 opc)
{
ErrorLog("dsp_opc_movnp\n");
ERROR_LOG(DSPHLE, "dsp_opc_movnp\n");
}
@ -1525,7 +1526,7 @@ void dsp_op0(uint16 opc)
break;
default:
ErrorLog("dsp_op0");
ERROR_LOG(DSPHLE, "dsp_op0");
break;
}
@ -1565,7 +1566,7 @@ void dsp_op0(uint16 opc)
break;
default:
ErrorLog("dsp_op0");
ERROR_LOG(DSPHLE, "dsp_op0");
break;
}
@ -1628,7 +1629,7 @@ void dsp_op0(uint16 opc)
break;
default:
ErrorLog("dsp_op0");
ERROR_LOG(DSPHLE, "dsp_op0");
break;
}
@ -1671,7 +1672,7 @@ void dsp_op0(uint16 opc)
break;
default:
ErrorLog("dsp_op0");
ERROR_LOG(DSPHLE, "dsp_op0");
break;
}
@ -1699,7 +1700,7 @@ void dsp_op0(uint16 opc)
break;
default:
ErrorLog("dsp_op0");
ERROR_LOG(DSPHLE, "dsp_op0");
break;
}
}
@ -1756,7 +1757,7 @@ void dsp_op1(uint16 opc)
break;
default:
ErrorLog("dsp_op1");
ERROR_LOG(DSPHLE, "dsp_op1");
break;
}
}
@ -1814,7 +1815,7 @@ void dsp_op3(uint16 opc)
break;
default:
ErrorLog("dsp_op3");
ERROR_LOG(DSPHLE, "dsp_op3");
break;
}
@ -1857,7 +1858,7 @@ void dsp_op4(uint16 opc)
break;
default:
ErrorLog("dsp_op4");
ERROR_LOG(DSPHLE, "dsp_op4");
break;
}
@ -1895,7 +1896,7 @@ void dsp_op5(uint16 opc)
break;
default:
ErrorLog("dsp_op5: %x", (opc >> 8) & 0xf);
ERROR_LOG(DSPHLE, "dsp_op5: %x", (opc >> 8) & 0xf);
break;
}
@ -1933,7 +1934,7 @@ void dsp_op6(uint16 opc)
break;
default:
ErrorLog("dsp_op6");
ERROR_LOG(DSPHLE, "dsp_op6");
break;
}
@ -1985,7 +1986,7 @@ void dsp_op7(uint16 opc)
break;
default:
ErrorLog("dsp_op7");
ERROR_LOG(DSPHLE, "dsp_op7");
break;
}
@ -2032,7 +2033,7 @@ void dsp_op8(uint16 opc)
break;
default:
ErrorLog("dsp_op8");
ERROR_LOG(DSPHLE, "dsp_op8");
break;
}
@ -2078,7 +2079,7 @@ void dsp_op9(uint16 opc)
break;
default:
ErrorLog("dsp_op9");
ERROR_LOG(DSPHLE, "dsp_op9");
break;
}
@ -2116,7 +2117,7 @@ void dsp_opab(uint16 opc)
break;
default:
ErrorLog("dsp_opab");
ERROR_LOG(DSPHLE, "dsp_opab");
}
dsp_op_ext_ops_epi(opc);
@ -2153,7 +2154,7 @@ void dsp_opcd(uint16 opc)
break;
default:
ErrorLog("dsp_opcd");
ERROR_LOG(DSPHLE, "dsp_opcd");
}
dsp_op_ext_ops_epi(opc);
@ -2183,7 +2184,7 @@ void dsp_ope(uint16 opc)
break;
default:
ErrorLog("dsp_ope");
ERROR_LOG(DSPHLE, "dsp_ope");
}
dsp_op_ext_ops_epi(opc);
@ -2224,7 +2225,7 @@ void dsp_opf(uint16 opc)
break;
default:
ErrorLog("dsp_opf");
ERROR_LOG(DSPHLE, "dsp_opf");
break;
}

View File

@ -23,7 +23,6 @@
#include "WaveFile.h"
#include "CommonTypes.h"
#include "Mixer.h"
#include "ConsoleWindow.h" // For Console::Open, Console::Print
#include "Globals.h" // Local
#include "gdsp_interpreter.h"
@ -57,6 +56,7 @@
// =======================================================================================
// Global declarations and definitions
// --------------
PLUGIN_GLOBALS* globals = NULL;
DSPInitialize g_dspInitialize;
#define GDSP_MBOX_CPU 0
@ -114,7 +114,10 @@ void GetDllInfo(PLUGIN_INFO* _PluginInfo)
#endif
}
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals) {
void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
{
globals = _pPluginGlobals;
LogManager::SetInstance((LogManager *)globals->logManager);
}
void DllAbout(HWND _hParent)
@ -135,13 +138,13 @@ void DllDebugger(HWND _hParent, bool Show)
#if defined (_DEBUG) || defined (DEBUGFAST)
g_Dialog.Create(NULL); //_hParent);
g_Dialog.ShowWindow(SW_SHOW);
MoveWindow(g_Dialog.m_hWnd, 450,0, 780,530, true);
// MoveWindow(g_Dialog.m_hWnd, 450,0, 780,530, true);
// Open the console window
Console::Open(155, 100, "Sound Debugging"); // give room for 100 rows
Console::Print("DllDebugger > Console opened\n");
// Console::Open(155, 100, "Sound Debugging"); // give room for 100 rows
// Console::Print("DllDebugger > Console opened\n");
// Todo: Make this adjustable from the Debugging window
MoveWindow(Console::GetHwnd(), 0,400, 1280,500, true);
// MoveWindow(Console::GetHwnd(), 0,400, 1280,500, true);
#else
MessageBox(0, "Can't open debugging window in the Release build of this plugin.", "DSP LLE", 0);
#endif
@ -235,14 +238,14 @@ void Initialize(void *init)
{
bCanWork = false;
PanicAlert("No DSP ROM");
ErrorLog("Cannot load DSP ROM\n");
ERROR_LOG(DSPHLE, "Cannot load DSP ROM\n");
}
if (!gdsp_load_coef((char *)DSP_COEF_FILE))
{
bCanWork = false;
PanicAlert("No DSP COEF");
ErrorLog("Cannot load DSP COEF\n");
ERROR_LOG(DSPHLE, "Cannot load DSP COEF\n");
}
if(!bCanWork)
@ -350,7 +353,7 @@ void DSP_WriteMailboxHigh(bool _CPUMailbox, u16 _uHighMail)
{
if (gdsp_mbox_peek(GDSP_MBOX_CPU) & 0x80000000)
{
ErrorLog("Mailbox isnt empty ... strange");
ERROR_LOG(DSPHLE, "Mailbox isnt empty ... strange");
}
#if PROFILE
@ -364,7 +367,7 @@ void DSP_WriteMailboxHigh(bool _CPUMailbox, u16 _uHighMail)
}
else
{
ErrorLog("CPU cant write to DSP mailbox");
ERROR_LOG(DSPHLE, "CPU cant write to DSP mailbox");
}
}
@ -377,7 +380,7 @@ void DSP_WriteMailboxLow(bool _CPUMailbox, u16 _uLowMail)
u32 uAddress = gdsp_mbox_peek(GDSP_MBOX_CPU);
u16 errpc = g_dsp.err_pc;
DebugLog("Write CPU Mail: 0x%08x (pc=0x%04x)\n", uAddress, errpc);
DEBUG_LOG(DSPHLE, "Write CPU Mail: 0x%08x (pc=0x%04x)\n", uAddress, errpc);
// ---------------------------------------------------------------------------------------
// I couldn't find any better way to detect the AX mails so this had to do. Please feel free
@ -385,13 +388,13 @@ void DSP_WriteMailboxLow(bool _CPUMailbox, u16 _uLowMail)
// --------------
if ((errpc == 0x0054 || errpc == 0x0055) && m_addressPBs == 0)
{
DebugLog("AXTask ======== 0x%08x (pc=0x%04x)", uAddress, errpc);
DEBUG_LOG(DSPHLE, "AXTask ======== 0x%08x (pc=0x%04x)", uAddress, errpc);
AXTask(uAddress);
}
}
else
{
ErrorLog("CPU cant write to DSP mailbox");
ERROR_LOG(DSPHLE, "CPU cant write to DSP mailbox");
}
}
@ -433,7 +436,3 @@ void DSP_SendAIBuffer(unsigned int address, int sample_rate)
void __Log(int, const char *fmt, ...)
{
//DebugLog(fmt);
}