Commit Graph
20967 Commits
Author SHA1 Message Date
Yunus Shaikh ec95b59c08 Merge main into fix/agc-pipelined-fill-blocker-lifetime 2026-10-22 05:28:59 -07:00
Jota fcf6dece99 fix(libSceAjm.native): guard LibAtrac9 BitReverse32 and SignExtend32 against undefined shifts in the ATRAC9 decoder 2026-10-22 09:25:31 -03:00
JAB-devandClaude Sonnet 5.5 4aaf26e3f3 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into feat/agc-4-4-4-4-partial-writes
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-22 14:24:38 +02:00
Itamar Medyoni 89f99c2f50 fix(libkernel): fail fchmod on a pipe with EINVAL like FreeBSD
fchmod and sceKernelFchmod on either end of a pipe answered ENOENT on
Windows, where the pipe has no path, and changed the pipe's mode on Linux.
FreeBSD 11's pipe_chmod sends an unnamed pipe to invfo_chmod, which
returns EINVAL, as sockets already get here.
2026-10-22 15:15:13 +03:00
hypermist e19cafaed4 Merge remote-tracking branch 'upstream/main' into feat/sp-syscall-wrapper-forwards 2026-10-23 01:12:47 +13:00
hypermist 96c0a5e038 Merge remote-tracking branch 'upstream/main' into fix/psml-base-console 2026-10-23 01:12:29 +13:00
hypermistandClaude Opus 5.5 7518b87dea test(libSceFont): pin the word finder's empty-range result
The firmware matcher at 0x1bb70 looks up the first character before it
compares any character with the end pointer, and the export at 0x1bd90
calls it without comparing the first and end pointers, so a range whose
first and end characters are the same still matches a word starting there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-23 01:11:59 +13:00
hypermist cc696f5b51 Merge remote-tracking branch 'upstream/main' into feat/font-words 2026-10-23 01:10:53 +13:00
MarcZX10 583533413c test(libSceKeyboard): cover disconnect all lifecycle 2026-10-22 12:10:24 +00:00
MarcZX10 6750982565 test(libSceKeyboard): cover connection query state 2026-10-22 12:10:24 +00:00
MarcZX10 21688ceb55 feat(libSceKeyboard): disconnect all modeled devices 2026-10-22 12:10:24 +00:00
MarcZX10 1f37078c04 feat(libSceKeyboard): implement connection query 2026-10-22 12:10:24 +00:00
Enrique VandClaude Fable 5.1 c5dd9c1dd6 docs(build): add macOS relinker prerequisites
Name the commands that provide the compiler, CMake and Ninja on macOS
next to the existing mention of AppleClang in the relinker-only section.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-22 05:46:48 -06:00
Dean 8b3a6ba88d Merge pull request #9430 from Get-fix/ps4/gcn-shaders
feat(shader): decode PS4 (GCN) shaders by re-encoding them to RDNA
2026-10-23 00:31:28 +13:00
dantdmdarealguy d85426069c fix(tools): decode Ninja's header dependencies as UTF-8 in select_tests
ninja -t deps lists the paths GCC wrote to its depfiles. WinLibs GCC
15.2.0 runs with the UTF-8 active code page, while its Ninja 1.13.2
reports an ANSI build-file encoding, so a header under C:\Users\José\...
decoded with mbcs became José, fell outside the source tree and dropped
out of every test's inputs. Decode the dependency lines as UTF-8 and keep
the build-file encoding for the outputs they belong to.
2026-10-22 06:28:04 -05:00
thuanquangandClaude c01f5cb9c8 fix(agc): store only the bytes a synchronous draw changed in a linear color target
A synchronous draw read, uploaded, read back and stored a linear color
target whole, even when its scissor covered a small part of it, and the
store rewrote every byte with what was read before the draw, losing guest
CPU stores made meanwhile. For a linear target without DCC under a
smaller scissor, only the scissor's rows are read, only the scissor
rectangle is copied in and out, and the rows are stored with
WriteChanged against the bytes read.

