Commit Graph

1806 Commits

Author SHA1 Message Date
Adrià 28c9dae73d
Merge pull request #4569 from pipe1os/feat/libkernel-fdopendir
feat(libSceLibcInternal): implement fdopendir
2026-10-12 23:00:17 +02:00
Adrià 4998307175
Merge pull request #4218 from Mouad-Scriptz-0/feat/signin-dialog-npauth-signed-out
feat(libSceNpAuth): return the signed-out error from sceNpAuthGetAuthorizedAppCode
2026-10-12 23:00:04 +02:00
Dean 307c0a3afb
Merge pull request #3819 from xXPBSXx/fix/export-ppsa29866-imports-v4
fix(exports): export the calls PPSA29866 imports
2026-10-13 09:59:30 +13:00
Adrià 14db08435f
Merge pull request #3747 from semirkabir/feat/ult-queue-optparam
feat(libSceUlt): accept option parameters in sceUltQueueCreate and sceUltQueueDataResourcePoolCreate
2026-10-12 22:58:01 +02:00
Adrià 96e25f1fc1
Merge pull request #4567 from jagrat04/feat/libkernel-get-libkernel-text-location
feat(libkernel): implement sceKernelGetLibkernelTextLocation
2026-10-12 22:57:32 +02:00
Adrià 2fabe44c48
Merge pull request #3980 from MarcZX100/codex/carry-libkernel-setrlimit
feat(libkernel): export setrlimit
2026-10-12 22:57:08 +02:00
Adrià 955f4fbffe
Merge pull request #4207 from xXPBSXx/fix/ampr-amm-usage-stats
feat(libSceAmpr): answer sceAmprAmmGetUsageStatsData
2026-10-12 22:57:04 +02:00
Mouad-Scriptz-0 09c985464c feat(libSceNpAuth): return the signed-out error from sceNpAuthGetAuthorizedAppCode
There is no PSN sign-in, so the code getter answers SCE_NP_ERROR_SIGNED_OUT
instead of throwing; its parameters are unknown and not read. Minecraft
(PPSA17221) calls it after its sign-in dialog and treats the result as
offline play. The request, token and wait calls are left to #3604.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 22:54:23 +02:00
Adrià 529f7bfd4a
Merge pull request #3848 from semirkabir/feat/usbd-libusb
feat(libSceUsbd): pass USB devices and transfers through to the host with libusb
2026-10-12 22:51:41 +02:00
Adrià c06fcc4ff3
Merge pull request #3764 from YossiYad/carry/libkernel-kqueue
feat(libkernel): implement kqueue, kevent and file events
2026-10-12 22:50:34 +02:00
Adrià c8debc7788
Merge pull request #4748 from jagrat04/feat/libkernel_sys-readlinkat
feat(libkernel_sys): implement readlinkat
2026-10-12 22:49:44 +02:00
Semir Kabir 0634b443ef feat(libSceUlt): accept option parameters in sceUltQueueCreate and sceUltQueueDataResourcePoolCreate 2026-10-12 22:48:53 +02:00
Adrià 999c07a633
Merge pull request #3890 from MarcZX100/codex/carry-ampr-offset-bounds-3321
fix(ampr): reject command buffer offsets beyond bound memory
2026-10-12 22:48:32 +02:00
Adrià 03895fc51a
Merge pull request #3679 from MarcZX100/codex/ampr-cpp-error-3346
feat(libSceAmpr): implement std::_Throw_Cpp_error
2026-10-12 22:48:13 +02:00
Adrià Franch f89c7fb883 docs(libkernel): move the setrlimit debt line next to getrlimit
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 22:47:59 +02:00
MarcZX100 01d201c346 feat(libkernel): export setrlimit 2026-10-12 22:47:55 +02:00
Adrià c952c2b0ed
Merge pull request #4709 from fdfawef324/feat/agc-workloads
feat(agc): return null from the workload builders for unregistered streams
2026-10-12 22:41:39 +02:00
jagrat Singh 20243b81e4 feat(libkernel_sys): implement readlinkat 2026-10-13 02:09:59 +05:30
Adrià 84659e16d0
Merge pull request #4632 from AlxcBTW/feat/trace-gpu-track
feat(agc): add the GPU, GPU mutex waits and shader preparation to the trace
2026-10-12 22:39:23 +02:00
Adrià Franch b7c67a3364 fix(libkernel): accept NOTE_EXTEND on a directory watch on Windows
FreeBSD's vfs_kqfilter checks neither the vnode type nor fflags, so the
registration is valid; it is only delivered for a move between directories,
which the Windows directory handle cannot tell from a removal plus an addition.
Also moves the TechnicalDebt entries to docs/dev/debt after main split the file.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 22:37:31 +02:00
virp-mta 62d12756b7 feat(libSceNpAuth): complete offline request lifecycle following shadPS4 2026-10-12 22:34:51 +02:00
Adrià 798855b567
Merge pull request #4666 from ErenYeager1836/feat/content-search-empty-library
feat(libSceContentSearch): implement the search calls over an empty library
2026-10-12 22:33:39 +02:00
Semir Kabir 98d594c9c1 feat(libSceUsbd): pass USB devices and transfers through to the host with libusb 2026-10-12 22:32:42 +02:00
Adrià 7cb200b82d
Merge pull request #4714 from p3n1cillin/claude/netctl-ap-dialog
feat(libSceNetCtlApDialog): run the offline access-point dialog lifecycle
2026-10-12 22:32:40 +02:00
Adrià 44ab0c39ee
Merge pull request #3886 from PrintOrb/fix/videoout-high-frame-rate
fix(videoout): support permitted high-frame-rate output for Quake II
2026-10-12 22:23:31 +02:00
Adrià 825620ae56
Merge pull request #3791 from YossiYad/carry/pragmata-small-exports
feat(exports): implement three small PRAGMATA exports
2026-10-12 22:22:19 +02:00
Adrià 621ce1da17
Merge pull request #3846 from tv7/fix/d16s8-depth-fallback
fix(agc): store D16 depth with stencil as D24 or D32 where the device lacks it
2026-10-12 22:20:05 +02:00
Adrià d5fcd087bd
Merge pull request #3821 from semirkabir/feat/coredump-attach-outside-handler
feat(libkernel): answer the coredump attach calls made outside the handler
2026-10-12 22:19:52 +02:00
Adrià 5382635cd0
Merge pull request #3800 from YossiYad/carry/libkernel-setitimer
feat(libkernel): add setitimer on the alarm timer
2026-10-12 22:19:39 +02:00
Adrià 9ea71307a9
Merge pull request #3872 from LeandroLP23/fix/kernel-windows-directory-dup
fix(libkernel): share the directory state between duplicated descriptors on Windows
2026-10-12 22:18:02 +02:00
Adrià 16f993a534
Merge pull request #3787 from YossiYad/carry/libkernel-jit-shared-memory
feat(libkernel): implement the JIT shared memory calls
2026-10-12 22:17:55 +02:00
Adrià 9f8a1080aa
Merge pull request #3728 from MarcZX100/codex/net-resolver-abort-3153
feat(libSceNet): implement resolver abort and multiple records
2026-10-12 22:17:43 +02:00
AlxcBTW eb8a7255d2 feat(agc): add the GPU, GPU mutex waits and shader preparation to the trace
The trace gets a gpu track: one slice per recorder batch from its timestamp
pair, and with APS5_PROFILE_GPU=1 one per command class range under the
[gputime] class names. The GPU clock is mapped onto the CPU clock from
calibrated timestamps (VK_KHR_calibrated_timestamps or the EXT version,
enabled only when a trace switch is set) taken when the window opens and
when it closes. A traced thread's wait for the GPU mutex becomes a
GpuMutex.wait.<site> slice, and the shader preparation threads are traced
with smaller buffers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:13:44 +02:00
Adrià Franch 2115dac9a9 docs(debt): record the D16 stencil depth host format fallback
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 22:13:24 +02:00
Adrià 198e022107
Merge pull request #3781 from YossiYad/carry/libkernel-termios-calls
feat(libkernel): implement the remaining termios calls
2026-10-12 22:12:13 +02:00
Adrià 52c9b65480
Merge pull request #3849 from LeandroLP23/docs/debt-windows-gui-console
docs(debt): update the console and random device entries to current main
2026-10-12 22:11:28 +02:00
screamm 5471844c5d feat(libkernel): add setitimer on the alarm timer
PS5MC (PPSA99420) imports setitimer (hPWDGx8ioXQ, aerolib) at registry
index 472, after tcsetpgrp and before getitimer. Predicted stop:
"FAIL: unresolved ELF import hPWDGx8ioXQ from libkernel.prx".

