mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-10 12:45:46 +00:00
Merge pull request #2055 from magumagu/fakevmem-code
Allow executing code out of FakeVMEM.
This commit is contained in:
commit
77a0bfdd8f
@ -397,11 +397,22 @@ TryReadInstResult TryReadInstruction(u32 address)
|
|||||||
{
|
{
|
||||||
int segment = address >> 28;
|
int segment = address >> 28;
|
||||||
if ((segment == 0x8 || segment == 0x0) && (address & 0x0FFFFFFF) < Memory::REALRAM_SIZE)
|
if ((segment == 0x8 || segment == 0x0) && (address & 0x0FFFFFFF) < Memory::REALRAM_SIZE)
|
||||||
|
{
|
||||||
address = address & 0x3FFFFFFF;
|
address = address & 0x3FFFFFFF;
|
||||||
|
}
|
||||||
else if (segment == 0x9 && (address & 0x0FFFFFFF) < Memory::EXRAM_SIZE)
|
else if (segment == 0x9 && (address & 0x0FFFFFFF) < Memory::EXRAM_SIZE)
|
||||||
|
{
|
||||||
address = address & 0x3FFFFFFF;
|
address = address & 0x3FFFFFFF;
|
||||||
|
}
|
||||||
|
else if (Memory::bFakeVMEM && (segment == 0x7 || segment == 0x4))
|
||||||
|
{
|
||||||
|
u32 hex = bswap((*(const u32*)&Memory::m_pFakeVMEM[address & Memory::FAKEVMEM_MASK]));
|
||||||
|
return TryReadInstResult{ true, true, hex };
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return TryReadInstResult{ false, false, 0 };
|
return TryReadInstResult{ false, false, 0 };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user