Co-Authored-By: Claude <[email protected]>
2026-10-22 18:18:45 +07:00
Savvanis SpyrosandClaude Opus 5.5 7372200418 Merge branch 'main' into feat/gamelivestreaming-enable-live-streaming
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 13:50:50 +03:00
hamb3r a31c679cda Merge remote-tracking branch 'origin/main' into perf/shader-fold-buffer-format 2026-10-22 13:33:12 +03:00
Destroyers212x 87be88ed1e Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/macos-gs-trap-branch-target
# Conflicts:
#	core/relinker/relinker/tests/test_macos_gs_traps.py
2026-10-22 06:25:34 -04:00
battleblob1andClaude Opus 5.5 15803c7f1a test(agc): replay a stencil export whose shader data is in a buffer
Draw takes an optional fragment push range size. The new case sets it
to the stencil reference dword, so the shader data of a pixel shader
that reads its color with s_buffer_load_dword through a buffer
descriptor in user data is in a buffer with or without the pipeline
library, and the reference is the only push constant. The replayed
draw must color every pixel from the buffer. Without the buildPrepare
fix before it, both stencil replay registrations refuse that draw with
"guest buffer offset lies outside the shader's push constants".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 11:24:53 +01:00
Lindamea1andClaude Opus 5.5 408a656e7b fix(agc): put a stencil replay shader's guest buffer offsets where its shader data is
A pixel shader whose stencil export is replayed gets a push constant
block that ends with the stencil reference word. When its shader data
is not in push constants (registration modules give a shader with an
image a shader data buffer, and data over the stage push range goes
there too), the block holds only that word, and buildPrepare took any
non-empty block to mean the guest buffer offsets are in push
constants: the draw threw "guest buffer offset lies outside the
shader's push constants". Only the stencilReferenceDword words before
the reference now count as shader data in push constants; with none,
the offsets go to the shader data buffer, where the shader reads them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 11:24:53 +01:00
verusferro fa5fc8d5ac test(libkernel_sys): compare fstat with _fstat
fstat must fill the same FileStat as _fstat for an open descriptor, return EFAULT for a null buffer and EBADF for a closed or invalid descriptor, as the fstatfs check beside it does for _fstatfs.
2026-10-22 13:22:59 +03:00
dantdmdarealguy ed8a900caf fix(voice): accept valid worker priorities and affinities in sceVoiceSetThreadsParams
Mode 1 threw for every input since fe4016f61, which stopped Grand Theft Auto V (PPSA04264) right after sceVoiceInit. It now returns 0 for priorities 256-767 with non-zero affinity masks within 0x1fff, the range sceVideoOutOpen accepts for its service thread; no voice worker threads run, so the values reach no host scheduling, and other values still throw.
2026-10-22 05:17:22 -05:00
hypermistandClaude Opus 5.5 213cb216fa feat(libSceFont): build and search word dictionaries as the console does
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 23:16:36 +13:00
Dean 4777caca34 Merge pull request #7215 from simonbronk/codex/json-numeric-locale
fix(json2): keep numeric conversion independent of host locale
2026-10-22 23:05:26 +13:00
Adria Espi 63a2666558 feat(libScePad): implement scePadGetControllerType 2026-10-22 12:05:17 +02:00
ebosido444-ai 2d7a8dab59 test(agc): cover a layered depth view's layer that only overlaps the depth slice
The layer-pitch assertion was guarded by layerPitch + sliceBytes > BlockBytes,
which holds for this fixture, so it never ran. It now asserts the content of the
layer the depth surface does not start at, and a new case fills a 64 KiB
swizzled depth plane without storing it back, takes a four-layer view over the
same memory, and checks that the pending depth result is in guest memory before
the view is uploaded and that the overlapping layer holds the guest bytes that
were there.
2026-10-22 13:03:32 +03:00
mugurc 100148f762 fix(tests): expect the SSE traps the host keeps in the floating-point trap checks
The trap checks unmask exceptions with feenableexcept and its relatives
and expect MXCSR to hold the new masks, and the enable and disable
results to report the traps enabled on both units. Under Rosetta 2
MXCSR keeps its six exception masks set, so no SSE trap is ever enabled
and every result reports none. The test now asks the host once whether
it keeps an unmasked MXCSR exception and, where it does not, expects
all six SSE masks set and no trap on both units; on other hosts the
expectations are the same as before. A debt entry records that the
trap functions change only the x87 masks under Rosetta.
2026-10-22 13:00:10 +03:00
mugurc 65ba3a665f fix(tests): compare the floating-point exception masks with the ones the host keeps
Under Rosetta 2 the six MXCSR exception masks always read back set: a
write that unmasks an SSE exception is not kept, while the x87 masks and
the other MXCSR bits are. guest_floating_point unmasked the overflow
exception on both units and then expected MXCSR to equal the value it
wrote, so it failed on macOS although fesetexceptflag and feclearexcept
left the masks alone. The test now compares with the environment read
back after the write, which on other hosts is the value written. The
debt entry for the floating-point functions notes the Rosetta behaviour.
2026-10-22 13:00:10 +03:00
hypermistandClaude Opus 5.5 6116b70b04 feat(libSceFont): build the graphics region and fill descriptors as the console does
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 22:57:00 +13:00
Chikimaro 7854d19936 Merge main into feat/libscenetctl-nptoolkit-callbacks
main now starts libSceNetCtl initialized, so GuestNetCtl's checks before
sceNetCtlInit expect argument errors; the NpToolkit register, unregister
and check join them with the errors and result their IPv4 counterparts give.
2026-10-22 09:56:31 +00:00
Dean cc0078595d Merge pull request #8992 from SP4C3B4R-8/refactor/draw-prepare-record
refactor(agc): split Graphics::Draw into a prepare and a record step
2026-10-22 22:47:27 +13:00
hamb3r 6e6c15962a fix(shader): fold constant composite tables localized to Function storage 2026-10-22 12:45:48 +03:00
SimoneandClaude Opus 5.5 bec128911c test(libSceVoice): rename the bitrate variable the main tests also declare
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 11:45:43 +02:00
SimoneandClaude Opus 5.5 a07d5a5074 test(json2): follow main's parser in the numeric locale test
main now keeps object keys sorted and stops at the end of the first
value, so the nested document lists its keys in order and "1,5" parses
as the integer 1 instead of failing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 11:44:03 +02:00
hypermistandClaude Opus 5.5 6e0c94cada feat(libSceSpSysCallWrapper): forward 45 wrappers to the libkernel and libSceNet calls they jump to
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 22:43:31 +13:00
SimoneandClaude Opus 5.5 2f579e0eb7 fix(json2): remove the conflict markers left by the main merge
Keep both includes: <sstream> for the classic-locale fallback and
<memory> from main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 11:42:06 +02:00
Yunus Shaikh 030ef8f772 fix(hmd): check the command queries' handle and 2D VR arguments in libSceHmd's order
BunnyFl ran firmware 13.42's libSceHmd exports under an emulator. The
distortion and wide-near correction queries look the handle up before
checking initialization: a handle other than the one sceHmdOpen stored,
which stays 0 without a headset, returns HANDLE_INVALID even before
sceHmdInitialize. sceHmdGet2dVrCommand checks its arguments first:
PARAMETER_NULL for a null descriptor or command buffer or a null
pointer at descriptor offset 0, 8 or 0x20, and PARAMETER_INVALID for a
non-zero field at 0x34 or 0x38.

