diff --git a/rpcs3/Emu/Memory/vm.cpp b/rpcs3/Emu/Memory/vm.cpp index c82a1e8848..1facefe4c9 100644 --- a/rpcs3/Emu/Memory/vm.cpp +++ b/rpcs3/Emu/Memory/vm.cpp @@ -881,10 +881,10 @@ namespace vm g_locations = { std::make_shared(0x00010000, 0x1FFF0000), // main - std::make_shared(0xC0000000, 0x10000000), // video - std::make_shared(0xD0000000, 0x10000000), // stack nullptr, // user 64k pages nullptr, // user 1m pages + std::make_shared(0xC0000000, 0x10000000), // video + std::make_shared(0xD0000000, 0x10000000), // stack std::make_shared(0xE0000000, 0x20000000), // SPU reserved }; } diff --git a/rpcs3/Emu/Memory/vm.h b/rpcs3/Emu/Memory/vm.h index c77d519d20..9aefb06a8f 100644 --- a/rpcs3/Emu/Memory/vm.h +++ b/rpcs3/Emu/Memory/vm.h @@ -21,10 +21,10 @@ namespace vm enum memory_location_t : uint { main, - video, - stack, user64k, user1m, + video, + stack, memory_location_max, any = 0xffffffff, diff --git a/rpcs3/Emu/RSX/Capture/rsx_replay.cpp b/rpcs3/Emu/RSX/Capture/rsx_replay.cpp index 9ade6368ee..3f58477433 100644 --- a/rpcs3/Emu/RSX/Capture/rsx_replay.cpp +++ b/rpcs3/Emu/RSX/Capture/rsx_replay.cpp @@ -12,6 +12,11 @@ namespace rsx { be_t rsx_replay_thread::allocate_context() { + // 'fake' initialize usermemory + // todo: seriously, need to probly watch the replay memory map and just make sure its mapped before we copy rather than do this + const auto user_mem = vm::get(vm::user64k); + vm::falloc(user_mem->addr, 0x10000000); + const u32 contextAddr = vm::alloc(sizeof(rsx_context), vm::main); if (contextAddr == 0) fmt::throw_exception("Capture Replay: context alloc failed"); @@ -26,11 +31,6 @@ namespace rsx if (sys_rsx_context_allocate(vm::get_addr(&contextInfo.context_id), vm::get_addr(&contextInfo.dma_addr), vm::get_addr(&contextInfo.driver_info), vm::get_addr(&contextInfo.reports_addr), contextInfo.mem_handle, 0) != CELL_OK) fmt::throw_exception("Capture Replay: sys_rsx_context_allocate failed!"); - // 'fake' initialize usermemory - // todo: seriously, need to probly watch the replay memory map and just make sure its mapped before we copy rather than do this - const auto user_mem = vm::get(vm::user64k); - vm::falloc(user_mem->addr, 0x10000000); - return contextInfo.context_id; }