Commit Graph

1881 Commits

Author SHA1 Message Date
Adrià 79d23eb76c
Merge pull request #1321 from TibixDev/pr/guest-path-case
fix(libc): resolve case differences in guest paths and mounts
2026-10-08 15:01:28 +02:00
Adrià 09a17e963a
Merge pull request #1398 from hugodearaujo/fix/rtc-parse-datetime-iso-hardware
fix(rtc): parse ISO text in sceRtcParseDateTime by the RFC 3339 rules
2026-10-08 14:56:12 +02:00
Adrià e08c816abc
Merge pull request #1383 from nisbenz/fix/shader-memtime-narrow-subgroup-clock
fix(shader): read s_memtime from the device clock where RADV's subgroup clock is 20 bits
2026-10-08 14:51:41 +02:00
Adrià 0596a7a274
Merge pull request #1385 from gjonn/feat/recompiler-lwe-on-samples
feat(recompiler): accept lwe on MIMG samples and gathers
2026-10-08 14:43:27 +02:00
nisbenz f025a9e506 fix(shader): read s_memtime from the device clock where RADV's subgroup clock is 20 bits
On GFX10.3 to GFX11.7, ACO lowers a subgroup-scope OpReadClockKHR to
s_getreg_b32 of SHADER_CYCLES, 20 bits zero-extended to 64, so s_memtime
wrapped every 2^20 cycles and went backwards. Detect those families from
the RADV device name and read the device clock there instead.

Fixes #985

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:42:40 +02:00
Adrià cba8d86da8
Merge pull request #1270 from Celegans12/fix/agc-unaligned-buffer-views
fix(agc): bind guest buffer views that start off a DWORD boundary
2026-10-08 14:34:45 +02:00
TibixDev 4f23830d89 fix(libc): resolve guest filename case on host filesystems
Resolve ASCII case differences in guest paths and mount aliases while preferring exact names and rejecting ambiguous fallback matches. Preserve new filenames and host roots. Five filesystem tests pass; Skyrim now loads its INI and shader archives, initializes Vulkan and uploads intro textures instead of dereferencing null shader metadata. Written with AI assistance.
2026-10-08 14:33:17 +02:00
Adrià 0b3cc73e1c
Merge pull request #1112 from Celegans12/feat/agc-conservative-rasterization
feat(agc): implement overestimating conservative rasterization
2026-10-08 14:31:38 +02:00
SK Arin 6e951bd0ed fix(progress): exclude library test fixtures from function counts 2026-10-08 17:30:43 +05:30
Adrià 8087092234
Merge pull request #1350 from gjonn/feat/usbd-no-devices
feat(libSceUsbd): report a USB stack with no devices attached
2026-10-08 13:54:00 +02:00
Adrià 947a267f4d
Merge pull request #1302 from TibixDev/pr/ngs2-legacy-userfx
feat(ngs2): implement legacy submixer UserFx callbacks
2026-10-08 13:37:56 +02:00
Gjon Gojcevic 6e5d70f0cd feat(libSceUsbd): report a USB stack with no devices attached
Init and exit succeed, the device list is empty, event handling waits for its timeout, and calls that need a device throw.
2026-10-08 13:34:39 +02:00
Adrià 4f41832dc0
Merge pull request #1320 from TibixDev/pr/temporary-storage-lifecycle
fix(appcontent): track temporary storage mounts
2026-10-08 13:31:44 +02:00
Celegans12 29c22442dc feat(agc): implement overestimating conservative rasterization
A draw whose PA_SC_CONSERVATIVE_RASTERIZATION_CNTL (context 0x313) was
not the default 0x6000 threw in DecodeState and the draw precheck.
0x6001 sets OVER_RAST_ENABLE and now decodes to Vulkan's overestimation
mode, chained to the pipeline's rasterization state and its key.

The device enables VK_EXT_conservative_rasterization only when its
primitiveOverestimationSize is at most 1/256 pixel and it rasterizes
degenerate triangles; elsewhere the pipeline throws. Overestimation is
accepted only when triangles reach the rasterizer: VGT_GS_OUT_PRIM_TYPE
behind a geometry shader, VGT_TF_PARAM's output topology behind
tessellation, VGT_PRIMITIVE_TYPE otherwise. Other 0x313 values and
centroid interpolation still throw.

Adds the agc_driver_conservative_rasterization GPU test and extends
agc_driver_graphics.
2026-10-08 13:20:22 +02:00
Nikhil Panchal 43074a805e fix(recompiler): avoid illegal narrow constants during optimization
Skip CCP and Simplification for storage-only narrow types while keeping
the remaining passes and arithmetic-capable folding.

Add compiler and Vulkan readback regressions for default/full/none modes.

Tested: Linux/llvmpipe, full CTest with SPIRV-Tools on/off, ASan/UBSan
optimizer checks, and cold-cache Vulkan wave32/wave64 readback.

Fixes boykopovar/AnyPS5#1276
2026-10-08 13:20:06 +02:00
TibixDev 0d4db860a6 feat(ngs2): implement legacy submixer UserFx callbacks
Invoke the title callback on planar mixed samples and silence. Preserve per-voice callback data, reset registration on setup, and release the render guard on callback failure. Include behavioral tests and source references. Written with AI assistance.
2026-10-08 13:18:41 +02:00
Adrià 44ef694870
Merge pull request #1308 from TibixDev/pr/implicit-cube-extents
fix(agc): decode implicit six-face cube extents
2026-10-08 13:08:02 +02:00
Celegans12 38e89df1a5 fix(agc): bind guest buffer views that start off a DWORD boundary
A V# whose base is not a multiple of 4 bytes from the start of its GPU
owner threw in GuestBufferMemory::Descriptor, because the shader added
the offset below the view only in whole dwords.

Descriptor now binds from the offset alignment below the view and
passes the whole remainder. Such a view's range covers the dwords
around it, and its descriptor region starts and ends on dword
boundaries, so a lone view copied to its own buffer binds the same way.

The buffer specialization records the V# base's low two bits. Raw
vector loads through such a V# join two dwords, glc dwordx2 loads
included, stores merge their bytes into both with compare-exchange
loops, and bounds checks include the second dword. s_buffer_load
ignores the low two bits, as SrtEvaluator does. Formatted accesses
whose element alignment (min(element bytes, 4)) the base breaks throw,
as they fault the wave on RDNA2, and so do atomics.
2026-10-08 13:01:27 +02:00
TibixDev 33555244c3 fix(appcontent): track temporary storage mounts
Preserve files across unmount, block new lookups until remount, and validate mount-dependent operations. Keep prior-run storage inaccessible after initialization.

Written with AI assistance.
2026-10-08 13:00:00 +02:00
Adrià b599fe0586
Merge pull request #1268 from Celegans12/fix/shader-wave64-half-wave-reductions
fix(shader): read the half-wave scans of wave64 reductions on any host subgroup
2026-10-08 12:58:18 +02:00
Adrià 81f31ef1a9
Merge pull request #1301 from TibixDev/pr/ngs2-atrac9-loops
feat(ngs2): parse forward ATRAC9 waveform loops
2026-10-08 12:53:11 +02:00
Adrià 7c4dfac50e
Merge pull request #1293 from TibixDev/pr/savedata-progress-dialog
fix(savedata): keep progress dialogs running until closed
2026-10-08 12:50:48 +02:00
CyanBook 42f42ae228 docs(debt): drop sce::Json::Value::clear from PPSA23566 unknown signatures 2026-10-08 12:45:25 +02:00
Scott Schuster 408e305ca0 feat(libkernel): implement poll for guest sockets
Translate the FreeBSD pollfd layout and flags to WSAPoll on Windows and
poll on Linux. Closed socket descriptors report POLLNVAL, a timeout below
-1 fails with EINVAL and a null array with EFAULT. Non-socket
descriptors, unknown event bits, POLLPRI on Windows and an infinite wait
without sockets throw; these are recorded in TechnicalDebt.

DOOM (PPSA99666) imports poll for its upload server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:23:41 +02:00
xsvm 70b3ae082b docs(relinker): drop the VEX/0F38/0F3A gap from the rewriter debt entry 2026-10-08 18:20:14 +08:00
Adrià e28fa01ca6
Merge pull request #1253 from popcoder565/feat/shader-system-opcodes
feat(shader): decode halt, trap return, code end, GWS and ordered count instructions
2026-10-08 12:19:38 +02:00
Celegans12 9513703244 fix(shader): read the half-wave scans of wave64 reductions on any host subgroup
The GFX10 lowering of a wave64 reduction scans rows with DPP row_shr
1/2/4/8 and v_permlanex16_b32 under EXEC -1, then joins lanes 31 and 63
with a scalar op. The console fills lanes outside the entry EXEC with
the identity, but on the host they can be helpers that sit out subgroup
operations or invocations that were never launched: on 64 lanes (RADV)
the emulated chain reads 0 or stale values from them, and on 32 lanes
lane 63 throws since #997.

EmitReadLane now recognises the sequence on any host for UMin, UMax,
SMin, SMax, IAdd, AND and OR when the keys are the identity outside the
entry EXEC. On 64 lanes, lanes 31 and 63 become subgroup reductions of
the keys of invocations 0-31 and 32-63; on 32 lanes or fewer, lane 31
reduces all keys and lane 63 is the identity. It throws without
subgroup arithmetic or on a subgroup wider than the wave. VulkanDevice
reports GroupNonUniformArithmetic and ShaderValidation checks it.
2026-10-08 12:10:32 +02:00
Adrià 915e3b753f
Merge pull request #1264 from Celegans12/fix/shader-wave64-exec-host-lanes
fix(shader): mask EXEC copies to the host subgroup's lanes
2026-10-08 12:08:54 +02:00
Adrià 3069680b70
Merge pull request #1130 from Celegans12/feat/agc-ordered-pixel-shader
feat(agc): implement primitive-ordered pixel shaders with fragment shader interlock
2026-10-08 12:01:03 +02:00
Adrià Franch 2e0b7bb90e docs: record the s_sethalt 0 measurement in TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 11:49:24 +02:00
popcoder565 f11080ceef chore: move the s_sethalt debt entry below the libSceAudio3d entries
#1398 and #1399 both rewrite the sceRtcParseDateTime entry that the s_sethalt entry followed. It now follows the libSceAudio3d entries, which no open pull request edits, so either can merge first without a conflict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:49:17 +02:00
popcoder565 67b28480d8 chore: move the wave control decode test and s_sethalt debt entry off shared lines
#1372 adds its test after the vop1 decode tests and #1314 its debt entry after s_setkill, the places where this branch added its own. The wave control decode test now precedes the vop1 decode tests and the s_sethalt entry follows sceRtcParseDateTime, so either pull request can merge first without a conflict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:49:17 +02:00
popcoder565 a5717b6613 feat(shader): decode halt, trap return, code end, GWS and ordered count instructions
s_sethalt with SIMM16[0] clear is a no-op; s_sethalt 1, s_sendmsghalt, a reached s_code_end, s_rfe_b64, the ds_gws_* instructions and ds_ordered_count throw with the reason at translation. Linear decoding stops at s_code_end like at s_endpgm, so code padded with s_code_end after a final backward branch decodes. Encodings from LLVM SOPInstructions.td and DSInstructions.td, checked against the gfx10 MC tests; semantics from the RDNA 2 ISA guide.
2026-10-08 11:49:06 +02:00
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
Celegans12 e1d4e699be feat(agc): implement primitive-ordered pixel shaders with fragment shader interlock
DecodeState and the draw precheck rejected DB_SHADER_CONTROL bit 16,
PRIMITIVE_ORDERED_PIXEL_SHADER (POPS), which runs the ordered section
of overlapping pixels' shaders in primitive order. The bit now reaches
the recompiler as a pixel stage field, and such a pixel shader declares
PixelInterlockOrderedEXT and runs its whole body between
OpBeginInvocationInterlockEXT and OpEndInvocationInterlockEXT; an
invocation that a BDA read fault kills ends the interlock first. The
POPS collision SGPRs read 0, so a title skips its POPS wait and runs
its per-collision loop once. An image_load still reads a sampled
binding, which misses an earlier overlapping primitive's image_store in
the same draw. The device enables VK_EXT_fragment_shader_interlock when
it has fragmentShaderPixelInterlock; without it the recompile throws,
as does a nonzero POPS_OVERLAP_NUM_SAMPLES. The field is part of the
recompile cache key, the draw key and the serialized request (version 10).
2026-10-08 11:18:46 +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
clem-gb 7406c975d2 fix(libkernel): release every level of a recursive mutex during a cond wait
A condition wait on a recursive mutex locked more than once unlocked the
native mutex only once, so the thread that should signal blocked forever
on it. Unlock the remaining levels before the wait and lock them again
after it, as FreeBSD libthr does in _mutex_cv_unlock and _mutex_cv_lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-08 10:53:58 +02:00
clem-gb 15c1962e82 fix(libkernel): keep ymm upper halves across a redirected raise
A thread that sceKernelRaiseException redirects resumes through
RtlRestoreContext with a CONTEXT that has no XSTATE, so the upper halves
of ymm0-ymm15 came back as the handler and the delivery path left them.
A handler or host routine that runs vzeroupper or any VEX instruction
(Zen 2 guest code, the CRT's memcpy) cleared the upper lanes of a thread
interrupted in the middle of AVX code. The entry stub now stores
ymm0-ymm15 next to the delivery when the CPU and the OS enable AVX, and
the exit loads them back right before RtlRestoreContext, which restores
only the low halves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-08 10:47:33 +02:00
clem-gb 2ba8f75e15 fix(libkernel): report the current CPU within the thread's guest affinity
sceKernelGetCurrentCpu returned the raw host CPU index. Guest affinities
are bookkeeping only and sceKernelGetAvailableCpumask advertises CPUs 0
to 12, so on a host with more than 13 logical CPUs a title could get 13
or higher, and a thread pinned to one CPU could get another one.

The host index now selects a CPU of the calling thread's affinity
clipped to the available mask, so the result is always an advertised
CPU and a thread pinned to one CPU reports that CPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
2026-10-08 10:47:33 +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
Arvind Frøiland 5019c1eee8 refactor(libSceAjm.native): name the WVorbis stubs by their NIDs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:24:25 +09:00
Arvind Frøiland 7b7a6a04dd refactor(libScePsml_debug): name the Mfsr2 stubs by their NIDs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 17:24:25 +09: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
TibixDev 48bb99d477 fix(agc): decode implicit six-face cube extents
Treat equal BASE_ARRAY and DEPTH as a six-face cube. Measured with image_load, image_sample and image_get_resinfo on RX 6600 gfx1032 using base slices 0, 5 and 6. Partial cube ranges still throw because filtered sampling differs from load bounds.

Graphics tests and GPU snapshot/storage sampling tests pass for all six faces at each tested base.

Assisted-by: OpenAI Codex
2026-10-08 11:00:04 +03: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
popcoder565 384078c924 fix(libkernel): retry a raise that interrupts its target inside winpthreads
MinGW's thread_local goes through emutls and winpthreads' pthread_getspecific, which holds a per-thread spinlock. A raise that redirected a thread holding it ran the handler on that same thread, and a handler reading any thread_local, scePthreadSelf for one, spun on the lock forever. A raise that finds the target inside libwinpthread-1.dll now resumes it and suspends it again, as one inside NtContinue does.

guest_raise_exception's new phase raises at a thread that calls scePthreadSelf in a loop and checks that the handler sees its own thread. It hung in every run without the retry. TechnicalDebt records that a handler can still reenter other host code the thread was interrupted in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 03:43:13 -04: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
ToyuAU 2d59fffdb7 build(relinker): add a dependency-free conversion build mode 2026-10-08 18:21:30 +11: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
TibixDev 9a78bda01b feat(ngs2): parse forward ATRAC9 waveform loops
Split looped waveforms into decoder-aligned intro, loop and tail blocks, preserving the encoder delay and finite or infinite repeat counts. Parse trailing sampler chunks and reject malformed loop ranges.

Validation: all seven NGS2 CTest cases passed; standalone ATRAC9 tests passed with ASan, UBSan and leak detection. AI-assisted implementation.
2026-10-08 10:00:47 +03: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
camezaro-intc 327201519a feat(font): implement sceFontDettachDeviceCacheBuffer
Detach the device cache buffer attached by sceFontAttachDeviceCacheBuffer. The signature is taken from the IDA type database of Orbital: it takes the library, a pointer to receive the buffer and a pointer to receive its size. When no cache buffer is attached, it reports NOT_ATTACHED_CACHE_BUFFER. If the library allocated the buffer itself and no buffer pointer is passed, the memory is freed. The owned bit is cleared and device_cache_buf is reset to null.
2026-10-08 00:36:52 -06: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
tototomate123 0b0526c4d1 fix(prx): add missing offline HFW imports 2026-10-08 08:27:31 +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
Raj 18113907c8 test(libc): run guest_formatting on Linux
guest_formatting_tests was built on Linux but registered with ctest on
Windows only, so the Linux printf and scanf exports had no coverage: on main
the test fails there at its first vsnprintf check and then crashes in
snprintf with eight integers.

It is registered on every platform now. The %ls checks stay Windows-only,
as glibc reads %ls as 32-bit wchar_t; that gap is recorded in TechnicalDebt.
2026-10-08 11:46:56 +05:30
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
MathiasDevelopes 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) <noreply@anthropic.com>
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 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
Dean d521209a3a
Merge pull request #1161 from krishnaraya4/docs/build-windows-ca-bundle
docs(build): name the CA bundle the WinLibs CMake needs for the FFmpeg download
2026-10-08 18:20:11 +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 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 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
Dean 5850a6cd11
Merge pull request #1374 from gjonn/feat/tts2-unavailable
feat(libSceTextToSpeech2): report the speech engine as unavailable
2026-10-08 17:39:02 +13:00
Dean cf3823dffe
Merge pull request #1354 from gjonn/feat/bluetoothhid-no-devices
feat(libSceBluetoothHid): add Bluetooth HID with no devices attached
2026-10-08 17:30:03 +13:00
Dean 9ba908c202
Merge pull request #1356 from gjonn/feat/pad-open-ext-special
feat(libScePad): report special controllers as not connected in scePadOpenExt
2026-10-08 17:27:00 +13:00
Dean 893af87af0
Merge pull request #1353 from gjonn/feat/mbus-no-devices
feat(libSceMbus): add the device service with no devices attached
2026-10-08 17:26:49 +13:00
popcoder565 f8c1e0c64f fix(libkernel): keep sceKernelRaiseException redirects out of NtContinue
A raised exception redirects the target thread to a stub that runs the handler and returns through RtlRestoreContext. On Windows 10 (19045) RtlRestoreContext restores in user mode only when the context flags are exactly CONTEXT_FULL | CONTEXT_SEGMENTS (CONTEXT_XSTATE aside); for the CONTEXT_FULL | CONTEXT_FLOATING_POINT context it was given, it calls NtContinue. When the next raise suspended the thread inside that system call, NtContinue then replaced the redirected context with the one it was restoring, so the handler never ran although sceKernelRaiseException had returned 0. guest_raise_exception lost such a delivery to its busy thread in about one run in five and hung until the ctest timeout.

The context is now read with CONTEXT_SEGMENTS, so the handler returns through the user-mode restore, and a raise that finds the thread inside NtContinue or NtContinueEx (an APC or an exception handler returning) resumes it and suspends it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:48:16 -04:00
Dean a9ba39c927
Merge pull request #1258 from MathiasDevelopes/feat/audioout2-mastering-setparam
feat(libSceAudioOut): accept sceAudioOut2MasteringSetParam
2026-10-08 16:35:16 +13:00
hugodearaujo 56e4ee3565 fix(voiceqos): return the console's sceVoiceQoSInit argument errors
Measured on a PS5 (firmware 13.60) through dlopen of
libSceVoiceQoS.sprx: a null block, any size other than exactly 0x40000,
and an app type other than 0x20000000 or 0x10000000 all return
0x804E0902 without touching the block, instead of throwing. A second
initialization returns 0x804E0905, as prosper reads from the module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:34:15 -03:00
Gjon Gojcevic 8d1d430599 feat(libSceTextToSpeech2): report the speech engine as unavailable
sceTextToSpeech2Initialize fails so titles skip narration; the other imported exports throw.
2026-10-08 15:31:10 +13:00
Gjon Gojcevic 54ed8e7f9c feat(libScePad): report special controllers as not connected in scePadOpenExt
Add scePadOpenExt for special ports, which return DEVICE_NOT_CONNECTED because the host has no special controller, and the extended read and report exports, which throw.
2026-10-08 15:31:10 +13:00
Gjon Gojcevic cb00552dd6 feat(libSceBluetoothHid): add Bluetooth HID with no devices attached
Initialization and callback and device registration succeed, no device ever connects, and calls that need a device throw.
2026-10-08 15:30:58 +13:00
Gjon Gojcevic 10e5b0c33a feat(libSceMbus): add the device service with no devices attached
Initialization and termination succeed, no device events are reported and device queries return no entries.
2026-10-08 15:30:58 +13:00
Dean b015323ef0
Merge pull request #1363 from gjonn/feat/share-running-status
feat(libSceShare): report no running share feature in sceShareGetRunningStatus
2026-10-08 15:18:42 +13:00
Dean 4979afbe1e
Merge pull request #1347 from gjonn/feat/hmd2-unavailable
feat(libSceHmd2): add PS VR2 modules that report the runtime as unavailable
2026-10-08 15:18:06 +13:00
Dean 497bd113d5
Merge pull request #1243 from tv7/feat/player-review-dialog
feat(libSceCdlgPlayerReview): add the player review dialog
2026-10-08 15:17:45 +13:00
Gjon Gojcevic b692e320c3 feat(recompiler): accept lwe on MIMG samples and gathers
The LOD warning lwe adds to the texel status is texture-streaming feedback,
which is not reported for the T# MIN_LOD_WARN either. Accept lwe on sample
and gather instructions as it already is on loads and stores; lwe on
image_get_lod still throws.
2026-10-07 21:18:19 -04:00
Gjon Gojcevic 35e3b69a2b feat(libSceShare): report no running share feature in sceShareGetRunningStatus
The host never records or broadcasts, so the first status word is cleared and the call succeeds; a null status is rejected.
2026-10-07 20:21:26 -04:00
Gjon Gojcevic a988b8b1d0 feat(libSceHmd2): add PS VR2 modules that report the runtime as unavailable
sceHmd2Initialize fails, so titles skip their VR set-up; the other libSceHmd2 and libSceVrTracker2 exports throw.
2026-10-07 19:58:01 -04:00
Merijn b86370285b fix(kernel): throw on unsupported unwind tables in sceKernelGetModuleInfoForUnwind
Once an image has .ehmeta, an eh_frame_hdr version other than 1, an
eh_frame_ptr encoding other than absptr or pcrel, a 64-bit record length,
an eh_frame_ptr outside the image or a missing terminator now throw
instead of returning the empty answer. The test queries a fixture DLL
whose .ehmeta it can break, since the unwinder reads the same section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 00:54:43 +02:00
TibixDev 97f16be342 fix(savedata): keep progress dialogs running until closed
Opening a save progress dialog immediately reported FINISHED. Skyrim
waited for RUNNING before writing SAVEDATA.DAT and never resumed. Keep
progress-bar mode running through polling and progress updates until
Close, retaining the existing automatic responses for other dialog modes.

