Commit Graph
6138 Commits
Author SHA1 Message Date
MerijnandClaude Opus 5.5 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 <[email protected]>
2026-10-07 21:53:21 +02:00
MerijnandClaude Opus 5.5 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 <[email protected]>
2026-10-07 21:51:53 +02:00
MerijnandClaude Opus 5.5 9a48adb051 fix(appcontent): report no download data space without a declared area
sceAppContentDownloadDataGetAvailableSpaceKb threw when param.json declares
no download data area. A title without one has no space there: Unity's
player (PPSA12544) queries it at startup, treats an error or 0 as no space
and logs 'persistentDataPath / DownloadData has no space available, check
"Download Data Area Size" in SDK Param Editor'. It now reports 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 21:51:53 +02:00
popcoder565 fb7be867c5 fix(tools): resolve documentation links as repository paths on Windows
check_conventions.py normalized link targets with os.path.normpath, which gives backslash paths on Windows, so every link added in docs failed the doc-link check and a silent stub listed in TechnicalDebt was not found. Links are repository-relative POSIX paths, so they are normalized with posixpath.
2026-10-07 15:49:03 -04: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
Sanjaysrinivas 131e05a26b fix(libc): reject overflowing mspace resizes 2026-10-07 21:40:35 +02:00
Sanjaysrinivas c4cfb8e23d fix(savedata): preserve memory on write failure 2026-10-07 21:40:33 +02:00
Sanjaysrinivas 69901c9ac8 fix(libc): avoid time conversion races 2026-10-07 21:40:31 +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
MerijnandClaude Opus 5.5 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 <[email protected]>
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
MerijnandClaude Opus 5.5 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 <[email protected]>
2026-10-07 21:10:25 +02:00
Hashaam ZafarandClaude Opus 5.5 33ab7c90f9 fix(relinker): reject a program header entry size other than 56 bytes
ReadProgramHeaders stepped through the table by e_phentsize without
checking it. With 0 it read the first header e_phnum times, and with
any other size it read misaligned fields, so a damaged header failed
much later as "No PT_DYNAMIC segment found", after building up to
65535 copies of one segment. A non-empty table must now use 56-byte
entries, as the guest module reader already requires.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 12:08:14 -07:00
LexroidandClaude Opus 5.5 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 <[email protected]>
2026-10-07 22:07:28 +03:00
Ethan Barr 35a491bad4 fix(libc): reject overflowing large heap block sizes 2026-10-07 12:06:33 -07:00
Hashaam ZafarandClaude Opus 5.5 a8f862b6df fix(relinker): reject overlapping PT_LOAD segments before sizing the Windows image
WindowsLoadImage sized its data and page table from the end of the last
segment and checked for overlap while copying. A segment whose memory
size reached past the last segment's end wrote page flags past the
table before its overlap was found; the relinker crashed with SIGSEGV
on such an input. Overlap is now checked in a pass before sizing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 12:05:05 -07:00
ChadandClaude Opus 5.5 d89076e9e7 fix(agc): retire host imports of ranges mapped again
A guest range mapped again at the same base and size (a fixed remap into
a registered range) kept its import, which still shows the pages pinned
or aliased before the remap. The GPU then read stale memory. Each import
now remembers its registry range (weakly, since a held range is a lease
the remap waits for) and is retired when the registry has a different
range at its base.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 13:56:21 -05:00
Hashaam ZafarandClaude Opus 5.5 71b9cf3d0d test(relinker): run the Windows TLS cases on Linux x86-64
tls_function_coverage ran its execution cases only on Windows; on
Linux it checked bytes. windows_image_runner.py maps the relinked PE,
points GS at a TEB whose TLS slot holds a block copied from the
template, runs the TLS callbacks for process attach with the Windows
argument registers and calls the guest entry. convert() uses it on
Linux x86-64 and expects 42, as on Windows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 11:52:14 -07:00
Hashaam ZafarandClaude Opus 5.5 ace7999dce feat(relinker): load Windows guest TLS values through register addresses
mov r64 and mov r32 from fs:[mem], where mem has a base or an index
register, now relink for Windows (64 48 8b 03, mov rax, fs:[rbx], in
#217). The stub computes the offset with lea on the original address,
adds the thread pointer and loads.

These sites can be shorter than the 5-byte jump. A short site moves the
following sequential instructions into its stub and relocates
RIP-relative ones; a branch, a return or another TLS access after it
fails the relink. A TLS site shorter than a jump is now rejected instead
of overwriting the next instruction.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 11:44:34 -07:00
Hashaam ZafarandClaude Opus 5.5 1a413b0b56 fix(tools): run pr_overlap on git older than 2.45
git merge-tree takes trees with --merge-base only from git 2.45. On
older git, such as 2.43 on Ubuntu 24.04, the pairwise merge failed and
merge() read the first line of empty output, so --branch stopped with
an IndexError. The merged trees are now wrapped in commits on top of
the base, which git merge-tree accepts with --merge-base from 2.40, and
a failing git merge-tree raises with git's message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 11:29:13 -07:00
Gjon Gojcevic ccc9e3c6da fix(libkernel): return EBADF from sceKernelClose for a descriptor that is not open 2026-10-07 14:10:53 -04:00
ploysiusandClaude Opus 5.5 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 <[email protected]>
2026-10-07 14:02:51 -04:00
ploysiusandClaude Opus 5.5 7400d45d49 fix(libc): drop the LibcHeapErrorReportForGame export no title imports
`LibcHeapErrorReportForGame_nid_postfix` exports NID SlMztUijOSk, which no
NID list or emulator knows. The name is KytyPS5's label for al3JzFI9MQ0,
the NID of sceLibcInternalHeapErrorReportForGame, which libc already
exports from HeapDiagnostics.cpp.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 13:58:15 -04:00
ploysiusandClaude Opus 5.5 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 <[email protected]>
2026-10-07 13:55:45 -04:00
krishnarayaandClaude Opus 5.5 75398e9ed1 fix(agc): refuse 64-bit buffer atomics on devices without shaderBufferInt64Atomics
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 13:52:17 -04:00
ebosido444-ai 5a4d8b6f42 fix(tools): keep the pr_overlap DEPENDS pattern a raw string 2026-10-07 20:45:41 +03:00
john.maiaandClaude Opus 5.5 9cbbf9c33d test(agc): run the recorder tests on AMD and Intel GPUs
importWindowTests pinned watched imports even where the driver decides
to compare them. On amdgpu (RADV) and Intel (ANV) the import probe finds
the pages written after a GPU access, so the driver never watches
imports there; under the pinned watch the storage image keeps the CPU's
blocks and the test fails. It fails the same way at d8c7c0cc, where it
was added. It now reports itself as not run when imports are compared,
like the unit shadow test.

minLodTests expected MIN_LOD 1.5 to blend levels 1 and 2. With
VK_EXT_image_view_min_lod the view minimum LOD is minLodFloat
(preferred) or minLodInteger (alternative); ANV takes the integer part
and reads level 1. Either result is accepted and the alternative is
reported.

The test device ranks Vulkan devices as VulkanDevice does instead of
taking the first one, so on a host with an iGPU it runs on the same GPU
as the runtime. Like VulkanDevice, it destroys the unit shadows before
the device: a test that failed with live slabs segfaulted at exit when
the registry freed them after vkDestroyDevice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 18:40:43 +01:00
ChadandClaude Opus 5.5 eb30830da3 fix(agc): reject 1D arrays outside the linear, Z and R swizzles
The hardware addresses a 1D array in the S and D swizzles differently
from a height-1 2D array, and addrlib allows only linear, Z and R
swizzles for 1D resources, so the other tile modes are rejected instead
of being sampled with a 2D array layout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 12:32:09 -05:00
Lorenzo Delmonte cbc5b4cd5d feat(libSceJson2): implement sce::Json::Value::clear 2026-10-07 19:19:53 +02:00
MathiasDevelopesandClaude Opus 5.5 e84f43aceb feat(libc): implement hypot and hypotf
Both forward to std::hypot, which computes without intermediate
overflow and returns infinity when either argument is infinite, even
if the other is NaN. The math test checks those cases.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 19:10:07 +02:00
EdouardSenceandClaude Opus 5.5 24d6bfe355 fix(libc): back the main image's writable mappings with anonymous memory on Linux
amdgpu userptr, which RADV uses for VK_EXT_external_memory_host, refuses
file-backed VMAs (libdrm sets AMDGPU_GEM_USERPTR_ANONONLY). The executable's
writable PT_LOAD mappings are file-backed MAP_PRIVATE, so on RADV they are
never imported and become writable image mirrors that every address-based
build compares in full.

At load, libc replaces each rw-p mapping of /proc/self/exe with an anonymous
copy at the same address, before any guest code runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 18:43:37 +02:00
krishnarayaandClaude Opus 5.5 bd0df80a53 fix(agc): require 32-wide compute subgroups on devices whose default is 32
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 12:43:15 -04:00
Nguyen Phuong Thuy 3b35a674f3 fix(relinker): reject incomplete RELA entries 2026-10-07 16:41:20 +00:00
john.maiaandClaude Opus 5.5 ff9962b88a test(agc): run agc_driver_bda_device_tests under ctest
The BDA device test was built only on request and never registered, so
it ran nowhere. Register it with the other AGC driver tests.

Pick the Vulkan device the way VulkanDevice does, a discrete GPU over an
integrated one, instead of the first enumerated device, so the test runs
on the same GPU as the runtime on hosts with an iGPU. Without a usable
device it exits 77, as OpenVulkanTestDevice does, unless
ANYPS5_REQUIRE_VULKAN is set.

On a CPU device the BDA execution tests are not run: llvmpipe loads
through the null pointer of a branch that is not taken and the process
segfaults (Mesa #16515, #16217). The contract, allocation and color
transfer tests still run there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 17:39:25 +01:00
Ethan Barr 2ed81aebe4 fix(relinker): preserve GUI startup failure status without stderr 2026-10-07 09:38:56 -07: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
Edgar MaurelandClaude Opus 5.5 241299bf01 test(font): move the console font aside instead of deleting it while its face is mapped
On Windows 10 a file with a mapped view cannot be deleted, and FreeType's
Windows stream keeps the face's file mapped, so removing SST-Bold.otf threw
and ended guest_system_font. Moving it out of the font directory leaves
nothing at the original path and works on every host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 18:26:20 +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à 5684bd9e92 Merge pull request #876 from YossiYad/feat/gpu-selection
feat(agc): choose the Vulkan device by name with ANYPS5_GPU
2026-10-07 18:24:13 +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
MichonandClaude Opus 5.5 29aa275653 fix(agc): accept fragment Geometry and SampleRateShading only when the device enabled them
The validator takes the geometryShader and sampleRateShading enables from the
context (set where #295 enables them), so a device without them refuses the
draw instead of creating a module that needs features it never enabled.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 18:18:47 +02:00
Adrià FranchandClaude cc789786de feat(libSceLibcInternal): implement _sceLibcInternalForceTlsDestructor
Co-Authored-By: Claude <[email protected]>
2026-10-07 18:18:13 +02:00
MichonandClaude Opus 5.5 f3fd29db0d fix(agc): accept a fragment SampleMask output
Pixel shaders that export a coverage mask write gl_SampleMask, an
int[1] (or uint[1]) output. The validator rejected array interface
types; it now spells them elem[N] and accepts SampleMask as int[1] or
uint[1].

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 18:18:12 +02:00
MichonandClaude Opus 5.5 78726f3836 fix(agc): fragment SampleId, Layer and FragDepth interfaces
The recompiler emits SampleId and Layer fragment inputs (pixel ancillary
data) and a FragDepth output with the DepthReplacing execution mode
(depth export), but the validator refused them, so those draws were
skipped. They are now accepted, as are the Geometry and SampleRateShading
capabilities those inputs need in fragment shaders. The device enables
both features when it has them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-07 18:18:12 +02:00