added more PS4_SYSV_ABI codes

This commit is contained in:
georgemoralis 2023-07-21 14:52:40 +03:00
parent bb40fa9d65
commit 5706e1be1b
6 changed files with 92 additions and 61 deletions

View File

@ -11,29 +11,31 @@ namespace HLE::Libs::LibC {
//dummy no need atm //dummy no need atm
} }
int __cxa_guard_acquire(u64* guard_object) int PS4_SYSV_ABI __cxa_guard_acquire(u64* guard_object)
{ return 0; {
__debugbreak();
return 0;
} }
int __cxa_guard_release(u64* guard_object) int PS4_SYSV_ABI __cxa_guard_release(u64* guard_object)
{ return 0; {
__debugbreak();
return 0;
} }
int memcmp(const void* s1, const void* s2, size_t n) { int PS4_SYSV_ABI memcmp(const void* s1, const void* s2, size_t n) {
return ::memcmp(s1, s2, n); return ::memcmp(s1, s2, n);
} }
void* memcpy(void* dest, const void* src, size_t n) { void* PS4_SYSV_ABI memcpy(void* dest, const void* src, size_t n) {
return ::memcpy(dest, src, n); return ::memcpy(dest, src, n);
} }
static void catchReturnFromMain(int status) static PS4_SYSV_ABI void catchReturnFromMain(int status)
{ { __debugbreak();
} }
static void exit(int code) static PS4_SYSV_ABI void exit(int code)
{ { __debugbreak();
} }
static PS4_SYSV_ABI int atexit(void (*func)()) static PS4_SYSV_ABI int atexit(void (*func)())
{ {

View File

@ -4,11 +4,13 @@
namespace HLE::Libs::LibC { namespace HLE::Libs::LibC {
void LibC_Register(SymbolsResolver* sym); void LibC_Register(SymbolsResolver* sym);
//functions //functions
static PS4_SYSV_ABI void init_env(); static PS4_SYSV_ABI void init_env();
static PS4_SYSV_ABI void exit(int code); static PS4_SYSV_ABI void exit(int code);
static void catchReturnFromMain(int status); static PS4_SYSV_ABI void catchReturnFromMain(int status);
int __cxa_guard_acquire(u64* guard_object); int PS4_SYSV_ABI __cxa_guard_acquire(u64* guard_object);
int memcmp(const void* s1, const void* s2, size_t n); int PS4_SYSV_ABI memcmp(const void* s1, const void* s2, size_t n);
void* memcpy(void* dest, const void* src, size_t n); void* PS4_SYSV_ABI memcpy(void* dest, const void* src, size_t n);
}; };

View File

@ -6,26 +6,41 @@ namespace HLE::Libs::LibKernel {
static u64 g_stack_chk_guard = 0xDEADBEEF54321ABC; //dummy return static u64 g_stack_chk_guard = 0xDEADBEEF54321ABC; //dummy return
int sceKernelAllocateDirectMemory(off_t searchStart, off_t searchEnd, size_t len, size_t alignment, int memoryType, off_t* physAddrOut) { return 0;//OK int PS4_SYSV_ABI sceKernelAllocateDirectMemory(off_t searchStart, off_t searchEnd, size_t len, size_t alignment, int memoryType,
off_t* physAddrOut) {
__debugbreak();
return 0; // OK
} }
size_t sceKernelGetDirectMemorySize() { return 0; size_t PS4_SYSV_ABI sceKernelGetDirectMemorySize() {
__debugbreak();
return 0;
} }
int32_t sceKernelMapDirectMemory(void** addr, size_t len, int prot, int flags, off_t directMemoryStart, size_t alignment) { return 0; int32_t PS4_SYSV_ABI sceKernelMapDirectMemory(void** addr, size_t len, int prot, int flags, off_t directMemoryStart, size_t alignment) {
__debugbreak();
return 0;
} }
int32_t sceKernelReleaseDirectMemory(off_t start, size_t len) { return 0; int32_t PS4_SYSV_ABI sceKernelReleaseDirectMemory(off_t start, size_t len) {
__debugbreak();
return 0;
} }
int sceKernelCreateEqueue(/* SceKernelEqueue* eq*/int eq,const char* name) int PS4_SYSV_ABI sceKernelCreateEqueue(/* SceKernelEqueue* eq*/ int eq, const char* name)
{ return 0; {
__debugbreak();
return 0;
} }
int sceKernelWaitEqueue(/*SceKernelEqueue eq, SceKernelEvent* ev,*/ int num, int* out /*, SceKernelUseconds* timo*/) { return 0; int PS4_SYSV_ABI sceKernelWaitEqueue(/*SceKernelEqueue eq, SceKernelEvent* ev,*/ int num, int* out /*, SceKernelUseconds* timo*/)
{
__debugbreak();
return 0;
} }
int sceKernelIsNeoMode() int PS4_SYSV_ABI sceKernelIsNeoMode()
{ return 0; {
__debugbreak();
return 0;
} }
static void stack_chk_fail() { static PS4_SYSV_ABI void stack_chk_fail() { __debugbreak();
} }
void LibKernel_Register(SymbolsResolver* sym) { void LibKernel_Register(SymbolsResolver* sym) {
//obj //obj

View File

@ -3,12 +3,13 @@
namespace HLE::Libs::LibKernel { namespace HLE::Libs::LibKernel {
void LibKernel_Register(SymbolsResolver* sym); void LibKernel_Register(SymbolsResolver* sym);
// functions // functions
int sceKernelAllocateDirectMemory(off_t searchStart, off_t searchEnd, size_t len, size_t alignment, int memoryType, off_t* physAddrOut); int PS4_SYSV_ABI sceKernelAllocateDirectMemory(off_t searchStart, off_t searchEnd, size_t len, size_t alignment, int memoryType, off_t* physAddrOut);
size_t sceKernelGetDirectMemorySize(); size_t PS4_SYSV_ABI sceKernelGetDirectMemorySize();
int sceKernelCreateEqueue(/* SceKernelEqueue* eq*/ int eq, const char* name); int PS4_SYSV_ABI sceKernelCreateEqueue(/* SceKernelEqueue* eq*/ int eq, const char* name);
int32_t sceKernelMapDirectMemory(void** addr, size_t len, int prot, int flags, off_t directMemoryStart, size_t alignment); int32_t PS4_SYSV_ABI sceKernelMapDirectMemory(void** addr, size_t len, int prot, int flags, off_t directMemoryStart, size_t alignment);
int32_t sceKernelReleaseDirectMemory(off_t start, size_t len); int32_t PS4_SYSV_ABI sceKernelReleaseDirectMemory(off_t start, size_t len);
int sceKernelIsNeoMode(); int PS4_SYSV_ABI sceKernelIsNeoMode();
int sceKernelWaitEqueue(/*SceKernelEqueue eq, SceKernelEvent* ev,*/ int num, int* out /*, SceKernelUseconds* timo*/); int PS4_SYSV_ABI sceKernelWaitEqueue(/*SceKernelEqueue eq, SceKernelEvent* ev,*/ int num, int* out /*, SceKernelUseconds* timo*/);
}; // namespace HLE::Libs::LibKernel }; // namespace HLE::Libs::LibKernel

View File

@ -4,30 +4,37 @@
namespace HLE::Libs::LibSceVideoOut { namespace HLE::Libs::LibSceVideoOut {
int32_t sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/){ int32_t PS4_SYSV_ABI sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/) {
__debugbreak();
return 0; return 0;
} }
int32_t sceVideoOutSubmitFlip(int32_t handle, int32_t bufferIndex, int32_t flipMode,int64_t flipArg){ int32_t PS4_SYSV_ABI sceVideoOutSubmitFlip(int32_t handle, int32_t bufferIndex, int32_t flipMode, int64_t flipArg) {
__debugbreak();
return 0; return 0;
} }
int32_t sceVideoOutRegisterBuffers(int32_t handle, int32_t startIndex, void* const* addresses, int32_t bufferNum /*, int32_t PS4_SYSV_ABI sceVideoOutRegisterBuffers(int32_t handle, int32_t startIndex, void* const* addresses, int32_t bufferNum /*,
const SceVideoOutBufferAttribute* attribute*/) { const SceVideoOutBufferAttribute* attribute*/) {
__debugbreak();
return 0; return 0;
} }
int32_t sceVideoOutAddFlipEvent(/*SceKernelEqueue eq,*/ int32_t handle, void* udata) { int32_t PS4_SYSV_ABI sceVideoOutAddFlipEvent(/*SceKernelEqueue eq,*/ int32_t handle, void* udata) {
__debugbreak();
return 0; return 0;
} }
int32_t sceVideoOutSetFlipRate(int32_t handle, int32_t rate) { int32_t PS4_SYSV_ABI sceVideoOutSetFlipRate(int32_t handle, int32_t rate) {
__debugbreak();
return 0; return 0;
} }
void sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode, uint32_t aspectRatio, void PS4_SYSV_ABI sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode,
uint32_t aspectRatio,
uint32_t width, uint32_t height, uint32_t pitchInPixel) uint32_t width, uint32_t height, uint32_t pitchInPixel)
{ {
__debugbreak();
} }
int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/) int32_t PS4_SYSV_ABI sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/) {
{ return 0; __debugbreak();
return 0;
} }
@ -50,7 +57,9 @@ namespace HLE::Libs::LibSceVideoOut {
} }
return 0; return 0;
} }
int32_t sceVideoOutIsFlipPending(int32_t handle) { return 0; int32_t PS4_SYSV_ABI sceVideoOutIsFlipPending(int32_t handle) {
__debugbreak();
return 0;
} }
void LibSceVideoOut_Register(SymbolsResolver* sym) void LibSceVideoOut_Register(SymbolsResolver* sym)
{ {

View File

@ -3,18 +3,20 @@
namespace HLE::Libs::LibSceVideoOut { namespace HLE::Libs::LibSceVideoOut {
typedef int32_t SceUserServiceUserId; //TODO move it to proper place using SceUserServiceUserId = s32; //TODO move it to proper place
void LibSceVideoOut_Register(SymbolsResolver* sym); void LibSceVideoOut_Register(SymbolsResolver* sym);
//functions //functions
int32_t sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/); int32_t PS4_SYSV_ABI sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/);
int32_t sceVideoOutSubmitFlip(int32_t handle, int32_t bufferIndex, int32_t flipMode, int64_t flipArg); int32_t PS4_SYSV_ABI sceVideoOutSubmitFlip(int32_t handle, int32_t bufferIndex, int32_t flipMode, int64_t flipArg);
int32_t sceVideoOutRegisterBuffers(int32_t handle, int32_t startIndex, void* const* addresses, int32_t bufferNum /*,const SceVideoOutBufferAttribute* attribute*/); int32_t PS4_SYSV_ABI sceVideoOutRegisterBuffers(int32_t handle, int32_t startIndex, void* const* addresses,
int32_t sceVideoOutAddFlipEvent(/*SceKernelEqueue eq,*/ int32_t handle, void* udata); int32_t bufferNum /*,const SceVideoOutBufferAttribute* attribute*/);
int32_t sceVideoOutSetFlipRate(int32_t handle, int32_t rate); int32_t PS4_SYSV_ABI sceVideoOutAddFlipEvent(/*SceKernelEqueue eq,*/ int32_t handle, void* udata);
void sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode, uint32_t aspectRatio, int32_t PS4_SYSV_ABI sceVideoOutSetFlipRate(int32_t handle, int32_t rate);
void PS4_SYSV_ABI sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode,
uint32_t aspectRatio,
uint32_t width, uint32_t height, uint32_t pitchInPixel); uint32_t width, uint32_t height, uint32_t pitchInPixel);
int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/); int32_t PS4_SYSV_ABI sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/);
int32_t PS4_SYSV_ABI sceVideoOutOpen(SceUserServiceUserId userId, int32_t busType, int32_t index, const void* param); int32_t PS4_SYSV_ABI sceVideoOutOpen(SceUserServiceUserId userId, int32_t busType, int32_t index, const void* param);
int32_t sceVideoOutIsFlipPending(int32_t handle); int32_t PS4_SYSV_ABI sceVideoOutIsFlipPending(int32_t handle);
}; // namespace HLE::Libs::LibSceVideoOut }; // namespace HLE::Libs::LibSceVideoOut