setitimer follows FreeBSD 11.4 kern_time.c (8c639945) sys_setitimer and
kern_setitimer: EINVAL for an unknown timer and for an itimerfix failure
or more than INT32_MAX / 2 seconds; a zero value clears the interval and
disarms; a null value reads the timer, EFAULT when the output is null too.
ITIMER_REAL shares the alarm state, now with an interval that re-arms it
as realitexpire does; alarm clears it, as FreeBSD's alarm.c does.

Guest SIGALRM handlers are not run, so an expiry with a handler, or with
SIGALRM blocked (signals are never left pending), throws naming the
interval; SIG_IGN drops it and the default disposition exits with 142,
as alarm already did. Intervals below 1 ms throw (itimerfix rounds them
to tick / 16 and the console's hz is unknown). ITIMER_VIRTUAL and
ITIMER_PROF throw when armed and read and disarm as zero.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 22:08:23 +02:00
Adrià 0142215687
Merge pull request #3720 from MarcZX100/codex/share-clip-extended-3333
feat(libSceShare): implement extended video clip capture
2026-10-12 22:07:24 +02:00
Adrià Franch 5b73ecb385 docs(technical-debt): cite shadPS4 for the coredump error value and move the line away from adjacent PRs
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 22:04:17 +02:00
Adrià Franch 833cc357da docs(debt): remove the duplicated fused PPSA23566 line
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-12 22:04:02 +02:00
Adrià Franch 8f1077a29c docs(debt): drop sceNetResolverAbort from the unknown-signature line
The PR added a second PPSA23566 line fused with the PPSA28416 one instead of editing the original.
2026-10-12 22:03:56 +02:00
David 3d64981643 feat(libSceNet): implement sceNetResolverAbort and sceNetResolverStartNtoaMultipleRecords
UFC 6 (PPSA23566) imports sceNetResolverAbort (#992, #1502); Palworld
(PPSA23126) and LEGO Horizon Adventures (PPSA14632) import
sceNetResolverStartNtoaMultipleRecords.

Signatures and behaviour follow shadPS4 811bfcd7d17e
(src/core/libraries/net/net.cpp, net_resolver.cpp); the abort signature
also matches SharpProspero Interop/Net/Socket.cs.

sceNetResolverStartNtoaMultipleRecords shares the lookup of the Ex form
and, like it, throws for any flag. sceNetResolverAbort returns EBADF for
an unknown resolver and throws for flag bits other than NTOA (1) and
ATON (2) preservation. Host lookups cannot be interrupted, so an abort
during a running lookup makes it fail with EINTR when the host call
returns, without writing its output; with nothing running, the
preservation flags make the next lookup of that kind fail with EINTR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit bcc8be8a58aa6a9e6b7c288d8a90af6ed63837aa)
2026-10-12 22:03:56 +02:00
Adrià 9742ec12c8
Merge pull request #3694 from MarcZX100/codex/libc-getopt-3562
feat(libSceLibcInternal): implement getopt and getopt_long
2026-10-12 22:03:44 +02:00
Adrià 70da6f41c3
Merge pull request #3718 from MarcZX100/codex/libsce-np-ea-access-3339
feat(libSceNpPartner001): implement EA access init and terminate
2026-10-12 22:03:30 +02:00
screamm 3b7ac1596d fix(libkernel): create the JIT shared memory backing in one call
Review of #3787 asked for no retries after an error in Jit.cpp.

Linux: memfd_create is called once with MFD_CLOEXEC. MFD_EXEC was
tried first and dropped on EINVAL; the flag only sets the file's execute
permission bits (Linux 6.3 and later), not whether the object maps
PROT_EXEC, which is decided by the mapping protection, as for the direct
memory memfd in DirectMemory.cpp. A one-shot choice from the headers
would fail on older kernels, so the flag is dropped; TechnicalDebt
records it.

Windows: the delete-on-close backing file is named from the process id,
a process-wide atomic counter and the performance counter, so CREATE_NEW
cannot meet an existing name, and any CreateFileW failure throws with
the Win32 error instead of looping up to 64 times on ERROR_FILE_EXISTS.
The descriptor stays a CRT descriptor on the file, so close, dup and
dup2 keep working as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 21:59:19 +02:00
screamm 7d3dd554da feat(libkernel): implement the JIT shared memory calls
The three JIT shared memory exports (avvJ3J0H0EY, MR221Mwo0Pc,
YKT49TOLQWs) are absent imports of three homebrew titles that cannot
finish loading without them. Predicted next stops (registry order):

- VLC PPSA85300 after getdtablesize (idx 354):
  "FAIL: unresolved ELF import YKT49TOLQWs from libkernel.prx"
  (Map idx 452, Create idx 462)
- XPSemu PPSA97358 after tcsendbreak (idx 214):
  "FAIL: unresolved ELF import avvJ3J0H0EY from libkernel.prx"
  (Create idx 398, Map idx 399)
- RetroArch PPSA99169:
  "FAIL: unresolved ELF import avvJ3J0H0EY from libkernel.prx"
  (Create 476, Alias 477, Map 478)

XPSemu and VLC (ps5/compat/mmap.c, __wrap_mmap) create an object for
every anonymous PROT_EXEC mapping (QEMU's TCG buffer) and map it with
the same protection, falling back to flexible memory on any non-zero
return. RetroArch's eboot runs a probe: Create("ps5-platform-probe",
0x10000, 7, &fd), Alias(fd, 3, &alias), Map(fd, 5, &address), then logs
"jit create=0x%08x alias=0x%08x map=0x%08x".

Signatures from Orbital cc408367 tools/ida/db_types.json (name, len,
maxProt, fdOut; fd, maxProt, fdOut; fd, prot, startOut), matching
ps4sdk 4df9d001 include/sce/kernel.h, ps5-jar-loader 8034177e
LibKernel.java and the three titles' call sites. SharpProspero 5dfdb4b0
declares the alias as returning the descriptor; the RetroArch call site
passes an out pointer.

The object is a host anonymous file (memfd on Linux, a delete-on-close
temporary file mapped as a PAGE_EXECUTE_READWRITE section on Windows),
the alias a duplicate descriptor, and each map maps the whole object
through the direct memory placement path, so a write through one view
is visible through the others. Bad lengths and protection bits are
EINVAL, protection past the descriptor's maximum is EACCES (FreeBSD 11
vm_map_protect), unknown descriptors are EBADF; close, dup and dup2
keep the descriptor table in step. Unverified details are recorded in
TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 21:59:19 +02:00
screamm 96988048ad feat(libSceSharePlay): implement sceSharePlayProhibitController
PRAGMATA (PPSA02530) imports sceSharePlayProhibitController (NID
FzQS6DREDfk), which no library exports on main, so the load fails on the
unresolved import. It is one of the "six declared-only imports" of
xXPBSXx's branch in #3043 (comment 6107100345): "These only stop the
load failure; as described above, the title calls some of them later and
needs their real behavior."

