Repository navigation
feat(libs): Deathloop loading support (Ampr, NetCtlApDialog + stubs) - #407
Conversation
2594b2a to
6428d6b
Compare
Progress report (ae3d5f9 → 998016e)📉 System libraries: 83.35% (-1.34%, +49 declared functions) 🆕 49 declared as stubs
|
|
Thanks for the Deathloop work. Before review this needs a few changes: no comments in code (libc/Export.cpp), generic names instead of title names (libcDeathUnknown00 to 02), and the Party module looks like the game's own sys_module (the description says it is bundled as sys_module/Party.prx and nothing imports it), so I don't think it should be reimplemented here. The PR says the unknown NIDs are in TechnicalDebt, but the diff doesn't touch it. Splitting by library would also make it reviewable. Note 0hlfW1O4Aa4 is also claimed by #338 for libc. |
6428d6b to
0e8990c
Compare
|
Done: comments removed from libc/Export.cpp, the three unknowns renamed to generic libcUnknown_ names, Party module removed (game sys_module, zero imports), rebased on current main, full build + 179/179 ctest green. Two notes: 0hlfW1O4Aa4 stays in Ampr — Deathloop imports it from libSceAmpr (IMPORT_LIB index 48, verified from the ELF dynamic section), and I removed the same NID from #338's libc. On TechnicalDebt: the merged #358 had its bulk unknown-NID lines stripped upstream, so I did not add a new bulk list; all stubs throw with per-library mapping in the description. Happy to split by library on request. |
|
Follow-up note: I checked all 36 Ampr unknowns against the public PS5 NID database (zecoxao/sce_symbols aerolib.csv, verified by recomputing 8/8 NIDs locally). They are almost all C/C++ runtime re-exports (localeconv, strtok_s, wcscpy_s, ctime_s, mbstowcs, asctime_s, Thrd, Cnd, num_get/time_get facets, __udivti3, etc.). Same for most NpCppWebApi unknowns (dtors/getters with full mangled names). I'll do a rename + forwarder follow-up PR once this one lands, to avoid conflicts. |
|
Thanks for the changes and for the NID database check. Since the names are known now, I'd rather they go in under those names here than land as Unknown and get renamed in a follow-up. Of the 184 raw NIDs in this PR, 106 give their NID back exactly when I recompute it from the name (for example P41kTWUS3EI = scePthreadGetschedparam, oIRFTjoILbg = scePthreadSetschedparam, tQNolUV1q5A = swscanf_s). Doing the rename here also clears two clashes:
The CONTRIBUTING rule for the NIDs that stay unknown still asks for TechnicalDebt entries; @boykopovar, is it fine to skip them for bulk loader stubs like these, as #358 did? Splitting by library would still make it much easier to review. |
|
Reworked per review, using hash-verified renames (every new name recomputes to its NID; my DB now pins a commit and always verifies): 151 stubs now carry their real names as plain exports without APS5_EXPORT (two that collide with host CRT declarations use the _nid_postfix form). Dropped: the 12 Ampr NIDs that #545 implements (they'll come back there with real bodies), sceNetHtonll/sceNetNtohll (merged #302 owns them), and the two Vrr NIDs from WebBrowserDialog (#518 owns them). The 17 NIDs with no database hit stay Unknown with TechnicalDebt lines. Clean libs build (nid_patcher resolves every rename, no duplicates) and 183/183 ctest green. On splitting: this is now 11 small per-file groups of mechanical renames; happy to split into per-library PRs if you'd still prefer that. |
|
Rebased onto current main (this should also restart CI, which never ran for the previous push). Two adjustments from the rebase: my sceHttpGetLastErrno/sceHttpCreateRequest2 throwing stubs are gone in favour of #555's real implementations that landed on main (same NIDs), keeping only ParseStatusLine/AbortWaitRequest from that group; and the Net file is back to main since merged #302 owns those NIDs now. libs builds clean and full ctest (221) passes locally. |
ec56c00 to
6063c9c
Compare
|
Linux failure root-caused and fixed: the renamed C++ runtime names (_ZTV*, methods, _Lock/_Unlock_shared_ptr_spin_lock, __cxa_call_unexpected, _Thrd/_Cnd/_Pad and friends) were exported plain, so on Linux they interposed the real libstdc++ symbols for every process linking libSceAmpr — only guest_ampr_markers and guest_crt link it, which matches the two failures exactly. They are now exported in _nid_postfix form (same NIDs, no host-visible collision), like the earlier wcstombs_s/swscanf_s cases. Verified locally with a clean libs build. |
22e3335 to
fd3b24e
Compare
|
Thanks for the renames. I checked them all: every new name recomputes to one of the NIDs the previous head exported, nothing new was added, and the only NIDs dropped are the ones you listed (the 12 Ampr functions, The Linux CI job fails on this head, though, and I think the renames cause it:
I see the same here: main plus this PR alone makes One overlap: With the eight names changed and CI green, it's ready to merge from my side. #545 carries this commit, so it will pick up the fix on its next rebase. |
adriadam10
left a comment
There was a problem hiding this comment.
This conflicts with main in six files again, and some of the conflicts mean dropping code, not just resolving context:
core/libs/prx/libSceNpCppWebApi/Export.cpp(+565): #676 removed this module frommain(titles ship their ownlibSceNpCppWebApi.prx), as @oneandonlydean noted. Please drop the file from the branch.core/libs/prx/libSceJson2/Export.cpp: #369 has merged and definessce::Json::Initializer::initializeandInitParameter2::setFileBufferSize. Drop those two and keep only the NIDsmaindoesn't export.core/libs/prx/libSceHttp/Export.cpp:sceHttpParseStatusLineis now implemented onmain(libSceHttp/src/Parse.cpp), so the stub has to go.libSceNpEntitlementAccess,libSceNpManager: content conflicts with later merges. After the rebase, check that none of your stubs share a NID with somethingmainnow implements.docs/dev/TechnicalDebt.md: the 17 kernel lines are at the end of "Unknown function info" again, which is where everyone appends, so this keeps conflicting. Put them somewhere in the middle of the section.- The title and What still mention Party, which the branch no longer adds.
Once it's rebased with CI green, we'll review it again.
993ccfa to
998016e
Compare
|
Rebased onto current main (forced update 993ccfa...998016e): (a) TechnicalDebt.md: kept main's new lines (_sceUlobjmgrRegisterObject, sceShareGetCurrentStatus, sceAgcDcbSet Predication lines, Resource registration) and placed our 17 kernel unknown-NID lines after them. Old-vs-new diff check: Ampr 119, AppContent 5, Http 9, Json2 9, NetCtlApDialog 38, NpEntitlement 4, NpManager 4, libc 15, kernel 102 (incl. 24 _nid_postfix lines, interposition fix intact), TD 17 — everything else identical to the reviewed head, git diff --check clean. |
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
No title was run. 🤖 Addressed by Claude Code |
|
Conventions is red only because the "Depends on: none" box is unticked; please tick it. The title and What still mention Party and the NpCppWebApi stubs, which the branch no longer adds, so please update those too. |
|
Done: title no longer mentions Party, What no longer mentions the NpCppWebApi stubs, Depends on: none ticked. Thanks also to popcoder565 for the Windows run (520/521 with the unrelated guest_offline_imports failure from #2359). |
adriadam10
left a comment
There was a problem hiding this comment.
Checked the diff against main: every export is a throwing stub, no duplicates with main, no NID alias repeating its own name, TechnicalDebt lines sit in "Unknown function info". The merged tree builds (including the new libSceNetCtlApDialog module) and the libs ctest scope passes; Windows run by @popcoder565 covers MinGW. Merging.
What
Deathloop (PPSA01670, v01.405) resolves all 931 imports, loads every module and reaches the ELF entry point. New module libSceNetCtlApDialog (network-connection dialog; no studied game imports from it yet); missing-export stubs (all throwing) for Ampr (36, including 0hlfW1O4Aa4 which Deathloop imports from libSceAmpr, IMPORT_LIB index 48), libkernel (17), Http, Json2, Net, AppContent, NpEntitlementAccess, NpManager, WebBrowserDialog and libc (3). NetCtlAp (IMPORT_LIB-only) and VrrPeg need nothing (zero imports).
Tested
Checklist