Exports for PPSA01530, PPSA23827 and PPSA13356 imports #3177

Closed
opened 2026-10-11 00:14:28 +00:00 by xXPBSXx · 13 comments
xXPBSXx commented 2026-10-11 00:14:28 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T00:14:28Z.


AI-assisted (Claude Code), reviewed by the contributor.

Three titles fail to load on Windows because of imports no library exports. Found with the relinker audit, fixed on one branch on current main: https://github.com/xXPBSXx/AnyPS5/tree/fix/export-ppsa01530-ppsa23827-ppsa13356-imports (tools/check_conventions.py passes; new tests guest_ppsa01530_exports and guest_ult_thread_underscoredcreate pass).

  • PPSA01530 (Puyo Puyo Tetris 2): _sceUltWaitingQueueResourcePoolCreate and _sceUltSemaphoreCreate are forwarded to the existing calls, the same way _sceUltUlthreadRuntimeCreate and its siblings already are (that the argument lists match is inferred from those siblings, not measured). sceNetShowIfconfig, sceNpWebApi2GetMemoryPoolStats and sce::Json::Value::setNullAccessCallBack are declared and throw "not implemented".
  • PPSA23827 (Cloudberry Kingdom): kqueue and kevent are declared and throw. They are BSD calls, not the sceKernel*Equeue family, so I did not forward them. I did not get this title to run past the audit (no .esbak ELF copy in my dump).
  • PPSA13356 (Raiden III): one pad import with no known name (NID n3kSX62fgNo) is declared under that NID and throws.

After the change the audit of PPSA01530 and PPSA13356 reports no absent imports. Signatures are unknown for all declared-only calls; they are listed in docs/dev/TechnicalDebt.md. Not opened as a PR because intake is paused for new contributors.

Next stop for Puyo Puyo Tetris 2 with these exports: compute shader 0x200169d00: AGC graphics: storage image access to depth/stencil surface ... is not implemented, the same error as in #1409 (I will add the detail there).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5796500517 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T00:14:28Z. --- AI-assisted (Claude Code), reviewed by the contributor. Three titles fail to load on Windows because of imports no library exports. Found with the relinker audit, fixed on one branch on current `main`: https://github.com/xXPBSXx/AnyPS5/tree/fix/export-ppsa01530-ppsa23827-ppsa13356-imports (`tools/check_conventions.py` passes; new tests `guest_ppsa01530_exports` and `guest_ult_thread_underscoredcreate` pass). - PPSA01530 (Puyo Puyo Tetris 2): `_sceUltWaitingQueueResourcePoolCreate` and `_sceUltSemaphoreCreate` are forwarded to the existing calls, the same way `_sceUltUlthreadRuntimeCreate` and its siblings already are (that the argument lists match is inferred from those siblings, not measured). `sceNetShowIfconfig`, `sceNpWebApi2GetMemoryPoolStats` and `sce::Json::Value::setNullAccessCallBack` are declared and throw "not implemented". - PPSA23827 (Cloudberry Kingdom): `kqueue` and `kevent` are declared and throw. They are BSD calls, not the `sceKernel*Equeue` family, so I did not forward them. I did not get this title to run past the audit (no `.esbak` ELF copy in my dump). - PPSA13356 (Raiden III): one pad import with no known name (NID `n3kSX62fgNo`) is declared under that NID and throws. After the change the audit of PPSA01530 and PPSA13356 reports no absent imports. Signatures are unknown for all declared-only calls; they are listed in `docs/dev/TechnicalDebt.md`. Not opened as a PR because intake is paused for new contributors. Next stop for Puyo Puyo Tetris 2 with these exports: `compute shader 0x200169d00: AGC graphics: storage image access to depth/stencil surface ... is not implemented`, the same error as in #1409 (I will add the detail there).
xXPBSXx commented 2026-10-11 00:26:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T00:26:16Z.


Update on PPSA23827 (Cloudberry Kingdom): the declared-only kqueue was not enough, the title calls it right after start-up. I captured the first kevent call with gdb: one change, ident 3 (a file descriptor), filter -4 (EVFILT_VNODE), flags 0x25 (EV_ADD|EV_ENABLE|EV_CLEAR), fflags 0x37 (NOTE_DELETE|NOTE_WRITE|NOTE_EXTEND|NOTE_LINK|NOTE_RENAME); the constants are from FreeBSD 11's sys/event.h. So it is a file watch.

