Commit Graph
12621 Commits
Author SHA1 Message Date
Stenzek 7547f640c5 GTE: Factorize NCLIP to use three multiplies
The cross product can be computed with half as many multiplies. None of
the intermediates can overflow, and only the sum was being range checked,
so MAC0 and the flags are unchanged.
2026-10-10 21:47:43 +10:00
Stenzek ef5bffc8d7 GTE: Specialize instruction handlers on sf/lm
The recompilers resolve the handler once per instruction, so return a
variant with the sf/lm bits baked in. Shift amounts and IR saturation
limits become constants, rather than being decoded for each execution.
2026-10-10 21:47:43 +10:00
Stenzek 811585c42c GTE: Force inline matrix/lighting/projection helpers
The triple variants were making up to nine calls per instruction, with
FLAG and IR1-3 going through memory between each of them. PGXP's part of
RTPS is moved out of line instead, so the integer path stays compact.
2026-10-10 21:47:43 +10:00
Stenzek 78f91b6d34 GTE: Only sign extend MAC results on overflow
Sign extending to 44 bits is a no-op unless the value is out of range,
so move it to the overflow path, and test both bounds with a single
comparison. Shortens the dependency chain of each matrix row.
2026-10-10 21:47:43 +10:00
Stenzek cc9be54402 GTE: Add regression tests
Covers IR/colour saturation, 44-bit MAC overflow wrapping, NCLIP and ORGB
against reference formulas, and hashes the register state after random
instructions through both the interpreter and recompiler entry points.
2026-10-10 21:47:43 +10:00
Stenzek 276b8adb2d SPU: Extract reverb-master-enable out of loop 2026-10-10 21:47:42 +10:00
Stenzek aad9c4ebec SPU: Pack reverb FIR coefficients into 16-bit lanes
Use three packed multiply-adds for the 20-tap upsampling FIR and widen
the shared coefficients for downsampling. Preserve the final shift and clamp.
The absolute coefficient sum is 31142, keeping every s32 sum within range.

Validated output, persistent state, and RAM against the original across
8,192 frames using both SSE4.1 and SSE2; compiled with clang-cl /O2.
2026-10-10 21:47:42 +10:00
Stenzek e7098b5156 SPU: Skip reverb output filtering at zero volume
Bypass the read-only upsampling FIR for channels with zero output volume.
Keep updating feedback and resampling history so re-enabling output is exact.

Validated output and persistent state against the original implementation
across 8,192 frames with independent output-volume and enable transitions.
2026-10-10 21:47:42 +10:00
Stenzek 69f643c195 SPU: Fast-path ADPCM blocks without predictors
Decode shifted nibbles directly when both predictor coefficients are zero,
preserving interpolation history, predictor history, and block flags.

