Skip to content

feat(libkernel,libSceNet,libSceAudioOut): implement missing PRX function stubs - #4447

Closed
YousefMohsen0 wants to merge 3 commits into
boykopovar:mainfrom
YousefMohsen0:feat/prx-stubs-batch-1
Closed

YousefMohsen0 wants to merge 3 commits into
boykopovar:mainfrom
YousefMohsen0:feat/prx-stubs-batch-1

Conversation

@YousefMohsen0

Copy link
Copy Markdown

What

Implement proper C++ signatures with parameter validation for 12 missing PRX function stubs across libSceNet, libSceAudioOut, and libkernel as identified in TechnicalDebt.md.

  • libSceNet: sceNetShowIfconfig, sceNetShowNetstat, sceNetResolverAbort, sceNetResolverStartNtoaMultipleRecords
  • libSceAudioOut: sceAudioOutExOpen, sceAudioOutExConfigureOutput, sceAudioOutExGetMonitorInfo, sceAudioOutExClose, sceAudioOutSysOpen, sceAudioOutSysConfigureOutput, sceAudioOut2UserGetSupportedAttributes, sceAudioOut2EnableChat, sceAudioOut2MasteringGetState, sceAudioOut2MasteringSetParam
  • libkernel: kqueue_nid_postfix, kevent_nid_postfix
  • Added AudioOut2ChatParam struct to SceTypes.hpp

Tested

  • python3 tools/check_conventions.py --base origin/main - All checks pass
  • All source files compile successfully

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 in TechnicalDebt.md
  • 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: none
  • Unblocks: PPSA01530, PPSA23827, PPSA13356, PPSA14632, PPSA23566, PPSA99505, PPSA99051, PPSA99997
  • AI-assisted: yes

Copilot AI balanced review requested due to automatic review settings October 12, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@YousefMohsen0
YousefMohsen0 force-pushed the feat/prx-stubs-batch-1 branch from 0ed3ba8 to 1ca498f Compare October 12, 2026 12:37
@YousefMohsen0
YousefMohsen0 force-pushed the feat/prx-stubs-batch-1 branch from 712619e to afa58eb Compare October 12, 2026 13:17
@ahmedmakroum

Copy link
Copy Markdown
Contributor

Hi, the overlap bot linked this with my #4476, which implements five of the libSceJson2 stubs edited here (Array::iterator ctor, operator= and operator++(int), Object::Pair ctor and dtor). Would you be ok with #4476 going first and dropping those five hunks here?

Two things I noticed in libSceJson2/Export.cpp while comparing:

Around line 864 the body of Value::clear was replaced, so notifyError is now defined inside it and the file won’t compile.
Array::iterator::operator++(int) returns the iterator by value, so its first argument is the hidden result pointer, then this, then the int (same layout as Array::begin()).

@YousefMohsen0
YousefMohsen0 force-pushed the feat/prx-stubs-batch-1 branch from afa58eb to 5465591 Compare October 12, 2026 13:28
@xXPBSXx

xXPBSXx commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Windows test of head d5410a983 merged onto current main (c6efe068a, clean merge; built together with three other open PRs from the same list, so the numbers below are for the combination): Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, full build 0 errors.

The PR changes no test; the build has 0 errors and guest_kernel_sys and guest_sce_net pass (20 of 20 in the filter audio_out|guest_directory|guest_dup|guest_kernel_sys|guest_sce_net|guest_file).

Build and regression check only. Not checked: that the test fails without the change, Linux, a title run.

