DSP LLE: Just some renaming and cleanup. Prepared for proper base address support in disassembly. Added a "DebugInterface" for the DSP which would allow us to hook up a CodeView .. although CoreView currently doesn't have any support for variable-length instructions.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3351 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-06-07 11:06:40 +00:00
parent 89cd1a4a76
commit bb06a53e28
15 changed files with 309 additions and 123 deletions

View File

@ -71,7 +71,7 @@ DSPDisassembler::~DSPDisassembler()
fclose(uo);
}
bool DSPDisassembler::Disassemble(int start_pc, const std::vector<u16> &code, std::string &text)
bool DSPDisassembler::Disassemble(int start_pc, const std::vector<u16> &code, int base_addr, std::string &text)
{
const char *tmp1 = "tmp1.bin";
const char *tmp2 = "tmp.txt";
@ -186,7 +186,7 @@ static void MakeLowerCase(char *ptr)
}
}
void DSPDisassembler::DisOpcode(const u16 *binbuf, int pass, u16 *pc, std::string &dest)
void DSPDisassembler::DisOpcode(const u16 *binbuf, int base_addr, int pass, u16 *pc, std::string &dest)
{
char buffer[256];
char *buf = buffer;
@ -339,7 +339,7 @@ bool DSPDisassembler::DisFile(const char* name, int pass, std::string &output)
// Actually do the disassembly.
for (u16 pc = 0; pc < (size / 2);)
{
DisOpcode(binbuf, pass, &pc, output);
DisOpcode(binbuf, 0x0000, pass, &pc, output);
if (pass == 2)
output.append("\n");
}