Commit Graph

6179 Commits

Author SHA1 Message Date
Adrià 77b9f7270c
Merge pull request #3579 from Celegans12/fix/relinker-present-optional-provider-errors
fix(relinker): preserve load failures of present optional providers
2026-10-13 11:53:01 +02:00
Adrià 8bcd97cd5b
Merge pull request #1418 from gjonn/feat/agc-unnormalized-implicit-lod
feat(agc): sample the base level through unnormalized samplers
2026-10-13 11:49:07 +02:00
Dean bb9a4d8a24
Merge pull request #5045 from oneandonlydean/up4/fix-clip-cull-draw-skip
test(agc): skip the clip and cull distance draw without a Vulkan device
2026-10-13 22:38:00 +13:00
Dean 2890f95494
Merge pull request #5025 from 0xRickx/fix/libkernel-sys-rename-import
fix(libkernel_sys): reach rename through a _nid_no_patch export
2026-10-13 22:37:36 +13:00
Adrià 08f672cc51
Merge pull request #5035 from ducloc080202/feat/system-service-controller-settings
feat(libSceSystemService): no-op sceSystemServiceShowControllerSettings
2026-10-13 11:35:54 +02:00
Dean Galvin 4a4bea9d1b test(agc): skip the clip and cull distance draw without a Vulkan device 2026-10-13 22:26:59 +13:00
Adrià 8299b2f7eb
Merge pull request #5036 from 0xRickx/feat/libc-atanhf
feat(libc): implement atanhf
2026-10-13 11:22:59 +02:00
ducloc080202 46c7766f4f feat(libSceSystemService): no-op sceSystemServiceShowControllerSettings 2026-10-13 16:05:00 +07:00
Dean 2a2a3dc650
Merge pull request #4226 from MarcZX100/codex/carry-wcsftime-3625
feat(libc): implement wcsftime
2026-10-13 22:01:10 +13:00
Dean 90285be0af
Merge pull request #4367 from MarcZX100/codex/carry-windows-alias-4260
fix(libc): alias non-contiguous shared guest views on Windows
2026-10-13 22:00:55 +13:00
Dean 48c48ffd9e
Merge pull request #4390 from ErenYeager1836/fix/pngdec-validate-size-and-max-width
fix(libScePngDec): validate this_size on create
2026-10-13 22:00:41 +13:00
Dean 501f4f5aa7
Merge pull request #4835 from MarcZX100/fix/agc-init-version-error-4808
fix(agc): return error for unsupported init versions
2026-10-13 22:00:27 +13:00
Dean 02d4839b60
Merge pull request #4584 from xXPBSXx/fix/agc-line-strip-primitive
fix(agc): decode primitive type 3 as a line strip
2026-10-13 22:00:05 +13:00
Rick 9ceb6d144d fix(libkernel_sys): reach rename through a _nid_no_patch export
renameat (2a8e7452) calls rename_nid_postfix when both paths are
AT_FDCWD-relative or absolute. Rename.cpp is built into both libc and
libkernel, and on Windows libkernel_sys bound that import to libkernel,
which comes first on its link line. The NID patcher then rewrote the
import to rename's NID, which only libc exports, as libkernel keeps its
copy under the plain name. So libkernel_sys.prx fails to load with error
127 on Windows, and with it every title that imports it. Linux resolves
the symbol globally and was not affected.

rename's body is now RenameGuestPath_nid_no_patch, which both libraries
export under that name, and renameat calls it, the way libkernel_sys
already reaches libkernel's other helpers. rename_nid_postfix forwards
to it, so its behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 10:48:14 +02:00
Rick 3fe04d4b72 feat(libc): implement atanhf
Dusklight (PPSA99305) imports atanhf (cPGyc5FGjy0) from
libSceLibcInternal.prx; the libc.prx it bundles only has a zero-return
stub for it.

