Commit Graph

52 Commits

Author SHA1 Message Date
Akul Tyagi b4e2ee0a13 feat(libc): implement __powidf2
The H+8UBOwfScI import was a throwing stub (libcCyberUnknown08). It is
the NID of "__powidf2", the double-precision integer-power helper that
complements __powisf2.
2026-10-13 19:00:24 +05:30
hamb3r b8a1cbe42b fix(libc): add missing Unity engine static imports 2026-10-12 01:04:39 +03:00
Feuris e2b11c2dd8 feat(libc): implement abs 2026-10-11 06:41:00 -03:00
MarcZX100 b603d19bc4 fix(libc): match console mutex failure behavior 2026-10-10 22:47:34 +00:00
David 9277d06705 feat(libc): implement the Dinkumware mutex and condition exports
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 22:46:48 +00:00
Adrià 0de1dfdff8
Merge pull request #3046 from MarcZX100/codex/libc-secure-format-scan-3032
feat(libc): implement vsnprintf_s and vsscanf_s
2026-10-11 00:05:28 +02:00
pushkarreddyy e251de849d feat(libc): implement vsnprintf_s and vsscanf_s
(cherry picked from commit 4ca866ea3b989da6947ad110f4d6c7f4efbe27c8)
2026-10-10 23:52:11 +02:00
David 51fca3cec3 feat(libc): implement _WStoul, _Iswctype and swscanf_s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 23:44:00 +02:00
Adrià 948a526c23
Merge pull request #407 from Pouare514/feat/deathloop-loading
feat(libs): Deathloop loading support (Ampr, NetCtlApDialog + stubs)
2026-10-10 11:29:40 +02:00
Pouare514 998016e789 fix(libs): drop stubs now owned by main after rebase 2026-10-09 20:13:56 +02:00
Pouare514 b6c70b1135 fix(libs): rename loader stubs to recomputed real names, drop clashing ones 2026-10-09 20:12:31 +02:00
Pouare514 e96ec6da7d feat(libs): Deathloop loading support (Ampr, NetCtlApDialog, Party + stubs) 2026-10-09 20:11:35 +02:00
Josip Parlov 9cea268f9e refactor(libc): name the 12 Cyberpunk stubs the NID database resolves 2026-10-09 17:32:08 +02:00
Adrià 34c20eedbb
Merge pull request #1216 from polysius/fix/libc-phantom-heap-report
fix(libc): drop the LibcHeapErrorReportForGame export no title imports
2026-10-08 11:03:42 +02:00
ploysius 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 <noreply@anthropic.com>
2026-10-07 13:58:15 -04:00
Achraf Reyani 42b88bfe83 refactor(libs): name the libc and Json2 stubs the NID database resolves
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:13:36 +09:00
ebosido444-ai e14184b915 feat(libc): implement std_execute_once
The plain-named twin of std::_Execute_once delegates to that symbol and inherits its call_once semantics; the name-equivalence assumption is recorded in TechnicalDebt. Registers guest_std_execute_once_tests.
2026-10-06 13:11:41 +03:00
Dean 9c3ef3a6a9
Merge pull request #735 from adriadam10/feat/libc-execute-once
feat(libc): implement std::_Execute_once
2026-10-06 12:38:07 +13:00
Dean 74fefcaae3
Merge pull request #741 from alpinevm/feat/libc-strnlen-s
feat(libc): implement strnlen_s
2026-10-06 12:14:04 +13:00
Adrià Franch 948d3cd047 feat(libc): implement std::_Execute_once
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-06 00:28:52 +02:00
Dean 2707b3a3c8
Merge pull request #736 from adriadam10/feat/libc-wcsrtombs-s
feat(libc): implement wcsrtombs_s
2026-10-06 09:31:24 +13:00
Dean 2811e0106f
Merge pull request #731 from adriadam10/feat/libc-xtime-get-ticks
feat(libc): implement _Xtime_get_ticks
2026-10-06 09:30:42 +13:00
Dean 7c0528a8f3
Merge pull request #718 from adriadam10/feat/libc-div
feat(libc): implement div
2026-10-06 08:00:09 +13:00
Adrià Franch 55f548d6bc feat(libc): implement wcsrtombs_s
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 20:29:18 +02:00
Cliff Syner b9c1c8848f feat(libc): implement strnlen_s
The DQbtGaBKlaw import was a throwing stub (libcCyberUnknown17). It is
the NID of "strnlen_s", which C11 K.3.7.4.4 defines as strnlen that
returns 0 for a null pointer.

