mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 16:59:35 -04:00
1551d59fbc
* GS stubs (ps2_stubs_gs.inl): - Replace direct VRAM writes with GIF packet path - sceGsExecLoadImage: build GIF packet, set MADR/QWC/CHCR - sceGsExecStoreImage: GIF packet, processPendingTransfers, consumeLocalToHostBytes - sceGsPutDispEnv/sceGsPutDrawEnv: program GIF DMA Path3 (5/9 QWs) - sceGsResetGraph: GIF packet + writeIORegister for pmode/smode2/dispfb/display/bgcolor - sceGsSetDefDrawEnv: GIF packet layout, sceGszbufaddr for zbuf - sceGsSyncPath: processPendingTransfers, poll DMA channels - sceGsSyncV/sceGsSyncVCallback: return 0 - sceGszbufaddr: zbuf calculation (width/height blocks, gparam) Helpers (ps2_stubs_helpers.inl): - GsDispEnvMem: 5 fields (pmode, smode2, dispfb, display, bgcolor) for GIF layout - writeGsDispEnv: read-modify-write pattern - toDmaPhys: SPR (scratchpad) handling for DMA MADR bit 31 - submitDmaSend: chain mode (chcr=0x185) for sceDmaSend/sceDmaSendI/sceDmaSendM Misc stubs (ps2_stubs_misc.inl): - Add sceeFontInit, sceeFontLoadFont, sceeFontPrintfAt, sceeFontPrintfAt2 - Add sceeFontClose, sceeFontSetColour, sceeFontSetMode, sceeFontSetFont, sceeFontSetScale - Font stubs use GIF packets for CLUT and texture upload Call list (ps2_call_list.h): - Add sceeFont* entries between sceGszbufaddr and sceIoctl * added: added more scee font stubs in stubs misc fix: fixed flickering error when rendering in memory.cpp * fix: fixed linux build error
31 lines
846 B
C++
31 lines
846 B
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 TODO(uint8_t *rdram, R5900Context *ctx, PS2Runtime *runtime, uint32_t encodedSyscallId);
|
|
void notifyRuntimeStop();
|
|
void WaitVSyncTick(uint8_t *rdram, PS2Runtime *runtime);
|
|
}
|
|
|
|
#endif // PS2_SYSCALLS_H
|