The implementation follows the atanhf of the libc.prx bundled with
PPSA28319 (0x438a0), read from its disassembly: FreeBSD msun's
e_atanhf.c calling msun's s_log1pf.c, both as of 59bc2f09 (stable/9,
the revision the sinhf port took expm1f and expf from). The log1pf
paths for the positive arguments atanhf passes are inlined, as the
exported log1pf is still the host's. For |x| > 1, the infinities and
NaN, Sony's error helper raises FE_INVALID and sets errno to EDOM
before returning (x - x) / (x - x); for |x| = 1 it sets errno to
ERANGE before returning x / 0. Other arguments leave errno alone.

Running that code from the title's libc.prx on a Windows host gives
the same bits, errno and floating-point exceptions as the built
libc.prx for all 2^32 arguments, and msun's own e_atanhf.c and
s_log1pf.c built with the host compiler give the same bits. With the
host log1pf instead of the msun one, 4.7% of the arguments in [0, 1)
differ. guest_math pins bits for every branch reachable from atanhf,
both signs, and the errno and exception behaviour.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 10:48:06 +02:00
Dean 4bb2c7f394
Merge pull request #423 from MichonGoddijn231849/feat/clip-cull-distances
feat(agc): vertex clip and cull distances
2026-10-13 21:47:43 +13:00
Adrià b87708353c
Merge pull request #5017 from adriadam10/feat/proprietary-voice-chat-helper
feat(libSceProprietaryVoiceChatHelperPrx): implement the voice chat helper lifecycle
2026-10-13 10:47:32 +02:00
Dean Galvin 8c04efcfbc fix(shader): load a BDA span in place from its own function
read_bda_span chooses between the span's in-place dword loads and its
per-dword byte fallback, which calls read_bda_dword_bytes. Each shape of
that choice so far hangs a group of NVIDIA drivers: a dispatch never
finishes and the device is lost.

