mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 08:51:05 -04:00
93e221feaa
* feat: remove memory and pad from stub section * feat: add support for resume entry targets in CodeGenerator (this allow jumps in address outside function) feat: refactor entry point discovery one more try to reduce big generated file * feat: optmizations for release build * feat: remove unused file * feat: added some test cases for code gen * feat: added log macro and remove win specific code * feat: refactor runtime folder structure feat: added reset sound driver RPC state and compatibility layout feat: rename and added new test feat: update RPC calls to use defined constants feat: added more PSMC(16, 32) feat: change cd read to try find the asset ignoring case sensitive fix: fix some render problems feat: add logs on pad feat: added more RPC handles * feat: added game override for code veronica * feat: apply vita patch * feat: flags to disable build * feat: fix merges feat: break a lot of tests * feat: better throw error on empty cd path feat: remove recompiler unusde function feat: apply missing patch * feat: gamedp is now part of lib feat: missing file * feat: small cleanup * feat: missing vita changes * feat: fix more merge * feat: fix tests * feat: last missing feature * feat: added missing import * feat: rename test local functions * feat: init syscall on ps2 list * feat: added DMA helpers * feat: faster builds feat: more implement for darkcloud * feat: back missing file * feat: added missing includes * feat: remove test * feat: missing include * feat: read register funtion * feat: build fix * feat: force exit on detach thread
50 lines
1.9 KiB
C++
50 lines
1.9 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;
|
|
|
|
inline 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
|
|
|
|
void iDeleteSema(uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime);
|
|
void EnableIntcHandler(uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime);
|
|
void DisableIntcHandler(uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime);
|
|
void EnableDmacHandler(uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime);
|
|
void DisableDmacHandler(uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime);
|
|
|
|
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 resetSoundDriverRpcState();
|
|
void setSoundDriverCompatLayout(const PS2SoundDriverCompatLayout &layout);
|
|
void clearSoundDriverCompatLayout();
|
|
void setDtxCompatLayout(const PS2DtxCompatLayout &layout);
|
|
void clearDtxCompatLayout();
|
|
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
|
|
|