mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-06 09:31:58 +00:00
The library is the PS5 custom-music application's import wrapper: #13181 declared 101 of its exports and Api.hpp carries six more, and on main all 107 are parameterless int declarations that throw NotImplemented_nid_no_patch, so the library ships no live body at all. The 54 exports the import table gives a name for now carry the parameter lists and return types of the callees they map to inside this repository and are one-line pass-throughs, following the merged sister library libSceSpSysCallWrapper, whose forwarding this project already ships live. Where a callee returns something other than int the wrapper copies the callee, as the sister does with int* sceSpNetErrnoLoc: int* sceCustomMusicNetErrnoLoc, const char* sceCustomMusicNetInetNtop, std::int64_t sceCustomMusicNetRecv and sceCustomMusicNetSend. sceCustomMusicSelect forwards to select_nid_postfix exactly as sceSpSelect does. The 53 Unknown_* NID placeholders, whose names no inventory gives, keep the parameterless throw, so no named export of this library is left unimplemented. The library gains a CMakeLists.txt of its own because the fallback add_library in core/libs/CMakeLists.txt links only libkernel and libc: a pass-through needs its callee's import library on the link line, and without libSceNet, libSceNetCtl, libSceAudiodec and libSceAudiodecCpu the Windows link of libSceCustomMusicSysCallWrapper.prx fails with undefined references to exactly those callees, which the Linux shared link tolerates. The fidelity test is registered there next to the library, as the sister library registers its own. That test pins forwarding rather than non-crash over 19 of the 54 forwarders: wrapper and callee are called on identical arguments and RequireSameOutcome fails unless both throw or both return equally, the pointer-returning forwarders are compared by value (sceCustomMusicNetInetNtop has to hand back the callee's string and its nullptr failures, sceCustomMusicNetErrnoLoc the callee's own slot), and wrapper-level behaviour is not claimed: if the PS5 wrapper validated arguments or interposed instead of delegating, that is missing here, and the debt file records that as unmeasured on a console.