From d7dd4897f8bfbb031bdbc7daae56f84ac95b3c8e Mon Sep 17 00:00:00 2001 From: Eladash Date: Fri, 28 Feb 2020 19:47:22 +0200 Subject: [PATCH] Allow 0x30000000 > addr >= 0x2000000 ppu loader exec allocations (workaround) --- rpcs3/Emu/Cell/PPUModule.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index 45dff03ebc..4eeb224e63 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -1086,7 +1086,14 @@ void ppu_load_exec(const ppu_exec_object& elf) fmt::throw_exception("Invalid binary size (0x%llx, memsz=0x%x)", prog.bin.size(), size); if (!vm::falloc(addr, size, vm::main)) - fmt::throw_exception("vm::falloc() failed (addr=0x%x, memsz=0x%x)", addr, size); + { + ppu_loader.error("vm::falloc(vm::main) failed (addr=0x%x, memsz=0x%x)", addr, size); // TODO + + if (!vm::falloc(addr, size)) + { + fmt::throw_exception("vm::falloc() failed (addr=0x%x, memsz=0x%x)" HERE, addr, size); + } + } // Copy segment data, hash it std::memcpy(vm::base(addr), prog.bin.data(), prog.bin.size());