Commit Graph

525 Commits

Author SHA1 Message Date
Adrià 73ac9ef7f4
Merge pull request #1218 from hashaam1217/feat/relinker-rip-relative-stubs
feat(relinker): relocate RIP-relative operands into --to-intel stubs
2026-10-08 11:40:17 +02:00
Adrià b36718214c
Merge pull request #1206 from CnRJay/feat/http-ssl-and-callbacks
feat(libSceHttp): accept the SSL version, SSL error and redirect and cookie callback calls
2026-10-08 11:38:43 +02:00
Adrià b680d5adac
Merge pull request #1198 from Sanjaysrinivas/feat/shader-conditional-exchange
feat(shader): add LDS conditional exchange
2026-10-08 11:34:31 +02:00
Adrià Franch 274b070ac2 docs: mark the VRSQRTPS/VRCPPS native-site count as predating RIP-relative followers
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 11:10:42 +02:00
Hashaam Zafar a571a7f100 feat(relinker): relocate RIP-relative operands into --to-intel stubs
SHA-1 and SHA-256 instructions with a [rip+disp32] operand, and
instructions with one that a short site absorbs, now move into the
stub. The stub records each displacement as a relocation relative to
the site, and the Linux, guest and Windows placements resolve it once
the stub address is known. Indirect branches through [rip+disp32]
still fail the relink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:10:38 +02:00
Adrià e3d5e79eb8
Merge pull request #1126 from Fishybeing/fix/libc-utf16-conversions
fix(libc): parse and collate guest wide strings as 16-bit units
2026-10-08 11:09:24 +02:00
Adrià ac951f8d09
Merge pull request #1215 from polysius/fix/agc-versioned-nid-names
refactor(libSceAgc): name exports after the versioned SDK names their NIDs hash to
2026-10-08 11:05:42 +02:00
Sanjaysrinivas 34d4cf1796 fix(shader): preserve LDS conditional addresses
Use the shared atomic bounds check instead of wrapping at 64 KiB.
Expect zero returns and unchanged LDS for aligned out-of-range accesses,
and record the gfx1035 hardware measurements.
2026-10-08 11:04:26 +02:00
Adrià e82e03f11e
Merge pull request #1093 from kjhq/fix/libkernel-sync-access-denied
fix(libkernel): flush only the paths the guest changed in sceKernelSync on Windows
2026-10-08 10:58:55 +02:00
Claude 3ed954fb90 feat(libSceHttp): accept the SSL version, SSL error and redirect and cookie callback calls
No request reaches the network, so sceHttpsSetSslVersion has no TLS
connection to configure, sceHttpSetRedirectCallback and
sceHttpSetCookieRecvCallback register callbacks that are never called,
and sceHttpsGetSslError reports error 0 with detail 0. A null errNum or
detail returns SCE_HTTP_ERROR_INVALID_VALUE like sceHttpGetLastErrno.
Signatures follow shadPS4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:57:14 +02:00
Adrià 0e173a4634
Merge pull request #1143 from AchrafReyani/feat/libc-bad-weak-ptr
feat(libc): implement std::bad_weak_ptr and _Throw_bad_weak_ptr
2026-10-08 10:30:41 +02:00
kjhq bb1a4cbec4 fix(libkernel): flush only the paths the guest changed in sceKernelSync on Windows
Opening a volume needs administrator rights, so the volume flush skipped
every volume in a normal user session. The libc, libkernel, save data and
app content file functions now record each host file and directory they
change. On Windows sceKernelSync flushes the recorded paths that changed
since the previous call, plus their changed parent directories, through
handles a normal user can open. Linux still calls sync().
2026-10-08 08:27:22 +00:00
Fishybeing 5b0d28392c fix(libc): parse and collate guest wide strings as 16-bit units
wcstod, wcstof, wcstold, wcstol, wcstoll, wcstoul, wcstoull, wcscoll and wcsxfrm still forwarded to the host's wchar_t functions, which use 32-bit units on Linux. The wcsto* functions now parse the ASCII prefix of the guest string with the narrow parsers, as the C locale accepts only ASCII white space and digits. wcscoll compares like wcscmp and wcsxfrm copies, as strcoll and strxfrm do in the C locale.
2026-10-08 10:27:00 +02:00
Adrià f6c33f0d04
Merge pull request #1131 from orbz22/feat/kernel-vectored-io-windows
feat(kernel): implement vectored file IO on Windows
2026-10-08 10:18:29 +02:00
Adrià c081eb90dc
Merge pull request #1116 from Fishybeing/fix/libc-utf16-strings
fix(libc): read guest wide strings as 16-bit units
2026-10-08 10:15:55 +02:00
Adrià 1c3f55628d
Merge pull request #1122 from TideOPL/feat/agc-copy-data-gpu-clock
feat(agc): copy the GPU clock counter with COPY_DATA
2026-10-08 10:12:18 +02:00
Adrià da4027399e
Merge pull request #1125 from TideOPL/feat/ppsa16064-missing-exports
feat(libs): add the unimplemented exports PPSA16064 imports
2026-10-08 10:01:59 +02:00
Achraf Reyani df570de6d5 feat(libc): implement std::bad_weak_ptr and _Throw_bad_weak_ptr
BnMAMrsfVWo is _ZSt19_Throw_bad_weak_ptrv. Replace the unknown stub
with a throw of a guest std::bad_weak_ptr, and add its type info,
vtable, destructors and what().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:00:54 +02:00
Adrià 7fccb7ff5f
Merge pull request #1051 from fisherjoey/fix/linux-unwritable-host-import
fix(agc): skip Linux host imports of ranges not mapped read-write
2026-10-08 09:53:40 +02:00
Adrià Franch e8697e6938 docs: record the Windows positioned and vectored IO deviations in TechnicalDebt 2026-10-08 09:53:01 +02:00
Raihan Abdul Majid a38df0f020 feat(kernel): implement vectored file IO on Windows
sceKernelReadv, sceKernelWritev, sceKernelPreadv and sceKernelPwritev threw on Windows. They now gather or scatter through one host buffer and issue a single read or write, with the same argument checks and error codes as the Linux path. Positioned transfers restore the file offset afterwards, as pread and pwrite do on POSIX, and report ESPIPE for handles that are not disk files. guest_file_vector now runs on Windows as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
2026-10-08 09:52:49 +02:00
TideOPL 23e0363e59 feat(agc): copy the GPU clock counter with COPY_DATA
COPY_DATA rejected source select 9 (GPU clock count) and any cache
policy bits. PPSA16064 (Minecraft Dungeons II, Unreal Engine)
calibrates its GPU timer at start-up with a submission of five
COPY_DATA packets, control 0x06016209: GPU clock source, memory
destination, 64-bit count, source and destination cache policy 3. The
submission was rejected and the title aborted.

