Commit Graph
5577 Commits
Author SHA1 Message Date
Raj 887a258152 fix(libc): read every variadic argument of the Linux snprintf, sprintf, sscanf and libc_printf
On Linux these four exports took the guest's registers as named parameters
and rebuilt a va_list from them. The register save area held only the
argument registers after the fixed ones, followed by zeros, with gp_offset 0,
so va_arg read the zeros for the remaining integer slots before moving to the
overflow area. overflow_arg_area was the seventh integer parameter, which is
the value of the first stack argument, not its address.

snprintf(buffer, size, "%d %d %d %d", 1, 2, 3, 4) produced "1 2 3 0",
"%s/%s/%s/%s" with four strings produced "a/b/c/(null)", and eight integers
dereferenced the value 4 and crashed. sprintf and sscanf lost their fifth
and sixth arguments, libc_printf its sixth.

They are now variadic functions that use va_start, like printf, sprintf_s,
snprintf_s and printf_s on Linux already do.
2026-10-08 11:46:56 +05:30
Adrià 7a178e2276 Merge pull request #1089 from AaravMehta-07/fix/relinker-registry-json
fix(relinker): escape control characters in call registry JSON
2026-10-08 08:10:07 +02:00
TibixDev ce280a19ca perf(agc): handle uniform pattern-fill kernels as clears
Recognize the exact typed pattern-fill kernel and route aligned, nonaliased uniform ranges through existing fill/coherence handling. Preserve control and descriptor bounds, partial dispatch counts, queued labels, and shader fallback for other cases.

Semantics checked on Radeon RX 6600: native RDNA wave32/wave64 typed R32_UINT loads/stores, execution masks, and descriptor bounds (16 cases). Real PM4 tests cover HLE and shader paths, imports and copies, indirect/partial dispatch and GPU-to-label ordering under Vulkan validation. Graphics and PM4 tests pass; Skyrim Helgen save visually checked. 64 MiB copied-buffer fill median reduced from 67.5 ms to 3.8 ms.