sharpemu src/SharpEmu.Libs/Share/SharePlayExports.cs:9-31
(a2983692930564815a77f81e74c151268f5b935f, used as a source of facts)
takes one value, accepts 0 and 1 and returns 0. Nothing here would read
the setting, as no Share Play session or visitor controller exists, so
it is not stored. sharpemu rejects other values with its synthetic
0x80020003, not a Share Play code, so they throw, as
sceSharePlayInitialize does for its unknown error. Like the other exports
of the library it does not check initialization. The NID hashes from the
name and is in aerolib. Unverified points are in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 21:58:43 +02:00
screamm 4ab6a047f6 feat(libSceRazorCpu): implement sceRazorCpuSync
PRAGMATA (PPSA02530) imports sceRazorCpuSync (NID Ax7NjOzctIM), which no
library exports on main, so the load fails on the unresolved import. The
title calls it after sceConvertKeycodeGetCharacter. From #3043 (comment
6106731532): "`sceRazorCpuSync`: answering 0 and doing nothing was
enough to carry on (the other `sceRazorCpu*` calls in `main` are no-ops
without a capture)."

SharpProspero src/SharpProspero/Interop/Debug/RazorCpu.cs:119-122
(5dfdb4b0b166e83dc9ae275001afb695f12c7174, GPL-3.0, used as a source of
facts) gives int sceRazorCpuSync(void), an unnamed frame-boundary event.
Without a capture there is no event to record, so it returns 0 and does
nothing, like the other sceRazorCpu markers here and the shadPS4 stub
(razor_cpu.cpp:143, 3a9f57265d28975658f1ca941daa5c879c7a74bd). The NID
hashes from the name and is in aerolib. Unverified points are in
TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 21:58:39 +02:00
screamm 5690b84a49 feat(libSceNpEntitlementAccess): implement sceNpEntitlementAccessGetGameTrialsFlag
PRAGMATA (PPSA02530) calls it after sceRazorCpuSync and stops on main
with "sceNpEntitlementAccessGetGameTrialsFlag not implemented". From
called once; I logged four register values but cannot tell which are
arguments. Answering 0 without writing anything carried on." Killing
Floor 3 (PPSA08427) and RE4 also import it.

