Commit Graph
9 Commits
Author SHA1 Message Date
akkadbakkad89 44f2c7f607 fix(libScePsml): serialize the shared-resources busy check and insert
The single-instance guard checked g_mfsrObjects under g_mfsrMutex, released
the lock, then reacquired it inside CreateMfsrObject to insert, so two
concurrent creates could both observe no shared-resources object and both
succeed. Hold the mutex across the busy check and the emplace instead; the
lock scope also preserves the firmware order, which returns 0x8A810015
before validating the arguments. guest_psml_tests gains a concurrent
create check for the reachable uninitialized contract; the busy branch
itself cannot be exercised while scePsmlMfsrInit cannot succeed on the
modelled console.
2026-10-26 01:41:41 +05:30
akkadbakkad89 fe38bc485d fix(libScePsml): fail MFSR init and shared-resource limits as a base console does
The firmware disassembly (the real Sony libScePsml.sprx inside PPSA20397)
shows scePsmlMfsrInit returning 0x8A810012 before touching the initialized
flag when sceKernelIsTrinityMode is 0, so on the modelled console every MFSR
call correctly stays uninitialized instead of reaching the unimplemented
dispatch path. The shared-resources pair likewise returns 0x8A81000D for
disallowed types and 0x8A810015 while a shared-resources object already
exists.
2026-10-26 00:58:27 +05:30
hypermistandClaude Opus 5.5 d96751079c Merge remote-tracking branch 'upstream/main' into fix/psml-base-console
Resolved GuestPsml.cpp by dropping the extern block; the Mfsr2 placeholders in the libScePsml_debug header now carry the implemented signatures and the test uses the library header.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 13:56:59 +13:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
hypermistandClaude Opus 5.5 e699e57ddb fix(libScePsml): answer the MFSR2 calls as a console without PSSR does
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 22:37:28 +13:00
boykopovar b1bcbf7995 fix(psml): recover shared memory requirements and release signatures 2026-10-21 21:47:50 +03:00
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
ps54allandClaude Opus 5.5 7ab3d441c1 feat(psml): implement the MFSR shared-resource and 800 context setup
scePsmlMfsrInit, the shared-resource calls and the 800M3_2 context calls
threw or answered "not initialized", so a title that sets PSSR up at
start-up stopped there even when it never uses PSSR on hardware without
it (PPSA08330 calls the setup unconditionally and only dispatches when
sceKernelIsTrinityMode is set, which AnyPS5 reports as 0).

The layouts come from the calls in PPSA08330 and PPSA03016: requirements
are {block bytes, alignment, block count}, handles are 8-byte values
written through the first argument, and a context parameter carries its
block list at 8/16 and the shared-resources handle at 0x38. Init sets
the initialized state, the requirements ask for four 2 MiB blocks (what
PPSA08330 allocates regardless of the returned count), and create and
release keep bookkeeping objects. Invalid arguments throw because their
error codes are unknown.

The 1100 calls, scePsmlMfsrCreateContext1300 and the 900/1000/1300
dispatch packets keep returning 0x8A810001 before Init and throw after
it; packet size, mip bias and capture still throw.

The guest test links libc and gets Windows unwinding so it can check the
refused calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 20:41:44 +02:00
Celegans12andClaude Opus 5.5 776ecd3b35 feat(psml): implement the MFSR 1100 calls for hardware without PSSR
scePsmlMfsrGetContextBufferRequirement1100, scePsmlMfsrCreateContext1100
and scePsmlMfsrGetDispatchMfsrPacket1100 were not exported, so a title
importing them failed to load.

In Sony's libScePsml all three return 0x8A810001 (not initialized)
without writing their outputs until scePsmlMfsrInit has succeeded.
AnyPS5's scePsmlMfsrInit throws, so that is the only state a title can
reach, and the three calls now return that error.

The existing stubs for scePsmlMfsrInit, scePsmlMfsrReleaseContext and
scePsmlMfsrGetDispatchMfsrPacketSizeInDwords get their real names and
still throw. libScePsml_debug gets a CMakeLists.txt for the new
guest_psml test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 17:51:47 +02:00