feat(libScePsml): resolve the unversioned, 800M3 and From2023July MFSR context forms #17941
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17941"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by AlfaRojo on 2026-11-10T00:13:23Z.
What
Resolve five of the eight throwing placeholders that #15654 declared for the 13.60-labelled
libScePsmlimage onto the library's existing MFSR context bodies. Each name hashes to the NID the placeholder exported (tools/nid_names.py --name):scePsmlMfsrGetContextBufferRequirementEO9YQXmJEN8,scePsmlMfsrGetContextBufferRequirement800M3sjTyYheKTrU,scePsmlMfsrGetContextBufferRequirementFrom2023JulyIMlj247LdTo,scePsmlMfsrCreateContext2ecEbQaf9VU,scePsmlMfsrCreateContextFrom2023JulyvUk2pWMx3KQ.src/libs/libPsml.cppregisters oneGetContextRequirements(MemoryRequirements*, const void*)forEO9YQXmJEN8,IMlj247LdTo,sjTyYheKTrU,ArakEpzsZo0(this library's firmware-verifiedscePsmlMfsrGetContextBufferRequirement800M3_2) andVGjrQa-WqdU(...1100); its handler (L259) never reads the parameter. It registersCreateFixedContext(void**, const MemoryParameters*)(L306) for2ecEbQaf9VUandCreatePrivateContext(void**, const ContextParameters*)(L313) forvUk2pWMx3KQ. KytyPS5'sContextParameters(blocks 0x8, count 0x10, width 0x18, height 0x1a, shared 0x38,static_asserted at L80) is the layout this library already uses asMfsrContextParamfor800M3_2, and its width/height offsets are the ones measured on a 13.40 console forscePsmlMfsrCreateContext1300(#11140 comment 6420461119). KytyPS5's 24-byteMemoryParameters(profile, flags, blocks, count) is the prefix of this library'sMfsrSharedResourcesParam.scePsmlMfsrGetContextBufferRequirement,...800M3and...From2023Julytake(MfsrRequirement*, const void*)and sharescePsmlMfsrGetContextBufferRequirement800M3_2's body through a helper: 0x8A810001 before init, then the firmware-read four 2 MiB blocks. The parameter is only null-checked, so no per-form layout is assumed. KytyPS5 reports one block for all five NIDs; the firmware-read value is kept.scePsmlMfsrCreateContextFrom2023July(void**, const MfsrContextParam*)isscePsmlMfsrCreateContext800M3_2without the shared-resources field: same block validation and input-dimension recording, context registered with no shared resources.800M3_2still requires a registered shared-resources handle.scePsmlMfsrCreateContext(void**, const MfsrMemoryParam*)takes the new 24-byteMfsrMemoryParam(type, reserved, blocks, blockCount;static_asserted) and, for type 0, fixes the recorded dimensions at 3840x2160 as KytyPS5 does. KytyPS5 gives 7680x4320 for type 1 and 3840x2160 for type 2, but whether the console-measured Quality8K/LightWeight gates of the shared-resources path (#11140) also apply to a fixed context is unknown, so types 1 and 2 throwNotImplemented_nid_no_patchlike the gated shared-resources types do; other types throw (KytyPS5 returns 0x8A81000D there, unverified here).scePsmlMfsrCreateContext800M3(pwUkfVu0c0c),scePsmlMfsrGetDispatchMfsrPacket(CN7uea0UQso) andscePsmlMfsrGetDispatchMfsrPacketFrom2023July(wHto4IznfBE). KytyPS5 registers none of these NIDs (its dispatch handlers are94iBp3KvIuI=...1100andRUNLFro+qok=...900), so nothing establishes their layouts. The debt entry is cut to these three.docs/dev/debt/libScePsml_debug.md: the post-init paths follow KytyPS5, not the module, and are unreachable on the modelled console, wherescePsmlMfsrInitfails with 0x8A810012; the version each form serves is unverified; null pointers and short block lists throw as for800M3_2.tools/guest_pointer_audit.pylistsscePsmlMfsrCreateContext's direct accesses exactly as it does the library's existing exports; the file's direct style is kept.guest_psmlnow calls each of the five forms before and after the failed init with a filled requirement buffer, a sentinel context handle and null arguments, requiring 0x8A810001 and untouched outputs on every call; the requirement check is one templated helper shared with the existing1100and800M3_2calls. The post-init paths cannot be exercised whilescePsmlMfsrInitfails on the modelled console.Tested
Windows 11 Pro (10.0.26200), WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release,
BUILD_TESTING=ON, onmain4b71464421.guest_psml: passes in 3 of 3 runs after buildingguest_psml_tests.public_headerspasses.tools/check_test_registration.pyreports everyAPS5_VABIsource compiled.tools/check_conventions.py --base upstream/mainis clean.tools/pr_overlap.pylists only #14212, the repository-wide debt reformat, which sharesdocs/dev/debt/libScePsml_debug.mdand adds no exports.Linux and macOS not run. The forms only validate arguments and copy fixed requirements before initialization; nothing platform-specific.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)