refactor(prx): name the Hmd2 export aliases the NID database resolves #17271
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17271"
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 dkdhanda8 on 2026-11-08T16:40:00Z.
What
81 of
libSceHmd2's export NIDs resolve in the pinned public symbol databases, and the exports they currently alias through the eight shared behavior handlers (Hmd2BeforeInitializeZero,Hmd2CheckFirstThenError0004,Hmd2BeforeInitializeMinusOne,Hmd2CheckFirstThenError1002,Hmd2BeforeInitializeError0004,Hmd2BeforeInitializeParameterInvalid,Hmd2BeforeInitializeParameterNull,Hmd2SlotUpTo1ThenMinusOne) are renamed after their resolved symbols, following the merged AudioIn/Json/CommonDialog naming series.Each resolved NID keeps its handler's exact behavior through a small delegating function (
sceHmd2InternalDfuOpen()calls theHmd2BeforeInitializeZerohandler, and so on), so the measured pre-initialization answers and their post-initialization throws are byte-identical; the shared handlers stay for the exports the database does not resolve. The explicitAPS5_EXPORTlines of the 81 resolved NIDs come off and the bare names hash to the same NIDs; declarations land ininclude/Api.hpp.Every resolved name was verified by reproducing its NID with
tools/nid_names.py'scompute_nidand matching it against aerolib.csv and the ps5rs catalog — the debt entry already annotated many of these NIDs with the resolved names, which this formalizes. No behavior changes; the debt entry's measured descriptions and NID lists stand unchanged.Tested
tools/check_conventions.py --base origin/mainpasses;git diff --checkis clean.Export.cppand the umbrella compile (-fsyntax-only, MinGW), and the existingGuestHmd2.cpptest — which calls the shared handlers by name — compiles unchanged, since the handlers remain.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); no silent stubs added.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-08T19:20:31Z.
Review: COMMENTED
Windows build of this head merged onto
main9fabd4aa7e, in one tree with the other open NID-naming PRs in this series (#17271, #17254, #17297, #17298 and #17303, which contains #17299); all merged cleanly. Setup: Windows 11, WinLibs GCC 15.2, Release,BUILD_TESTING=ON.guest_hmd2*,guest_user_service*,guest_icu*,guest_nkwebkit_requirements*andguest_libre_ssl*tests pass.tools/nid_names.py's own rules:APS5_EXPORTliterals, pluscompute_nidof eachAPS5_VABI, assembly and data definition that isn't_nid_no_patch. The set is identical tomain's, with no NID defined twice.objdump -pon the builtlibSceHmd2.prxlistssceHmd2InternalDfuOpenby name.