feat(ulobjmgr): register and unregister object #707

Merged
adriadam10 merged 1 commit from upstream-pr/707 into main 2026-10-05 19:12:09 +00:00
adriadam10 commented 2026-10-05 17:26:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-05T17:26:08Z.


What

Implements _sceUlobjmgrRegisterObject and _sceUlobjmgrUnregisterObject (ulobjmgr), which threw.

Behaviour follows shadPS4 (src/core/libraries/ulobjmgr/ulobjmgr.cpp), the only reference with a body (KytyPS5 and fpPS4 have none):

  • Register takes a 64-bit object, a 32-bit kind and a 32-bit id output; a zero object, a zero kind or a null output returns raw EINVAL (22), otherwise it writes id 0 and returns 0.
  • Unregister returns EINVAL for an id of 0x4000 or above and 0 otherwise.

The signature and the 0x4000 bound come from a PS4 reference, so they are listed under "Unknown function info". No object is actually tracked (id is always 0), which is listed under "Silent stubs". The previous stub took a single void*, which matched no reference.

Adds a CMakeLists.txt for the module (the libSceRazorCpu pattern) to register the test.

Tested

Linux, GCC Release: new guest_ulobjmgr test (every error path of both calls, the id output, the 0x3fff/0x4000 bound) passes; it fails on main (the stubs throw). Breaking each check (kind validation, id value, bound, error value) makes it fail. All guest_* tests pass. The patched ulobjmgr.prx exports both NIDs.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4748568960 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/707). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-05T17:26:08Z. --- ### What Implements `_sceUlobjmgrRegisterObject` and `_sceUlobjmgrUnregisterObject` (ulobjmgr), which threw. Behaviour follows shadPS4 (`src/core/libraries/ulobjmgr/ulobjmgr.cpp`), the only reference with a body (KytyPS5 and fpPS4 have none): - Register takes a 64-bit object, a 32-bit kind and a 32-bit id output; a zero object, a zero kind or a null output returns raw `EINVAL` (22), otherwise it writes id 0 and returns 0. - Unregister returns `EINVAL` for an id of 0x4000 or above and 0 otherwise. The signature and the 0x4000 bound come from a PS4 reference, so they are listed under "Unknown function info". No object is actually tracked (id is always 0), which is listed under "Silent stubs". The previous stub took a single `void*`, which matched no reference. Adds a `CMakeLists.txt` for the module (the libSceRazorCpu pattern) to register the test. ### Tested Linux, GCC Release: new `guest_ulobjmgr` test (every error path of both calls, the id output, the 0x3fff/0x4000 bound) passes; it fails on `main` (the stubs throw). Breaking each check (kind validation, id value, bound, error value) makes it fail. All `guest_*` tests pass. The patched `ulobjmgr.prx` exports both NIDs. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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 - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-05 17:27:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T17:27:06Z.


Progress report (0518f0e → 4136a04)

📈 System libraries: 79.27% (+0.06%, +2 implemented functions)

✅ 2 implemented
Library Name
ulobjmgr _sceUlobjmgrRegisterObject
ulobjmgr _sceUlobjmgrUnregisterObject
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5999609154 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/707#issuecomment-5999609154). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T17:27:06Z. --- <!-- progress-report --> ### Progress report (0518f0e → 4136a04) 📈 **System libraries**: 79.27% (+0.06%, +2 implemented functions) <details> <summary>✅ 2 implemented</summary> | Library | Name | | - | - | | ulobjmgr | `_sceUlobjmgrRegisterObject` | | ulobjmgr | `_sceUlobjmgrUnregisterObject` | </details>
github-actions[bot] commented 2026-10-05 18:15:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-05T18:15:17Z.


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
#301 docs/dev/TechnicalDebt.md L93
#369 docs/dev/TechnicalDebt.md L93
#407 docs/dev/TechnicalDebt.md L93
#545 docs/dev/TechnicalDebt.md L93
#550 docs/dev/TechnicalDebt.md L93
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6000388828 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/707#issuecomment-6000388828). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T18:15:17Z. --- <!-- pr-overlap --> 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 | |---|---|---|---| | #301 | `docs/dev/TechnicalDebt.md` [L93](https://github.com/boykopovar/AnyPS5/blob/1c2ccd838c1bdbd7406e85c77470a59859d44972/docs/dev/TechnicalDebt.md#L93) | | | | #369 | `docs/dev/TechnicalDebt.md` [L93](https://github.com/boykopovar/AnyPS5/blob/1c2ccd838c1bdbd7406e85c77470a59859d44972/docs/dev/TechnicalDebt.md#L93) | | | | #407 | `docs/dev/TechnicalDebt.md` [L93](https://github.com/boykopovar/AnyPS5/blob/1c2ccd838c1bdbd7406e85c77470a59859d44972/docs/dev/TechnicalDebt.md#L93) | | | | #545 | `docs/dev/TechnicalDebt.md` [L93](https://github.com/boykopovar/AnyPS5/blob/1c2ccd838c1bdbd7406e85c77470a59859d44972/docs/dev/TechnicalDebt.md#L93) | | | | #550 | `docs/dev/TechnicalDebt.md` [L93](https://github.com/boykopovar/AnyPS5/blob/1c2ccd838c1bdbd7406e85c77470a59859d44972/docs/dev/TechnicalDebt.md#L93) | | |
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!707
No description provided.