Add lifecycle regression coverage for repeated polling, completion,
reopening, result metadata and ordinary selection dialogs. The test
failed on the previous implementation and passes with the fix on Fedora
44 Release. Correcting the live dialog state recovered a blocked Skyrim
save without restarting its session.

Written with AI assistance.
2026-10-08 01:37:34 +03:00
hugodearaujo a156104cba fix(rtc): parse RFC 2822, RFC 850 and asctime text like the console
Measured on a PS5 (firmware 13.60) through dlopen of libSceRtc.sprx.
The weekday is required in any case or length, month names may be
full, RFC 2822 and RFC 850 share one lenient grammar with 2-digit years
split at 50, and the asctime zone is ignored. Zones come from a name
table, a military letter, or +HHMM without a range check. Text the
console rejects returns a parse error with the tick untouched, and an
invalid calendar date returns 0 with only the offset applied to the
tick, as the console does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 19:08:10 -03:00
hugodearaujo 32dd014efe fix(rtc): parse ISO text in sceRtcParseDateTime by the RFC 3339 rules
On a PS5 (firmware 13.60) every input that starts with a digit gets the
same result and tick from sceRtcParseDateTime as from
sceRtcParseRFC3339, except that leading spaces and tabs are skipped
first. A string without a zone, or with a space instead of T, is a
parse error rather than UTC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 19:04:17 -03:00
Karan Shrivastava 954d6f19b1 fix(libSceRtc): answer out-of-range years in sceRtcGetDosTime
A year before 1980 or after 2107 cannot be packed into the DOS time, so
GetDosTime threw. Following the disassembly-derived fpPS4
reimplementation of the PS4 library, it now returns INVALID_YEAR after
writing 0 for an earlier year and 0xff9fbf7d, the largest encodable
time, for a later one. The TechnicalDebt entry now records fpPS4 as the
source for the SetDosTime year decode as well.
2026-10-07 17:18:42 -04:00
Adrià fb0d627ff6
Merge pull request #839 from merwie/fix/audioout2-read-grain-at-playback
fix(audioout2): read grains at the next push and play them behind a cushion
2026-10-07 22:29:12 +02:00
Adrià e674a6384d
Merge pull request #760 from merwie/feat/kernel-raise-exception-windows
feat(libkernel): deliver sceKernelRaiseException on Windows
2026-10-07 22:27:39 +02:00
Adrià 003e699b27
Merge pull request #910 from Pacuka/feat/smurfs-exports
feat(libs): add sceAudioInAsyncOpen and sceHttp2SetMinSslVersion
2026-10-07 22:23:15 +02:00
Dean 7e7ef7a73f
Merge pull request #1247 from gjonn/feat/razorcpu-plot-value-bookmark
feat(libSceRazorCpu): add sceRazorCpuPlotValue and sceRazorCpuWriteBookmark
2026-10-08 09:22:46 +13:00
Dean 76543c2e89
Merge pull request #1020 from gjonn/feat/ngs2-parse-waveform-file
feat(libSceNgs2.native): implement sceNgs2ParseWaveformFile and parse 16-bit PCM waveforms
2026-10-08 09:21:16 +13:00
Adrià d964601c08
Merge pull request #844 from merwie/feat/agc-get-eq-context-id
feat(agc): implement sceAgcDriverGetEqContextId
2026-10-07 22:21:01 +02:00
Merijn cd7735ceab fix(audioout): drop captured buffers of a port whose slot was reused
A captured grain stored only the port slot and data pointer, so a port
created in a destroyed port's slot before the next push mixed the old
pointer with its own format. Ports now carry a generation that the
capture records. TechnicalDebt notes that the last grain pushed before a
title stops is never played.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:13:30 +02:00
Celegans12 a0d4b45591 fix(shader): mask EXEC copies to the host subgroup's lanes
A wave64 graphics program on a 32-lane host runs one guest lane per
invocation, yet an EXEC written as a value keeps all 64 bits: the NGG
prologue's s_lshr_b64 exec, -1, 64 - count reads count 0 and sets -1.
A waterfall loop that copies EXEC with s_mov_b64 and retires one key
per pass then never empties its copy, since no ballot sets the lanes
the host lacks, and its v_readlane picks lane 32 and up.

readRawU32 now ANDs EXEC with a ballot of true when it is read as a
value (s_mov_b64, ALU sources, src_execz), and s_*_saveexec and
s_*_wrexec store that masked copy. EXEC's own words, threadBit and the
saveexec combination keep the raw words, so s_orn2_saveexec_b64 vcc,
exec still sets all 64 bits. On subgroups under 32 lanes the EXEC_LO
copies of agc_driver_scalar_sop1 now hold only the subgroup's lanes.
2026-10-07 22:11:59 +02:00
Sanjaysrinivas dbf10824a7 docs(shader): avoid src2 PR overlap 2026-10-07 22:06:03 +02:00
Adrià Franch 5b28b82af2 fix(libs): give sceAudioInAsyncOpen its signature and move the Http2 TechnicalDebt line
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 22:01:29 +02:00
Pacuka 23398893cd feat(libs): add sceAudioInAsyncOpen and sceHttp2SetMinSslVersion
The Smurfs Dreams imports both and no library exports them, so eager
binding stops the title before it starts. sceAudioInAsyncOpen throws
like the other AudioIn opens that have no implementation;
sceHttp2SetMinSslVersion returns success like the other Http2 SSL
setters, as no request reaches the network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:01:17 +02:00
MathiasDevelopes e482eef759 feat(libSceAudioOut): accept sceAudioOut2MasteringSetParam
The host mixes without the console's mastering stage, so the mastering
parameters have nothing to configure, as with sceAudioOut2MasteringInit.
Accept them instead of aborting, keep throwing for a null parameter
block, and record SetParam next to MasteringInit in TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 21:58:15 +02:00
Adrià Franch b540327c29 docs(agc): keep the updated sceAgcDriverGetEqContextId TechnicalDebt entry
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 21:53:35 +02:00
Merijn 29a4d4b035 feat(agc): implement sceAgcDriverGetEqContextId
Return the id a graphics event was registered with in
sceAgcDriverAddEqEvent, which titles derive from their context
(PPSA12544: 0 or 1 for graphics, 0x20 + 8 * pipe + queue for compute) and
read back to dispatch the event. Other event filters, a null or
misaligned event and an id above 32 bits throw. The meaning is an
assumption and recorded in the technical debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:53:21 +02:00
Merijn 83e754a885 test(appcontent): cover a title without download data
GuestAppContent now writes a param.json that declares downloadDataSize 0
and checks that sceAppContentDownloadDataGetAvailableSpaceKb returns OK
with 0 KB for /download0 (it threw before), and PARAMETER for a null
result. TechnicalDebt records that the console's behaviour for such a
title is unverified.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:51:53 +02:00
Sanjaysrinivas 36b17177e0 feat(shader): add LDS conditional exchange 2026-10-07 21:40:42 +02:00
Sanjaysrinivas efdbbf1a70 fix(progress): report shared-source libraries 2026-10-07 21:40:38 +02:00
Gjon Gojcevic 531d5c1e32 feat(libSceRazorCpu): add sceRazorCpuPlotValue and sceRazorCpuWriteBookmark 2026-10-07 15:36:02 -04:00
Adrià 4764e59c37
Merge pull request #888 from adriadam10/feat/libc-force-tls-destructor
feat(libSceLibcInternal): implement _sceLibcInternalForceTlsDestructor
2026-10-07 21:35:25 +02:00
Merijn e5b44c4536 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/kernel-raise-exception-windows
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-07 21:23:46 +02:00
Merijn 9a8a85ebd0 test(audioout): cover AudioOut2 grain timing with the SDL disk driver
Address review: read a grain's buffers at the next push without spinning
under the context lock, keep the no-device model mixing at push time,
size the pad queue from the unplayed main grains again, use generic
names in comments and TechnicalDebt, and add audio_out2_timing (next-push
read, queue level beyond the cushion, priming after running dry).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:20:27 +02:00
Merijn e8f77dafa0 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/audioout2-read-grain-at-playback 2026-10-07 21:11:34 +02:00
Merijn 51b6079b5b fix(libkernel): no allocation while the target is suspended; own the wait count
The APC delivery was allocated after SuspendThread, so a target holding
the allocator lock deadlocked the raising thread; it is now allocated
before the suspend. The wait count a raise checks lived in the target's
thread_local storage and dangled once the thread exited; it is now a
member of PthreadPrivate, which TimedWait counts into through a
thread-local pointer bound when the thread starts, and a raise on a
thread that already finished returns ESRCH. TechnicalDebt gets one line
per unverified choice: Windows only, the FreeBSD ucontext layout, the
signal mask, the YMM upper halves, and delivery to threads outside
TimedWait.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 21:10:25 +02:00
Lexroid 935b19aa58 feat(libSceCdlgPlayerReview): add the player review dialog
PPSA03306 (Silt) loads the Unity plugin Media/Plugins/PSNCore.prx, which
imports scePlayerReviewDialogInitialize, Open, UpdateStatus, GetResult and
Terminate from libSceCdlgPlayerReview. No library provided it, so loading
the plugin failed with "Failed to load module ...\libs\libSceCdlgPlayerReview.prx".

The library follows libSceWebBrowserDialog: the dialog shows nothing, Open
finishes at once and GetResult reports that the user canceled. Terminate
also accepts a finished dialog. GetStatus and Close are added as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:07:28 +03:00
ploysius f7424ea95d refactor(libSceAgc): name three more exports after their versioned NIDs
OpenAGC's include/agc_nids.h names three more of the raw-NID exports, and
each name hashes to its NID:

  gQkqkLttcpw  sceAgcAcb_gQkqkLttcpw               -> sceAgcAcbAtomicGds_0900
  dolOmWH+huQ  sceAgcUnknownGetFusedShaderSize     -> sceAgcGetFusedShaderSize_0080
  V++UgBtQhn0  sceAgcGetDataPacketPayloadAddressUnk -> sceAgcGetDataPacketPayloadAddress_0090

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:02:51 -04:00
ploysius 39191f905d refactor(libSceAgc): name exports after the versioned SDK names their NIDs hash to
Eight libSceAgc exports were published under a raw NID with a made-up
name. Each NID is the hash of a versioned SDK name (checked with
tools/nid_names.py compute_nid), so the functions now carry that name and
are exported from it directly:

  23LRUSvYu1M  sceAgcUnknownInitState          -> sceAgcInit_0090
  -KRzWekV120  sceAgcUnknown__MKRzWekV120      -> sceAgcDcbSetIndexSize_0600
  Ikfdt-rIqCE  sceAgcUnknown_Ikfdt_MrIqCE      -> sceAgcJumpPatchSetTarget_0300
  7Wa3aeJgeVU  sceAgcUnknown_7Wa3aeJgeVU       -> sceAgcBranchPatchSetThenTarget_0300
  rP5xLdOf26k  sceAgcUnknown_rP5xLdOf26k       -> sceAgcBranchPatchSetElseTarget_0300
  fd5Bp5tGTgo  sceAgcUnknownFuseShaderHalves   -> sceAgcFuseShaderHalves_0200
  qj7QZpgr9Uw  sceAgcDcbContextStateAnotherOp  -> sceAgcDcbContextStateOp_0100
  k0E7vkgqAuE  sceAgcCreateInterpolantMappingVsPs -> sceAgcUpdateInterpolantMapping_0100

The exported NIDs are unchanged; the extra exports under the hashes of the
made-up names are gone. Behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:55:45 -04:00
Adrià cea1ef13c3
Merge pull request #902 from Celegans12/fix/agc-unaligned-shader-headers
fix(agc): accept unaligned shader headers
2026-10-07 18:27:47 +02:00
Adrià d95ce1f29c
Merge pull request #898 from alfalfa-star/feat/agc-cond-indirect-buffer
feat(agc): run COND_INDIRECT_BUFFER branches whose comparison always passes
2026-10-07 18:26:59 +02:00
Adrià 3f7fe285a0
Merge pull request #900 from alfalfa-star/feat/libkernel-acp-protection
feat(libkernel): accept the audio coprocessor memory protection bits
2026-10-07 18:26:06 +02:00
Adrià 6b3e8c476e
Merge pull request #835 from adriadam10/feat/appcontent-addcont-info
feat(libSceAppContent): implement sceAppContentGetAddcontInfo and GetAddcontInfoList
2026-10-07 18:25:31 +02:00
Adrià 0da8f48cfc
Merge pull request #831 from adriadam10/feat/audio3d-object-reserve
feat(libSceAudio3d): implement sceAudio3dObjectReserve and sceAudio3dObjectUnreserve
2026-10-07 18:24:56 +02:00
Adrià 4b16995d91
Merge pull request #807 from adriadam10/feat/kernel-timer-event
feat(libkernel): sceKernelAddTimerEvent and sceKernelDeleteTimerEvent
2026-10-07 18:22:56 +02:00
Adrià Franch cc789786de feat(libSceLibcInternal): implement _sceLibcInternalForceTlsDestructor
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 18:18:13 +02:00
Adrià Franch 5b331ed022 feat(libSceAppContent): implement sceAppContentGetAddcontInfo and GetAddcontInfoList
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 18:14:04 +02:00
Adrià Franch 9ab637a575 fix(libkernel): wake infinite equeue waits for timers, document timer choices
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 18:14:04 +02:00
Adrià 2b8f0b215e
Merge pull request #803 from adriadam10/feat/rtc-dos-time
feat(rtc): implement sceRtcGetDosTime and sceRtcSetDosTime
2026-10-07 18:07:20 +02:00
Adrià Franch 0781225d43 fix(rtc): decode the DOS year as unsigned, move TechnicalDebt line
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 18:06:11 +02:00
Adrià Franch c3871dcb99 feat(libSceAudio3d): implement sceAudio3dObjectReserve and sceAudio3dObjectUnreserve 2026-10-07 18:01:24 +02:00
ctz23 5ec12a44ac docs(build): list Linux X11 development dependencies 2026-10-07 17:57:05 +02:00
Adrià def8119927
Merge pull request #550 from Pouare514/fix/memory-prot-gpu-bits
fix(libkernel): accept GPU coherency prot bits for host mapping
2026-10-07 17:54:41 +02:00
Adrià 8e281fa8d0
Merge pull request #518 from Pouare514/fix/tlou-videoout
fix(libs): TLOU throwing stubs for VideoOut VrrPeg and VrrStatus
2026-10-07 17:53:38 +02:00
Adrià Franch c94949aedb feat(rtc): implement sceRtcGetDosTime and sceRtcSetDosTime
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 17:52:56 +02:00
krishnaraya 53f94723d1 docs(build): name the CA bundle the WinLibs CMake needs for the FFmpeg download
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 11:48:32 -04:00
Raihan Abdul Majid 0a6a8a7b5c feat(font): accept sceFontGlyphDefineAttribute as a silent stub
PPSA01325 stops on sceFontGlyphDefineAttribute right after generating a character glyph: it sets attribute 0x11 to 0 on that glyph, deletes it without using it, and draws the character with sceFontRenderCharGlyphImageHorizontal. The meaning of the attributes is unknown, so the call checks the glyph and ignores the rest; TechnicalDebt lists it under silent stubs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
2026-10-07 22:46:48 +07:00
Raihan Abdul Majid 267b893b59 feat(libs): provide the exports PPSA01325 imports that no library has
Astro's Playroom (PPSA01325) fails eager binding on three imports. The two voice chat group requests follow the offline model of the other sceVoiceChatRequest* calls and return SIGNED_OUT; sceRudpActivate, whose signature is unknown, is declared as a throwing stub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
2026-10-07 22:43:08 +07:00
Adrià 4e742835c0
Merge pull request #496 from adriadam10/docs/architecture
docs: add architecture overview with Mermaid diagrams
2026-10-07 17:42:12 +02:00
Pouare514 49b2f9e49b docs: record assumed semantics of prot bits 0x100/0x200 2026-10-07 17:29:37 +02:00
Pouare514 0b3dd07ba0 fix(libs): real Vrr names for VideoOut pair, generic Unknown00/01 for the rest 2026-10-07 17:25:07 +02:00
Pouare514 a620a2579d fix(libs): TLOU throwing stubs for VideoOut VrrPeg and VrrStatus 2026-10-07 17:24:59 +02:00
TideOPL 1d806f804e fix(libs): drop the VrrPeg stubs that #518 already adds 2026-10-07 15:02:51 +01:00
TideOPL 3deba9fa47 Merge remote-tracking branch 'origin/main' into pr1125
# Conflicts:
#	core/libs/prx/libkernel/System/src/Coredump.cpp
2026-10-07 15:02:47 +01:00
Pouare514 4fcfd3c2b3 feat(prx): stub TextToSpeech2, Vdecsw and Coredump unknown exports 2026-10-07 15:42:04 +02:00
TideOPL cbdfcd8120 feat(libs): add the unimplemented exports PPSA16064 imports
PPSA16064 (Minecraft Dungeons II, Unreal Engine) failed to load because
these imports had no export:

- libkernel: sceCoredumpWriteUserString
- libSceSaveData: sceSaveDataConvert, sceSaveDataGetConvertProgress
- libSceVideoOut: sceVideoOutVrrPegToFixedRate,
  sceVideoOutVrrUnpegFromFixedRate

None of them is called during the title's start-up, so they are added
as unimplemented exports that throw with their name if a title calls
them. Their signatures are unknown; TechnicalDebt records them. The
built libraries export the NIDs the title imports.
2026-10-07 14:09:55 +01:00
TideOPL 7fdfc9208b fix(libSceAgc): treat a null cursor_down as a buffer limited by its top
Every command writer checked bottom <= cursor_up <= cursor_down <= top.
PPSA16064 (Minecraft Dungeons II, Unreal Engine) builds small one-packet
buffers (8 dwords) with cursor_down left null, and the first
sceAgcDcbCopyData into one threw "invalid command buffer cursors".

Nothing in the library allocates downward, so cursor_down only bounds
the space above cursor_up. A null cursor_down now means that bound is
top. Non-null cursors are checked as before. TechnicalDebt records the
assumption.

agc_commands writes six dwords into such a buffer and checks that a
further allocation past top fails without moving the cursor.
2026-10-07 14:08:13 +01:00
TideOPL efceec9c56 feat(libScePad): implement scePadIsRemoteController
NID fCWdlnmB1Ks was exported as an unknown function that threw. The
name scePadIsRemoteController hashes to it. PPSA16064 (Minecraft
Dungeons II) calls it once per controller after
scePadGetControllerInformation, with the pad handle and the address of a
byte it has just zeroed, and ignores the result.

It reports whether the controller is connected through Remote Play.
Controllers here are local devices, so the answer is always false. An
invalid handle returns INVALID_HANDLE and a null output INVALID_ARG, as
the other pad calls do. Without it the title aborted at the main menu.

scePadSetAngularVelocityBiasCorrectionState, which the title imports but
does not call during start-up, is added as an unimplemented export.

