From 1bef748dc464db5e43171680a3dc1a8e7cb15b12 Mon Sep 17 00:00:00 2001 From: LambdaMan Date: Tue, 25 Jul 2017 01:27:23 +0200 Subject: [PATCH] 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 --- rpcs3/Emu/Memory/Memory.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Memory/Memory.cpp b/rpcs3/Emu/Memory/Memory.cpp index 8b1015ebde..61c90dc60c 100644 --- a/rpcs3/Emu/Memory/Memory.cpp +++ b/rpcs3/Emu/Memory/Memory.cpp @@ -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); } }