Debugger/Memory: Add support for address spaces

Different address spaces can be chosen in the memory view panel.
 * Effective (or virtual): Probably the view people mostly want. Address
   translation goes through MMU.
 * Auxiliary: ARAM address space. Does not display anything in Wii mode.
 * Physical: Physical address space. Only supports mem1 and mem2 (wii
   mode) so far.
This commit is contained in:
booto
2019-04-11 01:50:52 -04:00
parent 3b16d2261a
commit 2ff0486335
14 changed files with 668 additions and 105 deletions

View File

@ -1302,4 +1302,14 @@ static TranslateAddressResult TranslateAddress(u32 address)
return TranslatePageAddress(address, flag);
}
} // namespace
std::optional<u32> GetTranslatedAddress(u32 address)
{
auto result = TranslateAddress<XCheckTLBFlag::NoException>(address);
if (!result.Success())
{
return std::nullopt;
}
return std::optional<u32>(result.address);
}
} // namespace PowerPC