Commit Graph
8546 Commits
Author SHA1 Message Date
Yunus Shaikh e8172f8078 fix(libkernel): leave unmeasured scePthreadMutexattrSetkind inputs unimplemented
A null or uninitialized attribute, and a kind outside 1 to 4, threw
std::invalid_argument. They now go through NotImplemented_nid_no_patch,
as pthread_rwlockattr_settype_np's unmeasured types do. FreeBSD 11
libthr stores an unknown kind unchecked and answers a null attribute
with -1 and errno EINVAL, so scePthreadMutexattrSettype's
SCE_KERNEL_ERROR_EINVAL would match neither answer.
2026-10-22 01:44:01 -07:00
SebastianandClaude Opus 5.5 f2766b2447 docs(debt): drop the unmodelled O_EXCL reopen from the named semaphore entry
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QnkpF2oEMofseVz9Z7WEAC
2026-10-22 08:29:03 +00:00
Federico Marras 0bfda65256 docs(libSceAvPlayer): record the unmeasured order of the trick speed checks after the source check 2026-10-22 10:28:32 +02:00
hypermist b98f2f82e1 Merge remote-tracking branch 'upstream/main' into feat/npcommon-runtime
# Conflicts:
#	core/libs/prx/libSceNpCommon/PendingExports.cpp
2026-10-22 21:27:04 +13:00
frankea 6ba72890ad perf(shader): walk each construct when checking the structured constructs
hasStructuredConstructs tested every block of the graph against each merge header, and searched every block for a block's innermost loop, with dominator binary searches each time. Under APS5_FORCE_STRUCTURIZER_FALLBACK, Ghostrunner's compute shader 0x200c520000 becomes a 32,490-block reach-flag graph with 6,647 merge headers, and the check took 44 to 50 s of the 49 to 55 s.

The innermost loop is now searched among the loop headers only. Every other block failed the loop-header test first, so the candidates and their order are unchanged.

When constructsFollowDominance holds for the structural graph, the member checks visit only the blocks dominatedBlocks finds from the header, stopping at its merge, and for a loop also from its continue block, in block order. Only a block in the header's construct or in the loop's continue construct can fail a member check. A construct block is dominated by the header and not by the merge, so some path from the entry reaches it without the merge, and from the last header on that path every block is dominated by the header, so the walk reaches it. A continue-construct block is dominated by the continue block and is reached from it the same way. The walk finds every such block, and the blocks it skips passed every check, so the result is unchanged. Otherwise every block is checked as before, and APS5_NO_PERF_DOMINATOR_TREE keeps the old loop.

On an M4 Pro the check takes 0.27 s instead of 44 to 50 s on that graph, and the forced fallback takes 5.1 to 5.4 s instead of 49 to 55 s. The default structurization of the shader makes one check, which takes 0.03 s instead of 0.36 s.
2026-10-22 04:27:00 -04:00
frankea d30b78f47b perf(shader): build the structurizer's dominator trees instead of iterating dominator sets
recomputeAnalyses runs after every merge split, and its dominator and post-dominator fixpoints intersected a bitset of every block for every block until nothing changed. They now build the tree with the Cooper-Harvey-Kennedy iteration over a reverse post-order from a virtual root above the entry block, or above every exit for post-dominators, and write each block's sorted set as its parent's set plus the block itself.

The sets are the same. When every block is reachable from the virtual root, the greatest fixpoint of the old equations is the dominance relation of that rooted graph, which the tree describes. When a block is unreachable from the entry, or cannot reach an exit, the old fixpoint runs as before.

The post-dominator tree also keeps each block's immediate post-dominator, and FindNearestCommonPostDominator climbs it when both blocks have one: the sets are the tree's paths, so the deepest common block is the one the set intersection found. Blocks added or cloned after the analysis have no parent and take the set path, as before.