The queries and their sceHmdDistortion* aliases now answer in that
order. What handle 0 gets after initialization isn't measured, so it
throws NotImplemented_nid_no_patch instead of returning HANDLE_INVALID.
2026-10-22 02:38:45 -07:00
hypermistandClaude Opus 5.5 e699e57ddb fix(libScePsml): answer the MFSR2 calls as a console without PSSR does
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 22:37:28 +13:00
mugurc c27787a7db fix(libc): build the host-facing libc code on macOS
feof_unlocked, ferror_unlocked, getc_unlocked and putc_unlocked are macros
on macOS, so they are called without the global scope qualifier. The
remaining differences are the ones Darwin's headers and libSystem have:

- CLOCK_REALTIME_COARSE and st_mtim do not exist; the write mark uses
  CLOCK_REALTIME and st_mtimespec.
- tm_zone is a non-const char*.
- __cxa_thread_atexit returns void, so the wrapper reports success.
- Darwin's stack protector reads __stack_chk_guard from libSystem; the
  guard of the guest libc has the postfixed name, which receives the NID
  of the original.
- APS5_EXPORT spells the symbols with the leading underscore of Mach-O.
- GuestArenaSetProtection and PosixProtection are built on macOS as on Linux.
- The fclose failure test fills /dev/full, which exists on Linux only.

