* launcher: keep primary update feed answer when the fallback request fails
When the primary feed is reachable but its tag differs from the build tag,
the result was discarded and the GitHub API fallback was consulted. If the
fallback request failed (api.github.com rate-limits unauthenticated
requests), the launcher reported an error even though the primary feed had
already returned a usable update answer with a working release URL. Keep
the primary feed answer and show it if the fallback fails.
* emulator: validate numeric CLI arguments
--screen-width, --screen-height, --gpu, and --vblank-frequency were parsed
with Common::ToInt32/ToInt64, which ignores std::from_chars errors and
returns 0, so values like "--screen-width abc" or "--gpu xyz" were
silently accepted: zero screen size, or GPU 0 selected instead of auto
(-1). Reject invalid values with an error message like the other options,
using from_chars-based helpers (ParseUint32/ParseInt32); reject zero
screen dimensions.
* tests: add LeastRecentlyUsedCache regression tests
Cover the LRU cache walk order, tick filtering in ForEachItemBelow,
early-exit boolean callbacks, Touch reordering and same-tick skips,
Free, and freed-id reuse by later inserts. Modeled on BitArrayTests.
* tests: use a tick cutoff that detects a stale newest-item tick
Collect(cache, 35) also visits c when Touch(c, 35) failed to update
its tick (30 <= 35). Use a cutoff of 30 and expect only b.
* Run LRU cache tests in CI
---------
Co-authored-by: nmzik <Nmzik@mail.ru>
* audio: support standard NGS2 PCM16 sampler playback
Extend the existing fixed-point PCM path to standard samplers, loops, and progress reporting. Apply voice events immediately and honor callback interruption during source advancement.
Reuse upstream rate and pitch handling. Add regression coverage for streaming, routing, callbacks, loops, and custom sampler controls; ngs2_sampler passes.
* audio: apply NGS2 rear low-pass filters
Handle rear low-pass FCQ controls at the output sample rate with per-channel history and channel masks. Preserve filter tails through streaming gaps and use the standard pi constant for coefficients.
Add regression coverage for frequency response, control layout, channel isolation, and starvation/refill continuity. Emulator build and both audio test suites pass.
* Preserve resampling phase for accepting voices
Only reset voice.sample_phase when there are no blocks and the voice does not accept blocks (change in src/libs/ngs2.cpp). Add TestResamplingPhaseAfterStarvation to tests to ensure sampler and custom sampler retain resampling phase and pending source advancement after starvation, and that SetupSampler still resets the phase. This prevents resampling phase loss during starvation/refill across sample rates.
* audio: correct sampler controls, lifecycle, and filter tails
---------
Co-authored-by: nmzik <Nmzik@mail.ru>
LINK_FLAGS is a space-delimited string, so when the build path contains
spaces the linker map option is split into bogus arguments and the final
link fails:
clang++: error: no such file or directory:
'pro/KytyPS5/_Build/linux/kyty_emulator_clang_lld.map'
Move -Wl,-Map=<path> out of LINK_FLAGS into target_link_options, which
CMake passes to the linker as a single argument. This completes #26 for
the WIN32 OR LINUX branch (clang/gcc builds); the clang-cl branch was
already converted there.
* remove outdated ninja setup action
* Remove deprecated ninja setup action
The seanmiddleditch/gha-setup-ninja action has been archived by its
maintainer, who explicitly states that Ninja is now pre-installed on
all GitHub-hosted runners. This removes the action from all three
build jobs (Windows, macOS, Linux) and removes ninja from the package
install lists on macOS and Linux.
* Add automatic ccache/sccache detection to CMakeLists.txt
Detects sccache (preferred on Windows/MSVC) or ccache at configure time
and sets CMAKE_C_COMPILER_LAUNCHER / CMAKE_CXX_COMPILER_LAUNCHER
automatically. Works for local builds without manual flags.
Priority: sccache > ccache (sccache handles MSVC PDBs better).
* Delete github-actions-version-research.md
* Respect user-specified CMAKE_C_COMPILER_LAUNCHER / CMAKE_CXX_COMPILER_LAUNCHER
Only auto-detect sccache/ccache if no launcher was explicitly provided
via -DCMAKE_C_COMPILER_LAUNCHER=... or -DCMAKE_CXX_COMPILER_LAUNCHER=...
* Preserve explicit compiler launcher settings per language
---------
Co-authored-by: nmzik <Nmzik@mail.ru>
* Persist save-data memory across restarts
* Fix SetSaveDataMemory2 data loss, split saves per user, add atomic writes everywhere
- SaveDataSetSaveDataMemory2 treated data_num=0 as "no entries" even when
a valid data pointer was supplied. Astro Bot calls this with data_num=0
meaning "one entry, at data[0]" (an implicit-count convention), so every
real save write from it was silently dropped as a no-op. Default
data_num to 1 when data is non-null, matching that convention.
- SaveDataSetupSaveDataMemory2/Get/SetSaveDataMemory2 rejected any call
that included a non-null icon pointer. Icon persistence isn't
implemented, but titles are allowed to pass one anyway; rejecting the
whole call over it made every title that does so fail outright. Ignore
icon instead of rejecting.
- SaveDataMount3/SaveDataTransferringMount/SaveDataDelete built their
save-data path from title+dir_name only, dropping the user_id PS5
local users are keyed by (unlike the newer SetSaveDataMemory2 layout,
which already nests by user_id). Nest these under user_id too so saves
from different local users can no longer collide. No migration for the
old flat layout - the project is still pre-release/experimental.
- Classic SaveDataMount3-mounted titles (Blasphemous, Dead Cells, ...)
write their save files directly through the guest's normal file I/O
once mounted, bypassing SaveData's own write path entirely, so they
had none of the crash-safety SetSaveDataMemory2 already had. Added the
same protection at the file-system layer: a guest file opened under a
/savedataN mount that recreates the file from scratch (O_CREAT and/or
O_TRUNC) is now written to a .tmp shadow file and atomically replaces
the real one on close, instead of being truncated in place.
- Both write paths now back up the file they're about to replace into a
sibling "backups" folder (same filename, no added suffix) before the
atomic replace, so a manual recovery copy of the previous save always
survives a write - even one that "succeeds" but wasn't wanted.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
* Fix save-memory compatibility and preserve existing saves
---------
Co-authored-by: nmzik <Nmzik@mail.ru>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
* loader: emulate immediate SSE4a instructions on macOS
* tests: simplify macOS SSE4a test integration
Keep the Darwin target, CTest registration, and aggregate dependency in
one conditional block without a separate target list. Preserve the
standalone target when BUILD_TESTING is disabled.
Lowercase the test filename and diagnostic prefix, and drop unrelated
formatting changes from the instruction emulator.
Credit Brandon Strong's related SSE4a work in
https://github.com/KytyPS5/KytyPS5/pull/467.
Co-authored-by: Brandon Strong <brandostrong@gmail.com>
---------
Co-authored-by: nmzik <Nmzik@mail.ru>
Co-authored-by: Brandon Strong <brandostrong@gmail.com>
* graphics: do not arm a fast clear from a read-modify-write dispatch
* tests: cover compute metadata clear classification
---------
Co-authored-by: nmzik <Nmzik@mail.ru>
* feat(project): add root cmakelists for ide auto-detect
* cmake: use repository root as source directory
---------
Co-authored-by: nmzik <Nmzik@mail.ru>