shadPS4 icon indicating copy to clipboard operation
shadPS4 copied to clipboard

The Last Of Us Part II (CUSA07820) sceKernelGetDirectMemorySize Halt

Open StevenMiller123 opened this issue 5 months ago • 6 comments

The Last Of Us Part II verifies the value of sceKernelGetDirectMemorySize, and halts if the returned value differs from what it expects. A log of this behavior can be found at https://github.com/shadps4-emu/shadps4-game-compatibility/issues/66. This behavior is probably because the game sets a flexible memory size, a behavior that appears to be emulated fine.

Through decompiling the game's eboot, I found that the game uses the constant value 0x15f200000 to verify the direct memory size. For reference, the game sets the flexible memory size to 0xce00000, assuming the current emulated behavior is accurate. This would put the expected total memory size at 0x16c000000. For whatever reason, the expected sizes do not change when isPS4Pro is enabled in the config. I'm not sure if I can share any relevant assembly, but if this would be liked and is considered fine, then I will. I cannot provide any decompilation, as my Ghidra couldn't decomp the function this is all contained in.

StevenMiller123 avatar Sep 05 '24 03:09 StevenMiller123