guest_pad checks the handle and null-output errors and the result.
2026-10-07 14:08:12 +01:00
Adrià 8f510f31ab
Merge pull request #1066 from Celegans12/feat/shader-buffer-limit
feat(shader): accept more than 32 buffers per shader up to the device limit
2026-10-07 14:20:34 +02:00
Adrià f8ae5b01b7
Merge pull request #997 from Celegans12/fix/shader-wave64-readlane-host-lanes
fix(shader): throw for constant lane reads outside the host subgroup
2026-10-07 14:08:56 +02:00
Adrià a0fa346f40
Merge pull request #944 from Celegans12/feat/agc-sint-storage-images
feat(agc): implement sint storage images through uint views
2026-10-07 13:56:17 +02:00
jeffrey12cali cb2a29d810 docs(build): say that the libs target is not part of the default build 2026-10-07 13:52:18 +02:00
Adrià 931109b308
Merge pull request #866 from Celegans12/feat/agc-srgb-load-fallback
feat(agc): implement 8 and 8_8 srgb image loads through unorm views
2026-10-07 13:49:58 +02:00
Adrià c81f573691
Merge pull request #954 from CnRJay/feat/ds-wrxchg2-rtn-b64
feat(shader): implement ds_wrxchg2_rtn_b64 and ds_wrxchg2st64_rtn_b64
2026-10-07 13:44:28 +02:00
kjhq 1cc4d25c04 feat(libSceHttp2): complete asynchronous requests through the kqueue option
sceHttp2SendRequestAsync no longer fails synchronously: it queues a
completion carrying the network error and triggers the user event named
by the kqueue option. sceHttp2WaitAsync returns queued completions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 10:39:14 +00:00
Muhammad Umair f2b6b5a1a9 fix(oracle)!: require explicit float modes
BREAKING CHANGE: CLI and Python callers must supply all seven float
controls. Add clamp, rounding and FP16 overflow settings so hardware
measurements cannot silently use an unintended mode.

Refs #981
2026-10-07 14:58:28 +05:00
Celegans12 6e34e8614e feat(agc): implement sint storage images through uint views
Storage images of a SINT format threw "storage image descriptor uses
an unsupported format"; only write-only 32_SINT was accepted.

The recompiler now writes 16_SINT, 8_8_SINT, 32_SINT, 16_16_SINT,
8_8_8_8_SINT, 32_32_SINT, 16_16_16_16_SINT and 32_32_32_32_SINT
storage images with the Uint numeric class. 8- and 16-bit components
are saturated (EmitFormatStoreComponent) and 32-bit ones stored
unchanged, as measured on RDNA2 (gfx1035); image_store_pck stores
32-bit components unchanged too. The driver binds these surfaces
through a cached view of the same-size UINT format.

8_SINT, 32_32_32_SINT, the packed SINT formats (11_11_10, 10_11_11,
2_10_10_10, 10_10_10_2), D16 stores, packed stores of 8- and 16-bit
components and atomics other than 32-bit ones on 32_SINT and 64-bit
ones on 32_32_SINT still throw. New test: agc_driver_image_store_sint,
with DST_SEL X,Y,0,1 on the two-channel formats, as with X,Y,Z,W the
hardware writes channel 1 from the W data slot (TechnicalDebt).
2026-10-07 11:56:04 +02:00
Celegans12 91852719bf feat(agc): implement 8 and 8_8 srgb image loads through unorm views
NVIDIA 610.62 cannot sample R8G8_SRGB, and lavapipe can sample neither
it nor R8_SRGB, so an 8_8 sRGB T# made an image the device does not
support: creating it crashes the NVIDIA driver and lavapipe loads zeros.

The device's format support is read once. An 8 or 8_8 sRGB texture the
device cannot sample is created and viewed as R8_UNORM or R8G8_UNORM,
and SpirvTarget::srgbDecodeFormats makes the materializer mark the
image, so image loads map every channel through a 256-entry table of
the sRGB EOTF rounded to nearest even at bf16 precision, which is what
RDNA2 (gfx1035) returns; both channels of 8_8 are sRGB, and DST_SEL 0
and 1 map to themselves. Samples and gathers of such an image throw,
and its bindless table entries are unmapped like converted formats.
APS5_SRGB_SHADER_DECODE=1 takes this path on every device. Shader disk
cache entries and keys carry the mark: cache format version 7.
2026-10-07 11:52:08 +02:00
Adrià Franch f1fe7f3678 docs: describe the ds_wrxchg2 b64 forms in the measured b32 entry
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 11:40:52 +02:00
Chad 5582c993e2 feat(shader): implement ds_wrxchg2_rtn_b64 and ds_wrxchg2st64_rtn_b64
DS opcodes 0x6e and 0x6f exchange two qwords at offset0 and offset1
scaled by 8 (st64: 512) and return both old values. Each address is
exchanged with its own 64-bit LDS exchange on the locked 64-bit path.
Equal offsets and a destination past v255 throw, as for the b32 forms;
64-bit GDS throws like the other 64-bit DS atomics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:40:39 +02:00
Claude 2eebe84f25 feat(agc): accept texel offsets, LOD biases and LOD clamps in color comparison sampling
Comparison sampling of a color texture threw on the _o, _b and _cl
forms and on a sampler LOD bias. The emulation fetches the texels
itself, so the 6-bit offsets of the address are added to the point or
bilinear texel indices, as on the hardware and in Vulkan. The emulation
runs only at level zero or on a single-level view, where an LOD bias or
clamp cannot select another level, so they are accepted with no effect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:30:00 +02:00
Michon 58eb55dddf test(recompiler): a hand-written look-back kernel instead of the game's; record the dwordx2 loads that can still tear
LookBackScan runs a 43-instruction decoupled look-back written for the
test: one aggregate per block, the block index from an atomic counter,
{flag, value} published with buffer_atomic_swap_x2 and read back with
glc buffer_load_dwordx2. Seven single look-backs and 50 scans of 4096
blocks are checked against a CPU prefix sum; without the recompiler
change the first whole scan fails (3 of 3 runs).

TechnicalDebt records that only glc, aligned, in-bounds dwordx2 loads
in programs with the 64-bit storage view are one atomic load: loads
without glc, and loads in programs without 64-bit buffer atomics, can
still tear against a concurrent swap_x2.
2026-10-07 11:09:04 +02:00
Dean 57e9f0d6aa
Merge pull request #734 from alfalfa-star/feat/ppsa14632-missing-exports
feat(libs): declare the exports PPSA14632 imports that no library provides
2026-10-07 22:00:08 +13:00
alfalfa-star 9df592926b feat(recompiler): implement 64-bit image atomics
image_atomic_* with a two-dword data mask (four for cmpswap) is the
64-bit form of an integer image atomic. The decoder rejected it with
"invalid MIMG data mask". PPSA14632 (Unreal Engine) uses
image_atomic_umax this way in a compute shader during its first frames.

Swap, add, sub, signed and unsigned min/max, and, or, xor and cmpswap
now decode with 64-bit data and translate to new ImageAtomic*64 IR
opcodes. An image updated by them gets its own descriptor binding
range, declared as an R64ui image of 64-bit integers, and the module
uses Int64ImageEXT from SPV_EXT_shader_image_int64. The driver enables
shaderImageInt64Atomics when the device offers it and binds an
R64_UINT view of the 32_32 UINT, SINT or FLOAT surface. Without the
feature, recompiling such a shader throws.

64-bit inc, dec and the float atomics still throw, as does any other
access in the same shader to an image it updates with 64-bit atomics.

The new agc_driver_image_atomics64 test runs every operation on 32_32
UINT, SINT and FLOAT surfaces and checks the returned and stored values
against edge cases across the dword boundary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 10:21:32 +02:00
Adrià Franch 9213355711 docs(TechnicalDebt): record measured min/max reduction footprint
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 09:22:02 +02:00
Celegans12 1c5ed6594d feat(shader): accept more than 32 buffers per shader up to the device limit
The resource tracker refused a program's 33rd distinct V# with "buffer
resource limit exceeded". The 32 was a recompiler constant, not a
Vulkan limit: every buffer is one constant-indexed element of the guest
buffers binding, which ShaderResources checks against the device's
storage-buffer limits.

Drop ShaderInfo::MaxBuffers and the tracker's refusal, and size the
SPIR-V emitter's per-buffer offset list from the binding layout. When
the user data and offsets do not fit in the push constants, they all go
to the shader data buffer as before. ShaderResources counted only
storage buffers against maxPerStageResources (200 on Intel UHD) and now
adds the stage's sampled and storage images.

agc_driver_many_buffers reads and writes 52 and 124 buffers, and
agc_driver_graphics rejects buffers plus an image above the limit.
2026-10-07 09:17:47 +02:00
Celegans12 1afcd20281 feat(agc): implement min and max sampler reduction modes
An S# with FILTER_MODE (word0 bits 29-30) set threw in
DecodeSamplerResource. Modes 1 and 2 now map to Vulkan's MIN and MAX
sampler reduction through VK_EXT_sampler_filter_minmax, which the device
enables when it reports both filterMinmax properties; mode 3 throws.