APS5_NO_PERF_DOMINATOR_TREE turns both off, and the structurizer and control-flow tests also run with it set. On an M4 Pro the structurization of Ghostrunner's compute shader 0x200c520000 takes 18 s instead of 37 s.
2026-10-22 04:27:00 -04:00
Lindamea1andClaude Opus 5.5 93170e6049 fix(libSceCommonDialog): return ALREADY_SYSTEM_INITIALIZED from a second sceCommonDialogInitialize
A second sceCommonDialogInitialize returned 0x80B80004
(ALREADY_INITIALIZED), the code each dialog's own Initialize returns.
The common-dialog system initializer returns 0x80B80002
(ALREADY_SYSTEM_INITIALIZED), as shadPS4 and the SDK error names have
it, so callers that accept only SCE_OK or ALREADY_SYSTEM_INITIALIZED
treated a second call as a failure. The header keeps
ALREADY_INITIALIZED for the dialog libraries that return it. The test
pins the literal instead of the header constant, and the debt entry
records that a repeated call's value is not measured on a console.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 09:24:22 +01:00
seven f83abf796a perf(agc): stage written buffer elements up to 8 MiB on discrete GPUs 2026-10-22 13:46:52 +05:30
Kyon 785e715651 feat(libSceJemspace): declare purge and statistics printing exports 2026-10-22 09:09:06 +01:00
zaryabzip b9e5dc160f feat(libScePosixForWebKit): forward the --wrap exports with implemented targets
__wrap_access, __wrap_getcwd and __wrap_getenv forward to libc;
__wrap_clock_gettime, __wrap_lstat and __wrap_mmap forward to libkernel.
2026-10-22 13:03:12 +05:00
Simone ebd1a14e30 Merge main into codex/json-numeric-locale
# Conflicts:
#	core/libs/prx/libSceJson2/Export.cpp
#	docs/dev/debt/libSceJson2.md
2026-10-22 10:02:59 +02:00
simonbronkandClaude Opus 5.5 bf0806ecd6 fix(agc): retire an unwritten native multisample depth surface on guest access
A guest read over the depth or HTILE range of a native multisample depth
surface threw even when the host had not written the surface since its
import. Its samples are then still the clear value the import took from
the guest HTILE, so the guest bytes already describe it. Retire such a
surface and its guards instead, and keep the refusal for a surface the
host wrote: draws with depth or stencil writes, depth/stencil copies and
storage write-back.

Onimusha: Way of the Sword (PPSA27836) imports a 4-sample D32 target,
draws into it once with depth tests only and no color target, then reads
the memory back as a structured buffer in a compute dispatch.

