mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Make address translation respect the CPU translation mode.
The PowerPC CPU has bits in MSR (DR and IR) which control whether addresses are translated. We should respect these instead of mixing physical addresses and translated addresses into the same address space. This is mostly mass-renaming calls to memory accesses APIs from places which expect address translation to use a different version from those which do not expect address translation. This does very little on its own, but it's the first step to a correct BAT implementation.
This commit is contained in:
@ -43,7 +43,7 @@ static u32 GetWatchAddr(int count)
|
||||
|
||||
static u32 GetWatchValue(int count)
|
||||
{
|
||||
return Memory::ReadUnchecked_U32(GetWatchAddr(count));
|
||||
return PowerPC::HostRead_U32(GetWatchAddr(count));
|
||||
}
|
||||
|
||||
static void AddWatchAddr(int count, u32 value)
|
||||
@ -71,7 +71,7 @@ static void SetWatchName(int count, const std::string& value)
|
||||
|
||||
static void SetWatchValue(int count, u32 value)
|
||||
{
|
||||
Memory::WriteUnchecked_U32(value, GetWatchAddr(count));
|
||||
PowerPC::HostWrite_U32(value, GetWatchAddr(count));
|
||||
}
|
||||
|
||||
static wxString GetValueByRowCol(int row, int col)
|
||||
@ -102,8 +102,8 @@ static wxString GetValueByRowCol(int row, int col)
|
||||
case 4:
|
||||
{
|
||||
u32 addr = GetWatchAddr(row);
|
||||
if (Memory::IsRAMAddress(addr))
|
||||
return Memory::GetString(addr, 32).c_str();
|
||||
if (PowerPC::HostIsRAMAddress(addr))
|
||||
return PowerPC::HostGetString(addr, 32).c_str();
|
||||
else
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
Reference in New Issue
Block a user