feat(libSceNpCommerce): implement sceNpCommerceDialogOpen2 #3607
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3607"
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 itsbo5 on 2026-10-11T14:10:08Z.
What
Implements
sceNpCommerceDialogOpen2followingsceNpCommerceDialogOpen.Tested
Linux build;
guest_np_commerce_dialog(ctest) covers not-initialized, null and zero parameters, status and result after the call.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T14:14:00Z.
Review: DISMISSED
Thanks for the PR. Points to address:
core/libs/prx/libSceNpCommerce/Export.cpp:82:sceNpCommerceDialogOpen2now forwards tosceNpCommerceDialogOpen, which returnsCOMMON_DIALOG_ERROR_NOT_INITIALIZED/ARG_NULL. The only reference we found (prosper,src/hle/np/np.cpp:1224,tests/hle/np/test_np_sublibs.cpp:347) callssceNpCommerceDialogOpen2with all-zero arguments and expects 0. Please say which source the param type and the validation come from, or follow prosper; if neither is known, the unverified part should throw.docs/dev/TechnicalDebt.mdconflicts withmain; please rebase. Keep the new line away from the end of the section.conventionsis red:What,Tested,Checklistempty). Please fill them in; "Tested" should list what you ran.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T14:37:04Z.
Progress report (
bebff8b→68bddf8)📈 System libraries: 88.88% (+0.02%, +1 implemented functions)
✅ 1 implemented
sceNpCommerceDialogOpen2Imported from boykopovar/AnyPS5. Originally posted by itsbo5 on 2026-10-11T14:39:06Z.
done
Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T15:20:07Z.
Independent pre-review on Linux (full CI runs only happen on manual trigger, so recording one): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON.tools/check_conventions.py --base origin/mainpasses.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:15:33Z.
Which title calls
sceNpCommerceDialogOpen2on main? With the title ID and the log line where it stops this can go in after a rebase (core/libs/CMakeLists.txt,docs/dev/TechnicalDebt.md); otherwise I'll close it until one does.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T20:44:59Z.
Review: DISMISSED
Thanks for the update. Still open from the previous review, plus the question above:
core/libs/prx/libSceNpCommerce/Export.cpp:84: theCOMMON_DIALOG_ERROR_NOT_INITIALIZEDcheck has no source. The only reference we found (prosper,src/hle/np/np.cpp:500,s_commerce_openregistered forsceNpCommerceDialogOpen2too) ignores every argument, validates nothing and returns 0. Please cite where the validation and theconst void*parameter come from, or follow prosper; whatever is not known should throw.core/libs/tests/GuestNpCommerceDialog.cpp:44: the test pins the unsourcedNOT_INITIALIZEDresult, so it only checks the PR's own choice.sceNpCommerceDialogOpen2(title ID, and the log line where it stops on main)?docs/dev/TechnicalDebt.mdonly says PPSA23566 imports it.main(core/libs/CMakeLists.txt,docs/dev/TechnicalDebt.md); please rebase.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T21:12:34Z.
There is now concrete title evidence in the newer overlapping PR #5416: Call of Duty: Black Ops (PPSA34501), on the
games/blackopsbring-up discussion #5389, throwssceNpCommerceDialogOpen2 not implementedwhen selecting Zombies → Online. The report includes the stopping log and says the title continues past it with the implementation. This appears to answer the title-ID/log question from your earlier comment. #5416 overlaps this PR, so maintainers will need to choose or coordinate the implementation.Imported from boykopovar/AnyPS5. Originally posted by alexpournaras on 2026-10-13T21:40:03Z.
I tested this PR with Call of Duty: Black Ops (PPSA34501) on Windows 11.
Using my
games/blackopsbranch, Zombies → Online previously crashed withsceNpCommerceDialogOpen2 not implemented. With the changes from this PR, the game successfully continues past that exception.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T21:42:39Z.
Thanks for the Windows 11 test. It confirms that Call of Duty: Black Ops (PPSA34501) reaches sceNpCommerceDialogOpen2 at Zombies → Online and continues past the exception with this implementation, which answers the requested title and repro evidence. The same call is implemented in open PR #5416, so the two PRs now have matching title-level validation and need coordination around their overlapping change.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T21:46:31Z.
Thanks for the Windows validation. #5416 is now closed in favor of this PR, so that duplicate is resolved. GitHub currently reports #3607 as DIRTY against
main; the earlier review also requested a rebase. Please rebase and rerun the relevant checks when ready.Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-14T17:12:48Z.
@itsbo5 here is a rebase of this PR that follows prosper, as @adriadam10's review asked. cc @oneandonlydean, since you're assigned.
What the sources show:
sceNpCommerceDialogOpenhandler forsceNpCommerceDialogOpen2too (np.cpp#L1223-L1224). That handler,s_commerce_open, does three things: it logs its arguments, sets the status to 3 (FINISHED) and returns 0. It checks neither the state nor the param. Its test callsOpen2with all-zero arguments afterInitializeandOpen, and expects 0 and status 3 (test_np_sublibs.cpp#L341-L348).main, the sibling calls already end that way.sceNpCommerceDialogOpensets FINISHED (Export.cpp#L31-L36). After that,sceNpCommerceDialogGetResultwrites result 1 (USER_CANCELED) andauthorized0 (#L46-L55). SoOpen2needs nothing more thang_status = COMMON_DIALOG_STATUS_FINISHED; return 0;to give the same cancelled result.Changes on top of 556ed4f78, rebased onto
763ad20fc:Export.cpp: keepmain'ssceNpCommerceDialogOpen2(void), and drop theNOT_INITIALIZEDcheck and theconst void*parameter.core/libs/CMakeLists.txtconflict: instead of resolving the hunk, the test is registered in a newcore/libs/prx/libSceNpCommerce/CMakeLists.txt, the way #5817 did for libSceVoice, socore/libs/CMakeLists.txtstays untouched.Open2is called afterInitializeand again afterOpen; each time it returns 0, the status is 3 and the result is cancelled. The not-initialized case is no longer pinned. The checks of the other calls (their error codes and the store icon calls) are left out too, since this PR does not change them.docs/dev/TechnicalDebt.mdconflict: the PPSA23566 list now lives in docs/dev/debt/libSceAudioOut.md#L5.sceNpCommerceDialogOpen2is removed from that list, anddocs/dev/debt/libSceNpCommerce.mdgets anUnknown function infoentry that cites prosper.The PR body's What and Tested still describe the
NOT_INITIALIZEDcheck andTechnicalDebt.md, so they need updating too.Tested with a WSL Ubuntu GCC Release build at the branch head:
guest_np_commerce_dialogpasses.main'sExport.cppswapped in, the same test aborts withsceNpCommerceDialogOpen2 not implemented.main'stools/check_conventions.py(with this PR's title and body) andtools/check_test_registration.pyboth pass.The branch is nikowolf123/AnyPS5
help/h7-np-commerce-open2. It has two commits: yours, rebased with your authorship, then the prosper change. To take it:Maintainer edits are enabled on your branch, so a maintainer could also push it there.
@alexpournaras could you rerun Zombies > Online on this head? Compared with the 556ed4f78 change you ran, one thing differs: before
sceNpCommerceDialogInitialize, or afterTerminate,Open2now returns 0 and finishes the dialog instead of returningNOT_INITIALIZED.Diff against main (
763ad20fc), without the one-line removal in libSceAudioOut.mdAI-assisted: written with Claude Code. I checked prosper's
np.cppandtest_np_sublibs.cppat 73413cb4,main's libSceNpCommerce, its debt files and #5817's registration at763ad20fc, and this thread. I ran the rebase,guest_np_commerce_dialogon the branch and withmain'sExport.cpp(WSL Ubuntu, GCC), andmain'scheck_conventions.pyandcheck_test_registration.py.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T17:45:08Z.
Pushed @nikowolf123's rebase here, onto current main (the
libSceAudioOut.mdline conflicted again after #4778): your commit, then his change that follows prosper.guest_np_commerce_dialogpasses. @itsbo5 please update What/Tested in the description to match (noNOT_INITIALIZEDcheck, test inlibSceNpCommerce/CMakeLists.txt).Imported from boykopovar/AnyPS5. Originally posted by alexpournaras on 2026-10-14T18:36:06Z.
@nikowolf123 I only copied the relevant change (
sceNpCommerceDialogOpen2) into my branch and confirmed Zombies → Online continued past the exception.