The clock source now writes the same counter as a RELEASE_MEM
timestamp (the host steady clock in 10 ns ticks), read when the packet
runs, through the direct execute path and through ResolveStore for
stores recorded on the GPU. A 32-bit count writes its low half. The
source and destination cache policy fields are accepted and ignored,
as for WRITE_DATA and DMA_DATA. The reference clock (source select 10)
and the other unimplemented sources still throw.

agc_driver_pm4 runs the title's packet twice and checks a nonzero,
non-decreasing counter and an 8-byte resolved store, and that source
select 10 is still rejected.
2026-10-08 09:47:53 +02:00
Adrià 1e1e1390b5
Merge pull request #1123 from TideOPL/fix/agc-command-buffer-null-cursor-down
fix(libSceAgc): treat a null cursor_down as a buffer limited by its top
2026-10-08 09:41:38 +02:00
Fishybeing cd39c8db54 fix(libc): read guest wide strings as 16-bit units
The guest's wchar_t is 16 bits, but wcslen, wcscmp, wcsncmp, wcscpy, wcsncpy, wcschr, wcsrchr, wcsstr, wcspbrk, wcsspn and the wmem functions forwarded to the host's wchar_t functions, which use 32-bit units on Linux. Implement them on char16_t. The wide conversions that still use the host's wchar_t are listed in TechnicalDebt.
2026-10-08 09:39:55 +02:00
Adrià Franch 80456dac90 docs(debt): say the Linux host import check does not cover shared file mappings
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 09:37:52 +02:00
Joey Fisher 25c0a71869 fix(agc): skip Linux host imports of ranges not mapped read-write
NVIDIA (595.91.07) refuses VK_EXT_external_memory_host imports of
read-only or executable mappings with VK_ERROR_OUT_OF_DEVICE_MEMORY and
then fails every later vkAllocateMemory on the device. Check the range
is mapped read-write before importing on Linux, as the Windows path
already does for read-only memory, and copy it otherwise.