I added one more commit to the branch (b4581629) that implements exactly that and nothing more: kqueue returns a placeholder descriptor, kevent accepts vnode registrations (they never fire), waits for the given timeout (or forever without one), and throws on any other filter. New test guest_kqueue; listed in docs/dev/TechnicalDebt.md with its limits.

With it the title ran 100 s without an error on Windows and was compiling shaders and creating textures when I stopped it. I did not look at the window, so I can not say what it shows.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103741210 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6103741210). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T00:26:16Z. --- Update on PPSA23827 (Cloudberry Kingdom): the declared-only `kqueue` was not enough, the title calls it right after start-up. I captured the first `kevent` call with gdb: one change, `ident` 3 (a file descriptor), `filter` -4 (`EVFILT_VNODE`), `flags` 0x25 (`EV_ADD|EV_ENABLE|EV_CLEAR`), `fflags` 0x37 (`NOTE_DELETE|NOTE_WRITE|NOTE_EXTEND|NOTE_LINK|NOTE_RENAME`); the constants are from FreeBSD 11's `sys/event.h`. So it is a file watch. I added one more commit to the branch (`b4581629`) that implements exactly that and nothing more: `kqueue` returns a placeholder descriptor, `kevent` accepts vnode registrations (they never fire), waits for the given timeout (or forever without one), and throws on any other filter. New test `guest_kqueue`; listed in `docs/dev/TechnicalDebt.md` with its limits. With it the title ran 100 s without an error on Windows and was compiling shaders and creating textures when I stopped it. I did not look at the window, so I can not say what it shows. AI-assisted (Claude Code).
danzaio commented 2026-10-11 01:42:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by danzaio on 2026-10-11T01:42:40Z.


