Allow disassembly of FakeVMEM with the dolphin debugger

This commit is contained in:
Pierre Bourdon 2012-06-19 11:57:57 +02:00
parent 540010055e
commit 34606f34a9
3 changed files with 10 additions and 5 deletions

View File

@ -35,7 +35,7 @@ void PPCDebugInterface::disasm(unsigned int address, char *dest, int max_size)
if (Core::GetState() != Core::CORE_UNINITIALIZED) if (Core::GetState() != Core::CORE_UNINITIALIZED)
{ {
if (Memory::IsRAMAddress(address, true)) if (Memory::IsRAMAddress(address, true, true))
{ {
u32 op = Memory::Read_Instruction(address); u32 op = Memory::Read_Instruction(address);
DisassembleGekko(op, address, dest, max_size); DisassembleGekko(op, address, dest, max_size);
@ -60,7 +60,7 @@ void PPCDebugInterface::getRawMemoryString(int memory, unsigned int address, cha
{ {
if (Core::GetState() != Core::CORE_UNINITIALIZED) if (Core::GetState() != Core::CORE_UNINITIALIZED)
{ {
if (memory || Memory::IsRAMAddress(address, true)) if (memory || Memory::IsRAMAddress(address, true, true))
{ {
snprintf(dest, max_size, "%08X%s", readExtraMemory(memory, address), memory ? " (ARAM)" : ""); snprintf(dest, max_size, "%08X%s", readExtraMemory(memory, address), memory ? " (ARAM)" : "");
} }
@ -175,7 +175,7 @@ void PPCDebugInterface::breakNow()
// ------------- // -------------
int PPCDebugInterface::getColor(unsigned int address) int PPCDebugInterface::getColor(unsigned int address)
{ {
if (!Memory::IsRAMAddress(address, true)) if (!Memory::IsRAMAddress(address, true, true))
return 0xeeeeee; return 0xeeeeee;
static const int colors[6] = static const int colors[6] =
{ {

View File

@ -675,7 +675,7 @@ u8 *GetPointer(const u32 _Address)
} }
bool IsRAMAddress(const u32 addr, bool allow_locked_cache) bool IsRAMAddress(const u32 addr, bool allow_locked_cache, bool allow_fake_vmem)
{ {
switch ((addr >> 24) & 0xFC) switch ((addr >> 24) & 0xFC)
{ {
@ -698,6 +698,11 @@ bool IsRAMAddress(const u32 addr, bool allow_locked_cache)
return true; return true;
else else
return false; return false;
case 0x7C:
if (allow_fake_vmem && bFakeVMEM && addr >= 0x7E000000)
return true;
else
return false;
default: default:
return false; return false;
} }

View File

@ -102,7 +102,7 @@ void WriteUnchecked_U32(const u32 _Data, const u32 _Address);
void InitHWMemFuncs(); void InitHWMemFuncs();
void InitHWMemFuncsWii(); void InitHWMemFuncsWii();
bool IsRAMAddress(const u32 addr, bool allow_locked_cache = false); bool IsRAMAddress(const u32 addr, bool allow_locked_cache = false, bool allow_fake_vmem = false);
writeFn32 GetHWWriteFun32(const u32 _Address); writeFn32 GetHWWriteFun32(const u32 _Address);
inline u8* GetCachePtr() {return m_pL1Cache;} inline u8* GetCachePtr() {return m_pL1Cache;}