KytyPS5 comparison: export gaps needing maintainer direction (ASan module, Psml NIDs, LoginDialog, throwing surface) #12063

Closed
opened 2026-10-27 18:16:35 +00:00 by akkadbakkad89 · 0 comments
akkadbakkad89 commented 2026-10-27 18:16:35 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-27T18:16:35Z.


While cross-checking KytyPS5's registered exports (~1,554, resolved by NID against the full aerolib db) against this tree, a few real gaps surfaced that are not portable 1:1 — Kyty is an emulator (virtual scheduler/memory/DSP), AnyPS5 is a translation layer, so same-named functions can carry different semantics. Posting for maintainer direction before implementing; happy to take any of these up if the approach is agreed.

1. libSceDbgAddressSanitizer — whole module absent

Kyty's libDbgAsan.cpp registers 7 real firmware exports: __asan_init, __asan_version_mismatch_check_v8, __asan_register_elf_globals, __asan_before_dynamic_init, __asan_after_dynamic_init, __asan_memcpy, __asan_memset. AnyPS5 has libSceDbgAssist and libSceDbgThreadSanitizer but no ASan module. These are dev-instrumented-build imports; titles shipping with ASan would fail at import resolution. Options: minimal silent module (registration + passthrough memcpy/memset) vs. a real shadow-memory implementation — the former is what the relinker probably wants since the host isn't instrumented.

2. libScePsml — 5 unresolvable NIDs registered by Kyty

Kyty registers PsmlGetContextMemoryRequirements (x3 distinct NIDs: EO9YQXmJEN8, IMlj247LdTo, sjTyYheKTrU) and PsmlContextInitialize (x2: 2ecEbQaf9VU, vUk2pWMx3KQ) that do not resolve in aerolib — likely newer-firmware scePsmlMfsrGetContextBufferRequirement/CreateContext variants beyond the 3.20 inventory, or invented names. AnyPS5 already implements the MFSR surface (scePsmlMfsrCreateContext1100, 800M3_2, 1300, etc.). If these are real firmware NIDs for additional context variants, adding them as aliases to the existing MFSR bodies is mechanical — needs someone to confirm the NIDs against a newer firmware first.

3. sceLoginDialogParamInitialize — struct-layout drift

Real missing export, but Kyty's LoginDialogParam layout (exclude_users_from_login_list[4]/logout_list[4]/initial_focus) differs from AnyPS5's 64-byte struct (size, mode, userIds[9], reserved[5] — static_assert(sizeof == 64)). The correct fill semantics for this layout version need verifying against firmware before a ParamInitialize can be trusted — guessing the wrong invalid-marker convention would silently misinitialize user lists.

4. Exported-but-throwing surface where Kyty has bodies (needs case-by-case calls)