The title is reported as a full game, not a game trial: 0 is written to
the uint32_t output and 0 returned; a null pointer returns 0x817D0002.
Signature, value, one-word write and error follow sharpemu
src/SharpEmu.Libs/Np/NpEntitlementAccessExports.cs:98-116 and its test
NpEntitlementAccessExportsTests.cs:16-36 (a2983692930564815a77f81e74c151268f5b935f),
used as a source of facts; 0x817D0002 is also the parameter error of
KytyPS5, prosper and sceNpEntitlementAccessGetEntitlementKey here. The
library has no initialization state, so none is checked. The NID
y7JD1gfwyfA hashes from the name and is in aerolib. Unverified points
are in TechnicalDebt.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 21:58:36 +02:00
screamm 51b3e3ef38 feat(libkernel): implement the remaining termios calls
Adds tcsendbreak (vXE-dIUIZlE), tcdrain (brGGJWsZauw), tcflush
(FxHW5NuEXsY), tcflow (OG8xRaGIpqk), tcgetpgrp (5OEl1mRhUm0) and
tcsetpgrp (YMuesZTyTl4) next to tcgetattr and tcsetattr in
File/src/Terminal.cpp. The NIDs come from tools/nid_names.py and match
aerolib.csv (zecoxao/sce_symbols 2883963a).

