From 1f52d89dd4f9c2455020fcea4a4094251d43a9f3 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Tue, 10 Oct 2023 09:22:18 +0300 Subject: [PATCH] some more functions definations for openorbis graphics demo --- src/Core/PS4/HLE/Graphics/video_out.cpp | 11 +++++++++++ src/Core/PS4/HLE/LibKernel.cpp | 14 ++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/Core/PS4/HLE/Graphics/video_out.cpp b/src/Core/PS4/HLE/Graphics/video_out.cpp index 95b2957ce..4e3754db0 100644 --- a/src/Core/PS4/HLE/Graphics/video_out.cpp +++ b/src/Core/PS4/HLE/Graphics/video_out.cpp @@ -303,5 +303,16 @@ void videoOutRegisterLib(SymbolsResolver* sym) { LIB_FUNCTION("6kPnj51T62Y", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, sceVideoOutGetResolutionStatus); LIB_FUNCTION("Up36PTk687E", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, sceVideoOutOpen); LIB_FUNCTION("zgXifHT9ErY", "libSceVideoOut", 1, "libSceVideoOut", 0, 0, sceVideoOutIsFlipPending); + + //openOrbis appears to have libSceVideoOut_v1 module libSceVideoOut_v1.1 + LIB_FUNCTION("Up36PTk687E", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutOpen); + LIB_FUNCTION("CBiu4mCE1DA", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutSetFlipRate); + LIB_FUNCTION("HXzjK9yI30k", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutAddFlipEvent); + LIB_FUNCTION("i6-sR91Wt-4", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutSetBufferAttribute); + LIB_FUNCTION("w3BY+tAEiQY", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutRegisterBuffers); + LIB_FUNCTION("U46NwOiJpys", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutSubmitFlip); + LIB_FUNCTION("SbU3dwp80lQ", "libSceVideoOut", 1, "libSceVideoOut", 1, 1, sceVideoOutGetFlipStatus); + + } } // namespace HLE::Libs::Graphics::VideoOut \ No newline at end of file diff --git a/src/Core/PS4/HLE/LibKernel.cpp b/src/Core/PS4/HLE/LibKernel.cpp index acee1ed19..7f25895ad 100644 --- a/src/Core/PS4/HLE/LibKernel.cpp +++ b/src/Core/PS4/HLE/LibKernel.cpp @@ -117,6 +117,11 @@ int PS4_SYSV_ABI pthread_key_create(ThreadManagement::ScePthreadKey* key, Thread } PS4_SYSV_ABI void pthread_cond_signal() { BREAKPOINT(); } +PS4_SYSV_ABI void _open() { BREAKPOINT(); } +PS4_SYSV_ABI void _fcntl() { BREAKPOINT(); } +PS4_SYSV_ABI void _readv() { BREAKPOINT(); } +PS4_SYSV_ABI void _read() { BREAKPOINT(); } + }; // namespace POSIX PS4_SYSV_ABI void poll() { BREAKPOINT(); } @@ -125,10 +130,9 @@ PS4_SYSV_ABI void munmap() { BREAKPOINT(); } PS4_SYSV_ABI void sceKernelUsleep(unsigned int microseconds) { std::this_thread::sleep_for(std::chrono::microseconds(microseconds)); - //BREAKPOINT(); + // BREAKPOINT(); } - #define PROT_READ 0x1 #define PROT_WRITE 0x2 @@ -174,8 +178,6 @@ PS4_SYSV_ABI void* mmap(void* addr, u64 len, int prot, int flags, int fd, u64 of PS4_SYSV_ABI void close() { BREAKPOINT(); } - - PS4_SYSV_ABI void madvise() { BREAKPOINT(); } struct iovec { void* iov_base; /* Base address. */ @@ -270,6 +272,10 @@ void LibKernel_Register(SymbolsResolver* sym) { LIB_FUNCTION("0t0-MxQNwK4", "libkernel", 1, "libkernel", 1, 1, raise); LIB_FUNCTION("2MOy+rUfuhQ", "libkernel", 1, "libkernel", 1, 1, POSIX::pthread_cond_signal); LIB_FUNCTION("wW+k21cmbwQ", "libkernel", 1, "libkernel", 1, 1, _ioctl); + LIB_FUNCTION("6c3rCVE-fTU", "libkernel", 1, "libkernel", 1, 1, POSIX::_open); + LIB_FUNCTION("t0fXUzq61Z4", "libkernel", 1, "libkernel", 1, 1, POSIX::_fcntl); + LIB_FUNCTION("+WRlkKjZvag", "libkernel", 1, "libkernel", 1, 1, POSIX::_readv); + LIB_FUNCTION("DRuBt2pvICk", "libkernel", 1, "libkernel", 1, 1, POSIX::_read); } }; // namespace HLE::Libs::LibKernel \ No newline at end of file