Commit Graph

431 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Pouare514 4fcfd3c2b3 feat(prx): stub TextToSpeech2, Vdecsw and Coredump unknown exports 2026-10-07 15:42:04 +02: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
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
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