feat(libSceNpCommon): implement sceNpGetNavSdkVersion #12830
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12830"
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 hypermoist on 2026-10-29T11:52:36Z.
What
Implements
sceNpGetNavSdkVersionin place of itsNotImplementedstub. The signature and behaviour are read fromlibSceNpCommon.sprxof firmware 13.60 (disassembly, not measured on a console).This is stacked on #12829, which is stacked on #12825. Only the last commit (
feat(libSceNpCommon): implement sceNpGetNavSdkVersion) is new. All three edit the same debt-file entry.void sceNpGetNavSdkVersion(char* version): the module clears 8 bytes atversion, writes00.82into them and returns without setting a result. So the declaration changes from the placeholderint (void)tovoid (char*), like the siblingsceNpGetSdkVersion. There is no null check, as in the module.The debt file replaces the "signature unknown" entry and the entry that said the function throws with one entry that states the source. It notes that other firmware versions may carry another string.
Tested
Linux (CachyOS, GCC, Release):
ctest --test-dir build -R 'np_common|public_headers' --output-on-failure, 70/70 passed. Theclockcase ofGuestNpCommon.cppchecks the 8 bytes and that nothing is written past them.Comparison against the firmware code: I relinked the 13.60 module with this repo's relinker and ran the function under unicorn (x86-64 emulation on a PC, not a console) on a buffer prefilled with
x. It wrote00.82\0\0\0and left the following bytes unchanged, the same as this implementation.Windows not built. Not run on a console.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Assisted With AI: Yes. All tests were run locally on computer hardware (AMD Ryzen 5 5600G, 32 GB RAM, NVIDIA GeForce RTX 3060, CachyOS Linux 7.3, GCC 16.2), not on an actual console.
🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-29T12:04:25Z.
Review: APPROVED
I reviewed only the commit this PR adds (
git diff rev-12829..rev-12830, @9079bcca6f).Checks
strcpy(no zero padding), a 6-byte copy, a 9-byte copy (writes past the buffer),snprintf(version, 8, ...)(leaves bytes 6–7 unwritten) and a wrong string (0.82).tools/nid_names.py --name sceNpGetNavSdkVersiongivesQmDEFikd3VA, which matches the removed debt entry. Nothing else in the tree (CMake, tools, exports) refers to the oldint (void)placeholder.check_conventions.py --base rev-12829 --head rev-12830passes.git diff --checkandgit merge-treeagainst main5454cd2e45are both clean.pr_overlap --branchfinds only #12836. That conflict (PendingExportsRound7.cpp, Api.hpp, the debt file) comes from #12825, not from this commit: #12825 conflicts with #12836 in the same way, and #12836 already says whichever lands second will rebase.Notes (non-blocking)
Export.cpp, next to the shadPS4-derivedsceNpGetSdkVersion, and not inRuntime.cpp/Strings.cpp, which the debt file describes as 13.60-derived as a whole. The new debt entry names its source, so nothing is wrong. It might still be tidier to move it later.AI-assisted review.
Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:54:07Z.
Review: COMMENTED
sceNpGetNavSdkVersionis one getter, but the diff is +317/-68 across 8 files. Please say what else it carries.