Refs #1022
2026-10-08 09:37:46 +02:00
Adrià 6b57386237
Merge pull request #1100 from gookie-dev/fix/agc-indirect-register-lists-at-submission
fix(agc): read indirect register lists when the command buffer is submitted
2026-10-08 09:14:02 +02:00
Dean 58a1bd6688
Merge pull request #1447 from oneandonlydean/fix/cmask-metablock-size
fix(agc): size CMASK by whole 1024x512 metablocks
2026-10-08 20:12:42 +13:00
Adrià 979ae68996
Merge pull request #1095 from kjhq/feat/libkernel-write-throttling
feat(libkernel): report no write throttling in sceKernelWriteThrottlingStatus
2026-10-08 09:11:51 +02:00
Chad c17337b6d9 fix(agc): size CMASK by whole 1024x512 metablocks
A CMASK holds 4 KiB per 1024x512-pixel metablock, not one nibble per 8x8
tile of the target: 1920x1080 spans 0x6000 bytes, as titles clear it,
not 16200. The swizzled nibbles of the lower-right tiles lie past the
packed size, so the fast-clear check missed them and the expanded store
left them cleared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 19:53:02 +13:00
Dean 66b9be6607
Merge pull request #1322 from TibixDev/pr/np-reachability-lifecycle
fix(npmanager): track reachability callback registration
2026-10-08 19:36:00 +13:00
Dean a57ccfb426
Merge pull request #1275 from KSWORK2001/fix/libscertc-dostime-range
fix(libSceRtc): answer out-of-range years in sceRtcGetDosTime
2026-10-08 19:35:43 +13:00
Adrià 56f3da20e8
Merge pull request #1072 from alfalfa-star/feat/agc-cmask-fast-clear
feat(agc): render into CMASK fast-clear color targets
2026-10-08 08:32:04 +02:00
gookie de651c6283 fix(agc): read indirect register lists when the command buffer is submitted
The driver copies a submission's packets when it is submitted, but
SET_SH_REG_INDIRECT, SET_UCONFIG_REG_INDIRECT and SET_CONTEXT_REG_INDIRECT
read their (offset, value) lists from guest memory only when the queue
worker reaches the packet. A title that reuses its per-frame memory once
it expects the GPU to be done with it can rewrite a list in between, and
the worker then throws on the data it finds there ("extended register
semantics are not implemented (offset dword 0x3a888889)").

The lists are now read with the packets, after validation, in Submit and
for a rewind tail, and the worker writes the registers from that copy.
Pm4::Execute keeps reading the list itself for direct callers.

PPSA21402 (Balatro) keeps three frame slots and does not wait for the GPU
before reusing one: its slot labels start at 0xffffffff and the GPU only
ever writes 0xffffffff to them, so the poll before a slot is reused never
blocks. When the worker falls more than two frames behind, the title
writes per-draw constants over a SET_CONTEXT_REG_INDIRECT list the worker
has not read yet.

The console's PFP reads the list when it reaches the packet; the
difference is recorded in TechnicalDebt.md.
2026-10-08 08:30:22 +02:00
kjhq 329c825fe1 docs(libkernel): record how PPSA17221 reads sceKernelWriteThrottlingStatus 2026-10-08 08:21:30 +02:00
kjhq 295780ab20 feat(libkernel): report no write throttling in sceKernelWriteThrottlingStatus
The host has no SSD write budget, so the status reports the largest budget in its first qword and zeroes the rest.
2026-10-08 08:21:23 +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-star 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 <noreply@anthropic.com>
2026-10-08 07:58:40 +02:00
alfalfa-star 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 <noreply@anthropic.com>
2026-10-08 07:58:31 +02:00
Adrià e98466797f
Merge pull request #1082 from MuhammadUmair1019/fix/oracle-explicit-float-modes
fix(oracle)!: require explicit float modes
2026-10-08 07:56:13 +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
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à 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 78cac62f30
Merge pull request #1137 from Sanjaysrinivas/fix/progress-shared-sources
fix(progress): report shared-source libraries
2026-10-08 18:29:17 +13:00
Dean 0ce1e45091
Merge pull request #1083 from ctz23/docs/linux-x11-build-requirements-20261007
docs(build): list Linux X11 development dependencies
2026-10-08 18:29:03 +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 461ab16f0d
Merge pull request #1104 from jeffrey12cali/docs/libs-target-not-default
docs(build): say that the libs target is not part of the default build
2026-10-08 18:22:17 +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