Commit Graph
518 Commits
Author SHA1 Message Date
Dean c739a47136 Merge pull request #11289 from Danigamer05/feat/libc-unsigned-min64
feat(libc): implement unsigned 64-bit minimum
2026-10-27 11:06:32 +13:00
Dean b8265bf2bc Merge pull request #11241 from edubox/feat/libc-future-category
feat(libc): export the error_category members and std::future_error
2026-10-27 11:04:49 +13:00
Dean fc2594c7ac Merge pull request #11177 from orezraey/feat/libc-fe-dfl-env-measured-ps5
feat(libc): export __fe_dfl_env as measured on a PS5
2026-10-27 11:02:06 +13:00
Dean d6ac53ba34 Merge pull request #11054 from verusferro/feat/libc-num-put-do-put
feat(libc): format num_put<char>::do_put as the console's libc does
2026-10-27 11:00:12 +13:00
Dean 806a573b0b Merge pull request #10139 from dotaku22/feat/libc-fpurge
feat(libc): implement buffered stream purge
2026-10-27 10:53:27 +13:00
Dean c74530e615 Merge pull request #8903 from UnhealthyKraken/feat/libc-feraiseexcept
feat(libc): implement feraiseexcept
2026-10-27 10:52:51 +13:00
Dean e95e81d96a Merge pull request #11233 from edubox/feat/libc-setprecision
feat(libc): export std::setprecision(int)
2026-10-27 10:40:17 +13:00
Yunus Shaikh b1889783be feat(agc): fill the overlay's second page from the driver's counters
Page 2 now samples its sources once a second, in NotePresent, while it
shows; nothing of it runs while the overlay is hidden or on page 1.

- Busy share per queue worker, the top 5 phases in ms per frame and queue
  0's waits (memory, lock, GPU) come from the trace's per-thread totals.
  Showing page 2 turns recording on with buffering off, so a timed scope
  only adds to its thread's totals; leaving it turns recording off again.
  Toggle switches it under a mutex, and ANYPS5_OVERLAY=2 switches it on at
  start. An APS5_TRACE_* run keeps its own recording untouched, and page 2
  then shows these lines only while that trace records. A driver thread
  names itself when it starts (BindThread without APS5_TRACE_* stores the
  name only) and binds on its first timed scope while page 2 shows;
  unnamed threads are not bound.
- Render passes per frame: the draw path counts a begun pass in the trace
  totals while page 2's totals are on (PerformanceTrace::Count).