Min/max still throws with anisotropy, a linear mip filter (lavapipe and
NVIDIA disagree there), depth comparison, color-texture compare
emulation, and, in PointFilteredSamplerWord (S# words 0 and 2), when it
filters between texels or mips of an image the recompiler point-samples.
A texture sampled through a linear min/max sampler needs
SAMPLED_IMAGE_FILTER_MINMAX on its view format; the image-sampler pairs
travel in DescriptorBinding::imageSamplers (shader disk cache format 5).

Adds the agc_driver_image_sample_reduction GPU test and extends the
sampler, emulated color compare and disk cache tests.
2026-10-07 09:04:26 +02:00
Adrià db3e659870
Merge pull request #805 from Celegans12/feat/agc-image-10-11-11-unorm
feat(agc): implement 10_11_11 unorm images through 32-bit uint views
2026-10-07 09:00:03 +02:00
alfalfa-star 745412779d fix(agc): keep RADV's descriptor pool overrun inside the pool's pages
RADV (Mesa 26.0 and later) initialises a FREE_DESCRIPTOR_SET pool's
allocator with bo_size + RADV_POOL_HEAP_OFFSET as its size, so a set can
be placed up to 32 bytes past the pool's buffer. The chain pools are
0x26000 bytes, a page multiple, so a set at the end of a full pool has
its last descriptors on an unmapped page: the CPU descriptor write
faults, or the shader's scalar load raises a GPU page fault and the ring
is reset.

Two more storage buffer descriptors make the pool 0x26020 bytes; the
buffer's last page then holds those 32 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 08:59:10 +02:00
Adrià 78b8f058fb
Merge pull request #771 from Kikoarl/feat/sopp-control-flow
feat(shader): decode s_setkill as s_endpgm
2026-10-07 08:50:36 +02:00
Adrià 8a126b7b88
Merge pull request #799 from Celegans12/feat/agc-unnormalized-sampler-coordinates
feat(agc): implement unnormalized sampler coordinates on single-level 1D and 2D views
2026-10-07 08:50:16 +02:00
Adrià Franch c50181f6fa docs(TechnicalDebt): trim s_setkill entry to the measured behaviour
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-07 08:39:47 +02:00
Kikoarl c8e4a17f89 feat(shader): decode s_setkill as s_endpgm 2026-10-07 08:39:41 +02:00
Celegans12 94cf99e361 feat(agc): implement 8 srgb color targets through rgba8 srgb proxies
CB_COLOR_INFO format 1 with number type 6 (8_SRGB) threw at decode.
It now decodes as R8_SRGB with component swap 0; the other swaps and
8_8_SRGB still throw.

A device that cannot attach and blend R8_SRGB (NVIDIA, lavapipe)
renders a resident 8_SRGB target through an RGBA8_SRGB view of an
RGBA8 copy of its R8 image: the image is blitted in before the pass
and back when the pass ends, and the write mask keeps R only, so the
encode, decode and blend are the device's sRGB attachment rules.
APS5_SRGB_ATTACHMENT_PROXY=1 forces the copy. Linear, mipmapped and
3D 8_SRGB targets throw on such a device.

PPSA26344 renders its G-buffer slot 5 and a multiply-blend pass into
8_SRGB targets.
2026-10-07 07:47:00 +02:00
alfalfa-star e91fe0f063 feat(libs): declare the exports PPSA14632 imports that no library provides
LEGO Horizon Adventures imports 19 functions that no library exports
and no open pull request adds, so it fails eager binding. They are
declared as throwing stubs. The two libSceAjmWVorbis imports have no
known name and are exported by NID from libSceAjm.native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 07:10:13 +02:00
alfalfa-star b567bb8eed feat(libkernel): accept the audio coprocessor memory protection bits
A title maps direct memory with protection 0x3f2, which adds bits
0x100 and 0x200 to the CPU, GPU and AMPR bits, and the mapping threw.
They are the audio coprocessor (ACP) read and write bits, as named in
the KytyPS5 and etaHEN headers. The coprocessor work runs on the host
CPU, so they map to host read and read/write access like the GPU bits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 07:09:42 +02:00
JAB-dev 2dc53674f5 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/kernel-flexible-internal-hint 2026-10-07 07:09:08 +02:00
JAB-dev e493328eb7 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/ngs2-reverb-rack 2026-10-07 07:01:30 +02:00
Dean cb3405d037
Merge pull request #1037 from Raghav314/fix/agc-unwritten-user-data
fix(agc): read unwritten user data registers as zero
2026-10-07 18:00:41 +13:00
Dean b62e84c8ca
Merge pull request #1035 from hugodearaujo/feat/agc-register-defaults-internal
feat(libSceAgc): implement sceAgcGetRegisterDefaultsInternal
2026-10-07 18:00:00 +13:00
Dean ed8dda83ec
Merge pull request #1030 from hugodearaujo/feat/agc-dcb-clear-state
feat(libSceAgc): implement sceAgcDcbClearState
2026-10-07 17:59:18 +13:00
Dean b33ac687c9
Merge pull request #1029 from hugodearaujo/feat/agc-dcb-set-cf-register
feat(libSceAgc): implement sceAgcDcbSetCfRegisterDirect and RangeDirect
2026-10-07 17:58:36 +13:00
Dean 63e02557ef
Merge pull request #1026 from hugodearaujo/feat/agc-wait-reg-mem-patch-mask
feat(libSceAgc): implement sceAgcWaitRegMemPatchMask
2026-10-07 17:57:55 +13:00
Dean 1acbeefef9
Merge pull request #1032 from gjonn/feat/ngs2-stereo-surround-mix
feat(libSceNgs2.native): mix a stereo mastering voice into a 6 or 8 channel render buffer
2026-10-07 17:56:41 +13:00
hugodearaujo bdfd0287e1 feat(libSceAgc): implement sceAgcGetRegisterDefaultsInternal
Return the version 0 internal register defaults, the internal
counterpart of sceAgcGetRegisterDefaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:43:04 -03:00
raghav314 f5a6a31b61 fix(agc): read unwritten user data registers as zero
A stage's user data registers are read for the count in its RSRC2
(COMPUTE_PGM_RSRC2 for compute). A register the title never wrote no
longer refuses the draw or dispatch: it reads 0, as Kyty and SharpEmu
read it and as AMD PAL and Mesa initialize the user data registers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 08:09:54 +05:30
Dean 9ec263cec0
Merge pull request #887 from adriadam10/feat/libc-fiopen
feat(libc): implement std::_Fiopen
2026-10-07 15:30:30 +13:00
Dean 18b9994c76
Merge pull request #885 from adriadam10/feat/libc-collate-getcat
feat(libc): implement collate<char>::_Getcat
2026-10-07 15:29:48 +13:00
Dean f6f47bf1de
Merge pull request #880 from adriadam10/feat/kernel-mtypeprotect-type
feat(kernel): apply the memory type in sceKernelMtypeprotect
2026-10-07 15:28:25 +13:00
Dean 1d773dad2e
Merge pull request #722 from alfalfa-star/feat/libkernel-rtld-thread-atexit
feat(libkernel): implement the rtld thread atexit reference count
2026-10-07 15:27:44 +13:00
Dean e50814c9e7
Merge pull request #860 from ebosido444-ai/feat/libc-std-execute-once
feat(libc): implement std_execute_once
2026-10-07 15:25:29 +13:00
Gjon Gojcevic 5bae4df0b6 feat(libSceNgs2.native): mix a stereo mastering voice into a 6 or 8 channel render buffer
The mixing stage threw when a mastering voice and its render buffer had different channel counts. A 2-channel voice is now mixed into the first two channels of a 6- or 8-channel buffer; other mismatches still throw.
2026-10-06 22:23:40 -04:00
Celegans12 4e18def4c1 fix(agc): accept unaligned shader headers
Driver::RegisterShader required the Shader header at an 8-byte
boundary (alignof(Shader)) and read its fields through the pointer.
PPSA26344 uses its shader packs in place: its compute shader objects
point at headers 4 and 1 bytes past an 8-byte boundary, so the first
sceAgcCreateShader of such a header threw "null or misaligned address".

The header is now checked for null and readable memory at any
address, and its fixed fields and the registers the trace prints are
copied out with memcpy. The code address must still be 256-byte
aligned, and the header and size checks are unchanged. The console's
rule is unknown and is listed in TechnicalDebt.
2026-10-07 04:23:21 +02:00
Dean 6e2c1f8992
Merge pull request #965 from hugodearaujo/feat/agc-async-cond-exec-patch
feat(libSceAgc): implement the async COND_EXEC patches
2026-10-07 15:21:47 +13:00
Dean 8545f330f1
Merge pull request #963 from JAB-dev/feat/agc-registration-max-name-length
feat(libSceAgcDriver): implement sceAgcDriverGetResourceRegistrationMaxNameLength
2026-10-07 15:21:05 +13:00
Dean 990c69645d
Merge pull request #936 from CnRJay/feat/agc-write-data-patch
feat(libSceAgc): implement the WRITE_DATA destination and cache policy patches
2026-10-07 15:19:43 +13:00
Dean f8975a8ef8
Merge pull request #1015 from hugodearaujo/feat/agc-dcb-end-of-shader-action-size
feat(libSceAgc): implement sceAgcDcbQueueEndOfShaderActionGetSize
2026-10-07 15:18:50 +13:00
Dean f1efcc6786
Merge pull request #975 from hugodearaujo/feat/agc-cb-cond-write
feat(libSceAgc): implement sceAgcCbCondWrite
2026-10-07 15:17:27 +13:00
Dean e4048a0989
Merge pull request #709 from merwie/fix/videoout-unsupported-output-mode
fix(videoout): report unavailable output modes instead of throwing
2026-10-07 15:15:22 +13:00
Gjon Gojcevic 74a7a1d9f1 fix(libSceNgs2.native): take (path, offset, info) in sceNgs2ParseWaveformFile and reject PCM data that does not fit
The call site of PPSA21402 sets only three argument registers, so the function has no size parameter. A data chunk that runs past the buffer or ends inside a frame returns INVALID_WAVEFORM_DATA instead of being shortened. The test no longer writes padding from a string literal.
2026-10-06 22:14:23 -04:00
Gjon Gojcevic 64230cf95a feat(libSceNgs2.native): implement sceNgs2ParseWaveformFile and parse 16-bit PCM waveforms 2026-10-06 22:14:23 -04:00
hugodearaujo 425ed24795 feat(libSceAgc): implement sceAgcDcbClearState
Write the 2-dword CLEAR_STATE (0x12) packet with a 4-bit command, the
packet the driver already validates and executes by restoring the
initial context registers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 23:06:15 -03:00
Dean 66e0a1e9c5
Merge pull request #1019 from fisherjoey/feat/agc-semaphore-memory-register-multiple
feat(agc): declare sceAgcSetSemaphoreMemory and sceAgcDriverRegisterMultipleResources
2026-10-07 15:04:53 +13:00
hugodearaujo 8ab5fab84a feat(libSceAgc): implement sceAgcDcbSetCfRegisterDirect and RangeDirect
Write SET_CONFIG_REG (0x68) packets like the context, shader and user
config register setters: one register from a ShaderRegister, or a range
of values at an offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:52:29 -03:00
hugodearaujo 54eeadb3a2 feat(libSceAgc): implement sceAgcWaitRegMemPatchMask
Patch the mask of a wait packet like sceAgcWaitRegMemPatchReference
patches its reference: a 32-bit value written to the low mask word of a
32- or 64-bit WAIT_REG_MEM, rejected above 32 bits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:34:29 -03:00
raghav314 60e16537dc docs: record the AJM resample assumptions in technical debt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 05:41:46 +05:30
Joey Fisher 23a6859a51 feat(agc): declare sceAgcSetSemaphoreMemory and sceAgcDriverRegisterMultipleResources 2026-10-06 18:07:53 -06:00
Dean fde401d41f
Merge pull request #992 from CnRJay/feat/ppsa23566-missing-exports
feat(libs): declare the exports PPSA23566 imports that no library provides
2026-10-07 13:02:56 +13:00
hugodearaujo 26eec5bee6 feat(libSceAgc): implement sceAgcDcbQueueEndOfShaderActionGetSize
The end-of-shader action is written by an inline SDK builder as a
RELEASE_MEM packet, so the size is the 32 bytes that
sceAgcCbReleaseMem writes and that sceAgcAcbQueueEndOfShaderActionGetSize
already returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 20:38:14 -03:00
JAB-dev e15f1644e3 fix(libSceNgs2.native): reverb as the PS4 libSceNgs2 does
The reverb was a Freeverb-style approximation. It now follows the PS4
firmware 11.00 libSceNgs2.sprx, read and checked against its output: the
input mixed to mono with the library's fixed gains, a 14400-sample buffer
with four reflection taps from the reflection pattern tables and a late
feed, sixteen damped comb filters with a pre-emphasis stage, a signed
selection of combs and four allpasses per output channel, a two-pole room
HF filter, and the library's parameter clamps, crossfades and setup
defaults. The test values are the PS4 library's own output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 01:26:11 +02:00
Adrià ab9437e34d
feat(libkernel): implement scePthreadTestcancel and pthread_testcancel (#834) 2026-10-07 11:43:32 +13:00
Dean 25f311fa00
Merge pull request #559 from Phi1ow/implement-login-dialog
feat(logindialog): implement the libSceLoginDialog state machine
2026-10-07 11:41:57 +13:00
Dean b5c1d08bd9
Merge pull request #553 from Phi1ow/implement-userservice-foreground-and-ids
feat(userservice): implement foreground user, registered list, user colour and NP account id
2026-10-07 11:41:16 +13:00
Chad df98b8899e feat(libs): name the PPSA23566 stubs from the shadPS4 NID list and implement sleep
20 of the 31 NIDs have names in shadPS4's aerolib list. They are declared
under those names; POSIX sleep is implemented. The NpPartner001 and Psml
MFSR2 exports stay unnamed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:28:39 -05:00
Celegans12 a40fe0b415 fix(shader): throw for constant lane reads outside the host subgroup
A pixel, vertex or tessellation stage whose wave is wider than the host
subgroup runs one guest lane per invocation, so lanes at or above the
subgroup size have no invocation. v_readlane_b32 still shuffled from
them, which Vulkan leaves undefined; a wave64 pixel minimum loop that
reads lanes 31 and 63 can then wait for a value no live lane holds and
hang the GPU.

At one lane per invocation outside compute, a v_readlane_b32 of a
constant lane at or above the host subgroup size, and v_permlanex16_b32
on a subgroup of 16 lanes or fewer, now fail SPIR-V emission. Lanes in
registers still build, so s_ff1_i32_b64 waterfalls are unaffected,
and neither check applies to compute or to two lanes per invocation.

v_permlane16_b32 and v_permlanex16_b32 take the source lane's EXEC from
a ballot, as DPP does, instead of a shuffle from a possibly inactive
invocation.
2026-10-07 00:25:55 +02:00
Celegans12 baa202d241 feat(agc): implement 10_11_11 unorm images through 32-bit uint views
GFX10 image format 30 (10_11_11_UNORM: X and Y are unorm11 in bits
0-21, Z is unorm10 in bits 22-31, per Mesa's gfx10 tables) has no
Vulkan format, so its sampled and storage descriptors threw at decode.

Format 30 now takes the R32_UINT route of 10_11_11_UINT: the driver
binds the raw dwords as R32_UINT and the shader extracts each field and
converts it with the buffer format helpers (NormalizeFormatComponent on
loads, EmitFormatStoreComponent on stores); DST_SEL 1 reads 1.0f.
Samples, gathers, LOD queries, 16-bit data and loads or stores whose
DST_SEL names the missing W channel throw.

Converted textures are now viewed with an identity component mapping,
since the shader applies DST_SEL itself: a 10_11_11_UINT view whose X
selector was not X lost the packed dword. DCC clear codes 0001 and 1110
of a converted texture throw instead of filling one R32_UINT channel.
2026-10-07 00:11:27 +02:00
JAB e289b56e6f
feat(libSceNgs2.native): implement sceNgs2RackGetInfo, sceNgs2VoiceGetPortInfo and sceNgs2VoiceQueryInfo (#958)
RackGetInfo reports the rack's handles, buffer, id, uid, option limits,
render count and active voices. VoiceGetPortInfo reports a port's matrix,
volume and destination. VoiceQueryInfo answers info id 0x4001 with the
voice channel count and throws for other ids. Assumptions are recorded in
TechnicalDebt.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:10:30 +13:00
Dean ebad6db846
Merge pull request #923 from Fishybeing/docs/barycentric-fallback-entry
docs: describe the barycentric fallback in TechnicalDebt accurately
2026-10-07 11:07:12 +13:00
Dean 84c058756b
Merge pull request #870 from aryanrawatispro-ship-it/feat/player-invitation-dialog-result
feat(playerinvitationdialog): implement scePlayerInvitationDialogGetResult
2026-10-07 11:05:26 +13:00
Dean 762bab6f9a
Merge pull request #863 from LeandroLP23/feat/font-writing-line-ordering-space
feat(font): implement sceFontWritingLineGetOrderingSpace
2026-10-07 11:04:45 +13:00
Chad 7cbf45b660 feat(libs): declare the exports PPSA23566 imports that no library provides
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:04:05 -05:00
Dean edf90b169f
Merge pull request #824 from LeandroLP23/feat/font-get-font-resolution
feat(font): implement sceFontGetFontResolution
2026-10-07 11:04:01 +13:00
Dean b3c0365824
Merge pull request #823 from LeandroLP23/feat/font-glyphs-count-char-glyph-code
feat(font): implement sceFontGetFontGlyphsCount and sceFontGetCharGlyphCode
2026-10-07 11:03:19 +13:00
Phi1ow 0178b6530e fix(logindialog): report user-cancelled and write only the leading result int32
sceLoginDialogGetResult zeroed 8 bytes of a result struct of unknown size and reported result 0
with user id 0. It now writes only the leading int32 (USER_CANCELED), like
sceWebBrowserDialogGetResult and like the sign-in dialog, so a title takes its "no user chosen"
path instead of reading an invalid user id. Records the dialog in the silent-stubs list in
docs/dev/TechnicalDebt.md.
2026-10-06 23:46:00 +02:00
Phi1ow f467f5174f docs(userservice): record the assumed NP account id and default colour
Per review: sceUserServiceGetNpAccountId reports success with account id 0 and
sceUserServiceGetUserColor returns blue by default; both are assumptions. Records them under
"Unknown function info" in docs/dev/TechnicalDebt.md.
2026-10-06 23:42:46 +02:00
Dean 5fc8755f4c
Merge pull request #961 from JAB-dev/feat/ngs2-mastering-gain
feat(libSceNgs2.native): mastering voice gain parameter
2026-10-07 10:22:26 +13:00
Dean a1107d2adf
Merge pull request #939 from CnRJay/feat/keyboard-jis-key2char
feat(libSceKeyboard): translate the 106-key arrangement in sceKeyboardGetKey2Char
2026-10-07 10:20:49 +13:00
CnR 7e3dcbc27e
feat(libkernel): implement sceKernelReleaseFlexibleMemory (#952)
* feat(libkernel): implement sceKernelReleaseFlexibleMemory

Unmaps the range through sceKernelMunmap, which returns its pages to
the flexible memory budget, as fpPS4 and prosper do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(libkernel): keep the flexible memory release check apart from the batch map checks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 10:20:07 +13:00
Dean 957171aeb3
Merge pull request #795 from CnRJay/feat/http2-cookie-box
feat(libSceHttp2): implement cookie boxes and requests without a content length
2026-10-07 10:19:25 +13:00
Dean 0056fc5027
Merge pull request #793 from CnRJay/feat/barrierattr-process-shared
feat(libkernel): accept PTHREAD_PROCESS_SHARED barrier attributes
2026-10-07 10:18:43 +13:00
Dean a876f2392f
Merge pull request #892 from adriadam10/feat/systemservice-music-player
feat(libSceSystemService): implement Disable/ReenableMusicPlayer
2026-10-07 10:16:24 +13:00
Dean 1a211f4f5c
Merge pull request #891 from adriadam10/feat/razor-cpu-flush-occurred
feat(libSceRazorCpu): implement sceRazorCpuFlushOccurred
2026-10-07 10:15:42 +13:00
Dean 3acbb2e2d8
Merge pull request #889 from alfalfa-star/fix/audioout2-3d-latency-1
fix(audioout): accept a 3D latency of 1 in sceAudioOut2Set3DLatency
2026-10-07 10:14:18 +13:00
Dean 04847520a3
Merge pull request #875 from adriadam10/feat/jpegenc-restart-interval
feat(jpegenc): honor the encode restart interval
2026-10-07 10:10:18 +13:00
Dean 9b5cd3e223
Merge pull request #874 from adriadam10/feat/videodec2-avc-picture-info
feat(videodec2): implement sceVideodec2GetAvcPictureInfo
2026-10-07 10:09:36 +13:00
Dean e323c1f2b9
Merge pull request #909 from adriadam10/feat/ajm-batch-job-get-info
feat(libSceAjm.native): implement sceAjmBatchJobGetInfo
2026-10-07 10:08:12 +13:00
hugodearaujo d8b775ec19 feat(libSceAgc): implement sceAgcCbCondWrite
sceAgcCbCondWrite writes the 9-dword COND_WRITE packet: poll a memory
dword, compare it masked with the reference, and write a dword to memory
on a match. sceAgcCbCondWriteGetSize returns its 36 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 18:07:37 -03:00
Dean 9530f4f267
Merge pull request #884 from Celegans12/feat/ajm-batch-job-control
feat(ajm): implement sceAjmBatchJobControl
2026-10-07 10:07:29 +13:00
Dean cfe926c0b0
Merge pull request #488 from arreina/pr/json-non-finite
fix(json2): throw on numbers that overflow a double
2026-10-07 10:06:47 +13:00
Dean 66da53663f
Merge pull request #810 from adriadam10/feat/http-uri-merge
feat(libSceHttp): implement sceHttpUriMerge
2026-10-07 10:05:32 +13:00
Dean 2cba243d68
Merge pull request #809 from adriadam10/feat/http-uri-sweep-path
feat(libSceHttp): implement sceHttpUriSweepPath
2026-10-07 10:04:49 +13:00
Dean 7c95dbb604
Merge pull request #836 from adriadam10/feat/net-sendmsg-recvmsg
libSceNet: implement sceNetSendmsg and sceNetRecvmsg
2026-10-07 10:03:35 +13:00
Dean 906b7f8d31
Merge pull request #724 from merwie/feat/kernel-exception-handler-registration
feat(libkernel): record exception handlers
2026-10-07 10:02:52 +13:00
Dean dfca223766
Merge pull request #841 from merwie/fix/savedata-repeated-initialize
fix(savedata): accept a repeated sceSaveDataInitialize3
2026-10-07 10:02:11 +13:00
Dean 64f99050b6
Merge pull request #763 from merwie/feat/libs-ppsa12544-plugin-exports
feat(libs): add exports imported by PPSA12544's Unity plugins
2026-10-07 10:01:28 +13:00
Adrià 006c6cb618
Merge pull request #385 from DotDebian/feat/ds-wrxchg2-rtn-b32
feat(shader): implement ds_wrxchg2_rtn_b32 and ds_wrxchg2st64_rtn_b32
2026-10-06 23:00:00 +02:00
Dean e22d0c1013
Merge pull request #696 from tv7/feat/ime-keyboard-resource-id
feat(libSceIme): implement sceImeKeyboardGetResourceId
2026-10-07 09:58:51 +13:00
Dean 96ed510cf7
Merge pull request #369 from tv7/feat/json2-value-access
feat(libSceJson2): implement typed construction, indexed and keyed value access, InitParameter2
2026-10-07 09:58:04 +13:00
Adrià Franch 12008dc2ba docs(technical-debt): note the ds_wrxchg2 per-lane exchange order gap 2026-10-06 22:46:40 +02:00
hugodearaujo 47fa19e15c feat(libSceAgc): implement the async COND_EXEC patches
sceAgcAsyncCondExecPatchSetCommandAddress and
sceAgcAsyncCondExecPatchSetEnd patch the COND_EXEC packet like their
graphics counterparts, since sceAgcAcbCondExec writes the same packet
as sceAgcDcbCondExec. Both variants share one implementation, as the
REWIND patches do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:32:52 -03:00
JAB-dev 1f53f885d4 feat(libSceAgcDriver): implement sceAgcDriverGetResourceRegistrationMaxNameLength
The query writes the maximum resource name length (0xfc) through its
output pointer and returns 0, as prosper does from a title's registration
configuration. The parameter follows the SDK wrapper
sce::Agc::ResourceRegistration::getMaxNameLength(unsigned int*). Resource
registration itself stays unavailable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:21:30 +02:00
JAB-dev 34bdc37b76 feat(libSceNgs2.native): reverb rack with I3DL2 parameters
Rack 0x2001 is created with its option layout and KytyPS5's defaults, takes
the setup (0x20010000) and I3DL2 (0x20010001) voice params and reports the
common voice state. The voice mixes its inputs and runs a Freeverb-style
approximation driven by the I3DL2 parameters: room and room HF, early
reflections and their delay, late reverb and its pre-delay, decay time and
HF ratio, and diffusion. Out-of-range params throw, param changes keep the
tail, a stop or kill clears it, and the tail ends once it decays below
1e-20. The console's algorithm is unknown; the approximation is recorded in
TechnicalDebt. The test context buffer pool grows to 64.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:21:28 +02:00
JAB-dev 81a332c148 feat(libSceNgs2.native): mastering voice gain parameter
Mastering voice param 0x30000004 sets a full-band and an LFE level. They
scale the mastering voice when it is mixed into the render buffer, the LFE
level on channel 3 of 6- and 8-channel voices. Non-finite levels are
invalid arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:21:28 +02:00
JAB-dev 2093e74661 feat(libkernel): accept flag 0x8000 in sceKernelMapNamedFlexibleMemoryInternal
The SDK 9 libc.prx heap maps its arenas with flag 0x8000, which threw as
an unsupported flag. The flag is ignored for this function, as sharpemu
does; other unknown flags still throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:21:25 +02:00
Chad cf0955f277 docs: keep the Http2 cookie box entry beside the other libSceHttp2 entries
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 15:13:58 -05:00
Chad 64f12cf39b Merge remote-tracking branch 'upstream/main' into feat/http2-cookie-box 2026-10-06 15:13:46 -05:00
Chad d2a0b0f7af Merge remote-tracking branch 'upstream/main' into feat/http2-cookie-box
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-06 13:42:48 -05:00
Chad cef560ecaf docs: record the FreeBSD 11.0 assumption for process-shared barrier attributes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 13:41:05 -05:00
Fishybeing c6a91e15fd docs: describe the barycentric fallback in TechnicalDebt accurately 2026-10-06 19:14:41 +02:00
Alberto Ruiz bdeeb17326 fix(json2): throw on numbers that overflow a double
Whether the console's parser rejects 1e309 or stores an infinite real
is unknown, and RFC 8259 allows both. Following the exact-or-throw rule,
sce::Json::Parser::parse now throws with the number text and a note that
the behaviour is unverified, instead of returning JsonErrorParse. The
partially built tree is freed before the exception leaves the parser.
The case is listed under unknown function info in TechnicalDebt.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R5WJS4ZdQynAJesCZKH5hb
2026-10-06 18:37:38 +02:00
Adrià Franch 05de11ac1e feat(libSceAjm.native): implement sceAjmBatchJobGetInfo
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 18:01:46 +02:00
Claude 16e76301ab feat(libSceAgc): implement the WRITE_DATA destination and cache policy patches
sceAgcWriteDataPatchSetDst, sceAgcWriteDataPatchSetCachePolicy, their
Async forms and sceAgcAsyncWriteDataPatchSetAddressOrOffset threw. They
now rewrite a WRITE_DATA packet in place: the destination in the
graphics (sceAgcDcbWriteData) or compute (sceAgcAcbWriteData) encoding,
the cache policy in bits 25-26 and the address in dwords 2-3, so the
patched packet equals the one written with those values. A register
destination is rejected when the packet requests write confirmation,
as when the packet is written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:51:07 +00:00
alfalfa-star 98ed835123 feat(agc): run COND_INDIRECT_BUFFER branches whose comparison always passes
PPSA14632 (Unreal Engine) writes sceAgcCbBranch(mode 1, compare
function 0, mask 0, reference 0) with a then buffer and a null else
buffer of 0 dwords. It leaves the compare address uninitialised, so it
is sometimes only 4-byte aligned. The writer rejected the null else
buffer and the misaligned compare address, and the driver accepted
opcode 0x3f only as the 4-dword INDIRECT_BUFFER, so the 14-dword branch
would have failed at submission.

sceAgcCbBranch no longer checks the compare address of an always-pass
branch, which reads nothing, or the address of a buffer of 0 dwords.
The driver runs the first buffer of an always-pass COND_INDIRECT_BUFFER
in modes 1 and 2 (if-then and if-then-else) in place of the packet. A
comparison, a predicated branch and other modes throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 16:12:31 +02:00
Claude 8d7ff94689 feat(libSceKeyboard): translate the 106-key arrangement in sceKeyboardGetKey2Char
The 106-key (Japanese) arrangement threw. Its alphanumeric layer now
follows the JIS layout of the HID usages: the symbol keys right of the
digits and letters, the Ro key (0x87) and the Yen key (0x89). With the
Kana LED set it still throws, as the kana the console returns are
unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:02:11 +00:00
Adrià Franch 04ed454f75 feat(libSceSystemService): implement Disable/ReenableMusicPlayer
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 15:16:45 +02:00
Adrià Franch c7abfa89b2 feat(libSceRazorCpu): implement sceRazorCpuFlushOccurred
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 15:12:53 +02:00
Adrià Franch 7389b2581f feat(libc): implement std::_Fiopen
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 15:09:04 +02:00
Adrià Franch a546bbef93 feat(libc): implement collate<char>::_Getcat
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 14:53:47 +02:00
Celegans12 5e18e84f33 feat(ajm): implement sceAjmBatchJobControl
sceAjmBatchJobControl threw. It now appends a control job that keeps
the sideband input pointer and runs at sceAjmBatchStart: RESET (bit 13)
clears the context as sceAjmBatchJobClearContext does, INITIALIZE
(bit 14) initializes the codec, and SIDEBAND_GAPLESS_DECODE (bit 45)
overwrites the gapless total and skip counts, in this order.

The sideband input holds the gapless decode first, then the codec's
initialize parameters: 8 bytes for ATRAC9, 12 for Opus, none for MP3.
The output is the 8-byte result. Other flags, INITIALIZE for other
codecs, and other sizes throw. SIDEBAND_GAPLESS_DECODE without RESET
throws too: RPCSX and shadPS4 keep zero counts there. The bits and the
order follow shadPS4 (PS4), the overwrite with RESET follows RPCSX, and
the sizes follow the one title seen.
2026-10-06 14:45:10 +02:00
alfalfa-star 70864694d3 fix(audioout): accept a 3D latency of 1 in sceAudioOut2Set3DLatency
PPSA14632 calls sceAudioOut2Set3DLatency(0xFF, 1) during its audio
setup (eboot 0x5613e2c) and fails the setup on a nonzero return. Only
latency 2 from PPSA26344 was accepted, so the call threw. Latency 1 and
2 are now accepted for the system user; 0, 3 and other users still
throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:36:20 +02:00
Adrià Franch 109f120595 feat(kernel): apply the memory type in sceKernelMtypeprotect
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 14:32:47 +02:00
Adrià Franch 263cb6626c feat(jpegenc): honor the encode restart interval
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 14:16:07 +02:00
Adrià Franch 803f1b0e71 feat(videodec2): implement sceVideodec2GetAvcPictureInfo
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 14:11:24 +02:00
Adrià Franch f617b40a45 feat(tools): add a hardware oracle for RDNA instruction semantics
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 13:54:28 +02:00
Aryan Rawat 8ef51df303 feat(playerinvitationdialog): implement scePlayerInvitationDialogGetResult
scePlayerInvitationDialogGetResult makes the common dialog checks of
sceWebBrowserDialogGetResult: NOT_INITIALIZED before the dialog is
initialized, ARG_NULL for a null result and NOT_FINISHED until the
dialog finishes. The dialog shows no UI and sends no invitation, so the
finished dialog reports USER_CANCELED with error code 0. The 40-byte
result layout (error code, result, 32 reserved bytes) is taken from
SharpProspero.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:42:02 +00:00
LeandroLP23 6b69c70a02 feat(font): implement sceFontWritingLineGetOrderingSpace
Report the spacing the writing line applies: the modelled line places
each run at the sum of the previous advances, so every space is 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 12:31:30 +02:00
ebosido444-ai e14184b915 feat(libc): implement std_execute_once
The plain-named twin of std::_Execute_once delegates to that symbol and inherits its call_once semantics; the name-equivalence assumption is recorded in TechnicalDebt. Registers guest_std_execute_once_tests.
2026-10-06 13:11:41 +03:00
Adrià Franch 7db0a80b19 libSceHttp: keep sceHttpUriSweepPath inside srcSize, cite shadPS4
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 11:52:27 +02:00
Adrià Franch 92d79996c7 libSceNet: implement sceNetSendmsg and sceNetRecvmsg
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 11:51:42 +02:00
Adrià Franch 16285b473f libSceHttp: classify the relative reference without host validation in sceHttpUriMerge
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 11:51:34 +02:00
Adrià Franch 0207e28f88 feat(libSceHttp): implement sceHttpUriMerge
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 11:51:34 +02:00
Merijn f98d73abc0 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/savedata-repeated-initialize
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-06 11:40:46 +02:00
Dean 5895ea721a
Merge pull request #814 from adriadam10/feat/kernel-aio-batch
feat(libkernel): Aio batch submit, wait, cancel and delete
2026-10-06 22:34:58 +13:00
Dean 77b96c6c00
Merge pull request #813 from adriadam10/feat/http-offline-noops
feat(libSceHttp): add sceHttpSetResponseHeaderMaxSize, sceHttpRedirectCacheFlush, sceHttpsUnloadCert
2026-10-06 22:34:16 +13:00
Dean 2f7c9e5914
Merge pull request #812 from adriadam10/feat/ngs2-system-state
feat(ngs2): system sample rate, user data and lock
2026-10-06 22:33:34 +13:00
Dean 88ca57d7af
Merge pull request #806 from adriadam10/feat/kernel-vectored-io
feat(libkernel): sceKernelReadv, Writev, Preadv and Pwritev
2026-10-06 22:32:09 +13:00
Dean 1e6b1cb7eb
Merge pull request #804 from adriadam10/feat/rtc-format-rfc2822
feat(rtc): implement sceRtcFormatRFC2822 and the RFC 2822/3339 local-time formatters
2026-10-06 22:31:59 +13:00
Dean dd9b95790e
Merge pull request #782 from adriadam10/feat/rtc-parse-datetime-rfc2822
feat(rtc): parse RFC 2822 and asctime strings in sceRtcParseDateTime
2026-10-06 22:31:17 +13:00
Dean 3365f98d1b
Merge pull request #781 from adriadam10/feat/ngs2-custom-submixer-userfx
feat(ngs2): custom submixer rack with UserFx2 modules
2026-10-06 22:30:35 +13:00
Dean 25f76f27d9
Merge pull request #800 from Celegans12/docs/narrow-subgroup-exec
docs: record how EXEC written as a value is read on narrow subgroups
2026-10-06 22:29:53 +13:00
Dean fbcba205de
Merge pull request #485 from RomainROCH/codex/fix-jpeg-formats
fix(jpegenc): honor chroma sampling and encode true grayscale JPEGs
2026-10-06 22:29:11 +13:00
Dean 6f3d485fca
Merge pull request #723 from alfalfa-star/feat/libkernel-module-info-from-addr
feat(libkernel): implement sceKernelGetModuleInfoFromAddr
2026-10-06 22:29:00 +13:00
boykopovar e76c70f682
Merge pull request #676 from adriadam10/refactor/drop-bundled-middleware
refactor(libs): drop replacements of modules that titles ship themselves
2026-10-06 11:57:51 +03:00
Merijn d1d98a8261 fix(savedata): accept a repeated sceSaveDataInitialize3
A second sceSaveDataInitialize3 returned SAVE_DATA_ERROR_ALREADY_INITIALIZED.
PPSA12544's executable and its Unity SaveData plugin both initialize, and
the plugin raises Unity.SaveData.PS5.Core.SaveDataException on any error,
so the console must accept the second call. Initializations are now
counted; sceSaveDataTerminate ends the session at the last one and only
then checks for mounted slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 10:46:48 +02:00
Merijn f81425ec8e fix(audioout2): read grains at the next push and play them behind a cushion
A push mixed the ports' buffers at once and queued the mix on SDL, and
the queue level left out a 40 ms cushion that the SDL queue rarely
exceeded, so titles saw an empty queue. PPSA12544's FMOD output fills a
256-frame buffer after pushing it, reuses it two pushes later, and its
mixer thread can still be writing a buffer when the next push follows
within microseconds: a grain boundary broke about every 5 ms (an audible
crackle).

A push now records the buffers the ports point at and reads the previous
grain at the next push, 100 us after it. The mixed frames are played by
the SDL device callback, which waits for a 40 ms cushion before it plays
(again after running dry), and the queue level counts the unplayed
grains beyond that cushion. Recording the four buffers at every push
showed 27% of boundaries broken when read at the push, 59% when read two
pushes later and none when read at the next push; the title's output
went from 4-9% to none of its grain boundaries broken over 6,000 loud
grains.

AI-assisted: yes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 10:45:27 +02:00
Merijn 44bfb9295d Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/libs-ppsa12544-plugin-exports
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-06 09:54:07 +02:00
Merijn deddb1092e Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/kernel-exception-handler-registration
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-06 09:54:05 +02:00
Merijn 4d47b3aac5 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/videoout-unsupported-output-mode
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-06 09:54:03 +02:00
LeandroLP23 025606ceb4 feat(font): implement sceFontGetFontResolution
Report the face's units per EM and the driver's face scale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:34:56 +02:00
LeandroLP23 27cb27dd67 docs(font): cite SharpProspero for the glyph count and glyph code signatures
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:34:04 +02:00
LeandroLP23 34ba33faf7 feat(font): implement sceFontGetFontGlyphsCount and sceFontGetCharGlyphCode
Report the face's glyph count and the glyph index of a character through
the library's driver; the FreeType driver gains its glyphs_count entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:23:44 +02:00
alfalfa-star 5e009d75ec feat(libkernel): implement the rtld thread atexit reference count
A title's libc.prx passes the dso address of __cxa_thread_atexit to
_sceKernelRtldThreadAtexitIncrement and fails the registration when it
returns nonzero. Increment takes a reference on the loaded image that
contains the address, so it stays mapped while thread_local destructors
are pending, and Decrement releases one. An address outside every
loaded image and a Decrement without a reference throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:36:23 +02:00
Adrià Franch 0f2699eef4 feat(libkernel): Aio batch submit, wait, cancel and delete
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 08:11:07 +02:00
Adrià Franch bc7fdff9e5 feat(libSceHttp): add sceHttpSetResponseHeaderMaxSize, sceHttpRedirectCacheFlush, sceHttpsUnloadCert
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 08:06:17 +02:00
Adrià Franch 6dbdd927ee feat(ngs2): system sample rate, user data and lock
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 08:02:42 +02:00
Lexroid 54f0e03cde feat(libSceIme): implement sceImeKeyboardGetResourceId
The resource id array is cleared and given the user. A null array returns
INVALID_ADDRESS and an invalid user INVALID_USER_ID without writing it; a
user whose keyboard is not open gets NOT_OPENED, and an open one gets
CONNECTION_FAILED, as no USB keyboard is reported through the IME, as in
shadPS4. The missing IME keyboard events are recorded in TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:56:44 +03:00
Lexroid fcd349fb2b docs: record the assumed InitParameter2 layout in TechnicalDebt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 08:54:46 +03:00
Adrià Franch 5a031f3ef6 fix(ngs2): start UserFx2 process flags at 1 on the first call 2026-10-06 07:40:12 +02:00
Adrià Franch 52869f0112 feat(ngs2): custom submixer rack with UserFx2 modules
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:40:12 +02:00
Celegans12 a2e0be6e76 docs: record how EXEC written as a value is read on narrow subgroups
On a host subgroup narrower than 32 lanes, threadBit reads an EXEC
written with s_mov_b32 or s_mov_b64 at bit LaneId & 31 of EXEC_LO, and
LaneId is the subgroup invocation id. Every lane at or above the host
subgroup size therefore reads the bit of a lower lane, in wave32 and
wave64 alike. An EXEC produced by a compare stays consistent because
its ballot is subgroup-local as well. Found while investigating the
llvmpipe failure of #751.
2026-10-06 07:37:02 +02:00
Celegans12 76ddd9b6d4 feat(agc): implement unnormalized sampler coordinates on single-level 1D and 2D views
An S# with FORCE_UNNORMALIZED threw in DecodeSamplerResource. It is now
bound through a Vulkan sampler with unnormalizedCoordinates when every
use stays where the S# and the host select the same texels.

ShaderInfoCollector records the live uses of each sampler after Apply
and dead-code elimination, and the emitter shares its explicit-LOD
predicate. Populate flags a direct S# with the bit that only explicit-LOD
image_sample without offset, comparison, derivatives or _a uses, paired
only with direct 1D or 2D images without a format conversion; anything
else throws. The driver checks the S# filters, clamps, TRUNC_COORD and
MC_COORD_TRUNC, creates the sampler with nearest mips and a zero LOD
range, and requires a single-level, single-layer 1D or 2D view of mip 0.
The shader disk cache format becomes 5.
2026-10-06 07:36:30 +02:00
Dean 481c85e7c9
Merge pull request #778 from adriadam10/feat/ngs2-sampler-filter
feat(libSceNgs2.native): sampler voice low-pass filter
2026-10-06 18:36:28 +13:00
Adrià Franch ab98cd7f4a feat(libkernel): sceKernelReadv, Writev, Preadv and Pwritev
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:33:51 +02:00
Adrià Franch 3515ead91a feat(rtc): implement sceRtcFormatRFC2822 and the RFC 2822/3339 local-time formatters
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:27:27 +02:00
Adrià Franch 819c045327 feat(libSceNgs2.native): sampler voice low-pass filter
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:16:25 +02:00
Adrià Franch 4e5a1fe9d4 feat(rtc): parse RFC 2822 and asctime strings in sceRtcParseDateTime
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:16:02 +02:00
Adrià Franch 79057e9160 refactor(libs): drop replacements of modules that titles ship themselves
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 07:11:33 +02:00
raghav314 670ffb9da3 feat(libkernel): implement sceKernelGetAvailableCpumask
Returns the CPU mask threads get by default (DEFAULT_THREAD_AFFINITY,
0x1FFF), the value itself rather than an error code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 09:41:52 +05:30
Dean aff8dfb3f3
Merge pull request #797 from ThisIsAkill/fix/libc-fiopen-export
feat(libc): export std::_Fiopen as unimplemented
2026-10-06 16:32:54 +13:00
Dean 4ee77fc5ac
Merge pull request #796 from CnRJay/feat/appcontent-addcont-mount
feat(libSceAppContent): answer add-content mounts without installed content
2026-10-06 16:32:12 +13:00
Dean dee8fa1855
Merge pull request #791 from CnRJay/feat/agc-driver-resource-queries
feat(libSceAgcDriver): answer the resource registration queries
2026-10-06 16:30:38 +13:00
Dean 77a8bf3370
Merge pull request #789 from Celegans12/feat/voiceqos-init-app-type
feat(voiceqos): accept app type 0x10000000 in sceVoiceQoSInit
2026-10-06 16:29:14 +13:00
Akhil Moola be6705e977 feat(libc): export std::_Fiopen as unimplemented
PPSA21564 and PPSA21567 import std::_Fiopen (NID vYWK2Pz8vGE), the only libc
NID the host libc lacks. Without it the executable fails to load against
the host libc when the title's own libc.prx is left out of the guest
conversion, which is how the Linux runs of PPSA21564 avoid the libc.prx
binding crash. The values of the open mode and the meaning of the
protection argument are unknown, so the export throws when called; it was
never called in a 300 s run of PPSA21567.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014A3UgWDUxE1EeHyVZm6tiN
2026-10-05 20:06:18 -06:00
Chad 89465f122f Merge remote-tracking branch 'upstream/main' into feat/http2-cookie-box
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-05 20:23:49 -05:00
Chad f2427b1a24 Merge remote-tracking branch 'upstream/main' into feat/agc-driver-resource-queries
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-05 20:22:12 -05:00
Chad ebe0515180 feat(libSceAppContent): answer add-content mounts without installed content
No additional content is installed, so sceAppContentAddcontMount returns
SCE_APP_CONTENT_ERROR_NOT_FOUND with the mount point untouched, and
sceAppContentAddcontUnmount finds no mount to release. A missing label
or mount point is a parameter error. The library gets its own
CMakeLists for the new guest_appcontent test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:19:09 -05:00
Chad 5a321471c2 feat(libSceHttp2): implement cookie boxes and requests without a content length
sceHttp2CreateCookieBox hands out an id from the library's handle
counter, sceHttp2SetCookieBox binds one to a template or request, and
sceHttp2CookieFlush succeeds: no request reaches the network, so no
cookie is ever stored. sceHttp2SetRequestNoContentLength is accepted
like sceHttp2SetRequestContentLength. The library gets its own
CMakeLists for the new guest_http2 test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:16:49 -05:00
Dean 8235eda149
Merge pull request #769 from adriadam10/feat/font-writing-line
feat(font): implement writing lines
2026-10-06 14:13:27 +13:00
Dean b8a98c9502
Merge pull request #582 from CnRJay/feat/agc-predication
feat(agc): implement packet and range predication and the predication sizes
2026-10-06 14:12:46 +13:00
Dean 8afcf7203f
Merge pull request #653 from Celegans12/feat/audioout2-12-channel-ports
feat(audioout): implement 12-channel AudioOut2 ports
2026-10-06 14:12:36 +13:00
Chad 5d99f135d7 feat(libSceAgcDriver): answer the resource registration queries
Registration of owners and resources fails with
RESOURCE_REGISTRATION_UNAVAILABLE, so no handle is ever valid: the owner
and resource getters, sceAgcDriverSetResourceUserData,
sceAgcDriverRegisterGdsResource, sceAgcDriverFindResourcesPublic,
sceAgcDriverUnregisterAllResourcesForOwner and
sceAgcDriverGetDefaultOwner return the same error.
sceAgcDriverUnregisterWorkloadStream mirrors the accepting
RegisterWorkloadStream. No capture, trace or submit validation ever runs,
so their status queries report false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:07:28 -05:00
Celegans12 4b0119426b feat(voiceqos): accept app type 0x10000000 in sceVoiceQoSInit
sceVoiceQoSInit accepted only app type 0x20000000 and threw for every
other value. PPSA26344 v1.008 passes 0x10000000 at both of its call
sites, so its initialization threw.

Accept 0x10000000 as a second known app type. Its meaning is unknown,
so the constant is named after the value, and it is handled like
0x20000000; the block stays unused. A null or empty block, a second
initialization and every other app type still throw.

guest_voice_qos_tests now takes the app type as its argument and runs
in ctest once per accepted value, because sceVoiceQoSEnd still throws
and one process can initialize only once.
2026-10-06 02:42:33 +02:00
Dean 021e4573ce
Merge pull request #668 from ThisIsAkill/fix/agc-emulated-color-compare-main
fix(agc): emulate comparison sampling of color textures in the shader
2026-10-06 13:27:39 +13:00
Dean 3e9bcee7b9
Merge pull request #756 from CnRJay/feat/amm-prt
feat(libs): implement the AMM PRT commands
2026-10-06 13:17:24 +13:00
Dean 5cc58621a9
Merge pull request #749 from CnRJay/feat/amm-remap-protect
feat(libs): implement the AMM remap, multimap and protection changes
2026-10-06 13:17:14 +13:00
Dean ece9990d89
Merge pull request #748 from CnRJay/feat/amm-core
feat(libs): implement the AMM map, map direct and unmap commands and the APR map region
2026-10-06 13:16:31 +13:00
Celegans12 799aaf5c2f feat(audioout): implement 12-channel AudioOut2 ports
sceAudioOut2PortCreate threw for 12-channel ports, which PPSA26344
creates as its two 7.1.4 float beds (data format 0xc00).

Each accepted layout (1, 2, 6, 8 or 12 channels, float or int16) now
folds into the stereo mix through a coefficient table: centre, side,
back and top front channels at -3 dB, top back channels at -6 dB into
the front, LFE dropped. Zero coefficients are skipped, so NaN or Inf on
a dropped channel does not reach the mix. Ports of 3, 4, 5 or 7
channels, which were mixed as L/R, now throw, as do other counts and
formats with any of bits 12-31 set. The assumed format fields,
channel order and coefficients are listed in TechnicalDebt.

The new audio_out2_port_layouts test checks each layout's fold, float
and int16, and the formats that throw.
2026-10-06 01:54:27 +02:00
Dean 03cc1bd925
Merge pull request #776 from adriadam10/feat/agc-gs-oversubscription
feat(agc): implement sceAgcGetGsOversubscription
2026-10-06 12:47:24 +13:00
Dean 65190976d9
Merge pull request #691 from NumberGuan/codex/implement-http-uri-unescape
feat(http): implement URI percent decoding
2026-10-06 12:46:41 +13:00
Dean 4987308034
Merge pull request #704 from adriadam10/feat/gameupdate-addcont-version
feat(libs): implement sceGameUpdateGetAddcontLatestVersion
2026-10-06 12:45:59 +13:00
Dean 7de111f98a
Merge pull request #773 from Raghav314/feat/kernel-sync-on-address-wait8-16
feat(libkernel): implement sceKernelSyncOnAddressWait8 and sceKernelSyncOnAddressWait16
2026-10-06 12:45:18 +13:00
Chad 73a751ac1f Merge remote-tracking branch 'upstream/main' into feat/agc-predication
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-05 18:45:17 -05:00
Dean 9516f035e7
Merge pull request #775 from adriadam10/feat/agc-context-state-op-size
feat(agc): implement sceAgcDcbContextStateOpGetSize
2026-10-06 12:44:25 +13:00
Dean 8cac9bc7fe
Merge pull request #774 from adriadam10/feat/agc-payload-range
feat(agc): implement sceAgcGetDataPacketPayloadRange
2026-10-06 12:43:43 +13:00
Dean 52ae2270fc
Merge pull request #768 from adriadam10/feat/ajm-mp3-parse-ofl
feat(ajm): parse the original file length in sceAjmDecMp3ParseFrame
2026-10-06 12:41:38 +13:00
Dean 5124951b05
Merge pull request #740 from adriadam10/feat/audio3d-port
feat(audio3d): implement the port queue
2026-10-06 12:40:56 +13:00
Dean cc785ffa93
Merge pull request #739 from adriadam10/feat/systemservice-powertick
feat(systemservice): implement PowerTick and ReportAbnormalTermination
2026-10-06 12:40:14 +13:00
Dean 2410130475
Merge pull request #738 from adriadam10/feat/ime-keyboard-info-mode
feat(libSceIme): implement keyboard info and mode queries
2026-10-06 12:39:32 +13:00
Dean 2127e1c6d0
Merge pull request #737 from adriadam10/feat/share-capture-status
feat(libSceShare): capture, open menu and current status calls
2026-10-06 12:38:49 +13:00
Dean bf4b7e3f6d
Merge pull request #714 from adriadam10/feat/contentexport-fromdata-name
fix(contentexport): name the AOWqIYsgVHs stub sceContentExportFromData
2026-10-06 12:37:25 +13:00
Adrià Franch 83442e1e40 feat(font): implement writing lines
Create, destroy, clear, write runs, step through them and read the
line metrics, following KytyPS5. Layouts from SharpProspero.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 01:30:16 +02:00
Dean c8c4621a17
Merge pull request #747 from CnRJay/feat/apr-gather-scatter
feat(libs): implement the APR gather and scatter reads
2026-10-06 12:25:06 +13:00
Dean ad881d539b
Merge pull request #730 from alfalfa-star/feat/voiceqos-init
feat(voiceqos): implement sceVoiceQoSInit
2026-10-06 12:19:38 +13:00
Dean 90f20b393d
Merge pull request #699 from merwie/feat/libs-ppsa12544-exports
feat(libs): add exports imported by PPSA12544
2026-10-06 12:18:11 +13:00
Adrià Franch 58fce8ab1c feat(libs): implement sceGameUpdateGetAddcontLatestVersion
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 01:17:29 +02:00
Adrià Franch cef269d129 feat(agc): implement sceAgcGetGsOversubscription
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 01:16:35 +02:00
Dean 398d03ed09
Merge pull request #705 from merwie/feat/userservice-age-level
feat(userservice): implement sceUserServiceGetAgeLevel
2026-10-06 12:16:25 +13:00
NumberGuan cda1d4b211 feat(http): implement URI percent decoding 2026-10-05 20:14:23 -03:00
Dean 7887d885b6
Merge pull request #742 from alfalfa-star/feat/agc-driver-predication
feat(agc-driver): execute boolean SET_PREDICATION
2026-10-06 12:14:16 +13:00
Dean 1438d99560
Merge pull request #752 from Celegans12/feat/agc-conservative-z-export
feat(agc): accept conservative Z export in DB_SHADER_CONTROL
2026-10-06 12:13:21 +13:00
Dean 82d1b129fa
Merge pull request #648 from Celegans12/feat/videoout-dcc-presentation
feat(agc): present DCC display buffers whose keys are uncompressed or fast-cleared
2026-10-06 12:11:15 +13:00
Dean 11c3e3e9f0
Merge pull request #680 from NumberGuan/codex/implement-http-response-header
feat(http): implement response header parsing
2026-10-06 12:09:48 +13:00
Dean 2474eee54e
Merge pull request #746 from CnRJay/feat/ampr-counter-04-00
feat(libs): implement the AMPR 04_00 counter commands and the construct helpers
2026-10-06 12:09:04 +13:00
Dean f5b548a876
Merge pull request #580 from CnRJay/feat/ampr-nop-04-writes
feat(libs): implement the AMPR nops and the 04_00 completion writes
2026-10-06 12:08:21 +13:00
raghav314 ce6d94793c feat(libkernel): implement sceKernelSyncOnAddressWait8 and sceKernelSyncOnAddressWait16
Wait8 and Wait16 compare the 1- or 2-byte value at the address with the
comparand and share the waiter queue of the other sizes.
sceKernelSyncOnAddressWake accepts any non-null address: libc's
__std_atomic_notify_one/all pass the atomic's own address, which for 8- and
16-bit atomics need not be 4-byte aligned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 04:30:12 +05:30
Adrià Franch 8232a4c071 feat(agc): implement sceAgcDcbContextStateOpGetSize
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:58:50 +02:00
Adrià Franch 9322634817 feat(agc): implement sceAgcGetDataPacketPayloadRange
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:54:31 +02:00
Celegans12 4a67b140fc feat(agc): accept conservative Z export in DB_SHADER_CONTROL
DecodeState, the draw precheck and DecodePixelStageInfo rejected every
nonzero CONSERVATIVE_Z_EXPORT (DB_SHADER_CONTROL bits 13-14).
EXPORT_LESS_THAN_Z (1) and EXPORT_GREATER_THAN_Z (2) promise that the
exported Z stays on one side of the interpolated Z. The value now
reaches the recompiler as a pixel stage field, and a pixel shader that
writes FragDepth declares DepthLess or DepthGreater next to
DepthReplacing, the SPIR-V modes RADV maps to these values. Vulkan lets
those modes only add a depth test of the interpolated Z before shading,
so a shader that keeps the promise renders the same. The reserved value
3 still throws.

The field is part of the recompile cache key, the draw key and the
serialized request (version 7), and ValidateShaders accepts both modes.
2026-10-06 00:35:43 +02:00
Adrià Franch 58263b5075 feat(libSceIme): implement keyboard info and mode queries
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:30:16 +02:00
Adrià Franch 23c8558c70 fix(contentexport): name the AOWqIYsgVHs stub sceContentExportFromData
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:30:00 +02:00
Adrià Franch aed4f3a25c feat(systemservice): implement PowerTick and ReportAbnormalTermination
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:29:42 +02:00
Adrià Franch f4b5b1ba50 feat(libSceShare): capture, open menu and current status calls
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:29:19 +02:00
Adrià Franch 06d2ae5f05 feat(audio3d): implement the port queue
Initialize, PortOpen/Close, PortSetAttribute, PortGetQueueLevel,
PortAdvance and PortPush. One port, validation order and error codes from
the PS5 module as read by prosper; blocking push paced at granularity
samples per frame at 48 kHz like KytyPS5.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:28:19 +02:00
Adrià Franch fc96f96ac5 feat(ajm): parse the original file length in sceAjmDecMp3ParseFrame
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:26:19 +02:00
Celegans12 241faf881e feat(agc): present DCC display buffers whose keys are uncompressed or fast-cleared
sceVideoOutRegisterBuffers2 threw "DCC presentation is not implemented"
for category 1 (DCC-compressed) buffers, which PPSA26344 registers. Such
a buffer now needs DCC metadata and the tiled layout, and dcc_control may
only use the CB_DCC_CONTROL block layout bits 0x10026c.

At a flip the keys are read behind their recorded writers, one byte per
256 bytes as in the driver's DCC model. Uncompressed keys present the
stored texels as before; a uniform clear code presents its color with a
GPU clear of the scaler's source image; a pending storage image is used
when it serves the keys. Mixed or unreadable keys, clear codes the
display format has no DCC encoding for, register-clear keys over a
pending image and a clear color wider than 32 bits throw. Buffers
without DCC take the old path.
2026-10-05 23:45:15 +02:00
Tomás Ortellado 669c7a40fa feat(http): implement response header parsing 2026-10-05 18:32:47 -03:00
Dean Galvin 9d4e6d2f28 feat(font): open system font sets from a font directory
sceFontOpenFontSet failed for every set type, so PPSA21564 drew no text
in system fonts (the title screen copyright line, credits, button
guides). It now loads the set's primary font file from
ANYPS5_SYSTEM_FONTS, or anyps5-fonts beside the executable: console
files under their own names first, then openly licensed substitutes
(Noto Sans, Noto Sans Mono, Noto Sans Thai, Noto Sans CJK). The
PS5-only JG2 set types are accepted.

System font handles use the system font context. Their faces are
loaded by FreeType in host memory: about 1 MiB per CJK face does not
fit the font memory the title sizes for the console's fonts, and
sceFontCreateRenderer then failed with ALLOCATION_FAILED. Handles of
the same font file share one copy of its bytes.
2026-10-06 10:27:09 +13:00
Merijn aaefea9626 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/userservice-age-level
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-05 23:24:52 +02:00
Merijn d82bae0934 feat(libs): add exports imported by PPSA12544's Unity plugins
PPSA12544's Media/Plugins modules (CommonDialog, PSN, Share) import
libSceVrSetupDialog, which no library provided, and Share, NpTrophy2,
WebBrowserDialog and NpEntitlementAccess functions that were not
exported. Add libSceVrSetupDialog and the missing functions as
unimplemented exports, except
sceNpEntitlementAccessRequestConsumeServiceEntitlement, which reports
SCE_NP_ERROR_SIGNED_OUT like
sceNpEntitlementAccessRequestConsumeUnifiedEntitlement. Their other
imports are covered by #734 and #369, and two by #407.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 23:18:46 +02:00
Chad cf3d0f6fc7 feat(libs): implement the AMM PRT commands
sceAmprAmmCommandBufferMapAsPrt, AllocatePaForPrt, RemapIntoPrt and
UnmapToPrt, with the MapAsPrt and AllocatePaForPrt measures. Signatures,
checks and their order follow ampr_emu.

The executor keeps the PRT pages of the AMM ranges. Unbacked PRT pages
are zero-filled with GPU read access; AllocatePaForPrt backs each
unbacked page with a pool page and changes the type and protection of
backed ones; RemapIntoPrt moves a mapped range into a PRT range; and
UnmapToPrt returns the pages to the pool and zero-fills them again. A
plain map, unmap or remap over a PRT range ends it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:45:28 -05:00
Merijn d4eed90b54 fix(videoout): report unavailable output modes instead of throwing
sceVideoOutIsOutputSupported threw VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE
for every mode other than the default and 119.88 Hz, and
sceVideoOutConfigureOutput threw for an unavailable 119.88 Hz mode. Titles
probe and request modes the display may lack and handle the result:
PPSA12544 asks for 0xd000000a and falls back to 3840 pixels when it is not
supported, and its sceVideoOutConfigureOutput caller switches on the
returned error codes, including VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE.
Every mode except the default now reports 0, and configuring one returns
VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:45:12 +02:00
Chad 166ea44993 feat(libs): implement the AMM remap, multimap and protection changes
libSceAmpr gains sceAmprAmmCommandBufferRemap, MultiMap, ModifyProtect
and ModifyMtypeProtect with their GPU mask forms and the eight measure
functions. Signatures and the protection and mask checks follow ampr_emu.

The executor keeps a page table of the AMM ranges: each page's physical
offset, protection, memory type and whether it came from the pool. A
remap moves the pages of a fully mapped range and leaves the old range
reserved; a multimap maps the same pages again; a pool page returns to
the pool only when its last mapping goes. A protection change applies
the masked bits page by page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:36:24 -05:00
Dean 2707b3a3c8
Merge pull request #736 from adriadam10/feat/libc-wcsrtombs-s
feat(libc): implement wcsrtombs_s
2026-10-06 09:31:24 +13:00
Chad c16e59bfd5 feat(libs): implement the AMM map, map direct and unmap commands and the APR map region
libSceAmpr gains the AMM command buffer (constructor, destructor, map,
map direct and unmap, with their GPU mask forms and measures),
sceAmprAmmGiveDirectMemory, sceAmprAmmGetVirtualAddressRanges, the three
submit forms and sceAmprAmmWaitCommandBufferCompletion. The APR
MapBegin, MapDirectBegin and MapEnd commands and their measures record
the same map commands.

The libkernel executor now maps: a plain map takes pages from the direct
memory given to the mapper with usage 1, a direct map uses the given
offset, and an unmap returns the pages to that pool and leaves the range
reserved. The AMM ranges are reserved in the guest arena on first use.
Commands are walked by the buffer's byte offset so an AMM submission can
run raw command memory.

Signatures, the protection mask and the APR map rules follow ampr_emu;
the mapper model follows PS5PCEM. While an APR map region is open, a
second begin and every completion write return EPERM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:29:33 -05:00
Chad 4b336335a8 feat(libs): implement the APR gather and scatter reads
sceAmprAprCommandBufferReadFileGather, ReadFileScatter,
ReadFileGatherScatter and ResetGatherScatterState, with their measure
functions. Signatures, argument checks and the read cursor follow
ampr_emu: each read leaves the file, the next offset and the next
destination; a gather reads at a new offset into the next destination, a
scatter continues in the file into a new destination, and a
gather-scatter takes both. Recording one needs a file read since the last
reset, tracked in the command buffer object next to its type.

sceAmprAprCommandBufferReadFile now applies the same length, offset and
destination checks and rejects a null command buffer instead of
dereferencing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:12:34 -05:00
Chad 636fb5edae feat(libs): implement the AMPR 04_00 counter commands and the construct helpers
sceAmprCommandBufferWaitOnCounter_04_00 and WriteCounter_04_00 take the
counter access size and offset, the wait mask and the write operation,
with their measure functions; ConstructNop records a nop with an optional
leading word and a payload of up to 60 bytes, and ConstructMarker records
the set, push and pop markers by type. Signatures and checks follow
ampr_emu.

The executor now reads and writes counters by access: the 8-byte access
of counter n spans n and n + 1, the 2- and 1-byte accesses a half or a
byte of the counter. Waits compare at the access width, so the signed and
wrapped compares see the field's own sign bit, and the atomic writes wrap
within the field. The legacy counter commands record a 4-byte access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 15:02:30 -05:00
RomainROCH 12c229d19a fix(jpegenc): honor chroma sampling and encode true grayscale JPEGs 2026-10-05 21:49:36 +02:00
Chad 4882413217 Merge remote-tracking branch 'upstream/main' into feat/agc-predication
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-05 14:48:11 -05:00
Chad c3ab220e45 Merge remote-tracking branch 'upstream/main' into feat/ampr-nop-04-writes
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-05 14:46:31 -05:00
Dean 681f83e51e
Merge pull request #713 from adriadam10/feat/savedata-ps4-transfer
feat(savedata): implement the PS4 transfer mount and directory search
2026-10-06 08:14:26 +13:00
Dean a2da600645
Merge pull request #712 from adriadam10/feat/share-capture-screenshot-extended
feat(libSceShare): sceShareCaptureScreenshotExtended
2026-10-06 08:13:44 +13:00
Dean d66925cd5f
Merge pull request #708 from adriadam10/feat/http-inflate-gzip
feat(http): name sceHttpSetInflateGZIPEnabled and sceHttpSetRequestStatusCallback
2026-10-06 08:12:50 +13:00
Dean 949de6665b
Merge pull request #707 from adriadam10/feat/ulobjmgr-register
feat(ulobjmgr): register and unregister object
2026-10-06 08:12:08 +13:00
Dean 74dda5d30a
Merge pull request #703 from adriadam10/feat/nptrophy2-unregister-unlock-callback
feat(libs): implement sceNpTrophy2UnregisterUnlockCallback
2026-10-06 08:11:26 +13:00
Dean 170ef4a28f
Merge pull request #649 from Celegans12/feat/audioout2-3d-latency
feat(audioout): implement sceAudioOut2Set3DLatency and accept sceAudioOut2MasteringInit(0)
2026-10-06 08:09:17 +13:00
Dean fa9b2ed0ba
Merge pull request #643 from Celegans12/feat/msgdialog-native-close
feat(msgdialog): implement sceMsgDialogClose in libSceMsgDialog.native
2026-10-06 08:07:51 +13:00
Dean 4b0c38f0e4
Merge pull request #642 from Celegans12/feat/http-parse-status-line
feat(http): implement sceHttpParseStatusLine
2026-10-06 08:07:07 +13:00
Dean 20be619dce
Merge pull request #640 from Celegans12/feat/systemservice-param-get-string
feat(systemservice): implement sceSystemServiceParamGetString
2026-10-06 08:06:55 +13:00
Dean de82e335a3
Merge pull request #634 from Celegans12/feat/np-commerce-icon-layout
feat(npcommerce): implement sceNpCommerceSetPsStoreIconLayout
2026-10-06 08:06:01 +13:00
Dean 3e5558dd43
Merge pull request #632 from Celegans12/feat/razorcpu-markers
feat(razor): implement sceRazorCpuPushMarkerStatic and sceRazorCpuPopMarker
2026-10-06 08:05:19 +13:00
Dean 974c3fa1b5
Merge pull request #652 from Celegans12/fix/guest-arena-app-map-area
fix(libc): reach the application map area end with the guest arena
2026-10-06 08:04:36 +13:00
alfalfa-star 124be3e7e8 feat(agc-driver): execute boolean SET_PREDICATION
SET_PREDICATION threw, and packets with the predicate header bit were
rejected. The executor now keeps the queue's predication: operations 3
and 4 read a 64- or 32-bit value and bit 8 selects whether predicated
packets run when it is non-zero or zero; operation 0 clears it. Before
a predicated packet runs while predication is active, queued labels are
recorded and the value is read, as for COND_EXEC; the packet is skipped
when the predicate fails.

Indirect buffers are inlined when a submission is copied, so a
predicated INDIRECT_BUFFER call keeps its header in front of the
inlined commands and records their end like a COND_EXEC range; the
block runs or is skipped on one evaluation, as on the command
processor. Query predication, a predicated COND_EXEC, predicated chains
and flips inside predicated command buffers throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 21:02:47 +02:00
Dean e8893dfc64
Merge pull request #633 from Celegans12/feat/kernel-sync-on-address-wait-sized
feat(libkernel): implement sceKernelSyncOnAddressWait32 and sceKernelSyncOnAddressWait64
2026-10-06 08:02:29 +13:00
Dean cd79926080
Merge pull request #671 from NahuelGenchi/docs/fma-legacy-fused-assumption
docs: record the fused assumption of v_fma_legacy_f32 in TechnicalDebt
2026-10-06 07:56:35 +13:00
Dean eabf1418de
Merge pull request #647 from Celegans12/feat/videoout-strict-colorimetry
feat(videoout): accept the STRICT_COLORIMETRY buffer option
2026-10-06 07:54:15 +13:00
Dean 7df0923570
Merge pull request #659 from Celegans12/feat/agc-image-atomics-32bit-formats
feat(agc): implement image atomics on 32_SINT and 32_FLOAT surfaces
2026-10-06 07:52:39 +13:00
Dean 18f1548703
Merge pull request #678 from Celegans12/feat/agc-clip-cntl-dx-linear-attr
feat(agc): accept linear attribute clipping in PA_CL_CLIP_CNTL
2026-10-06 07:50:16 +13:00
Dean 0a081cbe8c
Merge pull request #673 from Celegans12/feat/agc-pm4-cond-exec
feat(agc): implement COND_EXEC
2026-10-06 07:49:33 +13:00
Dean 75aa7f2197
Merge pull request #651 from Celegans12/feat/agc-interpolant-mapping-f16-high
feat(agc): implement the interpolant mapping variant for high-half f16 inputs
2026-10-06 07:48:08 +13:00
Dean d9162684ee
Merge pull request #646 from Celegans12/fix/agc-get-is-trinity-mode
fix(agc): store sceAgcGetIsTrinityMode's flag through its out pointer
2026-10-06 07:47:55 +13:00
Adrià Franch 55f548d6bc feat(libc): implement wcsrtombs_s
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 20:29:18 +02:00
alfalfa-star d7f3b7c494 feat(voiceqos): implement sceVoiceQoSInit
A title passes a work memory block and app type 0x20000000, and turns
voice chat off when initialization fails. Initialization now records
the library as initialized and succeeds. A null or empty memory block,
another app type and a second initialization throw, as their error
codes are unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:09:25 +02:00
Merijn 3b8ef5bc4f feat(libkernel): record exception handlers
sceKernelInstallExceptionHandler and sceKernelRemoveExceptionHandler threw.
They now keep one handler per allowed signal (SIGHUP, SIGILL, SIGFPE,
SIGBUS, SIGSEGV, SIGUSR1, as in shadPS4): another signal or a null handler
returns EINVAL, a second handler for a signal returns EAGAIN, and removing
clears it. Delivery is not implemented and is recorded in the technical
debt; sceKernelRaiseException still throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:59:03 +02:00
alfalfa-star ba8c8c4b05 feat(libkernel): implement sceKernelGetModuleInfoFromAddr
A title's libc.prx calls it from __cxa_thread_atexit with flags 2 and
stores the returned module id in the destructor record. The 0x1A8-byte
info reports the name, id, TLS block, init and fini procedures,
eh_frame_hdr and eh_frame, and up to four load segments of the image
containing the address. The id is the loader handle when the image was
opened through sceKernelLoadStartModule and otherwise a stable id from
the same range. Unknown flags and st_size values throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:55:15 +02:00
Adrià Franch e923bea317 feat(savedata): implement the PS4 transfer mount and directory search
Rename the two unknown libSceSaveData.native stubs to
sceSaveDataTransferringMountPs4 (RjMlsR8EXrw) and
sceSaveDataDirNameSearchPs4 (X4MYzukPc3g). There is no PS4 save area:
the mount returns NOT_FOUND like sceSaveDataTransferringMount, and the
search reports zero hits.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 19:41:59 +02:00
Adrià Franch 9b9194e543 feat(libSceShare): sceShareCaptureScreenshotExtended
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 19:35:25 +02:00
Adrià Franch 7bcdc6f578 feat(http): name sceHttpSetInflateGZIPEnabled and sceHttpSetRequestStatusCallback
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 19:29:54 +02:00
Merijn 845e4dd942 fix(libs): drop exports implemented elsewhere
OQ-dzhlnM28, qBS714-Jr3g and tB59hFLH3SA are _sceLibcInternalThreadDtors,
_sceLibcInternalThreadAtexit and _sceLibcInternalForceTlsDestructor,
implemented in libSceLibcInternal by #641. dbOlWdppb4o is implemented by
#651.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:26:15 +02:00
Merijn 4a548c0ba5 feat(libkernel): implement sceKernelGetOperationMode
NH6xARDOVv8 is the NID of sceKernelGetOperationMode. PPSA12544 passes two
int outputs and logs them as mode and submode; both are reported as 0.
B2n8aDorSH4 and PZQhiiLXRFs are sceKernelSyncOnAddressWait32 and
sceKernelSyncOnAddressWait64, implemented by #633, and are no longer added
as unimplemented exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:25:52 +02:00
Merijn 8f6328242d feat(libs): add exports imported by PPSA12544
Implement scePthreadGetschedparam and scePthreadSetschedparam on top of
the thread priority, POSIX utimes and fsync on top of sceKernelUtimes
and sceKernelFsync, and sceUserServiceGetAccessibilityZoomFollowFocus
like the other accessibility queries. Add the remaining imports of
PPSA12544 as unimplemented exports and record unknown NIDs and
signatures in the technical debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:25:52 +02:00
Adrià Franch 4136a04ba7 feat(ulobjmgr): register and unregister object
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 19:25:46 +02:00
Adrià Franch f3e783b6cb feat(libs): implement sceNpTrophy2UnregisterUnlockCallback
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 19:14:49 +02:00
Merijn 67d2c3c0a3 feat(userservice): implement sceUserServiceGetAgeLevel
Report age level 0 for the initial user and reject other users and a null
output like the other user queries. The meaning of the value is unknown and
recorded in the technical debt; PPSA12544 only stores it for its user
profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:05:50 +02:00
Celegans12 d3e2e53a7c feat(videoout): accept the STRICT_COLORIMETRY buffer option
sceVideoOutRegisterBuffers2 and sceVideoOutSubmitChangeBufferAttribute2
threw for every buffer attribute option other than 0. PPSA26344 builds
its display buffers with option 8 through the libSceAgc helper linked
into it, so its first registration failed.

Option 8, VIDEO_OUT_BUFFER_ATTRIBUTE_OPTION_STRICT_COLORIMETRY (name
and value from KytyPS5), is now accepted and presented as option 0;
every other option still throws. What the console changes for it is
unknown and recorded in TechnicalDebt. The rejection now names the
tiling mode, pitch, aspect ratio and option it was given.

video_out_flip_tests decode checks that option 8 describes the same
buffer as option 0 and that options 1, 32 and 40 are rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:53:26 +02:00
Celegans12 e30336c815 feat(razor): implement sceRazorCpuPushMarkerStatic and sceRazorCpuPopMarker
Ghost of Yotei (PPSA26344) imports both functions, so its import
resolution failed at startup. Markers only feed an attached Razor
capture. AnyPS5 hosts none and sceRazorCpuIsCapturing reports 0, so,
like the other libSceRazorCpu exports, both do nothing and return 0.

The push signature comes from the title's calls (a string literal,
0x80ffffff, 2). TechnicalDebt lists both functions with the assumed
signatures. guest_razor_cpu covers nested and unbalanced markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 18:53:15 +02:00
boykopovar a4c290f50b
Merge pull request #644 from Celegans12/feat/psml-mfsr-unavailable
feat(psml): implement the MFSR 1100 calls for hardware without PSSR
2026-10-05 19:52:11 +03:00
Celegans12 15b191ef6a feat(systemservice): implement sceSystemServiceParamGetString
The export threw, and titles query the system name during startup.
Parameter 6 (the system name) now writes the fixed name "PS5" into a
buffer of at least SYSTEM_SERVICE_MAX_SYSTEM_NAME_LENGTH (65) bytes.
A null buffer or a zero size returns SYSTEM_SERVICE_ERROR_PARAMETER,
as in KytyPS5. Other parameter ids and buffers of 1 to 64 bytes still
throw, because no PS5 source gives their result. guest_system_service
covers the error rows, both throws and the returned name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:52 +02:00
Celegans12 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 <noreply@anthropic.com>
2026-10-05 17:51:47 +02:00
Celegans12 05dc3e8982 feat(npcommerce): implement sceNpCommerceSetPsStoreIconLayout
Titles set the PS Store icon layout before they show the icon, and a
title that imports the call stops at startup on the unresolved import.
No PS Store icon is drawn, so like the show and hide calls it accepts
every layout and returns 0 without effect. The signature follows
shadPS4 (a PS4 reference), which also returns OK for every layout.

The libSceNpCommerce entry under "Silent stubs" in TechnicalDebt now
names the function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:41 +02:00
Celegans12 09218ee68a feat(msgdialog): implement sceMsgDialogClose in libSceMsgDialog.native
A title that loads libSceMsgDialog.native without libSceMsgDialog
imports sceMsgDialogClose from it, so without the export it stops at
startup on an unresolved import.

Close turns a running dialog into a finished one and returns
NOT_RUNNING in every other state, as libSceMsgDialog's Close does.
The module keeps its own dialog status, so it cannot reuse that
export. Open in this module finishes the dialog at once, so Close
after Open returns NOT_RUNNING and leaves the result unchanged.

The module is now listed under silent stubs in TechnicalDebt, and a
CMakeLists.txt registers the guest_msg_dialog_native test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:38 +02:00
Celegans12 2dea7164e3 feat(libcinternal): run thread_local destructors at thread exit
A title's own libc.prx implements __cxa_thread_atexit and the
destructor pass of exit() through _sceLibcInternalThreadAtexit and
_sceLibcInternalThreadDtors. Its __cxa_finalize calls
_sceLibcInternalForceTlsDestructor.

Destructors are kept per thread and run newest first, including those
registered while they run, as FreeBSD's __cxa_thread_call_dtors does.
A null destructor or one outside every loaded image throws instead of
being skipped. The first registration installs the pass as the
libkernel thread exit hook, so it runs on every guest thread before
the thread can be joined. _sceLibcInternalForceTlsDestructor throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:35 +02:00
Celegans12 28b2a08fa7 feat(libkernel): implement sceKernelSyncOnAddressWait32 and sceKernelSyncOnAddressWait64
libc's __std_atomic_wait_direct_32 and __std_atomic_wait_direct_64
import these functions, so a libc.prx that contains the C++20 atomic
wait wrappers does not load without them. Wait32 compares a 4-byte
value and Wait64 the full 8-byte value. Both share the waiter queue
of sceKernelSyncOnAddressWait, so sceKernelSyncOnAddressWake releases
waiters of every size on the address. A null address, or one not
aligned to the value size, throws. The by-value comparand, the return
values and the 8-byte alignment of Wait64 are assumed and recorded in
TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:32 +02:00
Celegans12 d926e7879c feat(http): implement sceHttpParseStatusLine
Titles import sceHttpParseStatusLine from libSceHttp to read the
status line of a response; without the export they fail at startup.
Parse the HTTP/x.y version, the three-digit code and the reason phrase
up to the line feed, and return the library's PARSE_HTTP error codes.
The seven-argument signature is the one SharpProspero declares; the
behaviour follows the shadPS4 reimplementation of the PS4 library,
except that no byte past lineLen is read. A consumed count above
INT32_MAX cannot be returned and throws. guest_http covers valid lines
and each error path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:29 +02:00
Celegans12 5085746fce fix(libc): reach the application map area end with the guest arena
On Windows the guest arena ended at 0x72_0000_0000: #231 kept its
448 GiB size after #153 had moved its start down to 0x2_0000_0000.
Titles map fixed addresses up to the application map area end,
0xFC_0000_0000 (SCE_KERNEL_APP_MAP_AREA_END_ADDR on the PS4), and a
direct memory mapping above the old end threw "shared mapping outside
the guest arena".

The arena is now reserved up to 0xFC_0000_0000. The out-of-arena
errors name the address and length, and a fixed mapping over a used
arena range says whether it hit a host region. guest_memory maps
direct memory at the last two pages below the end, reads it through
an alias and checks that a mapping at the end is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:26 +02:00
Celegans12 0404752111 feat(audioout): implement sceAudioOut2Set3DLatency and accept sceAudioOut2MasteringInit(0)
PPSA26344 calls sceAudioOut2Set3DLatency(0xFF, 2) right after
sceAudioOut2Initialize and fails its audio initialization on a negative
return; the export was missing, so the import did not resolve. Its
audio subsystem setup also calls sceAudioOut2MasteringInit(0), which
threw.

sceAudioOut2Set3DLatency accepts a latency of 2 for the system user
(0xFF) and throws for any other user or latency, as the unit and range
are unknown. sceAudioOut2MasteringInit accepts flags 0 and throws for
other flags. There is no 3D rendering or mastering stage, so neither
call changes the output; TechnicalDebt lists this under Functional and
the assumed signatures under Unknown function info.

The new audio_out2_latency test covers the accepted and thrown values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:23 +02:00
Celegans12 9df0de2990 feat(agc): implement COND_EXEC
Validate refused every COND_EXEC, so a submission that uses one was
rejected as a whole. The packet now reads the dword at its address once
the earlier packets of its queue and their GPU writes have completed,
and skips the exec_count dwords after it when the dword is zero.

The command copy that inlines INDIRECT_BUFFERs records where each range
ends, so a range over an INDIRECT_BUFFER skips the whole buffer.
Unaligned addresses, address bits 48 and up, and reserved control and
count bits throw; the cache policy is accepted on compute queues only,
as the MEC defines it. A flip inside a range, a range that ends inside
a packet or past its command buffer, and a chained INDIRECT_BUFFER or
REWIND inside a range throw.

agc_driver_pm4 and agc_driver_flip cover the skips and the rejections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:11 +02:00
Celegans12 5e851fbb26 feat(agc): implement the interpolant mapping variant for high-half f16 inputs
PPSA26344 imports libSceAgc NID dbOlWdppb4o, whose name is unknown,
and calls it with the (regs, gs, ps) arguments of
sceAgcCreateInterpolantMapping to fill the 32 SPI_PS_INPUT_CNTL
registers. It is exported as sceAgcUnknownCreateInterpolantMapping.
It differs from sceAgcCreateInterpolantMapping only for inputs that
carry the high f16 half alone (is_f16 2): these take the default bit
and DEFAULT_VAL from the high half, as KytyPS5 does.

Both exports share validation and the register loop. More than 32
pixel shader inputs now throw; before, they were written past the
32-register block. agc_interpolant_mapping covers both exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:09 +02:00
Celegans12 73c68c04bd feat(agc): implement image atomics on 32_SINT and 32_FLOAT surfaces
The resource materializer refused every atomic image descriptor whose
format was not 32_UINT. RDNA2 image atomics act on the raw dword and
the numeric format only affects addressing, so 32_SINT and 32_FLOAT
surfaces are now accepted with the Uint numeric class and run through
the existing integer atomics and float compare-exchange loops. Other
formats still throw, and the message now names the format.

DescriptorBinding gains imageAtomic, carried through the shader disk
cache (format version 4) and the resource content key. The driver
binds those elements through a cached R32_UINT view of R32_SINT and
R32_SFLOAT storage images.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:06 +02:00
Celegans12 51c98a3983 fix(agc): store sceAgcGetIsTrinityMode's flag through its out pointer
sceAgcGetIsTrinityMode takes a pointer to a one-byte flag; the only
known caller ignores the return value. The export took no argument and
never wrote the flag. That caller's flag is in zero-initialised .bss,
so this corrects the signature; it does not fix a visible failure.

The function now stores false, as sceKernelIsTrinityMode reports a base
PS5, returns 0 and throws on a null pointer, whose error code is
unknown. It moves from Unimplemented.cpp to Misc/src/Platform.cpp, and
the new agc_platform_tests ctest target covers it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:51:03 +02:00
Celegans12 2eff3c8386 feat(agc): accept linear attribute clipping in PA_CL_CLIP_CNTL
DecodeState and the draw precheck rejected PA_CL_CLIP_CNTL bit 24
(DX_LINEAR_ATTR_CLIP_ENA), so every draw that sets it was skipped.
Vulkan requires clipped NoPerspective outputs to vary linearly in
framebuffer space, and RADV and radeonsi set this bit for every draw
they emit. With the bit set the console therefore clips the way the
host driver already does, and the pipeline needs no extra state.
Clip space, depth clamping and the viewport depth range decode as
with the bit clear. Every other unsupported bit still rejects the
draw, with or without bit 24.

TechnicalDebt records that a clear bit, which was already accepted,
gets the same clipping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 17:50:57 +02:00
Nahuel Genchi 22dad020b0 docs: record the fused assumption of v_fma_legacy_f32 in TechnicalDebt 2026-10-05 10:34:45 -03:00
Dean af92452ff6
Merge pull request #631 from DotDebian/feat/npcppwebapi-intrusive-ptr
feat(libs): implement NpCppWebApi IntrusivePtr construction, copy, release and access
2026-10-06 02:33:43 +13:00
Dean caf24225aa
Merge pull request #630 from DotDebian/feat/npcppwebapi-common-string
feat(libs): implement NpCppWebApi Common::String constructor, destructor and c_str
2026-10-06 02:33:32 +13:00
Dean 4c57426b51
Merge pull request #501 from adriadam10/fix/vop3-legacy-mods
fix(shader): v_mullit_f32 legacy rules, v_cvt_pk_u8_f32 rounding and VOP3 neg/abs
2026-10-06 02:32:06 +13:00
Akhil Moola 5202199684 fix(agc): emulate comparison sampling of color textures in the shader
AMD hardware compares a sample_c reference against a color texture's red
channel; Vulkan defines comparison sampling only for depth formats, so the
driver refused any compare-sampled texture that is not R32 float or R16
unorm. PPSA21567 compares the same LESSEQUAL, clamp-to-border (opaque
white) sampler against a shadow map and against a 1x1 RGBA8 texture.

For a compare-sampled image whose format is not natively comparable, the
specialization records the paired sampler's compare function, filter,
addressing and border, and the view's reference clamp kind; the image then
binds as an ordinary color texture. The backend fetches the red channel,
applies wrap, clamp-to-edge or clamp-to-border addressing with the
sampler's texel-centre convention (border taps take the border's red),
compares, and blends four comparisons for bilinear filtering. Real depth
formats keep the native path.

Only sample_c / sample_c_lz on 2D and 2D array views, float/unorm/snorm
formats, wrap, clamp-to-edge or clamp-to-border, point or bilinear at one
level are implemented; half-border, the border color table and everything
else on this path throw. The reference clamp for unorm/snorm color formats
is not documented by AMD and is recorded in the technical debt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 06:55:03 -06:00
DotDebian f2fb7852bb feat(libs): implement NpCppWebApi IntrusivePtr construction, copy, release and access
IntrusivePtr<T> is three pointers: object, deleter, LibContext. The default
constructors zero them, the copy constructors copy them and take a reference
on the object, operator-> and operator* return the object, and the destructors
drop a reference and hand the object to the deleter when it was the last one.
The last-reference release of a pointer without a deleter needs the object's
destructor and the LibContext memory pool and still throws.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 11:18:39 +02:00
Dean 8c906ca985
Merge pull request #622 from DotDebian/feat/agc-dcb-prime-utcl2
feat(agc): implement sceAgcDcbPrimeUtcl2 and its size query
2026-10-05 22:13:30 +13:00
DotDebian 6a20036154 feat(libs): implement NpCppWebApi Common::String constructor, destructor and c_str
The constructor was a silent stub that left the guest object
uninitialised and c_str threw. The constructor now writes the 0x20-byte
object, c_str returns the buffer or an empty string, and the destructor
throws for a non-null buffer, whose release needs the LibContext
allocator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 11:12:56 +02:00
Dean d0cf2a408c
Merge pull request #624 from DotDebian/feat/audioout-get-last-output-time
feat(libSceAudioOut): implement sceAudioOutGetLastOutputTime
2026-10-05 22:05:30 +13:00
Dean 93fb226496
Merge pull request #621 from DotDebian/feat/font-get-pixel-resolution
feat(font): implement sceFontGetPixelResolution
2026-10-05 22:04:06 +13:00
Adrià Franch 9e6362dc71 docs: record the MODE assumption of v_mullit_f32 in TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 10:53:50 +02:00
DotDebian 63711450f4 feat(libSceAudioOut): implement sceAudioOutGetLastOutputTime
Report the process time at which sceAudioOutOutput or sceAudioOutOutputs
accepted the port's last block. A port that never output reports 0, and
waiting with a null pointer does not move the time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:25:30 +02:00
DotDebian c0d293ff7b feat(font): implement sceFontGetPixelResolution
Report the sub-pixel resolution of the library's driver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:05:31 +02:00
DotDebian 9837c69f0d feat(agc): implement sceAgcDcbPrimeUtcl2 and its size query
The DCB variant threw "not implemented" while the ACB one wrote a
5-dword packet. Both now go through Agc::Command::WritePrimeUtcl2 and
the size query returns 20 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:05:28 +02:00
DotDebian 992933b95c feat(libc): implement snwprintf_s
Format through the shared wide formatter, truncate to the buffer and
return the full length, as C11 K.3.9.1.3 specifies. A null buffer or
format, a zero or oversized n, %n and a null %s argument are
runtime-constraint violations that return a negative value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 09:59:30 +02:00
Adrià Franch 1cc11cee57 feat(shader): accept tfe and lwe on MIMG loads, stores and samples
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 08:25:57 +02:00
Dean 7db3e55c6a
Merge pull request #591 from hamb3r/fix/avplayer-decode-ahead
fix(avplayer): add decode-ahead buffers for application video output
2026-10-05 18:13:18 +13:00
Dean 0087fb6369
Merge pull request #567 from adriadam10/fix/f32-omod-zero
fix(shader): apply the f32 output modifier on the bits like the hardware
2026-10-05 18:07:22 +13:00
Dean dbfdcb1c79
Merge pull request #537 from adriadam10/test/vop1-float-unary
fix(shader): choose unary f32/f16 special results on the bits, as RDNA does
2026-10-05 18:06:40 +13:00
Nicolas Abosch 043332ba32 docs(ult): avoid overlapping AvPlayer debt note 2026-10-05 00:57:02 -03:00
Nicolas Abosch 65c139336e feat(ult): implement blocking queues and shared data pools 2026-10-05 00:52:22 -03:00
Adrià Franch b5da7d00e4 fix(shader): apply the f32 output modifier on the bits like the hardware
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 05:00:29 +02:00
Dean 00407df8a9
Merge pull request #585 from Raghav314/feat/ajm-batch-job-queries
feat(ajm): implement DecodeSingle, GetGaplessDecode and GetCodecInfo
2026-10-05 15:54:58 +13:00
Nicolas Abosch e08333825f test(agc): validate pixel LDS and expose pipeline statistics 2026-10-04 23:04:39 -03:00
hamb3r cf10b5e609 fix(avplayer): make decode-ahead buffers optional 2026-10-05 04:58:00 +03:00
Adrià Franch f3b74e2cef fix(shader): choose unary f32/f16 special results on the bits, as RDNA does
v_ceil/floor/trunc/rndne/fract/sqrt/rsq/rcp/rcp_iflag/log/exp/sin/cos
(f32 and f16) and v_frexp_mant_f32 left NaN, invalid, zero and infinite
results to the driver: signalling NaNs came back unquieted, lavapipe lost
the NaN sign and payload, invalid results were +NaN instead of -NaN, f32
sin/cos at whole and half cycles returned tiny values instead of +0, and
v_fract_f16 of a tiny negative rounded up to 1.0.

Adds an execution test for the 27 opcodes with expected values from
hardware; approximate ops are compared with tolerances from the Vulkan
precision table.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 03:38:12 +02:00
Dean 70596d78eb
Merge pull request #577 from CnRJay/feat/s-getreg-mode
feat(shader): implement s_getreg_b32 for the MODE round mode fields
2026-10-05 14:29:24 +13:00
raghav314 77e2fe1322 docs(ajm): record where the codec info and gapless values come from 2026-10-05 06:58:23 +05:30
Dean ec46678f61
Merge pull request #588 from DotDebian/feat/relinker-sha1-memory-operand
feat(relinker): lower SHA-1 instructions with a memory operand
2026-10-05 14:24:22 +13:00
Dean 65b750aee6
Merge pull request #592 from DotDebian/fix/pngenc-filter-subset
fix(pngenc): restrict adaptive filtering to the requested filter subset
2026-10-05 14:23:41 +13:00
Dean 18d9745de4
Merge pull request #584 from DotDebian/feat/font-get-render-scaled-kerning
feat(font): implement sceFontGetRenderScaledKerning
2026-10-05 14:23:00 +13:00
Dean 4ae4f53ffb
Merge pull request #338 from Pouare514/feat/prx-loader-tripwires
feat(prx): unknown loader tripwires for TLOU
2026-10-05 14:22:18 +13:00
Dean 8387b4da51
Merge pull request #573 from CnRJay/feat/ds-atomics-64
feat(shader): implement the 64-bit LDS atomics
2026-10-05 13:26:22 +13:00
Dean e440e2c22b
Merge pull request #579 from CnRJay/fix/ampr-wait-signatures
fix(libs): take the AMPR wait and counter signatures from ampr_emu
2026-10-05 13:20:59 +13:00
Pouare514 ac7bc704c3 fix(prx): export tripwire NIDs under recomputed real names, restore main's hunks 2026-10-05 02:13:22 +02:00
Pouare514 66a95ada20 feat(prx): unknown loader tripwires for TLOU 2026-10-05 02:12:32 +02:00
DotDebian bfe9bf9af4 fix(pngenc): restrict adaptive filtering to the requested filter subset
A filter_type naming a subset of the PNG filters used only the first
filter of the mask, because stb's writer is either fully adaptive or
forced to one filter. Decoder::Png::Encode now takes the set of allowed
filter types, filters the rows and writes the chunks itself, and keeps
stb for deflate only. Output for the all-filters and single-filter
cases is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:08:31 +02:00
DotDebian e11b4b5554 feat(relinker): lower SHA-1 instructions with a memory operand
SHA1RNDS4/NEXTE/MSG1/MSG2 with a memory source made `--to-intel` fail
the whole relink. The stub now spills a scratch xmm, loads the operand
into it with the unaligned load already used for SHA-256 and runs the
register-form lowering. The SHA1RNDS4 immediate is read after the SIB
byte and displacement. RIP-relative operands still fail: the stub runs
at a different address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 02:02:13 +02:00
Chad 7030c57393 Merge remote-tracking branch 'upstream/main' into feat/ampr-nop-04-writes
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-04 18:49:51 -05:00
DotDebian 52c13a0bde feat(font): implement sceFontGetRenderScaledKerning
Return the kerning between two character codes at the render scale of
the font, the one set by sceFontSetupRenderScalePixel and
sceFontSetupRenderScalePoint, and fail with NOT_BOUND_RENDERER when no
renderer is bound. sceFontGetKerning keeps its behaviour and shares the
FreeType lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:49:49 +02:00
Dean b5d54c9db8
Merge pull request #578 from DotDebian/feat/ajm-dec-mp3-parse-frame
feat(ajm): implement sceAjmDecMp3ParseFrame
2026-10-05 12:49:23 +13:00
Chad e3f18eec00 Merge remote-tracking branch 'upstream/main' into fix/ampr-wait-signatures
# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-04 18:49:15 -05:00
Chad 6f5cb736ae fix(libs): match the AMPR 04_00 measure checks of ampr_emu
The WriteAddressFromCounter_04_00 measure checks only the address and the
counter pair measure only the address and an even start, as in ampr_emu.
TechnicalDebt records that AMPR commands are larger than the console
records, which affects titles that pad with Nop to an exact offset, and
that the at-start flag of the 04_00 writes is ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:48:45 -05:00
Dean d5cf8a0add
Merge pull request #558 from Phi1ow/implement-error-dialog
feat(errordialog): implement the libSceErrorDialog state machine
2026-10-05 12:48:20 +13:00
Chad 53928c712e docs: record that s_getreg_b32 reads round to nearest even after s_setreg_b32
s_setreg_b32 has no effect, so a read of the MODE round fields after it
wrote another mode still reports round to nearest even, the rounding the
recompiled code uses. The refused HW_ID test row is named as hardware
register 4, which has no name on gfx10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:48:04 -05:00
Dean 221ea3c0bd
Merge pull request #535 from DotDebian/feat/audioout-set-mix-level-pad-spk
feat(libSceAudioOut): implement sceAudioOutSetMixLevelPadSpk
2026-10-05 12:47:38 +13:00
Dean f83ee125ce
Merge pull request #516 from Pouare514/fix/tlou-rtc
fix(libs): TLOU sceRtcParseDateTime ISO 8601 subset parser
2026-10-05 12:46:14 +13:00
Chad 1566e1b397 feat(agc): implement packet and range predication and the predication sizes
sceAgcSetPacketPredication sets or clears the predicate bit of a type-3
packet header, and sceAgcSetRangePredication does so for every type-3
packet between two addresses, skipping type-2 fillers. The z-pass, bool
and disable predication size queries return the size of the
SET_PREDICATION packet sceAgcDcbSetPredication writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:35:47 -05:00
Chad a583dc7116 fix(libs): reject odd AMPR counter pairs and invalid write addresses
As in ampr_emu, a counter pair starts at an even counter, and the write
commands take a non-null, 8-byte aligned address; others return EINVAL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:27:00 -05:00
Chad 5018b69fba fix(libs): take the AMPR wait and counter signatures from ampr_emu
sceAmprCommandBufferWaitOnAddress took (address, reference, mask,
compare) and WaitOnCounter (counter, reference, compare), and both read
the compare value as WAIT_REG_MEM (0 always, 1 <, 2 <=, 3 ==, ...).
ampr_emu, which replaces libSceAmpr for retail titles on the console,
has (address, reference, compare, flush) and (counter, reference,
compare, flush) with the SCE compare values (0 ==, 1 > unsigned,
2 < unsigned, 3 !=), so waits were decoded as other comparisons and
could block forever or pass early.

WriteAddressFromCounterPairOnCompletion takes one counter index, not
two, and WriteKernelEventQueueOnCompletion an int id and no user data.
Counter indices above 127, compare values above 3, flush values above 1
and misaligned wait addresses return EINVAL, as in ampr_emu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:25:45 -05:00
DotDebian f99be7e4d3 feat(ajm): implement sceAjmDecMp3ParseFrame
Read the MPEG audio frame header and report the frame size, channel
count, samples per channel, bitrate and sample rate. The signature,
the result layout and the rate tables follow shadPS4's reimplementation
of the PS4 library. Requesting the original file length throws: that
lookup is not implemented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 01:24:18 +02:00
Chad d78eea1f5f feat(shader): implement the 64-bit LDS atomics
ds_add/sub/rsub/inc/dec_u64, ds_min/max_i64/u64, ds_and/or/xor/mskor_b64,
ds_cmpst_b64/f64, ds_min/max_f64, their _rtn forms and ds_wrxchg_rtn_b64
threw in the decoder.

LDS is a 32-bit workgroup array, so the two dwords are read and written
under a lock dword placed after the guest LDS, which is cleared with a
workgroup barrier at entry. The lock is acquired and released in the same
loop iteration, so lanes of one subgroup cannot deadlock on it. Stages
whose LDS is a function variable update it directly. 64-bit GDS atomics
throw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:14:24 -05:00
Pouare514 e67d50cb2f fix(libs): route DateTime zone suffix through RFC3339 path, throw on unverified shapes 2026-10-05 01:10:25 +02:00
DotDebian 9a652bf82c docs(libSceAudioOut): record the pad speaker mix level as an assumed gain
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 00:55:11 +02:00
Dean 1bc945c1e5
Merge pull request #489 from oneandonlydean/feat/audiopropagation-source-render
feat(libSceAudioPropagation): render silence for propagated sources
2026-10-05 11:44:05 +13:00
Dean d1b8565d74
Merge pull request #482 from ThisIsAkill/feat/audiopropagation-no-propagation
feat(libSceAudioPropagation): implement the no-acoustic-propagation path with recovered signatures
2026-10-05 11:43:24 +13:00
Dean b44b308c53
Merge pull request #333 from adriadam10/feat/sopk-misc
feat(shader): implement s_cmovk_i32, s_version and s_setreg_imm32_b32
2026-10-05 11:41:47 +13:00
Phi1ow 6571ace5bd feat(errordialog): log the error code and record the silent stub
Adds the dialog to the silent-stubs list in docs/dev/TechnicalDebt.md, since it finishes without
showing anything. sceErrorDialogOpen now logs the error code and user id from the parameter
(offsets 4 and 8), like libSceMsgDialog logs its message, so an error a title would have shown
the player stays visible instead of disappearing.
2026-10-05 00:32:13 +02:00
Dean c457e756a5
Merge pull request #538 from DotDebian/feat/ampr-command-buffer-markers
feat(ampr): implement the command buffer markers
2026-10-05 10:23:03 +13:00
DotDebian 638d3802ad feat(ampr): implement the command buffer markers
sceAmprCommandBufferPushMarker, PushMarkerWithColor, PopMarker, SetMarker
and SetMarkerWithColor record a marker command, and the matching
sceAmprMeasureCommandSize functions return its size. The APR executor
skips markers, as it does a nop.

Signatures follow the ampr_emu reimplementation of libSceAmpr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 18:10:16 +02:00
DotDebian 2452ffcb3f feat(libSceAudioOut): implement sceAudioOutSetMixLevelPadSpk
The mix level is a linear gain on the pad speaker port, 32768 being 0 dB.
A pad speaker port opens at 11626 (-9 dB). An unknown handle, a port of
another type and a level above 0 dB return the AudioOut error codes; a
negative level throws, as its effect is unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 17:51:25 +02:00
Pouare514 af20824af4 fix(libs): TLOU sceRtcParseDateTime ISO 8601 subset parser 2026-10-04 16:30:14 +02:00
Pacuka 3e5648dcf7 fix(ajm): refuse Opus rates other than 48 kHz and record the parameter layout as unknown
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 14:28:19 +02:00
Adrià Franch fc00228938 docs: add architecture overview with Mermaid diagrams
Two diagrams in docs/dev/ARCHITECTURE.md: how the relinker and the NID-patched system libraries produce a native program, and the graphics path from command buffers through the shader recompiler to Vulkan. README only gains a link.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 11:20:38 +02:00
Adrià Franch 6ea9750bf3 refactor(shader): read f64 operands through readF64Bits and record the v_fma_f64 subnormal gap
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 08:52:14 +02:00
Adrià Franch eff7af93d4 fix(shader): translate s_setreg_imm32_b32 only for round to nearest even in MODE
Any other field or value throws. The existing s_setreg_b32 no-op is
recorded under Functional technical debt instead of silent stubs.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 08:28:52 +02:00
Adrià Franch f994cc6ab7 feat(shader): implement s_cmovk_i32, s_version and s_setreg_imm32_b32
s_cmovk_i32 writes the sign-extended 16-bit immediate when SCC is set.
s_version is a no-op marker. s_setreg_imm32_b32 takes its value from a
literal dword and is ignored like s_setreg_b32; both are now listed as
silent stubs in TechnicalDebt.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 08:26:58 +02:00
Dean Galvin be3f06bfe8 feat(libSceAudioPropagation): render silence for propagated sources
sceAudioPropagationSourceRender takes the system, an array of RenderInfo
descriptors and their count: PPSA21564 and PPSA21567 pass one RenderInfo
{0x010107d6, 0x30} per call, with the source handle at +0x10, its output
buffer at +0x18, the buffer size in bytes at +0x20 and the word 2 at
+0x28, once per audio grain for each propagated source.

Without acoustic propagation a source contributes nothing, so each
output buffer is zeroed for its size. Every RenderInfo is checked first
(descriptor, a live source of this system, a non-empty output), and a
count of 0 or a format word other than 2 throws, as neither has been
observed.
2026-10-04 19:26:06 +13:00
Adrià Franch d43a5487ca docs: SHA-256 memory operands now relink except RIP-relative ones
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-04 08:22:02 +02:00
QDarkRex 9642d1b3b0 fix(relinker): add icons to generated Windows executables 2026-10-04 10:29:20 +07:00
Dean Galvin 097566d547 fix(relinker): lower VRSQRTPS and VRCPPS to correctly rounded results for --to-intel
RSQRTPS and RCPPS are approximations whose low bits differ between Intel
and AMD. Intel returns 0x3F7FF000 for 1/sqrt(1.0), and two Newton-Raphson
steps on it settle on 0.99999994 instead of 1.0. PPSA21564 renormalises
its spring quaternions that way: an identity quaternion keeps w at
0.99999994 with a zero axis, its axis-angle conversion then normalises the
zero axis into NaNs, and the NaN bone poses reach keyframed physics bodies.
A NaN body later moves to an invalid broadphase cell and the game crashes
a few seconds into its hub level.

--to-intel now replaces the VEX.128 register forms with an out-of-line stub
that computes 1/sqrt(x) with SQRTPS and DIVPS (1/x with DIVPS), keeping
the upper half of the destination cleared and the scratch register intact.
A site with no room for the jump, including one followed by a branch
target or a RIP-relative instruction, keeps the native instruction and is
reported as kept instead of failing the relink.
2026-10-04 14:40:16 +13:00
Dean 40a9e455ea
Merge pull request #430 from adriadam10/feat/relinker-sha1-lowering
feat(relinker): lower SHA-1 instructions for --to-intel
2026-10-04 14:14:08 +13:00
Akhil Moola ac66e70882 feat(libSceAudioPropagation): implement the no-acoustic-propagation path with recovered signatures
The 22 exports used by PPSA21567 take the call shapes recovered from its
call sites (#481): destroys take the system and the object, attribute
setters take a count, SourceCreate takes only an output handle,
UnregisterMaterial only the material.

The system lives in the title's CPU memory (16-byte header, no GPU memory)
and its handle is that address; rooms, portals, sources and materials are
counter handles. Attributes are validated and have no effect; no rays are
requested and sources report no audio paths. Non-empty ray results, path
calculation and audio paths throw, SourceRender stays unimplemented, and
invalid input throws because no error code is known. Objects left when
their system is destroyed become unusable; their later destroy or
unregister is a no-op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 15:28:36 -06:00
Alexey e1bfb3973f
Merge pull request #364 from DotDebian/feat/pthread-barrierattr
feat(libkernel): implement the pthread_barrierattr functions
2026-10-03 11:01:01 +03:00
Alexey 29a8d01c83
Merge pull request #297 from oneandonlydean/fix/videoout-open-param-service-thread
fix(videoout): read the open param as the service thread's priority and affinity
2026-10-03 09:46:25 +03:00
Adrià Franch 71ca3ff4b8 feat(relinker): lower SHA-1 instructions for --to-intel
SHA1RNDS4, SHA1NEXTE, SHA1MSG1 and SHA1MSG2 passed through --to-intel
unchanged, so a relinked title that executes them faults on Intel CPUs
without SHA-NI. Their register forms are now lowered out of line with
SSE2 only through the shared stub builder; short sites share stubs via
MatchSequence. Memory forms fail the relink with the file offset, as for
SHA-256.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-03 07:40:41 +02:00
boykopovar d098840dbc
Merge pull request #307 from oneandonlydean/feat/avplayer-ffmpeg
feat(avplayer): decode H.264 and AAC with FFmpeg
2026-10-02 23:07:49 +03:00
boykopovar 11814ad660
Merge pull request #349 from DotDebian/feat/sync-on-address
feat(libkernel): implement sceKernelSyncOnAddressWait and sceKernelSyncOnAddressWake
2026-10-02 22:31:45 +03:00
Dean Galvin b62d02c2af feat(avplayer): decode H.264 and AAC with FFmpeg
Replace the decoder-less AvPlayer with a player that demuxes MP4 sources
with FFmpeg (opened by path or through the title's file replacement),
decodes H.264 and AAC on their own threads, and hands out NV12 frames and
interleaved 16-bit PCM in buffers from the title's allocators, presented
on a media clock that audio drives when it is enabled.

Both libSceAvPlayer and libSceAvPlayer.native are built from the same
sources and link the shared ffmpeg target. The struct size checks stay,
next to the types in SceTypes.hpp. ChangeStream and GetStreamInfoEx are
implemented; Init without allocators, StartEx, SetAvailableBandwidth,
SetLogCallback and negative trick speeds succeed as before and are listed
in TechnicalDebt. HLS sources throw.

guest_avplayer plays an embedded 6 KB MP4 (H.264 plus two AAC tracks).
2026-10-03 08:10:55 +13:00
boykopovar 1cc9874ac1
Merge pull request #227 from adriadam10/feat/png-enc
feat(libScePngEnc): implement PNG encoding
2026-10-02 22:08:05 +03:00
boykopovar 545b137097 docs(usage): add relinker usage md doc 2026-10-02 21:50:35 +03:00
boykopovar ee6a4a00f4 docs(build): add prject build md instruction 2026-10-02 21:40:38 +03:00
DotDebian b279848c12 feat(libkernel): implement the pthread_barrierattr functions
pthread_barrier_init threw for any non-null attributes object, and no
function could create one. Add pthread_barrierattr_init, _destroy,
_getpshared and _setpshared after FreeBSD libthr, and let
pthread_barrier_init take the object.

PTHREAD_PROCESS_SHARED still throws in pthread_barrierattr_setpshared:
FreeBSD 9.0 rejects it and 11.0 accepts it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 17:08:07 +02:00
boykopovar 313de1c5a3
Merge pull request #289 from SP4C3B4R-8/feat/missing-exports
feat(libs): declare missing AudioPropagation, AudioIn, NpSessionSignaling and dialog exports
2026-10-02 16:51:14 +03:00
DotDebian ba512363b1 feat(libkernel): implement sceKernelSyncOnAddressWait and sceKernelSyncOnAddressWake
sceKernelSyncOnAddressWait parks the calling thread while the 32-bit word
at the address still holds the expected value, until
sceKernelSyncOnAddressWake releases it or the timeout expires.
sceKernelSyncOnAddressWake releases up to the requested number of threads
parked on the address, in arrival order.

The libc.prx bundled with SDK 9 titles imports both for its once
primitive, so those titles stopped at load with an unresolved import.

# Conflicts:
#	docs/dev/TechnicalDebt.md
2026-10-02 16:49:44 +03:00
DotDebian 74fcea27f8 feat(libkernel): implement sceKernelMapNamedFlexibleMemoryInternal
libkernel did not export sceKernelMapNamedFlexibleMemoryInternal, which
the libc bundled with SDK 9 titles imports. It now forwards to
sceKernelMapNamedFlexibleMemory: the mapping counts against the flexible
budget, gets the range name and is released by sceKernelMunmap. Older
libc builds call the public function at the same sites with the same
arguments and result handling.

The known callers pass flag 0x8000, whose meaning is unknown. It is
still rejected as an unsupported mapping flag and is recorded in
TechnicalDebt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 14:08:58 +02:00
Dean Galvin 151fec7fd6 fix(videoout): read the open param as the service thread's priority and affinity
and throws for any non-zero word after it. Its layout matches shadPS4's
ServiceThreadParams instead: an unknown first word (16), a set-priority flag
and a priority (256..767), a set-affinity flag and a 64-bit CPU mask at
offset 16. PPSA21564 passes 16, 1, 0x100, 1 and 0x1FFF, so it stops at
startup on main.

sceVideoOutOpen now validates each field and reads the mask only when its
flag is set, so a 16-byte param with both flags clear still works. The
priority and affinity are not applied, since the present and vblank threads
are host threads; this and the unknown first word are listed in the
technical debt.
2026-10-02 21:05:25 +13:00
Adrià Franch 58f90eea9d feat(libScePngEnc): implement PNG encoding
scePngEncQueryMemorySize, scePngEncCreate, scePngEncEncode and
scePngEncDelete encode R8G8B8A8 and B8G8R8A8 images with a pitch into
RGB or RGBA PNGs using the shared encoder in core/Decoder/Png.
Decoder::Png::Encode takes optional compression level and filter
options so the encode parameters are honoured.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-02 10:00:32 +02:00
Adrià Franch 569c2ec56c feat(libSceAudiodec): decode MP3, M4AAC and ATRAC9
All six exports are implemented: MP3 and AAC (ADTS or raw blocks) are
decoded with the bundled FFmpeg and ATRAC9 with LibAtrac9, one unit per
call, into interleaved S16 or float PCM, with the libSceAudiodec
validation and error codes. libSceAudiodec.native is built from the same
sources.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-02 09:22:59 +02:00
SP4C3B4R-8 d56ce19531 docs: record unknown NIDs of the newly declared exports
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:44:31 +02:00
Michon 04691c0797 feat(libs): offline services GTA V reaches in Story Mode
Sign-in, web browser and player dialogs finish cancelled; the message dialog finishes at once;
NpAuth, entitlement consumption, reachability, account age and the NpUtility bandwidth test
report signed out; sceKernelMtypeprotect changes the protection (the memory type has no host
equivalent); the APR ForEach resolvers resolve every path and report each failure in its own
result entry. vswprintf's stub is dropped in favor of the existing wide-formatter
implementation, which already covers it on every platform.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-01 23:21:54 +02:00
boykopovar e0f7866205
Merge pull request #223 from adriadam10/feat/http2-ssl-stubs
feat(libSceSsl): implement CA certificate queries and sceHttp2AbortRequest
2026-10-01 21:52:19 +03:00
boykopovar 0567aca352
Merge pull request #225 from adriadam10/feat/keyboard-key2char
feat(libSceKeyboard): implement the keyboard library
2026-10-01 21:50:25 +03:00
boykopovar 1ffaa66173
Merge pull request #215 from julienlgy/feat/lib-sce-hmd-stub
feat(libSceHmd): add a disconnected-headset HLE stub
2026-10-01 21:28:09 +03:00
Adrià Franch 63501b6d73 feat(libSceKeyboard): implement the keyboard library
Keyboard input follows libSceMouse: the video out event loop forwards SDL
key and focus events, whose scancodes are USB HID usages, and the library
keeps the pressed keys, modifiers and lock LEDs in a 16-entry history for
sceKeyboardRead and a snapshot for sceKeyboardReadState.
sceKeyboardGetKey2Char translates the 101-key arrangement; the 106-key
one throws and is listed as technical debt.

KeyboardData holds 16 key codes (96 bytes), not 6.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 19:00:23 +02:00
Adrià Franch c548cd25b7 feat(libSceSsl): implement CA certificate queries and sceHttp2AbortRequest
sceSslGetCaCerts reports that no CA certificates are available and
sceSslFreeCaCerts clears the structure, in line with the library's
no-network behaviour. sceHttp2AbortRequest succeeds like
sceHttpAbortRequest. sceSslClose and sceSslGetSerialNumber keep throwing
and are listed as unknown signatures.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-01 18:35:02 +02:00
julienlgy 0c4dace39e feat(libSceHmd): add a disconnected-headset HLE stub 2026-10-01 14:18:10 +02:00
ljkx d54dfb1595 fix(relinker): ignore a REX prefix that is followed by another prefix
In 64-bit mode a REX prefix only takes effect when it immediately
precedes the opcode; a REX followed by a legacy prefix or another REX is
ignored. The instruction decoder, the rewriter's reference classifier,
DecodedInstruction and the SSE4a, SHA-256 and CLZERO operand decoders
read legacy prefixes and then at most one REX. `48 F3 0F 2B 00`
(MOVNTSS) was therefore scanned as `[48 F3][0F 2B 00]` and kept, and
`48 67 0F 01 FC` lost its address-size prefix.

All of them now accept REX bytes among the prefixes and keep only one
that directly precedes the opcode. The converter's guard against
prefix-only fragments is removed, since the decoder no longer produces
them, and the TechnicalDebt entry describing the split is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 13:09:11 +02:00
ljkx 09cb86b076 feat(relinker): lower CLZERO for --to-intel
Lower CLZERO out of line instead of failing the relink: the 64-byte line
containing rAX (EAX with 67h) is cleared with four MOVNTDQ stores of
zero, the same non-temporal, weakly ordered store. The line address is
masked in xmm0 so RFLAGS stays untouched; xmm0 and rcx are spilled below
the red zone. Short sites share stubs through MatchSequence. CLZERO with
LOCK, an FS/GS override, a 66/F2/F3 prefix or longer than 15 bytes fails
the relink.

The decoder splits a REX followed by another prefix into a separate
instruction, which would hide a prefix that changes what CLZERO or the
next instruction does. The converter now fails the relink when such a
prefix-only fragment directly precedes an AMD-only instruction or would
be moved into a stub as a trailing instruction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:30:35 +02:00
ljkx f994b4f89f feat(relinker): lower MONITORX and MWAITX for --to-intel
Replace MONITORX with a NOP and MWAITX with PAUSE in place, padded with
NOPs to the original length, instead of failing the relink. MWAITX may
return before its timer or a store to the monitored line, and without an
armed monitor it does not wait, so callers already re-check their
condition; the replacement takes that path every time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 10:35:23 +02:00
ljkx e66b0b34d7 feat(relinker): lower SHA-256 instructions for --to-intel
Lower SHA256RNDS2, SHA256MSG1 and SHA256MSG2 (register forms) out of line
with legacy SSE2 instructions only, so relinked code no longer needs
SHA-NI. Consecutive short SHA-256 and SSE4a sites share one stub. The
SSE4a stub builder moves to StubBodyBuilder for reuse; IsShaNi now also
recognises SHA256RNDS2 (0F 38 CB). Memory operand forms fail the relink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 00:20:43 +02:00
boykopovar c71be475fc
Merge pull request #187 from MichonGoddijn231849/feat/demons-souls-exports
feat: export the AMPR command buffer waits and writes, sceAgcFuseShaderHalves, sceAgcSetSubmitMode, sceNpSessionSignalingCreateContext and sceNetEpollAbort
2026-09-30 22:03:54 +03:00
boykopovar 60bd808132
Merge pull request #185 from ljkx/feat/insertq-register-form
feat(relinker): lower register-form INSERTQ
2026-09-30 19:37:18 +03:00
Michon 2b5f2d32d3 feat: export the AMPR command buffer waits and writes, sceAgcFuseShaderHalves, sceAgcSetSubmitMode, sceNpSessionSignalingCreateContext and sceNetEpollAbort
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 18:19:55 +02:00
ljkx 9d110245fe feat(relinker): lower register-form INSERTQ
Lower INSERTQ xmm1, xmm2 (F2 0F 79) out of line with SSE2 only instead of
failing the --to-intel relink. Length and index are read from bits 69:64
and 77:72 of the source; dst[127:64] is zeroed as on hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:18:02 +02:00
MartinCajiao 671b8c6291 feat(relinker): support Intel trampolines in guest modules 2026-09-29 18:24:00 -05:00
Julien Legay a7b22a61fd docs: move PR description out of repository and record dialog stub 2026-09-29 19:08:51 +03:00
Qznad 6ef4ae3cec fix(jpegenc): hide shared encoder symbols and document grayscale output 2026-09-29 15:17:27 +01:00
Qznad aad41aa907 feat(jpegenc): encode images through the shared JPEG encoder 2026-09-29 15:17:27 +01:00
boykopovar 00261033fa refactor(docs): separated user and dev in docs + compatibility file 2026-09-28 22:58:17 +03:00