The removed stub comment from #358 described its call site as
float -> float, which contradicts the hash-verified name; #492 left the
stub untouched for that reason.
2026-10-05 18:26:06 +00:00
Adrià Franch 3f2e5150c2 feat(libc): implement _Xtime_get_ticks
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 20:16:11 +02:00
Adrià Franch afe2b14a84 feat(libc): implement div
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 19:53:39 +02:00
Adrià Franch fbf0099790 feat(libc): implement std::_Xrange_error and the range_error type
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-05 19:49:33 +02:00
Pouare514 630cf0cf39 fix(libc): drop duplicate quick_exit stub clashing with the real export 2026-10-05 00:53:03 +02:00
Pouare514 1c724c0228 feat(libs): Cyberpunk 2077 loading support (REDGalaxy + stubs)
# Conflicts:
#	core/libs/prx/libSceContentExport/Export.cpp
#	core/libs/prx/libScePlayGoDialog/Export.cpp
2026-10-02 23:14:04 +03:00
asimplestray b42db4b6f3 feat(libc): implement RaiseEv, catchReturnFromMain and reallocalign 2026-09-30 23:55:00 +00:00
boykopovar 488e678aa8
Merge pull request #161 from asimplestray/feat/libc-lifecycle
feat(libc): implement cxa lifecycle aliases and init_env
2026-09-30 20:35:36 +03:00
asimplestray 3bf115585c feat(libc): implement cxa lifecycle aliases and init_env 2026-09-29 21:29:13 +00:00
asimplestray 77194e4561 feat(libc): implement fputwc, fputws and fscanf 2026-09-29 21:25:07 +00:00
OverkillLabs d9f8d87c27 refactor: strip explanatory comments to match repo conventions
Comments in this codebase may only mark technical debt (per
docs/dev/CONVENTIONS.md), plus the #endif and namespace-close
structural exceptions. Removes the descriptive comments added on
this branch across PreciseWait.hpp, FormattingWide.cpp, the
direct-memory pool query/free-run plumbing, and the module loader
wiring, keeping the two allowed structural markers intact.
2026-09-29 04:18:04 +03:00
OverkillLabs 940f28d102 libc: wide-char formatting and precise sub-tick waits
- Add FormattingWide.cpp implementing vswprintf_nid_postfix and
  wprintf_nid_postfix, the only wide-char printf-family functions
  upstream had left as unimplemented stubs (Formatting.cpp's checked
  and unchecked narrow printf/scanf families are unaffected). Removes
  the dead vswprintf_nid_postfix stub from Export.cpp.
- Add PreciseWait.hpp: std::condition_variable::wait_for cannot return
  in under about one system tick on this MinGW toolchain regardless of
  the requested budget, even with NtSetTimerResolution; PreciseSleepUs
  uses a high-resolution waitable timer instead (~0.5ms vs ~15.6ms).
  Header-only for now: its guest-side callers (Equeue/EventFlag/
  Semaphore/AgcDriver wait loops) are out of scope for this change, so
  it is not wired into them here.
2026-09-28 13:18:07 +03:00
Dean Galvin 20cc23438f feat(libc): sscanf_s on linux
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ButHENCbXXt8h4EZuWUabJ
2026-09-28 16:53:29 +13:00
devilismyfriend a503d0b617 Merge remote-tracking branch 'origin/main' into feat/demons-souls-boot
Brings in main up to 9958d26 (homebrew runtime, POSIX wrappers in
libkernel, sce_module guest modules and --skip-sce-module, the --to-intel
general pipeline, libSceRandom, libSceRtc, libScePosixForWebKit,
libRenoirCore, test wiring).

