mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-30 02:04:32 -04:00
cad1ca0bb5
* fix: CRITICAL fix on code gen on generating BEQ translation, I added a small yeld because goto could spin forever and monopolize guest execution * feat: add scratchpad alias base and improve scratchpad address handling * feat: added debug logging on GifArbiter for submit and drain operations * feat: add interrupt and thread management syscall implementations fix: change some IDs calls to match ps2sdk * feat: added vif1 logs * feat: added logs on gs gpu feat: added performLocalToLocalTransfer to GS emulation path for TRXDIR = 2. (emulates the PS2 GS “copy this rectangle from one place in VRAM to another”) * feat: added PSMT8 and refactor PSMT4 * feat: some identation on vu1 feat: added some logs on vu1 * feat: added GuestExecutionScope to temporarily stop owning guest execution, then restore it exactly as it was. feat: added vsync wizardry feat: added some regression test * fix: fix gs logger * feat: remove extra logs I think they will help no one feat: move join all threads to prevent the app to get stuck on close, but now it random crash on closing feat: one more small test on psmt4 to try fix ghosting on re code veronica * feat: added a small case for exporter from ghidra for metal slug 3 * feat: added ugly code to pass on test
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#ifndef PS2_SYSCALLS_H
|
|
#define PS2_SYSCALLS_H
|
|
|
|
#include "ps2_runtime.h"
|
|
#include "ps2_call_list.h"
|
|
#include <mutex>
|
|
#include <atomic>
|
|
#include <cstdint>
|
|
#include <cstring>
|
|
#include <string>
|
|
|
|
std::string translatePs2Path(const char *ps2Path);
|
|
|
|
extern std::atomic<int> g_activeThreads;
|
|
|
|
static std::mutex g_sys_fd_mutex;
|
|
|
|
namespace ps2_syscalls
|
|
{
|
|
#define PS2_DECLARE_SYSCALL(name) void name(uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime);
|
|
PS2_SYSCALL_LIST(PS2_DECLARE_SYSCALL)
|
|
#undef PS2_DECLARE_SYSCALL
|
|
|
|
bool dispatchNumericSyscall(uint32_t syscallNumber, uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime);
|
|
void dispatchDmacHandlersForCause(uint8_t *rdram, PS2Runtime *runtime, uint32_t cause);
|
|
void initializeGuestKernelState(uint8_t *rdram);
|
|
void TODO(uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime, uint32_t encodedSyscallId);
|
|
void notifyRuntimeStop();
|
|
void joinAllGuestHostThreads();
|
|
void detachAllGuestHostThreads();
|
|
void EnsureVSyncWorkerRunning(uint8_t *rdram, PS2Runtime *runtime);
|
|
uint64_t GetCurrentVSyncTick();
|
|
uint64_t WaitForNextVSyncTick(uint8_t *rdram, PS2Runtime *runtime);
|
|
void WaitVSyncTick(uint8_t *rdram, PS2Runtime *runtime);
|
|
}
|
|
|
|
#endif // PS2_SYSCALLS_H
|