exception_runtime relies on the Itanium unwinder of libc, which is not
registered on macOS (the host libc++abi is used), so its test is only
registered elsewhere.
2026-10-22 12:25:14 +03:00
Get-fix a13d01bcc9 fix(shader): keep the PS5 user-data pointer check unchanged outside PS4 shaders
unchangedUntil skipped a write by the reading instruction itself for every shader, so an RDNA s_load that overwrites its own address pair was taken as a user-data pointer load where main refused it. The skip now applies only to PS4 (GCN) shaders, where it is needed; PS5 shaders take main's path.
2026-10-22 12:19:13 +03:00
SP4C3B4R-8 930b9640d7 refactor(agc): split Graphics::Draw into a prepare and a record step 2026-10-22 11:18:29 +02:00
11d145855e fix(shader): keep the literal word of a GCN s_setreg_imm32_b32
The SOPK branch of the GCN decoder never set the literal for
s_setreg_imm32_b32, so the eight-byte instruction was re-encoded as one
word and its decode threw "literal operand word is out of the code span
bounds". The decoder now copies the literal for that opcode; the new
agc_gcn_decode test decodes the reported stream.

Co-authored-by: javierUDP <[email protected]>
Co-authored-by: Savvanis Spyros <[email protected]>
2026-10-22 12:17:44 +03:00
Get-fix 4b717912d7 feat(shader): decode PS4 (GCN) shaders by re-encoding them to RDNA
Each GCN instruction is re-encoded to its RDNA form and decoded by the
existing RDNA decoder, so the PS4 path shares the recompiler. Covers the
legacy VS stage (program at the VS slot, user SGPRs from s0, vertex and
instance index in v0-v3), fetch shaders linked as user-data calls, MIMG
(image_sample and friends), PS4 buffer descriptors (GCN DATA_FORMAT /
NUM_FORMAT, 44-bit base) and T# image descriptors (GCN tiling in word 7).
The GCN switch is keyed into the shader disk cache. PS5 behaviour is
unchanged: every PS4-only rule is gated on GcnGuestShaders().
2026-10-22 12:17:44 +03:00
frankea e0c67af31f fix(agc): accept DB_EQAA INTERPOLATE_COMP_Z for a one-sample depth target without MSAA_ENABLE
A one-sample depth target under a multisampled rasterizer without MSAA_ENABLE is drawn as one sample at the pixel center, but DB_EQAA INTERPOLATE_COMP_Z threw on it. Gran Turismo 7 (PPSA01317) draws its 3840x2160 main pass this way after its EQAA pass (PA_SC_AA_CONFIG 0x0020c002, PA_SC_MODE_CNTL_0 0x2, DB_EQAA 0x00050000, a Z_32_FLOAT depth target with one sample) and stops on it.

On this path every sample is taken to be at the pixel center, so Z interpolated to any sample position is the center's Z, which the one-sample draw already tests and writes. INTERPOLATE_COMP_Z is now accepted there. INTERPOLATE_SRC_Z and overrasterization still throw. Neither PAL nor radeonsi sets the bit and its meaning is not documented, so the debt entry records this as the same inference.
2026-10-22 05:13:05 -04:00
hypermistandClaude Opus 5.5 a37f8c630a docs(libc): record the bundled libc.prx UTF-8 default for the multibyte debt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 22:09:31 +13:00
hypermist 62feb8bfcc Merge remote-tracking branch 'upstream/main' into fix/libc-utf8-multibyte 2026-10-22 22:08:17 +13:00
hamb3r 8d0aaca1e2 Merge remote-tracking branch 'origin/main' into perf/shader-fold-buffer-format 2026-10-22 12:07:49 +03:00
hypermistandClaude Opus 5.5 f465759bcf fix(libkernel): drop the duplicate scePthreadYield declaration
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-22 21:57:55 +13:00
hypermist a2d22219b4 Merge remote-tracking branch 'upstream/main' into feat/libc-sce-v2-thread-sync 2026-10-22 21:57:46 +13:00