feat(libSceNpPartner001): implement the EA access initialize and terminate #2358

Closed
mrzacarias wants to merge 1 commit from upstream-pr/2358 into main
mrzacarias commented 2026-10-09 16:15:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrzacarias on 2026-10-09T16:15:25Z.


What

Follow-up to #2344, which renamed the two libSceNpPartner001 stubs. This gives them their behaviour instead of NotImplemented_nid_no_patch.

  • sceNpEAAccessInitialize marks the library initialized and returns 0.
  • sceNpEAAccessTerminate clears the state and returns 0, or throws when not initialized.

Follows shadPS4's np_partner.cpp. shadPS4 returns ORBIS_NP_PARTNER_ERROR_NOT_INITIALIZED (0x819d0001) for a terminate without init; that value is PS4-only and its PS5 equivalent is unknown, so the throw stands in for it, recorded in TechnicalDebt.

Tested

  • python3 tools/check_conventions.py --base origin/main passes.
  • Not run on a title; PPSA23566 imports both but behaviour is unconfirmed on hardware.

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; silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #2344
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4802993519 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2358). Originally posted by [mrzacarias](https://github.com/mrzacarias) on 2026-10-09T16:15:25Z. --- ### What Follow-up to #2344, which renamed the two `libSceNpPartner001` stubs. This gives them their behaviour instead of `NotImplemented_nid_no_patch`. - `sceNpEAAccessInitialize` marks the library initialized and returns 0. - `sceNpEAAccessTerminate` clears the state and returns 0, or throws when not initialized. Follows shadPS4's `np_partner.cpp`. shadPS4 returns `ORBIS_NP_PARTNER_ERROR_NOT_INITIALIZED` (`0x819d0001`) for a terminate without init; that value is PS4-only and its PS5 equivalent is unknown, so the throw stands in for it, recorded in TechnicalDebt. ### Tested - `python3 tools/check_conventions.py --base origin/main` passes. - Not run on a title; PPSA23566 imports both but behaviour is unconfirmed on hardware. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw; silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #2344 - [x] AI-assisted: yes
Kikoarl commented 2026-10-09 18:29:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-09T18:29:41Z.


Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at 4b285408:

  • Build: Built cleanly in RAM (/tmp/anyps5_build) with zero warnings/errors.
  • Conventions: python3 tools/check_conventions.py --base origin/main --head HEAD -> PASS (0 errors).
  • Verification: Verified sceNpEAAccessInitialize and sceNpEAAccessTerminate exports in libSceNpPartner001/Export.cpp. Replaces dummy NID stubs with state tracking and proper technical debt notes.

LGTM!

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6086889056 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2358#issuecomment-6086889056). Originally posted by [Kikoarl](https://github.com/Kikoarl) on 2026-10-09T18:29:41Z. --- Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at `4b285408`: - **Build**: Built cleanly in RAM (`/tmp/anyps5_build`) with zero warnings/errors. - **Conventions**: `python3 tools/check_conventions.py --base origin/main --head HEAD` -> **PASS (0 errors)**. - **Verification**: Verified `sceNpEAAccessInitialize` and `sceNpEAAccessTerminate` exports in `libSceNpPartner001/Export.cpp`. Replaces dummy NID stubs with state tracking and proper technical debt notes. LGTM!
popcoder565 commented 2026-10-09 19:41:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:41:58Z.


Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 4b285408, merged onto main 8b393b6e in one build with 31 other PRs that had no Windows run.

  • This PR has no test of its own. It builds, and the suite passes apart from the failure below.
  • Full ctest in that build: 520 of 521. The one failure is guest_offline_imports, broken by #2359 (reported there).

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088011258 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2358#issuecomment-6088011258). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T19:41:58Z. --- Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `4b285408`, merged onto `main` 8b393b6e in one build with 31 other PRs that had no Windows run. - This PR has no test of its own. It builds, and the suite passes apart from the failure below. - Full ctest in that build: 520 of 521. The one failure is `guest_offline_imports`, broken by #2359 (reported there). No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
oneandonlydean commented 2026-10-09 20:12:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:12:19Z.


Closing: PPSA23566 imports these, but no title is shown calling them on main, so the throws stay until one does. Please reopen with the title ID and the log line where it stops.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6088476257 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2358#issuecomment-6088476257). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T20:12:19Z. --- Closing: PPSA23566 imports these, but no title is shown calling them on main, so the throws stay until one does. Please reopen with the title ID and the log line where it stops.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!2358
No description provided.