From 28aad0a5dc67ab9e42ed21e8c454fde98fa13b4a Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Fri, 21 Jul 2023 08:03:36 +0300 Subject: [PATCH 1/4] Added sysv_abi , now parameters in sceVideoOutOpen is correct --- CMakeSettings.json | 61 +++++++++++++++++------------ src/Core/PS4/HLE/LibC.cpp | 4 +- src/Core/PS4/HLE/LibC.h | 4 +- src/Core/PS4/HLE/LibSceVideoOut.cpp | 2 +- src/Core/PS4/HLE/LibSceVideoOut.h | 2 +- src/Core/PS4/Linker.cpp | 8 ++-- src/types.h | 4 +- 7 files changed, 49 insertions(+), 36 deletions(-) diff --git a/CMakeSettings.json b/CMakeSettings.json index 207648b5..2095ca9e 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -1,27 +1,38 @@ { - "configurations": [ - { - "name": "x64-Debug", - "generator": "Ninja", - "configurationType": "Debug", - "inheritEnvironments": [ "msvc_x64_x64" ], - "buildRoot": "${projectDir}\\out\\build\\${name}", - "installRoot": "${projectDir}\\out\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "", - "ctestCommandArgs": "" - }, - { - "name": "x64-Release", - "generator": "Ninja", - "configurationType": "Release", - "buildRoot": "${projectDir}\\out\\build\\${name}", - "installRoot": "${projectDir}\\out\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "", - "ctestCommandArgs": "", - "inheritEnvironments": [ "msvc_x64_x64" ], - "variables": [] - } - ] + "configurations": [ + { + "name": "x64-Debug", + "generator": "Ninja", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "" + }, + { + "name": "x64-Release", + "generator": "Ninja", + "configurationType": "Release", + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "msvc_x64_x64" ] + }, + { + "name": "x64-Clang-Debug", + "generator": "Ninja", + "configurationType": "Debug", + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "clang_cl_x64_x64" ], + "variables": [] + } + ] } \ No newline at end of file diff --git a/src/Core/PS4/HLE/LibC.cpp b/src/Core/PS4/HLE/LibC.cpp index e39dc278..d482a0ee 100644 --- a/src/Core/PS4/HLE/LibC.cpp +++ b/src/Core/PS4/HLE/LibC.cpp @@ -6,7 +6,7 @@ namespace HLE::Libs::LibC { static u32 g_need_sceLibc = 1; - static void init_env() //every game/demo should probably + static PS4_SYSV_ABI void init_env() // every game/demo should probably { //dummy no need atm } @@ -35,7 +35,7 @@ namespace HLE::Libs::LibC { { } - static int atexit(void (*func)()) + static PS4_SYSV_ABI int atexit(void (*func)()) { int rt = ::atexit(func); if (rt != 0) diff --git a/src/Core/PS4/HLE/LibC.h b/src/Core/PS4/HLE/LibC.h index 241a785c..bc0913a3 100644 --- a/src/Core/PS4/HLE/LibC.h +++ b/src/Core/PS4/HLE/LibC.h @@ -5,8 +5,8 @@ namespace HLE::Libs::LibC { void LibC_Register(SymbolsResolver* sym); //functions - static void init_env(); - static void exit(int code); + static PS4_SYSV_ABI void init_env(); + static PS4_SYSV_ABI void exit(int code); static void catchReturnFromMain(int status); int __cxa_guard_acquire(u64* guard_object); int memcmp(const void* s1, const void* s2, size_t n); diff --git a/src/Core/PS4/HLE/LibSceVideoOut.cpp b/src/Core/PS4/HLE/LibSceVideoOut.cpp index 419059db..f98426af 100644 --- a/src/Core/PS4/HLE/LibSceVideoOut.cpp +++ b/src/Core/PS4/HLE/LibSceVideoOut.cpp @@ -31,7 +31,7 @@ namespace HLE::Libs::LibSceVideoOut { } - int32_t 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) { if (busType != 0) { diff --git a/src/Core/PS4/HLE/LibSceVideoOut.h b/src/Core/PS4/HLE/LibSceVideoOut.h index 672184ab..688c55ba 100644 --- a/src/Core/PS4/HLE/LibSceVideoOut.h +++ b/src/Core/PS4/HLE/LibSceVideoOut.h @@ -15,6 +15,6 @@ int32_t sceVideoOutSetFlipRate(int32_t handle, int32_t rate); void sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode, uint32_t aspectRatio, uint32_t width, uint32_t height, uint32_t pitchInPixel); int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/); -int32_t 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); }; // namespace HLE::Libs::LibSceVideoOut \ No newline at end of file diff --git a/src/Core/PS4/Linker.cpp b/src/Core/PS4/Linker.cpp index f9f27fff..8ed91844 100644 --- a/src/Core/PS4/Linker.cpp +++ b/src/Core/PS4/Linker.cpp @@ -631,15 +631,15 @@ void Linker::Resolve(const std::string& name, int Symtype, Module* m, SymbolReco } -using exit_func_t = void (*)(); -using entry_func_t = void (*)(EntryParams* params, exit_func_t atexit_func); +using exit_func_t = PS4_SYSV_ABI void (*)(); +using entry_func_t = PS4_SYSV_ABI void (*)(EntryParams* params, exit_func_t atexit_func); -static void ProgramExitFunc() { +static PS4_SYSV_ABI void ProgramExitFunc() { printf("exit function called\n"); } -static void run_main_entry(u64 addr, EntryParams* params, exit_func_t exit_func) { +static PS4_SYSV_ABI void run_main_entry(u64 addr, EntryParams* params, exit_func_t exit_func) { reinterpret_cast(addr)(params, exit_func); } diff --git a/src/types.h b/src/types.h index 64a05f85..d749b8f1 100644 --- a/src/types.h +++ b/src/types.h @@ -11,4 +11,6 @@ using u32 = unsigned int; using u64 = unsigned long long; using f32 = float; -using f64 = double; \ No newline at end of file +using f64 = double; + +#define PS4_SYSV_ABI __attribute__((sysv_abi)) \ No newline at end of file From f1ab57902297a06f2aafed0b3c00c92707883042 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Fri, 21 Jul 2023 11:05:31 +0300 Subject: [PATCH 2/4] Create building-windows.md vstudio 2002 instructions --- documents/building-windows.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 documents/building-windows.md diff --git a/documents/building-windows.md b/documents/building-windows.md new file mode 100644 index 00000000..b4cb6d46 --- /dev/null +++ b/documents/building-windows.md @@ -0,0 +1,26 @@ +# How to build shadps4 in windows + +## Download VStudio Community 2022 17.7 + +Atm it is on preview stage but there seems to be issues using clang + cmake + ninja in the current vstudio (17.6.5 ) +[vstudio 17.6.5 bug](https://developercommunity.visualstudio.com/t/cmake-generates-bad-dependencies-for-rc/10398924?q=cmake%20dependencies) + +So here is the link for vstudio 2020 17.7 preview (atm it is in preview 4) + + +[vstudio 17.7 preview](https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes-preview) + +## Requirements + +Install the following + +- Desktop development with c++ + +### From Individual components tab install + +- C++ Clang Compiler for Windows (16.0.5) +- MSBuild support for LLVM (clang-cl) toolset + +- ## Compiling + +- Open vstudio and select the clang debug or clang release . It should compile just fine From bb40fa9d659003338af45e67d84d48a19943917c Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Fri, 21 Jul 2023 11:24:19 +0300 Subject: [PATCH 3/4] added clang configurations , removed buggy MSVC ones --- CMakeSettings.json | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/CMakeSettings.json b/CMakeSettings.json index 2095ca9e..11416875 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -1,27 +1,5 @@ { "configurations": [ - { - "name": "x64-Debug", - "generator": "Ninja", - "configurationType": "Debug", - "inheritEnvironments": [ "msvc_x64_x64" ], - "buildRoot": "${projectDir}\\out\\build\\${name}", - "installRoot": "${projectDir}\\out\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "", - "ctestCommandArgs": "" - }, - { - "name": "x64-Release", - "generator": "Ninja", - "configurationType": "Release", - "buildRoot": "${projectDir}\\out\\build\\${name}", - "installRoot": "${projectDir}\\out\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "", - "ctestCommandArgs": "", - "inheritEnvironments": [ "msvc_x64_x64" ] - }, { "name": "x64-Clang-Debug", "generator": "Ninja", @@ -31,8 +9,18 @@ "cmakeCommandArgs": "", "buildCommandArgs": "", "ctestCommandArgs": "", - "inheritEnvironments": [ "clang_cl_x64_x64" ], - "variables": [] + "inheritEnvironments": [ "clang_cl_x64_x64" ] + }, + { + "name": "x64-Clang-Release", + "generator": "Ninja", + "configurationType": "RelWithDebInfo", + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "", + "inheritEnvironments": [ "clang_cl_x64_x64" ] } ] } \ No newline at end of file From 5706e1be1b5bdb7f422fa94c41671e15973f7f3d Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Fri, 21 Jul 2023 14:52:40 +0300 Subject: [PATCH 4/4] added more PS4_SYSV_ABI codes --- src/Core/PS4/HLE/LibC.cpp | 26 +++++++++-------- src/Core/PS4/HLE/LibC.h | 10 ++++--- src/Core/PS4/HLE/LibKernel.cpp | 37 +++++++++++++++++------- src/Core/PS4/HLE/LibKernel.h | 15 +++++----- src/Core/PS4/HLE/LibSceVideoOut.cpp | 45 +++++++++++++++++------------ src/Core/PS4/HLE/LibSceVideoOut.h | 20 +++++++------ 6 files changed, 92 insertions(+), 61 deletions(-) diff --git a/src/Core/PS4/HLE/LibC.cpp b/src/Core/PS4/HLE/LibC.cpp index d482a0ee..49e9e586 100644 --- a/src/Core/PS4/HLE/LibC.cpp +++ b/src/Core/PS4/HLE/LibC.cpp @@ -11,29 +11,31 @@ namespace HLE::Libs::LibC { //dummy no need atm } - int __cxa_guard_acquire(u64* guard_object) - { return 0; + int PS4_SYSV_ABI __cxa_guard_acquire(u64* guard_object) + { + __debugbreak(); + return 0; } - int __cxa_guard_release(u64* guard_object) - { return 0; + int PS4_SYSV_ABI __cxa_guard_release(u64* guard_object) + { + __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); } - 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); } - 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)()) { diff --git a/src/Core/PS4/HLE/LibC.h b/src/Core/PS4/HLE/LibC.h index bc0913a3..3d76b337 100644 --- a/src/Core/PS4/HLE/LibC.h +++ b/src/Core/PS4/HLE/LibC.h @@ -4,11 +4,13 @@ namespace HLE::Libs::LibC { void LibC_Register(SymbolsResolver* sym); + //functions static PS4_SYSV_ABI void init_env(); static PS4_SYSV_ABI void exit(int code); - static void catchReturnFromMain(int status); - int __cxa_guard_acquire(u64* guard_object); - int memcmp(const void* s1, const void* s2, size_t n); - void* memcpy(void* dest, const void* src, size_t n); + static PS4_SYSV_ABI void catchReturnFromMain(int status); + int PS4_SYSV_ABI __cxa_guard_acquire(u64* guard_object); + int PS4_SYSV_ABI memcmp(const void* s1, const void* s2, size_t n); + void* PS4_SYSV_ABI memcpy(void* dest, const void* src, size_t n); + }; \ No newline at end of file diff --git a/src/Core/PS4/HLE/LibKernel.cpp b/src/Core/PS4/HLE/LibKernel.cpp index 0bb77997..379eeeb0 100644 --- a/src/Core/PS4/HLE/LibKernel.cpp +++ b/src/Core/PS4/HLE/LibKernel.cpp @@ -6,26 +6,41 @@ namespace HLE::Libs::LibKernel { 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) - { return 0; + int PS4_SYSV_ABI sceKernelCreateEqueue(/* SceKernelEqueue* eq*/ int eq, const char* name) + { + __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() - { return 0; + int PS4_SYSV_ABI sceKernelIsNeoMode() + { + __debugbreak(); + return 0; } - static void stack_chk_fail() { - + static PS4_SYSV_ABI void stack_chk_fail() { __debugbreak(); } void LibKernel_Register(SymbolsResolver* sym) { //obj diff --git a/src/Core/PS4/HLE/LibKernel.h b/src/Core/PS4/HLE/LibKernel.h index fa6efff9..5542400b 100644 --- a/src/Core/PS4/HLE/LibKernel.h +++ b/src/Core/PS4/HLE/LibKernel.h @@ -3,12 +3,13 @@ namespace HLE::Libs::LibKernel { void LibKernel_Register(SymbolsResolver* sym); + // functions -int sceKernelAllocateDirectMemory(off_t searchStart, off_t searchEnd, size_t len, size_t alignment, int memoryType, off_t* physAddrOut); -size_t sceKernelGetDirectMemorySize(); -int 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 sceKernelReleaseDirectMemory(off_t start, size_t len); -int sceKernelIsNeoMode(); -int sceKernelWaitEqueue(/*SceKernelEqueue eq, SceKernelEvent* ev,*/ int num, int* out /*, SceKernelUseconds* timo*/); +int PS4_SYSV_ABI sceKernelAllocateDirectMemory(off_t searchStart, off_t searchEnd, size_t len, size_t alignment, int memoryType, off_t* physAddrOut); +size_t PS4_SYSV_ABI sceKernelGetDirectMemorySize(); +int PS4_SYSV_ABI sceKernelCreateEqueue(/* SceKernelEqueue* eq*/ int eq, const char* name); +int32_t PS4_SYSV_ABI sceKernelMapDirectMemory(void** addr, size_t len, int prot, int flags, off_t directMemoryStart, size_t alignment); +int32_t PS4_SYSV_ABI sceKernelReleaseDirectMemory(off_t start, size_t len); +int PS4_SYSV_ABI sceKernelIsNeoMode(); +int PS4_SYSV_ABI sceKernelWaitEqueue(/*SceKernelEqueue eq, SceKernelEvent* ev,*/ int num, int* out /*, SceKernelUseconds* timo*/); }; // namespace HLE::Libs::LibKernel \ No newline at end of file diff --git a/src/Core/PS4/HLE/LibSceVideoOut.cpp b/src/Core/PS4/HLE/LibSceVideoOut.cpp index f98426af..ff05a3b4 100644 --- a/src/Core/PS4/HLE/LibSceVideoOut.cpp +++ b/src/Core/PS4/HLE/LibSceVideoOut.cpp @@ -4,30 +4,37 @@ namespace HLE::Libs::LibSceVideoOut { - int32_t sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/){ - return 0; - } - - int32_t sceVideoOutSubmitFlip(int32_t handle, int32_t bufferIndex, int32_t flipMode,int64_t flipArg){ - return 0; - } - int32_t sceVideoOutRegisterBuffers(int32_t handle, int32_t startIndex, void* const* addresses, int32_t bufferNum /*, - const SceVideoOutBufferAttribute* attribute*/) { + int32_t PS4_SYSV_ABI sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/) { + __debugbreak(); return 0; } - int32_t sceVideoOutAddFlipEvent(/*SceKernelEqueue eq,*/ int32_t handle, void* udata) { - return 0; + + int32_t PS4_SYSV_ABI sceVideoOutSubmitFlip(int32_t handle, int32_t bufferIndex, int32_t flipMode, int64_t flipArg) { + __debugbreak(); + return 0; } - int32_t sceVideoOutSetFlipRate(int32_t handle, int32_t rate) { - return 0; + int32_t PS4_SYSV_ABI sceVideoOutRegisterBuffers(int32_t handle, int32_t startIndex, void* const* addresses, int32_t bufferNum /*, + const SceVideoOutBufferAttribute* attribute*/) { + __debugbreak(); + return 0; } - void sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode, uint32_t aspectRatio, + int32_t PS4_SYSV_ABI sceVideoOutAddFlipEvent(/*SceKernelEqueue eq,*/ int32_t handle, void* udata) { + __debugbreak(); + return 0; + } + int32_t PS4_SYSV_ABI sceVideoOutSetFlipRate(int32_t handle, int32_t rate) { + __debugbreak(); + return 0; + } + 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) { - + __debugbreak(); } - int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/) - { return 0; + int32_t PS4_SYSV_ABI sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/) { + __debugbreak(); + return 0; } @@ -50,7 +57,9 @@ namespace HLE::Libs::LibSceVideoOut { } 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) { diff --git a/src/Core/PS4/HLE/LibSceVideoOut.h b/src/Core/PS4/HLE/LibSceVideoOut.h index 688c55ba..7d8d644d 100644 --- a/src/Core/PS4/HLE/LibSceVideoOut.h +++ b/src/Core/PS4/HLE/LibSceVideoOut.h @@ -3,18 +3,20 @@ 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); //functions -int32_t sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/); -int32_t 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 sceVideoOutAddFlipEvent(/*SceKernelEqueue eq,*/ int32_t handle, void* udata); -int32_t sceVideoOutSetFlipRate(int32_t handle, int32_t rate); -void sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode, uint32_t aspectRatio, +int32_t PS4_SYSV_ABI sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/); +int32_t PS4_SYSV_ABI sceVideoOutSubmitFlip(int32_t handle, int32_t bufferIndex, int32_t flipMode, int64_t flipArg); +int32_t PS4_SYSV_ABI sceVideoOutRegisterBuffers(int32_t handle, int32_t startIndex, void* const* addresses, + int32_t bufferNum /*,const SceVideoOutBufferAttribute* attribute*/); +int32_t PS4_SYSV_ABI sceVideoOutAddFlipEvent(/*SceKernelEqueue eq,*/ int32_t handle, void* udata); +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); -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 sceVideoOutIsFlipPending(int32_t handle); +int32_t PS4_SYSV_ABI sceVideoOutIsFlipPending(int32_t handle); }; // namespace HLE::Libs::LibSceVideoOut \ No newline at end of file