mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-18 23:07:07 -05:00
feat(libSceLoginService): let PPSA34015 load without a missing module
FC 27 stops on Windows with Failed to load module / error 126 because this PRX is absent. Export Initialize and Terminate as no-ops and keep RequestDevices throwing until the buffer layout is known. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ec1193dc39
commit
7e29ba6fba
4 files changed
+76
No files matched your search
@@ -0,0 +1,15 @@
|
||||
add_library(libSceLoginService SHARED EXCLUDE_FROM_ALL Export.cpp)
|
||||
target_include_directories(libSceLoginService PRIVATE ${LIBS_INCLUDE_DIR})
|
||||
configure_windows_unwind(libSceLoginService)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_test_executable(guest_login_service_tests ${LIBS_INCLUDE_DIR}/tests/GuestLoginService.cpp)
|
||||
target_include_directories(guest_login_service_tests PRIVATE ${LIBS_INCLUDE_DIR})
|
||||
target_link_libraries(guest_login_service_tests PRIVATE libSceLoginService libc)
|
||||
configure_windows_unwind(guest_login_service_tests)
|
||||
add_test(NAME guest_login_service COMMAND guest_login_service_tests)
|
||||
if(WIN32)
|
||||
set_tests_properties(guest_login_service PROPERTIES ENVIRONMENT_MODIFICATION
|
||||
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libSceLoginService>")
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,21 @@
|
||||
#include <cstdint>
|
||||
#include "SceTypes.hpp"
|
||||
#include "prx/libc/include/General.hpp"
|
||||
|
||||
extern "C" {
|
||||
|
||||
int APS5_VABI sceLoginServiceInitialize(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int APS5_VABI sceLoginServiceTerminate(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int APS5_VABI sceLoginServiceRequestDevices(void* param) {
|
||||
(void)param;
|
||||
NotImplemented_nid_no_patch(__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
#include "prx/libc/include/general/VabiMacros.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
extern "C" {
|
||||
int APS5_VABI sceLoginServiceInitialize(void);
|
||||
int APS5_VABI sceLoginServiceTerminate(void);
|
||||
int APS5_VABI sceLoginServiceRequestDevices(void* param);
|
||||
}
|
||||
|
||||
static void Require(bool value) {
|
||||
if (!value) std::abort();
|
||||
}
|
||||
|
||||
int main() {
|
||||
Require(sceLoginServiceInitialize() == 0);
|
||||
Require(sceLoginServiceTerminate() == 0);
|
||||
unsigned char buffer[0x80]{};
|
||||
try {
|
||||
sceLoginServiceRequestDevices(buffer);
|
||||
} catch (const std::runtime_error& error) {
|
||||
if (std::string(error.what()) == "sceLoginServiceRequestDevices not implemented") return 0;
|
||||
std::fprintf(stderr, "sceLoginServiceRequestDevices threw: %s\n", error.what());
|
||||
return 1;
|
||||
}
|
||||
std::fprintf(stderr, "sceLoginServiceRequestDevices returned instead of reporting that it is not implemented\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# libSceLoginService technical debt
|
||||
|
||||
### Silent stubs
|
||||
|
||||
- [sceLoginServiceInitialize, sceLoginServiceTerminate](../../../core/libs/prx/libSceLoginService/Export.cpp) (libSceLoginService) - return success and keep no login-service state: AnyPS5 has no PSN login service. EA SPORTS FC 27 (PPSA34015) loads the module with `sceSysmoduleLoadModule(0xe3)` and calls `sceLoginServiceInitialize` with no arguments; a missing `libSceLoginService.prx` stops Windows start-up with `Failed to load module` / `GetLastError: 126`
|
||||
|
||||
### Unknown function info
|
||||
|
||||
- [sceLoginServiceRequestDevices](../../../core/libs/prx/libSceLoginService/Export.cpp) (libSceLoginService) - PPSA34015 passes one pointer to a stack buffer (`lea rdi, [rbp-0x80]`) then calls `sceLoginServiceTerminate`. The buffer layout, other arguments and console errors are unknown, so every call throws without reading or writing caller memory
|
||||
Reference in new issue
Block a user