feat(kernel): deliver plain-text notifications to host output #97

Merged
SamG-Coder merged 1 commit from upstream-pr/97 into main 2026-09-29 07:51:53 +00:00
SamG-Coder commented 2026-09-28 18:36:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by SamG-Coder on 2026-09-28T18:36:10Z.


The public ps5link-sdk hello_notify, pad_input, and gpu_cube titles all stop before main because libkernel does not export sceKernelSendNotificationRequest (zl7hupSO0C0). Add the export and deliver the supported plain-text request form to host standard error as [notification] <text>.

Behaviour

Supports device 0, flags 0, type 0, no icon, a 3120-byte request, and a NUL-terminated message within the 1024-byte field at offset 45. Validates the request and returns errors for unsupported forms. Uses Windows WriteFile or POSIX write, serializes notification output, handles partial writes, and reports output failures instead of returning success after losing the message.

This implements diagnostic text delivery, not desktop pop-ups or rich console notifications. Validation error codes are compatibility-layer choices, not measured PS5 error-code equivalence.

Validation

  • Release build and explicit libs NID-patching target passed.
  • All 54 registered CTests passed.
  • External PS5 ELF test, converted with AnyPS5: 14 API cases passed, covering null/size/mode checks, message termination, maximum-length and empty messages, literal format characters, and UTF-8 bytes.
  • Three converted-guest checks with a read-only output handle returned EIO and preserved the file.
  • Unmodified hello_notify: emits its text, completes its original 30-second sleep, exits 0.
  • Unmodified pad_input: opens the controller, completes polling, reports zero CROSS presses, exits 0. Physical button input remains unverified.
  • Unmodified gpu_cube: gets past import resolution and reaches its draw loop, then fails with VideoOut: flip queue full. Correct cube rendering and performance are not claimed.

Windows validation only; the POSIX output path and physical PS5 behaviour are untested. Demos and logs stay outside Git. This PR contains only the notification implementation and its CMake source registration; shader PR #96 is separate.

Rebase validation (2026-09-29)

Rebased onto upstream dee7ecb. The isolated notification branch builds, all 54 CTests pass, and the converted PS5 ELF checks again pass all 14 notification API cases plus all three host-output failure cases. Shader PR #96 and the vblank timer fix remain separate.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4667786702 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/97). Originally posted by [SamG-Coder](https://github.com/SamG-Coder) on 2026-09-28T18:36:10Z. --- The public ps5link-sdk `hello_notify`, `pad_input`, and `gpu_cube` titles all stop before main because libkernel does not export `sceKernelSendNotificationRequest` (`zl7hupSO0C0`). Add the export and deliver the supported plain-text request form to host standard error as `[notification] <text>`. ### Behaviour Supports device 0, flags 0, type 0, no icon, a 3120-byte request, and a NUL-terminated message within the 1024-byte field at offset 45. Validates the request and returns errors for unsupported forms. Uses Windows `WriteFile` or POSIX `write`, serializes notification output, handles partial writes, and reports output failures instead of returning success after losing the message. This implements diagnostic text delivery, not desktop pop-ups or rich console notifications. Validation error codes are compatibility-layer choices, not measured PS5 error-code equivalence. ### Validation - Release build and explicit `libs` NID-patching target passed. - All 54 registered CTests passed. - External PS5 ELF test, converted with AnyPS5: 14 API cases passed, covering null/size/mode checks, message termination, maximum-length and empty messages, literal format characters, and UTF-8 bytes. - Three converted-guest checks with a read-only output handle returned EIO and preserved the file. - Unmodified `hello_notify`: emits its text, completes its original 30-second sleep, exits 0. - Unmodified `pad_input`: opens the controller, completes polling, reports zero CROSS presses, exits 0. Physical button input remains unverified. - Unmodified `gpu_cube`: gets past import resolution and reaches its draw loop, then fails with `VideoOut: flip queue full`. Correct cube rendering and performance are not claimed. Windows validation only; the POSIX output path and physical PS5 behaviour are untested. Demos and logs stay outside Git. This PR contains only the notification implementation and its CMake source registration; shader PR #96 is separate. ### Rebase validation (2026-09-29) Rebased onto upstream `dee7ecb`. The isolated notification branch builds, all 54 CTests pass, and the converted PS5 ELF checks again pass all 14 notification API cases plus all three host-output failure cases. Shader PR #96 and the vblank timer fix remain separate.
github-actions[bot] commented 2026-09-28 18:36:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-09-28T18:36:39Z.


Progress report (dee7ecb → d70d7ca)

📈 System libraries: 65.17% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libkernel sceKernelSendNotificationRequest
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5876192893 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/97#issuecomment-5876192893). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-09-28T18:36:39Z. --- <!-- progress-report --> ### Progress report (dee7ecb → d70d7ca) 📈 **System libraries**: 65.17% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libkernel | `sceKernelSendNotificationRequest` | </details>
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!97
No description provided.