diff --git a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp index 78091a2828..f05caed338 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rsx.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rsx.cpp @@ -132,18 +132,15 @@ s32 sys_rsx_context_allocate(vm::ptr context_id, vm::ptr lpar_dma_cont else rsx::get_current_renderer()->main_mem_size = 0x10000000; //256MB - vm::var attr; + vm::var> attr; attr->protocol = SYS_SYNC_PRIORITY; attr->type = SYS_PPU_QUEUE; attr->name_u64 = 0; - vm::var queueId(0); - sys_event_queue_create(queueId, attr, 0, 0x20); - driverInfo.handler_queue = queueId->value(); - sys_event_port_create(queueId, SYS_EVENT_PORT_LOCAL, 0); - sys_event_port_connect_local(queueId->value(), driverInfo.handler_queue); - - m_sysrsx->rsx_event_port = queueId->value(); + sys_event_port_create(vm::get_addr(&driverInfo.handler_queue), SYS_EVENT_PORT_LOCAL, 0); + m_sysrsx->rsx_event_port = driverInfo.handler_queue; + sys_event_queue_create(vm::get_addr(&driverInfo.handler_queue), attr, 0, 0x20); + sys_event_port_connect_local(m_sysrsx->rsx_event_port, driverInfo.handler_queue); const auto render = rsx::get_current_renderer(); render->display_buffers_count = 0; diff --git a/rpcs3/Emu/RSX/Capture/rsx_replay.cpp b/rpcs3/Emu/RSX/Capture/rsx_replay.cpp index c2e11ab610..bbe3ae4354 100644 --- a/rpcs3/Emu/RSX/Capture/rsx_replay.cpp +++ b/rpcs3/Emu/RSX/Capture/rsx_replay.cpp @@ -23,7 +23,7 @@ namespace rsx fmt::throw_exception("Capture Replay: context alloc failed"); const auto& contextInfo = vm::_ref(contextAddr); - if (sys_rsx_device_map(vm::make_var(0), vm::null, 0x8) != CELL_OK) + if (sys_rsx_device_map(vm::get_addr(&contextInfo.dev_addr), vm::null, 0x8) != CELL_OK) fmt::throw_exception("Capture Replay: sys_rsx_device_map failed!"); if (sys_rsx_memory_allocate(vm::get_addr(&contextInfo.mem_handle), vm::get_addr(&contextInfo.mem_addr), 0x0F900000, 0, 0, 0, 0) != CELL_OK) diff --git a/rpcs3/Emu/RSX/Capture/rsx_replay.h b/rpcs3/Emu/RSX/Capture/rsx_replay.h index 1bccfb5924..c61759dc63 100644 --- a/rpcs3/Emu/RSX/Capture/rsx_replay.h +++ b/rpcs3/Emu/RSX/Capture/rsx_replay.h @@ -214,6 +214,7 @@ namespace rsx { struct rsx_context { + be_t dev_addr; be_t mem_handle; be_t context_id; be_t mem_addr; diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 5874a963c8..1d88f85e62 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -486,7 +486,8 @@ bool Emulator::BootRsxCapture(const std::string& path) GetCallbacks().on_run(); m_state = system_state::running; - fxm::make(std::move(frame)); + fxm::make>("RSX Replay", std::move(frame)); + return true; }