feat(psml): implement the MFSR 1100 calls for hardware without PSSR #644

Merged
Celegans12 merged 1 commit from upstream-pr/644 into main 2026-10-05 16:52:12 +00:00
Celegans12 commented 2026-10-05 10:37:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-05T10:37:03Z.


What

libScePsml_debug does not export scePsmlMfsrGetContextBufferRequirement1100, scePsmlMfsrCreateContext1100 or scePsmlMfsrGetDispatchMfsrPacket1100, so PPSA26344's imports of them do not resolve.

  • All three return 0x8A810001 (not initialized) without writing the requirement output, the context handle or the command buffer.
  • Source: Sony's libScePsml.sprx. Each call tests the flag that only a successful scePsmlMfsrInit sets and returns 0x8A810001 before it checks or writes its pointer arguments. scePsmlMfsrInit throws in AnyPS5, so this is the only state a title can reach.
  • PPSA26344 v1.008 stores sceKernelIsTrinityMode() != 0 at 0xa87d1c. Its PSSR setup at 0xcceeb0 returns early without that flag, and 0xb46e5b clears the dispatch mode bits, so on AnyPS5 it imports the three calls but never calls them.
  • 3WVD91e12ZQ, JaLBe0P3jSU and AHalTX9wFZY recompute from scePsmlMfsrInit, scePsmlMfsrReleaseContext and scePsmlMfsrGetDispatchMfsrPacketSizeInDwords. Their stubs now carry these names and still throw.
  • The argument layouts are inferred from Sony's code, so they are listed under "Unknown function info" in TechnicalDebt.
  • Adds a CMakeLists.txt for the guest test, as #564 did for libSceRazorCpu.

Tested

  • Windows 11, MinGW-w64 GCC 15.2.0: configure -DBUILD_TESTING=ON, full build, --target libs, ctest:
  • 285/285 tests pass (ctest --output-on-failure)
  • New test guest_psml (core/libs/tests/GuestPsml.cpp): the three calls return 0x8A810001, also with null outputs, and leave the requirement, the context handle, the cursor and the buffer unchanged. On main it does not link: the three are not exported.
  • PPSA26344 v1.008: on main the imports VGjrQa-WqdU, fccGInHrj8A and 94iBp3KvIuI are unresolved. With this change all 13 of its libScePsml imports resolve.
  • Not tested: Linux (CI), console behaviour.

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:4743613864 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/644). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-05T10:37:03Z. --- ### What libScePsml_debug does not export `scePsmlMfsrGetContextBufferRequirement1100`, `scePsmlMfsrCreateContext1100` or `scePsmlMfsrGetDispatchMfsrPacket1100`, so PPSA26344's imports of them do not resolve. - All three return 0x8A810001 (not initialized) without writing the requirement output, the context handle or the command buffer. - Source: Sony's `libScePsml.sprx`. Each call tests the flag that only a successful `scePsmlMfsrInit` sets and returns 0x8A810001 before it checks or writes its pointer arguments. `scePsmlMfsrInit` throws in AnyPS5, so this is the only state a title can reach. - PPSA26344 v1.008 stores `sceKernelIsTrinityMode() != 0` at 0xa87d1c. Its PSSR setup at 0xcceeb0 returns early without that flag, and 0xb46e5b clears the dispatch mode bits, so on AnyPS5 it imports the three calls but never calls them. - `3WVD91e12ZQ`, `JaLBe0P3jSU` and `AHalTX9wFZY` recompute from `scePsmlMfsrInit`, `scePsmlMfsrReleaseContext` and `scePsmlMfsrGetDispatchMfsrPacketSizeInDwords`. Their stubs now carry these names and still throw. - The argument layouts are inferred from Sony's code, so they are listed under "Unknown function info" in TechnicalDebt. - Adds a `CMakeLists.txt` for the guest test, as #564 did for libSceRazorCpu. ### Tested - Windows 11, MinGW-w64 GCC 15.2.0: configure `-DBUILD_TESTING=ON`, full build, `--target libs`, `ctest`: - 285/285 tests pass (`ctest --output-on-failure`) - New test `guest_psml` (`core/libs/tests/GuestPsml.cpp`): the three calls return 0x8A810001, also with null outputs, and leave the requirement, the context handle, the cursor and the buffer unchanged. On `main` it does not link: the three are not exported. - PPSA26344 v1.008: on `main` the imports `VGjrQa-WqdU`, `fccGInHrj8A` and `94iBp3KvIuI` are unresolved. With this change all 13 of its libScePsml imports resolve. - Not tested: Linux (CI), console behaviour. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 16:06:50 +00:00 (Migrated from github.com)

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


Progress report (e248f40 → 776ecd3)

📈 System libraries: 79.22% (+0.02%, +3 implemented, +3 declared, -3 removed functions)

✅ 3 implemented
Library Name
libScePsml_debug scePsmlMfsrCreateContext1100
libScePsml_debug scePsmlMfsrGetContextBufferRequirement1100
libScePsml_debug scePsmlMfsrGetDispatchMfsrPacket1100
🆕 3 declared as stubs
Library Name
libScePsml_debug scePsmlMfsrGetDispatchMfsrPacketSizeInDwords
libScePsml_debug scePsmlMfsrInit
libScePsml_debug scePsmlMfsrReleaseContext
🗑️ 3 removed
Library Name
libScePsml_debug scePsmlUnknown_3WVD91e12ZQ
libScePsml_debug scePsmlUnknown_AHalTX9wFZY
libScePsml_debug scePsmlUnknown_JaLBe0P3jSU
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5998277425 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/644#issuecomment-5998277425). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-05T16:06:50Z. --- <!-- progress-report --> ### Progress report (e248f40 → 776ecd3) 📈 **System libraries**: 79.22% (+0.02%, +3 implemented, +3 declared, -3 removed functions) <details> <summary>✅ 3 implemented</summary> | Library | Name | | - | - | | libScePsml_debug | `scePsmlMfsrCreateContext1100` | | libScePsml_debug | `scePsmlMfsrGetContextBufferRequirement1100` | | libScePsml_debug | `scePsmlMfsrGetDispatchMfsrPacket1100` | </details> <details> <summary>🆕 3 declared as stubs</summary> | Library | Name | | - | - | | libScePsml_debug | `scePsmlMfsrGetDispatchMfsrPacketSizeInDwords` | | libScePsml_debug | `scePsmlMfsrInit` | | libScePsml_debug | `scePsmlMfsrReleaseContext` | </details> <details> <summary>🗑️ 3 removed</summary> | Library | Name | | - | - | | libScePsml_debug | `scePsmlUnknown_3WVD91e12ZQ` | | libScePsml_debug | `scePsmlUnknown_AHalTX9wFZY` | | libScePsml_debug | `scePsmlUnknown_JaLBe0P3jSU` | </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!644
No description provided.