feat(libSceNotification): implement the notification exports #8207

Closed
adhimiw wants to merge 1 commit from upstream-pr/8207 into main
adhimiw commented 2026-10-20 03:13:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adhimiw on 2026-10-20T03:13:51Z.


What

Implements the four libSceNotification exports, which all threw NotImplemented_nid_no_patch(__func__) before:

  • sceNotificationSend and sceNotificationSendById build the console's kernel notification request — a 3120-byte block with the type at offset 0 and a terminated message at offset 45 — and pass it to sceKernelSendNotificationRequest, which the project already implements in libkernel. The host therefore reports a notification exactly the way the kernel path already does, instead of throwing.
  • sceNotificationShowPsButtonPersistentBanner reports the banner's parameters the same way and keeps them until sceNotificationHidePsButtonPersistentBanner clears them. The console draws the banner next to the PS button; the host has no banner.

A message that is not terminated within the request's 1024-byte message field throws, as do a null message, id, payload or banner parameter.

The library had no CMakeLists.txt and was built from Export.cpp alone; it now has one, so a guest_notification test can be registered. The test covers the calls, the longest message that fits and the rejected inputs.

docs/dev/debt/libSceNotification.md records that the host reports the notification instead of showing the console's toast, that the persistent banner has no host equivalent, and that the parameter meanings are unknown, so every notification is reported as a text notification.

Tested

Linux (Omarchy, kernel 7.2.8), GCC 16.2.1, CMake 4.4.4: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON configured and the full build compiled and linked; ctest -j4 ran 1648 tests, all passed, including the new guest_notification. python3 tools/check_conventions.py --base upstream/main passes. python3 tools/pr_overlap.py --branch feat/libSceNotification-implement reports no overlap with open pull requests, checked after the branch was pushed. The library and the test were also cross-compiled with MinGW-w64 GCC 16.2.0 and the project's -fno-asynchronous-unwind-tables setting, and the patched libSceNotification.prx was read back: its undefined import of the kernel notification request is the same NID that libkernel.prx exports, so the loader binds them.

Not tested: a title, a console, the Windows build.

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 (none added)
  • 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 (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4930471287 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8207). Originally posted by [adhimiw](https://github.com/adhimiw) on 2026-10-20T03:13:51Z. --- ### What Implements the four `libSceNotification` exports, which all threw `NotImplemented_nid_no_patch(__func__)` before: - `sceNotificationSend` and `sceNotificationSendById` build the console's kernel notification request — a 3120-byte block with the type at offset 0 and a terminated message at offset 45 — and pass it to `sceKernelSendNotificationRequest`, which the project already implements in `libkernel`. The host therefore reports a notification exactly the way the kernel path already does, instead of throwing. - `sceNotificationShowPsButtonPersistentBanner` reports the banner's parameters the same way and keeps them until `sceNotificationHidePsButtonPersistentBanner` clears them. The console draws the banner next to the PS button; the host has no banner. A message that is not terminated within the request's 1024-byte message field throws, as do a null message, id, payload or banner parameter. The library had no `CMakeLists.txt` and was built from `Export.cpp` alone; it now has one, so a `guest_notification` test can be registered. The test covers the calls, the longest message that fits and the rejected inputs. `docs/dev/debt/libSceNotification.md` records that the host reports the notification instead of showing the console's toast, that the persistent banner has no host equivalent, and that the parameter meanings are unknown, so every notification is reported as a text notification. ### Tested Linux (Omarchy, kernel 7.2.8), GCC 16.2.1, CMake 4.4.4: `cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON` configured and the full build compiled and linked; `ctest -j4` ran 1648 tests, all passed, including the new `guest_notification`. `python3 tools/check_conventions.py --base upstream/main` passes. `python3 tools/pr_overlap.py --branch feat/libSceNotification-implement` reports no overlap with open pull requests, checked after the branch was pushed. The library and the test were also cross-compiled with MinGW-w64 GCC 16.2.0 and the project's `-fno-asynchronous-unwind-tables` setting, and the patched `libSceNotification.prx` was read back: its undefined import of the kernel notification request is the same NID that `libkernel.prx` exports, so the loader binds them. Not tested: a title, a console, the Windows build. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file (none added) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-20 03:14:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-20T03:14:08Z.


Thank you for your contribution! Authors with no pull requests merged into main can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6282480044 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8207#issuecomment-6282480044). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-20T03:14:08Z. --- Thank you for your contribution! Authors with no pull requests merged into `main` can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

Pull request closed

Sign in to join this conversation.
No reviewers
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!8207
No description provided.