Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow executing code out of FakeVMEM. #2055

Merged
merged 1 commit into from Feb 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions Source/Core/Core/PowerPC/MMU.cpp
Expand Up @@ -397,11 +397,22 @@ TryReadInstResult TryReadInstruction(u32 address)
{
int segment = address >> 28;
if ((segment == 0x8 || segment == 0x0) && (address & 0x0FFFFFFF) < Memory::REALRAM_SIZE)
{
address = address & 0x3FFFFFFF;
}
else if (segment == 0x9 && (address & 0x0FFFFFFF) < Memory::EXRAM_SIZE)
{
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
{
return TryReadInstResult{ false, false, 0 };
}
}
}
else
Expand Down