Unblocks PPSA27836.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 10:02:25 +02:00
SimoneandClaude Opus 5.5 106e73669d feat(libkernel_sys): implement the scePthreadBarrier, cpuclockid, concurrency and msync forms
Forward scePthreadBarrier*, scePthreadBarrierattr*, scePthreadGetcpuclockid,
scePthreadGetconcurrency and sceKernelMsync to libkernel's POSIX
implementations and return POSIX errors as SCE kernel errors.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 10:01:06 +02:00
SimoneandClaude Opus 5.5 5177cdb9ac feat(libSceVoice): implement mute-all, bitrate and port update
Implement sceVoiceSetMuteFlagAll, sceVoiceSetBitRate and
sceVoiceUpdatePort on main's port model. They return the
not-initialized, port-range and missing-port codes of the other port
calls, validate bitrates against the table sceVoiceCreatePort uses and
throw where the console's code is unknown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 10:00:23 +02:00
Kyon ac1dfaf7ef feat(libSceJemspace): declare eleven pending exports 2026-10-22 08:57:25 +01:00
Santhosh Kumar 6133773304 docs(libSceFreeType): follow requested bitmap debt placement 2026-10-22 13:23:42 +05:30
primesoul-web 4d98d9a2cd Merge upstream/main: adopt the restored UsbStorage ABI over the no-device path
Take main's restored signatures (the firmware-database sweep of 2026-10-21):
the typed UsbStorageCallback across the register/unregister family, the
UsbStorageDeviceInfo-typed device-info query, IsExist's three-argument bool
form (succeeds and reports non-existence with no device attached), and
RequestMap's six parameters with the trailing reserved pair dropped. The
no-device answers and the argument validation are unchanged; the guest test
passes an APS5_VABI callback and pins the exists out-parameter.
2026-10-22 07:49:05 +00:00
xXPBSXxandClaude Sonnet 5.5 02eee49df4 docs(debt): make the NpSns entry and its note agree on three names
The first entry in the libSceNpSns debt file lists 24 names, but Export.cpp declares 21. The note two entries below says that sceNpSnsFacebookCreateRequest, sceNpSnsFacebookDeleteRequest and sceNpSnsFacebookGetAccessToken are omitted from this module because another module declares them. They are declared in libSceNpManager (Export.cpp, since f04d16d702), not in libSceNpSnsFacebookDialog by #6977 as the note still says. The three names are removed from the entry so that it names exactly the 21 declared functions, and the note now names libSceNpManager. No code changes.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-22 09:27:23 +02:00
EdouardSenceandClaude Opus 5.5 8f6f1eac86 fix(libSceNgs2): throw for a custom Gain module with an option
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 09:11:01 +02:00
krishalivaibhavandClaude Opus 5.5 81ae747acd feat(libScePad): answer the tracker DualShock 4, Blaster and Move queries
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 12:38:04 +05:30
ArjenS-LA 4fb4187bd3 fix(libkernel): classify Windows directory links by app0 scope 2026-10-22 00:02:38 -07:00
Ondra97 64d0571a20 Merge remote-tracking branch 'origin/main' into codex/fix-ult-finalize-allocation 2026-10-22 08:53:25 +02:00
Yunus Shaikh b23cbb5bb8 Merge main into feat/libkernel-sys-libthr-names
# Conflicts:
#	core/libs/prx/libkernel_sys/Export.Discovery.cpp
2026-10-21 23:43:23 -07:00
memob 3f698c1016 perf(libSceNetCtl): reuse host interface queries until Windows reports a change
PPSA34501 calls sceNetCtlGetInfo often enough that GetAdaptersAddresses and its
RPC took about a fifth of a game thread at the Kino der Toten spawn. The
answers are now kept per address family and for the IPv4 interface, and
dropped when an address, interface or route change notification arrives.
2026-10-22 02:23:54 -04:00
Ondra97 56b4b3a4c9 Merge remote-tracking branch 'origin/main' into codex/feat-freetype-sfnt-access 2026-10-22 08:19:18 +02:00
Dean d6eafa54d0 Merge pull request #9279 from YossiYad/feat/kernel-sys-thread-defaults
feat(libkernel_sys): implement pthread_set_defaultstacksize_np, scePthreadSetDefaultstacksize and scePthreadSetName
2026-10-22 19:16:30 +13:00
Dean d6732b51a6 Merge pull request #9229 from YossiYad/feat/http-set-proxy
feat(libSceHttp): check the arguments of sceHttpSetProxy
2026-10-22 19:09:21 +13:00
Dean b9de0bb590 Merge pull request #9089 from YossiYad/feat/systemservice-bgm-playing
feat(libSceSystemService): report that no background music is playing
2026-10-22 19:09:17 +13:00
Dean a16664584e Merge pull request #9225 from YossiYad/feat/npmanager-plus-content-restriction
feat(libSceNpManager): implement sceNpIsPlusMember and sceNpSetContentRestriction
2026-10-22 19:09:14 +13:00
Dean 84f8e2ffc2 Merge pull request #9201 from YossiYad/feat/gnm-neo-retail-unavailable
feat(libSceGnmDriverForNeoMode): return the retail answers of 48 debug, resource, SDMA, counter and validation calls
2026-10-22 19:09:09 +13:00
Dean 865e06f1bc Merge pull request #7927 from whamre/feat/agc-depth-mips
feat(agc): render into depth mip levels
2026-10-22 19:09:06 +13:00
JJenkxandClaude Opus 5.5 28d9f26bdd fix(libSceVideodec2): flush without draining when no picture is pending
sceVideodec2Flush drained libavcodec with an empty packet whenever the decoder
was not already flushing, and the next sceVideodec2Decode then restarted the
decoder with avcodec_flush_buffers, dropping its reference pictures. A caller
that flushes after every access unit, as Sony's PSP emulator does for its
H.264 movies, lost every P picture after the first: libavcodec withholds
pictures after a restart until it reaches a keyframe, so Daxter (PPSA09695)
got 8 pictures from 459 access units and showed a black screen ("Failed to
obtain a video frame") instead of its intro movie.

Flush now drains only when a decoded access unit has not produced its picture
yet. With nothing pending there is nothing to return, and the decoder keeps its
references for the units that follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 02:01:36 -04:00
Yunus Shaikh fa3cbbe32b fix(libkernel): leave rwlock attribute types other than 0 to 2 unimplemented
pthread_rwlockattr_settype_np stored any type and returned 0. The console's answer to a type outside 0 to 2 is unknown, and shadPS4 returns EINVAL once the stored type is above 2, so such a type now goes through NotImplemented_nid_no_patch. Types 0 to 2 are stored but not applied, so the debt entry moves to the silent stubs.
2026-10-21 22:59:51 -07:00
Kraken 5a35e3400b feat(libSceFreeTypeOptOl): implement PFR queries 2026-10-22 06:56:26 +01:00
Dean b27924d851 Merge pull request #9085 from YossiYad/feat/npmanager-check-callback-for-lib
feat(libSceNpManager): implement sceNpCheckCallbackForLib
2026-10-22 18:53:46 +13:00
Dean a7a924722e Merge pull request #9009 from YossiYad/feat/nptus-offline-requests
feat(libSceNpTus): check the arguments of 82 TUS and TSS requests and fail them signed out
2026-10-22 18:53:41 +13:00
Dean d430e40b50 Merge pull request #8122 from YossiYad/fix/videodec2-empty-access-unit
fix(libSceVideodec2): return access unit errors for a null or empty access unit
2026-10-22 18:53:34 +13:00
orezraeyandClaude Opus 5.5 8a217a1224 docs(libkernel): record the unmeasured sceKernelCreateEventFlag error order
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 02:52:40 -03:00
Yunus Shaikh 280849ebde Merge main into fix/libkernel-signal-handler-mask 2026-10-21 22:33:02 -07:00
Yunus Shaikh 094e920c5d Merge main into fix/libscenet-inet-text-rules 2026-10-21 22:31:24 -07:00
Yossi Yadgar abaaa66a61 docs(debt): record sceHttpSetProxy as a silent stub 2026-10-22 08:26:20 +03:00
Yossi Yadgar f0d0bcafb5 docs(debt): note why no background music is reported 2026-10-22 08:25:55 +03:00
Yunus Shaikh 410536f795 Merge main into fix/libkernel-udp-unreachable-port 2026-10-21 22:25:29 -07:00
Yossi Yadgar a596bc3166 docs(debt): note where sceVoiceInitHQ and sceVoiceVADSetVersion come from 2026-10-22 08:25:11 +03:00
Yossi Yadgar 4aba717002 docs(debt): note where the NpCommon utilities and wrappers come from 2026-10-22 08:23:55 +03:00
Yossi Yadgar 6aa26e212b feat(libSceNpCommon): wrap the condition, join, clock and version calls 2026-10-22 08:23:55 +03:00
Yossi Yadgar d4e046e0c9 feat(libSceNpCommon): wrap the libkernel mutex calls 2026-10-22 08:23:41 +03:00
Yossi Yadgar 5ac3669312 feat(libSceNpCommon): compare, order and validate online IDs and NpIds 2026-10-22 08:23:41 +03:00
Federico Marras e0e231ef3f Merge remote-tracking branch 'upstream/main' into feat/system-service-app-title-id
# Conflicts:
#	core/libs/prx/libSceSystemService/PendingExports.cpp
#	docs/dev/debt/libSceSystemService.md
2026-10-22 07:08:48 +02:00
Federico Marras 83be1aae7d Merge remote-tracking branch 'upstream/main' into feat/http-memory-pool-stats
# Conflicts:
#	core/libs/prx/libSceHttp/Export.cpp
#	docs/dev/debt/libSceHttp.md
2026-10-22 07:05:11 +02:00