From 15e896b31020c0353dff3a552aff638df66f35a5 Mon Sep 17 00:00:00 2001 From: DH Date: Tue, 22 Oct 2024 15:02:31 +0300 Subject: [PATCH] dmem: setup base address if not present --- rpcsx/iodev/dmem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpcsx/iodev/dmem.cpp b/rpcsx/iodev/dmem.cpp index 883337248..92008f218 100644 --- a/rpcsx/iodev/dmem.cpp +++ b/rpcsx/iodev/dmem.cpp @@ -48,6 +48,11 @@ orbis::ErrorCode DmemDevice::mmap(void **address, std::uint64_t len, prot = vm::kMapProtCpuWrite | vm::kMapProtCpuRead | vm::kMapProtGpuAll; } + if (*address == nullptr) { + *address = std::bit_cast(0x80000000ull); + flags &= ~vm::kMapFlagFixed; + } + int memoryType = 0; if (auto allocationInfoIt = allocations.queryArea(directMemoryStart); allocationInfoIt != allocations.end()) {