From b4db9fdd698a170df2e188320357af17cda6acf7 Mon Sep 17 00:00:00 2001 From: boykopovar Date: Sat, 12 Sep 2026 18:00:34 +0300 Subject: [PATCH] chore(sceSysmodule): log unknown module id loading --- README.md | 3 ++- core/libs/prx/libSceSysmodule/Export.cpp | 8 ++++++-- core/libs/prx/libc/src/Strings.cpp | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e1d145001..e018a742a 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,9 @@ Releases will be published after the first full successful launch of at least on Execution reaches `_start`, stack unwinding and exception handling tables are built. All unimplemented functions throw std::runtime_error. `what()` is printed to stderr and the process terminates. Shader initialization via `sceAgcCreate*` passes. +Audio output and video output initialization pass -Now: `sceAudioOutInit not implemented`. +Now: `sceNpUniversalDataSystemInitialize not implemented`. On Windows, after printing an unhandled exception the process exits with STATUS_STACK_BUFFER_OVERRUN due to the difficulty of manually [implementing proper exception handling](core/libs/prx/libc/src/exception). diff --git a/core/libs/prx/libSceSysmodule/Export.cpp b/core/libs/prx/libSceSysmodule/Export.cpp index cda247185..9bb667574 100644 --- a/core/libs/prx/libSceSysmodule/Export.cpp +++ b/core/libs/prx/libSceSysmodule/Export.cpp @@ -105,7 +105,9 @@ int APS5_VABI sceSysmoduleIsLoaded(std::uint16_t id) { throw std::runtime_error("sceSysmoduleIsLoaded: invalid id 0"); } if (!findModuleName(id)) { - throw std::runtime_error(std::string("sceSysmoduleIsLoaded: unknown id ") + std::to_string(id)); + APS5_LOG_OUT("unknown id: %u", static_cast(id)); + // throw std::runtime_error(std::string("sceSysmoduleIsLoaded: unknown id ") + std::to_string(id)); + return 0; } std::lock_guard lock(gMutex); auto it = gLoadCount.find(id); @@ -120,7 +122,9 @@ int APS5_VABI sceSysmoduleLoadModule(std::uint16_t id) { throw std::runtime_error("sceSysmoduleLoadModule: invalid id 0"); } if (!findModuleName(id)) { - throw std::runtime_error(std::string("sceSysmoduleLoadModule: unknown id ") + std::to_string(id)); + APS5_LOG_OUT("unknown id: %u", static_cast(id)); + // throw std::runtime_error(std::string("sceSysmoduleLoadModule: unknown id ") + std::to_string(id)); + return 0; } std::lock_guard lock(gMutex); gLoadCount[id]++; diff --git a/core/libs/prx/libc/src/Strings.cpp b/core/libs/prx/libc/src/Strings.cpp index 5bce3e2a2..33801dd8b 100644 --- a/core/libs/prx/libc/src/Strings.cpp +++ b/core/libs/prx/libc/src/Strings.cpp @@ -10,7 +10,7 @@ extern "C" { void* APS5_VABI memset_nid_postfix(void* s, int c, size_t n) { - APS5_LOG_OUT("s=%p c=%d n=%zu", s, c, n); + // APS5_LOG_OUT("s=%p c=%d n=%zu", s, c, n); return std::memset(s, c, n); }