feat(tools): suggest real names for Unknown NID stubs from hash-verified DB #542
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/542"
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 Pouare514 on 2026-10-04T16:24:26Z.
What
New stdlib-only tool \ ools/nid_names.py: scans every \APS5_EXPORT(NID, Unknown)\ in core, looks the NID up in the public hash-verified database (zecoxao/sce_symbols aerolib.csv, downloaded once to a local cache or via ANYPS5_NID_DB), and prints the verified real name plus whether it already exists in the tree. --verify recomputes every suggested NID with the project's own Nid::Compute algorithm and fails on mismatch.
Nothing is vendored (12 MB CSV, unlicensed upstream data stays out of the repo). On current main: 150 unknowns, 141 suggestions, verify clean.
Tested
Checklist
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T21:19:22Z.
Thanks, this is handy.
compute_nidmatchesNidCompute.cpp, and on this branch I get the same 150 unknowns and 141 suggestions with--verifyclean. A few things before it goes in:collect_real_namesonly finds names with_nid_postfix, but most exports are plain names, so "already-implemented" rarely fires. For example CWVW78Qc3fI (sceMsgDialogUnknown00in libSceMsgDialog.native) comes out as rename-ready tosceMsgDialogGetStatus, whichlibSceMsgDialog/Export.cppalready defines. Collecting everyAPS5_VABI name(definition, likeDEFINITIONintools/progress.py, would catch it.--verify, while the output presents every suggestion as verified. It costs nothing, so I'd always run it and mark mismatches.DB_URLwould make the results reproducible.Small one: CONVENTIONS asks for no comments, which covers the module docstring too.
Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-04T22:59:20Z.
Done all four: collect_real_names now collects every APS5_VABI definition like progress.py DEFINITION (plus _nid_postfix-stripped names), so CWVW78Qc3fI correctly reports already-implemented; the hash check always runs and mismatches are marked (RC 1 on mismatch), which made --verify redundant so I removed the flag; DB_URL pins commit 2883963a0a514ba6e77407a08ef4730a65e88254; module docstring removed. Tree scan on this branch: 150 unknowns, 141 suggestions, 0 mismatches.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-04T23:43:48Z.
Thanks, all four are in: every
APS5_VABIdefinition counts as implemented (CWVW78Qc3fI now says already-implemented), the hash check always runs with a non-zero exit on a mismatch, and the database is pinned to 2883963a. On current main I get 149 unknowns, 140 suggestions, 1 already implemented and no mismatches. Ready to merge from my side.One thing for later, not for this PR:
DEFINITIONdoesn't match the 25 functions on main that are written as function try blocks (int APS5_VABI f() try {, used in libSceVideoOut). None of them is a suggestion today, so it changes nothing yet;(?:noexcept\s*)?(?:try\s*)?\{would cover them.