Windows validation for this branch.

Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release, BUILD_TESTING=ON, branch b4581629a: guest_ppsa01530_exports and the guest_ult_thread set pass 6/6.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104296860 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6104296860). Originally posted by [danzaio](https://github.com/danzaio) on 2026-10-11T01:42:40Z. --- Windows validation for this branch. Windows 11, MinGW-w64 GCC 15.2.0 (WinLibs r7), Ninja, Release, BUILD_TESTING=ON, branch b4581629a: guest_ppsa01530_exports and the guest_ult_thread set pass 6/6. AI-assisted: yes.
orishamir commented 2026-10-11 08:01:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by orishamir on 2026-10-11T08:01:29Z.


Linux replica of fix/export-ppsa01530-ppsa23827-ppsa13356-imports (b4581629), since the runs above are Windows. Branch merged onto main 2bb78d2c (clean; the diff stays the branch's 13 files, +305/-1), CI's linux job replicated: ubuntu 24.04, GCC 13.3, Mesa 25.2.8 llvmpipe, ctest --parallel 4 --timeout 120.

  • Build clean. guest_ppsa01530_exports, guest_kqueue and the five guest_ult_thread_* cases (underscoredcreate included) pass 3/3. Full suite 792/793; the one failure is agc_driver_image_plane_address_on_line_implicit_lod, which fails on main the same way (#3222).
  • Revert-pin: main's libSceUlt/Export.cpp with the branch's tests fails to link (undefined reference to _sceUltWaitingQueueResourcePoolCreate); restored, the five cases pass again.

AI-assisted: yes (Claude Code Fable 5.1 xhigh)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106927911 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6106927911). Originally posted by [orishamir](https://github.com/orishamir) on 2026-10-11T08:01:29Z. --- Linux replica of `fix/export-ppsa01530-ppsa23827-ppsa13356-imports` (b4581629), since the runs above are Windows. Branch merged onto `main` 2bb78d2c (clean; the diff stays the branch's 13 files, +305/-1), CI's `linux` job replicated: ubuntu 24.04, GCC 13.3, Mesa 25.2.8 llvmpipe, `ctest --parallel 4 --timeout 120`. - Build clean. `guest_ppsa01530_exports`, `guest_kqueue` and the five `guest_ult_thread_*` cases (`underscoredcreate` included) pass 3/3. Full suite 792/793; the one failure is `agc_driver_image_plane_address_on_line_implicit_lod`, which fails on `main` the same way (#3222). - Revert-pin: `main`'s `libSceUlt/Export.cpp` with the branch's tests fails to link (`undefined reference to _sceUltWaitingQueueResourcePoolCreate`); restored, the five cases pass again. AI-assisted: yes (Claude Code Fable 5.1 xhigh)
reyani-dev commented 2026-10-11 08:06:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-11T08:06:18Z.


Carried your first two commits (e5831c99, 2eb35317) unchanged as #3337: the exports and the throwing kqueue/kevent. On Windows 11 / GCC 15.2, guest_ppsa01530_exports, the guest_ult_thread_* tests and guest_pad pass 3/3.

I left out b4581629 (the EVFILT_VNODE kqueue/kevent) for two reasons you may want to look at before it goes up on its own:

  1. Stale registrations. queues is keyed by the placeholder descriptor and is never cleared when the guest closes it. If that descriptor number is later reused for an ordinary file, kevent on it finds the old entry, DescriptorIsOpen_nid_no_patch is true, and the file is treated as a kqueue instead of failing with EBADF. Forgetting the entry in sceKernelClose (as ForgetRandomDevice/ForgetDirectoryDescriptor do) would fix that.
  2. Waits that never return. With no timeout, kevent sleeps in one-hour steps forever, without a cancellation check. A watch that can never fire is the kind of "accept and do nothing" path the project usually asks to throw instead, unless a title is shown to need it. For Cloudberry Kingdom you found that the throwing version stops it right after start-up, so the log line for that stop would help justify the never-firing watch.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106965499 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6106965499). Originally posted by [reyani-dev](https://github.com/reyani-dev) on 2026-10-11T08:06:18Z. --- Carried your first two commits (`e5831c99`, `2eb35317`) unchanged as #3337: the exports and the throwing `kqueue`/`kevent`. On Windows 11 / GCC 15.2, `guest_ppsa01530_exports`, the `guest_ult_thread_*` tests and `guest_pad` pass 3/3. I left out `b4581629` (the `EVFILT_VNODE` `kqueue`/`kevent`) for two reasons you may want to look at before it goes up on its own: 1. **Stale registrations.** `queues` is keyed by the placeholder descriptor and is never cleared when the guest closes it. If that descriptor number is later reused for an ordinary file, `kevent` on it finds the old entry, `DescriptorIsOpen_nid_no_patch` is true, and the file is treated as a kqueue instead of failing with `EBADF`. Forgetting the entry in `sceKernelClose` (as `ForgetRandomDevice`/`ForgetDirectoryDescriptor` do) would fix that. 2. **Waits that never return.** With no timeout, `kevent` sleeps in one-hour steps forever, without a cancellation check. A watch that can never fire is the kind of "accept and do nothing" path the project usually asks to throw instead, unless a title is shown to need it. For Cloudberry Kingdom you found that the throwing version stops it right after start-up, so the log line for that stop would help justify the never-firing watch.
xXPBSXx commented 2026-10-11 14:08:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T14:08:09Z.


Thank you @AchrafReyani for carrying this (#3337, merged). One part is not on main: the commit b4581629 on the same branch implements kqueue and kevent for the one use I measured (Cloudberry Kingdom registers a single EVFILT_VNODE watch and then runs on), while main still has the two as throwing stubs, so Cloudberry (PPSA23827) still stops at kqueue_nid_postfix not implemented. I'm rebasing that commit onto current main as its own branch (it also has to drop the stubs and the two names from GuestPPSA01530Exports) and will link it here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109873896 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6109873896). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T14:08:09Z. --- Thank you @AchrafReyani for carrying this (#3337, merged). One part is not on `main`: the commit `b4581629` on the same branch implements `kqueue` and `kevent` for the one use I measured (Cloudberry Kingdom registers a single `EVFILT_VNODE` watch and then runs on), while `main` still has the two as throwing stubs, so Cloudberry (PPSA23827) still stops at `kqueue_nid_postfix not implemented`. I'm rebasing that commit onto current `main` as its own branch (it also has to drop the stubs and the two names from `GuestPPSA01530Exports`) and will link it here. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 14:14:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T14:14:21Z.


The kqueue/kevent implementation is rebased onto current main (a11c8f7f7) as its own branch: https://github.com/xXPBSXx/AnyPS5/tree/feat/libkernel-kqueue-vnode-v2 (one commit: Equeue/src/Kqueue.cpp, the two stubs and their entries in GuestPPSA01530Exports removed, new test guest_kqueue, TechnicalDebt entry with its limits). guest_kqueue and guest_ppsa01530_exports and the conventions check pass. With it Cloudberry Kingdom (PPSA23827) gets past kqueue; as measured earlier, its one EVFILT_VNODE watch (fd 3, EV_ADD|EV_ENABLE|EV_CLEAR, NOTE_DELETE|WRITE|EXTEND|LINK|RENAME) is what it registers.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109928221 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6109928221). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T14:14:21Z. --- The `kqueue`/`kevent` implementation is rebased onto current `main` (a11c8f7f7) as its own branch: https://github.com/xXPBSXx/AnyPS5/tree/feat/libkernel-kqueue-vnode-v2 (one commit: `Equeue/src/Kqueue.cpp`, the two stubs and their entries in `GuestPPSA01530Exports` removed, new test `guest_kqueue`, TechnicalDebt entry with its limits). `guest_kqueue` and `guest_ppsa01530_exports` and the conventions check pass. With it Cloudberry Kingdom (PPSA23827) gets past `kqueue`; as measured earlier, its one `EVFILT_VNODE` watch (fd 3, `EV_ADD|EV_ENABLE|EV_CLEAR`, `NOTE_DELETE|WRITE|EXTEND|LINK|RENAME`) is what it registers. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 18:29:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T18:29:35Z.


Raiden III x MIKADO MANIAX (PPSA13356) on current main a11c8f7f7, Windows, relinked from the decrypted ELF (2 modules, 0 absent imports in the import audit): a 60 s run aborts at start-up on

what():  scePadUnknown_n3kSX62fgNo not implemented
FATAL: abort() (SIGABRT)

This is the declared, parameterless stub (libScePad/Export.cpp), so it is the one call from this issue's imports that this title still reaches. What a gdb breakpoint on it shows (60 s run under the game lock, one hit): the call is call <thunk> with rdi pointing to a small heap object that the title created just before (a 1-byte allocation constructed by its own code and kept in a global); rsi, rdx, rcx, r8, r9 hold values left over from earlier code, so there is no evidence of a second argument. In the 10 instructions after the call the return value in rax is not read: the next instruction loads another global into rbx, and the code goes on constructing the next singletons. I did not follow what the callee would do with the object, so this does not give a signature, and I am not proposing an implementation: whether returning 0 without touching the object is correct is unknown.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6112266154 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6112266154). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T18:29:35Z. --- Raiden III x MIKADO MANIAX (PPSA13356) on current `main` a11c8f7f7, Windows, relinked from the decrypted ELF (2 modules, 0 absent imports in the import audit): a 60 s run aborts at start-up on ``` what(): scePadUnknown_n3kSX62fgNo not implemented FATAL: abort() (SIGABRT) ``` This is the declared, parameterless stub (`libScePad/Export.cpp`), so it is the one call from this issue's imports that this title still reaches. What a gdb breakpoint on it shows (60 s run under the game lock, one hit): the call is `call <thunk>` with `rdi` pointing to a small heap object that the title created just before (a 1-byte allocation constructed by its own code and kept in a global); `rsi`, `rdx`, `rcx`, `r8`, `r9` hold values left over from earlier code, so there is no evidence of a second argument. In the 10 instructions after the call the return value in `rax` is not read: the next instruction loads another global into `rbx`, and the code goes on constructing the next singletons. I did not follow what the callee would do with the object, so this does not give a signature, and I am not proposing an implementation: whether returning 0 without touching the object is correct is unknown. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 20:59:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T20:59:06Z.


Raiden III x MIKADO MANIAX (PPSA13356) on main (0a8b1d32b, plain main, after #3337 merged), 120 s run: it now stops at scePadUnknown_n3kSX62fgNo not implemented (std::runtime_error, abort). The export exists as a throwing stub with no known name or signature, so the title cannot go on until someone with a source for that call decides what it returns. Not checked: what the title does with the result.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113687048 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6113687048). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T20:59:06Z. --- Raiden III x MIKADO MANIAX (PPSA13356) on `main` (`0a8b1d32b`, plain main, after #3337 merged), 120 s run: it now stops at `scePadUnknown_n3kSX62fgNo not implemented` (`std::runtime_error`, abort). The export exists as a throwing stub with no known name or signature, so the title cannot go on until someone with a source for that call decides what it returns. Not checked: what the title does with the result. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 21:26:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T21:26:29Z.


Sources for scePadUnknown_n3kSX62fgNo (NID n3kSX62fgNo), searched on GitHub code search; none gives a name or a signature:

  • KytyPS5 (src/libs/libPad.cpp, PadUnknownN3kSX62fgNo): takes six uint64_t arguments, logs them as "argc-style args", zero-fills arg3 bytes at arg0 when arg0 >= 0x10000 and 0 < arg3 <= 0x1000, and returns 0. The six-argument form and the zero fill are a guess; nothing in it says what the call is.
  • sharpemu (SharpEmu.Libs/Pad/PadExports.cs): same NID under scePadUnknownN3kSX62fgNo, libScePad, Gen5 only, and it just returns 0 without touching memory.
  • Other listings (ps5rs, PS5PCEM, craziiEmu's test list, MagnusPS5/KytyPlus forks) carry the same "Unknown" name or copy KytyPS5; none has a real name or a parameter list.

So the two implementations disagree about whether the call writes to memory, and neither documents what it is. What I measured in Raiden III is in the comment above: one pointer argument (rdi, a small object the title created) and the return value is not used in the next instructions. That fits both guesses and decides neither. What would settle it is a call on a console, for example with a buffer filled with a known pattern as rdi and the other registers varied, to see whether anything is written and what is returned; a console oracle capture like the ones prosper keeps for other libraries would do. Until then I would not implement it.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113953454 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6113953454). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T21:26:29Z. --- Sources for `scePadUnknown_n3kSX62fgNo` (NID `n3kSX62fgNo`), searched on GitHub code search; none gives a name or a signature: - **KytyPS5** (`src/libs/libPad.cpp`, `PadUnknownN3kSX62fgNo`): takes six `uint64_t` arguments, logs them as "argc-style args", zero-fills `arg3` bytes at `arg0` when `arg0 >= 0x10000` and `0 < arg3 <= 0x1000`, and returns 0. The six-argument form and the zero fill are a guess; nothing in it says what the call is. - **sharpemu** (`SharpEmu.Libs/Pad/PadExports.cs`): same NID under `scePadUnknownN3kSX62fgNo`, `libScePad`, Gen5 only, and it just returns 0 without touching memory. - Other listings (ps5rs, PS5PCEM, craziiEmu's test list, MagnusPS5/KytyPlus forks) carry the same "Unknown" name or copy KytyPS5; none has a real name or a parameter list. So the two implementations disagree about whether the call writes to memory, and neither documents what it is. What I measured in Raiden III is in the comment above: one pointer argument (`rdi`, a small object the title created) and the return value is not used in the next instructions. That fits both guesses and decides neither. What would settle it is a call on a console, for example with a buffer filled with a known pattern as `rdi` and the other registers varied, to see whether anything is written and what is returned; a console oracle capture like the ones prosper keeps for other libraries would do. Until then I would not implement it. AI-assisted (Claude Code).
overlordxrz-source commented 2026-10-12 07:33:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by overlordxrz-source on 2026-10-12T07:33:53Z.


@hugodearaujo, would you have time to run a small probe on your PS5 for this one? Your console measurements for libSceRudp (#3073) and in #1397/#1407/#1496 are what this needs, and I copied your approach directly. It uses ps5-payload-sdk v0.43, prospero-clang -O1 -rdynamic, dlopen("libScePad.sprx"), and the same probe.h on TCP 9301.

The probe is at https://gist.github.com/overlordxrz-source/45b691cae9351253ef627110d758e618 (pad_n3kSX62fgNo/). It looks up n3kSX62fgNo both by raw NID through dlsym and through kernel_dynlib_resolve. Then it calls the function with rdi pointing into a canary-filled buffer that has PROT_NONE guard pages on each side. That covers the title's case (a single pointer to a small object; see xXPBSXx's trace above), including a 1-byte object, and runs before and after scePadInit, with and without a scePadOpen handle. A few extra variants test KytyPS5's "arg3 bytes zero-filled at arg0" guess. Each case prints the return value and exactly which bytes changed. NULL and a guard-page pointer run last, under a SIGSEGV catcher. The probe does not unload or terminate anything except the pad handle it opens itself.

It compiles against the SDK, but I have not run it on a console. Pasting pad_probe.txt from PROBE| to PROBE DONE would show whether SharpEmu's "return 0, touch nothing" or KytyPS5's zero-fill is right.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6119814921 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6119814921). Originally posted by [overlordxrz-source](https://github.com/overlordxrz-source) on 2026-10-12T07:33:53Z. --- @hugodearaujo, would you have time to run a small probe on your PS5 for this one? Your console measurements for `libSceRudp` (#3073) and in #1397/#1407/#1496 are what this needs, and I copied your approach directly. It uses ps5-payload-sdk v0.43, `prospero-clang -O1 -rdynamic`, `dlopen("libScePad.sprx")`, and the same `probe.h` on TCP 9301. The probe is at https://gist.github.com/overlordxrz-source/45b691cae9351253ef627110d758e618 (`pad_n3kSX62fgNo/`). It looks up `n3kSX62fgNo` both by raw NID through `dlsym` and through `kernel_dynlib_resolve`. Then it calls the function with `rdi` pointing into a canary-filled buffer that has `PROT_NONE` guard pages on each side. That covers the title's case (a single pointer to a small object; see xXPBSXx's trace above), including a 1-byte object, and runs before and after `scePadInit`, with and without a `scePadOpen` handle. A few extra variants test KytyPS5's "arg3 bytes zero-filled at arg0" guess. Each case prints the return value and exactly which bytes changed. NULL and a guard-page pointer run last, under a SIGSEGV catcher. The probe does not unload or terminate anything except the pad handle it opens itself. It compiles against the SDK, but I have not run it on a console. Pasting `pad_probe.txt` from `PROBE|` to `PROBE DONE` would show whether SharpEmu's "return 0, touch nothing" or KytyPS5's zero-fill is right. AI-assisted: yes
hugodearaujo commented 2026-10-13 14:55:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-13T14:55:32Z.


Ran pad_n3kSX62fgNo on my PS5 (firmware 13.60), unchanged from the gist, code dump left off.

  • Before scePadInit: returns 0x80920005.
  • After scePadInit (rc 0): returns 0x809200FF in all 12 cases (pointer with zeros, KytyPS5's length variants 0x10–0x1000, a1..a5=1, a second pointer, repeat, the 1-byte object, NULL and the guard-page pointer).
  • No byte changed in any case, inside or around the window, and NULL or the guard-page pointer did not fault, so the call did not touch rdi at all here.

So neither guess matches: it does not zero-fill (KytyPS5) and does not return 0 (SharpEmu). One limit: scePadOpen failed in the payload (0x809b0081; sceUserServiceInitialize gave 0x80960005, the payload is not a game process), so the "open handle" cases did not run, and the answer could differ in a title with an open pad.

pad_probe.txt
PROBE|pad_n3kSX62fgNo|fw=0x13600007|pid=97
STEP|dlopen
RESOLVE|libScePad.sprx|n3kSX62fgNo|nid=n3kSX62fgNo|dlsym=80049b5b0|kernel=80049b5b0|mapbase=800498000|off=0x35b0|ok
RESOLVE|libScePad.sprx|scePadInit|nid=hv1luiJrqQM|dlsym=800498bc0|kernel=800498bc0|mapbase=800498000|off=0xbc0|ok
RESOLVE|libScePad.sprx|scePadOpen|nid=xk0AcarP3V4|dlsym=800498fb0|kernel=800498fb0|mapbase=800498000|off=0xfb0|ok
RESOLVE|libScePad.sprx|scePadClose|nid=6ncge5+l5Qs|dlsym=8004996d0|kernel=8004996d0|mapbase=800498000|off=0x16d0|ok
RESOLVE|libScePad.sprx|scePadTerminate|nid=dwcZK5O9co4|dlsym=0|kernel=0|mapbase=800498000|off=0xfffffff7ffb68000|ok
CODE|n3kSX62fgNo|addr=80049b5b0|not dumped (opt-in: build with CFLAGS+=-DPROBE_DUMP_CODE)
REGION|rw=200020000|len=0x4000|user=200021e00|ulen=0x400|canary=0x5a|userfill=0xa5
STEP|pre-init|ptr|zeros|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000
CASE|pre-init|ptr|zeros|rc=0000000080920005 (low32=80920005)
DIFFSUM|pre-init|ptr|zeros|changed=0|runs=0|before_user=0|in_user=0|after_user=0
INIT|scePadInit|rc=00000000
STEP|post-init|ptr|zeros|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000
CASE|post-init|ptr|zeros|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|ptr|zeros|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|ptr|len=0x10|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000010 a4=0000000000000000 a5=0000000000000000
CASE|post-init|ptr|len=0x10|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|ptr|len=0x10|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|ptr|len=0x100|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000100 a4=0000000000000000 a5=0000000000000000
CASE|post-init|ptr|len=0x100|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|ptr|len=0x100|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|ptr|len=0x400|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000400 a4=0000000000000000 a5=0000000000000000
CASE|post-init|ptr|len=0x400|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|ptr|len=0x400|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|ptr|len=0x1000|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000001000 a4=0000000000000000 a5=0000000000000000
CASE|post-init|ptr|len=0x1000|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|ptr|len=0x1000|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|ptr|a1..a5=1|a0=0000000200021e00 a1=0000000000000001 a2=0000000000000001 a3=0000000000000001 a4=0000000000000001 a5=0000000000000001
CASE|post-init|ptr|a1..a5=1|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|ptr|a1..a5=1|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|ptr|a1=ptr|a0=0000000200021e00 a1=0000000200021e00 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000
CASE|post-init|ptr|a1=ptr|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|ptr|a1=ptr|changed=0|runs=0|before_user=0|in_user=0|after_user=0
USER|init rc=80960005
USER|initial user rc=80960002 id=0
OPEN|scePadOpen(user=0,0,0,NULL)|rc=809b0081
STEP|post-init|ptr|repeat|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000
CASE|post-init|ptr|repeat|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|ptr|repeat|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|1-byte-object|a0=000000020002dfff a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000
CASE|post-init|1-byte-object|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|1-byte-object|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|null|a0=0000000000000000 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000
CASE|post-init|null|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|null|changed=0|runs=0|before_user=0|in_user=0|after_user=0
STEP|post-init|guard-page-ptr|a0=000000020001c000 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000
CASE|post-init|guard-page-ptr|rc=00000000809200ff (low32=809200ff)
DIFFSUM|post-init|guard-page-ptr|changed=0|runs=0|before_user=0|in_user=0|after_user=0
PROBE DONE

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6148413415 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6148413415). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-13T14:55:32Z. --- Ran `pad_n3kSX62fgNo` on my PS5 (firmware 13.60), unchanged from the gist, code dump left off. - Before `scePadInit`: returns `0x80920005`. - After `scePadInit` (rc 0): returns `0x809200FF` in all 12 cases (pointer with zeros, KytyPS5's length variants 0x10–0x1000, a1..a5=1, a second pointer, repeat, the 1-byte object, NULL and the guard-page pointer). - No byte changed in any case, inside or around the window, and NULL or the guard-page pointer did not fault, so the call did not touch `rdi` at all here. So neither guess matches: it does not zero-fill (KytyPS5) and does not return 0 (SharpEmu). One limit: `scePadOpen` failed in the payload (`0x809b0081`; `sceUserServiceInitialize` gave `0x80960005`, the payload is not a game process), so the "open handle" cases did not run, and the answer could differ in a title with an open pad. <details><summary>pad_probe.txt</summary> ```text PROBE|pad_n3kSX62fgNo|fw=0x13600007|pid=97 STEP|dlopen RESOLVE|libScePad.sprx|n3kSX62fgNo|nid=n3kSX62fgNo|dlsym=80049b5b0|kernel=80049b5b0|mapbase=800498000|off=0x35b0|ok RESOLVE|libScePad.sprx|scePadInit|nid=hv1luiJrqQM|dlsym=800498bc0|kernel=800498bc0|mapbase=800498000|off=0xbc0|ok RESOLVE|libScePad.sprx|scePadOpen|nid=xk0AcarP3V4|dlsym=800498fb0|kernel=800498fb0|mapbase=800498000|off=0xfb0|ok RESOLVE|libScePad.sprx|scePadClose|nid=6ncge5+l5Qs|dlsym=8004996d0|kernel=8004996d0|mapbase=800498000|off=0x16d0|ok RESOLVE|libScePad.sprx|scePadTerminate|nid=dwcZK5O9co4|dlsym=0|kernel=0|mapbase=800498000|off=0xfffffff7ffb68000|ok CODE|n3kSX62fgNo|addr=80049b5b0|not dumped (opt-in: build with CFLAGS+=-DPROBE_DUMP_CODE) REGION|rw=200020000|len=0x4000|user=200021e00|ulen=0x400|canary=0x5a|userfill=0xa5 STEP|pre-init|ptr|zeros|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000 CASE|pre-init|ptr|zeros|rc=0000000080920005 (low32=80920005) DIFFSUM|pre-init|ptr|zeros|changed=0|runs=0|before_user=0|in_user=0|after_user=0 INIT|scePadInit|rc=00000000 STEP|post-init|ptr|zeros|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000 CASE|post-init|ptr|zeros|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|ptr|zeros|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|ptr|len=0x10|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000010 a4=0000000000000000 a5=0000000000000000 CASE|post-init|ptr|len=0x10|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|ptr|len=0x10|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|ptr|len=0x100|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000100 a4=0000000000000000 a5=0000000000000000 CASE|post-init|ptr|len=0x100|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|ptr|len=0x100|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|ptr|len=0x400|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000400 a4=0000000000000000 a5=0000000000000000 CASE|post-init|ptr|len=0x400|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|ptr|len=0x400|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|ptr|len=0x1000|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000001000 a4=0000000000000000 a5=0000000000000000 CASE|post-init|ptr|len=0x1000|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|ptr|len=0x1000|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|ptr|a1..a5=1|a0=0000000200021e00 a1=0000000000000001 a2=0000000000000001 a3=0000000000000001 a4=0000000000000001 a5=0000000000000001 CASE|post-init|ptr|a1..a5=1|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|ptr|a1..a5=1|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|ptr|a1=ptr|a0=0000000200021e00 a1=0000000200021e00 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000 CASE|post-init|ptr|a1=ptr|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|ptr|a1=ptr|changed=0|runs=0|before_user=0|in_user=0|after_user=0 USER|init rc=80960005 USER|initial user rc=80960002 id=0 OPEN|scePadOpen(user=0,0,0,NULL)|rc=809b0081 STEP|post-init|ptr|repeat|a0=0000000200021e00 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000 CASE|post-init|ptr|repeat|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|ptr|repeat|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|1-byte-object|a0=000000020002dfff a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000 CASE|post-init|1-byte-object|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|1-byte-object|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|null|a0=0000000000000000 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000 CASE|post-init|null|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|null|changed=0|runs=0|before_user=0|in_user=0|after_user=0 STEP|post-init|guard-page-ptr|a0=000000020001c000 a1=0000000000000000 a2=0000000000000000 a3=0000000000000000 a4=0000000000000000 a5=0000000000000000 CASE|post-init|guard-page-ptr|rc=00000000809200ff (low32=809200ff) DIFFSUM|post-init|guard-page-ptr|changed=0|runs=0|before_user=0|in_user=0|after_user=0 PROBE DONE ``` </details> AI-assisted: yes
MarcZX10 commented 2026-10-14 06:01:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T06:01:05Z.


Opened #5676 with the status-only behavior measured in the firmware 13.60 probe: 0x80920005 before scePadInit and 0x809200ff afterward. It does not infer the NID name/signature or controller-open behavior; I have not verified whether this lets PPSA13356 proceed further.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6161995089 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6161995089). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T06:01:05Z. --- Opened #5676 with the status-only behavior measured in the firmware 13.60 probe: `0x80920005` before `scePadInit` and `0x809200ff` afterward. It does not infer the NID name/signature or controller-open behavior; I have not verified whether this lets PPSA13356 proceed further.
overlordxrz-source commented 2026-10-14 19:34:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by overlordxrz-source on 2026-10-14T19:34:46Z.


@hugodearaujo thank you, this is exactly the data we were missing.

So on 13.60, n3kSX62fgNo returns 0x80920005 before scePadInit and 0x809200FF after it, and it never touches rdi (NULL and the guard page don't fault). Neither emulator's guess holds: KytyPS5 zero-fills a buffer the console never writes, and SharpEmu returns 0 where the console returns an error.

The open question is the one you flagged: whether 0x809200FF is just what a non-game process gets. Since the console never writes through rdi in any case, the part I'd take into an implementation now is "no memory writes, 0x80920005 before init". I won't open a PR for the post-init return value until a game process confirms it. If you ever run it from a homebrew app that has a pad open, that one line would settle it.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6176687321 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3177#issuecomment-6176687321). Originally posted by [overlordxrz-source](https://github.com/overlordxrz-source) on 2026-10-14T19:34:46Z. --- @hugodearaujo thank you, this is exactly the data we were missing. So on 13.60, `n3kSX62fgNo` returns `0x80920005` before `scePadInit` and `0x809200FF` after it, and it never touches `rdi` (NULL and the guard page don't fault). Neither emulator's guess holds: KytyPS5 zero-fills a buffer the console never writes, and SharpEmu returns 0 where the console returns an error. The open question is the one you flagged: whether `0x809200FF` is just what a non-game process gets. Since the console never writes through `rdi` in any case, the part I'd take into an implementation now is "no memory writes, `0x80920005` before init". I won't open a PR for the post-init return value until a game process confirms it. If you ever run it from a homebrew app that has a pad open, that one line would settle it. AI-assisted: yes
Sign in to join this conversation.
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#3177
No description provided.