Repository navigation
feat(npcppwebapi): add InGameCatalog V5 Container and Sku accessors - #19674
akkadbakkad89 wants to merge 1 commit into
Conversation
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 838ca51cee:
- Conventions:
tools/check_conventions.pypassed;git diff --checkclean. - Build:
guest_np_cpp_web_api_ingame_catalog_v5_testsbuilt cleanly. - CTest (
guest_np_cpp_web_api_ingame_catalog_v5):1/1 Test #890: guest_np_cpp_web_api_ingame_catalog_v5 ...Subprocess aborted***Exception: 0.50 sec 0% tests passed, 1 tests failed out of 1The following tests FAILED: - Note: the AI-assisted checkbox can stay.
Requesting changes for the points above.
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
838ca51 to
8e5ed97
Compare
|
Verified — the abort was a real defect in the test, not the library. The Fixed in 8e5ed97: the storage is now two proper 0x240-byte slots (0x480 total, offsets {0, 0x240}) so every container access stays in bounds. Rebuilt and re-ran Generated with Devin |
|
Linux test report for 8e5ed97, merged onto
Your Tested section only covers Windows, so this adds the Linux build. One small thing: the body calls the test |
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.
AI-assisted: yes. |
|
Exports with a name or library/NID already present in
|
Progress report (135da47 → 8e5ed97)📈 System libraries: 40.06% (+0.01%, +8 implemented functions) ✅ 8 implemented
Changed libraries (implemented exports)
|
|
Closing as superseded — every export this PR adds is now present on @PrivacyOnion — for the record, the Thanks to everyone who ran it — the buffer-overflow catch and the Linux datapoints were still useful, and the test fix is carried in this branch's history if any part is ever resurrected. |
What
Implements the eight
sce::Np::CppWebApi::InGameCatalog::V5accessors that the eboot of GTASA (PPSA03524) statically imports fromlibSceNpCppWebApiand that main did not export:Container::getLabel,Container::getDisplayName,Container::getReleaseDate,Container::releaseDateIsSet,Container::getSkus,Container::skusIsSetSku::getEndDate,Sku::endDateIsSetAll eight are plain member accessors in the SDK module (
lea/movzx/retor a small IntrusivePtr-copy tail), so they read fields directly rather than throwing: six return non-owning member pointers or read a boolean flag byte, andgetSkuscopies theIntrusivePtr<Vector<...>>member into the out object while retaining the pointee (through the existingCopyMemberIntrusivePtrhelper, vector reference count at +0x30).Proof / offsets (title modules, not guessed)
Measured by static disassembly of the converted
sce_module/libSceNpCppWebApi.prxcopies bundled with the title dumps:Container::getLabellea rax,[rdi+0x58]lea rax,[rdi+0x58]Container::getDisplayNamelea rax,[rdi+0x88]lea rax,[rdi+0x88]Container::getReleaseDatelea rax,[rdi+0xa8]lea rax,[rdi+0xa8]Container::releaseDateIsSetmovzx eax,byte[rdi+0xc8]movzx eax,byte[rdi+0xc8]Container::getSkus[rsi+0x208]into out + retains+0x30refcountContainer::skusIsSetmovzx eax,byte[rdi+0x220]movzx eax,byte[rdi+0x220]Sku::getEndDatelea rax,[rdi+0x88]lea rax,[rdi+0x88]Sku::endDateIsSetmovzx eax,byte[rdi+0xa8]movzx eax,byte[rdi+0xa8]Two independent SDK builds agree byte-for-byte on every offset. The demanding title (GTASA, build
J01397853) belongs to the same J03xxx-generation family — this layout is also the one the already-landedContainer::getChildren(vector handle at +0x228) uses.A second, older measured family (PPSA03530's bundled copy) lays out the
Containerfields differently (+0x30/+0x60/+0x80/+0xa0/+0x1e0/+0x1f8); that divergence and its build-family boundary are now recorded indocs/dev/debt/libSceNpCppWebApi.md.Skuis stable across all measured builds.Demand evidence: GTASA's eboot import registry (PPSA03524) lists exactly these 14
libSceNpCppWebApiimports; the six siblings it also imports were already exported, leaving this coherent Container/Sku family missing.Tested
libSceNpCppWebApibuilds clean; patched.prxexports all 8 NIDs (BhaIhoxXkGk,q8iKymW1wQU,jU2YUZ4YNvY,LaelDFxAfXE,hUZIRxBcMGU,zWkArFP1YQI,JUBOIzusdEw,YL67CqoAxos), verified against the PE export table.guest_np_cpp_web_api_in_game_catalog_v5test passes: asserts each pointer-returning accessor lands on the measured member offset, each*IsSetreads its flag byte (set/clear/set transitions), andgetSkusreturns the out pointer, copies object/deleter/context, retains the pointee (refcount 7 -> 8), and does not mutate the member.ctest -R np_cpp_web_api: 19/19 pass.python3 tools/check_conventions.py --base origin/main: clean.python3 tools/pr_overlap.py --branch feat/npcppwebapi-ingamecatalog-v5: no overlap with open PRs.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)