As the two arms of one selection, with the loads emitted in the arm,
it hung drivers 591.86 and 590.48.01 when lanes took both arms (#3291).
As two selections, the loads under the span's condition and the fallback
under its negation (#4759), it hangs 595.97, 596.36, 610.62, 610.74 and
610.57.04 (#4975).

The loads now live in load_bda_span, a DontInline function that calls
nothing, and read_bda_span is one selection again: one arm calls
load_bda_span, the other is the fallback as before. Probe, loads,
lookups, faults and stops are unchanged for every lane.

On an RTX 4090 (Linux, driver 610.57.04) the two-selection shape hangs
agc_driver_scalar_wide_loads and agc_driver_flat_apertures_0..13 in a
build with SPIRV-Tools, and agc_driver_bda_span_reads and
agc_driver_pixel_interlock in a build without. All pass with this
change in both builds. Drivers 591.86, 590.48.01, 595.97, 596.36,
610.62 and 610.74 are not tested; a shape with the loads in their own
DontInline function was reported passing on 591.86 in #3291.

agc_shader_memory now requires that a span read function holds no load
and calls its load function once, and that the load function holds the
four loads and no call.

Refs #4975
2026-10-13 21:40:18 +13:00
Michon a72dcb93aa test(agc): clip and cull distances drawn through the device and the driver
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 21:37:49 +13:00
Michon 04138f50ad feat(agc): vertex clip and cull distances
PA_CL_VS_OUT_CNTL's clip and cull enables and its misc and distance vector bits reach the recompiler's vertex info (request version 20), the draw key, the vertex-info comparison and the recompile cache key. Registration and draw-time preparation set them the same way the draw does; a program without pos1..pos3 exports gets none, so its artifact does not depend on the register. Guest clip distances share main's gl_ClipDistance array with the all-zero position distance; cull distances need shaderCullDistance. Up to eight clip and cull distances are accepted.

Co-Authored-By: john.maia <hi@johnmaia.dev>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 21:37:49 +13:00
Matheus Lima da Silva e933285d82 feat(libSceProprietaryVoiceChatHelperPrx): implement the voice chat helper lifecycle
Initialize and Terminate track whether the library is initialized, and
SetVoiceChatState returns success without recording anything: the host has
no system voice chat for a title's own voice chat to announce itself to,
and the state argument is unknown.

GetVoiceChatUsageState keeps throwing. With the state argument unreadable
there is no recorded usage state, and whether the console returns the state
or writes it through an output pointer, and how it encodes it, is unknown.

Misuse throws rather than guessing an error code, as the library's error
codes are unknown.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-13 10:34:39 +02:00
Adrià cac4e9688f
Merge pull request #4960 from fdfawef324/feat/libSceDbgThreadSanitizer
feat(libSceDbgThreadSanitizer): declare the TSan annotation calls and report the sanitizer disabled
2026-10-13 10:34:04 +02:00
Adrià 20890629f2
Merge pull request #4893 from Lorkydey/feat/audioout2-user-supported-attributes
feat(audioout2): report supported user attributes
2026-10-13 10:31:46 +02:00
Adrià cee54cdade
Merge pull request #4918 from Feuris/feat/libc-mtx-init-with-name
feat(libc): implement _Mtx_init_with_name
2026-10-13 10:30:43 +02:00
Adrià 5f426f9478
Merge pull request #4902 from nicolasfalesy/feat/videoout-delete-vrr-status-event
feat(libSceVideoOut): implement sceVideoOutDeleteVrrActiveStatusEvent
2026-10-13 10:29:25 +02:00
Dean ad653c9bc3
Merge pull request #5015 from oneandonlydean/up4/fix-fmin-zero-sign
fix(libSceLibcInternal): return the negative zero from fminf for zeros of different sign
2026-10-13 21:25:42 +13:00
Dean 637ade873e
Merge pull request #5014 from oneandonlydean/up4/fix-windows-patched-libraries
fix(libc): hand out the unwind cursor table through a _nid_no_patch export
2026-10-13 21:25:34 +13:00
lorkydey 87ee82410b feat(audioout2): report supported user attributes 2026-10-13 10:24:04 +02:00
Adrià e96bfffa59
Merge pull request #4877 from jagrat04/feat/libkernel_sys-renameat
feat(libkernel_sys): implement renameat
2026-10-13 10:23:01 +02:00
jagrat Singh 2a8e745267 feat(libkernel_sys): implement renameat 2026-10-13 10:19:35 +02:00
Adrià 4899658e87
Merge pull request #4882 from Lorkydey/feat/libkernel-coredump-stop-info-cpu
feat(libkernel): answer CPU stop-info queries outside the coredump handler
2026-10-13 10:19:19 +02:00
Adrià db3d379c87
Merge pull request #4870 from jagrat04/feat/libkernel_sys-unlinkat
feat(libkernel_sys): implement unlinkat
2026-10-13 10:16:19 +02:00
Adrià 534451426a
Merge pull request #4860 from jagrat04/feat/libSceNpEntitlementAccess-pft-flag
feat(libSceNpEntitlementAccess): implement sceNpEntitlementAccessGetPftFlag
2026-10-13 10:13:42 +02:00
Dean Galvin cd9573b41c fix(libSceLibcInternal): return the negative zero from fminf for zeros of different sign 2026-10-13 21:12:48 +13:00
jagrat Singh 55ddffe269 feat(libkernel_sys): implement unlinkat 2026-10-13 10:11:24 +02:00
Adrià bd826d52f8
Merge pull request #4816 from winstrex/feat/agc-get-gs-prim-payload
feat(libSceAgc): implement sceAgcGetGsPrimPayload
2026-10-13 10:11:08 +02:00
Dean Galvin 3a9cc63683 fix(libc): hand out the unwind cursor table through a _nid_no_patch export
_Unwind_Context took its cursor table from LibcUnwind::CursorSlots, a C++
data symbol of libc. On Windows LibcUnwind::Frame holds an _Unwind_Context,
so libSceAgcDriver, which builds frames for its worker sampler, imported
_ZN10LibcUnwind11CursorSlotsE from libc.prx. The NID patcher renames that
export in the patched libc and leaves the import alone, so the patched
libSceAgcDriver, libSceAgc and libSceVideoOut failed to load with error 127
and patched_libraries failed. The table is now file-local and the context
reads it through UnwindCursorSlots_nid_no_patch, which keeps its name on
both sides.
2026-10-13 21:09:26 +13:00
jagrat Singh 7900b59d52 feat(libSceNpEntitlementAccess): implement sceNpEntitlementAccessGetPftFlag
Reports a full game, not a Play First Trial: 0 is written to the uint32_t output and 0 returned; a null pointer returns 0x817D0002.

Signature, value, one-word write and error match sceNpEntitlementAccessGetGameTrialsFlag and sharpemu src/SharpEmu.Libs/Np/NpEntitlementAccessExports.cs:98-116. 0x817D0002 is the parameter error of KytyPS5, prosper and sceNpEntitlementAccessGetEntitlementKey. The library has no initialization state, so none is checked. Update technical debt documentation and add unit test in guest_offline_imports.
2026-10-13 10:08:24 +02:00
Adrià Franch ed79ae1a2f chore(libs): remove libReactNative.Modules.Vsh and its WebAppLauncher
They are modules of the console's own shell (VSH), not libraries a title
links. No title in the open PRs, discussions or code references them, and
every export is a stub that throws. Their Share*, ErrorDialog* and
SystemServiceParamGet* exports duplicate libSceShare, libSceErrorDialog
and libSceSystemService (#228, #241).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-13 10:04:28 +02:00
Adrià c080fc2d5b
Merge pull request #4786 from p3n1cillin/claude/load-exec-restart
feat: convert a title's other executables and start them with sceSystemServiceLoadExec
2026-10-13 10:02:50 +02:00
Adrià 4834930ea6
Merge pull request #4784 from freshstart2066-create/feat/libc-floor
feat(libc): implement floor
2026-10-13 09:59:40 +02:00
Adrià 42e5edadbe
Merge pull request #4708 from Aathish-D/feat/savedata-get-convert-progress
feat(libSceSaveData): implement sceSaveDataGetConvertProgress
2026-10-13 09:56:01 +02:00
Adrià 0587a755d6
Merge pull request #4775 from p3n1cillin/claude/pad-angular-velocity-deadband
feat(libScePad): apply the angular velocity deadband
2026-10-13 09:55:21 +02:00
Adrià a527286241
Merge pull request #4743 from jagrat04/feat/libkernel_sys-mkdirat
feat(libkernel_sys): implement mkdirat
2026-10-13 09:55:12 +02:00
p3nicillin 99efb32c40 feat: convert a title's other executables and start them with sceSystemServiceLoadExec
The relinker's repeatable --executable converts another executable of the
title beside the output, sharing its libs, app0 and guest modules.
sceSystemServiceLoadExec maps /app0 paths to those executables, passes the
argument list on the new command line and finds the main executable through
APS5_EBOOT. RetroArch (PPSA99169) starts its frontend picker this way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:51:50 +01:00
Aathish b078f475ec feat(libSceSaveData): implement sceSaveDataGetConvertProgress 2026-10-13 09:48:44 +02:00
Adrià fc1f063f51
Merge pull request #4622 from jagrat04/feat/libkernel-lutimes
feat(libkernel): implement lutimes
2026-10-13 09:48:07 +02:00
Adrià a24da90293
Merge pull request #4990 from 0xRickx/fix/libc-dynamic-cast-guest-abi
fix(libc): call __dynamic_cast and __cxa_init_primary_exception with the guest ABI
2026-10-13 09:46:33 +02:00
Adrià 8da50fd052
Merge pull request #4592 from leorossi2005/feat/libkernel_libSceLibcInternal_missing_ppsa99902
feat(libSceLibcInternal): implement fminf required for PPSA99902 startup
2026-10-13 09:46:04 +02:00
Adrià a373241de4
Merge pull request #4582 from jagrat04/feat/libkernel-madvise-madv-protect-pr
feat(libkernel): accept MADV_PROTECT advisory hint in madvise
2026-10-13 09:44:18 +02:00