Validated against the original decoder across 262,144 blocks and all
header filters/shifts; compiled with clang-cl /O2.
2026-10-10 21:47:42 +10:00
Stenzek 9deb896297 CPU/Recompiler: Handle large ARM64 backpatch cycle counts
Materialize cycle counts in a scratch register when they do not fit an ADD/SUB immediate, avoiding assertions for long blocks.
2026-10-10 21:47:42 +10:00
Stenzek 470ef0656f CPU/Recompiler: Use 32-bit ARM64 fastmem LUT indices
Shift the guest address into a W register in load and store paths, matching operand widths and avoiding VIXL_DEBUG assertions.
2026-10-10 21:47:42 +10:00
Stenzek a5d6e76ef1 CPU/Recompiler: Align ARM32 backpatch thunk calls
Pad odd register save lists with the reserved state register to preserve the required eight-byte stack alignment when calling memory helpers.
2026-10-10 21:47:42 +10:00
Stenzek beb75d1dec CPU/Recompiler: Decode ARM32 load exceptions from r0
Negate the low half of the checked-read error return so address and bus errors retain their correct exception codes.
2026-10-10 21:47:42 +10:00
Stenzek 6db5f053d9 CPU/Recompiler: Truncate ARM64 multiplication results in LO
Clear the upper product bits after extracting HI so an MFLO register rename cannot carry them into a guest fastmem address.
2026-10-10 21:47:42 +10:00
Stenzek 885d5bbdde CPU/Recompiler: Mask constant variable shift counts on ARM
Mask shift counts to five bits before checking for zero, avoiding invalid ARM64 instructions and ARM32 assembler failures for counts such as 32.
2026-10-10 21:47:42 +10:00
Stenzek 22cc43186c CPU/Recompiler: Fix ARM32 VIXL debug builds
Use the assembler addresses for debug scopes and finalize jump patches and trampolines so VIXL_DEBUG can compile and emit code correctly.
2026-10-10 21:47:42 +10:00
Stenzek cb3cfb8c1f CPU/Recompiler: Correct misaligned indirect jump exceptions
Check constant JALR targets and report invalid JR/JALR targets in EPC and BadVaddr before executing the delay slot on every backend.
2026-10-10 21:47:41 +10:00
Stenzek c401e9318d CPU/Recompiler: Preserve pending loads on memory exceptions
Include the pending load in exception flushes so RaiseException commits it before entering the handler on every backend.
2026-10-10 21:47:41 +10:00
Stenzek 3a8b6fccfc CPU/Recompiler: Trap constant signed arithmetic overflow
Detect overflow in folded ADD, SUB and ADDI and use the interpreter exception path, including writes to zero and branch delay slots.
2026-10-10 21:47:41 +10:00
Stenzek bd29ee475f CPU/Recompiler: Dispatch interpreter fallback exceptions
Exit generated blocks when the interpreter raises an exception, preserving its handler PC across all backends and implementing the missing RISC-V and LoongArch fallback paths.
2026-10-10 21:47:41 +10:00
Stenzek e78ab9a273 CPU/Recompiler: Keep link-register delay slots in order
Track ra as the implicit branch-and-link destination and check decoded register dependencies before swapping the delay slot.
2026-10-10 21:47:41 +10:00
Stenzek 0aa0c767e1 CPU/Recompiler: Cancel pending loads on self moves
Compile same-register moves as writes to cancel load delays, preserving constant operands before clearing the destination.
2026-10-10 21:47:41 +10:00
Stenzek ed990b9275 CPU/Recompiler: Respect load delays when swapping NOP slots
Check pending loads before accepting a NOP delay slot so branches read the original register value.
2026-10-10 21:47:41 +10:00
Stenzek 9bedaa6163 FileSystem: Add more ReadFileToString() overloads 2026-10-10 21:47:41 +10:00
Stenzek 6d96829465 FileSystem: More RVO optimizations 2026-10-10 21:47:41 +10:00
Stenzek a8fb9d70e4 FileSystem: Use shared file open for ReadBinaryFile/ReadFileToString 2026-10-10 21:47:41 +10:00
Stenzek aaffbd66d9 FileSystem: Extract find result sorting to function 2026-10-10 21:47:40 +10:00
Stenzek 066d89715c FileSystem: Add error parameter to FTell64() 2026-10-10 21:47:40 +10:00
Stenzek 60aec342eb FileSystem: Make OpenSharedCFile() wrap OpenCFile() on non-Windows 2026-10-10 21:47:40 +10:00
Stenzek 659ff37089 FileSystem: Backport additional helper functions 2026-10-10 21:47:40 +10:00
Stenzek ba3590f902 Core: Don't reset folders when resetting settings
Users having their data save locations would be unexpected.
2026-10-10 21:47:40 +10:00
Stenzek 95722d8e99 Settings: Don't copy controller type to game
These are part of the controller settings...
2026-10-10 21:47:40 +10:00
Stenzek 8bb030b8cf Settings: Add a dedicated key for overlays 2026-10-10 21:47:40 +10:00
Stenzek 4ad124e8d1 StringUtil: Fix possible integer overflow in EncodeAndAppendUTF8() 2026-10-10 21:47:40 +10:00
Stenzek 4e652d5bb9 System: Provide content details to OnSystemStarted()
Avoids the OnGameChanged() call later.
2026-10-10 21:47:40 +10:00
Stenzek 07d3a934a6 GameList: Synchronize settings between FullscreenUI and Qt
Also share translations with other hosts.
2026-10-10 21:47:40 +10:00
Stenzek e02bb9c748 GameList: Allow use of external SettingsInterface 2026-10-10 21:47:39 +10:00
Stenzek d253d0a1d9 GameList: Don't persist cache map between refreshes
It was cleared anyway.
2026-10-10 21:47:39 +10:00
Stenzek a4048c9c37 GameDatabase: Sort disc sets by save title
And allow lookup by name.
2026-10-10 21:47:39 +10:00
Stenzek dbc8b22917 Threading: Add WaitFor() to ConditionVariable 2026-10-10 21:47:39 +10:00
Stenzek 83153676d7 SettingsInterface: Guard against copying to self 2026-10-10 21:47:39 +10:00
Stenzek 93e53494ac Achievements: Separate login and credential saving steps
Allows saving to an external settings interface, not needed on desktop.
2026-10-10 21:47:39 +10:00
Stenzek 364c7bd485 Achievements: Extract bucket names out of FullscreenUI 2026-10-10 21:47:39 +10:00
Stenzek 18e2aa1615 Deps: Update to 20261010 2026-10-10 21:47:39 +10:00
Stenzek 9cb25f7e98 Qt: Fix crash when desktop file check is skipped latest 2026-10-10 21:47:38 +10:00
Stenzek 21b05557c7 Qt: Fix desktop environment conditions 2026-10-10 21:47:19 +10:00
Stenzek cbcbbe1eba GameDB: Disable auto-analog on Khamrai 2026-10-10 15:37:08 +10:00
Davide Pesavento 6c1645fe56 Qt: Fix default value of HideCursorInFullscreen (#3809)
And use the correct recommended value for RenderToSeparateWindow
2026-10-10 12:33:49 +10:00
Stenzek df8059758b Achievements: Don't try to fetch badges without cache
Why are you trying to run two instances out of the same directory anyhow?
2026-10-07 22:15:51 +10:00
Stenzek e0668baab4 Achievements: Don't lock in prefetch callback
Always executes on the core thread, and avoids a deadlock if the cache
is not open (e.g. you are running two instances).
2026-10-07 21:53:36 +10:00