Resolutions where both sides implemented the same thing:
- libkernel pthread: main's structure (lazy static initialisation,
  destroyed markers, MutexOperations/CondOperations, mutex protocol and
  condattr clock) with this branch's TimedWait deadlines and condition
  (precise timed lock/wait on Windows), wait tracing, the adaptive mutex
  type 4, POSIX default ERRORCHECK mutexes, EDEADLK/EPERM results instead
  of throws, and condition clocks honoured for absolute timeouts.
- libc locale: the guest Dinkumware ABI (_Locimp, facet vtables, short
  ctype/case tables, locale ids, stream storage) is kept because guest code
  inlines those layouts; main's C character functions are kept on top.
- libc stdio/strings/math: main's stream functions (guest FILE status
  sync), strerror/perror, remove, formatting, string and math exports win
  over this branch's duplicates.
- libc paths: main's working directory with this branch's path aliases
  resolved on the normalised guest path.
- libkernel file: this branch's sceKernel* results as SCE errors, main's
  POSIX wrappers and both fstat helpers.
- relinker: this branch's stub lowering keeps its trampolines through the
  main executable path; guest modules refuse lowerings that need stubs.
- AGC driver: main's rendering wait is executed by this branch's workers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo
2026-09-27 10:52:21 -07:00
boykopovar ae2e5cba7e feat(libc): implement heap trace info 2026-09-27 11:43:36 +03:00
devilismyfriend f3ac61000d feat(runtime): guest arena, kernel thread/sync/file APIs, crash hooks
- libc: reserve guest memory in one arena below the PS5 map limit with
  MEM_WRITE_WATCH (GuestArena) and a caching guest heap; the allocation
  registry gains a generation counter, an invalidator callback for the
  driver's page cache and a pin waiter for leased ranges. This replaces
  the fault-based GuestMemoryTracking/GuestMemoryBacking layer, whose
  files are removed.
- libkernel: mmap/mprotect/munmap on the arena, flexible memory budget,
  real sceKernelVirtualQuery; POSIX pthread layer, rwlocks, timed locks,
  TSD, event flags; 0.5 ms scheduler tick and high-resolution sleeps;
  TSC/clock/time functions; file APIs return SCE errno codes; the APR
  file-streaming API.
- libc: vectored crash reporter with backtraces for fatal exceptions,
  SIGABRT, UCRT invalid parameters and process exit; SSE4a EXTRQ/INSERTQ
  emulation for Intel hosts; %ls/%lc/%S/%C with the guest's 16-bit
  wchar_t; hand-written setjmp/longjmp for the guest jmp_buf; a path
  alias table for short save-data mount points; more string, stdio and
  math exports.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177gthrWEBBfBu5xJDXgBfo
2026-09-25 16:27:49 -07:00
boykopovar 67b778055a refactor(libs): use local cmakelists in libc 2026-09-11 12:22:19 +03:00
boykopovar abc72da741 feat(libs): define vabi macros + add to declarations 2026-09-10 08:07:03 +03:00
boykopovar 81d7adea95 feat(log): log system detalization 2026-09-08 12:10:49 +03:00
boykopovar 8ac1af0513 fix(libc): no inline for not impl helper 2026-09-06 15:20:07 +03:00
boykopovar 1752e1d78e refactor(libc): separate platform and compiler specifics in libc 2026-09-06 12:41:33 +03:00
boykopovar 57aedfcff0 chore(libs): include exceptions to libc export 2026-09-05 22:32:29 +03:00
boykopovar c27c547810 feat(libs): add locale support funcs to libc 2026-08-22 16:34:48 +03:00
boykopovar 85e3047c04 feat(libs): add atexit and atomic functions to libc 2026-08-22 16:22:19 +03:00
boykopovar 5a1d7525f9 feat(libs): libc impl (wip) 2026-08-22 16:00:29 +03:00
boykopovar 8672a5cc3d fix(libs): libc export flag name fix 2026-08-22 11:18:42 +03:00