AI-assisted (Claude Code).

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

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
#2854 sceWebBrowserDialogOpenForPredeterminedContent
sceWebBrowserDialogResetCookie
sceWebBrowserDialogSetCookie
#4476 core/libs/prx/libSceJson2/Export.cpp L899-909, L913-927 _ZN3sce4Json5Array8iteratoraSERKS2_
_ZN3sce4Json5Array8iteratorppEi
#4485 sceOpusCeltDecCreateEx
sceOpusCeltDecDecode
sceOpusCeltDecDestroy
sceOpusCeltDecGetSize
sceOpusCeltDecInitialize
sceOpusCeltDecTerminate
#4791 core/libs/prx/libSceAppContent/Export.cpp L166-168, L171-173
core/libs/prx/libSceJson2/Export.cpp L869-870, L874-875, L879-896, L899-901, L904-906, L909-911, L914-916, L919-921, L924-926
_ZN3sce4Json12MemAllocator11notifyErrorEimPv
_ZN3sce4Json5Array8iteratoraSERKS2_
_ZN3sce4Json5Array8iteratorppEi
_ZN3sce4Json5Value21setNullAccessCallBackEPFRKS1_NS0_9ValueTypeEPS2_PvES6_
_ZN3sce4Json5Value22setSpecialFloatHandlerEPFKS1_NS0_12FunctionTypeEdPS2_PvPbES5_
_ZN3sce4Json5Value22setTypeMismatchHandlerEPFRKS1_NS0_9ValueTypeEPS2_S5_PvES6_
_ZN3sce4Json5Value30setElementAccessFailureHandlerEPFviPKNS0_6StringEPKmPKS1_S8_PvES9_
_ZN3sce4Json6Object6insertERKNS1_4PairE
_ZNK3sce4Json5ValuecvbEv
sceAppContentAddcontEnqueueDownload
sceAppContentGetAddcontDownloadProgress

…o PRX function stubs

- libSceAppContent: sceAppContentAddcontEnqueueDownload, sceAppContentGetAddcontDownloadProgress with proper signatures and validation
- libSceNpPartner001: sceNpEAAccessInitialize with parameter validation
- All functions follow project pattern: validation + NotImplemented_nid_no_patch
…and add parameter validation

- libSceJson2: Drop 5 functions overlapping with boykopovar#4476 (Array::iterator ctor/op++/op=, Pair ctor/dtor)
  Fix Value::clear to keep notifyError call
  Fix MemAllocator::notifyError signature (3 params)
  Fix Value callbacks signatures with self parameter
  Fix Object::insert, Array::iterator operators with proper signatures
- libSceBluetoothHid: Add parameter validation to GetDeviceName, GetInputReport, SetOutputReport
- All functions follow project pattern: validation + NotImplemented_nid_no_patch
…erDialog,libSceAjm.native,libSceGameLiveStreaming): add proper signatures and parameter validation

- libSceContentSearch: Add proper signatures to 8 functions with parameter validation
- libSceHttp2: Add proper signatures to 5 WebSocket functions
- libSceOpusCeltDec: Full decoder implementation with context/state management
- libSceWebBrowserDialog: Add proper signatures to 3 unimplemented functions
- libSceAjm.native: Add proper signatures to 2 WVorbis functions
- libSceGameLiveStreaming: Add proper signature to GetProgramInfo
- All functions follow project pattern: validation + NotImplemented_nid_no_patch
@YousefMohsen0
YousefMohsen0 force-pushed the feat/prx-stubs-batch-1 branch from 5661562 to 29ad221 Compare October 12, 2026 20:45
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 12, 2026
@ahmedmakroum

Copy link
Copy Markdown
Contributor

Thanks for the quick fix!
Two things left: the iterator constructor and the Pair constructor and destructor are now deleted from the file instead of left as they are on main, so those exports would disappear if this merges first. Could you restore main’s version of them? And operator= and operator++(int) are still edited here, which keeps the conflict with #4476. Leaving those two as on main would remove the overlap completely.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: the description lists libSceNet, libSceAudioOut and libkernel functions, but the diff changes ten other libraries, leaves a <<<<<<< HEAD marker in libSceContentSearch/Export.cpp, and drops the Json2 Array::iterator constructor and the Object::Pair constructor and destructor that main exports. The new parameter lists have no source and most of the functions still throw, so no title gets further. Reopen one library at a time, with the title ID and the log line where it stops on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants