This commit is contained in:
Stephen Miller 2025-04-18 09:45:35 -05:00
parent de549a23dc
commit 36ed12e9d3

View file

@ -108,15 +108,15 @@ void Linker::Execute(const std::vector<std::string> args) {
static constexpr s64 InternalMemorySize = 0x1000000;
void* addr_out{reinterpret_cast<void*>(KernelAllocBase)};
s32 ret = Libraries::Kernel::sceKernelMapNamedFlexibleMemory(
&addr_out, InternalMemorySize, 3, 0, "SceKernelInternalMemory");
s32 ret = Libraries::Kernel::sceKernelMapNamedFlexibleMemory(&addr_out, InternalMemorySize, 3,
0, "SceKernelInternalMemory");
ASSERT_MSG(ret == 0, "Unable to perform sceKernelInternalMemory mapping");
// Simulate libSceGnmDriver initialization, which maps a chunk of direct memory.
// Some games fail without accurately emulating this behavior.
s64 phys_addr{};
ret = Libraries::Kernel::sceKernelAllocateDirectMemory(0,
Libraries::Kernel::sceKernelGetDirectMemorySize(), 0x10000, 0x10000, 3, &phys_addr);
ret = Libraries::Kernel::sceKernelAllocateDirectMemory(
0, Libraries::Kernel::sceKernelGetDirectMemorySize(), 0x10000, 0x10000, 3, &phys_addr);
if (ret == 0) {
void* addr{};
ret = Libraries::Kernel::sceKernelMapNamedDirectMemory(&addr, 0x10000, 0x13, 0, phys_addr,