Skip to content

feat(prx): unknown loader tripwires for TLOU - #338

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
Pouare514:feat/prx-loader-tripwires
Oct 5, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
Pouare514:feat/prx-loader-tripwires

Conversation

@Pouare514

Copy link
Copy Markdown
Contributor

What

Raw-NID exports for 14 loader unknowns hit while booting TLOU Part I (Net, libc, SystemService, Http, Http2, Voice, Trophy2, libkernel, SessionSignaling), following the Agc unknown precedent. Unknown names/signatures recorded in TechnicalDebt. Anything actually called throws with its name instead of failing the load with an unnamed import.

Tested

Windows 11, MinGW GCC 15.2.0. Verified all 14 NIDs present in the built .prx\ files. Full \ctest -E agc_driver_graphics|guest_rendering_wait: 93/93.

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: none
  • AI-assisted: yes

@Pouare514
Pouare514 force-pushed the feat/prx-loader-tripwires branch from a840da8 to 371aaaf Compare October 2, 2026 11:37
@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Progress report (9651ec9 → 20cbc8e)

📉 System libraries: 78.89% (-0.25%, +10 declared functions)

🆕 10 declared as stubs
Library Name
libSceHttp sceHttpParseResponseHeader
libSceHttp2 sceHttp2GetMemoryPoolStats
libSceNet sceNetGetMemoryPoolStats
libSceNpSessionSignaling sceNpSessionSignalingGetConnectionStatistics
libSceNpSessionSignaling sceNpSessionSignalingGetMemoryInfo
libSceNpTrophy2 sceNpTrophy2UnregisterUnlockCallback
libSceSystemService sceSystemServiceDisableMediaPlay
libSceSystemService sceSystemServiceReenableMediaPlay
libSceVoice sceVoiceSetMuteFlag
libc snwprintf_s

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for these. This needs a rebase: it conflicts with main in libSceHttp, libSceNpSessionSignaling, libkernel/Unimplemented.cpp and TechnicalDebt.md, and rWSuTWY2JN0 (libc/Export.cpp) and teiItL2boFw (libkernel/Unimplemented.cpp) are exported on main already, so those two can be dropped. Also, 0hlfW1O4Aa4 is a libc export here but #407 adds the same NID to libSceAmpr. Do you know which library the title imports it from?

@Pouare514
Pouare514 force-pushed the feat/prx-loader-tripwires branch 2 times, most recently from 7d23ad3 to 813cfb0 Compare October 4, 2026 14:22
@Pouare514

Copy link
Copy Markdown
Contributor Author

Done, rebased: dropped rWSuTWY2JN0 and teiItL2boFw (on main), hPTXo3bICzI renumbered to sceHttpUnknown02, rMyh97BU5pY to sceNetUnknown01. Two findings while rebasing: GlelR9EEeck computes to the same NID as cbrtf (already implemented), so dropped as well. For 0hlfW1O4Aa4: Deathloop imports it from libSceAmpr (IMPORT_LIB index 48, verified from the ELF dynamic section), and TLOU only references that one NID out of Ampr's whole surface, so I removed it from libc here and kept it in #407's Ampr. libs rebuilt clean.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks for the rebase, and good catch on GlelR9EEeck being cbrtf. Three things in the new head:

NID Name
hPTXo3bICzI sceHttpParseResponseHeader
otUQuZa-mv0 sceHttp2GetMemoryPoolStats
rMyh97BU5pY sceNetGetMemoryPoolStats
lbXTXRG5nyM sceNpSessionSignalingGetMemoryInfo
+Q++Q49a9z8 sceNpSessionSignalingGetConnectionStatistics
wVqxM58sIKs sceNpTrophy2UnregisterUnlockCallback
64nkF7LGk8w sceSystemServiceDisableMediaPlay
uInYhy7xa+U sceSystemServiceReenableMediaPlay
gwUynkEgNFY sceVoiceSetMuteFlag
jbj2wBoiCyg snwprintf_s

Exporting them under these names also avoids the clash with #407, which uses sceHttpUnknown02 and sceNetUnknown01 for different NIDs. Their TechnicalDebt lines would then say "unknown signature". The red Windows job is the guest_audio_in_no_device flake that #532 fixed.

@Pouare514

Copy link
Copy Markdown
Contributor Author

Done all three: restored main's sceNpSessionSignalingGetConnectionStatus implementation and the seven TechnicalDebt lines; exported all ten NIDs under their recomputed real names as plain functions (no APS5_EXPORT, so nid_patcher resolves each to its NID with no duplicates — verified with a clean local libs build), with unknown signature TechnicalDebt lines. This also clears the sceHttpUnknown02/sceNetUnknown01 clash with #407. Also dropped the stray AudioIn hunk from this branch.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks, that covers all three: main's sceNpSessionSignalingGetConnectionStatus and the seven TechnicalDebt lines are back, and the ten NIDs are exported under their real names with "unknown signature" lines. No other open PR exports any of these names or NIDs now.

It needs one more rebase: #555 (now on main) added sceHttpCreateRequest2 and friends at the end of libSceHttp/Export.cpp, which conflicts with sceHttpParseResponseHeader, and TechnicalDebt.md conflicts as well. Keeping both sides works; with that, libs builds here and the full ctest passes.

While rebasing, could you leave main's sceNpSessionSignalingGetConnectionStatus body as it is? The hunk there now only re-indents it, and the same goes for the deleted blank line above sceHttpUnknown00. After the rebase it's ready to merge from my side.

@Pouare514
Pouare514 force-pushed the feat/prx-loader-tripwires branch from 05d32e5 to 20cbc8e Compare October 5, 2026 00:20
@Pouare514

Copy link
Copy Markdown
Contributor Author

Rebased onto current main, keeping both sides in libSceHttp/Export.cpp (#555's CreateRequest2 and friends plus sceHttpParseResponseHeader) and TechnicalDebt.md. Main's sceNpSessionSignalingGetConnectionStatus body is now byte-identical to main, and the blank line above sceHttpUnknown00 is restored — the Http and SessionSignaling diffs are purely additive now. libs builds and full ctest (221 tests) passes locally.

@github-actions

github-actions Bot commented Oct 5, 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
#582 docs/dev/TechnicalDebt.md L59

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 5, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

Thanks. After the rebase the diff only adds code: main's sceNpSessionSignalingGetConnectionStatus body and the blank line in libSceHttp are untouched, #555's functions are kept, and the ten names still recompute to their NIDs with "unknown signature" lines. No other open PR or main exports any of them. CI is green on the new head.

Ready to merge from my side. When it lands, #407, #545 and #550 each need a one-line TechnicalDebt.md rebase, because they all append to the end of "Unknown function info" (#545 also appends to the end of libc/src/RuntimeSupport.cpp).

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.

2 participants