progress.py stores the names of implemented and pending items, can
measure another source tree with --root and prints a Markdown diff of
two runs with --compare. The Progress report workflow compares every
pull request with its base, and Progress comment posts the result as a
single comment, updated on every push and removed when progress no
longer changes. Commenting runs as a separate workflow_run so pull
requests from forks never run with write permissions.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
tools/progress.py counts implemented prx functions and RDNA instructions
recognized by the shader recompiler, and renders treemaps, badges and an
index page. The Progress workflow deploys them to GitHub Pages on every
push to main, so nothing generated is committed to the repository.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Feat/sce module load
The game can expect its modified prx from the `sce_module`/`sce_modules` folder. The relinker now converts PRX files from sce_module to `dll`/`so` format with `.guest.prx` postfix. During linking, libraries from `sce_module` are given priority. If a library from `sce_module` fails to import a symbol or contains a syscall, an exception will be thrown.
This made it possible to remove the GuestLocale formats that were customized for specific guests. Launched apps now use their own PRX files from the `sce_module` folder.
Locale handling functions now use `std::locale`.
Added a lot of posix functions to `libkernel` (they are thin wrappers and do what the existing non-posix versions do)
Minecraft Legends' libcohtml.Prospero.prx imports 23 NIDs from lib
libRenoirCore.PS5_v1 (docs/legends-unresolved-nids.json). Clear names are
unknown, so each export is exposed under its raw NID via APS5_EXPORT
alias (<NID>_nid_no_patch_cut), which nid_patcher strips to the
literal NID instead of hashing.
Stubs follow KytyPS5 UnresolvedImportStub policy (log call + return 0)
via APS5_LOG_OUT rather than throwing NotImplemented.
test: wire up the orphaned exception runtime test
- `core/libs/CMakeLists.txt`: registered `ExceptionRuntime.cpp` as `exception_runtime_tests`/`exception_runtime`, following the existing `Guest*.cpp` test pattern, linked against `libc`.
test(agc): fix and re-enable 3 of 8 bitrotted AGC driver tests
- `agc_driver_graphics_tests`: fixed the link failure by adding the three missing source files and linking `shader_recompiler_agc_driver`. Still fails at runtime against stale assertions accumulated over many commits of not being built (an expected "not implemented" message that texture support since removed, and a sampler test fixture value that no longer fits its 12-bit field). Left `EXCLUDE_FROM_ALL`; fixing the assertions is a separate pass across the whole 1150-line test file, not a build fix.
- `agc_driver_recompiler_tests`: root-caused but not fixed. It needs `COMPUTE_NUM_THREAD_X` set, and its pass condition checks for a "not implemented" stub error that no longer exists now that the real recompiler is in. Restoring its original intent needs a shader deliberately built to fail recompilation, which is a design decision, not something this PR should decide unilaterally. Left `EXCLUDE_FROM_ALL`.
- `agc_driver_tests`, `agc_shader_memory_tests`, `agc_driver_flip_tests` and `agc_driver_pm4_tests` already passed; registered them with `add_test` so none of the four can bitrot silently again.
fix: correct sscanf %x signedness and avoid a substr copy
- `core/libs/prx/libSceSysmodule/Export.cpp`: `devMajor`/`devMinor` now `unsigned int`.
- `core/libs/nid/include/nid/NidPatcherUtils.hpp`: two `substr(0, n)` calls replaced with `resize(n)`.
fix(exceptions): interpose libstdc++ ABI on Linux so the project's own unwinder drives it
- `OwnPersonality()` in `Unwind.cpp` now recognises the bare `__gxx_personality_v0` wrapper on Linux too (previously Windows-only).
- `Exports.cpp` exports the real ABI names (`__cxa_throw`, `__cxa_begin_catch`/`end_catch`, `__cxa_rethrow`, `__cxa_allocate`/`free_exception`, `__cxa_call_terminate`, `__cxa_get_exception_ptr`, `__cxa_current_exception_type`, `__cxa_init_primary_exception`, the `std::terminate`/`uncaught_exception(s)` mangled names, and the core `_Unwind_*` entry points) through the existing `GCC_GLOBAL_ALIAS` assembler-alias macro rather than new C++ definitions (a plain redefinition under these names conflicts with `<cxxabi.h>`'s own declarations). This lets ELF symbol interposition make this project's own implementation win process-wide over `libgcc_s.so.1`/`libstdc++.so.6`.
- `__cxa_init_primary_exception_nid_postfix` is new: GCC 13's inline `std::make_exception_ptr` calls `__cxa_init_primary_exception`, and nothing implemented it before.
- Deliberately did not alias `__dynamic_cast`, `__cxa_pure_virtual` or `__cxa_deleted_virtual`. Nothing in `core/libs/prx` needs them rerouted, and doing so would divert every RTTI cast in libstdc++ and third-party code (SDL2, glslang) through this project's slower walker for no benefit.
Maintainer noted the opt-in-via-documented-flag SPIR-V validation gap
isn't the silent-stub category this doc tracks; the README correction
stands on its own.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
These EXCLUDE_FROM_ALL targets weren't registered with add_test, so
they silently bitrotted with no CI/ctest visibility:
- agc_driver_graphics_tests: fixed a link failure (Draw.cpp, Pipeline.cpp
and GraphicsPipelineCache.cpp were never added to the target's sources
when the test started calling into them). Still fails at runtime against
several stale assertions (a removed "not implemented" error message, a
sampler fixture value that doesn't fit its bitfield) accumulated over
many commits of not being built; left EXCLUDE_FROM_ALL pending an
assertion-maintenance pass.
- agc_driver_recompiler_tests: root-caused (missing COMPUTE_NUM_THREAD_X
register setup, plus a pass condition checking for a stub error message
that no longer exists now that the real recompiler is implemented) but
left unfixed and EXCLUDE_FROM_ALL — restoring its original intent needs
a shader deliberately built to fail recompilation, a design decision.
agc_driver_tests, agc_shader_memory_tests, agc_driver_flip_tests and
agc_driver_pm4_tests already passed; registered them with add_test too
so none of the five can bitrot silently again.
agc_driver_bda_device_tests: dropped from this commit's scope. Upstream
PR #20 already proposes the same one-line BdaContracts.cpp fix (matching
the runtime message's "signature" text), so BdaContracts.cpp is left
untouched here to avoid duplicating that fix. The test target stays
defined (EXCLUDE_FROM_ALL, still buildable by name) but is no longer
registered with add_test until #20 or an equivalent fix lands.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ExceptionRuntime.cpp existed complete and working but was never
registered in CMakeLists.txt, so it never built or ran. Wired it in
following the existing Guest*.cpp test pattern.
The other three orphaned test files (PthreadStart.cpp, FileStreams.cpp,
Formatting.cpp) were left out: each has genuine bitrot against current
code (a moved header, fseek returning errno instead of throwing on an
invalid whence, and vsnprintf's expected va_list mutation) that needs a
source-level decision, not a CMake wiring fix.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
README stated SPIR-V is "successfully produces validated via Spirv-Tools"
unconditionally, but ANYPS5_ENABLE_SPIRV_TOOLS defaults OFF and the only
validation call is gated behind it, so this doesn't happen in a default
build. Caveated the README line and added the gap to TechnicalDebt.md's
silent-stubs list. Also fixed a stale line-number citation there (a prior
refactor moved the SpirvTargetOptions assignment block from row 219 to 212).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
libSceSysmodule/Export.cpp parsed /proc/self/maps device major/minor
numbers into signed int with a %x format, which is undefined behaviour
per the C standard even though it happened to work on this target;
switched to unsigned int to match the format specifier.
NidPatcherUtils.hpp's StripNidPostfix built a truncated copy with
substr(0, n) where the prefix is already the string itself; resize(n)
does the same truncation without the extra allocation and copy.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Exports.cpp aliased the real std::uncaught_exception(s) mangled names
directly to __cxa_uncaught_exception(s)_nid_postfix instead of the
existing _ZSt18uncaught_exceptionv_nid_postfix/_ZSt19uncaught_exceptionsv_nid_postfix
wrappers, leaving the latter as dead code and breaking the file's own
bare-name -> matching-nid_postfix alias pattern (caught by fleet QA
review, no functional impact since it's a raw symbol alias and both
sides return in the same register).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
On native Linux these PRX shared libraries and their test executables
dynamically link real libstdc++/libgcc, so a plain throw went through the
system's __cxa_throw/_Unwind_RaiseException. That still invoked this
project's own __gxx_personality_v0_nid_postfix (the CIE's personality
pointer is a raw function address, agnostic to which unwinder is walking
the stack), but handed it libgcc's incompatible private _Unwind_Context
layout, corrupting every field Personality.cpp reads and aborting with no
exception message.
Fix: OwnPersonality() now recognises the bare __gxx_personality_v0 wrapper
on Linux too (previously Windows-only), and Exports.cpp exports the real
ABI names (__cxa_throw, __cxa_begin_catch/end_catch, __cxa_rethrow,
__cxa_allocate/free_exception, __cxa_call_terminate, __cxa_get_exception_ptr,
__cxa_current_exception_type, __cxa_init_primary_exception, the std::
terminate/uncaught_exception(s) mangled names, and the core _Unwind_*
entry points) via the existing GCC_GLOBAL_ALIAS assembler-alias mechanism,
so ELF symbol interposition makes this project's own implementation win
process-wide over libgcc_s.so.1/libstdc++.so.6. __cxa_init_primary_exception
is newly implemented; GCC 13's inline std::make_exception_ptr needs it and
nothing provided it before.
Fixes 7 previously-aborting tests: guest_rendering_wait, guest_buffer_reuse,
guest_shader_link, guest_system_exit_parameters, guest_once, guest_memory,
guest_search.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
feat(rtc): implement libSceRtc date and tick functions
- Ticks count microseconds since 0001-01-01 00:00:00 in the proleptic Gregorian calendar, up to 9999-12-31 23:59:59.999999. `sceRtcGetTickResolution` returns 1000000.
- Validation (`sceRtcCheckValid`, `sceRtcIsLeapYear`, `sceRtcGetDayOfWeek`) returns the matching `SCE_RTC_ERROR_INVALID_*` code (`0x80B50002`–`0x80B5000E`).
- Conversions: `sceRtcGetTick`/`SetTick`, `GetTime_t`/`SetTime_t`, `GetWin32FileTime`/`SetWin32FileTime`.
- Current time: `sceRtcGetCurrentTick`, `GetCurrentClock`, `GetCurrentClockLocalTime`. `sceRtcGetCurrentNetworkTick` uses the host clock.
- UTC and local time conversion through the host time zone.
- `sceRtcFormatRFC3339` (`YYYY-MM-DDThh:mm:ss.cc` plus `Z` or `±hh:mm`) and `sceRtcParseRFC3339`.
- Tick arithmetic (`sceRtcTickAdd*`) rejects results outside the valid range with `SCE_RTC_ERROR_INVALID_VALUE`.
- New exports: `sceRtcGetDaysInMonth`, `sceRtcTickAddMonths` and `sceRtcTickAddYears`. The last two clamp the day to the end of the target month (2024-01-31 + 1 month = 2024-02-29).