mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -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:
83
Source/Plugins/Plugin_DSP_LLE/Src/Logging/AXTask.cpp
Normal file
83
Source/Plugins/Plugin_DSP_LLE/Src/Logging/AXTask.cpp
Normal file
@ -0,0 +1,83 @@
|
||||
#include "../Globals.h"
|
||||
#include "Common.h"
|
||||
|
||||
|
||||
extern u32 m_addressPBs;
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
// Get the parameter block location - Example SSBM: We get the addr 8049cf00, first we
|
||||
// always get 0 and go to AXLIST_STUDIOADDR, then we end up at AXLIST_PBADDR.
|
||||
// --------------
|
||||
bool AXTask(u32& _uMail)
|
||||
{
|
||||
u32 uAddress = _uMail;
|
||||
DebugLog("AXTask - ================================================================");
|
||||
DebugLog("AXTask - AXCommandList-Addr: 0x%08x", uAddress);
|
||||
|
||||
bool bExecuteList = true;
|
||||
|
||||
while (bExecuteList)
|
||||
{
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// SSBM: We get the addr 8049cf00, first we always get 0
|
||||
static int last_valid_command = 0;
|
||||
u16 iCommand = Memory_Read_U16(uAddress);
|
||||
uAddress += 2;
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
switch (iCommand)
|
||||
{
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// ?
|
||||
case 0: // AXLIST_STUDIOADDR: //00
|
||||
{
|
||||
uAddress += 4;
|
||||
DebugLog("AXLIST AXLIST_SBUFFER: %08x", uAddress);
|
||||
}
|
||||
break;
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
case 2: // AXLIST_PBADDR: // 02
|
||||
{
|
||||
m_addressPBs = Memory_Read_U32(uAddress);
|
||||
uAddress += 4;
|
||||
DebugLog("AXLIST PB address: %08x", m_addressPBs);
|
||||
bExecuteList = false;
|
||||
}
|
||||
break;
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
case 7: // AXLIST_SBUFFER: // 7
|
||||
{
|
||||
// Hopefully this is where in main ram to write.
|
||||
uAddress += 4;
|
||||
DebugLog("AXLIST AXLIST_SBUFFER: %08x", uAddress);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
default:
|
||||
{
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// Stop the execution of this TaskList
|
||||
DebugLog("AXLIST default: %08x", uAddress);
|
||||
bExecuteList = false;
|
||||
// ---------------------------------------------------------------------------------------
|
||||
}
|
||||
break;
|
||||
} // end of switch
|
||||
}
|
||||
|
||||
DebugLog("AXTask - done, send resume");
|
||||
DebugLog("AXTask - ================================================================");
|
||||
|
||||
// now resume
|
||||
return true;
|
||||
}
|
||||
// =======================================================================================
|
||||
|
||||
|
@ -76,7 +76,7 @@ void ClearScreen();
|
||||
int wprintf(char *fmt, ...)
|
||||
{
|
||||
#ifdef DEBUGG
|
||||
char s[4000]; // WARNING: mind this value
|
||||
char s[6000]; // WARNING: mind this value
|
||||
va_list argptr;
|
||||
int cnt;
|
||||
|
||||
|
@ -22,12 +22,9 @@
|
||||
|
||||
|
||||
// =======================================================================================
|
||||
// TODO: make this automatic
|
||||
// Externals
|
||||
// --------------
|
||||
//u32 m_addressPBs = 0x804a1a60; // SSBM (PAL)
|
||||
//u32 m_addressPBs = 0x802798c0; // Baten
|
||||
//u32 m_addressPBs = 0x80576d20; // Symphonia
|
||||
u32 m_addressPBs = 0x80671d00; // Paper Mario
|
||||
u32 m_addressPBs = 0;
|
||||
// --------------
|
||||
extern u32 gLastBlock;
|
||||
// ==============
|
||||
|
Reference in New Issue
Block a user