- Flips/s and the draw cache's hit rate come from the driver through a
  source it registers at start (the draw cache's lock is only tried); the
  pipeline store's hit rate from PipelineStoreTotals; the compile backlog
  from the shader preparation and library prebuild pools (tried locks).
- Dropped frames per second are the presents that found no free swapchain
  image; repeated ones are presents of the display buffer shown just before.
  The device passes the buffer's address, its present mode and the drops.
- Commit charge against the commit limit: GetPerformanceInfo on Windows,
  Committed_AS and CommitLimit from /proc/meminfo on Linux; page faults per
  second from PageFaultCount or getrusage.
- Host imports: their count and bytes against the budget, on devices that
  import host memory.
- CPU copies: address-based builds count the bytes they copy in a
  per-thread counter (a relaxed load and store, folded once a second) with
  the largest build of each second against the address-copy cap.
- Unimplemented-function calls: libc counts NotImplemented_nid_no_patch
  calls; refused shaders are the APS5_SKIP_REFUSED_DRAWS set's size.
- Title ID (when the title has a param.json) and present mode.

The tests cover the trace deltas, hit rates, present-mode names, the
/proc/meminfo parser and the OS reads, the per-thread copy counter's fold,
the counted unimplemented call, the trace switch with page 2 and lazy
binding without buffering, and on lavapipe the sampler end to end with a
fake driver source, its reset when page 2 is left, and the cost of a
present hidden, on page 1 and on page 2.
2026-10-26 20:42:29 +01:00
Adrià 39c801a13d Merge pull request #9669 from fogydes/feat/libkernel-exec-replacement
feat(libkernel): implement execv, execvp and execve process replacement
2026-10-26 16:36:56 +01:00
Adrià c4669c9ca2 Merge pull request #9958 from JJenkx/windows/printf-long-double-hex
fix(libc): format %La like titles' libc.prx does
2026-10-26 16:30:58 +01:00
Dean bf77a9e9cb Merge pull request #10742 from 00xDisaster/feat/libc-lcosh
feat(libc): implement _LCosh and _LSinh
2026-10-27 02:28:15 +13:00
Adrià 1061954c7e Merge pull request #8520 from qpavyros/codex/app-archive-directories
feat(libkernel): enumerate archived app directories
2026-10-26 14:23:39 +01:00
Adrià FranchandClaude Sonnet 5.5 c2adff7598 fix(libc): export ExecutePermission_nid_no_patch with C linkage
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-26 14:18:34 +01:00
review 044e52a2f0 Merge commit 'refs/review/9669/head' into HEAD 2026-10-26 14:10:41 +01:00
JJenkxandClaude Opus 5.5 afa58432f3 fix(libc): format %La like titles' libc.prx does
A long double %La went to the host, which on Windows (MinGW) prints the
64-bit significand with its integer bit as the leading digit:
0xc.ccccccccccccccdp-7 for 0.1L. The libc.prx that titles ship
normalises it like a double, with a leading 1 and the remaining 63 bits
as 16 hexadecimal digits, 0x1.999999999999999ap-4, and rounds a shorter
precision half up with the carry kept in the leading digit. Share
HexFloat's digit and rounding code between double and long double and
use it for finite long double %a and %A in the narrow and wide families.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 08:52:35 -04:00
fogydes 719701a68e fix(libkernel): follow the measured exec lookup and image checks 2026-10-26 16:19:46 +05:30
Adrià FranchandClaude Sonnet 5.5 654eadd7f5 merge: sync archive directories with main
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-26 10:50:37 +01:00
GruzzberryandClaude Opus 5.5 d49b9b6f25 feat(libkernel_sys): implement setlogin
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 09:26:45 +00:00
Dean 8022d448e6 Merge pull request #10786 from 00xDisaster/feat/libc-dinkumware-math
feat(libc): implement _Exp and _FExp
2026-10-26 20:02:47 +13:00
Dean faa88a412b Merge pull request #10608 from edubox/feat/libc-underflow-error
feat(libc): export std::underflow_error type info, vtable and destructor
2026-10-26 14:40:05 +13:00
Adrià 97d33464c5 Merge pull request #9527 from AlxcBTW/pr/libc-annex-k-stream-io
feat(libc): add the Annex K stream printf, scanf and freopen_s functions
2026-10-26 01:21:26 +01:00
Adrià 898a7fef4f Merge pull request #9631 from UnhealthyKraken/feat/libc-fetch-seqcst
feat(libc): implement sequential bitwise fetch helpers
2026-10-26 01:11:55 +01:00
Danigamer05 94e88881d4 feat(libc): implement unsigned 64-bit minimum 2026-10-26 01:01:08 +01:00
Dean Galvin f4d5420b4b Merge branch 'main' into feat/libc-lcosh 2026-10-26 12:28:05 +13:00
qpavyros 6105be4431 merge: sync archive directories with main 2026-10-26 01:10:12 +02:00
Eduardo Ruiz e859215335 feat(libc): export the error_category members and std::future_error
The libc.prx bundled with PPSA02530 keeps error_code values in the second
dword: the shared error_category::default_error_condition shifts the value
into the high half and the equivalent overloads compare that dword and the
category. Export the type info, the base destructor and the three base
members, so titles that import them resolve to the same code the generic
and system category vtables already use.

future_category returns a static _Future_error_category derived from
_Generic_error_category and named "future". Its message maps 1..4 to
"broken promise", "future already retrieved", "promise already satisfied"
and "no state", and falls back to the generic table. future_error is 0x40
bytes: a GuestLocale::String at 0x8 and the 16-byte error_code at 0x30; its
0x30-byte vtable carries the console's _Doraise slot. _Throw_future_error
allocates that size and throws it with the console type info, and
_Rethrow_future_exception delegates to rethrow_exception.
2026-10-25 23:27:36 +01:00
Eduardo Ruiz 93b0c59870 feat(libc): export std::setprecision(int)
Dinkumware's setprecision returns the same two-register manipulator as setw: the function pointer in RAX and the precision value in RDX. The function stores the argument at ios_base offset 0x1c, leaving flags and width alone.

Disassembled from the libc.prx bundled in PPSA02530's sce_module, where _ZSt12setprecisioni (NID 1h8hFQghR7w) returns a pointer to 'mov %esi,0x1c(%rdi); ret' and has the same 10-byte export shape as _ZSt4setwi. Negative and zero values are stored unchanged; a null stream throws.
2026-10-25 23:19:11 +01:00
Dean 88f99678bf Merge pull request #10648 from edubox/feat/libc-pad-launch-attr
feat(libc): forward pthread attributes in _Pad::_Launch
2026-10-26 10:42:58 +13:00
Adrià 9c6d153dec Merge pull request #10419 from iamthehimansh/split/macos-build
build: compile FileStream, error categories, thread priority and two tests on macOS
2026-10-25 22:35:29 +01:00
Adrià a940685129 Merge pull request #9505 from EagleBearerYS/port/fable-shared-map-views
refactor(libc): map a run of shared guest pages as one view on Windows
2026-10-25 22:33:17 +01:00
Adrià 26ba9b6b71 Merge pull request #9499 from EagleBearerYS/fix/libkernel-signal-handler-mask
fix(libkernel): block a signal while its handler runs and honour SA_RESETHAND
2026-10-25 22:05:12 +01:00
Dean Galvin 676ee4fe42 Merge branch 'main' into pr8903 2026-10-26 09:35:29 +13:00
orezraeyandClaude Opus 5.5 2fd60d3ebd feat(libc): export __fe_dfl_env as measured on a PS5
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 17:30:06 -03:00
Dean 74a55da254 Merge pull request #10688 from edubox/feat/libc-mtx-timedlock
feat(libc): implement _Mtx_timedlock
2026-10-26 09:21:46 +13:00
Adrià 91a5573911 Merge pull request #9479 from EagleBearerYS/fix/libc-scanf-integer-widths-windows
fix(libc): convert scanf integers as FreeBSD does on Windows
2026-10-25 20:52:26 +01:00
Adrià FranchandClaude Sonnet 5.5 3191597d51 fix(libc): declare fetch seq_cst helpers in the public header
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-25 19:16:24 +01:00
AlxcBTW 37813eabeb test(libc): cover the Annex K stream printf and scanf functions 2026-10-25 19:04:10 +01:00
Eduardo Ruiz 1adc418e6e feat(libc): forward pthread attributes in _Pad::_Launch 2026-10-25 18:34:18 +01:00
Adrià 7b7d445bfb Merge pull request #9439 from milescoviello/feat/trace-calls-file
feat(libc): write the called imports to APS5_TRACE_CALLS_FILE every 10 seconds
2026-10-25 17:42:50 +01:00
Adrià c661d9fae2 Merge pull request #9133 from fogydes/feat/libSceLibcInternal-posix-spawn
feat(libSceLibcInternal): implement posix_spawn process creation and reaping
2026-10-25 17:38:41 +01:00
Adrià 0a77bbf18c Merge pull request #9170 from rooklz/fix/libc-thrd-id
fix(libc): return the calling thread from _Thrd_id as the console's libc.prx does
2026-10-25 17:34:31 +01:00
Dean Galvin e890f802ed Merge branch 'main' into pr10786 2026-10-26 05:32:41 +13:00
verusferro 1d31901c4b feat(libc): format num_put<char>::do_put as the console's libc does
The num_put facet's eight do_put overloads build the console's printf format from the stream flags, format through snprintf and lay out the result as the SDK libc.prx does: thousands separators from the stream locale's numpunct, its decimal point, fill and width with left, right and internal adjustment, true and false names under boolalpha, and the console's prefix and infinity rules for floating point.
2026-10-25 19:19:16 +03:00
verusferro 3338ffefff feat(libc): format time_put<char>::do_put as the console's libc does
The time_put facet's do_put formats % with the modifier and conversion through strftime and writes the result through the output iterator's stream buffer, following the SDK libc.prx: it stores into the put area while room remains, calls overflow otherwise, and marks the iterator failed when overflow returns eof or the buffer is null.
2026-10-25 19:18:04 +03:00
Dean 5e675163f0 Merge pull request #9916 from JJenkx/windows/printf-decimal-console
fix(libc): round and cap %e, %f and %g as titles' libc.prx does
2026-10-26 04:45:09 +13:00
Himansh Raj fefd2997b7 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-25 21:00:46 +05:30
Dean 15e1e72a21 Merge pull request #10542 from anizayazcodpro-png/feat/libc-iswascii
feat(libc): implement iswascii
2026-10-26 04:19:25 +13:00
Dean Galvin a006b57dbb fix(libc): declare the underflow_error destructor once in the public header
The new export is declared next to its siblings in prx/libc/include/Api.hpp and GuestUnderflowError.cpp uses the canonical declarations instead of local externs, which public_headers rejects.
2026-10-26 03:54:56 +13:00
Yunus Shaikh 8be8dc83af Merge main into fix/libkernel-signal-handler-mask
Main's #10706 moves the declarations of exported functions and their types
into the libraries' public headers, and gives WaitForPendingInSet a
KernelTimespec timeout. The merge keeps this branch's DeliverUnblockedPending
and ChangeBlockedMask with main's KernelTimespec. It takes main's side of
the declarations in GuestSignalSets.cpp, whose setjmp and longjmp this
branch had added and libc's Api.hpp now declares. GuestSignalHandlerMask.cpp
includes the libkernel and libc public headers in place of its own
declarations and GuestSignalSet and GuestSigaction types, as the
public_headers audit requires.
2026-10-25 07:05:46 -07:00
Himansh Raj c150109f72 Merge remote-tracking branch 'origin/main' into split/macos-build 2026-10-25 19:00:47 +05:30