More modules (#99)

* added dummy sceAudio lib

* added lseek in file_system

* updated sdl3

* forgot sdl3 in cmake

* cmake is case sensitive in linux

* fixed SDL_CreateWindowWithPosition

* fixed vulkan issues with latest sdl3

* some progress in sceAudio

* improvements in audio

* more sound improvements

* first working sound output , from openorbis sound demo

* updated sdl3 , zlib-ng can now be build with msvc+clangci

* fixed cmake

* fix for audio buffering

* clang format fix

* format fix

* better error handling for sceAudioOutput
This commit is contained in:
georgemoralis 2024-03-22 18:12:37 +02:00 committed by GitHub
parent 2a03b4d03b
commit 2e931c9f72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 1861 additions and 50 deletions

View file

@ -51,10 +51,34 @@ size_t PS4_SYSV_ABI _readv(int d, const SceKernelIovec* iov, int iovcnt) {
return total_read;
}
s64 PS4_SYSV_ABI lseek(int d, s64 offset, int whence) {
auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance();
auto* file = h->GetFile(d);
file->m_mutex.lock();
if (whence == 1) {
offset = static_cast<int64_t>(file->f.Tell()) + offset;
whence = 0;
}
if (whence == 2) {
offset = static_cast<int64_t>(file->f.GetSize()) + offset;
whence = 0;
}
file->f.Seek(offset);
auto pos = static_cast<int64_t>(file->f.Tell());
file->m_mutex.unlock();
return pos;
}
void fileSystemSymbolsRegister(Loader::SymbolsResolver* sym) {
LIB_FUNCTION("1G3lF1Gg1k8", "libkernel", 1, "libkernel", 1, 1, sceKernelOpen);
LIB_FUNCTION("wuCroIGjt2g", "libScePosix", 1, "libkernel", 1, 1, posix_open);
LIB_FUNCTION("+WRlkKjZvag", "libkernel", 1, "libkernel", 1, 1, _readv);
LIB_FUNCTION("Oy6IpwgtYOk", "libkernel", 1, "libkernel", 1, 1, lseek);
// openOrbis (to check if it is valid out of OpenOrbis
LIB_FUNCTION("6c3rCVE-fTU", "libkernel", 1, "libkernel", 1, 1,

View file

@ -19,6 +19,7 @@ struct SceKernelIovec {
int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, /* SceKernelMode*/ u16 mode);
int PS4_SYSV_ABI posix_open(const char* path, int flags, /* SceKernelMode*/ u16 mode);
s64 PS4_SYSV_ABI lseek(int d, s64 offset, int whence);
void fileSystemSymbolsRegister(Loader::SymbolsResolver* sym);

View file

@ -7,6 +7,7 @@
#include "core/hle/libraries/libpad/pad.h"
#include "core/hle/libraries/libs.h"
#include "core/hle/libraries/libscegnmdriver/libscegnmdriver.h"
#include "src/core/libraries/libsceaudioout.h"
#include "src/core/libraries/libscecommondialog.h"
#include "src/core/libraries/libscemsgdialog.h"
#include "src/core/libraries/libscesystemservice.h"
@ -26,6 +27,7 @@ void InitHLELibs(Core::Loader::SymbolsResolver* sym) {
Libraries::SystemService::RegisterlibSceSystemService(sym);
Libraries::CommonDialog::RegisterlibSceCommonDialog(sym);
Libraries::MsgDialog::RegisterlibSceMsgDialog(sym);
Libraries::AudioOut::RegisterlibSceAudioOut(sym);
}
} // namespace OldLibraries