Allow overlapping ranges in cellGcmMapEaIoAdress with coherency check (#3070)

According to Jarves, lle-gcm branch already does the same thing so we know the behaviour should be correct
This commit is contained in:
LambdaMan 2017-07-25 01:27:23 +02:00 committed by kd-11
parent b2fa0fdf53
commit 1bef748dc4
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,10 @@ bool VirtualMemoryBlock::Map(u32 realaddr, u32 size, u32 addr)
{
if (addr >= m_mapped_memory[i].addr && addr + size - 1 <= m_mapped_memory[i].addr + m_mapped_memory[i].size - 1)
{
return false;
// it seems mapping another range inside a previous one is legit on ps3
// as long as it's coherent aliasing : offset from EA must match IO offset
// example game using this pattern : BCES01584 - the last of us
return (addr - m_mapped_memory[i].addr) == (realaddr - m_mapped_memory[i].realAddress);
}
}