mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-10-07 03:57:37 -04:00
feat: added missing v0 instructions
feat: added threads inplementation on ps2 syscalls feat: patch entrypoint on recompiler feat: ps2 macros now is part of the runtime feat: use thread to hold game loop feat: sanitize functions like point out by chrisking1981 fix: fix old instructions cast fix: fix missing patch for opcode j
This commit is contained in:
@@ -96,6 +96,8 @@ struct alignas(16) R5900Context
|
||||
uint32_t vu0_fbrst4; // FBRST4
|
||||
uint32_t vu0_itop;
|
||||
uint32_t vu0_info;
|
||||
uint32_t vu0_xitop; // VU0 XITOP - input ITOP for VIF/VU sync
|
||||
uint32_t vu0_pc;
|
||||
|
||||
float vu0_cf[4]; // VU0 FMAC control floating-point registers
|
||||
|
||||
@@ -168,6 +170,18 @@ struct alignas(16) R5900Context
|
||||
vu0_fbrst2 = 0;
|
||||
vu0_fbrst3 = 0;
|
||||
vu0_fbrst4 = 0;
|
||||
vu0_xitop = 0;
|
||||
vu0_pc = 0;
|
||||
vu0_tpc = 0;
|
||||
vu0_vpu_stat2 = 0;
|
||||
vu0_tpc2 = 0;
|
||||
vu0_cmsar1 = 0;
|
||||
vu0_vpu_stat3 = 0;
|
||||
vu0_cmsar2 = 0;
|
||||
vu0_vpu_stat4 = 0;
|
||||
vu0_itop = 0;
|
||||
vu0_info = 0;
|
||||
|
||||
|
||||
// Reset COP0 registers
|
||||
cop0_index = 0;
|
||||
@@ -193,16 +207,6 @@ struct alignas(16) R5900Context
|
||||
cop0_taghi = 0;
|
||||
cop0_errorepc = 0;
|
||||
|
||||
vu0_tpc = 0;
|
||||
vu0_vpu_stat2 = 0;
|
||||
vu0_tpc2 = 0;
|
||||
vu0_cmsar1 = 0;
|
||||
vu0_vpu_stat3 = 0;
|
||||
vu0_cmsar2 = 0;
|
||||
vu0_vpu_stat4 = 0;
|
||||
vu0_itop = 0;
|
||||
vu0_info = 0;
|
||||
|
||||
// Reset COP1 state
|
||||
fcr31 = 0;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include "ps2_runtime.h"
|
||||
#include <mutex>
|
||||
#include <atomic>
|
||||
|
||||
// Number of active host threads spawned for PS2 thread emulation
|
||||
extern std::atomic<int> g_activeThreads;
|
||||
|
||||
static std::mutex g_sys_fd_mutex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user