Kyty implements bodies for exports AnyPS5 registers but throws on. Some are almost certainly emulator-owned (their bodies reference Kyty's virtual devices/scheduler) and shouldn't be ported; others may be tractable:

  • libSceHttp2 — all 26 exports (Kyty has a full client impl; upstream work tracked separately under #11575's family — flagging only for completeness)
  • libSceHmd2 — the 9-export Reprojection* surface (emulator reprojection model)
  • libSceRemoteplay — Initialize/Terminate/GetConnectionStatus
  • libScePad — IsRemoteController, VrControllerReadState, VrControllerSetTriggerEffects
  • libSceUserService — accessibility chat-transcription / vibration / trigger-effect getters
  • libkernel — sceKernelCreateSema, pthread_condattr_setclock, pwrite (libkernel_sys)
  • libSceAjm — sceAjmBatchJobControl
  • libScePngDec/libSceJpegDec — QueryMemorySize
  • libSceNpEntitlementAccess — Initialize
  • libSceFontFt — SelectLibraryFt, SelectRendererFt
  • libSceVideoOut — SetFlipMaster, IsFlipPending
  • libSceAmpr — AmmGetVirtualAddressRanges, AmmSetPageTablePoolOccupancyNotificationThreshold
  • libSceAgc — sceAgcSuspendPoint
  • libSceAudioOut — sceAudioOut2SetSystemDebugState
  • libSceKeyboard, libSceMouse, libScePlayGo, libSceNpManager, libSceGameLiveStreaming — one export each

Verified non-gaps (checked, ruling out)

  • libSceAcm FFT/panner — Kyty's AcmFft/AcmIfft/AcmPanner/ConvReverb* bodies are literal no-ops (advance a fake batch offset, return OK). AnyPS5 already exports the full surface with recovered signatures and documents the same no-op batching in docs/dev/debt/libSceAcm.md. The real DSP runs on the console's coprocessor; neither tree can source it — nothing to port.
  • AudioOut2 / Coredump / DeviceService / Json2-mangled — Kyty groups them as separate modules; AnyPS5 covers them inside libSceAudioOut, libkernel (sceCoredump*), libSceMbus, and the _ZN3sce4Json* surface.
  • Fiber, Ampr plain emitters, kernel umtx/sema basics, libc internals — present under _nid_postfix names, versioned _04_00 forms, or sibling modules.

The directly-portable residue (Json2 C2/D2 aliases + 3 Ampr measure helpers) went up as #12061.

I can take any of sections 1–4 up once maintainers confirm the intended semantics/module boundaries — just say which.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6065127225 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/12063). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-27T18:16:35Z. --- While cross-checking KytyPS5's registered exports (~1,554, resolved by NID against the full aerolib db) against this tree, a few real gaps surfaced that are **not** portable 1:1 — Kyty is an emulator (virtual scheduler/memory/DSP), AnyPS5 is a translation layer, so same-named functions can carry different semantics. Posting for maintainer direction before implementing; happy to take any of these up if the approach is agreed. ## 1. libSceDbgAddressSanitizer — whole module absent Kyty's `libDbgAsan.cpp` registers 7 real firmware exports: `__asan_init`, `__asan_version_mismatch_check_v8`, `__asan_register_elf_globals`, `__asan_before_dynamic_init`, `__asan_after_dynamic_init`, `__asan_memcpy`, `__asan_memset`. AnyPS5 has `libSceDbgAssist` and `libSceDbgThreadSanitizer` but no ASan module. These are dev-instrumented-build imports; titles shipping with ASan would fail at import resolution. Options: minimal silent module (registration + passthrough memcpy/memset) vs. a real shadow-memory implementation — the former is what the relinker probably wants since the host isn't instrumented. ## 2. libScePsml — 5 unresolvable NIDs registered by Kyty Kyty registers `PsmlGetContextMemoryRequirements` (x3 distinct NIDs: `EO9YQXmJEN8`, `IMlj247LdTo`, `sjTyYheKTrU`) and `PsmlContextInitialize` (x2: `2ecEbQaf9VU`, `vUk2pWMx3KQ`) that do **not** resolve in aerolib — likely newer-firmware `scePsmlMfsrGetContextBufferRequirement`/`CreateContext` variants beyond the 3.20 inventory, or invented names. AnyPS5 already implements the MFSR surface (`scePsmlMfsrCreateContext1100`, `800M3_2`, `1300`, etc.). If these are real firmware NIDs for additional context variants, adding them as aliases to the existing MFSR bodies is mechanical — needs someone to confirm the NIDs against a newer firmware first. ## 3. sceLoginDialogParamInitialize — struct-layout drift Real missing export, but Kyty's `LoginDialogParam` layout (`exclude_users_from_login_list[4]`/`logout_list[4]`/`initial_focus`) differs from AnyPS5's 64-byte struct (`size`, `mode`, `userIds[9]`, `reserved[5]` — `static_assert(sizeof == 64)`). The correct fill semantics for *this* layout version need verifying against firmware before a `ParamInitialize` can be trusted — guessing the wrong invalid-marker convention would silently misinitialize user lists. ## 4. Exported-but-throwing surface where Kyty has bodies (needs case-by-case calls) Kyty implements bodies for exports AnyPS5 registers but throws on. Some are almost certainly emulator-owned (their bodies reference Kyty's virtual devices/scheduler) and shouldn't be ported; others may be tractable: - `libSceHttp2` — all 26 exports (Kyty has a full client impl; upstream work tracked separately under #11575's family — flagging only for completeness) - `libSceHmd2` — the 9-export `Reprojection*` surface (emulator reprojection model) - `libSceRemoteplay` — `Initialize`/`Terminate`/`GetConnectionStatus` - `libScePad` — `IsRemoteController`, `VrControllerReadState`, `VrControllerSetTriggerEffects` - `libSceUserService` — accessibility chat-transcription / vibration / trigger-effect getters - `libkernel` — `sceKernelCreateSema`, `pthread_condattr_setclock`, `pwrite` (libkernel_sys) - `libSceAjm` — `sceAjmBatchJobControl` - `libScePngDec`/`libSceJpegDec` — `QueryMemorySize` - `libSceNpEntitlementAccess` — `Initialize` - `libSceFontFt` — `SelectLibraryFt`, `SelectRendererFt` - `libSceVideoOut` — `SetFlipMaster`, `IsFlipPending` - `libSceAmpr` — `AmmGetVirtualAddressRanges`, `AmmSetPageTablePoolOccupancyNotificationThreshold` - `libSceAgc` — `sceAgcSuspendPoint` - `libSceAudioOut` — `sceAudioOut2SetSystemDebugState` - `libSceKeyboard`, `libSceMouse`, `libScePlayGo`, `libSceNpManager`, `libSceGameLiveStreaming` — one export each ## Verified non-gaps (checked, ruling out) - **libSceAcm FFT/panner** — Kyty's `AcmFft`/`AcmIfft`/`AcmPanner`/`ConvReverb*` bodies are literal no-ops (advance a fake batch offset, return OK). AnyPS5 already exports the full surface with recovered signatures and documents the same no-op batching in `docs/dev/debt/libSceAcm.md`. The real DSP runs on the console's coprocessor; neither tree can source it — nothing to port. - **AudioOut2 / Coredump / DeviceService / Json2-mangled** — Kyty groups them as separate modules; AnyPS5 covers them inside `libSceAudioOut`, `libkernel` (`sceCoredump*`), `libSceMbus`, and the `_ZN3sce4Json*` surface. - **Fiber, Ampr plain emitters, kernel umtx/sema basics, libc internals** — present under `_nid_postfix` names, versioned `_04_00` forms, or sibling modules. The directly-portable residue (Json2 C2/D2 aliases + 3 Ampr measure helpers) went up as #12061. I can take any of sections 1–4 up once maintainers confirm the intended semantics/module boundaries — just say which.
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#12063
No description provided.