They follow FreeBSD 11.4 lib/libc/gen/termios.c (8c639945), which
implements each one over a terminal ioctl: tcflush returns EINVAL for a
queue other than TCIFLUSH, TCOFLUSH or TCIOFLUSH and tcflow for an
action outside TCOOFF..TCION before the descriptor is used; every other
call fails with the error the merged tcgetattr gives (EBADF for a closed
descriptor, ENOTTY for a file or pipe, EADDRNOTAVAIL or EOPNOTSUPP for a
socket, per soo_ioctl and in_control/in6_control). tcsendbreak fails on
TIOCSBRK before its 0.4 s pause, and tcflow's TCIOFF/TCION fail in
tcgetattr. FreeBSD's pipe_ioctl answers TIOCGPGRP/TIOCSPGRP on a pipe or
FIFO with the SIGIO owner, which is not modelled, so tcgetpgrp and
tcsetpgrp throw on a host pipe above descriptor 2.

Titles (homebrew catalog #1578), predicted stops from registry order:
- PS5MC PPSA99420 imports tcsendbreak (442), tcdrain (443), tcflush
  (444), tcflow (445), tcgetpgrp (462) and tcsetpgrp (463); once pause
  and setrlimit are in, it stops at
  "FAIL: unresolved ELF import vXE-dIUIZlE from libkernel.prx".
- XPSemu PPSA97358 imports tcsendbreak (214), its first uncovered import
  after execv, sigwait, setrlimit, mlockall, setuid and getopt:
  "FAIL: unresolved ELF import vXE-dIUIZlE from libkernel.prx".

guest_terminal covers each call over stdin, stdout, stderr, a file, both
pipe ends and an AF_INET socket, the EINVAL cases (also on -1), and
EBADF for -1, a closed socket, a closed pipe and a closed file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 21:48:20 +02:00