Files
AnyPS5/docs/dev/debt/libScePsml_debug.md
T
akkadbakkad89 632c0f7737 feat(libScePsml): implement the MFSR query exports from the APR-EMU fakelib
scePsmlMfsrGetDispatchMfsrPacketSizeInDwords, scePsmlMfsrGetMipmapBias,
scePsmlMfsrSelectConfig, scePsmlMfsrRequestCapture and
scePsmlMfsrIsCaptureInProgress gain real signatures and semantics reversed
from the fakelib/libScePsml.sprx bundled with PPSA20397, which imports the
first three. The context records the input dimensions at creation so the
mipmap bias can be computed.
2026-10-20 14:33:30 +05:30

5.4 KiB

libScePsml_debug technical debt

Unknown function info

Functional

  • scePsmlMfsrGetDispatchMfsrPacketSizeInDwords, scePsmlMfsrGetMipmapBias, scePsmlMfsrSelectConfig, scePsmlMfsrRequestCapture, scePsmlMfsrIsCaptureInProgress (libScePsml) - semantics from the APR-EMU fakelib/libScePsml.sprx bundled with PPSA20397. Guards: 0x8A810001 uninitialized, 0x8A810005 for a null/foreign handle (the fakelib checks a leading engine id 0xA9C4/0x9231; our map check is the equivalent), 0x8A810009 for a null output. GetDispatchMfsrPacketSizeInDwords writes 0x600; GetMipmapBias(context, bias, dimension) writes log2f(dimension / context->inputWidth) - 1.0f, with the width recorded at CreateContext800M3_2 from the parameter pair at 0x18 or descriptor0 + 0x20 (the fakelib's indirection is inferred). SelectConfig, RequestCapture and IsCaptureInProgress validate then return 0. The GetDispatchMfsrPacket* calls still throw: the 0x158-byte template's packet-construction routine is not understood
  • scePsmlMfsrInit (libScePsml) - succeeds and only sets the initialized state; the shared resources and contexts are bookkeeping objects that use none of the guest blocks. Whether Sony's library fails on hardware without PSSR is unknown. PPSA08330 calls the setup unconditionally and only uses a context when its cached sceKernelIsTrinityMode result is set (0x3c643d, 0x567f97; otherwise it stores a -0.25 mip bias itself at 0x567fe2), which AnyPS5 reports as 0, so the dispatch, mip bias and capture calls still throw