feat(libSceSysmodule): implement sceSysmoduleGetModuleHandleInternal #3050
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3050"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by TheAggie on 2026-10-10T21:14:16Z.
What
sceSysmoduleGetModuleHandleInternal(D8cuU4d72xM) isn't exported. Prospero Win (PPSA99995) stops on it at start-up onmain:The title loads
libSceKeyboard(0x106) andlibSceMouse(0xa9) withsceSysmoduleLoadModule. It then asks for each module's handle and resolves the functions it needs withsceKernelDlsym(native/pw_hid_ps5.c). If the plain id isn't loaded, it retries with the internal form0x80000000 | id.sceSysmoduleGetModuleHandleInternal(id, handle):sceKernelDlsymaccepts, and returns 0.SCE_SYSMODULE_ERROR_UNLOADED.handlethrow, as id 0 does in the other functions here.How the handle is made:
sceKernelDlsymonly accepts handles from libkernel's module registry.dlopenresolves its path as a guest path, so a barelibSceMouse.prxwould be looked up in the title's own directory. The new libkernel-internalHostLibraryHandle_nid_no_patchinstead opens the named host library from the directory libkernel was loaded from, and registers it asdlopendoes.libSceSysmodulenow linkslibkernel.Test (
guest_sysmodule):sceSysmoduleLoadModule, the same one on a second call, andsceKernelDlsym(handle, "sceMouseInit")resolves;SCE_SYSMODULE_ERROR_UNLOADED;sceSysmoduleUnloadModule, the call returnsSCE_SYSMODULE_ERROR_UNLOADEDagain.Tested
mainb8a083b2it stops atD8cuU4d72xM. With this PR it starts, reads itsdev.confand opens/app0/lapy.elf, then exits with code 1. That exit is by design: it sendslapy.elfto elfldr on port 9021, a jailbreak service, and per its getting-started guide it returns to Home when that's unavailable.guest|kernel|module|sysmodule|relinkertests: 240 passed, 1 skipped, 1 failed. The failure isguest_memory, which fails the same way onmainhere (CheckGuestModuleImageProtection'sdlopen).tools/check_conventions.pypasses.HostLibraryHandle_nid_no_patch(dladdranddlopen) is not tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T21:14:39Z.
Progress report (
262c031→73633dd)➖ System libraries: 84.44% (+0.0%, +1 implemented functions)
✅ 1 implemented
sceSysmoduleGetModuleHandleInternalImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T21:27:18Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/tests/GuestSysmodule.cppL18-19, L39core/libs/prx/libSceSysmodule/CMakeLists.txtL8-9core/libs/prx/libSceSysmodule/Export.cppL29core/libs/tests/GuestSysmodule.cppL10, L39sceSysmoduleGetModuleHandleInternalImported from boykopovar/AnyPS5. Originally posted by TheAggie on 2026-10-10T22:01:34Z.
Closing as a duplicate of #3041, which came first and implements the same function (Windows test notes there). AI-assisted (Claude Code).
Pull request closed