mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
New DSP debugger: step one. (not ready yet, but try loading zelda WW and look at the dsp debugger..).
Had to shuffle around quite a lot of code to be able to extract the CodeView into a library nicely so it can be used from both the main dolphin and the LLE plugin... also extracted the symboldb code. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3517 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "DSPHost.h"
|
||||
#include "DSPSymbols.h"
|
||||
#include "Tools.h"
|
||||
#include "pluginspecs_dsp.h"
|
||||
|
||||
@ -32,6 +33,11 @@ u8 DSPHost_ReadHostMemory(u32 addr)
|
||||
return g_dspInitialize.pARAM_Read_U8(addr);
|
||||
}
|
||||
|
||||
void DSPHost_WriteHostMemory(u8 value, u32 addr)
|
||||
{
|
||||
g_dspInitialize.pARAM_Write_U8(value, addr);
|
||||
}
|
||||
|
||||
bool DSPHost_OnThread()
|
||||
{
|
||||
return g_dspInitialize.bOnThread;
|
||||
@ -46,5 +52,29 @@ u32 DSPHost_CodeLoaded(const u8 *ptr, int size)
|
||||
{
|
||||
u32 crc = GenerateCRC(ptr, size);
|
||||
DumpDSPCode(ptr, size, crc);
|
||||
|
||||
// this crc is comparable with the HLE plugin
|
||||
u32 ector_crc = 0;
|
||||
for (u32 i = 0; i < size; i++)
|
||||
{
|
||||
ector_crc ^= ptr[i];
|
||||
//let's rol
|
||||
ector_crc = (ector_crc << 3) | (ector_crc >> 29);
|
||||
}
|
||||
|
||||
DSPSymbols::Clear();
|
||||
|
||||
// Auto load text file - if none just disassemble.
|
||||
|
||||
// TODO: Don't hardcode for Zelda.
|
||||
NOTICE_LOG(DSPLLE, "CRC: %08x", ector_crc);
|
||||
if (!DSPSymbols::ReadAnnotatedAssembly("../../Docs/DSP/DSP_UC_Zelda.txt"))
|
||||
{
|
||||
DSPSymbols::Clear();
|
||||
DSPSymbols::AutoDisassembly(0x0, 0x1000);
|
||||
}
|
||||
|
||||
// Always add the ROM.
|
||||
DSPSymbols::AutoDisassembly(0x8000, 0x9000);
|
||||
return crc;
|
||||
}
|
Reference in New Issue
Block a user