Skip to content

feat(libScePad): declare the unknown import zBsgF0q8DIM - #4962

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
fdfawef324:feat/libScePad-unknown-zBsgF0q8DIM
Oct 14, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
fdfawef324:feat/libScePad-unknown-zBsgF0q8DIM

Conversation

@fdfawef324

@fdfawef324 fdfawef324 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

Marvel's Wolverine (PPSA03671) stops at load with unresolved ELF import zBsgF0q8DIM from libScePad.prx. This exports that NID from libScePad as scePadUnknown_zBsgF0q8DIM, following scePadUnknown_n3kSX62fgNo: APS5_EXPORT with the NID, declared without parameters, and the body calls NotImplemented_nid_no_patch(__func__). With this change, tools/import_audit.py over the title's registries lists no absent import (the title was not run with it), and a call fails with a clear NotImplemented error naming the export.

The name is still unknown. The aerolib list pinned in tools/nid_names.py has no entry for the NID. I hashed with compute_nid, and nothing matched:

  • every scePad* name in SharpProspero (Interop/Pad/Pad.cs), shadPS4 (src/core/libraries/pad/pad.h, pad.cpp), OpenOrbis (include/orbis/Pad.h, PadTracker.h, the Pad docs page), aerolib and our Export.cpp;
  • about 6.1 million generated scePad* / scePadVrController* / scePadHd* / scePadHaptic* / sceUser* combinations of common verbs, nouns (trigger effect and its states, motion sensor state, angular velocity, tilt correction, vibration, haptics, HD, audio, light bar, player LED, controller and device information, and others) and suffixes (Ext, Ext2, ForMultiplePads, State(s) and others).

How the title calls it: the executable has an import stub for this NID, but no direct call or jump to that stub, no RIP-relative reference to it or to its GOT slot (other than from the stub itself), and no absolute copy of its address. With the same scan, the stubs for scePadReadState and scePadSetTriggerEffect do show their callers. So the argument count and whether the result is used could not be found, and the debt entry says so. It goes under Unknown function info in docs/dev/debt/libScePad.md.

No test is added. Main declared the PPSA02530 and PPSA29866 imports without one, and GuestPPSA01530Exports.cpp only calls each declared name and expects the generic not implemented error. A missing export already fails at startup, so adding to that list would be the export-only test CONTRIBUTING forbids.

Overlap: #4620 (open) also adds libScePad stubs and edits docs/dev/debt/libScePad.md. None of its 23 names hashes to this NID, but the two may conflict textually at the end of both files.

Tested

Windows Server 2025, WinLibs GCC 15.2.0, Release, main ea2bbef plus this commit:

  • tools/import_audit.py over copies of the title's registries (app plus the libc, libRenoirCore, libcohtml and libSceNpCppWebApi guest registries), with the title's own modules passed as --modules. On main, 1 import is absent (zBsgF0q8DIM, libScePad). With this change, 0 are absent and the import is listed as a throwing stub. The other 13 throwing stubs the title imports are unchanged: sceAcmBatchJobPriority, sceAgcDriverRequestCaptureStart/Stop, sceAudioOut2Set3DLatency, sceAudioOut2MasteringInit/SetParam, sceSaveDataGetConvertProgress, sceSaveDataCancel, _umtx_op, sceCoredumpGetStopInfoGpu_Agc, sceCoredumpSetUserDataType, sceCoredumpGetStopInfoCpu, __tls_get_addr.
  • ctest guest_pad and guest_ppsa01530_exports pass.
  • tools/check_conventions.py passes.

The title was not run.

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
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Progress report (d1b3aa1 → babc68d)

📉 System libraries: 88.17% (-0.02%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libScePad scePadUnknown_zBsgF0q8DIM

@github-actions

github-actions Bot commented Oct 13, 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
#5038 docs/dev/debt/libScePad.md L10

PPSA03671 fails to load because no library exports NID zBsgF0q8DIM from
libScePad. The NID database has no name for it and no candidate pad name
hashes to it, so it is exported under its NID as
scePadUnknown_zBsgF0q8DIM, declared without parameters, and throws when
called. Adds an Unknown function info entry to the libScePad debt file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fdfawef324
fdfawef324 force-pushed the feat/libScePad-unknown-zBsgF0q8DIM branch from 4050705 to babc68d Compare October 14, 2026 02:49
@oneandonlydean oneandonlydean self-assigned this Oct 14, 2026
@oneandonlydean
oneandonlydean merged commit 4a34ebd into boykopovar:main Oct 14, 2026
8 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.

2 participants