Written with AI assistance.
2026-10-08 09:08:38 +03:00
Adrià dcbf089d28 Merge pull request #995 from CnRJay/fix/appcontent-user-defined-params
fix(libSceAppContent): read user defined app params from param.json
2026-10-08 08:07:21 +02:00
Adrià 57b62cedf1 Merge pull request #1088 from kjhq/fix/libkernel-sockaddr-len
fix(libkernel): accept guest socket addresses whatever their sa_len
2026-10-08 08:07:17 +02:00
Adrià e9fecced17 Merge pull request #1086 from Celegans12/fix/agc-depth-bias-clamp-default
fix(agc): include PA_SU_POLY_OFFSET_CLAMP in the initial context state
2026-10-08 08:06:30 +02:00
Adrià 30e500f781 Merge pull request #917 from TidalImpact/fix/rela-bounds-check
fix(relinker): overflow-safe RELA entry bounds check
2026-10-08 08:03:28 +02:00
Adrià 57669661c5 Merge pull request #1038 from gjonn/feat/ngs2-pcm-streaming
feat(libSceNgs2.native): stream 16-bit PCM waveforms through appended waveform blocks
2026-10-08 08:01:17 +02:00
alfalfa-starandClaude Opus 5.5 b5be685912 feat(agc): accept CMASK fast-clear DCC targets whose CMASK is expanded
A color target with both DCC and CB_COLOR_INFO.FAST_CLEAR keeps its fast
clear in the DCC keys and fills its CMASK with 0xF (expanded), as radv
does (radv_get_cmask_fast_clear_value) and as PPSA21567 does
(CB_COLOR_INFO 0x10042730, reported on #419). Such targets now decode;
their clear is materialized by the existing DCC path. A DCC target's
CMASK that is not all expanded throws.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 07:58:40 +02:00
alfalfa-starandClaude Opus 5.5 61a61016d8 feat(agc): render into CMASK fast-clear color targets
Draws into a color target with CB_COLOR_INFO FAST_CLEAR (bit 13) were
rejected. The CMASK keeps one nibble per 8x8 tile: 0 means the tile is
fast-cleared and reads as CB_COLOR_CLEAR_WORD, 0xF means expanded (the
texels hold the color). The texture units and display scanout do not read
it, so a title runs a fast-clear eliminate pass before sampling or
flipping such a target.

DecodeColorBuffer now takes the CMASK address (CB_COLOR0_CMASK and
CB_COLOR0_CMASK_BASE_EXT) and the bytes one nibble per 8x8 tile spans.
Before a draw renders into the target, and in a fast-clear eliminate
pass, a CMASK whose nibbles are all 0 is materialized: the target is
filled with the clear texel (FillClear on its resident image, else
guest memory on the CPU) and the CMASK bytes are stored as expanded,
through the same GPU-ordered store as the DCC "uncompressed" keys
(0xFF either way). The result equals the draw followed by the eliminate
pass. An all-expanded CMASK changes nothing; a mixed one throws, as do
fast clears of DCC, mipmapped, 3D and array targets.

PPSA14632 (LEGO Horizon Adventures) fast-clears its two 3840x2160
display buffers through CMASK, so its final composite draw was dropped
on every frame and only black was presented.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 07:58:31 +02:00
Adrià 058dead176 Merge pull request #1058 from Celegans12/feat/agc-r8-srgb-color-target
feat(agc): implement 8 srgb color targets through rgba8 srgb proxies
2026-10-08 07:52:45 +02:00
4e69584edf test(relinker): pin RELA bounds check with malformed-ELF cases
Co-authored-by: Dextroid17 <[email protected]>
Co-Authored-By: Claude <[email protected]>
2026-10-08 07:52:32 +02:00
Fynn Jannis Schulz 9ff9d4325c fix(relinker): share RELA entry bounds check with extractRelative 2026-10-08 07:52:23 +02:00
Fynn Jannis Schulz cfba9c09d2 fix(relinker): overflow-safe RELA entry bounds check 2026-10-08 07:52:23 +02:00
Adrià 1f7109c2b4 Merge pull request #1071 from LeandroLP23/fix/agc-address-space-cache-exit
fix(agc): release the current address space with the image mirrors
2026-10-08 07:50:27 +02:00
Adrià a9c66ebfd6 Merge pull request #1065 from alfalfa-star/fix/radv-descriptor-pool-tail
fix(agc): keep RADV's descriptor pool overrun inside the pool's pages
2026-10-08 07:49:38 +02:00
Adrià FranchandClaude 1b9a1243dc test(libSceAppContent): pin sceAppContentAppParamGetInt ids 0..5
Co-Authored-By: Claude <[email protected]>
2026-10-08 07:49:22 +02:00
ChadandClaude Opus 5.5 3b6183a208 fix(libSceAppContent): read user defined app params from param.json
sceAppContentAppParamGetInt numbers the SKU flag 0 and
USER_DEFINED_PARAM_1..4 as 1..4 (fpPS4 ps4_libsceappcontent). Id 1
returned the SKU flag and 2..5 returned zero. UFC 6 (PPSA23566) checks
that param 1 is its title number, userDefinedParam1 in param.json, and
crashes otherwise. Absent params read as zero.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 07:49:16 +02:00
MathiasDevelopesandClaude Opus 5.5 77ef75c1da feat(libkernel): implement sceKernelGetModuleInfoFromAddr on Windows
Read the module layout from the PE image that holds the address. A
relinked image reports its .elf sections as segments and the
eh_frame_hdr recorded in .ehmeta; any other image reports its sections
with memory access and its .ehfram section. The eh_frame_hdr and
eh_frame helpers are shared with the Linux path, and the guest module
info test now also runs on Windows.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-08 05:46:48 +00:00
Adrià 311c0493bd Merge pull request #957 from JAB-dev/feat/kernel-flexible-internal-hint
feat(libkernel): accept flag 0x8000 in sceKernelMapNamedFlexibleMemoryInternal
2026-10-08 07:42:56 +02:00
Gjon Gojcevic 88e77da57b feat(libSceNgs2.native): stream 16-bit PCM waveforms through appended waveform blocks
A 16-bit PCM block whose num_samples exceed its data starts a stream, and waveform blocks with flag 0x2 append more data to it. The voice outputs silence while it has played all appended data and CONTINUE is set, and ends at num_samples or when CONTINUE is cleared.
2026-10-08 07:35:59 +02:00
Dean c8a2f06325 Merge pull request #1248 from eliasbruno124-dev/fix/net-ipv6-any-current
fix(net): provide IPv6 unspecified address object
2026-10-08 18:29:31 +13:00
Dean a7715e671f Merge pull request #1109 from Sanjaysrinivas/fix/savedata-memory-write-preservation
fix(savedata): preserve memory on write failure
2026-10-08 18:28:14 +13:00
Dean 4a435af58a Merge pull request #1103 from ctz23/test/windows-icon-distinct-output-20261007
test(relinker): use distinct executables in Windows icon tests
2026-10-08 18:28:01 +13:00
Dean 7753fb0165 Merge pull request #1407 from hugodearaujo/fix/voiceqos-init-error-codes
fix(voiceqos): return the console's sceVoiceQoSInit argument errors
2026-10-08 18:23:39 +13:00
TibixDev e6324faef6 fix(npmanager): track reachability callback registration
Validate registration and unregister state in the existing offline model. Add lifecycle and invalid-argument coverage.

Written with AI assistance.
2026-10-08 08:23:31 +03:00
Dean 4f7c32a2df Merge pull request #1295 from TibixDev/pr/tls-destructor-test
test(libc): resolve the library address in the TLS destructor test
2026-10-08 18:23:12 +13:00
Dean e1aca88408 Merge pull request #1144 from AchrafReyani/refactor/psml-debug-name-stubs
refactor(libScePsml_debug): name the Mfsr stubs the NID database resolves
2026-10-08 18:22:39 +13:00
Dean d71cc683f2 Merge pull request #1397 from hugodearaujo/fix/rtc-parse-rfc3339-hardware
fix(rtc): match sceRtcParseRFC3339 to the console
2026-10-08 18:22:02 +13:00
Dean 6ad4124a89 Merge pull request #1259 from krishnaraya4/test/agc-skip-without-float64-shader-clock
test(agc): skip the f64 and shader clock execution tests on devices without the feature
2026-10-08 18:21:48 +13:00
Dean dad6e96acd Merge pull request #1234 from hashaam1217/test/windows-tls-cases-on-linux
test(relinker): run the Windows TLS cases on Linux x86-64
2026-10-08 18:21:34 +13:00
Adrià c6bb7c1025 Merge pull request #904 from merwie/fix/kernel-module-info-for-unwind
fix(libkernel): report guest unwind tables in sceKernelGetModuleInfoForUnwind
2026-10-08 07:21:21 +02:00
Dean 0f39363fe0 Merge pull request #1210 from johnmaia/test/agc-recorder-real-gpus
test(agc): run the recorder tests on AMD and Intel GPUs
2026-10-08 18:20:53 +13:00
Dean 637fb3e354 Merge pull request #1187 from johnmaia/test/agc-bda-device-ctest
test(agc): run agc_driver_bda_device_tests under ctest
2026-10-08 18:20:39 +13:00
Dean a8279c01ac Merge pull request #1172 from emaurel/fix/system-font-test-windows
test(font): move the console font aside instead of deleting it while its face is mapped
2026-10-08 18:20:25 +13:00
Dean d0b7ff98e9 Merge pull request #1149 from eliasbruno124-dev/fix/json-callback-export
fix(json2): support null-access callback spelling
2026-10-08 18:19:57 +13:00
Dean b01673ac0a Merge pull request #1129 from AaravMehta-07/test/exception-runtime-release
test(libc): keep exception runtime assertions enabled in Release
2026-10-08 18:19:44 +13:00
Dean 8180dc5b9c Merge pull request #1118 from TideOPL/feat/pad-is-remote-controller
feat(libScePad): implement scePadIsRemoteController
2026-10-08 18:19:30 +13:00
Dean 66b2895036 Merge pull request #1106 from orbz22/test/register-windows-exception-tests
test(libc): run windows_exception_tests in ctest
2026-10-08 18:19:11 +13:00
Dean e0924e28f1 Merge pull request #1160 from orbz22/feat/font-glyph-define-attribute
feat(font): accept sceFontGlyphDefineAttribute as a silent stub
2026-10-08 18:19:01 +13:00
Dean fd2eb90c69 Merge pull request #1158 from orbz22/feat/ppsa01325-missing-exports
feat(libs): provide the exports PPSA01325 imports that no library has
2026-10-08 18:18:53 +13:00
Dean 1e05e4f953 Merge pull request #1096 from kjhq/feat/libscenet-in6addr
feat(libSceNet): export in6addr_any and in6addr_loopback
2026-10-08 18:18:40 +13:00
Dean 10cb0d208e Merge pull request #1092 from kjhq/feat/libscehttp2-async
feat(libSceHttp2): complete asynchronous requests through the kqueue option
2026-10-08 18:18:26 +13:00
Gjon Gojcevic 9ebc907beb fix(agc): render 16_16_16_16 color targets with reversed component orders
Accept COMP_SWAP STD_REV and ALT_REV on 16_16_16_16 color targets and
map them onto RGBA16 with the same export component mappings used for
8_8_8_8. ALT on 16_16_16_16 is still refused.
2026-10-08 01:13:32 -04:00
Nahuel Genchi 0543e636ef test(agc): match the unreadable-code error and run the flip compute mode in ctest 2026-10-08 01:57:33 -03:00
popcoder565andClaude Opus 5.5 175846186a fix(libkernel): read the raise target's context before choosing APC delivery
SuspendThread returns before the thread has stopped, and GetThreadContext waits until it has. waitCount was read right after SuspendThread, so a thread that was leaving its wait could still decrement it and drain its APCs with NtTestAlert before QueueUserAPC queued the delivery, which then waited for an alertable wait that never came. The context is now read first, so waitCount is read from a stopped thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 00:53:58 -04:00
popcoder565andClaude Opus 5.5 c3f3cc849a test(libkernel): raise exceptions at a thread that keeps continuing SEH exceptions
The new phase's vectored handler continues every exception the thread raises, so the thread spends much of its time in NtContinue, where a redirect is lost unless the raise retries. Without the retry the phase hangs in every run; with it the test passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 00:53:58 -04:00
Nahuel Genchi 5adac33c5b test(agc): run the PM4 asynchronous failure mode in ctest 2026-10-08 01:53:18 -03:00
raghav314andClaude Opus 5.5 dfa179f43f fix(relinker): write a bucketed hash table for Linux guest modules
The Linux guest module writer emitted DT_HASH with a single bucket, so
every symbol lookup that reached a guest module walked its whole symbol
table. Guest modules come first in the global scope, so each host prx
lookup paid that walk at load and on every lazy PLT call. Build the
standard SysV table from the final symbol names with one bucket per
symbol, as the console's modules ship it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 10:20:45 +05:30
Dean Galvin b4029887b4 fix(agc): guard the reported wait-timeout set against concurrent queues
waitMemory's timeout report keeps a function-local static std::set of the
addresses already reported and a static counter. Two queue workers whose
waits time out at the same time insert into the set concurrently, which
is a data race on a std::set and can corrupt the tree. The set and the
counter are now updated under a mutex.
2026-10-08 17:44:31 +13:00