Skip to content

feat(libSceNpCppWebApi): implement twelve Matches2V1 factories and DataStatus vector iterators - #16056

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
akkadbakkad89:feat/npcwa-matches-factories
Nov 5, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
akkadbakkad89:feat/npcwa-matches-factories

Conversation

@akkadbakkad89

Copy link
Copy Markdown
Contributor

What

Implements the sce::Np::CppWebApi::Matches::V1 factory cluster and the TitleCloudStorage2V1::DataStatus vector iterators in libSceNpCppWebApi, from the Sony module bundled with GTA Vice City (PPSA03530) whose SCE dynamic symbol table resolves every target NID to a full function body.

The module's uniform create protocol is disassembled per factory: null LibContext* or null out pointer returns 0x80553503, allocation failure returns 0x80553504, the object is allocated and wrapped {object, deleter, context} into the caller's IntrusivePtr, each create parameter is stored at its measured offset, and the initialization result is propagated.

Twelve factories are implemented:

  • AddedPlayerFactory (size 0xb0; name string at +0x10, PlayerType at +0x30, three further Common::String members at +0x38/+0x60/+0x88 covered by the deleter)
  • CreateMatchRequestFactory (host size 0xb8 vs module 0x88, keeping the measured setter range +0x98..+0xb0 in allocation; strings at +0x18/+0x38, RequestInGameRoster member at +0x98)
  • RemovedPlayerFactory (0x38), RequestMemberFactory (0x30), RequestMatchTeamFactory (0x78; second string at +0x30, member vector at +0x58), RequestTeamStatisticFactory (0x70; member vectors at +0x30/+0x50)
  • RequestMatchResultsFactory (ResultsVersion at +0x10, competitive-result member at +0x20)
  • UpdateMatchStatusRequestFactory (UpdateStatus at +0x18)
  • RequestInGameRosterFactory, RequestCompetitiveResultFactory, RequestMatchStatisticsFactory (parameterless; member vectors at +0x10/+0x30)
  • UpdateMatchDetailRequestFactory (parameterless; zoneId string at +0x18, roster member at +0x70)

Per-object deleters destroy every Common::String member and release every IntrusivePtr member through ReleaseIntrusivePtr with the refcount offset the setters use (+0x30 for vectors, +0x00 for model objects).

Vector<IntrusivePtr<DataStatus>>::begin/end are implemented in the canonical Vector<String> style (IntrusiveVectorElements for elementKind == 1): begin yields the element base, end one element past the last.

Left throwing, documented in docs/dev/debt/libSceNpCppWebApi.md: the ten factories whose second create parameter has no measured field offset (vector/by-value-IntrusivePtr arguments and the RequestMatchPlayer/AdditionalStatistic/RequestPlayerResults/RequestTeamResults/RequestTeamMemberResult/ReportResultsRequest second parameters), plus Product::getLabel and TransactionBase::start, whose bodies are unmeasured past the entry checks. The host allocator stands in for the module's LibContext mspace; the context-allocator work in #16018 can replace it once landed. Host sizes exceed module sizes where the measured setter offsets require them.

Tested

Windows 11: guest_np_cpp_web_api_* suite 13/13 pass. GuestNpCppWebApiMatches pins the factory error paths (0x80553503 on null context/out), the out-IntrusivePtr wrap, the name/enum stores at the measured offsets, deleter release of every member string, and the member IntrusivePtr refcount inc/dec on both offsets. GuestNpCppWebApiTitleCloudStorage pins begin/end on the empty vector.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 15850 core/libs/prx/libSceNpCppWebApi/include/Api.hpp L480-481
PR 15998 core/libs/prx/libSceNpCppWebApi/include/Api.hpp L476-482

#15850 declares the same two DataStatus iterator signatures (still throwing there); this PR declares them in the canonical Vector<String> form and implements the bodies. #15998 is adjacent Api.hpp hunks only.

akkadbakkad89 and others added 2 commits November 5, 2026 19:07
…taStatus vector iterators

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ctor iterators

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Progress report (d23df92 → d1a47c5)

📈 System libraries: 26.72% (+0.03%, +15 implemented, +6 declared functions)

✅ 15 implemented
Library Name
libSceNpCppWebApi DestroyAddedPlayer
libSceNpCppWebApi DestroyMatchesModel
libSceNpCppWebApi DestroyMatchesModelString16
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V118AddedPlayerFactory6createEPNS1_6Common10LibContextEPKcNS3_10PlayerTypeEPNS5_12IntrusivePtrINS3_11AddedPlayerEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V120RemovedPlayerFactory6createEPNS1_6Common10LibContextEPKcPNS5_12IntrusivePtrINS3_13RemovedPlayerEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V120RequestMemberFactory6createEPNS1_6Common10LibContextEPKcPNS5_12IntrusivePtrINS3_13RequestMemberEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V123RequestMatchTeamFactory6createEPNS1_6Common10LibContextEPKcPNS5_12IntrusivePtrINS3_16RequestMatchTeamEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V125CreateMatchRequestFactory6createEPNS1_6Common10LibContextEPKcPNS5_12IntrusivePtrINS3_18CreateMatchRequestEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V126RequestInGameRosterFactory6createEPNS1_6Common10LibContextEPNS5_12IntrusivePtrINS3_19RequestInGameRosterEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V126RequestMatchResultsFactory6createEPNS1_6Common10LibContextENS3_14ResultsVersionEPNS5_12IntrusivePtrINS3_19RequestMatchResultsEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V127RequestTeamStatisticFactory6createEPNS1_6Common10LibContextEPKcPNS5_12IntrusivePtrINS3_20RequestTeamStatisticEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V129RequestMatchStatisticsFactory6createEPNS1_6Common10LibContextEPNS5_12IntrusivePtrINS3_22RequestMatchStatisticsEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V131RequestCompetitiveResultFactory6createEPNS1_6Common10LibContextEPNS5_12IntrusivePtrINS3_24RequestCompetitiveResultEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V131UpdateMatchDetailRequestFactory6createEPNS1_6Common10LibContextEPNS5_12IntrusivePtrINS3_24UpdateMatchDetailRequestEEE
libSceNpCppWebApi _ZN3sce2Np9CppWebApi7Matches2V131UpdateMatchStatusRequestFactory6createEPNS1_6Common10LibContextENS3_12UpdateStatusEPNS5_12IntrusivePtrINS3_24UpdateMatchStatusRequestEEE
🆕 6 declared as stubs
Library Name
libSceNpCppWebApi DestroyCreateMatchRequest
libSceNpCppWebApi DestroyMatchesModelVectors16And48
libSceNpCppWebApi DestroyRequestMatchResults
libSceNpCppWebApi DestroyRequestMatchTeam
libSceNpCppWebApi DestroyRequestTeamStatistic
libSceNpCppWebApi DestroyUpdateMatchDetailRequest

Changed libraries (implemented exports)

Library Before After Change
libSceNpCppWebApi 924/1417 (65.21%) 939/1426 (65.85%) +0.64%

@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Windows check of head d1a47c538b, merged onto main 4180951e90 (78e8a9a28b, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • guest_np_cpp_web_api_matches and guest_np_cpp_web_api_title_cloud_storage pass in 3 of 3 runs, none skipped.

AI-assisted: yes.

@oneandonlydean oneandonlydean self-assigned this Nov 5, 2026
@oneandonlydean
oneandonlydean merged commit da44e6b into boykopovar:main Nov 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants