Compare commits

..

731 Commits

Author SHA1 Message Date
Elad 4f37124c1d LLVM: Add short fallback for get_known_bits
Supports: when value is the immediate result of either a bitwise OR operation or a bitwise AND when either operands is a constant.

Prevents some false positives when the value has PHI nodes in its ancestors.
2026-07-21 18:42:57 +03:00
RipleyTom 24e1ce4ceb Fix: get_known_bits fix 2026-07-21 17:44:40 +03:00
Ani 63851f4242 atomic: Fix BSD compilation 2026-07-20 18:34:57 +02:00
schm1dtmac ee37ef277d [macOS] Update to the latest MoltenVK 1.4.2 prebuilt, re-disable Game Mode for now 2026-07-20 13:39:47 +02:00
Megamouse 357b7d4462 vfs: add source location to exception 2026-07-19 15:58:26 +02:00
Megamouse 8df0fcc0cc ARM: Fix some warning 2026-07-19 15:58:26 +02:00
Megamouse a7d90852dd pad settings: Fix for clearing bindings
Fix accidentally clearing a binding during remap if the same button is assigned to rightclick in the pad navigation.
Only allow clearing a binding on release if the same button was also pressed while no remapping occured.
2026-07-18 19:08:08 +02:00
Walter 9b3a916af0 [SPU LLVM] Use select in FMA to shorten its dependency chain (#19052)
The `FMA` instruction conditionally zeros one multiplicand if the other
is zero/denormal to emulate the xfloat's extended range. This patch
replaces that with a `select(is_non_zero, fma(a, b, c), c)` which has a
shorter dependency chain in most situations and probably allows LLVM to
better optimize it with surrounding instructions.

I added a AVX512 path that uses `vfixupimmps` to prevent a pessimization
where LLVM transforms it into a strictly serial predicate chain. I
confirmed that it works with denormals and both zeros.

https://godbolt.org/z/hsP5G43Ye
2026-07-18 08:18:10 +00:00
Elad 0fcb15ab18 SPU: Revert 49abd6d8e5 2026-07-18 04:05:46 +03:00
Elad 1d657c4e63 Skip 2026-07-17 22:04:57 +03:00
Elad 5d62ee4b42 Fix possible multi-platform race-condition (depending on kernel)
As well as remove another pthread_self call.
2026-07-17 22:04:57 +03:00
Elad 4e49c5319d Avoid using pthread_self() partially 2026-07-17 22:04:57 +03:00
Elad 6f0e78b6b5 SPU LLVM: Avoid raw pointers 2026-07-17 22:04:57 +03:00
Elad b35e4434aa SPU: LLVM: Add spu_thread::state check in Reduced Loop 2026-07-17 22:04:57 +03:00
Elad 21d5336753 SPU LLVM: Disable NaN rulling-out in Reduced Loop on ARM64 2026-07-17 22:04:57 +03:00
Elad 4e2839f3d3 SPU: Fix ppu_check_patch_spu_images 2026-07-17 22:04:57 +03:00
Elad 45a1da2d89 Disable trap on MacOs 2026-07-17 22:04:57 +03:00
Elad 8cc37e036d SPU: Extend LS memory mirrors 2026-07-17 22:04:57 +03:00
Elad 9bf67f0312 SPU LLVM: Discourage memory mirrors use on LQD/STQD 2026-07-17 22:04:57 +03:00
Jordan Jones 430984729d qt: Fix save manager crash when deleting multiple entries (#19019) 2026-07-17 11:27:07 +00:00
Ani 95da0365a3 metainfo: Update screenshot preview 2026-07-17 12:45:54 +02:00
Elad e9f833a2e8 PPU LLVM: Accelerate NJ handling in FTZ environment 2026-07-17 12:23:54 +03:00
Walter 656bc2a92c Fix LLVM version macro typo 2026-07-17 10:31:26 +03:00
Walter 634a41b488 LLVM 21 compatible computeKnownFPClass
The signature for `computeKnownFPClass` changed with LLVM 21, so this commit includes a conditional compilation which is compatible.
2026-07-17 10:31:26 +03:00
Walter 53835b294e Include KnownFPClass.h with later LLVM versions
LLVM 21 moved the KnownFPClass definition from `ValueTracking.h` to its own file. I verified that specific version moved it, with 20 being the last without it.
2026-07-17 10:31:26 +03:00
Walter fa418f0dbb [SPU LLVM] Add KnownFPClass to FMAs
Replaced the denormal/zero check in `fma32x4` with LLVM's `KnownFPClass` analysis.

That method now includes a overload which expects the caller to provide the known struct. This is used for memorization with the FMA instructions, where the range clamping and instruction specific special value handling are combined. `FMS` and `FNMS` has a larger search depth as it can potentially shorten the chain by a lot.
2026-07-17 10:31:26 +03:00
Walter d0fdd9bb6d [SPU LLVM] Add KnownFPClass to multiply and equals
Replace constant checks in `FM`, `FCEQ`, and `FCMEQ` with `KnownFPClass`. The equality compares now also optimize for when the operands is infinity, which is safe as it behaves identically to the default path.
2026-07-17 10:31:26 +03:00
Walter aec0917a86 [SPU LLVM] Add KnownFPClass to clamping
Avoid clamping if the value is known not to be Inf/NaN (overflow). Includes a optional precalculated argument, which only calculates the known if it has not been done already.
2026-07-17 10:31:26 +03:00
yahfz cdbc43712b PPU LLVM: Optimize vector denormal handling 2026-07-16 15:47:22 +03:00
yahfz 50df95d6c4 PPU LLVM: Optimize vector NaN handling 2026-07-16 12:00:23 +03:00
Megamouse 1269ebff27 Fix some warnings 2026-07-15 15:19:36 +02:00
Megamouse bdd28bfa0d Update fusion to 1.3.1 2026-07-15 15:19:36 +02:00
Elad 49b0306b1d sys_fs: Secure ENOTDIR for sys_fs_stat 2026-07-14 23:22:41 +03:00
Elad 217769d801 sys_fs: Fix ENOTDIR check for paths ending with /dot or /dotdot
They must be directories, even file-path/dot points to itself.
2026-07-14 23:22:41 +03:00
Elad 9d9f210ddb sys_fs: Debug validation layer for ENOTDIR detector 2026-07-14 23:22:41 +03:00
Elad 2f7b8a7149 Fix sys_rsx_context_iomap error check 2026-07-14 13:00:58 +03:00
Elad 2cacaa2da4 IDM: Optimize IDs for concurrency 2026-07-14 13:00:58 +03:00
Walter d755124c48 [SPU ASMJIT] Optimize FCGT, FM, FCMGT
Optimize the float multiply and compare methods by taking advantage of the `denormals-are-zero` flag, removing duplicated logic, and generally doing things more efficiently.
2026-07-13 11:05:29 +03:00
Walter 700ca262f4 [SPU LLVM] Refactor SELB
Refactors SELB by changing "division accuracy correction" pattern match to reduce nesting, include more comments, and use more descriptive variable names. Also replaced duplicated granularity-check loops with single loop which determines byte granularity as a integer.
2026-07-10 19:47:17 +03:00
Megamouse 4003b017f5 Fix PS1 classics shortcuts 2026-07-09 22:14:11 +02:00
Megamouse a71d3b8cab Update curl to 8.21.0 2026-07-09 18:12:27 +02:00
Megamouse bb5dc93bec Update fusion to 1.3.0 2026-07-08 16:50:07 +02:00
Zion Nimchuk 5c90bf5865 Optionally include opencv geometry.hpp if it exists, adding support for opencv 5 2026-07-07 07:21:01 +02:00
Megamouse d87cf99b65 VK: fix video_out_calibration_pass::get_fragment_inputs 2026-07-03 08:27:52 +02:00
Simon Capriotti dc06cac014 Bump global savestate version 2026-07-02 22:46:53 +03:00
Icnopandaz 94977d3545 input: fix arrow key mapping roundtrip on macOS ARM 2026-07-02 19:54:42 +02:00
RipleyTom f2820b75db Extra logging for GUI notifications 2026-07-02 18:25:43 +02:00
Megamouse cae36151ff Update SDL to 3.4.12 2026-07-01 22:56:29 +02:00
Megamouse 5434f0b0a4 Update FAudio to 26.07 2026-07-01 22:56:29 +02:00
Megamouse c05832b705 Move unsafe raw pointer write_to_ptr and read_from_ptr to write_to_ptr_unsafe and read_from_ptr_unsafe 2026-07-01 22:49:00 +03:00
Simon Capriotti 8145f24f05 cellSysmodule: fixup 2026-07-01 21:47:16 +03:00
Elad 88f81381e8 MacOS/Thread.cpp: Attempt recovery if pthread_jit_write_protect_np state is invalid 2026-07-01 19:31:41 +03:00
Elad 5bbce42adc MacOS: Do not leak MAP_JIT on utils::memory_decommit 2026-07-01 19:31:41 +03:00
Elad 9dc9730898 vm: Make vm::g_exec_addr not use MAP_JIT 2026-07-01 19:31:41 +03:00
Elad 11b57268e3 PPU LLVM/MacOs: Fix symbol resolver execution
Breakdown into relocation and exuection steps, fixing MAP_JIT region interaction
2026-07-01 19:31:41 +03:00
Elad 95c04556f0 Add some logging 2026-07-01 19:31:41 +03:00
Elad 99d15190e5 PPU: Cleanup MacOs executable write protection guards 2026-07-01 19:31:41 +03:00
capriots d6e813cd72 cellSysmodule: fixup 2026-07-01 18:50:02 +03:00
Elad 60c9705a7d sysinfo.cpp: Relax TSC calibration constraints 2026-07-01 15:19:31 +03:00
Cicero Hellmann Ratti 6647c5a2bd Fallback unsupported database SPU decoder on ARM64 (#18651)
## Summary
- fall back from database-applied `SPU Decoder: Recompiler (ASMJIT)` to
`Recompiler (LLVM)` on ARM64 builds during boot
- log the fallback in `fixup_settings()` instead of letting SPU
initialization fail later

## Problem
`Need for Speed: Most Wanted [BLES01659]` receives `SPU Decoder:
Recompiler (ASMJIT)` from the config database. On ARM64 builds that
decoder is unsupported, which caused RPCS3 to abort during SPU
initialization with `Unsupported spu decoder` while the UI remained on
the loading screen.

## Validation
- built RPCS3 locally on macOS Apple Silicon
- booted `BLES01659` through the database config path with the custom
per-game override temporarily removed
- verified the log now shows the ARM64 fallback warning and `SPU
Decoder: Recompiler (LLVM)` instead of the previous fatal error
- observed the title proceed past the old boot blocker into active RSX
program compilation

---------

Co-authored-by: Elad <18193363+elad335@users.noreply.github.com>
2026-07-01 11:08:54 +00:00
Malcolm 03647fdb4e SPU LLVM: Break out of checksum hole scan 2026-07-01 13:30:05 +03:00
Malcolm 1b54e8910c SPU: Add some comments clarifying very obtuse code 2026-07-01 13:30:05 +03:00
Malcolm 3f27cb8ff5 SPU LLVM: Loop large checksum verification 2026-07-01 13:30:05 +03:00
Malcolm fa5b899411 SPU LLVM: Reduce dot comparison result with addv 2026-07-01 13:30:05 +03:00
Whatcookie 35f65c2244 SPU LLVM: Add ARM checksum UABA path 2026-07-01 13:30:05 +03:00
Malcolm ed145540a2 SPU: Use multiply-accumulate comparisons for cmp_rdata and verification 2026-07-01 13:30:05 +03:00
Elad 537ad399bb Utilities/sema.cpp: Minor optimization 2026-07-01 12:52:13 +03:00
Elad 24a1576629 PPU LLVM: Recycle current thread for exxecution
Prevent invoking more than utils::get_max_threads() active thrreads at a time.
Windows sees more than utils::get_max_threads() active threads as potentially malicious behavior and lowers the program's overall CPU time.
2026-07-01 12:52:13 +03:00
Elad f05ece47ce PPU LLVM: Fix concurrrency weakness of jit_module_manager 2026-07-01 12:52:13 +03:00
Elad b90eef3fa7 PPU LLVM: Fix core_lock locking
Co-Authored-By: Megamouse <23019877+Megamouse@users.noreply.github.com>
2026-07-01 12:52:13 +03:00
Elad 73d9f34907 cellSysmodule: compilation fix 2026-07-01 12:52:13 +03:00
Whatcookie 18fe6eeb71 SPU LLVM: Use ARM USHL for masked infinite shifts
- LLVM can't handle the select pattern we use to avoid poison values for large shifts
- So let's just use the intrinsic to avoid poison values altogether for now
- https://github.com/llvm/llvm-project/issues/200698
2026-07-01 12:10:35 +03:00
Walter bfada94b9f SPU ASMJIT: Vectorized 16-bit variable shifts for SSE2 targets 2026-07-01 07:26:00 +00:00
capriots 71e5d87a07 cellSysmodule HLE implementation (#18962)
Fully implements cellSysmodule and sets it to HLE by default.

There is an undocumented function that decrypts the OpenPSID. There
doesn't seem to be any information about this on the PS3 dev wiki or
anywhere else, so I thought I mention this separately.
2026-07-01 06:42:17 +00:00
Megamouse 67ee6c1ab9 Fix OOB in Dimensions 2026-07-01 00:40:02 +02:00
silvatyrant 8c89adf177 macOS: DJ Hero Turntable support (deck buttons, passthrough conflict) (#18957) 2026-06-30 20:21:49 +02:00
Megamouse bec42ea93e Linux: get unshifted Qt keys 2026-06-30 18:27:37 +02:00
Ani f5e8a2bfa9 misc: Update README and metainfo 2026-06-29 22:34:47 +02:00
Ani 2f0daa62fc settings: Default Shader Mode to "Async with Shader Interpreter" 2026-06-29 22:34:47 +02:00
Ani e297c8cc64 settings: Default "Show shader compilation hint" to disabled 2026-06-29 22:34:47 +02:00
Megamouse 026077a7f8 Fix TTY UTF-8 logging 2026-06-29 19:12:27 +02:00
Elad 5b41d5880d SPU Precompilation: Add support for unaligned segments 2026-06-29 19:06:48 +03:00
Megamouse 8eaa3ec9a2 Propagate src_loc in write_to_ptr and read_from_ptr 2026-06-29 16:14:42 +02:00
Megamouse 635aac8ff3 Fix consteval read_from_ptr and add sanity checks if possible 2026-06-29 09:57:43 +03:00
Megamouse d63273c473 Use pos param of read_from_ptr and write_to_ptr where possible 2026-06-29 09:57:43 +03:00
Megamouse cffd02bb35 Add more motion control mappings to turntable and ghltar 2026-06-28 13:40:02 +02:00
Megamouse 5c55819b57 emulated turntable: allow to map motion sensors 2026-06-28 10:32:22 +02:00
Walter a7fc31f321 [SPU LLVM] Additional SHUFB splat/special-index fast paths (#18945) 2026-06-26 14:46:28 +00:00
Megamouse 51b35a7b2f Update 7zip to 26.02 2026-06-26 12:24:04 +02:00
Megamouse aca652e6fd Update wolfssl to 5.9.2 2026-06-26 08:42:43 +02:00
Walter 09d602fd5a [SPU LLVM] Refactor SHUFB
Refactored `SHUFB` by moving the byteswap optimization prior to the target specific path. Also separated the shuffle and special index constants calculation into separate steps in order to reduce code duplication.

Added a number of TODOs as this refactor revealed some of optimizations opportunities. None of which has been added as this refactor intends to minimize new behavior.
2026-06-24 21:06:13 +03:00
Malcolm 87608865b6 SPU LLVM: Use SVE2 XAR for constant rotates 2026-06-24 09:04:24 +03:00
Christopher Hotchkiss 42242b3c43 SPU Analyzer: fix wrong divisor in Giga const-prop re-decode
The "Fill more block info" re-decode indexed result.data[(ia - lsa) / 41] instead of / 4 (its companion decode uses / 4), so it read the wrong word and corrupted the per-block reg_const / reg_val32 constant propagation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 02:00:35 +03:00
Christopher Hotchkiss 064365d6fb SPU Analyzer: prune dead in-range targets from m_targets (Giga)
Giga cleanup clears m_block_info for removed blocks but left their in-range edges in m_targets, so the register-state walk dereferenced a stale target and aborted ("Range check failed") - e.g. a brsl whose return is a stop-trap, hit in Skylanders Giants. Prune those edges at the m_targets cleanup; export out_target_list after the prune so callers see the cleaned map; keep the initiate_patterns and cond_next-walk guards as defense in depth.

Adds made-up-data regression tests (the exported-map test fails without the prune) and the rpcs3_test.vcxproj entry.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 02:00:35 +03:00
Walter 927e2492ef SPU LLVM: Calculate FREST fraction LUT using vperm2dlculate FREST fraction using vperm2d for AVX512 (#18931)
The `FREST` instruction uses a scalar lookup-table loop to calculate the
mantissa. Given that it's only 32 elements, we can load it into two
512-bit vectors and treat them as the sources to the `vperm2d` shuffle
instruction. This allows it to be calculated in parallel, improving its
performance.
2026-06-22 15:27:37 +03:00
Megamouse c7478d6dcc Use more std::string_view 2026-06-21 21:01:39 +02:00
Megamouse ed6a2f862e Use std::string_view in rpcn code 2026-06-21 21:01:39 +02:00
Megamouse 7b5f3e6921 Fix unused midi_deleter variable warning 2026-06-21 21:01:39 +02:00
Megamouse f95a225d63 Use std::string_view in rsx code 2026-06-21 21:01:39 +02:00
Megamouse f8c88c3a7a Use std::string_view in cell modules 2026-06-21 21:01:39 +02:00
Antonino Di Guardo 2af7b58ce4 fix double path delimiter (#18923)
A cosmetic fix. It removes a double delimiter at the end of a path in
`games.yml` when using `VFS games` path.
2026-06-21 19:38:03 +02:00
Megamouse efc9a1a668 NP: Use std::string_view in clans 2026-06-21 16:37:09 +02:00
Megamouse 8da8c267c6 Update pugixml to 1.16 2026-06-21 16:37:09 +02:00
Megamouse e32d19ffac Add missing sanity check in savedata_op 2026-06-19 18:26:44 +02:00
Walter 33123bff04 [SPU] Calculate FRSQEST exponent using arithmetic (#18905)
The `FRSQEST` instruction uses a lookup-table to calculate both the
exponent and mantissa. The exponent follows a simple linear pattern and
thus can be calculated using integer arithmetic: `(exponent==0)? 0xFF :
190 - (exponent + 1) / 2`. This patch replaces the LUT with this method,
vectorizing its calculating and saving on 1kB.

The mantissa still relies on a LUT, which bottlenecks this instruction's
emulation despite the improvement.
2026-06-19 18:02:20 +03:00
Megamouse c0598f61e7 Handle curl_easy_setopt errors in clans_client 2026-06-18 21:16:12 +02:00
Megamouse 0735c55bfd Add user agent to curl requests 2026-06-18 21:16:12 +02:00
Megamouse 5ee92d2e6c Allow to add architecture to game window title 2026-06-18 21:16:12 +02:00
Megamouse 8be3a398dc Log architecture 2026-06-18 21:16:12 +02:00
schm1dtmac 860e2a82b1 [Mac OS] Update runners to OS 15 2026-06-18 17:51:58 +02:00
Megamouse 6a15f9dc8e Qt: use readable strings for windowState and visibility in gui settings 2026-06-17 18:09:27 +02:00
Megamouse a8559a526a tar: fix save_header regression 2026-06-17 13:13:38 +02:00
Megamouse 5758ab11f7 arm64: fix exclusion_callback type 2026-06-17 13:13:38 +02:00
Elad c1263eeb79 sys_rsx: Fix IOMAP syscalls argument types 2026-06-17 13:25:59 +03:00
Walter e429f8cf05 SPU LLVM + zero with saturation subtract
- Added a LLVM SPU recompiler implementation as LLVM can't take advantage of the rounding mode.
- Further optimized the method by replacing MSB check with saturation subtraction. Negative values are saturated to zero due to the float's sign bit.
2026-06-16 14:55:04 +03:00
Walter 4d38e69fd9 Make SSE2 compatible
Removed the SSE4.1 instruction to make it compatible with the baseline instruction set. Increased dependency chain by one instruction and caused constant generation to be slightly more expensive.
2026-06-16 14:55:04 +03:00
Walter 465b845bdf Avoid unused XmmGet on SSE2 path
Avoids creating a redundant `XmmGet` allocation on targets without SSE4.1, by duplicating the declaration across both target specific blocks.
2026-06-16 14:55:04 +03:00
Walter 6593caff67 [SPU ASMJIT] Add SSE4.1 CLZ method
Added a SSE4.1 vectorized CLZ method to the SPU ASMJT.
2026-06-16 14:55:04 +03:00
Megamouse e5cdae8c5a Use std::string_view in cpu code 2026-06-16 12:07:57 +02:00
Megamouse 54b8b5399b Use std::string_view in pine_server 2026-06-16 12:07:57 +02:00
Megamouse 7a4ec42362 Use std::string_view in loader code 2026-06-16 12:07:57 +02:00
Megamouse b8ca6d953f Use std::string_view in crypto code 2026-06-16 12:07:57 +02:00
Megamouse 5c4be5dd3b Qt: stop movies when the main window gets inactive 2026-06-16 08:50:48 +02:00
Megamouse 5e745ac661 Qt: prevent playing movies directly after a refresh 2026-06-16 08:50:48 +02:00
Megamouse 79616a376f Qt: don't play movie unless the parent window is active 2026-06-16 08:50:48 +02:00
Megamouse fbe9ad0f45 Use more fmt::split_sv 2026-06-16 01:28:35 +02:00
Megamouse a4649475b6 Use opengl renderer in game window title 2026-06-15 16:15:04 +02:00
kd-11 c38e8229ed gl: Finalize the merge of bind_texture_env and bind_interpreter_env 2026-06-15 02:31:47 +03:00
kd-11 00c57be1ed gl: Fix linux build 2026-06-15 02:31:47 +03:00
kd-11 ff68a1ea09 gl: Do not use SSBOs on devices that do not support the extension 2026-06-15 02:31:47 +03:00
kd-11 048b1c3f05 gl/interpreter: Do not emit bindless texture usage unless the textures are used 2026-06-15 02:31:47 +03:00
kd-11 06c8a87534 gl: Drop use of the retired glNamedBufferStorageEXT function
- The DSA_EXT fallback is now GLES-only.
- We introduce a wrapper to act as a fallback for older GPUs - NamedBufferStorageEX.
2026-06-15 02:31:47 +03:00
Megamouse 41a7cd29f8 Use std::string_view in input code 2026-06-14 17:41:33 +02:00
Megamouse 5bc128e085 Use std::string_view in midi handlers 2026-06-14 17:41:33 +02:00
Megamouse 74f3349b19 Use std::string_view in overlays 2026-06-14 17:41:33 +02:00
Jakub Marcowski 0fda2dd60f Optimise PNGs across the repo 2026-06-14 16:05:41 +02:00
Megamouse 4f321eb319 Do not throw on hex_to_bytes error in iso get_key
Just treat it as a regular key processing error
2026-06-14 12:06:54 +02:00
Megamouse 4fed5e7b88 Fix iso integrity log message 2026-06-14 09:04:03 +02:00
Megamouse f1a1f5616c Fix VS project 2026-06-14 09:04:03 +02:00
Megamouse 9373461d09 patch_manager: tiny optimizations 2026-06-14 09:04:03 +02:00
Antonino Di Guardo 23b414ac84 Add integrity check to PSN Content, DLC and Game Update files (#18669) 2026-06-14 07:35:49 +02:00
Megamouse 5252f47a33 Use more std::move 2026-06-13 19:08:16 +02:00
thephilcoulson 27b13dff20 gui: Play preview videos on row selection, not just hover 2026-06-13 17:52:50 +02:00
Megamouse 32a52c0e35 rsxaudio: fix some windows warnings
stumbled upon some warnings.
ensure() does not tell VS that an index is suffently checked for OOB.
2026-06-13 16:30:34 +02:00
Vishrut Sachan 3fd8fd0e34 gui: Move download database actions from game list to Manage -> Database submenu (#18870)
Closes #18856

Moved the three download database actions from the game list context
menu to Manage -> Databases submenu, since they are not related to a
specific game entry.
2026-06-13 07:59:18 +02:00
Antonino Di Guardo 16a53dfec7 UI: Fix drag & drop of files on main window 2026-06-13 04:13:16 +03:00
Megamouse 2ce45bd904 ffmpeg: remove directshow backend 2026-06-12 08:09:18 +02:00
Elad 1492d647f4 SaveStates: Fix lv2_timer serialization 2026-06-11 20:55:21 +03:00
Megamouse 0b535328c8 Qt: Add exit game shortcut 2026-06-11 11:15:15 +02:00
kd-11 f32ff351da rsx: Use mip0 resolution scale when computing mipmap scaling factors 2026-06-09 23:53:48 +03:00
Elad e379fba97d SPU/PPU: Implement PPU reservation priority over SPUs 2026-06-07 23:30:05 +03:00
Elad 57b4687ac2 cellAudio: Fix _mxr000 event queue hack 2026-06-07 19:52:34 +03:00
kd-11 339877ea7d rsx: Handle mipmap sampling edge case when SNORM emulation is active 2026-06-07 18:56:15 +03:00
Malcolm e7165cbe99 RSX: Use one-shot cacheline wait in semaphore acquire 2026-06-07 15:55:28 +02:00
Malcolm d85f1c7155 RSX: Add hardware spin_wait helper, use it in flush requests 2026-06-07 15:55:28 +02:00
Rad0van 9e2c41bd48 cellAudio: fix _mxr000 surmixer event-queue key constant
The "Dirty hack for sound" in AudioSetNotifyEventQueue() is gated on a
named constant c_mxr000 that is supposed to equal the IPC key of the
_mxr000 event queue created by the game's _cellsurMixerMain thread
(0x8000cafe02460300, e.g. Virtua Fighter 5 FS / SEGA AM2 CRI titles).

When the inline literal was refactored into the named constant in
730badd37 ("cellAudio: Move and partially fix _mxr000 hack", 2023) a
trailing hex digit was dropped: 0x8000cafe0246030 instead of
0x8000cafe02460300 (the value used by the original 2018 hack in
cc0d7c598). As a result `key == c_mxr000` never matches and
lv2_event_queue::find(c_mxr000) looks up the wrong key, so the
surmixer-queue serialization path is effectively dead for every
_mxr000 CRI game.

Restore the correct 16-digit key so the gate and lookup match the
queue the game actually creates.

Note: this corrects a real latent bug but does not by itself resolve
the cellSurMixer null-deref in VF5FS (#17066), which is a separate,
flaky CRI channel-strip init divergence.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 15:05:29 +02:00
Whatcookie 2d1be09180 SPU LLVM: Use TBL for AArch64 ROTQBY shuffles 2026-06-06 18:51:35 +02:00
Rad0van d25972e196 JIT/AArch64: advertise +i8mm to the LLVM target machine
The PPU/SPU recompilers emit i8mm intrinsics (ummla/smmla, used by the
SPU GBB/GBH gather paths) gated on utils::has_i8mm(). The JIT's MAttrs
list mirrored dotprod/sha3/sve from HWCAP but never added i8mm, and the
resolved -mcpu on Apple silicon is the cortex-a78 fallback (no i8mm), so
the backend aborted with "Cannot select: intrinsic %llvm.aarch64.neon.ummla"
on every game. Mirror i8mm into MAttrs like the other features.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 52d121fee79cc569c9ac273852edd0e493ae51fc)
2026-06-06 18:34:38 +03:00
Megamouse 62d32ab45e Update SDL to 3.4.10 2026-06-06 01:23:02 +02:00
Megamouse 1ca995cc96 Update FAudio to 26.06 2026-06-06 01:23:02 +02:00
Malcolm 3164d44952 SPU LLVM: Use I8MM for GBH and GBB 2026-06-05 23:19:35 +02:00
Sanjay Govind 546f3082a2 usb_device: present wii instruments as PS3 instruments (#18796)
The instruments work exactly the same but the IDs are different, so
doing this allows them to work in games
2026-06-05 21:08:46 +02:00
Nico Franke 8d9abd396b Make FFB direction encoding for emulated G27 configurable (#18776)
This adds a dropdown in the emulated G27 settings dialog ("Force
feedback direction encoding") with three options: Steering Axis
(default), Cartesian, Polar. Default is Steering Axis so existing users
see no change.

RPCS3 right now hardcodes SDL_HAPTIC_STEERING_AXIS for the spring and
constant-force effects it sends to the host wheel. That's SDL's
recommended encoding for wheels and works on the hardware the code was
written against. Some Windows DirectInput drivers (like my MOZA R3) do
not react to these affects at all. This now allows changing it to an
encoding that works.
2026-06-05 20:09:35 +02:00
Megamouse 8112c7cc19 Initialize rtmidi async
On my system this opening the settings takes 10 seconds on a cold boot.
Letting it initialize async during boot reduces this delay drastically.
2026-06-05 16:28:33 +02:00
kd-11 bf85a3fdd9 rsx/vk: Suppress the pool growth signal a bit
- Still allows for growth when needed but avoids creating larger sets unless there really is demand for it
2026-06-05 15:42:32 +02:00
kd-11 8e370c2cf1 rsx/vk: Implement auto-scaling of descriptor pool sizes 2026-06-05 15:42:32 +02:00
Malcolm 6349ea2ee9 SPU LLVM: SVE multiply optimizations
- Reduces most SPU multiply instructions to a single operation
- Add SVE length detection, only use SVE instructions for 128b sve for
  now
2026-06-05 14:58:24 +02:00
Whatcookie 2f2ac69d60 SPU LLVM: Idiomatic FSM implementation
- Compiles down to just 2 instructions on Neon, instead of falling back to scalar instructions
- Remove this workaround when LLVM fixes this issue upstream: https://github.com/llvm/llvm-project/issues/200325
2026-06-05 09:48:16 +02:00
Malcolm 4a92d96cf4 SPU LLVM: Use 128-bit SVE2 for FMS 2026-06-05 08:41:17 +02:00
Windsurf7 9a2243bfcb Add "Enable Mouse-based Gyro" setting to I/O config (#18835)
This is a continuation of my work on #18113.

Addresses issue #18197.

Adds a new checkbox in the I/O settings tab that enables mouse-based
gyro emulation at game startup, making the feature more discoverable to
users.
2026-06-04 14:49:48 +02:00
digant73 97704e35e0 Remove duplicated code 2026-06-04 12:06:42 +03:00
Ani 40e9ee5af0 rpcs3_version: Bump to 0.0.41 2026-06-04 02:58:57 +02:00
Megamouse 3fa1241ac0 Initialize render_creator in headless mode 2026-06-02 21:49:09 +02:00
Megamouse 62747bb40d Set OpenGl as default renderer if vulkan is not supported 2026-06-02 21:49:09 +02:00
Megamouse 44b33f1962 Force renderer to default renderer if not supported 2026-06-02 21:49:09 +02:00
Megamouse cc999d4210 Force disable some settings in headless mode 2026-06-02 21:49:09 +02:00
Megamouse 7c2bd56776 cellMusic: don't set current_track to umax on prev
There's no reason to do that and it might cause OOB access elsewhere.
2026-06-02 21:49:09 +02:00
Megamouse 5fc7450865 Fix uninitialized members in queue_submit_t 2026-06-02 16:10:21 +02:00
Megamouse 4ca0f0b11d cpu: fix prefetch list 2026-06-02 16:10:21 +02:00
Megamouse 66de4022b1 Fix ARCH_X64 define for hypervisor_context_t 2026-06-02 16:10:21 +02:00
Megamouse 2b9368abf5 Fix potential OOB access in try_to_enum_value 2026-06-02 16:10:21 +02:00
Megamouse f8a5a6ad93 cellMusicDecode: fix track index on next if already on last track
Fixes an OOB exception
2026-06-01 08:58:52 +02:00
Megamouse fa1aa9dcf3 cellMusicDecode: Fix track selection on prev/next track 2026-06-01 08:58:52 +02:00
Megamouse 883a6889e0 cellMusicDecode: Fix read position on prev/next track 2026-06-01 08:58:52 +02:00
Megamouse 1b5a895346 cellMusic: fix log level of "Comparing track" message 2026-06-01 08:58:52 +02:00
Megamouse 2187f8ae51 cellMusic: Fix OOB playlist access
current_track can be umax
2026-06-01 08:58:52 +02:00
Megamouse 17f1fc31bc cellMusic: fix occasional deadlock during auto-play in playlist mode 2026-06-01 08:58:52 +02:00
Elad ecf77ecef0 Add type-safe idm::last_id() overload 2026-05-31 19:54:10 +03:00
Elad db474c292f utils: Make utils::serial::operator T() explicit 2026-05-31 19:54:10 +03:00
Elad b08e805020 PPU Analyser: Fix possible infinite loop
Because of possible overflow.
2026-05-31 19:54:10 +03:00
Megamouse 7b540cdb20 cellMusic: don't send status callback if we just keep playing automatically 2026-05-31 15:49:32 +02:00
Megamouse 059e70069d cellMusic: improve music list playback 2026-05-31 15:49:32 +02:00
Megamouse 9c719a5857 trophies: fix return value of GetUnlockedPlatinumID with invalid file 2026-05-31 15:49:32 +02:00
Megamouse 375eb21c07 Fix some format and logger typos 2026-05-31 15:49:32 +02:00
Megamouse 1bd246d2d3 Fix some gcc warnings 2026-05-30 23:58:51 +02:00
Megamouse 8c82ce8bed Fix slicing warning in tar_object::save_directory 2026-05-30 19:31:16 +02:00
Megamouse eafa6a9a25 Gracefully exit after headless installation. 2026-05-30 19:31:16 +02:00
Megamouse b9d027a76c Implement fake ps move external devices 2026-05-30 15:48:56 +02:00
Megamouse 0a45c84e16 Update OpenCv to 4.13.0 2026-05-30 13:14:25 +02:00
Megamouse a88951baf3 Qt: clarify package installation during boot 2026-05-30 10:51:59 +02:00
Megamouse 66349fcb5b Qt: Move code to class 2026-05-30 10:51:59 +02:00
Megamouse c6602f673b cli: allow headless installs 2026-05-30 10:51:59 +02:00
Megamouse 7c6b3dcdb9 Update ffmpeg to 8.1.1 2026-05-29 10:23:19 +02:00
Malcolm c11979d124 Revert "SPU LLVM: Remove dead interpreter ret fallback"
This reverts commit 3058a71d72.
2026-05-29 02:24:05 +02:00
Malcolm 3058a71d72 SPU LLVM: Remove dead interpreter ret fallback 2026-05-28 14:10:51 +03:00
Arsh Kumar Singh b41b10a031 RawSPU: bound ELF loads; PPUInterpreter: fix modulo 127->128 (#18797)
Two small fixes that stop the emulator from writing past buffer
boundaries.

RawSPU: when loading a program onto an SPU processor, it now checks that
the program actually fits in 256 KB before copying it. Before this, a
corrupted file could write past the buffer into random host memory.

PPUInterpreter: a one-character typo fix. A modulo operation used % 127
instead of % 128 when computing cross-boundary data sizes. This caused
reservation checks to compare the wrong number of bytes on every load
that crossed a cache line. This fix was pointed out by @AniLeo in the
spam PR #18795 (Discovered by Opus 4.7)


The PS3 hardware enforces these limits:
- Each SPU has exactly 256 KB of memory (from Cell Broadband Engine
Handbook v1.1)
- The PPE cache line is 128 bytes — all reservation logic uses this
granularity

Neither fix should affect the usual games. They only applying to
corrupted or malformed files. Will highly appreciate feedback and
suggestions for this PR

Tested on CI: CI passes on my fork 9 of 10 platforms (Mac Intel failed
downloading a dependency).

Title and Desc written by Codex
2026-05-27 15:27:58 +00:00
Malcolm a87d175295 SPU LLVM: Retry ARM64 TBL2 register scavenger failures
- Some SPU programs inexplicably fail to compile when TBL2/TBX2 are used.
- As an insane workaround, first try to compile with TBL2/TBX2, if LLVM crashes while compiling, try to compile the same program without TBL2/TBX2.
2026-05-27 02:46:11 +03:00
Malcolm dff29a7864 PPU/SPU LLVM: Use arm shuffles in recompilers instead of emulating x86 pshufb
> - SHUFB from 9 instructions down to 5
> - Though it should be 4 if LLVM would just emit BCAX...
2026-05-27 02:46:11 +03:00
Megamouse dd81c92a02 Fix compilation on VS 2026 2026-05-24 21:05:29 +02:00
Megamouse 64ba0dd5e6 Update windows runners to visual studio 2026
Maybe this fixes current build issues...
2026-05-24 21:05:29 +02:00
Windsurf7 0a5b88ac38 Fix non-numerical numpad keys input binding (#18761) 2026-05-22 14:13:37 +02:00
Megamouse f63a34dcc2 Try to fix libusb includes 2026-05-22 09:14:16 +03:00
Megamouse d8710c431d Fix named_thread_group constructor
m_count - 1 could underflow
2026-05-22 09:14:16 +03:00
Megamouse 67464f97df Qt: only allow removal of firmware cache while emulator is stopped 2026-05-20 22:26:08 +02:00
Megamouse 190378bc33 Qt: fix batch progress bar value
It was always one too early
2026-05-20 22:26:08 +02:00
Megamouse da599f7286 Fix localization of anaglyph_settings_dialog 2026-05-20 22:26:08 +02:00
Megamouse 73c8c270a6 Fix USIO log spam 2026-05-20 22:26:08 +02:00
Elad d7da6a713b RawSPU: Implement 16-bit and 8-bit read MMIO 2026-05-20 20:44:24 +03:00
Megamouse 6a2ad0a0aa sys_usbd: enable windows hotplug 2026-05-20 18:10:01 +02:00
Megamouse 84b61e3850 Update libusb to 1.0.30 2026-05-20 18:10:01 +02:00
Malcolm 7e436f9bf1 SPU LLVM: Optimize SPU multiplies for ARM
- Saves 2 instructions in MPY, 1 instruction in MPYU, 2 instructions in MPYS, 2 instructions in MPYA, 1 instruction in MPYI, and 2 instructions in MPYUI
2026-05-20 10:54:13 +03:00
Radu13 2613d7eee7 Do not append install dir for content type theme PKGs (#18765) 2026-05-19 20:11:44 +02:00
Megamouse 55e17ccd3b Update Qt to 6.11.1 2026-05-18 22:05:33 +02:00
Megamouse f368a56c66 Update openal to 1.25.2 2026-05-18 22:05:33 +02:00
RipleyTom 79cb35daa6 Fix ethernet addr in offline mode (#18756) 2026-05-18 14:14:41 +03:00
qurious-pixel b0c1791a0c Restore .DirIcon 2026-05-18 08:29:34 +02:00
Malcolm 61a2604824 SPU LLVM: Inline reading/writing the decrementer for ARM too
- Try switching to llvm's readycyclecounter, which should map to rdtsc on x86 too.
2026-05-17 02:26:42 +03:00
Gustavo Graziano 08c926622d Visual improvements to Windows 11 Themes (#18745) 2026-05-16 18:04:15 +02:00
Megamouse b533a560e6 input: move keyboard stick value buffers to pad
This should improve stick input when using the keyboard for 2 players.
2026-05-15 07:10:40 +02:00
Megamouse e4a49cd425 input: only copy back necessary values in keyboard_pad_handler::process
Profiling has shown that copying both containers took longest.
2026-05-15 07:10:40 +02:00
Megamouse fdce82fc24 input: Use smaller external structs for button and stick access outside of the pad_thread
This needs less memory and hides unwanted members from client code.
2026-05-15 07:10:40 +02:00
Megamouse 5f00b87a44 Move bit_set to new file 2026-05-14 17:12:25 +02:00
Megamouse 53180b8141 Add bit_set unit test 2026-05-14 17:12:25 +02:00
Megamouse 4cc0e4c7fc spu_recompiler: Initialize members 2026-05-14 17:12:25 +02:00
Megamouse 46364856ae Remove unused variable 2026-05-14 17:12:25 +02:00
Megamouse f5c420994d Add unsafe bit_set access for obvious cases 2026-05-14 17:12:25 +02:00
Megamouse c5ee48f54a Harden bitset access 2026-05-14 17:12:25 +02:00
Gustavo Graziano 6f50f0854f I made some improvements to my theme to make it better (#18732) 2026-05-14 14:05:39 +02:00
Elad 53d76db753 SPU: More UB fixes 2026-05-14 13:21:23 +03:00
Elad c860aa2107 SPU Analyzer: Fix initiate_patterns function 2026-05-14 10:42:20 +03:00
Elad a545fe92a0 SPU: Log Mega SPU programs properly 2026-05-14 10:42:20 +03:00
Elad ee436307cf SPU Update 2026-05-14 10:42:20 +03:00
Elad 33016742f1 SPU: Fix CPU usage of spu_channel on BE configuration 2026-05-14 10:42:20 +03:00
Malcolm 320e8d634a SPU LLVM: Workaround bad LLVM codegen for FCGT on AARCH64
- LLVM was emitting a nasty sequence for select instead of just using BSL, so let's try using inline assembly.
2026-05-13 15:20:39 +03:00
kd-11 e52b6ecbbf rsx: Typo fix for pipeline reload hint
- Fragment state just reloads some constant buffers.
- Fragment program state recalculates the program.
- This is overkill for a variant reload, but that can be optimized later.
2026-05-13 11:43:32 +03:00
kd-11 a4712a283f C++ things 2026-05-13 11:43:32 +03:00
kd-11 6da3021158 rsx: Make emulated Z operations compatible with MSAA 2026-05-13 11:43:32 +03:00
kd-11 0064ecb85b gl: Implement emulated Z comparison support 2026-05-13 11:43:32 +03:00
kd-11 1d71854c7f rsx/qt: Add depth compare emulation to the advanced tab 2026-05-13 11:43:32 +03:00
kd-11 a9be80da6f rsx/vk: Implement software Z-buffer comparison
- Useful for scenarios where desktop precision is too high
2026-05-13 11:43:32 +03:00
capriots 2387af0854 cellDmux: fix state check 2026-05-13 07:19:09 +03:00
Phil Coulson 021f16f775 rsx: Fix swapped width/height in NV309E_SET_FORMAT decoder 2026-05-12 19:39:05 +03:00
schm1dtmac fb1c1eeaef [System] Fix restart-loops upon restart-then-quit (#18723)
I observed under macOS (although the bug seems platform agnostic to me)
that when restarting a game, then subsequently quitting it, I'd get
stuck in a 'restart loop' where the game would restart upon completely
shutting down, and this would repeat every time I tried to close the
game until I gave up & force quit RPCS3. Seems like for whatever reason,
the use of std::move didn't actually guarantee that after_kill_callback
got nuked if at all, so all I've done is take a hammer to the fucker and
manually set it to nullptr after being called.

Co-authored-by: Elad <18193363+elad335@users.noreply.github.com>
2026-05-11 17:00:45 +00:00
Edwin Jarvis 6fa7efbcc3 cellMusic: Fix shuffle always producing the same order
The shuffle in step_track() used std::default_random_engine with a
default (fixed) seed, causing the playlist to be 'shuffled' into the
same deterministic order every time. Use std::random_device to seed the
engine so each shuffle produces a genuinely random order.

Fixes #18672
2026-05-11 12:16:03 +03:00
Edwin Jarvis c534da86c3 gui: Remove close button from Game List dock widget
Users frequently close the game list accidentally and then can't
figure out how to restore it. Remove the DockWidgetClosable feature
so the close button is not shown. The game list visibility can still
be toggled via View > View Game List menu action.

Fixes #18518
2026-05-11 11:26:40 +03:00
Antonino Di Guardo 6b5a2f781a ISO: Fix missing read of remaining chunk of data on next extent, if present (#18706) 2026-05-10 16:59:15 +00:00
Arsh Kumar Singh cd7cb1cc11 Qt: include territory in language menu labels (#18704)
## Summary
Fixes the GUI language dropdown to show territory variants when
translation files include country codes.

**Before:** "Portuguese" for both `pt_BR` and `pt_PT`
**After:** "Portuguese (Brazil)" and "Portuguese (Portugal)"

Also fixes the same ambiguity for Chinese and any other language with
country variants.

## Implementation
Uses `QLocale::territoryToString()` alongside the existing
`QLocale::languageToString()` to construct display labels. When no
territory exists (e.g., `en`, `ja`), the label is unchanged.

## Edge cases
- No-territory locales (`en`, `ja`): unchanged —
`QLocale::territoryToString(AnyTerritory)` returns empty, guard
preserves plain language name
- Territory names are locale-translated (not hardcoded English) — they
follow the current UI language, same as `languageToString()`
- `zh_CN` → "Chinese (China)" / `zh_TW` → "Chinese (Taiwan)"
(territory-based, unlike the PS3 system language dropdown which uses
Simplified/Traditional script names — this is appropriate for the GUI
translator selector context)

## Test Plan
- [ ] Language menu shows "Portuguese (Brazil)" when `rpcs3_pt_BR.qm` is
present
- [ ] Language menu shows "Chinese (China)" when `rpcs3_zh_CN.qm` is
present
- [ ] Plain languages (`en`, `ja`) continue to show without parens

---

<details>
<summary>Review note: territory strings in UI locale</summary>

Territory names render in the current UI language (not forced English).
This matches `QLocale::languageToString()` behavior and is consistent
with how the rest of the menu renders. If hardcoded English labels are
preferred, that can be added after review.
</details>

Fixes #18215
2026-05-10 17:25:00 +02:00
kd-11 c0b358003f Add basic guidance on AI usage for contributors 2026-05-10 16:27:18 +03:00
brian218 29b4577fdb USIO: Implemented BanaPassport (バナパスポート) card reader emulation 2026-05-10 09:48:53 +02:00
schm1dtmac b34eba2fb3 Revert PPUThread changes
Causes GOW3 segfaults at the end of PPU linking
2026-05-09 17:56:04 +03:00
AurisDSP 6850e2e5a8 Apple Silicon: consolidate JIT W^X handling with RAII guards
Address review feedback on #18701 (cc @elad335): combine the SPU
worker fix from #18701, the SPRX Loader fix from #18703, and three
additional similar W^X leaks discovered while auditing the codebase
for the same pattern. Use Allman-style braces to match RPCS3 coding
style.

Background:
On AArch64 Apple Silicon, MAP_JIT pages enforce W^X per-thread.
pthread_jit_write_protect_np(false) enables write mode and
pthread_jit_write_protect_np(true) restores execute mode. When code
takes an early return or throws between these calls, the thread is
left in write mode, which can cause segfaults on subsequent code
fetches or inconsistent state at thread teardown.

Fixes applied (all gated on __APPLE__):

1. Emu/Cell/SPUCommonRecompiler.cpp - SPU cache worker thread
   Add RAII guard so execute mode is restored on worker exit.

2. Emu/System.cpp - SPRX Loader thread
   Enter write mode (was missing entirely) so ppu_initialize() and
   ppu_precompile() can write to MAP_JIT pages, and pair with an
   RAII guard. Reproducer: Red Dead Redemption (BLUS30418) crashes
   ~12s into boot at 0x300010000 without this fix.

3. Emu/Cell/SPULLVMRecompiler.cpp - SPU LLVM compile path
   The compile function enters write mode, then has an early
   "return nullptr" path on rebuild_ubertrampoline failure that
   skipped the explicit restore. Add RAII guard so execute mode
   is restored on every exit path. The existing explicit restore
   before the cache-flush asm directives is preserved.

4. Emu/Cell/PPUThread.cpp - PPU LLVM worker thread (operator())
   Worker entered write mode but never restored it on operator()
   return. Add RAII guard.

5. Emu/Cell/PPUThread.cpp - ppu_initialize() main path
   This scope alternates write/execute mode and contains an early
   "return compiled_new" at the empty-jits check plus a final
   return that both leak write mode. Add RAII guard so execute
   mode is always restored on exit. Intermediate explicit
   transitions for the symbol-resolver invocation are preserved.

No behavioral change on x86_64 or non-Apple ARM64 (all changes are
inside #ifdef __APPLE__ / #if defined(__APPLE__)).

Supersedes #18703.
2026-05-09 15:07:22 +03:00
RipleyTom 3c2815e89c Add option to derive MAC from PSID 2026-05-09 09:27:49 +03:00
Megamouse 4312221498 Add anaglyph settings 2026-05-08 21:42:29 +02:00
Gustavo Graziano c102d1ec0d Add missing hover effect in ‎GustavoGraziano's theme 2026-05-08 14:24:54 +00:00
Arsh Kumar Singh 98e9b3cf30 Qt: Disambiguate offset direction labels from DPad/Stick labels (#18695)
## Summary

The "Left" and "Right" strings in `pad_settings_dialog` were shared
between DPad/Stick direction labels (which have ample space) and offset
value labels — Squircle Values, Stick Multipliers, and Stick
Interpolation (where space is tight). Translators couldn't abbreviate
the offset version without also affecting the direction binding labels.

## Change

Added disambiguation via `comment="Offset direction"` in the `.ui`
file's `<string>` elements for the six offset labels:

- `label_squircle_left`
- `label_squircle_right`
- `label_stick_multi_left`
- `label_stick_multi_right`
- `left_stick_lerp_label`
- `right_stick_lerp_label`

Qt now generates separate translation entries, allowing translators to
use shorter abbreviations in the tight offset areas while keeping full
forms for direction bindings.

**English UI is unchanged** — no visual difference for English users.

Fixes #18691
2026-05-08 15:52:05 +02:00
Vishrut Sachan f9ffce76f2 game_list: Fix icon display for multi-game collection ISOs 2026-05-08 14:32:43 +02:00
Florin9doi e2e1cf02f4 USB: Stop sending USB replies after prx_unload 2026-05-08 13:05:08 +03:00
Antonino Di Guardo 026297334f Some fixes (#18686)
### FIXES + MINOR IMPROVEMENTS:
- Fixed issue18685: Not a real issue. PR18648 added some logging that made
evident a missing check on the validity of the paths in `games.yml`
before trying to manage the path as a possible ISO file. That missing
check was already present but simply invisible due to missing log
- Fixed `bytes_to_hex()` function used to store file hash hex string: In
some cases the integrity check wrongly reported the check as failed
- Optimized `fs::get_optical_raw_device()` function: Moved under
`_WIN32` block a check valid only on `Windows` and simplified the logic
to detect a CDROM / BD as raw device
- Used `iso_file` objects instead of `fs:file` in `ISO.cpp`: It allows
to use proper `bool()` operator on some checks
2026-05-07 06:38:57 +03:00
kd-11 4f47fee360 gl: Dirty tracking of interpreter sampler handles 2026-05-06 02:10:14 +03:00
kd-11 9c143d3d45 gl: Use bindless textures for the shader interpreter 2026-05-06 02:10:14 +03:00
kd-11 58eb7d2c04 gl: Implement bindless texture support 2026-05-06 02:10:14 +03:00
kd-11 2bb533274c gl: Wait for shader compilation to complete server-side before attaching to a program 2026-05-06 02:10:14 +03:00
kd-11 3fc41b6d66 gl: Fix context race condition when preparing optimized interpreter variants
- The main thread may bind the program before the compiler context has published the binding instructions
- Once bound, late bindings are not updated so the program remains with uninitialized bindings and rendering breaks
2026-05-06 02:10:14 +03:00
kd-11 c350c02592 rsx: Fix build and silence warnings 2026-05-06 02:10:14 +03:00
kd-11 9dde2bf04e vk: Skip shader cache load if we're running interpreter only 2026-05-06 02:10:14 +03:00
kd-11 4e160320ef vk/interpreter: Precompile more variants to avoid ingame stutters
- Also temporarily logs a message to make stutters more obvious
2026-05-06 02:10:14 +03:00
kd-11 ca762d5b84 vk: Add extra renderpass API entry to allow generating keys with no images 2026-05-06 02:10:14 +03:00
kd-11 d93f5f9f84 vk: Implement variant recompilation for performance 2026-05-06 02:10:14 +03:00
kd-11 ac28c391f6 vk/interpreter: Implement base pipeline propagation 2026-05-06 02:10:14 +03:00
kd-11 d519571e18 vk: Implement async interpreter builds 2026-05-06 02:10:14 +03:00
kd-11 99e6b19025 gl: C++ things 2026-05-06 02:10:14 +03:00
kd-11 3d6773dd25 vk/pipe-compiler: Allow external definition of graphics properties during async compilation 2026-05-06 02:10:14 +03:00
kd-11 d36a4bd858 vk/interpreter: Separable shader cache for the interpreter 2026-05-06 02:10:14 +03:00
kd-11 26db44b3b3 gl/interpreter: Make use of r-w locking mechanisms 2026-05-06 02:10:14 +03:00
kd-11 a6c3ef350a vk: Interpreter bringup to restore previous functionality
- Get basics working again along with some prep-work for enhancements
2026-05-06 02:10:14 +03:00
kd-11 f3d0c3ba28 gl: Implement async optimized interpreter build 2026-05-06 02:10:14 +03:00
kd-11 97c7d069ac gl: Disable hard requirement for bindless texture to use the interpreter
- I never got around to porting the implementation to use bindless correctly
2026-05-06 02:10:14 +03:00
kd-11 af7ae45888 rsx/gl: Upgrade interpreter model to use a minimal set of reusable pipelines as a base
- We generate optimized variants in the background if we have a partial miss
- A full miss is impossible
2026-05-06 02:10:14 +03:00
kd-11 5c4b0a165b gl/interpreter: Separable shader objects
- We use a real cache for separate VS and FS objects
2026-05-06 02:10:14 +03:00
kd-11 af2af23306 gl/interpreter: Implement async variant generation 2026-05-06 02:10:14 +03:00
kd-11 59f54caf08 gl: Strengthen RAII guarantees for some more objects 2026-05-06 02:10:14 +03:00
kd-11 b3ac8127ea vk: Prebuild base interpreter variants 2026-05-06 02:10:14 +03:00
kd-11 90ea92d93b gl: Fix crash when closing shader loading dialog 2026-05-06 02:10:14 +03:00
kd-11 f694000454 rsx: Fix shader interpreter variants generation 2026-05-06 02:10:14 +03:00
kd-11 b2daaff29f rsx/gl: Implement shader interpreter variant precompilation 2026-05-06 02:10:14 +03:00
Vishrut Sachan d93d9b2c5a game_list: Fix ISO cache bypass in is_from_yml branch for multi-game ISOs (#18683)
Fixes regression from #18546 and #18679.

## Problem
The is_from_yml ISO branch constructed iso_archive unconditionally,
bypassing the cache check inside add_game, making the cache write-only
for yml-sourced ISOs.

## Fix
Added a lightweight index cache entry (iso_path + "//index") storing the
subdir list + mtime. On hit, skips archive construction entirely. On
miss, walks as before and writes the index
2026-05-05 11:14:16 +02:00
MarkosTh09 4f23f5505a fix minor issues with rpath logic 2026-05-05 09:47:20 +09:00
MarkosTh09 69bc124930 add /opt/homebrew to prefix path instead
Append to `CMAKE_PREFIX_PATH` and `CMAKE_SYSTEM_PREFIX` instead of using `include_directories()` and `link_directories()`.

This avoids include/link path
pollution and reduces clashes with vendored dependencies. This means that conflicting homebrew packages no longer have to be unlinked to build rpcs3, as system paths are searched last.
2026-05-05 09:47:20 +09:00
MarkosTh09 056a8ba1b1 macos: hack to fix homebrew rpath issues 2026-05-05 09:47:20 +09:00
Megamouse 350e7b09f5 Update SDL to 3.4.8 2026-05-04 18:18:32 +02:00
Megamouse 1899b61fa5 Update FAudio to 26.05 2026-05-04 18:18:32 +02:00
xperia64 773808169e Move multi-game ISO parsing code path to proper location 2026-05-04 06:57:12 +02:00
Haxy a6fb0c8931 Restore 0.85 compatibility for PS3 Binary Decryption
0.85 elfs break here due to them not having a version header offset.

Very unlikely these elfs will ever load but its useful to be able to decrypt them at least.

Co-authored-by: Elad <18193363+elad335@users.noreply.github.com>
2026-05-03 14:27:10 +03:00
schm1dtmac 155883ea2a Update MoltenVK and restore Game Mode support (as the relevant MVK regression has been fixed) 2026-05-03 12:38:42 +02:00
Vishrut Sachan ca87d103fd game_list: Add multi-game collection support for ISO format discs 2026-05-03 10:14:44 +03:00
Elad 5dd7792c3d Remove vm_ref.h 2026-05-03 08:03:28 +03:00
Megamouse e8cd6f4ef6 Win: Update ffmpeg to 8.1 2026-05-02 08:24:33 +02:00
schm1dtmac b6ed4201df Correct the MVK build config 2026-05-01 05:38:31 +02:00
Megamouse c25e3e33ac Update curl to 8.20.0 2026-04-30 20:41:35 +02:00
Megamouse a8dd053593 Fix some warnings 2026-04-30 20:41:35 +02:00
Megamouse 66d2bc3dd5 Qt: Add timeouts and abort logic to downloader 2026-04-30 20:41:35 +02:00
kd-11 d773a3f94e ci: Bump docker version and use rpcs3 dropbox URL for vulkan SDK 2026-04-30 18:58:08 +03:00
kd-11 4e0995744a vk: Fix shader interpreter 2026-04-30 18:58:08 +03:00
kd-11 80c1c5dd6d vk: Use bulk allocator for FP and VP constant blocks to reduce wastage 2026-04-30 18:58:08 +03:00
kd-11 91a8c56c37 vk: Use UBO for basic transform constants
- Instancing still uses SSBOs, but that's ok. 95% of draw calls are uninstanced anyway.
2026-04-30 18:58:08 +03:00
kd-11 5144a999b3 vk: Use UBO for vertex environment block 2026-04-30 18:58:08 +03:00
kd-11 3b1abec405 rsx/vk: Implement bulk aligned allocator
- Avoids wasting space and allows use of natural arrays in shaders
2026-04-30 18:58:08 +03:00
kd-11 8b02f46e67 rsx: Handle edge case where window size falls outside memory range 2026-04-30 18:58:08 +03:00
kd-11 41e6cbbb5a vk: Fix build on linux CI using outdated SDK 2026-04-30 18:58:08 +03:00
kd-11 ed7f1aa17c vk: Fix UBO alignment mismatch on fragment constants binding
- Fragment constants are of dynamic size, so this isn't totally unexpected.
- NVIDIA GPUs have terrible UBO alignment requirements
2026-04-30 18:58:08 +03:00
kd-11 5839ad9c70 vk: Use UBOs for critical per-fragment data 2026-04-30 18:58:08 +03:00
kd-11 9c725935dc CI: use dropbox for vulkan SDK installer 2026-04-30 18:58:08 +03:00
kd-11 108276c076 vk/data-heap: Implement a caching sliding window buffer view system 2026-04-30 18:58:08 +03:00
kd-11 82a4ff051e vk: Upgrade Vulkan SDK to 1.4.341 2026-04-30 18:58:08 +03:00
kd-11 d1c8073106 rsx: Upgrade SPIRV generation to SPIRV 1.5 for vulkan. 2026-04-30 18:58:08 +03:00
kd-11 3829802699 3rdparty: Update glslang to release 16.2.0 2026-04-30 18:58:08 +03:00
kd-11 46bbbd2056 vk: Fix missing TRANSFER->FRAGMENT barrier for shadowed blocks 2026-04-30 18:58:08 +03:00
kd-11 cbbf52878a vk: Simplify manual heap flush for shadowed blocks 2026-04-30 18:58:08 +03:00
kd-11 278daddd2a rsx/util: Add a simple wrapper for simple_array<T>::for_each
- Just calls std::for_each behind the scenes but it's a lot more convenient
2026-04-30 18:58:08 +03:00
kd-11 48e2d808c9 rsx/util: Add simple_array<T>::filter 2026-04-30 18:58:08 +03:00
kd-11 28ab991302 vk: Support more heap types
- Support for GPU shadow heap (manual flush)
- Support for Fixed-Length data heaps
2026-04-30 18:58:08 +03:00
kd-11 d40a4ee04e vk: Add iGPU detection 2026-04-30 18:58:08 +03:00
Megamouse 7ea0a96d02 Only set db_config if we boot with a title_id 2026-04-30 14:15:29 +02:00
Megamouse 985703058b ISO: Improve path logging 2026-04-30 14:15:29 +02:00
Megamouse 14ca11fdf4 Fix uninizialized member warning 2026-04-30 14:15:29 +02:00
Megamouse 7bc08d05c6 Add some more logging for use of database config 2026-04-30 14:15:29 +02:00
digant73 79d0e0eb3c reduce check for raw device 2026-04-30 10:39:10 +03:00
digant73 570b2bddca Avoid to open bd drive if no content is present 2026-04-30 10:39:10 +03:00
schm1dtmac f3cf1da7b7 Revert "Fix race condition in memory_decommit/memory_reset on Apple ARM64"
This reverts commit 4cac76caad.
2026-04-29 20:26:49 +03:00
schm1dtmac 3c9a4417f2 Revert "Remove redundant Apple ARM64 ifdef blocks"
This reverts commit e1734b51c3.
2026-04-29 20:26:49 +03:00
Antonino Di Guardo b212935c70 Add support to play from a BD Drive (currently only on Windows) (#18648)
Follow up of #18345 to add support (currently only on `Windows`; see
notes below) for playing a PS3 disc game directly from a Blu-Ray Disc
Drive.

### HOW IT WORKS:
- The BD drive can be added as any other game so from `VFS games` or
from `Add Games` menu. In case it is selected from `VFS games`, any
attempt to write files is discarded, e.g. file `Disc Games Can Be Put
Here For Automatic Detection.txt`
- It scans the default redump keys folder `<rpcs3>/data/redump` (it
currently needs to be manually created due it is not yet provided by
rpcs3 installation) to find a matching decryption key

### NOTES:
- Support is currently provided on `Windows` where I can fully test it.
I cannot test under other OS. However, the additions needed for the
other OS are limited only on `fs::file.h/cpp`. In particular inside the
following new functions:
  - `bool is_optical_raw_device(const std::string& path);`
- `bool get_optical_raw_device(const std::string& path, std::string*
raw_device = nullptr);`
- Icons etc. are always refreshed (ISO cache cannot be used due `mtime`
on raw device is not available and any cache check would always fail)
- Code in `ISO.h/cpp` needed some rework to properly manage a read on a
raw device (alignment on offset, size and memory is mandatory). The BD
drive needs to be detected as a file, not as a folder

### MINOR FIXES:
- Fixed wrong specifier used in logging on `ISO.h/cpp`
2026-04-29 05:42:49 +03:00
shinra-electric e05d359721 Bump setup-nuget to v4 2026-04-28 19:34:31 +02:00
Megamouse 74bcbd9816 Update 7zip to 26.01 2026-04-28 12:33:45 +02:00
Megamouse b14c76c1c5 Qt: fix memory leak in confg_database 2026-04-28 10:00:00 +02:00
Luca Silva 6d058586c4 USB: remove zero-length IN URB fake-completion workaround
The passthrough path was fake-completing zero-length bulk/interrupt IN
URBs to mirror the emulated path, so games that drain-poll between
transfers wouldn't stall the libusb worker thread. This baked an
emulator-side assumption about device behaviour into the host stack.

Real PS3 USIO devices issue a ZLP on the read endpoint after any
transfer that would otherwise leave the host's drain URB outstanding
(notably after a CMD_WRITE). Devices that follow the same protocol
(e.g. ITAIKO firmware) are expected to do the same; faking it here
masks firmware bugs and diverges from real hardware behaviour.

Drop the workaround and let libusb submit the URB normally. The IN
URB now completes when the device sends its ZLP, matching real PS3.

Refs: https://github.com/RPCS3/rpcs3/pull/18636#discussion_r3143290987
2026-04-28 08:55:06 +02:00
Luca Silva 771837ee55 USB: use libusb enums for endpoint bitmask checks
Address review: replace raw 0x80 / 0x03 / 0x02 with LIBUSB_ENDPOINT_IN,
LIBUSB_TRANSFER_TYPE_MASK, and LIBUSB_TRANSFER_TYPE_BULK.
2026-04-28 08:55:06 +02:00
Luca Silva d2fc5a5b81 USB: fix passthrough of bulk endpoints on Linux
The PS3 USB stack routes both bulk and interrupt requests through
usb_device_passthrough::interrupt_transfer. The old code unconditionally
called libusb_fill_interrupt_transfer regardless of the endpoint type,
which on Linux's usbfs backend is rejected with EINVAL whenever the URB
type doesn't match the endpoint's bmAttributes. Reads against bulk IN
endpoints therefore never completed and the worker thread stalled.

Look up the endpoint descriptor and dispatch to libusb_fill_bulk_transfer
when bmAttributes indicates bulk. A new usb_device::find_endpoint helper
walks the descriptor tree once per submission.

Confirmed broken on Linux and working on Windows pre-fix; macOS
untested. WinUSB silently accepts the type mismatch, which is why this
went unnoticed. Reproduces with any passthrough device that has a bulk
IN endpoint, e.g. a Bandai Namco USIO (0b9a:0910) under Taiko no Tatsujin
S111 [SCEEXE000]: the game's boot-time the I/O board check runs and then hangs.

Two related defensive fixes uncovered while debugging the above:

- Zero-length bulk/interrupt IN URBs hang in libusb until the device
  sends a ZLP. The emulated path fake-completes them immediately; mirror
  that here so drain-polls between transfers don't stall the worker.

- An unexpected libusb_submit_transfer error used to leave
  UsbTransfer::busy = true forever. Mark it as a fake completion with
  EHCI_CC_HALTED so the USB manager processes the failure cleanly
  instead of deadlocking the request.
2026-04-28 08:55:06 +02:00
Megamouse 3b21833b8e Don't use Qt event loop in headless mode 2026-04-27 23:13:11 +02:00
Mack Core ed02f3a2ce RSX: workaround for color/depth aliasing heurestic edge case failures (#18644)
The color/depth alias collapse heuristic at get_framebuffer_layout()
picks depth whenever depth_test_enabled or stencil_test_enabled is set.
But test means read, not write - so deferred renderers that run a
Z-prepass and then a G-buffer pass with depth-test ON, depth-write OFF,
color-write ON get classified as a depth pass even though they're
writing color. The color writes get silently dropped.

In Starhawk this killed every lit surface - characters, skybox, anything
that goes through the deferred lighting path rendered black or
invisible. Terrain, particles, and emissive geometry kept working
because they don't go through that same pipeline.

Fix is to check writes instead of tests:

    if (zeta_write_enabled && !color_write_enabled)
        keep_as_depth();  // Z-prepass, shadow gen
    else
        keep_as_color();  // G-buffer / lit pass

For the both-writes case I went with color since losing color is much
more obvious visually than losing depth (the engine's Z-prepass usually
still has the depth around).

Tested with Starhawk [BCUS98181] in menu and gameplay - before: missing
characters and sky. After: matches PS3 reference. Logged every aliasing
event during a couple minutes of gameplay and they were all the G-buffer
pattern (depth-test ON, depth-write OFF, color-write ON), all handled
right. The depth-keep branch wasn't actually exercised in Starhawk, but
it's there for games that do use a Z-prepass to an aliased buffer.

Fixes #11877.
2026-04-27 21:59:45 +02:00
score3229 7028e85fac RSX Debugger: populate Captured Draw Calls list
The constructor inserted rows into m_list_captured_frame for the command queue but never did the same for m_list_captured_draw_calls. GetMemory()'s setItem() loop for draw calls then no-op'd on missing rows, so the Captured Draw Calls tab always appeared empty after a frame capture.
2026-04-27 07:16:29 +03:00
capriots 96f73f4497 cellVdec: fixup 2026-04-25 19:51:09 +03:00
capriots 3ff4f188f4 cellVdec: fixup 2026-04-25 18:52:40 +03:00
capriots 61e1c0f1fb cellVdec: reimplement cellVdecQueryAttr() 2026-04-25 15:48:50 +03:00
capriots 631e7ef979 Stub video decoder modules 2026-04-25 15:48:50 +03:00
Elad 7dce197ec4 sys_spu: Fix sys_isolated_spu_create 2026-04-25 08:16:32 +03:00
Haxy 9e0824112f Fix checks for flash device aliases 2026-04-25 07:43:17 +03:00
Daniel Risto e1734b51c3 Remove redundant Apple ARM64 ifdef blocks
The Apple ARM64 code paths are now identical to the generic case,
so the ifdef blocks are unnecessary.
2026-04-24 20:15:41 +03:00
Daniel Risto 4cac76caad Fix race condition in memory_decommit/memory_reset on Apple ARM64
The previous approach used munmap followed by mmap without MAP_FIXED
(since Apple rejects MAP_FIXED | MAP_JIT). Between the two calls,
another thread could claim the unmapped address range, causing mmap
to return a different address and triggering a fatal verification error.

Under concurrent load (e.g. PPU LLVM compilation with many worker threads),
this race manifests reliably as "Verification failed (object: 0x0)" crashes
across all PPUW threads in memory_decommit.

Fix: Use MAP_FIXED without MAP_JIT instead. This atomically replaces the
mapping without any window for other threads to interfere. The MAP_JIT
attribute is lost on the replaced pages, but the application's code signing
entitlements (allow-unsigned-executable-memory, disable-executable-page-protection)
permit executable mappings without it.

Applied the same fix to memory_reset which had the identical pattern.
2026-04-24 20:15:41 +03:00
Kravickas 077f2a73e1 Add clickable PR links in update changelog (#18465)
Replaces the plain text "Show Details" changelog in the update dialog
with a QTextBrowser that converts PR references like (#1234) into
clickable GitHub links.

**Why? :** Easy to check PRs you are interested in beyond the title.
2026-04-24 16:37:17 +00:00
kd-11 a60734e27b gl: Fix crash when renderdoc compatibility is enabled on some hardware 2026-04-24 15:00:27 +03:00
kd-11 3574677b66 rsx: Fix deswizzle of wide texel formats 2026-04-24 15:00:27 +03:00
zeph b3cc01387f Clans: PPU thread sleeping while making API calls
Signed-off-by: zeph <zephyrzefa15@gmail.com>
2026-04-23 13:31:01 +03:00
Antonino Di Guardo e26c80c129 Add ISO integrity check 2026-04-22 15:06:02 +02:00
Elad 80b6faef10 SPU Analyzer: Add some logging 2026-04-22 09:59:14 +03:00
Elad 7d0df300ea SPU LLVM: Fix RCHCNT write channel looping 2026-04-22 09:59:14 +03:00
Elad 1ca8ab393a sys_fs: Fix O_CREATE and O_TRUNC for BDVD 2026-04-21 15:43:41 +03:00
Caleb 3cca094d2d Enhance FAudio backend error handling and initialization processes (#18614) 2026-04-21 08:32:58 +00:00
digant73 a088b18e95 Add missing default setting after settings rework 2026-04-21 00:50:05 +02:00
digant73 e5af69d7b2 Add recursive scan support 2026-04-20 22:04:54 +03:00
Megamouse 814821d760 SPU LLVM: Fix unused variable warnings
- Remove unused block_optimization_exit_early
- Pass mod_val instead of value
2026-04-20 14:12:18 +00:00
Megamouse 7a8c88056a Qt: make emu_settings_type cfg_location dynamic 2026-04-19 22:51:13 +02:00
Megamouse b6b043b23d qt: remove unused emu_settings_type 2026-04-19 22:51:13 +02:00
Megamouse c5db9899e4 cfg: remove redundant prefix from variable names 2026-04-19 22:51:13 +02:00
qurious-pixel 081c094c5a Improve Mac Translation download (#18598)
Switch from API to direct download.
Fixes 403 error code.

jammy-aarch64 needs `unzip` from universe in the Dockerfile.

eg:
```
add-apt-repository universe
apt update -qq
apt-get install -y unzip
```

Fixes https://github.com/RPCS3/rpcs3/issues/18560
2026-04-19 20:42:31 +02:00
digant73 b6c8374aa5 Fix region range check on ISO file 2026-04-19 19:23:37 +03:00
Megamouse 06a6880c6c Qt: Allow to compare configurations in gamelist context menu 2026-04-19 16:21:41 +02:00
Megamouse bd5c10fd48 Fix database config application in continuous mode 2026-04-19 15:25:57 +02:00
Megamouse d3804de243 Loader: try to retrieve database config if not booted through the UI 2026-04-19 15:25:57 +02:00
Megamouse 36cd81fb5f Log url of downloader 2026-04-19 15:25:57 +02:00
Megamouse 7a4d7aa936 Improve quit logging 2026-04-19 15:25:57 +02:00
Megamouse aff082e0c1 version_check: fix formating of result output 2026-04-19 15:25:57 +02:00
Megamouse 2b144101ab Update libpng to 1.6.58 2026-04-19 15:25:57 +02:00
digant73 d4b7c31ec8 Allow to skip optional packages installation
minor cleanup

minor cleanup
2026-04-19 14:38:48 +02:00
oltolm 6c9445ff28 cmake: do not disable "WOLFSSL_HARDEN" and fix build with latest WolfSSL 2026-04-19 13:10:25 +02:00
Megamouse 2d6ca912fe Qt: fix regular boot without database config 2026-04-18 17:57:11 +02:00
digant73 3b9cc0bc3a fix wrong folder creation 2026-04-17 00:48:27 +02:00
Megamouse 88175aa84f Check for unknown keys during config validation 2026-04-16 21:28:34 +02:00
Elad a7c606c8ac sys_fs: Add unit tests 2026-04-16 11:04:37 +03:00
Elad 48acbbe4f5 sys_fs: Reimplement path analysis 2026-04-16 11:04:37 +03:00
schm1dtmac b729772041 Try building MVK 1.4.2 privapi instead of DLing 1.4.1 privapi prebuilt 2026-04-16 03:08:31 +02:00
Megamouse ea0d8a0d78 Qt/input: fix mouse button names
I tested the last PR with an older commit and thought it worked.
2026-04-16 02:10:41 +02:00
Megamouse e79f56bfdc Qt: put Custom Config with Database Settings first 2026-04-16 01:18:05 +02:00
Megamouse a543f38704 linux/macOs: update compat_db and config_db on update 2026-04-16 01:18:05 +02:00
Megamouse 1cdc401cc5 Use database per default, remove global 2026-04-16 01:18:05 +02:00
Megamouse 50d6396f99 implement config db 2026-04-16 01:18:05 +02:00
Megamouse 7d41bbdd2b Fix Disk Usage thread 2026-04-15 13:05:54 +02:00
Megamouse d53a6a87f6 Update wolfssl to 5.9.1 2026-04-15 13:05:54 +02:00
Megamouse 1e63385dfc Update libpng to 1.6.57 2026-04-15 13:05:54 +02:00
schm1dtmac 4ffeee0344 Opt out of Game Mode on macOS due to throttling 2026-04-15 03:02:23 +03:00
Megamouse 0b9c53e254 Qt: Add missing thread name 2026-04-14 11:53:41 +02:00
Megamouse 27f857a8fe Remove unused variable in find_dialog 2026-04-14 11:53:41 +02:00
Megamouse c340eb2f17 Remove nop loop 2026-04-14 11:53:41 +02:00
Megamouse e43435e152 Remove unused should_have_argument_increment 2026-04-14 11:53:41 +02:00
Megamouse ac3d14cf5c Add missing fmt case for cpu_flag::req_exit 2026-04-14 11:53:41 +02:00
Megamouse 426f3c445b Remove some unused variables 2026-04-14 11:53:41 +02:00
Megamouse bbeb7c4cd7 Remove sneaky pragma optimize 2026-04-14 11:53:41 +02:00
Megamouse 6c87413f48 SPURecompiler: add missing default 2026-04-14 11:53:41 +02:00
Megamouse b10c742f10 iso stuff 2026-04-14 09:37:18 +02:00
Megamouse 9e3e01d8f6 input: fix mouse+kb combos 2026-04-14 08:44:20 +02:00
luci4 bcd9663349 Thread.cpp: Added stack trace and register logging to exception filter (#18564) 2026-04-13 15:47:44 +03:00
Megamouse 72fa4098dc Add 3D screen size setting 2026-04-12 17:59:01 +02:00
luci4 6dc95dd078 sysinfo.cpp: Remove registry helpers (#18557)
The "caveat" is that said API bypasses compatibility shims so it will
always show the true Windows version.
2026-04-12 13:53:00 +03:00
Vishrut Sachan 11050a7032 ISO: Add metadata cache to speed up game list scanning (#18546)
Every launch constructs a fresh iso_archive for each ISO game, which
calls iso_form_hierarchy() and walks the full directory tree. On top of
that, qt_utils opens a second iso_archive just for icon loading, so
every ISO game ends up doing two full directory tree walks on every
launch.
This adds a metadata cache keyed by ISO path + mtime stored under
fs::get_config_dir()/iso_cache/. Each entry stores the raw SFO binary,
resolved icon/movie/audio paths and raw icon bytes.

- On cache hit, iso_archive construction is skipped entirely for both
game list scanning and icon loading
- On cache miss archive is scanned as before and the result is persisted
to disk
- Cache is automatically invalidated when the ISO file's mtime changes

Tested with a decrypted PS3 disc ISO (God of War III):

- First launch writes cache files correctly to iso_cache/
- Second launch reads from cache with correct title and icon
- touch game.iso correctly invalidates the cache and triggers a rescan
2026-04-12 09:07:25 +00:00
Ani f826f95c70 gui: Group CPU accuracy settings together 2026-04-11 22:08:19 +02:00
luci4 934bc34685 sysinfo.cpp: Replaced PEB read with ntdll function (OS version read) 2026-04-11 22:28:11 +03:00
oltolm f463c128e3 Fix ASan fatal-report access during emulator teardown 2026-04-11 14:01:38 +03:00
oltolm 7168cd566a Fix ASan logger shutdown use-after-free 2026-04-11 14:01:38 +03:00
digant73 110c786d80 Add support to encrypted ISO
fix compile errors and suppress minor warnings

strip minor bug fixes and cleanup

minor cleanup

minor cleanup

Fixed crash at boot parsing an ISO with a empty directory entry at file head

applied suggested changes

added missing break in switch

Update rpcs3/Loader/ISO.cpp

Co-authored-by: Megamouse <studienricky89@googlemail.com>

use hex_to_bytes() instead of self made functions

minor cleanup

rewrite nested if()

add explicit support to .key

minor cleanup

optimize partial sector read

minor optimization

fix conflict
2026-04-10 22:41:05 +02:00
oltolm fb194241d5 fix LLVM assert in use_begin 2026-04-10 19:29:23 +03:00
kd-11 09554c43ba rsx: Allow DXT texture decoding to gracefully fall back to unaligned memory addresses 2026-04-10 13:06:52 +02:00
kd-11 1b1143094e rsx: Improve handling of aligned memory 2026-04-10 13:06:52 +02:00
Ani 8121bd443c ppu: Enable vector NaN fixup by default 2026-04-10 02:26:42 +02:00
oltolm a1a140db91 CPUThread: fix ASAN use-after-free 2026-04-09 23:20:56 +03:00
Megamouse e9fb3572f9 Qt: Show error if any package is corrupt before installation 2026-04-09 12:09:06 +02:00
Katalin Rebhan 1d85de6236 Include <pthread.h> for pthread_self
Fixes compilation on Gentoo Linux with clang/libc++ 21.
2026-04-09 03:27:19 +03:00
Megamouse 6981e308a0 Update docker to 1.11
Update SDL to 3.4.4
Update ffmpeg to 8.1
Update opencv to 4.13
2026-04-08 12:19:58 +02:00
Megamouse 8e80ddd99f ISO: optimize some file reads (#18511)
- Batch some file reads in iso_read_directory_entry (speeds up indexing
by ~41% on my test iso)
- Fix some warnings
2026-04-08 10:52:03 +02:00
Ani beac01d5d1 SPU: Remove RCHCNT loop handling of SPU_WrOutIntrMbox 2026-04-07 15:19:48 +03:00
Ani d7f8e25cca SPU: Remove RCHCNT loop handling of SPU_WrOutMbox
Fixes freezing in Half-Life 2

Fixes #17958
2026-04-07 15:19:48 +03:00
kd-11 e0c3df5328 vk: Fix crash when running CPU detiler path 2026-04-07 04:11:25 +02:00
kd-11 59468f1e1e vk: Handle WAW and RAW hazards when performing "flush" operations 2026-04-07 04:11:25 +02:00
kd-11 8ab0ceaa67 vk: Wrap scratch buffer access with proper memory barriers 2026-04-07 04:11:25 +02:00
kd-11 b9f05ba71b vk: Insert a all_commands->transfer barrier before copying query results to scratch 2026-04-07 04:11:25 +02:00
kd-11 5311f004d0 vk: Insert barriers on the scratch buffer when detiling memory 2026-04-07 04:11:25 +02:00
kd-11 cb276f0da7 vk: Insert transfer->transfer barriers before creating aggregates 2026-04-07 04:11:25 +02:00
kd-11 34c26eff68 rsx: Extend cubemap_unwrap decode to handle cubemaps with mipmaps 2026-04-06 14:21:40 +02:00
kd-11 b700a7abd9 gl: Extend mipcount support for reconstructed images 2026-04-06 14:21:40 +02:00
kd-11 c279583f1f vk: Allow cubemap unwrap to generate more than 1 mipmap level 2026-04-06 14:21:40 +02:00
kd-11 ce12c29441 rsx: Allow negative src and dst pitch in nv0039
- Confirmed with hardware tests
2026-04-05 18:18:44 +02:00
capriots e95a980651 cellDmux: process PPU state after lv2 syscalls 2026-04-05 17:42:45 +03:00
capriots 87fc45d661 cellDmuxPamf: logging fix 2026-04-05 17:42:45 +03:00
capriots 93a2f1edc8 cellPamf: remove unused code 2026-04-05 17:42:45 +03:00
capriots 22fe8648ef cellDmux implementation 2026-04-05 17:42:45 +03:00
Daniel Risto f42b09d1fc Fix SPRX Loader segfault on Apple ARM64 by excluding MAP_JIT from memory mapping regions
On Apple ARM64, memory_reserve unconditionally applies MAP_JIT to all
reservations. However, regions marked as is_memory_mapping are later
replaced by file-backed MAP_FIXED mappings via shm::map/map_critical.
Overlaying a file-backed MAP_FIXED mapping onto a MAP_JIT region causes
the resulting pages to be inaccessible, leading to a segfault when the
SPRX Loader attempts to write module data into PS3 memory (g_sudo_addr).

Fix: Only apply MAP_JIT for non-mapping regions. Memory mapping regions
don't need JIT capability since they use shared memory for the PS3
address space, not executable JIT code.

Tested on Apple M3 Max, macOS 26.3.1. The SPRX Loader now successfully
loads all modules and emulation proceeds past the loading stage.
2026-04-05 14:47:24 +03:00
Megamouse b8e6785789 Update soundtouch to 2.4.1 2026-04-05 11:14:11 +02:00
Megamouse afdb57bee9 Update FAudio to 26.04 2026-04-05 11:14:11 +02:00
Sanjay Govind b22d0a0b4a Bump SDL to 3.4.4 2026-04-05 10:07:49 +02:00
Vishrut Sachan ec989781a3 game_list_table: Allow reordering game list columns 2026-04-04 18:47:12 +02:00
oltolm 110ef818b3 PPU LLVM: fix compilation for PPU Debug option 2026-04-04 11:57:50 +00:00
Elad aa841ac332 LLVM: Add source location for bitcast error 2026-04-04 01:08:05 +03:00
Elad ceb2168375 SPU LLVM: Remove debug code 2026-04-04 01:08:05 +03:00
Elad 02eb549208 SPU LLVM: Fix register updates in second block of Reduced Loop 2026-04-03 18:33:07 +03:00
Elad 13de8233b0 SPU Analyzer: Fix register origin for Reduced Loop 2026-04-03 18:33:07 +03:00
Elad ff4444b18e Silence cellNetCtlGetInfo 2026-04-03 18:33:07 +03:00
Elad 555ace0955 rsx: Silence Unknown render mode error 2026-04-03 18:33:07 +03:00
Elad a03a78dbd2 SPU: Verify SPU Reduced loop completability 2026-04-03 18:33:07 +03:00
BehroozRezvani f63b1b5dc1 Fixes PS button wrong input path check 2026-04-02 19:42:15 +03:00
Elad ac104a519e SPU Analyzer: More fix 2026-03-31 21:56:30 +02:00
Elad bd95c728f0 sys_fs: Implement ENOTDIR 2026-03-31 21:56:30 +02:00
kd-11 122ccca50e rsx: Propagate texture flags when MSAA sampling is required 2026-03-31 02:51:03 +02:00
kd-11 83bfbc1399 rsx/fp: Fix lane mask computation for varying registers 2026-03-31 02:51:03 +02:00
Elad 80f972cd38 SPU Analyzer: Acknowledge unknown targets 2026-03-31 02:12:40 +02:00
Elad 615f416af3 SPU Anlyzer: Verify bitset index 2026-03-31 02:12:40 +02:00
kayforbe 1c37f64a58 Add missing <set> include for MSVC compatibility (#18486)
Added missing #include <set> in shortcut_utils.h to fix MSVC build
errors (C2059)
2026-03-30 17:47:52 +00:00
Megamouse 7c9261a461 overlays: add toggle for boot sequence music 2026-03-30 18:40:34 +02:00
Megamouse cb3a83cba7 overlays: add setting for fatal error hint (disabled by default) 2026-03-30 18:40:34 +02:00
Megamouse b0dbac9a07 Qt: hide log frame by default 2026-03-30 18:40:34 +02:00
Megamouse f92677fa7e rsx: Add missing break 2026-03-30 14:26:50 +02:00
Megamouse 789bab97be Qt: add some sorting options to the screenshot manager 2026-03-30 14:26:50 +02:00
Megamouse 3e60bd2aa6 steam: disable steam input for shortcuts 2026-03-30 12:41:19 +02:00
Megamouse 6dc06b3ff5 Update Qt to 6.11.0 2026-03-30 10:58:19 +02:00
Megamouse a10390e52a Update libpng to 1.6.56 2026-03-30 10:58:19 +02:00
Megamouse 433110b4d8 Update wolfssl to 5.9.0 2026-03-30 10:58:19 +02:00
Megamouse b94e6d4864 Fix some warnings 2026-03-30 10:58:19 +02:00
Megamouse 44dc29e52b Qt: Add some some more thread names 2026-03-30 10:58:19 +02:00
Megamouse ab03d76ed6 overlays: show latching message for fatal errors 2026-03-30 10:13:05 +02:00
Megamouse bd2b2c2747 Qt: add recording settings dialog 2026-03-30 09:17:20 +02:00
Ani aa7cf5ea15 sysinfo: Implement RAM Usage stats for Linux (#18473)
Reads memory statistics from "/proc/meminfo"
2026-03-29 19:48:59 +03:00
oltolm f8fe64ff77 find_dialog: fix compiler warning 2026-03-29 14:45:53 +02:00
oltolm 1791876eda remove unused lambda captures 2026-03-29 14:45:53 +02:00
oltolm e6204d3c1d CMake: fix the case USE_SYSTEM_ZLIB=OFF and USE_SYSTEM_CURL=OFF 2026-03-29 14:45:53 +02:00
oltolm f0f9ef6f30 cmake: fix build with latest Curl 2026-03-29 14:45:53 +02:00
kd-11 51ea735cb5 rsx/vk: Try to reclaim memory aggressively when changing resolution scale 2026-03-28 20:20:12 +03:00
kd-11 069821a2e7 rsx/rtts: Fix broken optimization check
- Typo. Applying inverse res scale is really not what we want
2026-03-28 20:20:12 +03:00
kd-11 0052108e87 rsx/rtt: Fix transfer region calculation when source and destination scaling does not match 2026-03-28 20:20:12 +03:00
kd-11 64c24959cb rsx: Fix clang build 2026-03-28 20:20:12 +03:00
kd-11 b57390d3cd rsx/overlays: Add resolution scale threshold to home menu 2026-03-28 20:20:12 +03:00
kd-11 91c136b6d0 rsx/overlay: Add resolution scale slider to home menu 2026-03-28 20:20:12 +03:00
kd-11 c00fa2cc8c config: Make resolution scaling a dynamic option 2026-03-28 20:20:12 +03:00
kd-11 fe3cbde1d3 rsx: Add optimization to skip cloning surfaces whose dimensions did not change
- If only the threshold changed or the surface is below threshold anyway, nothing will change
- In those cases, just update the internal data and continue
2026-03-28 20:20:12 +03:00
kd-11 e2dff6bbf8 rsx: Implement resolution scale change handling in surface cache 2026-03-28 20:20:12 +03:00
Elad 976cd1ce66 SaveStates: Fix restart after saving 2026-03-27 22:22:40 +03:00
Elad a4523651c7 RPCS3: Notify RAM shortage, Log current and peak RAM usage 2026-03-27 20:20:29 +03:00
BehroozRezvani 2702417192 Make performance overlays use window space (#18419)
Adds a new performance overlay option to use the whole window as rather
than just framebuffer space.
2026-03-27 16:08:46 +01:00
capriots 72b872df66 cellDmuxPamf: fix freezing FMVs in some games
- Delays demuxing a bit to let the game finish initializing FMV
playback.
- Also includes the missing half of #18450 which I forgot to Commit ^^"
- Sets cellDmuxPamf to HLE by default again
2026-03-27 13:47:26 +00:00
Elad bb3e2689d4 Thread.cpp: Fix game exit on access violation
Fixes game closing in Twisted Metal.
This commit also aloows to debug such states by using cpu_flag::req_exit as a broker
2026-03-26 13:55:00 +02:00
Elad 4ced11e533 SPU Analyzer: Add pure opcode tag 2026-03-26 13:55:00 +02:00
Elad 9a0a5a1735 LLVM: Try to reuse BitCasts 2026-03-26 13:55:00 +02:00
Elad e83034624b SPU Debugger: Measure rate of block ran 2026-03-26 13:55:00 +02:00
Elad 619fe7b14e SPU LLVM: Classify SPU memory and context memory instructions 2026-03-26 13:55:00 +02:00
Elad 37a07ae545 SPU LLVM: Optimize FM, FMA and FCGT in Reduced Loop 2026-03-26 13:55:00 +02:00
Elad e1eae3ee49 Add floating ppoint hint 2026-03-26 13:55:00 +02:00
Elad 49abd6d8e5 SPU LLVM: Allow the reuse of address from LQX/STQX 2026-03-26 13:55:00 +02:00
Elad fbdbf8addf SPU LLVM: CEQHI pattern 2026-03-26 13:55:00 +02:00
Elad 2e4ee9c9b6 SPU LLVM: Implement reduced loop 2026-03-26 13:55:00 +02:00
Elad a863e94c25 SPU: Detect reduced loop 2026-03-26 13:55:00 +02:00
kd-11 9b6bc7c1b4 rsx: Make resolution scaling configuration non-global
- Paves the way for other changes.
- The main goal is to be able to switch the resolution scale and MSAA level at runtime.
2026-03-25 21:19:46 +03:00
kd-11 86b7ea6bf3 overlays/sdf: Avoid 0-height inner boxes for switch capsule
- Can introduce dfdx/dfdy discontinuities on the midline as the distance changes direction
- The seams can sometimes become visible if a border is applied on some GPUs
2026-03-25 21:19:46 +03:00
oltolm 18bd6d681e cmake: fix build with bundled zlib 2026-03-25 08:30:41 +01:00
oltolm 2dd194d381 make the code build with Clang 22 2026-03-25 08:30:41 +01:00
oltolm a8b603dd92 CMake: remove option USE_MSVC_STATIC_CRT and clean up 2026-03-25 08:30:41 +01:00
Megamouse a03d4f69f8 logs: Fix global log levels during boot and after changing log level settings 2026-03-24 19:34:06 +01:00
capriots 99bb042bea HLE modules: process PPU state after lv2 syscalls 2026-03-24 07:55:05 +02:00
Megamouse 2bcc27d581 Qt/input: Do not send gui input release events until there was at least one button press 2026-03-23 20:32:46 +01:00
Megamouse 53c33cd812 gui/input: disable stick anti deadzone in pad navigation
This is only meant to be used during emulation.
2026-03-23 19:35:01 +01:00
Megamouse 1d05cf9ce5 Qt/Input: trace gui pad navigation button presses 2026-03-23 19:35:01 +01:00
Megamouse 07f5b0aa5b Qt: Improve find dialog
Add index of current line and word.
Add case sensitivity checkbox.
2026-03-23 17:52:30 +01:00
Megamouse 36e1d664ea Qt: Smoothly start/stop audio with fade in and fade out 2026-03-23 14:47:15 +01:00
Megamouse 90e2c39015 Qt: loop SND0.AT3 audio 2026-03-23 14:47:15 +01:00
kd-11 5a90dc0059 overlays: Bump the slider label font size 2026-03-23 02:38:34 +03:00
kd-11 c19d22ce88 overlays/sdf: Clamp rounded-rect border radius to never exceed the box sides
- If the radius exceeds any half-dimension then the box-shrink subtraction yields a negative.
  That negative introduces a second transition boundary when the classification happens as it transitions back to positive.
  Normally not a big deal but when rendering borders at the transition points it can introduce artifacts.
2026-03-23 02:38:34 +03:00
kd-11 5acc263b73 gl: Properly initialize memory layout definition structs
- Also refactors the upload_texture function to be a bit more readable
2026-03-23 01:36:50 +03:00
schm1dtmac bc6e01c422 Fix GH & brew breaking macOS builds again 2026-03-22 20:36:51 +01:00
kd-11 a2eb4fec53 overlays: Restore slider handles to previous size
- Added padding to smooth out the outer edge transition made the circle too small
2026-03-22 20:11:43 +03:00
kd-11 32c9c6f515 overlays: Fixups for switch rendering
- Disallow odd numbers for the primary dimension
- Increase the size slightly in home menus
- Disable vertex snapping when rendering SDFs
2026-03-22 20:11:43 +03:00
kd-11 04f7dd02fd overlays: Fix SDF rendering when scrolling is involved 2026-03-22 20:11:43 +03:00
kd-11 35907bcfc8 overlays: Redesign switches 2026-03-22 20:11:43 +03:00
kd-11 61b1bd7ead overlays/sdf: Take element padding into account
- Helps to smooth out the outer edges of ellipses and circles
2026-03-22 20:11:43 +03:00
kd-11 2bad4f47f1 gl: Integrate SDF rendering functionality 2026-03-22 20:11:43 +03:00
kd-11 5a94adcf26 overlays: Implement SDF config transforms 2026-03-22 20:11:43 +03:00
kd-11 57e37862f4 overlays: Use ellipse SDF for circles 2026-03-22 20:11:43 +03:00
kd-11 45bae0046a vk: Add support for basic SDF rendering
- Does not support scaled coordinates yet
2026-03-22 20:11:43 +03:00
kd-11 a0c91bf96a overlays: Use SDF equations to represent curved shapes 2026-03-22 20:11:43 +03:00
Ani b607993b7b overlay: Remove redundant redeclaration
Fixes one gcc compilation warning
2026-03-22 16:40:20 +01:00
Ani 1eb72e4b71 rpcs3: Add missing #include <climits>, fix gcc-16 compilation 2026-03-22 16:40:20 +01:00
Megamouse e5840ab868 Qt: fix audio timer loop 2026-03-22 15:46:44 +01:00
BehroozRezvani 54999d1507 Add Zed config files to gitignore 2026-03-22 13:16:58 +01:00
Megamouse 51514f9dc8 Qt: start hover audio/video after a timeout 2026-03-22 06:49:43 +01:00
Megamouse 40229adb14 Qt: add gui audio volume setting 2026-03-22 06:49:43 +01:00
Megamouse 33f8deffbe Qt: add setting for disabling hover music 2026-03-22 06:49:43 +01:00
Megamouse c80e08a642 Qt: Don't check for movies if play_hover_movies is disabled
Apparently this was forgotten. The variable was already captured
2026-03-22 06:49:43 +01:00
Megamouse 62b2ffd7ca Qt/overlays: Add secondary audio output for emulation 2026-03-22 06:49:43 +01:00
Megamouse cd1d6282b4 Qt: Remove some unused code 2026-03-21 16:10:26 +01:00
kd-11 67f69bb4b3 rsx/cfg: Fix handling of instructions with literal input
- The hardware is pretty dumb about it, it just unconditionally skips the next instruction
2026-03-21 14:44:45 +01:00
RipleyTom 2ba7756c0e Add overlay notification for received messages 2026-03-20 19:51:16 +01:00
Megamouse c6407b37a5 Batch create/remove steam shortcuts 2026-03-20 17:48:11 +01:00
kd-11 410660627d overlays: Add a special message id for spinners with empty text 2026-03-20 15:33:28 +03:00
kd-11 852317a071 overlays: Shrink the shader notification popup 2026-03-20 15:33:28 +03:00
kd-11 6590f1b55d overlays: Add RSX memory tiling to settings page 2026-03-20 15:33:28 +03:00
schm1dtmac 84277f41a1 Fix mac builds (& add some failsafes) 2026-03-19 21:51:36 +01:00
Ani b73c45f1fb overlay: Add 8px left margin on the sidebar 2026-03-19 19:44:55 +01:00
kd-11 ddd226f0ea rsx/fp/cfg: Add unit test for special cond inversion 2026-03-19 19:38:17 +03:00
kd-11 3c68c36fa0 rsx/cfg: Log a warning when encountering empty IF blocks with ELSE aliasing
- Hardware tests confirm this is correct behavior, the condition just inverts
2026-03-19 19:38:17 +03:00
kd-11 d54e54b66d rsx/cfg: Handle IF-ELSE aliasing statement as inverted condition
- If there is no IF block but ELSE block exists, treat the branch as being inverted and the ELSE block as the main IF body
- Rare but seen in some games
2026-03-19 19:38:17 +03:00
RipleyTom 2f3b66985e Clean up code using mutable + const when possible 2026-03-19 14:56:48 +02:00
kd-11 43799762c7 qt: Update tooltips with new vsync behavior 2026-03-19 03:10:07 +03:00
kd-11 cb501e32ca gl: Make vsync setting dynamic 2026-03-19 03:10:07 +03:00
kd-11 7a7e25f901 overlays: Add Vsync configuration to overlays 2026-03-19 03:10:07 +03:00
kd-11 e690e7e458 gl/vk: Implement tri-state Vsync setting 2026-03-19 03:10:07 +03:00
Ani 253d4565f1 config: Enable start in fullscreen mode by default 2026-03-18 22:34:37 +01:00
Megamouse 1f2a935458 Qt: Do not close pad settings dialog if user said no in duplicate button dialog 2026-03-18 18:47:34 +01:00
Megamouse 0c27b63ab4 Qt: fix duplicate button or combo warning 2026-03-18 18:47:34 +01:00
FlexBy420 4c106960c5 Update current firmware to 4.93 2026-03-18 16:00:35 +02:00
Megamouse f076d1e1e6 Input: Fix keyboard stick handling 2026-03-18 12:10:29 +01:00
Megamouse 7b58340a60 Input: optimize keyboard button handling on release 2026-03-18 12:10:29 +01:00
Megamouse 5578edf9e4 Input: Map PS button to start+select by default 2026-03-18 12:10:29 +01:00
Megamouse 704d8764af input: refactor combos into a struct for future use
Also update some terminology in the code
2026-03-18 12:10:29 +01:00
Darkhost1999 6523afa69a overlays/home: Fix restarting games from home menu 2026-03-17 21:39:18 +01:00
Megamouse 5416f432b5 input: Fix SDL buttons 2026-03-17 20:53:46 +01:00
Megamouse 43f3a4816d Qt: Fix game list selection after Refresh(true) 2026-03-17 20:15:40 +01:00
Megamouse bc0c42b025 Automatic combo button input 2026-03-17 15:30:21 +01:00
Megamouse 9f3adb3fc7 Fix steam banners for iso files 2026-03-17 14:47:17 +01:00
Megamouse df6cba6582 Use ICON0.PNG for steam cover 2026-03-17 14:47:17 +01:00
Megamouse 8cdad0af98 Add more fallbacks to the steam banner 2026-03-17 14:47:17 +01:00
Megamouse 801a1e6c38 Qt: Move game shortcut creation logic to shortcut_utils 2026-03-17 14:47:17 +01:00
kd-11 9da088fe29 overlays: Relax vblank range to default 2026-03-17 15:42:12 +03:00
kd-11 d96f31eda4 overlays: Limit vblank setting in the UI
- Use Qt GUI or config modification if you need crazy figures
2026-03-17 15:42:12 +03:00
kd-11 a5cce58225 overlays/home: Auto-resize the sidebar in case of long translated text 2026-03-17 15:42:12 +03:00
kd-11 39e6fc5918 overlays: Left align the savestates menu
- Temporary measure, a proper dialog will be added later
2026-03-17 15:42:12 +03:00
kd-11 2ea344ce3e overlays: Allow home menu 'entries' to support different alignment options 2026-03-17 15:42:12 +03:00
kd-11 358fbb3ce3 overlays: Backing out of settings menu returns to home menu 2026-03-17 15:42:12 +03:00
kd-11 aaf441005a overlays: Fix UX issues with dropdowns
- Select button resets the value to default
- Audio cues play correctly
2026-03-17 15:42:12 +03:00
Megamouse 6e6dd603cb mmjoy: deduplicate some code 2026-03-17 13:36:25 +01:00
Megamouse 22fe14d31d input: implement button combos 2026-03-17 13:36:25 +01:00
Megamouse 2eba7da8e6 Qt: Create Steam banners as well during shortcut creation 2026-03-16 23:20:24 +01:00
kd-11 ca2b7f9b9f rsx/overlays: Fix linux build 2026-03-16 19:08:07 +03:00
kd-11 4780e7c8da rsx/overlays: Fix clang build 2026-03-16 19:08:07 +03:00
kd-11 a318384142 rsx/overlays: Fix weird spacing with reset prompt
- Just post-rebase issues
2026-03-16 19:08:07 +03:00
kd-11 53d3f49f45 overlays/gl: Fix misbehaving clip regions 2026-03-16 19:08:07 +03:00
kd-11 25581ce52f overlays/tabs: Fix crash when scrolling through tabs quickly 2026-03-16 19:08:07 +03:00
kd-11 6c0c80b7bb overlays/list-view: Use track to indicate scrolling instead of ugly highlight 2026-03-16 19:08:07 +03:00
kd-11 f9af53f215 overlays: Fix bug with list view element count calculation and selection wrap-around 2026-03-16 19:08:07 +03:00
kd-11 2fd5b1b4be overlays/home: Add icons to settings page 2026-03-16 19:08:07 +03:00
kd-11 3acf1f6470 overlays: Add some more icons 2026-03-16 19:08:07 +03:00
kd-11 37f1533dad overlays/home: Integrate the new dropdown widget 2026-03-16 19:08:07 +03:00
kd-11 bb652ed840 rsx/overlays: Implement dropdown control
- The base widget and the popup are rendered separately
- The owner is responsible for placing the widget at the desired position for rendering
2026-03-16 19:08:07 +03:00
kd-11 281706fdae overlays/utils: Add simple utility to center align a child component 2026-03-16 19:08:07 +03:00
kd-11 198fe71cc4 overlays/checkbox: Make sure backgrounds are opaque for clarity 2026-03-16 19:08:07 +03:00
kd-11 b8e2c7060b overlays: Improve slider label spacing 2026-03-16 19:08:07 +03:00
kd-11 dbb6c87a10 utils: Implement enum size computation 2026-03-16 19:08:07 +03:00
kd-11 7240cbfdab rsx/overlays: Implement arrow rendering 2026-03-16 19:08:07 +03:00
kd-11 7866c7195c rsx/overlays: Tabs - Do not touch renderer resources on the input thread! 2026-03-16 19:08:07 +03:00
kd-11 e26978e664 overlays/home: Use the new slider component 2026-03-16 19:08:07 +03:00
kd-11 63ed8881a4 rsx/overlays: Implement slider control 2026-03-16 19:08:07 +03:00
kd-11 1be7b9f983 overlays: Align switches to container end 2026-03-16 19:08:07 +03:00
kd-11 471ed347f4 overlay/settings: Use switch element instead of checkbox 2026-03-16 19:08:07 +03:00
kd-11 cff9b5b65e rsx/overlays: Implement checkbox and switch controls 2026-03-16 19:08:07 +03:00
kd-11 5d28ff5df1 overlays: Unified icon loading logic 2026-03-16 19:08:07 +03:00
kd-11 7fd0aa95fb overlays: Add icons for trophies and friends 2026-03-16 19:08:07 +03:00
kd-11 27ecfaee9c overlays/home: Add icons to the home menu 2026-03-16 19:08:07 +03:00
kd-11 ce2afa1d54 overlays: Extend list view to allow hassle-free insertion of overlay-element descendants 2026-03-16 19:08:07 +03:00
kd-11 984c562500 overlays: Fix bug in box padding calculation 2026-03-16 19:08:07 +03:00
kd-11 f880a00cba overlays: Provide home icons in different sizes 2026-03-16 19:08:07 +03:00
kd-11 6cf2cc67d3 overlays/icon: Handle some edge cases 2026-03-16 19:08:07 +03:00
kd-11 9e6fecb4ca rsx: Tighten data contract for "external" raw images 2026-03-16 19:08:07 +03:00
kd-11 3194bd3fb4 overlays/home: Add icons repository wrapper 2026-03-16 19:08:07 +03:00
kd-11 fcb5a5c5f8 overlays: Add some home menu icons from font-awesome 2026-03-16 19:08:07 +03:00
kd-11 3988eceb8d overlays: Turn the home menu into a proper sidebar 2026-03-16 19:08:07 +03:00
kd-11 2b2b13273b overlay/settings: Add missing sound effects 2026-03-16 19:08:07 +03:00
kd-11 88278ec7c9 rxs/overlays: Fix visual glitches in the tabbed settings dialogs 2026-03-16 19:08:07 +03:00
kd-11 7d92198ef0 rsx/overlays: Improvements for some containers 2026-03-16 19:08:07 +03:00
kd-11 23eb67badc rsx/overlays: Convert settings pages to a tabbed interface 2026-03-16 19:08:07 +03:00
kd-11 d5928d99d7 rsx/overlays: Replace home menu with a sidebar 2026-03-16 19:08:07 +03:00
kd-11 3c16105c3b overlays/home: Refactor to support having some home pages inside other containers 2026-03-16 19:08:07 +03:00
kd-11 5cb688f309 rsx/overlays: Implement tabbed containers 2026-03-16 19:08:07 +03:00
Megamouse 7859a5f9d2 input: log warning instead of throwing an exception when the dpad has an unknown value 2026-03-16 11:13:17 +01:00
Megamouse 8b74ea8757 Qt: Add steam shortcuts 2026-03-16 10:30:47 +01:00
Megamouse 2c2ec6e109 VS: Add missing test files
I'm having some gmock issues, so let's just exclude them for now.
2026-03-16 10:30:47 +01:00
Megamouse 6c48bd8f93 Fix callback initialization order
We need to initialize the emu callbacks before creating the main window.
Otherwise CallFromMainThread segs since call_from_main_thread is null.
The same goes for the CallFromMainThread connect in gui_application.
If we create the connection too late, we will simply never wake up the
caller and therefore softlock eventually.
2026-03-16 09:49:42 +01:00
Ani b422cb86f2 cmake: Build with SDL by default 2026-03-16 08:59:15 +01:00
Ani 1fb97734a0 cellDmuxPamf: LLE by default again
HLE implementation is crashing on a few games, see #18360, revert it back to LLE until issues with HLE are fixed
2026-03-16 06:21:01 +02:00
Ani 7221012593 config: Disable pad navigation by default
Pad navigation is currently crashing with the SDL handler, see #18362. Disable it until the issue is fixed.
2026-03-16 02:03:54 +01:00
p0yr4s 297db8713f qt: import QJsonDocument 2026-03-15 21:00:11 +01:00
p0yr4s 477ae6c6df cmake: Only use Qt6::GuiPrivate for Qt >= 6.10 2026-03-15 21:00:11 +01:00
Megamouse 74fbca8c80 input: simplify mmjoy handler 2026-03-15 20:00:05 +01:00
Megamouse 433816148a Fix iso shortcuts 2026-03-15 19:02:32 +01:00
Ani 5714eb0ba5 config/ui: Unify Shader Mode values
Have the same values between UI and Config for easing automatic configuration
2026-03-15 18:19:45 +01:00
Ani 315f88b0e4 ui: Split overlay settings, A-Z order emulator tab settings 2026-03-15 18:19:45 +01:00
AniLeo 8587fca5db ui: Move SPU Loop Detection to advanced 2026-03-15 18:19:45 +01:00
AniLeo e2a26f937f ui: Move PPU Non-Java Fixup to debug 2026-03-15 18:19:45 +01:00
AniLeo 90ebc7f319 ui: Move Accurate DFMA to debug 2026-03-15 18:19:45 +01:00
AniLeo 67a67feb68 ui: A-Z order advanced tab settings 2026-03-15 18:19:45 +01:00
AniLeo 9bdacc64aa config: Enable pad navigation by default 2026-03-15 18:19:45 +01:00
AniLeo 5a921bca46 ui: Allow toggling pad navigation on BSD 2026-03-15 18:19:45 +01:00
AniLeo 86f453f677 ui: Merge pkg/pup install dialog options 2026-03-15 18:19:45 +01:00
AniLeo 7712584bd4 ui: Merge exit/boot game dialog options 2026-03-15 18:19:45 +01:00
Ani bc58dff715 ui: Rename depth buffers to depth buffer
Removes ambiguity between config and ui
2026-03-15 18:19:45 +01:00
Ani 0bb6299e39 ui: Specify Anti-Aliasing as MSAA 2026-03-15 18:19:45 +01:00
Ani b24524fc75 config: Fix naming of SPU XFloat Accuracy
Rename from 'XFloat Accuracy' to 'SPU XFloat Accuracy'
2026-03-15 18:19:45 +01:00
Ani 60eb1ce2ec config: Fix naming of Asynchronous Texture Streaming
Rename from 'Asynchronous Texture Streaming 2' to 'Asynchronous Texture Streaming'
2026-03-15 18:19:45 +01:00
Ani 9733d8c857 config: Move FSR CAS out of Vulkan subcategory
FSR1 was already implemented for OpenGL as well, so this setting is no longer exclusive to the Vulkan render
2026-03-15 18:19:45 +01:00
jfleezy23 5274210ba8 VK: scale auto shader compiler workers on wide CPUs 2026-03-15 18:45:36 +03:00
Malcolm 1627757608 SPU LLVM: Emulate GBB with udot/sdot
Greatly simplifies GB, GBH, and GBH. Uses udot/sdot with power of two
masks to shift values and sum them in a single step, effectively
gathering them
2026-03-15 08:48:18 +02:00
Malcolm 4542020c86 SPU LLVM: ARM64: Use UDOT for emulating SUMB 2026-03-15 08:48:18 +02:00
Megamouse b734ceb2e7 overlays: allow to reset current setting 2026-03-14 17:50:22 +01:00
qurious-pixel 951d47c94c Use System Protobuf for Intel Mac 2026-03-14 09:53:24 +01:00
Megamouse 6f07e8453a Update curl to 8.19.0 2026-03-12 19:08:49 +01:00
Megamouse e6cf05cfb7 Qt: Fix log levels tooltip 2026-03-11 14:42:45 +01:00
Megamouse 6b6dd6c432 Qt: Rename Shortcuts to Keyboard Shortcuts 2026-03-11 14:42:45 +01:00
Megamouse ee01d1186f overlays: play SND0.AT3 during initialization 2026-03-11 06:45:22 +01:00
Megamouse 2934641237 overlays: support playing audio with video_view 2026-03-11 06:45:22 +01:00
Elad fecb53f86c Fix SaveStates cellDumxPamf regression 2026-03-10 20:13:29 +02:00
Elad 9811e1cc3b Debugger: Add HW PPU threads view 2026-03-10 20:13:29 +02:00
Elad 234f2b4648 Silence sys_memory_get_user_memory_size 2026-03-10 20:13:29 +02:00
Megamouse 9e573a9ff2 rpcn: set default version to 2 2026-03-10 17:41:48 +01:00
Megamouse 3803c864f7 rpcn: Fix file access error when loading rpcn.yml with version 1
The file was still in use when saving.
2026-03-10 17:41:48 +01:00
Megamouse 8afa40eaa7 rpcn: Fix segfault in rpcn_settings_dialog destructor
This will happen if m_rpcn failed to connect in the constructor.
2026-03-10 17:41:48 +01:00
kd-11 c7a576edce gl: Implement proper, sectioned DMA transfers
- Allows to transfer partial contents when needed
2026-03-10 16:25:32 +03:00
kd-11 c72d54bd6a gl: Add guards to catch invalid configuration in image transfer functions 2026-03-10 16:25:32 +03:00
kd-11 040a79ddd1 gl: Improve object annotation for renderdoc debugging 2026-03-10 16:25:32 +03:00
kd-11 aa094ca948 gl: Trace memory readback operations to debug tracking when renderdoc compat is enabled
- Renderdoc does not show these calls so we need to insert the debug message
2026-03-10 16:25:32 +03:00
kd-11 7917520633 gl: Support packing/unpacking images with padding 2026-03-10 16:25:32 +03:00
kd-11 8651875e59 gl: Add optional row length to GPU image routines 2026-03-10 16:25:32 +03:00
kd-11 ef70a6e825 gl: Move ownership of the global blitter object from texture cache to global 2026-03-10 16:25:32 +03:00
kd-11 0869ef421d gl: Silence compiler warning 2026-03-10 16:25:32 +03:00
kd-11 5f86315ae0 gl: Fix shader interpreter compilation 2026-03-10 16:25:32 +03:00
kd-11 ab72ce418e gl: Minor enhancements to blitter
- Move some functions to cpp. Makes it easier to debug failing image operations
- Add fbo validation before blit operations
2026-03-10 16:25:32 +03:00
kd-11 36cdaac327 overlays: Fix image size estimation 2026-03-10 16:25:32 +03:00
kd-11 6d52415d50 gl: Ignore range offset when doing readback operations
- OGL desperately needs a functioning DMA layer
2026-03-10 16:25:32 +03:00
Megamouse 0603d24a91 Qt: play SND0.AT3 in game lists when a movie would play 2026-03-10 12:42:56 +01:00
Megamouse 71f0d5c602 cellGem: fix RAW8 to RGBA_320x240
We were basically writing two rows into dst for each other src line.
This means we were writing 480 lines in total instead of 240,
overwriting one of the lines written in the previous iteration.
This led to writing one line out of bounds last iteration.
Let's just use a simple debayer technique which perfectly matches here.
This also applies the previously missing gain factors.

I also tried to first demosaic and then drop every other pixel.
The result was comparatively blurred and the performance worse.
2026-03-10 07:01:55 +01:00
Megamouse 763001ee91 cellGem: fix gain channels 2026-03-10 07:01:55 +01:00
Megamouse 0f92ea2578 cellGem: fix memcpy in cellGemReadExternalPortDeviceInfo
It was copying from dst to src, and the wrong size at that
2026-03-10 07:01:55 +01:00
Megamouse e0a0d736c4 cellGem: remove redundant check 2026-03-10 07:01:55 +01:00
Ani 65320446f0 vk: Add 0x13C0 NAVI2 device ID (Raphael Mendocino)
This is the iGPU on 9800X3D
2026-03-09 19:32:09 +02:00
kd-11 5f6822042d gl: Silence warnings 2026-03-09 15:18:47 +03:00
kd-11 302e87c920 rsx/vk: Improve robustness when encountering corrupted shaders 2026-03-09 15:18:47 +03:00
RipleyTom 77cbdd82ab LLVM 22 fixups
From https://releases.llvm.org/22.1.0/docs/ReleaseNotes.html:
The alignment argument of the @llvm.masked.load, @llvm.masked.store, @llvm.masked.gather and @llvm.masked.scatter intrinsics has been removed. Instead, the align attribute should be placed on the pointer (or vector of pointers) argument.

They also changed(not in changelog for some reason):
vpdpbusd_128: [v4i32] -> [v4i32, v4i32, v4i32]
to
vpdpbusd_128: [v4i32] -> [v4i32, v16i8, v16i8]
2026-03-09 06:30:29 +02:00
Megamouse 41db06b53f cellGem: fix handle_pos calculation
The handle position depends on the sphere position and the orientation
2026-03-08 16:12:44 +01:00
Megamouse eeda9c7738 cellGem: improve quaternion rotation
rotate_vector caused wrong results for default_orientation and 0,0,x
2026-03-08 16:12:44 +01:00
Megamouse c38bf70464 cellCamera: improve error logging 2026-03-08 16:12:44 +01:00
RipleyTom 43b295892f PPUAnalyzer: Fix SLDI shift operand 2026-03-08 09:29:48 +02:00
capriots 2573cc5fd0 cellDmuxPamf: fix stream cache not being consumed in some cases 2026-03-07 21:46:07 +02:00
capriots 4828d4d2d6 cellDmuxPamf: review fixes 2026-03-07 21:46:07 +02:00
capriots c5f278ed37 cellDmuxPamf: properly handle streams smaller than 0x800 bytes 2026-03-07 21:46:07 +02:00
capriots b839d4d1a6 cellDmuxPamf: consume guest memory on SPU thread group creation 2026-03-07 21:46:07 +02:00
capriots 3616424b26 cellDmuxPamf: fix lv2 mutex + cond not being destroyed on close 2026-03-07 21:46:07 +02:00
capriots 4d6da6542e tests: enable cellDmuxPamf tests in CMakeLists 2026-03-07 21:46:07 +02:00
capriots f2aa347608 cellDmuxPamf: review fixes + improvements 2026-03-07 21:46:07 +02:00
capriots bd7d5faa9f cellDmuxPamf implementation part 2: PPU thread 2026-03-07 21:46:07 +02:00
capriots a3d09a7427 tests: cellDmuxPamf 2026-03-07 21:46:07 +02:00
capriots 7dad9663b2 cellDmuxPamf implementation part 1: SPU thread 2026-03-07 21:46:07 +02:00
kd-11 cae8ae63e3 gl: Use image dimensions to determine read buffer size 2026-03-07 16:29:11 +03:00
kd-11 728d84b1fe gl: Add debug names to some objects 2026-03-07 16:29:11 +03:00
kd-11 4a51302c58 gl: Propagate native layout from parent when creating temporary subresources 2026-03-07 16:29:11 +03:00
kd-11 0ea692e9ab gl: Use named_object<GL_TEXTURE> as the base class for images 2026-03-07 16:29:11 +03:00
kd-11 1e16b338b4 gl: Add support for named objects 2026-03-07 16:29:11 +03:00
kd-11 14789b536f gl: Clean up the awful image copy API
- Wrap everything in rsx::io_buffer and gl::buffer to avoid out of bounds issues.
- Also abstracts away nasty things like OpenGL offset pointer casts.
2026-03-07 16:29:11 +03:00
RipleyTom ac30feeddb Revert enabling PPU jump elider 2026-03-06 21:10:40 +00:00
Megamouse 0d80e300a0 Qt: add log level settings 2026-03-06 15:06:25 +01:00
Megamouse 69384d7bb4 Update codebase to SDL 3.4.0 2026-03-06 13:56:04 +01:00
Megamouse 4fd2409b8b Update FAudio to 26.03 2026-03-06 13:56:04 +01:00
Megamouse d97851376d Add stacktrace in case of exception 2026-03-06 13:56:04 +01:00
Megamouse 1c5e30e83f input/qt: fix default squircle value in text and remove duplicate comments 2026-03-06 13:56:04 +01:00
kd-11 414df8432e gl: Respect internal offsets when performing DMA transfer operations 2026-03-06 12:18:18 +03:00
kd-11 92f63ccc0b rsx/cfg: Silence GCC noise 2026-03-06 12:18:18 +03:00
kd-11 d75e8b24f7 [FIXUP] API extend 2026-03-06 12:18:18 +03:00
kd-11 a1af15b907 gl/dma: Fix range calculation when creating DMA blocks 2026-03-06 12:18:18 +03:00
kd-11 cf5eb22591 glutils: Extend buffer_object interface 2026-03-06 12:18:18 +03:00
RipleyTom 2f9f79eea2 PPU Fixes
-CallFunction empty function/jump elision was never gone through as cond was always false
-MSelf duplicate offset detection never triggered because set was reset each loop
-Rel executable memory size calculation used wrong section type
2026-03-06 10:49:59 +02:00
Megamouse c57d6110c4 rsx: add missing default to switch 2026-03-05 21:05:15 +01:00
Megamouse 2a292d1e2e rsx: fix unused parameter warning 2026-03-05 21:05:15 +01:00
Megamouse f2c8b157ef ISO: pass mode to file 2026-03-05 21:05:15 +01:00
Megamouse ec00a06caf Fix warning suppression in windows clang 2026-03-05 21:05:15 +01:00
Megamouse ae6172d86b Remove unused function 2026-03-05 21:05:15 +01:00
Megamouse 5605cf2141 Qt: Do not check return code of rpcs3 download 2026-03-05 17:25:45 +01:00
RipleyTom d46ddcee5d Fix mac build 2026-03-04 21:08:07 +03:00
Megamouse 3750fb2c1f cellGem: Fix deadlock when cellGemUpdateStart is called before cellCamera delivers images 2026-03-04 11:31:32 +01:00
kd-11 86b2773c28 rsx: Clean up after vertex cache changes 2026-03-04 03:54:39 +03:00
kd-11 11a9011510 rsx: Fix memory misalignment for temporary storage
- We create the temp storage with alignment of U but then do a type cast to u128 later. This obviously causes problems.
2026-03-04 03:54:39 +03:00
Iván Díaz Álvarez e66f1fa306 Solves render problems due to vertex data being modified before reuse
* Stores first 64bit of the vertex data to compare on retrieval as a fingerprint of if the underlying vertex data has been changed
2026-03-04 01:31:01 +03:00
796 changed files with 41129 additions and 11804 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ cmake .. \
-DUSE_SYSTEM_CURL=ON \
-DUSE_SDL=ON \
-DUSE_SYSTEM_SDL=ON \
-DUSE_SYSTEM_FFMPEG=OFF \
-DUSE_SYSTEM_FFMPEG=ON \
-DUSE_SYSTEM_OPENCV=ON \
-DUSE_DISCORD_RPC=ON \
-DOpenGL_GL_PREFERENCE=LEGACY \
+1 -1
View File
@@ -46,7 +46,7 @@ cmake .. \
-DUSE_SYSTEM_CURL=ON \
-DUSE_SDL=ON \
-DUSE_SYSTEM_SDL=ON \
-DUSE_SYSTEM_FFMPEG=OFF \
-DUSE_SYSTEM_FFMPEG=ON \
-DUSE_SYSTEM_OPENCV=ON \
-DUSE_DISCORD_RPC=ON \
-DOpenGL_GL_PREFERENCE=LEGACY \
+10 -44
View File
@@ -15,28 +15,16 @@ export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew install -f --overwrite --quiet ccache "llvm@$LLVM_COMPILER_VER"
brew link -f --overwrite --quiet "llvm@$LLVM_COMPILER_VER"
if [ "$AARCH64" -eq 1 ]; then
brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk
brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf
else
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install -f --overwrite --quiet python@3.14 opencv@4 "llvm@$LLVM_COMPILER_VER" sdl3 vulkan-headers vulkan-loader molten-vk
arch -x86_64 /usr/local/bin/brew unlink --quiet ffmpeg qtbase qtsvg qtdeclarative
fi
brew install -f --overwrite --quiet googletest opencv@4 sdl3 vulkan-headers vulkan-loader molten-vk
brew unlink --quiet ffmpeg fmt qtbase qtsvg qtdeclarative protobuf || true
export CXX=clang++
export CC=clang
export BREW_PATH;
if [ "$AARCH64" -eq 1 ]; then
BREW_PATH="$(brew --prefix)"
export BREW_BIN="/opt/homebrew/bin"
export BREW_SBIN="/opt/homebrew/sbin"
else
BREW_PATH="$("/usr/local/bin/brew" --prefix)"
export BREW_BIN="/usr/local/bin"
export BREW_SBIN="/usr/local/sbin"
fi
BREW_PATH="$(brew --prefix)"
export BREW_BIN="$BREW_PATH/bin"
export BREW_SBIN="$BREW_PATH/sbin"
export WORKDIR;
WORKDIR="$(pwd)"
@@ -67,7 +55,7 @@ ditto "/tmp/Qt/$QT_VER" "qt-downloader/$QT_VER"
export Qt6_DIR="$WORKDIR/qt-downloader/$QT_VER/clang_64/lib/cmake/Qt$QT_VER_MAIN"
export SDL3_DIR="$BREW_PATH/opt/sdl3/lib/cmake/SDL3"
export PATH="/opt/homebrew/opt/llvm@$LLVM_COMPILER_VER/bin:$PATH"
export PATH="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/bin:$PATH"
export LDFLAGS="-L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++ -L$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/unwind -lunwind"
export VULKAN_SDK
@@ -81,12 +69,13 @@ LLVM_DIR="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER"
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/SDL/ && !/feralinteractive/ { print $3 }' .gitmodules)
mkdir build && cd build || exit 1
# The below should be uncommented once bugs with Qt 6 QListWidgets when using the OS 26 visual style are resolved.
# sudo xcode-select -switch /Applications/Xcode_26.3.app/Contents/Developer
if [ "$AARCH64" -eq 1 ]; then
cmake .. \
-DBUILD_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
-DRUN_RPCS3_TESTS="${RUN_UNIT_TESTS}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 \
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
-DMACOSX_BUNDLE_SHORT_VERSION_STRING="${COMM_TAG}" \
-DMACOSX_BUNDLE_BUNDLE_VERSION="${COMM_COUNT}" \
@@ -101,31 +90,8 @@ cmake .. \
-DUSE_SYSTEM_SDL=ON \
-DUSE_SYSTEM_OPENCV=ON \
-G Ninja
else
cmake .. \
-DBUILD_RPCS3_TESTS=OFF \
-DRUN_RPCS3_TESTS=OFF \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_SYSTEM_PROCESSOR=x86_64 \
-DCMAKE_TOOLCHAIN_FILE=buildfiles/cmake/TCDarwinX86_64.cmake \
-DCMAKE_OSX_DEPLOYMENT_TARGET=14.4 \
-DCMAKE_OSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)" \
-DMACOSX_BUNDLE_SHORT_VERSION_STRING="${COMM_TAG}" \
-DMACOSX_BUNDLE_BUNDLE_VERSION="${COMM_COUNT}"\
-DSTATIC_LINK_LLVM=ON \
-DUSE_SDL=ON \
-DUSE_DISCORD_RPC=ON \
-DUSE_AUDIOUNIT=ON \
-DUSE_SYSTEM_FFMPEG=OFF \
-DUSE_NATIVE_INSTRUCTIONS=OFF \
-DUSE_PRECOMPILED_HEADERS=OFF \
-DUSE_SYSTEM_MVK=ON \
-DUSE_SYSTEM_SDL=ON \
-DUSE_SYSTEM_OPENCV=ON \
-G Ninja
fi
ninja; build_status=$?;
ninja -j4; build_status=$?;
cd ..
+3
View File
@@ -19,6 +19,9 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then
APPIMAGE_EXTRACT_AND_RUN=1 linuxdeploy --appdir AppDir --plugin qt --plugin checkrt
# Restore App Icon
ln -sr ./AppDir/rpcs3.svg ./AppDir/.DirIcon
# Remove libwayland-client because it has platform-dependent exports and breaks other OSes
rm -f ./AppDir/usr/lib/libwayland-client.so*
+34 -21
View File
@@ -5,7 +5,7 @@ cd build || exit 1
cd bin
mkdir -p "rpcs3.app/Contents/Resources/vulkan/icd.d" || true
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.1/MoltenVK-macos-privateapi.tar
wget https://github.com/KhronosGroup/MoltenVK/releases/download/v1.4.2-rc1/MoltenVK-macos-privateapi.tar
tar -xvf MoltenVK-macos-privateapi.tar
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/libMoltenVK.dylib" "rpcs3.app/Contents/Frameworks/libMoltenVK.dylib"
cp "MoltenVK/MoltenVK/dynamic/dylib/macOS/MoltenVK_icd.json" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
@@ -21,27 +21,24 @@ rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
"rpcs3.app/Contents/Frameworks/QtVirtualKeyboard.framework" \
"rpcs3.app/Contents/Plugins/platforminputcontexts" \
"rpcs3.app/Contents/Plugins/virtualkeyboard" \
"rpcs3.app/Contents/Resources/git"
"rpcs3.app/Contents/Resources/git" || true
../../.ci/optimize-mac.sh rpcs3.app
# Download translations
mkdir -p "rpcs3.app/Contents/translations"
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
| grep "browser_download_url" \
| grep "RPCS3-languages.zip" \
| cut -d '"' -f 4)
if [ -z "$ZIP_URL" ]; then
echo "Failed to find RPCS3-languages.zip in the latest release. Continuing without translations."
else
echo "Downloading translations from: $ZIP_URL"
curl -L -o translations.zip "$ZIP_URL" || {
echo "Failed to download translations.zip. Continuing without translations."
exit 0
}
unzip -o translations.zip -d "rpcs3.app/Contents/translations" >/dev/null 2>&1 || \
ZIP_URL="https://github.com/RPCS3/rpcs3_translations/releases/latest/download/RPCS3-languages.zip"
echo "Downloading translations from: $ZIP_URL"
if curl -fsSL "$ZIP_URL" -o "translations.zip"; then
echo "Successfully downloaded translations."
if unzip -o translations.zip -d "rpcs3.app/Contents/translations" >/dev/null 2>&1; then
rm -f translations.zip
else
echo "Failed to extract translations.zip. Continuing without translations."
rm -f translations.zip
rm -f translations.zip
fi
else
echo "Warning: Failed to download translations. Skipping..."
fi
# Copy Qt translations manually
@@ -49,15 +46,31 @@ QT_TRANS="$WORKDIR/qt-downloader/$QT_VER/clang_64/translations"
cp $QT_TRANS/qt_*.qm rpcs3.app/Contents/translations
cp $QT_TRANS/qtbase_*.qm rpcs3.app/Contents/translations
cp $QT_TRANS/qtmultimedia_*.qm rpcs3.app/Contents/translations
rm -f rpcs3.app/Contents/translations/qt_help_*.qm
rm -f rpcs3.app/Contents/translations/qt_help_*.qm || true
# Need to do this rename hack due to case insensitive filesystem
mv rpcs3.app RPCS3_.app
mv RPCS3_.app RPCS3.app
# Hack
install_name_tool -delete_rpath /opt/homebrew/lib RPCS3.app/Contents/MacOS/rpcs3 || true
install_name_tool -delete_rpath /usr/local/lib RPCS3.app/Contents/MacOS/rpcs3 || true
# Hack to fix rpath issues
BIN="RPCS3.app/Contents/MacOS/rpcs3"
install_name_tool -delete_rpath /opt/homebrew/lib $BIN || true
install_name_tool -delete_rpath /usr/local/lib $BIN || true
# Fix dylib IDs
for lib in RPCS3.app/Contents/Frameworks/*.dylib; do
name=$(basename "$lib")
install_name_tool -id "@rpath/$name" "$lib"
done
# Rewrite any hardcoded Homebrew paths to use @rpath
find "RPCS3.app/Contents/" -type f \( -perm +111 -o -name "*.dylib" \) | while read -r bin; do
otool -L "$bin" | grep -E "/opt/homebrew|/usr/local" | awk '{print $1}' | while read -r dep; do
base=$(basename "$dep")
echo "Fixing $dep -> @rpath/$base in $bin"
install_name_tool -change "$dep" "@rpath/$base" "$bin"
done
done
# NOTE: "--deep" is deprecated
codesign --deep -fs - RPCS3.app
@@ -66,7 +79,7 @@ echo "[InternetShortcut]" > Quickstart.url
echo "URL=https://rpcs3.net/quickstart" >> Quickstart.url
echo "IconIndex=0" >> Quickstart.url
if [ "$AARCH64" -eq 1 ]; then
if [ "$(arch)" = "arm64" ]; then
ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${LVER}_macos_aarch64.7z"
else
ARCHIVE_FILEPATH="$BUILD_ARTIFACTSTAGINGDIRECTORY/rpcs3-v${LVER}_macos.7z"
+1
View File
@@ -24,6 +24,7 @@ mkdir ./bin/config
mkdir ./bin/config/input_configs
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -f ISO-8859-1 -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
curl -fsSL 'https://api.rpcs3.net/config/?api=v1' | iconv -f ISO-8859-1 -t UTF-8 1> ./bin/GuiConfigs/config_database.dat
# Download translations
mkdir -p ./bin/share/qt6/translations
+1
View File
@@ -14,6 +14,7 @@ mkdir ./bin/config
mkdir ./bin/config/input_configs
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
curl -fsSL 'https://api.rpcs3.net/config/?api=v1' | iconv -t UTF-8 1> ./bin/GuiConfigs/config_database.dat
# Download translations
mkdir -p ./bin/qt6/translations
+3 -3
View File
@@ -6,7 +6,7 @@
QT_HOST="http://qt.mirror.constant.com/"
QT_URL_VER=$(echo "$QT_VER" | sed "s/\.//g")
QT_VER_MSVC_UP=$(echo "${QT_VER_MSVC}" | tr '[:lower:]' '[:upper:]')
QT_PREFIX="online/qtsdkrepository/windows_x86/desktop/qt${QT_VER_MAIN}_${QT_URL_VER}/qt${QT_VER_MAIN}_${QT_URL_VER}/qt.qt${QT_VER_MAIN}.${QT_URL_VER}."
QT_PREFIX="online/qtsdkrepository/windows_x86/desktop/qt${QT_VER_MAIN}_${QT_URL_VER}/qt${QT_VER_MAIN}_${QT_URL_VER}_${QT_VER_MSVC}_64/qt.qt${QT_VER_MAIN}.${QT_URL_VER}."
QT_PREFIX_2="win64_${QT_VER_MSVC}_64/${QT_VER}-0-${QT_DATE}"
QT_SUFFIX="-Windows-Windows_11_24H2-${QT_VER_MSVC_UP}-Windows-Windows_11_24H2-X86_64.7z"
QT_BASE_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtbase${QT_SUFFIX}"
@@ -16,7 +16,7 @@ QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia$
QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
QT_TRANSLATIONS_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttranslations${QT_SUFFIX}"
LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z"
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-${VULKAN_VER}-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/olpvqk4346ig7i8btadk5/vulkansdk-windows-X64-${VULKAN_VER}.exe?rlkey=huvssch6sy904qkg8ti9p65br&st=pztptdin&dl=1"
CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.12.3/ccache-4.12.3-windows-x86_64.zip"
DEP_URLS=" \
@@ -88,7 +88,7 @@ for url in $DEP_URLS; do
*qt*) checksum=$(curl -fL "${url}.sha1"); algo="sha1"; outDir="$QTDIR/" ;;
*llvm*) checksum=$(curl -fL "${url}.sha256"); algo="sha256"; outDir="./build/lib_ext/Release-x64" ;;
*ccache*) checksum=$CCACHE_SHA; algo="sha256"; outDir="$CCACHE_BIN_DIR" ;;
*Vulkan*)
*vulkansdk*)
# Vulkan setup needs to be run in batch environment
# Need to subshell this or else it doesn't wait
download_and_verify "$url" "$VULKAN_SDK_SHA" "sha256" "$fileName"
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
Windows_Build:
if: github.event_name == 'workflow_dispatch'
name: LLVM Windows (MSVC)
runs-on: windows-2025
runs-on: windows-2025-vs2026
env:
COMPILER: msvc
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
+15 -16
View File
@@ -30,23 +30,23 @@ jobs:
matrix:
include:
- os: ubuntu-24.04
docker_img: "rpcs3/rpcs3-ci-jammy:1.9"
docker_img: "rpcs3/rpcs3-ci-jammy:1.14"
build_sh: "/rpcs3/.ci/build-linux.sh"
compiler: clang
UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux"
- os: ubuntu-24.04
docker_img: "rpcs3/rpcs3-ci-jammy:1.9"
docker_img: "rpcs3/rpcs3-ci-jammy:1.14"
build_sh: "/rpcs3/.ci/build-linux.sh"
compiler: gcc
- os: ubuntu-24.04-arm
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.9"
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.14"
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
compiler: clang
UPLOAD_COMMIT_HASH: a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1
UPLOAD_REPO_FULL_NAME: "rpcs3/rpcs3-binaries-linux-arm64"
- os: ubuntu-24.04-arm
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.9"
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.14"
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
compiler: gcc
name: RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }}
@@ -123,25 +123,24 @@ jobs:
matrix:
include:
- name: Intel
AARCH64: 0
runs-on: macos-15-intel
UPLOAD_COMMIT_HASH: 51ae32f468089a8169aaf1567de355ff4a3e0842
UPLOAD_REPO_FULL_NAME: rpcs3/rpcs3-binaries-mac
- name: Apple Silicon
AARCH64: 1
runs-on: macos-15
UPLOAD_COMMIT_HASH: 8e21bdbc40711a3fccd18fbf17b742348b0f4281
UPLOAD_REPO_FULL_NAME: rpcs3/rpcs3-binaries-mac-arm64
name: RPCS3 Mac ${{ matrix.name }}
runs-on: macos-14
runs-on: ${{ matrix.runs-on }}
env:
CCACHE_DIR: /tmp/ccache_dir
QT_VER: '6.10.2'
QT_VER: '6.11.1'
QT_VER_MAIN: '6'
LLVM_COMPILER_VER: '21'
RELEASE_MESSAGE: ../GitHubReleaseMessage.txt
UPLOAD_COMMIT_HASH: ${{ matrix.UPLOAD_COMMIT_HASH }}
UPLOAD_REPO_FULL_NAME: ${{ matrix.UPLOAD_REPO_FULL_NAME }}
AARCH64: ${{ matrix.AARCH64 }}
RUN_UNIT_TESTS: github.event_name == 'pull_request' && 'ON' || 'OFF'
RUN_UNIT_TESTS: ${{ matrix.name == 'Apple Silicon' && (github.event_name == 'pull_request' && 'ON') || 'OFF' }}
steps:
- name: Checkout repository
uses: actions/checkout@main
@@ -209,16 +208,16 @@ jobs:
# Only run push event on master branch of main repo, but run all PRs
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
name: RPCS3 Windows
runs-on: windows-2025
runs-on: windows-2025-vs2026
env:
COMPILER: msvc
QT_VER_MAIN: '6'
QT_VER: '6.10.2'
QT_VER: '6.11.1'
QT_VER_MSVC: 'msvc2022'
QT_DATE: '202601261212'
QT_DATE: '202605090529'
LLVM_VER: '19.1.7'
VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
VULKAN_VER: '1.4.341.1'
VULKAN_SDK_SHA: 'bcf2d75aa9556889ab974858666e20b3655b6055a0db704ccb47279ff33b5bfe'
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
CCACHE_BIN_DIR: 'C:\ccache_bin'
CCACHE_DIR: 'C:\ccache'
@@ -235,7 +234,7 @@ jobs:
fetch-depth: 0
- name: Setup NuGet
uses: nuget/setup-nuget@v2
uses: nuget/setup-nuget@v4
- name: Restore NuGet packages
run: nuget restore rpcs3.sln
+3
View File
@@ -69,6 +69,9 @@ CMakeSettings.json
*PVS-Studio*
PVS/*
# Zed Editor files
.zed/*
# Ignore other system generated files
x64/*
rpcs3/x64/*
+15 -18
View File
@@ -7,27 +7,24 @@ if(USE_SYSTEM_CURL)
target_link_libraries(3rdparty_libcurl INTERFACE CURL::libcurl)
else()
message(STATUS "RPCS3: building libcurl + wolfssl submodules")
set(BUILD_CURL_EXE OFF CACHE BOOL "Set to ON to build curl executable.")
set(BUILD_STATIC_CURL OFF CACHE BOOL "Set to ON to build curl executable with static libcurl.")
set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libcurl.")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Set to ON to build shared libcurl.")
set(BUILD_CURL_EXE OFF CACHE INTERNAL "")
set(BUILD_STATIC_CURL OFF CACHE INTERNAL "")
set(BUILD_STATIC_LIBS ON CACHE INTERNAL "")
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
find_package(WolfSSL REQUIRED)
set(CURL_USE_WOLFSSL ON CACHE BOOL "enable wolfSSL for SSL/TLS")
set(CURL_USE_OPENSSL OFF CACHE BOOL "Use OpenSSL code. Experimental")
set(HTTP_ONLY ON CACHE BOOL "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)")
set(USE_LIBIDN2 OFF CACHE BOOL "Use libidn2 for IDN support") # Disabled because MacOS CI doesn't work otherwise
set(CURL_CA_PATH "none" CACHE STRING "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
option(CURL_DISABLE_INSTALL "Disable installation targets" ON)
if(USE_MSVC_STATIC_CRT)
set(CURL_STATIC_CRT ON CACHE BOOL "Use static crt to build curl")
endif()
set(CURL_USE_WOLFSSL ON CACHE INTERNAL "")
set(CURL_USE_OPENSSL OFF CACHE INTERNAL "")
set(HTTP_ONLY ON CACHE INTERNAL "")
set(USE_LIBIDN2 OFF CACHE INTERNAL "") # Disabled because MacOS CI doesn't work otherwise
set(CURL_CA_PATH "none" CACHE INTERNAL "")
set(CURL_DISABLE_INSTALL ON CACHE INTERNAL "")
if(WIN32)
set(ENABLE_UNICODE ON CACHE BOOL "enable Unicode")
set(ENABLE_UNICODE ON CACHE INTERNAL "")
endif()
set(CURL_USE_LIBSSH2 OFF CACHE BOOL "Use libSSH2")
set(CURL_USE_LIBPSL OFF CACHE BOOL "Use libPSL")
option(BUILD_TESTING "Build tests" OFF)
option(BUILD_EXAMPLES "Build libcurl examples" OFF)
set(CURL_USE_LIBSSH2 OFF CACHE INTERNAL "")
set(CURL_USE_LIBPSL OFF CACHE INTERNAL "")
set(BUILD_TESTING OFF CACHE INTERNAL "")
set(BUILD_EXAMPLES OFF CACHE INTERNAL "")
add_subdirectory(curl EXCLUDE_FROM_ALL)
+51 -23
View File
@@ -66,25 +66,33 @@
<ClCompile Include="curl\lib\asyn-thrdd.c" />
<ClCompile Include="curl\lib\bufq.c" />
<ClCompile Include="curl\lib\bufref.c" />
<ClCompile Include="curl\lib\cf-dns.c" />
<ClCompile Include="curl\lib\cf-h1-proxy.c" />
<ClCompile Include="curl\lib\cf-h2-proxy.c" />
<ClCompile Include="curl\lib\cf-haproxy.c" />
<ClCompile Include="curl\lib\cf-https-connect.c" />
<ClCompile Include="curl\lib\cf-ip-happy.c" />
<ClCompile Include="curl\lib\cf-recvbuf.c" />
<ClCompile Include="curl\lib\cf-setup.c" />
<ClCompile Include="curl\lib\cf-socket.c" />
<ClCompile Include="curl\lib\cfilters.c" />
<ClCompile Include="curl\lib\conncache.c" />
<ClCompile Include="curl\lib\connect.c" />
<ClCompile Include="curl\lib\content_encoding.c" />
<ClCompile Include="curl\lib\cookie.c" />
<ClCompile Include="curl\lib\creds.c" />
<ClCompile Include="curl\lib\cshutdn.c" />
<ClCompile Include="curl\lib\curlx\base64.c" />
<ClCompile Include="curl\lib\curlx\basename.c" />
<ClCompile Include="curl\lib\curlx\dynbuf.c" />
<ClCompile Include="curl\lib\curlx\fopen.c" />
<ClCompile Include="curl\lib\curlx\inet_ntop.c" />
<ClCompile Include="curl\lib\curlx\inet_pton.c" />
<ClCompile Include="curl\lib\curlx\multibyte.c" />
<ClCompile Include="curl\lib\curlx\nonblock.c" />
<ClCompile Include="curl\lib\curlx\snprintf.c" />
<ClCompile Include="curl\lib\curlx\strcopy.c" />
<ClCompile Include="curl\lib\curlx\strdup.c" />
<ClCompile Include="curl\lib\curlx\strerr.c" />
<ClCompile Include="curl\lib\curlx\strparse.c" />
<ClCompile Include="curl\lib\curlx\timediff.c" />
@@ -103,9 +111,9 @@
<ClCompile Include="curl\lib\curl_memrchr.c" />
<ClCompile Include="curl\lib\curl_ntlm_core.c" />
<ClCompile Include="curl\lib\curl_range.c" />
<ClCompile Include="curl\lib\curl_rtmp.c" />
<ClCompile Include="curl\lib\curl_sasl.c" />
<ClCompile Include="curl\lib\curl_sha512_256.c" />
<ClCompile Include="curl\lib\curl_share.c" />
<ClCompile Include="curl\lib\curl_sspi.c" />
<ClCompile Include="curl\lib\curl_threads.c" />
<ClCompile Include="curl\lib\curl_trc.c" />
@@ -113,6 +121,7 @@
<ClCompile Include="curl\lib\cw-pause.c" />
<ClCompile Include="curl\lib\dict.c" />
<ClCompile Include="curl\lib\dllmain.c" />
<ClCompile Include="curl\lib\dnscache.c" />
<ClCompile Include="curl\lib\doh.c" />
<ClCompile Include="curl\lib\dynhds.c" />
<ClCompile Include="curl\lib\easy.c" />
@@ -161,22 +170,23 @@
<ClCompile Include="curl\lib\multi_ev.c" />
<ClCompile Include="curl\lib\multi_ntfy.c" />
<ClCompile Include="curl\lib\netrc.c" />
<ClCompile Include="curl\lib\noproxy.c" />
<ClCompile Include="curl\lib\openldap.c" />
<ClCompile Include="curl\lib\parsedate.c" />
<ClCompile Include="curl\lib\peer.c" />
<ClCompile Include="curl\lib\pingpong.c" />
<ClCompile Include="curl\lib\pop3.c" />
<ClCompile Include="curl\lib\progress.c" />
<ClCompile Include="curl\lib\protocol.c" />
<ClCompile Include="curl\lib\proxy.c" />
<ClCompile Include="curl\lib\psl.c" />
<ClCompile Include="curl\lib\rand.c" />
<ClCompile Include="curl\lib\rename.c" />
<ClCompile Include="curl\lib\ratelimit.c" />
<ClCompile Include="curl\lib\request.c" />
<ClCompile Include="curl\lib\rtsp.c" />
<ClCompile Include="curl\lib\select.c" />
<ClCompile Include="curl\lib\sendf.c" />
<ClCompile Include="curl\lib\setopt.c" />
<ClCompile Include="curl\lib\sha256.c" />
<ClCompile Include="curl\lib\share.c" />
<ClCompile Include="curl\lib\slist.c" />
<ClCompile Include="curl\lib\smb.c" />
<ClCompile Include="curl\lib\smtp.c" />
@@ -184,15 +194,15 @@
<ClCompile Include="curl\lib\socks.c" />
<ClCompile Include="curl\lib\socks_gssapi.c" />
<ClCompile Include="curl\lib\socks_sspi.c" />
<ClCompile Include="curl\lib\speedcheck.c" />
<ClCompile Include="curl\lib\splay.c" />
<ClCompile Include="curl\lib\strcase.c" />
<ClCompile Include="curl\lib\strdup.c" />
<ClCompile Include="curl\lib\strequal.c" />
<ClCompile Include="curl\lib\strerror.c" />
<ClCompile Include="curl\lib\system_win32.c" />
<ClCompile Include="curl\lib\telnet.c" />
<ClCompile Include="curl\lib\tftp.c" />
<ClCompile Include="curl\lib\thrdpool.c" />
<ClCompile Include="curl\lib\thrdqueue.c" />
<ClCompile Include="curl\lib\transfer.c" />
<ClCompile Include="curl\lib\uint-bset.c" />
<ClCompile Include="curl\lib\uint-hash.c" />
@@ -202,12 +212,19 @@
<ClCompile Include="curl\lib\urlapi.c" />
<ClCompile Include="curl\lib\vauth\gsasl.c" />
<ClCompile Include="curl\lib\version.c" />
<ClCompile Include="curl\lib\vquic\curl_ngtcp2.c" />
<ClCompile Include="curl\lib\vquic\curl_quiche.c" />
<ClCompile Include="curl\lib\vquic\capsule.c" />
<ClCompile Include="curl\lib\vquic\cf-capsule.c" />
<ClCompile Include="curl\lib\vquic\cf-ngtcp2-cmn.c" />
<ClCompile Include="curl\lib\vquic\cf-ngtcp2-proxy.c" />
<ClCompile Include="curl\lib\vquic\cf-ngtcp2.c" />
<ClCompile Include="curl\lib\vquic\cf-quiche.c" />
<ClCompile Include="curl\lib\vquic\vquic-tls.c" />
<ClCompile Include="curl\lib\vssh\vssh.c" />
<ClCompile Include="curl\lib\vtls\apple.c" />
<ClCompile Include="curl\lib\vtls\cipher_suite.c" />
<ClCompile Include="curl\lib\vtls\hostcheck.c" />
<ClCompile Include="curl\lib\vtls\rustls.c" />
<ClCompile Include="curl\lib\vtls\vtls_config.c" />
<ClCompile Include="curl\lib\vtls\vtls_scache.c" />
<ClCompile Include="curl\lib\vtls\vtls_spack.c" />
<ClCompile Include="curl\lib\vtls\x509asn1.c" />
@@ -224,13 +241,11 @@
<ClCompile Include="curl\lib\vauth\spnego_sspi.c" />
<ClCompile Include="curl\lib\vauth\vauth.c" />
<ClCompile Include="curl\lib\vquic\vquic.c" />
<ClCompile Include="curl\lib\vssh\curl_path.c" />
<ClCompile Include="curl\lib\vssh\libssh.c" />
<ClCompile Include="curl\lib\vssh\libssh2.c" />
<ClCompile Include="curl\lib\vtls\gtls.c" />
<ClCompile Include="curl\lib\vtls\keylog.c" />
<ClCompile Include="curl\lib\vtls\mbedtls.c" />
<ClCompile Include="curl\lib\vtls\mbedtls_threadlock.c" />
<ClCompile Include="curl\lib\vtls\openssl.c" />
<ClCompile Include="curl\lib\vtls\schannel.c" />
<ClCompile Include="curl\lib\vtls\schannel_verify.c" />
@@ -254,11 +269,14 @@
<ClInclude Include="curl\lib\asyn.h" />
<ClInclude Include="curl\lib\bufq.h" />
<ClInclude Include="curl\lib\bufref.h" />
<ClInclude Include="curl\lib\cf-dns.h" />
<ClInclude Include="curl\lib\cf-h1-proxy.h" />
<ClInclude Include="curl\lib\cf-h2-proxy.h" />
<ClInclude Include="curl\lib\cf-haproxy.h" />
<ClInclude Include="curl\lib\cf-https-connect.h" />
<ClInclude Include="curl\lib\cf-ip-happy.h" />
<ClInclude Include="curl\lib\cf-recvbuf.h" />
<ClInclude Include="curl\lib\cf-setup.h" />
<ClInclude Include="curl\lib\cf-socket.h" />
<ClInclude Include="curl\lib\cfilters.h" />
<ClInclude Include="curl\lib\config-mac.h" />
@@ -270,16 +288,20 @@
<ClInclude Include="curl\lib\connect.h" />
<ClInclude Include="curl\lib\content_encoding.h" />
<ClInclude Include="curl\lib\cookie.h" />
<ClInclude Include="curl\lib\creds.h" />
<ClInclude Include="curl\lib\cshutdn.h" />
<ClInclude Include="curl\lib\curlx\base64.h" />
<ClInclude Include="curl\lib\curlx\basename.h" />
<ClInclude Include="curl\lib\curlx\binmode.h" />
<ClInclude Include="curl\lib\curlx\curlx.h" />
<ClInclude Include="curl\lib\curlx\dynbuf.h" />
<ClInclude Include="curl\lib\curlx\fopen.h" />
<ClInclude Include="curl\lib\curlx\inet_ntop.h" />
<ClInclude Include="curl\lib\curlx\inet_pton.h" />
<ClInclude Include="curl\lib\curlx\multibyte.h" />
<ClInclude Include="curl\lib\curlx\nonblock.h" />
<ClInclude Include="curl\lib\curlx\snprintf.h" />
<ClInclude Include="curl\lib\curlx\strcopy.h" />
<ClInclude Include="curl\lib\curlx\strdup.h" />
<ClInclude Include="curl\lib\curlx\strerr.h" />
<ClInclude Include="curl\lib\curlx\strparse.h" />
<ClInclude Include="curl\lib\curlx\timediff.h" />
@@ -300,24 +322,23 @@
<ClInclude Include="curl\lib\curl_ldap.h" />
<ClInclude Include="curl\lib\curl_md4.h" />
<ClInclude Include="curl\lib\curl_md5.h" />
<ClInclude Include="curl\lib\curl_memory.h" />
<ClInclude Include="curl\lib\curl_memrchr.h" />
<ClInclude Include="curl\lib\curl_mem_undef.h" />
<ClInclude Include="curl\lib\curl_ntlm_core.h" />
<ClInclude Include="curl\lib\curl_printf.h" />
<ClInclude Include="curl\lib\curl_range.h" />
<ClInclude Include="curl\lib\curl_rtmp.h" />
<ClInclude Include="curl\lib\curl_sasl.h" />
<ClInclude Include="curl\lib\curl_setup.h" />
<ClInclude Include="curl\lib\curl_setup_once.h" />
<ClInclude Include="curl\lib\curl_sha256.h" />
<ClInclude Include="curl\lib\curl_sha512_256.h" />
<ClInclude Include="curl\lib\curl_share.h" />
<ClInclude Include="curl\lib\curl_sspi.h" />
<ClInclude Include="curl\lib\curl_threads.h" />
<ClInclude Include="curl\lib\curl_trc.h" />
<ClInclude Include="curl\lib\cw-out.h" />
<ClInclude Include="curl\lib\cw-pause.h" />
<ClInclude Include="curl\lib\dict.h" />
<ClInclude Include="curl\lib\dnscache.h" />
<ClInclude Include="curl\lib\doh.h" />
<ClInclude Include="curl\lib\dynhds.h" />
<ClInclude Include="curl\lib\easyif.h" />
@@ -328,6 +349,7 @@
<ClInclude Include="curl\lib\file.h" />
<ClInclude Include="curl\lib\fileinfo.h" />
<ClInclude Include="curl\lib\formdata.h" />
<ClInclude Include="curl\lib\ftp-int.h" />
<ClInclude Include="curl\lib\ftp.h" />
<ClInclude Include="curl\lib\ftplistparser.h" />
<ClInclude Include="curl\lib\functypes.h" />
@@ -352,7 +374,6 @@
<ClInclude Include="curl\lib\imap.h" />
<ClInclude Include="curl\lib\llist.h" />
<ClInclude Include="curl\lib\macos.h" />
<ClInclude Include="curl\lib\memdebug.h" />
<ClInclude Include="curl\lib\mime.h" />
<ClInclude Include="curl\lib\mqtt.h" />
<ClInclude Include="curl\lib\multihandle.h" />
@@ -360,14 +381,16 @@
<ClInclude Include="curl\lib\multi_ev.h" />
<ClInclude Include="curl\lib\multi_ntfy.h" />
<ClInclude Include="curl\lib\netrc.h" />
<ClInclude Include="curl\lib\noproxy.h" />
<ClInclude Include="curl\lib\parsedate.h" />
<ClInclude Include="curl\lib\peer.h" />
<ClInclude Include="curl\lib\pingpong.h" />
<ClInclude Include="curl\lib\pop3.h" />
<ClInclude Include="curl\lib\progress.h" />
<ClInclude Include="curl\lib\protocol.h" />
<ClInclude Include="curl\lib\proxy.h" />
<ClInclude Include="curl\lib\psl.h" />
<ClInclude Include="curl\lib\rand.h" />
<ClInclude Include="curl\lib\rename.h" />
<ClInclude Include="curl\lib\ratelimit.h" />
<ClInclude Include="curl\lib\request.h" />
<ClInclude Include="curl\lib\rtsp.h" />
<ClInclude Include="curl\lib\select.h" />
@@ -376,7 +399,6 @@
<ClInclude Include="curl\lib\setup-os400.h" />
<ClInclude Include="curl\lib\setup-vms.h" />
<ClInclude Include="curl\lib\setup-win32.h" />
<ClInclude Include="curl\lib\share.h" />
<ClInclude Include="curl\lib\sigpipe.h" />
<ClInclude Include="curl\lib\slist.h" />
<ClInclude Include="curl\lib\smb.h" />
@@ -384,7 +406,6 @@
<ClInclude Include="curl\lib\sockaddr.h" />
<ClInclude Include="curl\lib\socketpair.h" />
<ClInclude Include="curl\lib\socks.h" />
<ClInclude Include="curl\lib\speedcheck.h" />
<ClInclude Include="curl\lib\splay.h" />
<ClInclude Include="curl\lib\strcase.h" />
<ClInclude Include="curl\lib\strdup.h" />
@@ -394,6 +415,8 @@
<ClInclude Include="curl\lib\system_win32.h" />
<ClInclude Include="curl\lib\telnet.h" />
<ClInclude Include="curl\lib\tftp.h" />
<ClInclude Include="curl\lib\thrdpool.h" />
<ClInclude Include="curl\lib\thrdqueue.h" />
<ClInclude Include="curl\lib\transfer.h" />
<ClInclude Include="curl\lib\uint-bset.h" />
<ClInclude Include="curl\lib\uint-hash.h" />
@@ -402,14 +425,21 @@
<ClInclude Include="curl\lib\url.h" />
<ClInclude Include="curl\lib\urlapi-int.h" />
<ClInclude Include="curl\lib\urldata.h" />
<ClInclude Include="curl\lib\vquic\curl_ngtcp2.h" />
<ClInclude Include="curl\lib\vquic\curl_quiche.h" />
<ClInclude Include="curl\lib\vquic\capsule.h" />
<ClInclude Include="curl\lib\vquic\cf-capsule.h" />
<ClInclude Include="curl\lib\vquic\cf-ngtcp2-cmn.h" />
<ClInclude Include="curl\lib\vquic\cf-ngtcp2-proxy.h" />
<ClInclude Include="curl\lib\vquic\cf-ngtcp2.h" />
<ClInclude Include="curl\lib\vquic\cf-quiche.h" />
<ClInclude Include="curl\lib\vquic\vquic-tls.h" />
<ClInclude Include="curl\lib\vquic\vquic_int.h" />
<ClInclude Include="curl\lib\vssh\vssh.h" />
<ClInclude Include="curl\lib\vtls\apple.h" />
<ClInclude Include="curl\lib\vtls\cipher_suite.h" />
<ClInclude Include="curl\lib\vtls\hostcheck.h" />
<ClInclude Include="curl\lib\vtls\rustls.h" />
<ClInclude Include="curl\lib\vtls\schannel_int.h" />
<ClInclude Include="curl\lib\vtls\vtls_config.h" />
<ClInclude Include="curl\lib\vtls\vtls_int.h" />
<ClInclude Include="curl\lib\vtls\vtls_scache.h" />
<ClInclude Include="curl\lib\vtls\vtls_spack.h" />
@@ -418,12 +448,10 @@
<ClInclude Include="curl\lib\vauth\ntlm.h" />
<ClInclude Include="curl\lib\vauth\vauth.h" />
<ClInclude Include="curl\lib\vquic\vquic.h" />
<ClInclude Include="curl\lib\vssh\curl_path.h" />
<ClInclude Include="curl\lib\vssh\ssh.h" />
<ClInclude Include="curl\lib\vtls\gtls.h" />
<ClInclude Include="curl\lib\vtls\keylog.h" />
<ClInclude Include="curl\lib\vtls\mbedtls.h" />
<ClInclude Include="curl\lib\vtls\mbedtls_threadlock.h" />
<ClInclude Include="curl\lib\vtls\openssl.h" />
<ClInclude Include="curl\lib\vtls\schannel.h" />
<ClInclude Include="curl\lib\vtls\vtls.h" />
+153 -69
View File
@@ -66,9 +66,6 @@
<ClCompile Include="curl\lib\curl_range.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\curl_rtmp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\curl_sasl.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -204,9 +201,6 @@
<ClCompile Include="curl\lib\rand.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\rename.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\rtsp.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -222,9 +216,6 @@
<ClCompile Include="curl\lib\sha256.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\share.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\slist.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -246,18 +237,12 @@
<ClCompile Include="curl\lib\socks_sspi.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\speedcheck.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\splay.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\strcase.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\strdup.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\strerror.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -318,9 +303,6 @@
<ClCompile Include="curl\lib\vauth\vauth.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vssh\curl_path.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vssh\libssh.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -333,9 +315,6 @@
<ClCompile Include="curl\lib\vtls\mbedtls.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vtls\mbedtls_threadlock.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vtls\openssl.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -387,9 +366,6 @@
<ClCompile Include="curl\lib\headers.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\noproxy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\ws.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -405,12 +381,6 @@
<ClCompile Include="curl\lib\cf-socket.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\curl_ngtcp2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\curl_quiche.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\http1.c">
<Filter>Source Files</Filter>
</ClCompile>
@@ -549,6 +519,81 @@
<ClCompile Include="curl\lib\curlx\strerr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\curlx\strcopy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vssh\vssh.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\curl_share.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\ratelimit.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\curlx\basename.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\curlx\snprintf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\curlx\strdup.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\cf-dns.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\dnscache.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\protocol.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\thrdpool.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\thrdqueue.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vtls\vtls_config.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\capsule.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-capsule.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-ngtcp2.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-ngtcp2-cmn.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-ngtcp2-proxy.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\cf-quiche.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\vquic\vquic-tls.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\cf-recvbuf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\cf-setup.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\creds.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\peer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="curl\lib\proxy.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="curl\include\curl\curl.h">
@@ -653,9 +698,6 @@
<ClInclude Include="curl\lib\curl_md5.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curl_memory.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curl_memrchr.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -668,9 +710,6 @@
<ClInclude Include="curl\lib\curl_range.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curl_rtmp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curl_sasl.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -758,9 +797,6 @@
<ClInclude Include="curl\lib\llist.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\memdebug.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\mime.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -791,9 +827,6 @@
<ClInclude Include="curl\lib\rand.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\rename.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\rtsp.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -812,9 +845,6 @@
<ClInclude Include="curl\lib\setup-vms.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\share.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\sigpipe.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -836,9 +866,6 @@
<ClInclude Include="curl\lib\socks.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\speedcheck.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\splay.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -887,9 +914,6 @@
<ClInclude Include="curl\lib\vauth\vauth.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vssh\curl_path.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vssh\ssh.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -899,9 +923,6 @@
<ClInclude Include="curl\lib\vtls\mbedtls.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vtls\mbedtls_threadlock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vtls\openssl.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -953,9 +974,6 @@
<ClInclude Include="curl\lib\functypes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\noproxy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\ws.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -971,12 +989,6 @@
<ClInclude Include="curl\lib\cf-socket.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\curl_ngtcp2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\curl_quiche.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\vquic_int.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1058,9 +1070,6 @@
<ClInclude Include="curl\lib\curlx\base64.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curlx\curlx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curlx\dynbuf.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1103,9 +1112,6 @@
<ClInclude Include="curl\lib\cf-ip-happy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curl_mem_undef.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curl_fopen.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1121,6 +1127,84 @@
<ClInclude Include="curl\lib\curlx\strerr.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curlx\snprintf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curlx\strcopy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vssh\vssh.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curl_share.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\ratelimit.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curlx\basename.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\curlx\strdup.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\cf-dns.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\dnscache.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\ftp-int.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\protocol.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\thrdpool.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\thrdqueue.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vtls\vtls_config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\capsule.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-capsule.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-ngtcp2.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-ngtcp2-cmn.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-ngtcp2-proxy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\cf-quiche.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\vquic\vquic-tls.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\cf-recvbuf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\cf-setup.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\creds.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\peer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="curl\lib\proxy.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="curl\lib\libcurl.rc">
+4 -4
View File
@@ -13,17 +13,17 @@
<ItemGroup>
<ClInclude Include="fusion\Fusion\Fusion.h" />
<ClInclude Include="fusion\Fusion\FusionAhrs.h" />
<ClInclude Include="fusion\Fusion\FusionAxes.h" />
<ClInclude Include="fusion\Fusion\FusionCalibration.h" />
<ClInclude Include="fusion\Fusion\FusionBias.h" />
<ClInclude Include="fusion\Fusion\FusionCompass.h" />
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
<ClInclude Include="fusion\Fusion\FusionMath.h" />
<ClInclude Include="fusion\Fusion\FusionOffset.h" />
<ClInclude Include="fusion\Fusion\FusionModel.h" />
<ClInclude Include="fusion\Fusion\FusionRemap.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="fusion\Fusion\FusionAhrs.c" />
<ClCompile Include="fusion\Fusion\FusionBias.c" />
<ClCompile Include="fusion\Fusion\FusionCompass.c" />
<ClCompile Include="fusion\Fusion\FusionOffset.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<RootNamespace>Fusion</RootNamespace>
+4 -4
View File
@@ -8,12 +8,12 @@
<ItemGroup>
<ClInclude Include="fusion\Fusion\Fusion.h" />
<ClInclude Include="fusion\Fusion\FusionAhrs.h" />
<ClInclude Include="fusion\Fusion\FusionAxes.h" />
<ClInclude Include="fusion\Fusion\FusionCalibration.h" />
<ClInclude Include="fusion\Fusion\FusionCompass.h" />
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
<ClInclude Include="fusion\Fusion\FusionMath.h" />
<ClInclude Include="fusion\Fusion\FusionOffset.h" />
<ClInclude Include="fusion\Fusion\FusionBias.h" />
<ClInclude Include="fusion\Fusion\FusionModel.h" />
<ClInclude Include="fusion\Fusion\FusionRemap.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="fusion\Fusion\FusionAhrs.c">
@@ -22,7 +22,7 @@
<ClCompile Include="fusion\Fusion\FusionCompass.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="fusion\Fusion\FusionOffset.c">
<ClCompile Include="fusion\Fusion\FusionBias.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
+5
View File
@@ -54,6 +54,9 @@
<ClCompile Condition="'$(Configuration)'=='Release'">
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Condition="'$(EnableLibUsbWindowsHotplug)' == 'true'">
<PreprocessorDefinitions>LIBUSB_WINDOWS_HOTPLUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)libusb-1.0.lib</OutputFile>
</Lib>
@@ -64,6 +67,7 @@
<ClCompile Include="libusb\libusb\hotplug.c" />
<ClCompile Include="libusb\libusb\io.c" />
<ClCompile Include="libusb\libusb\os\events_windows.c" />
<ClCompile Condition="'$(EnableLibUsbWindowsHotplug)' == 'true'" Include="libusb\libusb\os\windows_hotplug.c" />
<ClCompile Include="libusb\libusb\strerror.c" />
<ClCompile Include="libusb\libusb\sync.c" />
<ClCompile Include="libusb\libusb\os\threads_windows.c" />
@@ -72,6 +76,7 @@
<ClCompile Include="libusb\libusb\os\windows_winusb.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Condition="'$(EnableLibUsbWindowsHotplug)' == 'true'" Include="libusb\libusb\os\windows_hotplug.h" />
<ClInclude Include="libusb\msvc\config.h" />
<ClInclude Include="libusb\libusb\hotplug.h" />
<ClInclude Include="libusb\libusb\libusb.h" />
+10 -7
View File
@@ -164,14 +164,17 @@ namespace pine
return IPCBuffer{ 5, MakeFailIPC(ret_buffer) };
};
const auto write_string = [&](const std::string& str)
const auto write_string = [&](std::string_view str)
{
if (!SafetyChecks(buf_cnt, 0, ret_cnt, str.size() + 1 + sizeof(u32), buf_size))
return false;
ToArray(ret_buffer, ::narrow<u32>(str.size() + 1), ret_cnt);
ret_cnt += sizeof(u32);
memcpy(&ret_buffer[ret_cnt], str.data(), str.size());
ret_cnt += str.size();
if (str.size())
{
std::memcpy(&ret_buffer[ret_cnt], str.data(), str.size());
ret_cnt += str.size();
}
ret_buffer[ret_cnt++] = '\0';
return true;
};
@@ -512,7 +515,7 @@ namespace pine
*/
static inline bool SafetyChecks(usz command_len, usz command_size, usz reply_len, usz reply_size = 0, usz buf_size = MAX_IPC_SIZE - 1)
{
bool res = ((command_len + command_size) > buf_size ||
const bool res = ((command_len + command_size) > buf_size ||
(reply_len + reply_size) >= MAX_IPC_RETURN_SIZE);
if (res) [[unlikely]]
return false;
@@ -524,8 +527,8 @@ namespace pine
pine_server() noexcept
{
#ifdef _WIN32
WSADATA wsa;
struct sockaddr_in server;
WSADATA wsa {};
struct sockaddr_in server {};
m_sock = INVALID_SOCKET;
m_msgsock = INVALID_SOCKET;
@@ -579,7 +582,7 @@ namespace pine
fmt::append(m_socket_name, ".%d", slot);
}
struct sockaddr_un server;
struct sockaddr_un server {};
m_sock = socket(AF_UNIX, SOCK_STREAM, 0);
if (m_sock < 0)
+2
View File
@@ -20,6 +20,8 @@ else()
option(protobuf_DISABLE_RTTI "Remove runtime type information in the binaries" OFF)
option(protobuf_FORCE_FETCH_DEPENDENCIES "Force all dependencies to be downloaded from GitHub. Local installations will be ignored." OFF)
option(protobuf_LOCAL_DEPENDENCIES_ONLY "Prevent downloading any dependencies from GitHub. If this option is set, the dependency must be available locally as an installed package." OFF)
option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
option(protobuf_MSVC_STATIC_RUNTIME "Link static runtime libraries" OFF)
add_subdirectory(protobuf EXCLUDE_FROM_ALL)
target_include_directories(3rdparty_protobuf SYSTEM INTERFACE protobuf/src)
+10 -3
View File
@@ -6,15 +6,22 @@ find_package(Qt6 ${QT_MIN_VER} CONFIG COMPONENTS Widgets Concurrent Multimedia M
if(WIN32)
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets)
else()
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(Qt6 ${QT_MIN_VER} COMPONENTS DBus Gui GuiPrivate)
find_package(Qt6 ${QT_MIN_VER} COMPONENTS DBus Gui)
if(Qt6_VERSION VERSION_GREATER_EQUAL "6.10.0")
set(QT_NO_PRIVATE_MODULE_WARNING ON)
find_package(Qt6 ${QT_MIN_VER} COMPONENTS GuiPrivate)
endif()
if(Qt6DBus_FOUND)
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::DBus Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets)
target_compile_definitions(3rdparty_qt6 INTERFACE -DHAVE_QTDBUS)
else()
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::Widgets Qt6::Concurrent Qt6::Multimedia Qt6::MultimediaWidgets Qt6::Svg Qt6::SvgWidgets)
endif()
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::GuiPrivate)
if(Qt6_VERSION VERSION_GREATER_EQUAL "6.10.0")
target_link_libraries(3rdparty_qt6 INTERFACE Qt6::GuiPrivate)
else()
target_include_directories(3rdparty_qt6 INTERFACE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
endif()
endif()
if(Qt6Widgets_FOUND)
+6 -3
View File
@@ -119,7 +119,8 @@ echo -e "\n\nResult:\n"
# Find the max length of the paths (before '->')
max_len=0
while IFS='->' read -r left _; do
while read -r line; do
left="${line%%->*}"
len=$(echo -n "$left" | wc -c)
if (( len > max_len )); then
max_len=$len
@@ -127,8 +128,10 @@ while IFS='->' read -r left _; do
done < "$resultfile"
# Print with padding so '->' lines up
while IFS='->' read -r left right; do
right=$(echo "$right" | sed 's/^[[:space:]]*>*[[:space:]]*//')
while read -r line; do
left="${line%%->*}"
right="${line#*->}"
right=$(echo "$right" | sed 's/^[[:space:]]*//')
printf "%-${max_len}s -> %s\n" "$left" "$right"
done < "$resultfile"
+15 -16
View File
@@ -4,23 +4,22 @@ if(USE_SYSTEM_WOLFSSL)
add_library(wolfssl INTERFACE)
target_link_libraries(wolfssl INTERFACE PkgConfig::WolfSSL)
else()
option(WOLFSSL_TLS13 "Enable wolfSSL TLS v1.3 (default: enabled)" OFF)
set(WOLFSSL_SHA3 ON CACHE STRING "Enable wolfSSL SHA-3 support (default: enabled on x86_64/aarch64)")
set(WOLFSSL_SHAKE256 ON CACHE STRING "Enable wolfSSL SHAKE256 support (default: enabled on x86_64/aarch64)")
option(WOLFSSL_BASE64_ENCODE "Enable Base64 encoding (default: enabled on x86_64)" OFF)
option(WOLFSSL_DES3 "Enable DES3 (default: disabled)" ON)
option(WOLFSSL_PWDBASED "Enable PWDBASED (default: disabled)" ON)
option(WOLFSSL_FAST_MATH "Enable fast math ops (default: disabled)" ON)
option(WOLFSSL_EXAMPLES "Enable examples (default: enabled)" OFF)
option(WOLFSSL_CRYPT_TESTS "Enable Crypt Bench/Test (default: enabled)" OFF)
option(WOLFSSL_ASYNC_THREADS "Enable Asynchronous Threading (default: enabled)" OFF)
option(WOLFSSL_BUILD_OUT_OF_TREE "Don't generate files in the source tree (default: yes)" ON)
option(WOLFSSL_SNI "Enable SNI (default: disabled)" ON)
option(WOLFSSL_OPENSSLEXTRA "Enable extra OpenSSL API, size+ (default: disabled)" ON)
option(WOLFSSL_HARDEN "Enable Hardened build, Enables Timing Resistance and Blinding (default: enabled)" OFF)
option(WOLFSSL_ALT_CERT_CHAINS "Enable support for Alternate certification chains (default: disabled)" ON)
set(WOLFSSL_TLS13 OFF CACHE INTERNAL "")
set(WOLFSSL_SHA3 ON CACHE INTERNAL "")
set(WOLFSSL_SHAKE256 ON CACHE INTERNAL "")
set(WOLFSSL_BASE64_ENCODE OFF CACHE INTERNAL "")
set(WOLFSSL_DES3 ON CACHE INTERNAL "")
set(WOLFSSL_PWDBASED ON CACHE INTERNAL "")
set(WOLFSSL_FAST_MATH ON CACHE INTERNAL "")
set(WOLFSSL_EXAMPLES OFF CACHE INTERNAL "")
set(WOLFSSL_CRYPT_TESTS OFF CACHE INTERNAL "")
set(WOLFSSL_ASYNC_THREADS OFF CACHE INTERNAL "")
set(WOLFSSL_BUILD_OUT_OF_TREE ON CACHE INTERNAL "")
set(WOLFSSL_SNI ON CACHE INTERNAL "")
set(WOLFSSL_OPENSSLEXTRA ON CACHE INTERNAL "")
set(WOLFSSL_ALT_CERT_CHAINS ON CACHE INTERNAL "")
add_subdirectory(wolfssl EXCLUDE_FROM_ALL)
target_compile_definitions(wolfssl PUBLIC WOLFSSL_DES_ECB HAVE_WRITE_DUP FP_MAX_BITS=8192 WOLFSSL_NO_OPTIONS_H)
target_compile_definitions(wolfssl PUBLIC WOLFSSL_DES_ECB HAVE_WRITE_DUP FP_MAX_BITS=8192 WOLFSSL_USE_OPTIONS_H)
endif()
+3
View File
@@ -46,6 +46,9 @@
#define HAVE_AESGCM
#define HAVE_SUPPORTED_CURVES
#define HAVE_TLS_EXTENSIONS
#define HAVE_HKDF
#define WC_RSA_PSS
#define WOLFSSL_TLS13
#define HAVE_ECC
#define ECC_SHAMIR
#define ECC_TIMING_RESISTANT
+103 -5
View File
@@ -71,15 +71,40 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="wolfssl\src\bio.c" />
<ClCompile Include="wolfssl\src\conf.c" />
<ClCompile Include="wolfssl\src\crl.c" />
<ClCompile Include="wolfssl\src\dtls.c" />
<ClCompile Include="wolfssl\src\dtls13.c" />
<ClCompile Include="wolfssl\src\internal.c" />
<ClCompile Include="wolfssl\src\pk.c" />
<ClCompile Include="wolfssl\src\pk_ec.c" />
<ClCompile Include="wolfssl\src\pk_rsa.c" />
<ClCompile Include="wolfssl\src\quic.c" />
<ClCompile Include="wolfssl\src\sniffer.c" />
<ClCompile Include="wolfssl\src\ssl_api_cert.c" />
<ClCompile Include="wolfssl\src\ssl_api_crl_ocsp.c" />
<ClCompile Include="wolfssl\src\ssl_api_dtls.c" />
<ClCompile Include="wolfssl\src\ssl_api_ext.c" />
<ClCompile Include="wolfssl\src\ssl_api_pk.c" />
<ClCompile Include="wolfssl\src\ssl_asn1.c" />
<ClCompile Include="wolfssl\src\ssl_bn.c" />
<ClCompile Include="wolfssl\src\ssl_certman.c" />
<ClCompile Include="wolfssl\src\ssl_crypto.c" />
<ClCompile Include="wolfssl\src\ssl_ech.c" />
<ClCompile Include="wolfssl\src\ssl_load.c" />
<ClCompile Include="wolfssl\src\ssl_misc.c" />
<ClCompile Include="wolfssl\src\ssl_p7p12.c" />
<ClCompile Include="wolfssl\src\ssl_sess.c" />
<ClCompile Include="wolfssl\src\ssl_sk.c" />
<ClCompile Include="wolfssl\src\wolfio.c" />
<ClCompile Include="wolfssl\src\keys.c" />
<ClCompile Include="wolfssl\src\ocsp.c" />
<ClCompile Include="wolfssl\src\ssl.c" />
<ClCompile Include="wolfssl\src\tls.c" />
<ClCompile Include="wolfssl\src\tls13.c" />
<ClCompile Include="wolfssl\src\x509.c" />
<ClCompile Include="wolfssl\src\x509_str.c" />
<ClCompile Include="wolfssl\wolfcrypt\src\aes.c" />
<ClCompile Include="wolfssl\wolfcrypt\src\arc4.c" />
<ClCompile Include="wolfssl\wolfcrypt\src\asn.c" />
@@ -139,6 +164,77 @@
<ItemGroup>
<ClInclude Include="extra\win32\user_settings.h" />
<ClInclude Include="wolfssl\resource.h" />
<ClInclude Include="wolfssl\wolfssl\callbacks.h" />
<ClInclude Include="wolfssl\wolfssl\certs_test.h" />
<ClInclude Include="wolfssl\wolfssl\certs_test_sm.h" />
<ClInclude Include="wolfssl\wolfssl\crl.h" />
<ClInclude Include="wolfssl\wolfssl\error-ssl.h" />
<ClInclude Include="wolfssl\wolfssl\internal.h" />
<ClInclude Include="wolfssl\wolfssl\ocsp.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\aes.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\asn1.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\asn1t.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\bio.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\bn.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\buffer.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\camellia.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\cmac.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\cms.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\compat_types.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\conf.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\crypto.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\des.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\dh.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\dsa.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ec.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ec25519.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ec448.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ecdh.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ecdsa.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ed25519.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ed448.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\engine.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\err.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\evp.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\fips_rand.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\hmac.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\kdf.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\lhash.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\md4.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\md5.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\modes.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\objects.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\obj_mac.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ocsp.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\opensslconf.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\opensslv.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ossl_typ.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\pem.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\pkcs12.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\pkcs7.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\rand.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\rc4.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ripemd.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\rsa.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\safestack.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\sha.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\sha3.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\srp.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ssl.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ssl23.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\stack.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\tls1.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\txt_db.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\ui.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\x509.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\x509v3.h" />
<ClInclude Include="wolfssl\wolfssl\openssl\x509_vfy.h" />
<ClInclude Include="wolfssl\wolfssl\quic.h" />
<ClInclude Include="wolfssl\wolfssl\sniffer.h" />
<ClInclude Include="wolfssl\wolfssl\sniffer_error.h" />
<ClInclude Include="wolfssl\wolfssl\ssl.h" />
<ClInclude Include="wolfssl\wolfssl\test.h" />
<ClInclude Include="wolfssl\wolfssl\version.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\aes.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\arc4.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\asn.h" />
@@ -166,8 +262,6 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ed448.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\error-crypt.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_kyber.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_lms.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\ext_xmss.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\falcon.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_448.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\fe_operations.h" />
@@ -180,7 +274,6 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\integer.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kdf.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\kyber.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\lms.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\logging.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md2.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\md4.h" />
@@ -194,6 +287,7 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs12.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pkcs7.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\poly1305.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\puf.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\pwdbased.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\random.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\rc2.h" />
@@ -212,7 +306,6 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm3.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sm4.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sphincs.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\sp_int.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\srp.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\tfm.h" />
@@ -221,12 +314,16 @@
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_encrypt.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_kyber.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_lms.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_mldsa.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_mlkem.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_pkcs11.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_port.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_she.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_slhdsa.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wc_xmss.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfevent.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\wolfmath.h" />
<ClInclude Include="wolfssl\wolfssl\wolfcrypt\xmss.h" />
<ClInclude Include="wolfssl\wolfssl\wolfio.h" />
<CustomBuild Include="wolfssl\wolfcrypt\src\aes_asm.asm">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</ExcludedFromBuild>
@@ -247,6 +344,7 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ResourceCompile>
<ResourceCompile Include="wolfssl\wolfssl\sniffer_error.rc" />
</ItemGroup>
<ItemGroup>
<None Include="wolfssl\wolfssl\wolfcrypt\include.am" />
+2 -1
View File
@@ -6,7 +6,8 @@ if (USE_SYSTEM_ZLIB)
target_link_libraries(3rdparty_zlib INTERFACE ZLIB::ZLIB)
target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
else()
option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" OFF)
option(ZLIB_BUILD_TESTING "Enable Zlib Examples as tests" OFF)
option(ZLIB_BUILD_SHARED "Enable building zlib shared library" OFF)
message(STATUS "RPCS3: Using builtin ZLIB")
set(SKIP_INSTALL_ALL ON)
add_subdirectory(zlib EXCLUDE_FROM_ALL)
+7 -7
View File
@@ -20,27 +20,27 @@ The following tools are required to build RPCS3 on Windows 10 or later:
with standalone **CMake** tool.
- [Python 3.6+](https://www.python.org/downloads/) (add to PATH)
- [Qt 6.10.2](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (see "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
- [Qt 6.11.1](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
- [Vulkan SDK 1.4.341.1](https://vulkan.lunarg.com/sdk/home) (see "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html)). Note that future SDKs may not work.
The `sln` solution available only on **Visual Studio** is the preferred building solution. It easily allows to build the **RPCS3** application in `Release` and `Debug` mode.
In order to build **RPCS3** with the `sln` solution (with **Visual Studio**), **Qt** libs need to be detected. To detect the libs:
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.10.2\msvc2022_64\`
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.11.1\msvc2022_64\`
- or use the [Visual Studio Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools2022)
**NOTE:** If you have issues with the **Visual Studio Qt Plugin**, you may want to uninstall it and install the [Legacy Qt Plugin](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.LEGACYQtVisualStudioTools2022) instead.
In order to build **RPCS3** with the `CMake` solution (with both **Visual Studio** and standalone **CMake** tool):
- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.10.2\msvc2022_64\`
- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.11.1\msvc2022_64\`
### Linux
These are the essentials tools to build RPCS3 on Linux. Some of them can be installed through your favorite package manager:
- Clang 17+ or GCC 13+
- [CMake 3.28.0+](https://www.cmake.org/download/)
- [Qt 6.10.2](https://www.qt.io/download-qt-installer)
- [Vulkan SDK 1.3.268.0](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html)) for now future SDKs don't work. You need precisely 1.3.268.0.
- [Qt 6.11.1](https://www.qt.io/download-qt-installer)
- [Vulkan SDK 1.4.341.1](https://vulkan.lunarg.com/sdk/home) (See "Install the SDK" [here](https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html)). Note that future SDKs may not work.
- [SDL3](https://github.com/libsdl-org/SDL/releases) (for the FAudio backend)
**If you have an NVIDIA GPU, you may need to install the libglvnd package.**
@@ -123,7 +123,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
##### Configuring the Qt Plugin (if used)
1) go to `Extensions->Qt VS Tools->Qt Versions`
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.10.2\msvc2022_64`, version will fill in automatically
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.11.1\msvc2022_64`, version will fill in automatically
3) go to `Extensions->Qt VS Tools->Options->Legacy Project Format`. (Only available in the **Legacy Qt Plugin**)
4) set `Build: Run pre-build setup` to `true`. (Only available in the **Legacy Qt Plugin**)
+5 -52
View File
@@ -37,7 +37,7 @@ option(USE_LIBEVDEV "libevdev-based joystick support" ON)
option(USE_DISCORD_RPC "Discord rich presence integration" OFF)
option(USE_VULKAN "Vulkan render backend" ON)
option(USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF)
option(USE_SDL "Enables SDL input handler" OFF)
option(USE_SDL "Enables SDL input handler" ON)
option(USE_SYSTEM_CUBEB "Prefer system cubeb instead of the builtin one" OFF)
option(USE_SYSTEM_CURL "Prefer system Curl instead of the prebuild one" ON)
option(USE_SYSTEM_FAUDIO "Prefer system FAudio instead of the builtin one" OFF)
@@ -86,50 +86,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug" AND NOT MSVC)
endif()
if(MSVC)
option(USE_MSVC_STATIC_CRT "Use static MSVC C runtime" OFF)
# TODO(cjj19970505@live.cn)
# DiscordRPC binary in 3rdparty is compiled /MT
# So theoretically we should enable DiscordRPC in Release and static CRT build
# since we might encounter some rumtime issues when more than one CRT version are presented.
# https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-160#what-problems-exist-if-an-application-uses-more-than-one-crt-version
# Add other DiscordRPC binaries(compiled with /MTd, /MD, /MDd) or compile it from source may address this issue.
if(NOT IS_MULTI_CONFIG)
if(NOT(CMAKE_BUILD_TYPE MATCHES "Release" AND USE_MSVC_STATIC_CRT))
set(USE_DISCORD_RPC OFF CACHE BOOL "Discord RPC is only available in Release and static CRT build." FORCE)
endif()
endif()
if(USE_MSVC_STATIC_CRT)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
else()
# though doc ( https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html )
# says if that property is not set then CMake uses the default value MultiThreaded$<$<CONFIG:Debug>:Debug>DLL
# to select a MSVC runtime library.
# But yaml-cpp set /MT(d) if CMAKE_MSVC_RUNTIME_LIBRARY is undefined
# So we have to define it explicitly
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
endif()
# TODO(cjj19970505@live.cn)
# offical QT uses dynamic CRT.
# When building our lib with static CRT and debug build type
# and linking with Qt with dynamic CRT and debug build,
# error is encountered in runtime (which is expected).
# But building our lib with static CRT and release build type,
# and linking with Qt with dynamic CRT and release build seems to be working,
# which is the same config with VS solution.
# (though technically it might still have some hidden errors).
# So we allow static CRT in both relase and debug build, but prompt warning in debug build.
# For more info:
# https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=msvc-160#what-problems-exist-if-an-application-uses-more-than-one-crt-version
# https://wiki.qt.io/Technical_FAQ#Why_does_a_statically_built_Qt_use_the_dynamic_Visual_Studio_runtime_libraries_.3F_Do_I_need_to_deploy_those_with_my_application_.3F
if(USE_MSVC_STATIC_CRT)
if(IS_MULTI_CONFIG OR CMAKE_BUILD_TYPE MATCHES "Debug")
message(AUTHOR_WARNING "Debug build currently can not work with static CRT.")
endif()
endif()
add_compile_options(/MP)
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:/MP>")
endif()
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -137,12 +94,12 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
endif()
if(APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
include_directories(/opt/homebrew/include)
link_directories(/opt/homebrew/lib)
list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew")
list(APPEND CMAKE_SYSTEM_PREFIX_PATH "/opt/homebrew")
endif()
if(MSVC)
add_compile_options(/wd4530 /utf-8) # C++ exception handler used, but unwind semantics are not enabled
add_compile_options("$<$<COMPILE_LANGUAGE:C,CXX>:/wd4530;/utf-8>") # C++ exception handler used, but unwind semantics are not enabled
endif()
add_subdirectory(3rdparty)
@@ -161,10 +118,6 @@ if (NOT FOUND_LTO EQUAL -1)
message(FATAL_ERROR "RPCS3 doesn't support building with LTO, use -DDISABLE_LTO=TRUE to force-disable it")
endif()
if(NOT WIN32)
add_compile_options(-pthread)
endif()
## Look for Gamemode if its installed on Linux
if(LINUX)
## User chooses whether to Enable GameMode features or not
+11 -1
View File
@@ -9,7 +9,7 @@ The world's first free and open-source PlayStation 3 emulator/debugger, written
You can find some basic information on our [**website**](https://rpcs3.net/). Game info is being populated on the [**Wiki**](https://wiki.rpcs3.net/).
For discussion about this emulator, PS3 emulation, and game compatibility reports, please visit our [**forums**](https://forums.rpcs3.net) and our [**Discord server**](https://discord.gg/RPCS3).
[**Support Lead Developers Nekotekina and kd-11 on Patreon**](https://www.patreon.com/Nekotekina)
[**Support the Lead Developers on Patreon**](https://rpcs3.net/patreon)
## Contributing
@@ -23,6 +23,16 @@ If you want to contribute as a developer, please take a look at the following pa
You should also contact any of the developers in the forums or in the Discord server to learn more about the current state of the emulator.
### AI Use
Use of AI tools for research and reverse engineering purposes is permitted. However, contributors are expected to fully own and understand all code they submit. Any communication with the team — including code, code comments, and GitHub comments — must come from the human contributor, not an AI agent acting autonomously.
We have unfortunately seen a rise in untested and unverified AI-generated slop being submitted to this project. This wastes maintainer time and, in worse cases, such changes get merged and break functionality for all users. Repeated violations will result in a ban from the repository. Please be respectful of everyone's time.
**Pull requests opened by AI agents or automated tools must include a disclosure in the PR description** stating the scope of AI involvement — which parts were AI-generated and what human testing or review was performed prior to submission. PRs that omit this disclosure may be closed without review.
If you are unsure about your work, open a discussion issue to talk it through with the team, or reach out to a maintainer on [Discord](https://discord.gg/RPCS3).
## Building
See [BUILDING.md](BUILDING.md) for more information about how to setup an environment to build RPCS3.
+141 -52
View File
@@ -40,7 +40,7 @@ namespace cfg
owner->m_nodes.emplace_back(this);
}
bool _base::from_string(std::string_view, bool)
bool _base::from_string(std::string_view /*value*/, bool /*dynamic*/)
{
cfg_log.fatal("cfg::_base::from_string() purecall");
return false;
@@ -68,7 +68,7 @@ namespace cfg
// Incrementally load config entries from YAML::Node.
// The config value is preserved if the corresponding YAML node doesn't exist.
static void decode(const YAML::Node& data, class _base& rhs, bool dynamic = false);
[[nodiscard]] static bool decode(const YAML::Node& data, class _base& rhs, bool dynamic, bool strict);
}
std::vector<std::string> cfg::make_int_range(s64 min, s64 max)
@@ -76,11 +76,11 @@ std::vector<std::string> cfg::make_int_range(s64 min, s64 max)
return {std::to_string(min), std::to_string(max)};
}
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max)
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max, std::string_view name)
{
if (value.empty())
{
if (out) cfg_log.error("cfg::try_to_int64(): called with an empty string");
if (out) cfg_log.error("cfg::try_to_int64('%s'): called with an empty string", name);
return false;
}
@@ -107,7 +107,7 @@ bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max)
if (ret.ec != std::errc() || ret.ptr != end || (start[0] == '-' && sign < 0))
{
if (out) cfg_log.error("cfg::try_to_int64('%s'): invalid integer", value);
if (out) cfg_log.error("cfg::try_to_int64('%s', '%s'): invalid integer", value, name);
return false;
}
@@ -115,7 +115,7 @@ bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max)
if (result < min || result > max)
{
if (out) cfg_log.error("cfg::try_to_int64('%s'): out of bounds (val=%d, min=%d, max=%d)", value, result, min, max);
if (out) cfg_log.error("cfg::try_to_int64('%s', '%s'): out of bounds (val=%d, min=%d, max=%d)", value, name, result, min, max);
return false;
}
@@ -128,11 +128,11 @@ std::vector<std::string> cfg::make_uint_range(u64 min, u64 max)
return {std::to_string(min), std::to_string(max)};
}
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max)
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max, std::string_view name)
{
if (value.empty())
{
if (out) cfg_log.error("cfg::try_to_uint64(): called with an empty string");
if (out) cfg_log.error("cfg::try_to_uint64('%s'): called with an empty string", name);
return false;
}
@@ -152,13 +152,13 @@ bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max)
if (ret.ec != std::errc() || ret.ptr != end)
{
if (out) cfg_log.error("cfg::try_to_uint64('%s'): invalid integer", value);
if (out) cfg_log.error("cfg::try_to_uint64('%s', '%s'): invalid integer", value, name);
return false;
}
if (result < min || result > max)
{
if (out) cfg_log.error("cfg::try_to_uint64('%s'): out of bounds (val=%u, min=%u, max=%u)", value, result, min, max);
if (out) cfg_log.error("cfg::try_to_uint64('%s', '%s'): out of bounds (val=%u, min=%u, max=%u)", value, name, result, min, max);
return false;
}
@@ -166,11 +166,11 @@ bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max)
return true;
}
bool try_to_uint128(u128* out, std::string_view value)
bool try_to_uint128(u128* out, std::string_view value, std::string_view name)
{
if (value.empty())
{
if (out) cfg_log.error("cfg::try_to_uint128(): called with an empty string");
if (out) cfg_log.error("cfg::try_to_uint128('%s'): called with an empty string", name);
return false;
}
@@ -193,7 +193,7 @@ bool try_to_uint128(u128* out, std::string_view value)
if (ret.ec != std::errc() || ret.ptr != end)
{
if (out) cfg_log.error("cfg::try_to_uint128('%s'): invalid integer", value);
if (out) cfg_log.error("cfg::try_to_uint128('%s', '%s'): invalid integer", value, name);
return false;
}
@@ -207,7 +207,7 @@ bool try_to_uint128(u128* out, std::string_view value)
if (ret.ec != std::errc() || ret.ptr != start_low64)
{
if (out) cfg_log.error("cfg::try_to_uint128('%s'): invalid integer", value);
if (out) cfg_log.error("cfg::try_to_uint128('%s', '%s'): invalid integer", value, name);
return false;
}
@@ -220,11 +220,11 @@ std::vector<std::string> cfg::make_float_range(f64 min, f64 max)
return {std::to_string(min), std::to_string(max)};
}
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max)
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::string_view name)
{
if (value.empty())
{
if (out) cfg_log.error("cfg::try_to_float(): called with an empty string");
if (out) cfg_log.error("cfg::try_to_float('%s'): called with an empty string", name);
return false;
}
@@ -237,13 +237,13 @@ bool try_to_float(f64* out, std::string_view value, f64 min, f64 max)
if (end_check != str.data() + str.size())
{
if (out) cfg_log.error("cfg::try_to_float('%s'): invalid float", value);
if (out) cfg_log.error("cfg::try_to_float('%s', '%s'): invalid float", value, name);
return false;
}
if (result < min || result > max)
{
if (out) cfg_log.error("cfg::try_to_float('%s'): out of bounds (val=%f, min=%f, max=%f)", value, result, min, max);
if (out) cfg_log.error("cfg::try_to_float('%s', '%s'): out of bounds (val=%f, min=%f, max=%f)", value, name, result, min, max);
return false;
}
@@ -251,12 +251,8 @@ bool try_to_float(f64* out, std::string_view value, f64 min, f64 max)
return true;
}
bool try_to_string(std::string* out, const f64& value)
bool try_to_string(std::string* out, f64 value, std::string_view name)
{
#ifdef __APPLE__
if (out) *out = std::to_string(value);
return true;
#else
std::array<char, 32> str{};
if (auto [ptr, ec] = std::to_chars(str.data(), str.data() + str.size(), value, std::chars_format::fixed); ec == std::errc())
@@ -266,14 +262,15 @@ bool try_to_string(std::string* out, const f64& value)
}
else
{
if (out) cfg_log.error("cfg::try_to_string(): could not convert value '%f' to string. error='%s'", value, std::make_error_code(ec).message());
if (out) cfg_log.error("cfg::try_to_string('%s'): could not convert value '%f' to string. error='%s'", name, value, std::make_error_code(ec).message());
return false;
}
#endif
}
bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value)
bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value, std::string_view name)
{
ensure(func);
u64 max = umax;
for (u64 i = 0;; i++)
@@ -302,7 +299,7 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) f
const char* end = start + value.size();
int base = 10;
if (start[0] == '0' && (start[1] == 'x' || start[1] == 'X'))
if (value.size() >= 2 && start[0] == '0' && (start[1] == 'x' || start[1] == 'X'))
{
// Limited hex support
base = 16;
@@ -313,13 +310,13 @@ bool cfg::try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) f
if (ret.ec != std::errc() || ret.ptr != end)
{
if (out) cfg_log.error("cfg::try_to_enum_value('%s'): invalid enum or integer", value);
if (out) cfg_log.error("cfg::try_to_enum_value('%s', '%s'): invalid enum or integer", value, name);
return false;
}
if (result > max)
{
if (out) cfg_log.error("cfg::try_to_enum_value('%s'): out of bounds(val=%u, min=0, max=%u)", value, result, max);
if (out) cfg_log.error("cfg::try_to_enum_value('%s', '%s'): out of bounds(val=%u, min=0, max=%u)", value, name, result, max);
return false;
}
@@ -362,6 +359,27 @@ std::vector<std::string> cfg::try_to_enum_list(decltype(&fmt_class_string<int>::
return result;
}
size_t cfg::try_to_enum_size(decltype(&fmt_class_string<int>::format) func)
{
size_t result = 0;
for (u64 i = 0;; i++)
{
std::string var;
func(var, i);
std::string hex;
fmt_class_string<u64>::format(hex, i);
if (var == hex)
{
break;
}
result++;
}
return result;
}
void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
{
switch (rhs.get_type())
@@ -416,7 +434,7 @@ void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
out << YAML::BeginMap;
for (const auto& np : static_cast<const log_entry&>(rhs).get_map())
{
if (np.second == logs::level::notice) continue;
if (np.second == logs::level::_default) continue;
out << YAML::Key << np.first;
out << YAML::Value << fmt::format("%s", np.second);
}
@@ -447,37 +465,50 @@ void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
}
}
void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
bool cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic, bool strict)
{
if (dynamic && !rhs.get_is_dynamic())
{
return;
return true;
}
switch (rhs.get_type())
{
case type::node:
{
if (data.IsScalar() || data.IsSequence())
if (!data.IsMap())
{
return; // ???
cfg_log.error("node node is not a map");
return false;
}
bool success = true;
for (const auto& pair : data)
{
if (!pair.first.IsScalar()) continue;
// Find the key among existing nodes
for (const auto& node : static_cast<node&>(rhs).get_nodes())
const auto& nodes = static_cast<node&>(rhs).get_nodes();
const auto it = std::find_if(nodes.cbegin(), nodes.cend(), [&pair](const auto& node) { return ensure(node)->get_name() == pair.first.Scalar(); });
if (it == nodes.cend())
{
if (node->get_name() == pair.first.Scalar())
if (strict)
{
decode(pair.second, *node, dynamic);
cfg_log.error("Unknown key found: '%s'", pair.first.Scalar());
success = false;
}
continue;
}
if (!decode(pair.second, *ensure(*it), dynamic, strict) && strict)
{
success = false;
}
}
break;
return success;
}
case type::set:
{
@@ -485,7 +516,10 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
if (YAML::convert<decltype(values)>::decode(data, values))
{
rhs.from_list(std::move(values));
if (!rhs.from_list(std::move(values)) && strict)
{
return false;
}
}
break;
@@ -495,7 +529,8 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
{
if (!data.IsMap())
{
return;
cfg_log.error("map node is not a map");
return false;
}
map_of_type<std::string> values;
@@ -512,22 +547,36 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
}
case type::log:
{
if (data.IsScalar() || data.IsSequence())
if (!data.IsMap())
{
return; // ???
cfg_log.error("log node is not a map");
return false;
}
map_of_type<logs::level> values;
for (const auto& pair : data)
{
if (!pair.first.IsScalar() || !pair.second.IsScalar()) continue;
if (!pair.first.IsScalar() || !pair.second.IsScalar())
{
if (strict)
{
if (!pair.first.IsScalar())
cfg_log.error("Key in map is not a scalar");
else
cfg_log.error("Value in map is not a scalar. key='%s'", pair.first.Scalar());
return false;
}
continue;
}
u64 value;
if (cfg::try_to_enum_value(&value, &fmt_class_string<logs::level>::format, pair.second.Scalar()))
if (!cfg::try_to_enum_value(&value, &fmt_class_string<logs::level>::format, pair.second.Scalar(), pair.first.Scalar()) && strict)
{
values.emplace(pair.first.Scalar(), static_cast<logs::level>(static_cast<int>(value)));
return false;
}
values.emplace(pair.first.Scalar(), static_cast<logs::level>(static_cast<int>(value)));
}
static_cast<log_entry&>(rhs).set_map(std::move(values));
@@ -537,20 +586,43 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
{
if (!data.IsMap())
{
return; // ???
cfg_log.error("device node is not a map");
return false;
}
map_of_type<device_info> values;
for (const auto& pair : data)
{
if (!pair.first.IsScalar() || !pair.second.IsMap()) continue;
if (!pair.first.IsScalar() || !pair.second.IsMap())
{
if (strict)
{
if (!pair.first.IsScalar())
cfg_log.error("Key in device map is not a scalar");
else
cfg_log.error("Value in device map is not a map. key='%s'", pair.first.Scalar());
return false;
}
continue;
}
device_info info{};
for (const auto& key_value : pair.second)
{
if (!key_value.first.IsScalar() || !key_value.second.IsScalar()) continue;
if (!key_value.first.IsScalar() || !key_value.second.IsScalar())
{
if (strict)
{
if (!key_value.first.IsScalar())
cfg_log.error("Key in device info map is not a scalar");
else
cfg_log.error("Value in device map is not a scalar. key='%s'", key_value.first.Scalar());
return false;
}
continue;
}
if (key_value.first.Scalar() == "Path")
info.path = key_value.second.Scalar();
@@ -577,12 +649,17 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
if (YAML::convert<std::string>::decode(data, value))
{
rhs.from_string(value, dynamic);
if (!rhs.from_string(value, dynamic) && strict)
{
return false;
}
}
break; // ???
}
}
return true;
}
std::string cfg::node::to_string() const
@@ -599,8 +676,7 @@ bool cfg::node::from_string(std::string_view value, bool dynamic)
if (error.empty())
{
cfg::decode(result, *this, dynamic);
return true;
return cfg::decode(result, *this, dynamic, false);
}
cfg_log.error("Failed to load node: %s", error);
@@ -623,6 +699,19 @@ void cfg::node::restore_defaults()
}
}
bool cfg::node::validate(std::string_view value)
{
auto [result, error] = yaml_load(std::string(value));
if (error.empty())
{
return cfg::decode(result, *this, false, true);
}
cfg_log.error("Failed to load node: %s", error);
return false;
}
std::string cfg::map_entry::get_value(std::string_view key)
{
if (auto it = m_map.find(key); it != m_map.end())
@@ -668,7 +757,7 @@ void cfg::log_entry::from_default()
std::pair<u16, u16> cfg::device_info::get_usb_ids() const
{
auto string_to_hex = [](const std::string& str) -> u16
auto string_to_hex = [](std::string_view str) -> u16
{
u16 value = 0x0000;
if (!str.empty() && std::from_chars(str.data(), str.data() + str.size(), value, 16).ec != std::errc{})
+28 -12
View File
@@ -25,11 +25,14 @@ namespace cfg
std::vector<std::string> make_float_range(f64 min, f64 max);
// Internal hack
bool try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view);
bool try_to_enum_value(u64* out, decltype(&fmt_class_string<int>::format) func, std::string_view value, std::string_view name = {});
// Internal hack
std::vector<std::string> try_to_enum_list(decltype(&fmt_class_string<int>::format) func);
// Internal hack
size_t try_to_enum_size(decltype(&fmt_class_string<int>::format) func);
// Config tree entry type.
enum class type : unsigned
{
@@ -107,7 +110,7 @@ namespace cfg
}
// Try to convert from string (optional)
virtual bool from_string(std::string_view, bool /*dynamic*/ = false);
virtual bool from_string(std::string_view value, bool dynamic = false);
// Get string list (optional)
virtual std::vector<std::string> to_list() const
@@ -158,6 +161,9 @@ namespace cfg
// Restore default members
void restore_defaults() override;
// Try to convert from string and validate
bool validate(std::string_view value);
};
class _bool final : public _base
@@ -298,7 +304,7 @@ namespace cfg
{
u64 result;
if (try_to_enum_value(&result, &fmt_class_string<T>::format, value))
if (try_to_enum_value(&result, &fmt_class_string<T>::format, value, m_name))
{
// No narrowing check, it's hard to do right there
m_value = static_cast<T>(static_cast<std::underlying_type_t<T>>(result));
@@ -312,6 +318,11 @@ namespace cfg
{
return try_to_enum_list(&fmt_class_string<T>::format);
}
size_t size() const
{
return try_to_enum_size(&fmt_class_string<T>::format);
}
};
// Signed 32/64-bit integer entry with custom Min/Max range.
@@ -374,7 +385,7 @@ namespace cfg
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
{
s64 result;
if (try_to_int64(&result, value, Min, Max))
if (try_to_int64(&result, value, Min, Max, m_name))
{
m_value = static_cast<int_type>(result);
return true;
@@ -385,7 +396,7 @@ namespace cfg
void set(const s64& value)
{
ensure(value >= Min && value <= Max);
if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max);
m_value = static_cast<int_type>(value);
}
@@ -443,7 +454,7 @@ namespace cfg
std::string to_string() const override
{
std::string result;
if (try_to_string(&result, m_value))
if (try_to_string(&result, m_value, m_name))
{
return result;
}
@@ -454,7 +465,7 @@ namespace cfg
std::string def_to_string() const override
{
std::string result;
if (try_to_string(&result, def))
if (try_to_string(&result, def, m_name))
{
return result;
}
@@ -465,7 +476,7 @@ namespace cfg
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
{
f64 result;
if (try_to_float(&result, value, Min, Max))
if (try_to_float(&result, value, Min, Max, m_name))
{
m_value = static_cast<float_type>(result);
return true;
@@ -476,7 +487,7 @@ namespace cfg
void set(const f64& value)
{
ensure(value >= Min && value <= Max);
if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max);
m_value = static_cast<float_type>(value);
}
@@ -552,7 +563,7 @@ namespace cfg
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
{
u64 result;
if (try_to_uint64(&result, value, Min, Max))
if (try_to_uint64(&result, value, Min, Max, m_name))
{
m_value = static_cast<int_type>(result);
return true;
@@ -563,7 +574,7 @@ namespace cfg
void set(const u64& value)
{
ensure(value >= Min && value <= Max);
if (value < Min || value > Max) fmt::throw_exception("'%s': value %d out of bounds (min=%d, max=%d)", m_name, value, Min, Max);
m_value = static_cast<int_type>(value);
}
@@ -638,7 +649,7 @@ namespace cfg
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
{
u128 result;
if (try_to_uint128(&result, value))
if (try_to_uint128(&result, value, m_name))
{
m_value = result;
return true;
@@ -706,6 +717,11 @@ namespace cfg
m_value = std::string(value);
return true;
}
void set(std::string_view value)
{
m_value = std::string(value);
}
};
// Simple set entry (TODO: template for various types)
+99 -7
View File
@@ -38,6 +38,17 @@ static std::unique_ptr<wchar_t[]> to_wchar(std::string_view source)
// Buffer for max possible output length
std::unique_ptr<wchar_t[]> buffer(new wchar_t[buf_size + 8 + 32768]);
// If path points to an optical raw device, copy it AS IS
if (fs::is_optical_raw_device(std::string(source)))
{
ensure(MultiByteToWideChar(CP_UTF8, 0, source.data(), size, buffer.get() + 32768, size)); // "to_wchar"
// Canonicalize wide path (replace '/', ".", "..", \\ repetitions, etc)
ensure(GetFullPathNameW(buffer.get() + 32768, 32768, buffer.get(), nullptr) - 1 < 32768 - 1); // "to_wchar"
return buffer;
}
// Prepend wide path prefix (4 characters)
std::memcpy(buffer.get() + 32768, L"\\\\\?\\", 4 * sizeof(wchar_t));
@@ -166,6 +177,7 @@ static fs::error to_error(int e)
case ENOTEMPTY: return fs::error::notempty;
case EROFS: return fs::error::readonly;
case EISDIR: return fs::error::isdir;
case ENOTDIR: return fs::error::notdir;
case ENOSPC: return fs::error::nospace;
case EXDEV: return fs::error::xdev;
default: return fs::error::unknown;
@@ -399,11 +411,12 @@ namespace fs
class windows_file final : public file_base
{
HANDLE m_handle;
bool m_raw_device;
atomic_t<u64> m_pos {0};
public:
windows_file(HANDLE handle)
: m_handle(handle)
windows_file(HANDLE handle, bool raw_device = false)
: m_handle(handle), m_raw_device(raw_device)
{
}
@@ -563,11 +576,20 @@ namespace fs
u64 size() override
{
// NOTE: this can fail if we access a mounted empty drive (e.g. after unmounting an iso).
LARGE_INTEGER size;
ensure(GetFileSizeEx(m_handle, &size)); // "file::size"
if (!m_raw_device)
{
// NOTE: this can fail if we access a mounted empty drive (e.g. after unmounting an iso).
LARGE_INTEGER size;
return size.QuadPart;
ensure(GetFileSizeEx(m_handle, &size)); // "file::size"
return size.QuadPart;
}
// For a raw device, we need to use DeviceIoControl.
DISK_GEOMETRY_EX geometry;
ensure(DeviceIoControl(m_handle, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, nullptr, 0, &geometry, sizeof(geometry), nullptr, nullptr));
return geometry.DiskSize.QuadPart;
}
native_handle get_handle() override
@@ -1090,6 +1112,55 @@ bool fs::is_symlink(const std::string& path)
return true;
}
bool fs::is_optical_raw_device([[maybe_unused]] const std::string& path)
{
#ifdef _WIN32
if (path.starts_with("\\\\.\\"))
{
return true;
}
#endif
return false;
}
bool fs::get_optical_raw_device(const std::string& path, std::string* raw_device)
{
if (fs::is_optical_raw_device(path))
{
if (raw_device)
{
*raw_device = path;
}
return true;
}
#ifdef _WIN32
// Skip a useless check to detect an optical raw device if navigating on subfolders (e.g. C:\subfolder_1\subfolder_2\),
// it means we are on a HDD/SSD. A path for an optical drive should include only the drive letter (e.g. E:\)
const size_t drive_delim_pos = path.find_first_of(":");
if (drive_delim_pos != 1 || drive_delim_pos != path.find_last_not_of(delim))
{
return false;
}
const std::string drive_letter = path.substr(0, drive_delim_pos + 1); // e.g. "E:"
const std::string drive_path = drive_letter + "\\"; // e.g. "E:\"
if (GetDriveTypeA(drive_path.c_str()) == DRIVE_CDROM)
{
if (raw_device)
{
*raw_device = "\\\\.\\" + drive_letter;
}
return true;
}
#endif
return false;
}
bool fs::statfs(const std::string& path, fs::device_stat& info)
{
if (auto device = get_virtual_device(path))
@@ -1657,9 +1728,29 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
return;
}
// If path points to an optical raw device, complete the file opening
// (the following GetFileInformationByHandle() would always fail on a raw device).
if (is_optical_raw_device(path))
{
DISK_GEOMETRY_EX geometry;
// Try to retrieve information on content. If it fails, no disc is probably mounted so abort the file opening
if (!DeviceIoControl(handle, IOCTL_DISK_GET_DRIVE_GEOMETRY_EX, nullptr, 0, &geometry, sizeof(geometry), nullptr, nullptr))
{
const DWORD last_error = GetLastError();
CloseHandle(handle);
g_tls_error = to_error(last_error);
return;
}
m_file = std::make_unique<windows_file>(handle, true);
return;
}
// Check if the handle is actually valid.
// This can fail on empty mounted drives (e.g. with ERROR_NOT_READY or ERROR_INVALID_FUNCTION).
BY_HANDLE_FILE_INFORMATION info{};
if (!GetFileInformationByHandle(handle, &info))
{
const DWORD last_error = GetLastError();
@@ -1670,7 +1761,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
g_tls_error = fs::error::isdir;
return;
}
g_tls_error = to_error(last_error);
return;
}
@@ -2833,6 +2924,7 @@ void fmt_class_string<fs::error>::format(std::string& out, u64 arg)
case fs::error::notempty: return "Not empty";
case fs::error::readonly: return "Read only";
case fs::error::isdir: return "Is a directory";
case fs::error::notdir: return "Not a directory";
case fs::error::toolong: return "Path too long";
case fs::error::nospace: return "Not enough space on the device";
case fs::error::xdev: return "Device mismatch";
+7
View File
@@ -213,6 +213,12 @@ namespace fs
// Check whether the path points to an existing symlink
bool is_symlink(const std::string& path);
// Check whether the path points to a raw device
bool is_optical_raw_device(const std::string& path);
// Check whether the path points to an optical drive. If so, provide the raw device in "raw_device" if requested
bool get_optical_raw_device(const std::string& path, std::string* raw_device = nullptr);
// Get filesystem information
bool statfs(const std::string& path, device_stat& info);
@@ -683,6 +689,7 @@ namespace fs
notempty,
readonly,
isdir,
notdir,
toolong,
nospace,
xdev,
+40 -6
View File
@@ -244,7 +244,6 @@ namespace asmjit
void vec_load_unaligned(u32 esize, const Operand& v, const x86::Mem& src);
void vec_store_unaligned(u32 esize, const Operand& v, const x86::Mem& dst);
void vec_partial_move(u32 esize, const Operand& dst, const Operand& src);
void _vec_binary_op(x86::Inst::Id sse_op, x86::Inst::Id vex_op, x86::Inst::Id evex_op, const Operand& dst, const Operand& lhs, const Operand& rhs);
@@ -434,13 +433,35 @@ namespace asmjit
#endif
}
#ifdef __APPLE__
struct jit_write_guard
{
jit_write_guard() noexcept
{
pthread_jit_write_protect_np(false);
// Ensure stores are not reordered by the compiler
atomic_fence_acq_rel();
}
~jit_write_guard() noexcept
{
// Ensure stores are not reordered by the compiler
atomic_fence_seq_cst();
pthread_jit_write_protect_np(true);
}
};
#else
#define jit_write_guard [[maybe_unused]] int
#endif
// Build runtime function with asmjit::X86Assembler
template <typename FT, typename Asm = native_asm, typename F>
inline FT build_function_asm(std::string_view name, F&& builder, ::jit_runtime* custom_runtime = nullptr, bool reduced_size = false)
{
#ifdef __APPLE__
pthread_jit_write_protect_np(false);
#endif
jit_write_guard jit_guard;
using namespace asmjit;
auto& rt = custom_runtime ? *custom_runtime : get_global_runtime();
@@ -493,6 +514,10 @@ inline FT build_function_asm(std::string_view name, F&& builder, ::jit_runtime*
return reinterpret_cast<FT>(uptr(result));
}
#if defined(__INTELLISENSE__) && !defined(LLVM_AVAILABLE)
#define LLVM_AVAILABLE
#endif
#ifdef LLVM_AVAILABLE
namespace llvm
@@ -521,7 +546,7 @@ class jit_compiler final
atomic_t<usz> m_disk_space = umax;
public:
jit_compiler(const std::unordered_map<std::string, u64>& _link, const std::string& _cpu, u32 flags = 0, std::function<u64(const std::string&)> symbols_cement = {}) noexcept;
jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string_view _cpu, u32 flags = 0, std::function<u64(const std::string&)> symbols_cement = {}) noexcept;
jit_compiler& operator=(thread_state) noexcept;
~jit_compiler() noexcept;
@@ -539,9 +564,15 @@ public:
// Add module (path to obj cache dir)
void add(std::unique_ptr<llvm::Module> _module, const std::string& path);
// Returns false after LLVM fatal recovery. The compiler must be discarded.
bool try_add(std::unique_ptr<llvm::Module> _module, const std::string& path, std::string& error);
// Add module (not cached)
void add(std::unique_ptr<llvm::Module> _module);
// Returns false after LLVM fatal recovery. The compiler must be discarded.
bool try_add(std::unique_ptr<llvm::Module> _module, std::string& error);
// Add object (path to obj file)
bool add(const std::string& path);
@@ -554,11 +585,14 @@ public:
// Finalize
void fin();
// Returns false after LLVM fatal recovery. The compiler must be discarded.
bool try_fin(std::string& error);
// Get compiled function address
u64 get(const std::string& name);
// Get CPU info
static std::string cpu(const std::string& _cpu);
static std::string cpu(std::string_view _cpu);
// Get system triple (PPU)
static std::string triple1();
+4 -4
View File
@@ -122,7 +122,7 @@ static u8* get_jit_memory()
// Reserve 2G memory (magic static)
static void* const s_memory2 = []() -> void*
{
void* ptr = utils::memory_reserve(0x80000000);
void* ptr = utils::memory_reserve(0x80000000, true);
#ifdef CAN_OVERCOMMIT
utils::memory_commit(ptr, 0x80000000);
utils::memory_protect(ptr, 0x40000000, utils::protection::wx);
@@ -316,10 +316,10 @@ void jit_runtime::finalize() noexcept
#endif
// Reset JIT memory
#ifdef CAN_OVERCOMMIT
utils::memory_reset(get_jit_memory(), 0x80000000);
utils::memory_reset(get_jit_memory(), 0x80000000, true);
utils::memory_protect(get_jit_memory(), 0x40000000, utils::protection::wx);
#else
utils::memory_decommit(get_jit_memory(), 0x80000000);
utils::memory_decommit(get_jit_memory(), 0x80000000, true);
#endif
s_code_pos = 0;
@@ -348,7 +348,7 @@ jit_runtime_base& asmjit::get_global_runtime()
{
custom_runtime() noexcept
{
ensure(m_pos.raw() = static_cast<uchar*>(utils::memory_reserve(size)));
ensure(m_pos.raw() = static_cast<uchar*>(utils::memory_reserve(size, true)));
// Initialize "end" pointer
m_max = m_pos + size;
+120 -5
View File
@@ -12,6 +12,10 @@
#include <charconv>
#if defined(__APPLE__)
#include <pthread.h>
#endif
LOG_CHANNEL(jit_log, "JIT");
#ifdef LLVM_AVAILABLE
@@ -50,6 +54,44 @@ LOG_CHANNEL(jit_log, "JIT");
#include "Emu/CPU/Backends/AArch64/AArch64Common.h"
#endif
namespace
{
thread_local std::string* g_llvm_fatal_message = nullptr;
template <typename F>
bool run_recoverable_llvm(F&& func, std::string& error)
{
error.clear();
// Run LLVM codegen in a disposable thread. If LLVM invokes the fatal
// handler, only this helper thread exits.
named_thread worker("LLVM JIT", [&]()
{
#if defined(__APPLE__)
pthread_jit_write_protect_np(false);
#endif
g_llvm_fatal_message = &error;
std::forward<F>(func)();
g_llvm_fatal_message = nullptr;
#if defined(__APPLE__)
pthread_jit_write_protect_np(true);
#endif
});
worker();
const bool result = static_cast<thread_state>(worker) == thread_state::finished;
if (!result && error.empty())
{
error = "LLVM crash recovery invoked";
}
return result;
}
}
const bool jit_initialize = []() -> bool
{
llvm::InitializeNativeTarget();
@@ -199,7 +241,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
MemoryManager1(std::function<u64(const std::string&)> symbols_cement = {}) noexcept
: m_symbols_cement(std::move(symbols_cement))
{
auto ptr = reinterpret_cast<u8*>(utils::memory_reserve(c_max_size * 3));
auto ptr = reinterpret_cast<u8*>(utils::memory_reserve(c_max_size * 3, true));
m_code_mems = ptr;
// ptr += c_max_size;
// m_data_ro_mems = ptr;
@@ -218,7 +260,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
// utils::memory_decommit(m_code_mems, how_much(code_ptr));
// utils::memory_decommit(m_data_ro_mems, how_much(data_ro_ptr));
// utils::memory_decommit(m_data_rw_mems, how_much(data_rw_ptr));
utils::memory_decommit(m_code_mems, c_max_size * 3);
utils::memory_decommit(m_code_mems, c_max_size * 3, true);
}
llvm::JITSymbol findSymbol(const std::string& name) override
@@ -509,9 +551,9 @@ public:
}
};
std::string jit_compiler::cpu(const std::string& _cpu)
std::string jit_compiler::cpu(std::string_view _cpu)
{
std::string m_cpu = _cpu;
std::string m_cpu = std::string(_cpu);
if (m_cpu.empty())
{
@@ -639,7 +681,7 @@ bool jit_compiler::add_sub_disk_space(ssz space)
}).second;
}
jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, const std::string& _cpu, u32 flags, std::function<u64(const std::string&)> symbols_cement) noexcept
jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, std::string_view _cpu, u32 flags, std::function<u64(const std::string&)> symbols_cement) noexcept
: m_context(new llvm::LLVMContext)
, m_cpu(cpu(_cpu))
{
@@ -649,6 +691,13 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
llvm::install_fatal_error_handler([](void*, const char* msg, bool)
{
const std::string_view out = msg ? msg : "";
if (g_llvm_fatal_message)
{
*g_llvm_fatal_message = out;
thread_ctrl::silent_exit();
}
fmt::throw_exception("LLVM Emergency Exit Invoked: '%s'", out);
}, nullptr);
@@ -701,6 +750,15 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
else
attributes.push_back("-dotprod");
// The recompilers emit i8mm intrinsics (e.g. ummla) gated on utils::has_i8mm().
// The JIT target features must advertise i8mm too, otherwise the backend fails
// with "Cannot select: intrinsic %llvm.aarch64.neon.ummla" whenever the resolved
// -mcpu does not already imply it (e.g. the cortex-a78 fallback on Apple silicon).
if (utils::has_i8mm())
attributes.push_back("+i8mm");
else
attributes.push_back("-i8mm");
if (utils::has_sve())
attributes.push_back("+sve");
else
@@ -788,6 +846,33 @@ void jit_compiler::add(std::unique_ptr<llvm::Module> _module, const std::string&
}
}
bool jit_compiler::try_add(std::unique_ptr<llvm::Module> _module, const std::string& path, std::string& error)
{
ObjectCache cache{path, this};
m_engine->setObjectCache(&cache);
const auto ptr = _module.get();
m_engine->addModule(std::move(_module));
if (!run_recoverable_llvm([&]()
{
m_engine->generateCodeForModule(ptr);
}, error))
{
return false;
}
m_engine->setObjectCache(nullptr);
for (auto& func : ptr->functions())
{
// Delete IR to lower memory consumption
func.deleteBody();
}
return true;
}
void jit_compiler::add(std::unique_ptr<llvm::Module> _module)
{
const auto ptr = _module.get();
@@ -801,6 +886,28 @@ void jit_compiler::add(std::unique_ptr<llvm::Module> _module)
}
}
bool jit_compiler::try_add(std::unique_ptr<llvm::Module> _module, std::string& error)
{
const auto ptr = _module.get();
m_engine->addModule(std::move(_module));
if (!run_recoverable_llvm([&]()
{
m_engine->generateCodeForModule(ptr);
}, error))
{
return false;
}
for (auto& func : ptr->functions())
{
// Delete IR to lower memory consumption
func.deleteBody();
}
return true;
}
bool jit_compiler::add(const std::string& path)
{
auto cache = ObjectCache::load(path);
@@ -852,6 +959,14 @@ void jit_compiler::fin()
m_engine->finalizeObject();
}
bool jit_compiler::try_fin(std::string& error)
{
return run_recoverable_llvm([&]()
{
m_engine->finalizeObject();
}, error);
}
u64 jit_compiler::get(const std::string& name)
{
return m_engine->getGlobalValueAddress(name);
+18 -4
View File
@@ -16,12 +16,12 @@
#include <errno.h>
#endif
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4996)
#elif defined(__clang__)
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable : 4996)
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -630,6 +630,13 @@ namespace fmt
thread_ctrl::emergency_exit(out);
}
[[noreturn]] void raw_verify_error(std::source_location loc, std::source_location propagated_loc, const char8_t* msg, usz object)
{
std::string out;
fmt::append(out, "%s (object: 0x%x)%s%s", msg ? msg : u8"Verification failed", object, loc, propagated_loc);
thread_ctrl::emergency_exit(out);
}
[[noreturn]] void raw_range_error(std::source_location loc, std::string_view index, usz container_size)
{
std::string out;
@@ -921,6 +928,13 @@ std::string_view fmt::trim_front_sv(std::string_view source, std::string_view va
void fmt::trim_back(std::string& source, std::string_view values)
{
const usz index = source.find_last_not_of(values);
if (index == source.npos)
{
source.clear();
return;
}
source.resize(index + 1);
}
+5 -5
View File
@@ -23,19 +23,19 @@ inline void strcpy_trunc(D&& dst, const T& src)
}
// Convert string to signed integer
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max);
bool try_to_int64(s64* out, std::string_view value, s64 min, s64 max, std::string_view name = {});
// Convert string to unsigned integer
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max);
bool try_to_uint64(u64* out, std::string_view value, u64 min, u64 max, std::string_view name = {});
// Convert string to unsigned int128_t
bool try_to_uint128(u128* out, std::string_view value);
bool try_to_uint128(u128* out, std::string_view value, std::string_view name = {});
// Convert string to float
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max);
bool try_to_float(f64* out, std::string_view value, f64 min, f64 max, std::string_view name = {});
// Convert float to string locale independent
bool try_to_string(std::string* out, const f64& value);
bool try_to_string(std::string* out, f64 value, std::string_view name = {});
// Get the file extension of a file path ("png", "jpg", etc.)
std::string get_file_extension(const std::string& file_path);
+306 -44
View File
@@ -14,12 +14,18 @@
#include "Emu/CPU/Backends/AArch64/AArch64Signal.h"
#endif
#ifdef __cpp_lib_stacktrace
#include "rpcs3_version.h"
#include <stacktrace>
#endif
#ifdef _WIN32
#include <Windows.h>
#include <Psapi.h>
#include <process.h>
#include <sysinfoapi.h>
#include "stack_trace.h"
#include "util/dyn_lib.hpp"
DYNAMIC_IMPORT_RENAME("Kernel32.dll", SetThreadDescriptionImport, "SetThreadDescription", HRESULT(HANDLE hThread, PCWSTR lpThreadDescription));
@@ -102,7 +108,7 @@ thread_local u64 g_tls_fault_rsx = 0;
thread_local u64 g_tls_fault_spu = 0;
thread_local u64 g_tls_wait_time = 0;
thread_local u64 g_tls_wait_fail = 0;
thread_local bool g_tls_access_violation_recovered = false;
thread_local u64 g_tls_access_violation_recovered = umax;
extern thread_local std::string(*g_tls_log_prefix)();
namespace stx
@@ -1264,7 +1270,7 @@ namespace rsx
extern std::function<bool(u32 addr, bool is_writing)> g_access_violation_handler;
}
bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noexcept
bool handle_access_violation(u32 addr, bool is_writing, bool is_exec, ucontext_t* context) noexcept
{
g_tls_fault_all++;
@@ -1300,7 +1306,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
}
} spu_protection{cpu};
if (addr < RAW_SPU_BASE_ADDR && vm::check_addr(addr) && rsx::g_access_violation_handler)
if (!is_exec && addr < RAW_SPU_BASE_ADDR && vm::check_addr(addr) && rsx::g_access_violation_handler)
{
bool state_changed = false;
@@ -1366,7 +1372,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
{
auto thread = idm::get_unlocked<named_thread<spu_thread>>(spu_thread::find_raw_spu((addr - RAW_SPU_BASE_ADDR) / RAW_SPU_OFFSET));
if (!thread)
if (!thread || is_exec)
{
break;
}
@@ -1378,11 +1384,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
return false;
}
if (a_size != 4)
{
// Might be unimplemented, such as writing MFC proxy EAL+EAH using 64-bit store
break;
}
bool handled = true;
switch (op)
{
@@ -1392,14 +1394,37 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
case X64OP_LOAD_TEST:
{
u32 value;
if (is_writing || !thread->read_reg(addr, value))
const u32 addr_aligned = addr & -4;
if (addr % 4 + a_size > 4)
{
handled = false;
break;
}
if (is_writing || !thread->read_reg(addr_aligned, value))
{
return false;
}
// Adjust value for 8-bit and 16-bit reads
value >>= ((4 - a_size) * 8) - ((addr % 4) * 8);
value &= a_size == 4 ? u32{umax} : ((1u << (a_size * 8)) - 1);
if (op != X64OP_LOAD_BE)
{
value = stx::se_storage<u32>::swap(value);
if (a_size == 4)
{
value = stx::se_storage<u32>::swap(value);
}
else if (a_size == 2)
{
value = stx::se_storage<u16>::swap(value);
}
else
{
ensure(a_size == 1);
}
}
if (op == X64OP_LOAD_CMP)
@@ -1434,12 +1459,35 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
case X64OP_BEXTR:
{
u32 value;
if (is_writing || !thread->read_reg(addr, value))
const u32 addr_aligned = addr & -4;
if (addr % 4 + a_size > 4)
{
handled = false;
break;
}
if (is_writing || !thread->read_reg(addr_aligned, value))
{
return false;
}
value = stx::se_storage<u32>::swap(value);
// Adjust value for 8-bit and 16-bit reads
value >>= ((4 - a_size) * 8) - ((addr % 4) * 8);
value &= a_size == 4 ? u32{umax} : ((1u << (a_size * 8)) - 1);
if (a_size == 4)
{
value = stx::se_storage<u32>::swap(value);
}
else if (a_size == 2)
{
value = stx::se_storage<u16>::swap(value);
}
else
{
ensure(a_size == 1);
}
u64 ctrl;
if (!get_x64_reg_value(context, s_tls_reg3, d_size, i_size, ctrl))
@@ -1465,6 +1513,13 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
case X64OP_STORE:
case X64OP_STORE_BE:
{
if (a_size != 4)
{
// Might be unimplemented, such as writing MFC proxy EAL+EAH using 64-bit store
handled = false;
break;
}
u64 reg_value;
if (!is_writing || !get_x64_reg_value(context, reg, d_size, i_size, reg_value))
{
@@ -1483,12 +1538,19 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
case X64OP_STOS:
default:
{
sig_log.error("Invalid or unsupported operation (op=%d, reg=%d, d_size=%lld, i_size=%lld)", +op, +reg, d_size, i_size);
sig_log.error("Invalid or unsupported operation (op=%d, addr=0x%x, reg=%d, d_size=%lld, i_size=%lld, a_size=%d)", +op, addr, +reg, d_size, i_size, a_size);
report_opcode();
return false;
}
}
if (!handled)
{
sig_log.error("Invalid or unsupported operation (op=%d, addr=0x%x, reg=%d, d_size=%lld, i_size=%lld, a_size=%d)", +op, addr, +reg, d_size, i_size, a_size);
report_opcode();
break;
}
// skip processed instruction
RIP(context) += i_size;
g_tls_fault_spu++;
@@ -1498,7 +1560,9 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
static_cast<void>(context);
#endif /* ARCH_ */
if (vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable))
const auto required_page_perms = (is_writing ? vm::page_writable : vm::page_readable) + (is_exec ? vm::page_executable : 0);
if (vm::check_addr(addr, required_page_perms))
{
return true;
}
@@ -1506,9 +1570,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
// Hack: allocate memory in case the emulator is stopping
const auto hack_alloc = [&]()
{
g_tls_access_violation_recovered = true;
if (vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable))
if (vm::check_addr(addr, required_page_perms))
{
return true;
}
@@ -1520,17 +1582,45 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
return false;
}
extern void ppu_register_range(u32 addr, u32 size);
bool reprotected = false;
if (vm::writer_lock mlock; area->flags & vm::preallocated || vm::check_addr(addr, 0))
{
// For allocated memory with protection lower than required (such as protection::no or read-only while writing to it)
utils::memory_protect(vm::base(addr & -0x1000), 0x1000, utils::protection::rw);
reprotected = true;
}
if (reprotected)
{
if (is_exec && !vm::check_addr(addr, vm::page_executable))
{
ppu_register_range(addr & -0x10000, 0x10000);
}
g_tls_access_violation_recovered = addr;
return true;
}
return area->falloc(addr & -0x10000, 0x10000) || vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable);
const bool allocated = area->falloc(addr & -0x10000, 0x10000);
if (allocated)
{
if (is_exec && !vm::check_addr(addr, vm::page_executable))
{
ppu_register_range(addr & -0x10000, 0x10000);
}
g_tls_access_violation_recovered = addr;
return true;
}
return false;
};
if (cpu && (cpu->get_class() == thread_class::ppu || cpu->get_class() == thread_class::spu))
if (cpu && (cpu->get_class() == thread_class::ppu || cpu->get_class() == thread_class::spu) && !is_exec)
{
vm::temporary_unlock(*cpu);
u32 pf_port_id = 0;
@@ -1673,7 +1763,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
if (cpu->get_class() == thread_class::spu)
{
if (!g_tls_access_violation_recovered)
if (g_tls_access_violation_recovered != addr)
{
vm_log.notice("\n%s", dump_useful_thread_info());
vm_log.always()("[%s] Access violation %s location 0x%x (%s)", cpu->get_name(), is_writing ? "writing" : "reading", addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory");
@@ -1709,10 +1799,10 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
// Note: a thread may access violate more than once after hack_alloc recovery
// Do not log any further access violations in this case.
if (!g_tls_access_violation_recovered)
if (g_tls_access_violation_recovered != addr)
{
vm_log.notice("\n%s", dump_useful_thread_info());
vm_log.fatal("Access violation %s location 0x%x (%s)", is_writing ? "writing" : (cpu && cpu->get_class() == thread_class::ppu && cpu->get_pc() == addr ? "executing" : "reading"), addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory");
vm_log.fatal("Access violation %s location 0x%x (%s)", is_writing ? "writing" : (is_exec ? "executing" : "reading"), addr, (is_writing && vm::check_addr(addr)) ? "read-only memory" : "unmapped memory");
}
while (Emu.IsPausedOrReady())
@@ -1761,8 +1851,13 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
}
}
if (Emu.IsStopped() && !hack_alloc())
if (Emu.IsStopped())
{
while (!hack_alloc())
{
thread_ctrl::wait_for(1000);
}
return false;
}
@@ -1801,6 +1896,7 @@ static LONG exception_handler(PEXCEPTION_POINTERS pExp) noexcept
if (pExp->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && !is_executing)
{
u32 addr = 0;
bool is_exec = false;
if (auto [addr0, ok] = vm::try_get_addr(ptr); ok)
{
@@ -1808,14 +1904,21 @@ static LONG exception_handler(PEXCEPTION_POINTERS pExp) noexcept
}
else if (const usz exec64 = (ptr - vm::g_exec_addr) / 2; exec64 <= u32{umax})
{
is_exec = true;
addr = static_cast<u32>(exec64);
}
else
else if (const usz exec64 = (ptr - vm::g_exec_addr - vm::g_exec_addr_seg_offset); exec64 <= u32{umax})
{
is_exec = true;
addr = static_cast<u32>(exec64);
}
else
{
std::this_thread::sleep_for(1ms);
return EXCEPTION_CONTINUE_SEARCH;
}
if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, pExp->ContextRecord))
if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, is_exec, pExp->ContextRecord))
{
return EXCEPTION_CONTINUE_EXECUTION;
}
@@ -1935,9 +2038,39 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp) noexcept
}
fmt::append(msg, "RPCS3 image base: %p.\n", GetModuleHandle(NULL));
#if defined(ARCH_X64)
fmt::append(msg, "RAX: %016llX RBX: %016llX\n", pExp->ContextRecord->Rax, pExp->ContextRecord->Rbx);
fmt::append(msg, "RCX: %016llX RDX: %016llX\n", pExp->ContextRecord->Rcx, pExp->ContextRecord->Rdx);
fmt::append(msg, "RSI: %016llX RDI: %016llX\n", pExp->ContextRecord->Rsi, pExp->ContextRecord->Rdi);
fmt::append(msg, "RBP: %016llX RSP: %016llX\n", pExp->ContextRecord->Rbp, pExp->ContextRecord->Rsp);
fmt::append(msg, "R8: %016llX R9: %016llX\n", pExp->ContextRecord->R8, pExp->ContextRecord->R9);
fmt::append(msg, "R10: %016llX R11: %016llX\n", pExp->ContextRecord->R10, pExp->ContextRecord->R11);
fmt::append(msg, "R12: %016llX R13: %016llX\n", pExp->ContextRecord->R12, pExp->ContextRecord->R13);
fmt::append(msg, "R14: %016llX R15: %016llX\n", pExp->ContextRecord->R14, pExp->ContextRecord->R15);
fmt::append(msg, "RFLAGS: %08X\n", pExp->ContextRecord->EFlags);
#elif defined(ARCH_ARM64)
for (int i = 0; i < 29; i += 2)
{
if (i + 1 < 29)
fmt::append(msg, "X%-2d: %016llX X%-2d: %016llX\n", i, pExp->ContextRecord->X[i], i + 1, pExp->ContextRecord->X[i + 1]);
else
fmt::append(msg, "X%-2d: %016llX\n", i, pExp->ContextRecord->X[i]);
}
fmt::append(msg, "SP: %016llX FP: %016llX LR: %016llX\n", pExp->ContextRecord->Sp, pExp->ContextRecord->Fp, pExp->ContextRecord->Lr);
fmt::append(msg, "CPSR: %08X\n", pExp->ContextRecord->Cpsr);
#endif
// TODO: print registers and the callstack
const auto stack_trace = utils::get_backtrace(64, pExp->ContextRecord);
const auto stack_symbols = utils::get_backtrace_symbols(stack_trace);
msg += "Stack Trace:\n";
for (const auto& symbol : stack_symbols)
{
fmt::append(msg, "%s\n", symbol);
}
sys_log.fatal("\n%s", msg);
logs::listener::sync_all();
@@ -2022,12 +2155,13 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
#endif
const u64 exec64 = (reinterpret_cast<u64>(info->si_addr) - reinterpret_cast<u64>(vm::g_exec_addr)) / 2;
const u64 exec64_2 = (reinterpret_cast<u64>(info->si_addr) - reinterpret_cast<u64>(vm::g_exec_addr)) - vm::g_exec_addr_seg_offset;
const auto cause = is_executing ? "executing" : is_writing ? "writing" : "reading";
if (auto [addr, ok] = vm::try_get_addr(info->si_addr); ok && !is_executing)
{
// Try to process access violation
if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, context))
if (thread_ctrl::get_current() && handle_access_violation(addr, is_writing, false, context))
{
return;
}
@@ -2035,7 +2169,14 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
if (exec64 < 0x100000000ull && !is_executing)
{
if (thread_ctrl::get_current() && handle_access_violation(static_cast<u32>(exec64), is_writing, context))
if (thread_ctrl::get_current() && handle_access_violation(static_cast<u32>(exec64), is_writing, true, context))
{
return;
}
}
else if (exec64_2 < 0x100000000ull && !is_executing)
{
if (thread_ctrl::get_current() && handle_access_violation(static_cast<u32>(exec64_2), is_writing, true, context))
{
return;
}
@@ -2050,6 +2191,37 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
append_thread_name(msg);
#ifdef __APPLE__
thread_local bool s_tls_is_attempting_recovery = false;
thread_local bool s_tls_last_cause_is_executing = false;
if (reinterpret_cast<u64>(info->si_addr) < 0x10000)
{
// Do not recover from the virtual page of 0x0 (such as nullptr)
}
else if (is_executing || is_writing)
{
if (s_tls_is_attempting_recovery && s_tls_last_cause_is_executing != is_executing)
{
// Cause changed, inform recovery
s_tls_is_attempting_recovery = false;
}
if (!s_tls_is_attempting_recovery)
{
s_tls_last_cause_is_executing = is_executing;
s_tls_is_attempting_recovery = true;
pthread_jit_write_protect_np(is_executing ? true : false);
sys_log.error("\n%s", msg);
sys_log.notice("\n%s", dump_useful_thread_info());
sys_log.error("Attempting recovery using pthread_jit_write_protect_np()");
logs::listener::sync_all();
return;
}
}
#endif
sys_log.fatal("\n%s", msg);
sys_log.notice("\n%s", dump_useful_thread_info());
logs::listener::sync_all();
@@ -2165,6 +2337,7 @@ void thread_base::start()
ensure(::ResumeThread(reinterpret_cast<HANDLE>(+m_thread)) != static_cast<DWORD>(-1));
#elif defined(__APPLE__)
pthread_attr_t attrs;
pthread_t thread_id{};
struct sched_param sp;
memset(&sp, 0, sizeof(struct sched_param));
sp.sched_priority=99;
@@ -2174,20 +2347,43 @@ void thread_base::start()
pthread_attr_set_qos_class_np(&attrs, QOS_CLASS_USER_INTERACTIVE, 0);
pthread_attr_setschedpolicy(&attrs, SCHED_RR);
pthread_attr_setschedparam(&attrs, &sp);
ensure(pthread_create(reinterpret_cast<pthread_t*>(&m_thread.raw()), &attrs, entry_point, this) == 0);
ensure(pthread_create(&thread_id, &attrs, entry_point, this) == 0);
#else
ensure(pthread_create(reinterpret_cast<pthread_t*>(&m_thread.raw()), nullptr, entry_point, this) == 0);
pthread_t thread_id{};
ensure(pthread_create(&thread_id, nullptr, entry_point, this) == 0);
#endif
#ifndef _WIN32
// Update m_thread atomically
u64 dest_id = 0;
std::memcpy(&dest_id, &thread_id, sizeof(thread_id));
if (!m_thread && !m_thread.compare_and_swap_test(0, dest_id))
{
ensure(m_thread == dest_id);
}
#endif
}
void thread_base::initialize(void (*error_cb)())
{
#ifndef _WIN32
#ifdef ANDROID
m_thread.release(pthread_self());
#ifdef __APPLE__
while (!m_thread)
{
busy_wait();
}
[[maybe_unused]] u64 new_tid = 0;
#elif defined(ANDROID)
const u64 new_tid = pthread_self();
#else
m_thread.release(reinterpret_cast<u64>(pthread_self()));
const u64 new_tid = reinterpret_cast<u64>(pthread_self());
#endif
if (!m_thread && !m_thread.compare_and_swap_test(0, new_tid))
{
ensure(m_thread == new_tid);
}
#endif
// Initialize TLS variables
@@ -2354,7 +2550,7 @@ thread_base::native_entry thread_base::finalize(u64 _self) noexcept
g_tls_fault_spu = 0;
g_tls_wait_time = 0;
g_tls_wait_fail = 0;
g_tls_access_violation_recovered = false;
g_tls_access_violation_recovered = umax;
g_tls_log_prefix = []() -> std::string { return {}; };
@@ -2798,8 +2994,25 @@ void thread_base::exec()
}
}
void thread_ctrl::set_name(std::string name)
{
ensure(g_tls_this_thread);
g_tls_this_thread->m_tname.store(make_single<std::string>(name));
g_tls_this_thread->set_name(std::move(name));
}
[[noreturn]] void thread_ctrl::emergency_exit(std::string_view reason)
{
// Print stacktrace
#ifdef __cpp_lib_stacktrace
if (rpcs3::is_local_build())
{
std::ostringstream oss;
oss << std::stacktrace::current();
sys_log.notice("StackTrace\n\n%s\n", oss.str());
}
#endif
if (const std::string info = dump_useful_thread_info(); !info.empty())
{
sys_log.notice("\n%s", info);
@@ -2815,6 +3028,16 @@ void thread_base::exec()
}
}
if (auto [total, current] = utils::get_memory_usage(); total - current <= 256 * 1024 * 1024)
{
if (reason_buf.empty())
{
reason_buf = std::string{reason};
}
fmt::append(reason_buf, " (Possible RAM deficiency: free RAM: %dMB)", (total - current) / (1024 * 1024));
}
if (!reason_buf.empty())
{
reason = reason_buf;
@@ -2848,7 +3071,9 @@ void thread_base::exec()
return false;
}).second)
{
#ifndef __APPLE__
utils::trap();
#endif
}
}
@@ -2876,6 +3101,32 @@ void thread_base::exec()
report_fatal_error(reason);
}
void thread_ctrl::silent_exit() noexcept
{
if (const auto _this = g_tls_this_thread)
{
g_tls_error_callback();
u64 _self = _this->finalize(thread_state::errored);
if (_self == umax)
{
// Unused, detached thread support remnant
delete _this;
}
thread_base::finalize(umax);
}
#ifdef _WIN32
_endthreadex(0);
#else
pthread_exit(nullptr);
#endif
std::abort();
}
void thread_ctrl::detect_cpu_layout()
{
if (!g_native_core_layout.compare_and_swap_test(native_core_arrangement::undefined, native_core_arrangement::generic))
@@ -3333,15 +3584,26 @@ std::pair<void*, usz> thread_ctrl::get_thread_stack()
u64 thread_ctrl::get_tid()
{
#ifdef _WIN32
return GetCurrentThreadId();
#elif defined(ANDROID)
return static_cast<u64>(pthread_self());
#elif defined(__linux__)
return syscall(SYS_gettid);
#else
return reinterpret_cast<u64>(pthread_self());
#endif
static thread_local u64 s_tls_tid = []() -> u64
{
#ifdef _WIN32
return GetCurrentThreadId();
#elif defined(ANDROID)
return pthread_gettid_np(pthread_self());
#elif defined(__linux__)
return syscall(SYS_gettid);
#elif defined(__APPLE__)
u64 tid{};
pthread_threadid_np(nullptr, &tid);
return tid;
#elif defined(__FreeBSD__)
return pthread_getthreadid_np();
#else
return static_cast<u64>(pthread_self());
#endif
}();
return s_tls_tid;
}
bool thread_ctrl::is_main()
+10 -12
View File
@@ -129,7 +129,7 @@ public:
const native_entry entry_point;
// Set name for debugger
static void set_name(std::string);
static void set_name(std::string name);
private:
// Thread handle (platform-specific)
@@ -232,11 +232,7 @@ public:
}
// Set current thread name (not recommended)
static void set_name(std::string name)
{
g_tls_this_thread->m_tname.store(make_single<std::string>(name));
g_tls_this_thread->set_name(std::move(name));
}
static void set_name(std::string name);
// Set thread name (not recommended)
template <typename T>
@@ -319,6 +315,9 @@ public:
// Exit.
[[noreturn]] static void emergency_exit(std::string_view reason);
// Exit the current named thread as errored without reporting a fatal error.
[[noreturn]] static void silent_exit() noexcept;
// Get current thread (may be nullptr)
static thread_base* get_current()
{
@@ -801,31 +800,30 @@ public:
m_count = 0;
// Create all threads
for (u32 i = 0; i < count - 1; i++)
for (; m_count < count - 1; m_count++)
{
// Copy the context
std::remove_cvref_t<Context> context(static_cast<const Context&>(f));
// Perform the check and additional preparations for each context
if (!std::invoke(std::forward<CheckAndPrepare>(check), i, context))
if (!std::invoke(std::forward<CheckAndPrepare>(check), m_count, context))
{
return;
}
m_count++;
new (static_cast<void*>(m_threads + i)) Thread(std::string(name) + std::to_string(i + 1), std::move(context));
new (static_cast<void*>(m_threads + m_count)) Thread(std::string(name) + std::to_string(m_count + 1), std::move(context));
}
// Move the context (if movable)
std::remove_cvref_t<Context> context(std::forward<Context>(f));
if (!std::invoke(std::forward<CheckAndPrepare>(check), m_count - 1, context))
if (!std::invoke(std::forward<CheckAndPrepare>(check), m_count, context))
{
return;
}
new (static_cast<void*>(m_threads + m_count)) Thread(std::string(name) + std::to_string(m_count + 1), std::move(context));
m_count++;
new (static_cast<void*>(m_threads + m_count - 1)) Thread(std::string(name) + std::to_string(m_count - 1), std::move(context));
}
// Default constructor
+4 -4
View File
@@ -29,7 +29,7 @@ void fmt_class_string<cheat_type>::format(std::string& out, u64 arg)
bool cheat_info::from_str(std::string_view cheat_line)
{
const auto cheat_vec = fmt::split(cheat_line, {"@@@"}, false);
auto cheat_vec = fmt::split(cheat_line, {"@@@"}, false);
s64 val64 = 0;
if (cheat_vec.size() != 5 || !try_to_int64(&val64, cheat_vec[2], 0, cheat_type_max - 1))
@@ -38,11 +38,11 @@ bool cheat_info::from_str(std::string_view cheat_line)
return false;
}
game = cheat_vec[0];
description = cheat_vec[1];
game = std::move(cheat_vec[0]);
description = std::move(cheat_vec[1]);
type = cheat_type{::narrow<u8>(val64)};
offset = std::stoul(cheat_vec[3]);
red_script = cheat_vec[4];
red_script = std::move(cheat_vec[4]);
return true;
}
+4
View File
@@ -1,5 +1,6 @@
#pragma once
#include <array>
#include <cmath>
#include <type_traits>
@@ -1027,3 +1028,6 @@ using color1u = color1_base<unsigned int>;
using color1i = color1_base<int>;
using color1f = color1_base<float>;
using color1d = color1_base<double>;
using mat3f = color3_base<float>[3];
static_assert(sizeof(mat3f) == sizeof(float) * 3 * 3);
+13
View File
@@ -10,6 +10,19 @@ rXmlNode::rXmlNode(const pugi::xml_node& node)
handle = node;
}
std::shared_ptr<rXmlNode> rXmlNode::GetChild(std::string_view name)
{
if (handle)
{
if (const pugi::xml_node child = handle.child(name))
{
return std::make_shared<rXmlNode>(child);
}
}
return nullptr;
}
std::shared_ptr<rXmlNode> rXmlNode::GetChildren()
{
if (handle)
+1
View File
@@ -20,6 +20,7 @@ struct rXmlNode
{
rXmlNode();
rXmlNode(const pugi::xml_node& node);
std::shared_ptr<rXmlNode> GetChild(std::string_view name);
std::shared_ptr<rXmlNode> GetChildren();
std::shared_ptr<rXmlNode> GetNext();
std::string GetName();
+7 -1
View File
@@ -41,7 +41,13 @@ void semaphore_base::imp_wait()
// Add waiter
value += c_waiter;
}
});
else
{
return false;
}
return true;
}).first;
if (value & c_value_mask)
{
+35 -16
View File
@@ -30,42 +30,61 @@ namespace utils
return out.data();
}
std::vector<void*> get_backtrace(int max_depth)
std::vector<void*> get_backtrace(int max_depth, PCONTEXT ctx)
{
static struct sym_initer_t
{
sym_initer_t() noexcept
{
SymInitialize(GetCurrentProcess(), NULL, TRUE);
}
~sym_initer_t() noexcept
{
SymCleanup(GetCurrentProcess());
}
} s_initer{};
std::vector<void*> result = {};
const auto hProcess = ::GetCurrentProcess();
const auto hThread = ::GetCurrentThread();
CONTEXT context{};
RtlCaptureContext(&context);
if (ctx)
context = *ctx;
else
RtlCaptureContext(&context);
STACKFRAME64 stack = {};
stack.AddrPC.Mode = AddrModeFlat;
stack.AddrStack.Mode = AddrModeFlat;
stack.AddrFrame.Mode = AddrModeFlat;
#if defined(ARCH_X64)
const DWORD machineType = IMAGE_FILE_MACHINE_AMD64;
stack.AddrPC.Offset = context.Rip;
stack.AddrStack.Offset = context.Rsp;
stack.AddrFrame.Offset = context.Rbp;
#elif defined(ARCH_ARM64)
const DWORD machineType = IMAGE_FILE_MACHINE_ARM64;
stack.AddrPC.Offset = context.Pc;
stack.AddrStack.Offset = context.Sp;
stack.AddrFrame.Offset = context.Fp;
#else
#error "Unsupported architecture"
#endif
while (max_depth--)
{
if (!StackWalk64(
IMAGE_FILE_MACHINE_AMD64,
hProcess,
hThread,
&stack,
&context,
NULL,
SymFunctionTableAccess64,
SymGetModuleBase64,
NULL))
machineType,
hProcess,
hThread,
&stack,
&context,
NULL,
SymFunctionTableAccess64,
SymGetModuleBase64,
NULL))
{
break;
}
@@ -100,23 +119,23 @@ namespace utils
if (sym->NameLen)
{
const auto function_name = wstr_to_utf8(sym->Name, static_cast<int>(sym->NameLen));
std::string function_name = wstr_to_utf8(sym->Name, static_cast<int>(sym->NameLen));
// Attempt to get file and line information if available
DWORD unused2;
if (SymGetLineFromAddrW64(hProcess, reinterpret_cast<DWORD64>(pointer), &unused2, &line_info))
{
const auto full_path = fmt::format("%s:%u %s", wstr_to_utf8(line_info.FileName, -1), line_info.LineNumber, function_name);
result.push_back(full_path);
std::string full_path = fmt::format("%s:%u %s", wstr_to_utf8(line_info.FileName, -1), line_info.LineNumber, function_name);
result.push_back(std::move(full_path));
}
else
{
result.push_back(function_name);
result.push_back(std::move(function_name));
}
}
else
{
result.push_back(fmt::format("rpcs3@0xp", pointer));
result.push_back(fmt::format("rpcs3@0x%p", pointer));
}
}
+12 -2
View File
@@ -2,6 +2,11 @@
#include <util/types.hpp>
#include <util/logs.hpp>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
namespace utils
{
namespace stack_trace
@@ -9,7 +14,7 @@ namespace utils
// Printing utilities
template <typename T>
concept Logger = requires (T& t, const std::string& msg)
concept Logger = requires (T& t, std::string_view msg)
{
{ t.print(msg) };
};
@@ -23,14 +28,19 @@ namespace utils
: log(chan)
{}
void print(const std::string& s)
void print(std::string_view s)
{
log.error("%s", s);
}
};
}
#ifdef _WIN32
std::vector<void*> get_backtrace(int max_depth = 255, PCONTEXT ctx = nullptr);
#else
std::vector<void*> get_backtrace(int max_depth = 255);
#endif
std::vector<std::string> get_backtrace_symbols(const std::vector<void*>& stack);
FORCE_INLINE void print_trace(stack_trace::Logger auto& logger, int max_depth = 255)
+159
View File
@@ -0,0 +1,159 @@
#include "stdafx.h"
#include "stereo_config.h"
#include "Emu/system_config.h"
stereo_config::stereo_matrices::stereo_matrices(const std::array<color3_base<f32>, 3>& l, const std::array<color3_base<f32>, 3>& r)
{
for (usz i = 0; i < 3; i++)
{
left[i] = l[i];
right[i] = r[i];
}
}
atomic_t<bool> stereo_config::s_live_preview_enabled = false;
stereo_config::stereo_matrices stereo_config::m_live_matrices = {};
const std::unordered_map<stereo_render_mode_options, stereo_config::stereo_matrices> stereo_config::m_matrices =
{
{stereo_render_mode_options::anaglyph_red_cyan, stereo_matrices(
{
color3_base<f32>(1, 0, 0),
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 0, 0)
},
{
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 1, 0),
color3_base<f32>(0, 0, 1)
}
)},
{stereo_render_mode_options::anaglyph_red_green, stereo_matrices(
{
color3_base<f32>(1, 0, 0),
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 0, 0)
},
{
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 1, 0),
color3_base<f32>(0, 0, 0)
}
)},
{stereo_render_mode_options::anaglyph_red_blue, stereo_matrices(
{
color3_base<f32>(1, 0, 0),
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 0, 0)
},
{
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 0, 1)
}
)},
{stereo_render_mode_options::anaglyph_magenta_cyan, stereo_matrices(
{
color3_base<f32>(1, 0, 0),
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 0, 0.5f)
},
{
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 1, 0),
color3_base<f32>(0, 0, 0.5f)
}
)},
{stereo_render_mode_options::anaglyph_trioscopic, stereo_matrices(
{
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 1, 0),
color3_base<f32>(0, 0, 0)
},
{
color3_base<f32>(1, 0, 0),
color3_base<f32>(0, 0, 0),
color3_base<f32>(0, 0, 1)
}
)},
{stereo_render_mode_options::anaglyph_amber_blue, stereo_matrices(
{
color3_base<f32>(1, 0, 0),
color3_base<f32>(0, 1, 0),
color3_base<f32>(0, 0, 0)
},
{
color3_base<f32>(0, 0, 1.0f / 3.0f),
color3_base<f32>(0, 0, 1.0f / 3.0f),
color3_base<f32>(0, 0, 1.0f / 3.0f)
}
)},
};
void stereo_config::update_from_config(bool stereo_enabled)
{
m_stereo_mode = stereo_enabled ? g_cfg.video.stereo_render_mode.get() : stereo_render_mode_options::disabled;
if (m_stereo_mode == stereo_render_mode_options::anaglyph_custom)
{
stereo_config::convert_matrix(m_custom_matrices.left, g_cfg.video.custom_anaglyph_matrices.left.get_map());
stereo_config::convert_matrix(m_custom_matrices.right, g_cfg.video.custom_anaglyph_matrices.right.get_map());
}
}
const stereo_config::stereo_matrices& stereo_config::matrices() const
{
if (m_in_emulation && s_live_preview_enabled)
{
return m_live_matrices;
}
switch (m_stereo_mode)
{
case stereo_render_mode_options::disabled:
case stereo_render_mode_options::side_by_side:
case stereo_render_mode_options::over_under:
case stereo_render_mode_options::interlaced:
break;
case stereo_render_mode_options::anaglyph_red_green:
case stereo_render_mode_options::anaglyph_red_blue:
case stereo_render_mode_options::anaglyph_red_cyan:
case stereo_render_mode_options::anaglyph_magenta_cyan:
case stereo_render_mode_options::anaglyph_trioscopic:
case stereo_render_mode_options::anaglyph_amber_blue:
return ::at32(m_matrices, m_stereo_mode);
case stereo_render_mode_options::anaglyph_custom:
return m_custom_matrices;
}
static const stereo_matrices s_left_only_matrices = stereo_matrices(
{
color3_base<float>(1, 0, 0),
color3_base<float>(0, 1, 0),
color3_base<float>(0, 0, 1)
},
{
color3_base<float>(0, 0, 0),
color3_base<float>(0, 0, 0),
color3_base<float>(0, 0, 0)
});
return s_left_only_matrices;
}
std::map<std::string, std::string> stereo_config::get_custom_matrix(bool is_left) const
{
return convert_matrix(is_left ? m_custom_matrices.left : m_custom_matrices.right);
}
std::map<std::string, std::string> stereo_config::convert_matrix(const mat3f& mat)
{
std::map<std::string, std::string> values {};
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
values[fmt::format("%d%d", i, j)] = fmt::format("%f", mat[i].rgb[j]);
}
}
return values;
}
+79
View File
@@ -0,0 +1,79 @@
#pragma once
#include "geometry.h"
#include "Emu/system_config_types.h"
#include "util/atomic.hpp"
#include "Utilities/StrFmt.h"
#include "Utilities/StrUtil.h"
#include <map>
#include <mutex>
struct stereo_config
{
public:
struct stereo_matrices
{
stereo_matrices() = default;
stereo_matrices(const std::array<color3_base<f32>, 3>& l, const std::array<color3_base<f32>, 3>& r);
mat3f left {};
mat3f right {};
};
stereo_config(bool in_emulation) : m_in_emulation(in_emulation) {}
void set_stereo_mode(stereo_render_mode_options mode) { m_stereo_mode = mode; }
stereo_render_mode_options stereo_mode() const { return m_stereo_mode; }
const stereo_matrices& matrices() const;
void update_from_config(bool stereo_enabled);
void set_custom_matrices(const stereo_matrices& matrices) { m_custom_matrices = matrices; }
static void set_live_matrices(const stereo_matrices& matrices) { m_live_matrices = matrices; }
std::map<std::string, std::string> get_custom_matrix(bool is_left) const;
template <typename T>
static void convert_matrix(mat3f& mat, const T& values)
{
mat[0] = {};
mat[1] = {};
mat[2] = {};
if (values.empty())
{
return;
}
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
const std::string key = fmt::format("%d%d", i, j);
const auto it = values.find(key);
if (it == values.cend()) continue;
const std::string& val_s = it->second;
if (val_s.empty()) continue;
if (f64 val = 0.0f; try_to_float(&val, val_s, -10.0f, 10.0f))
{
mat[i].rgb[j] = static_cast<f32>(val);
}
}
}
}
static std::map<std::string, std::string> convert_matrix(const mat3f& mat);
static atomic_t<bool> s_live_preview_enabled;
private:
stereo_matrices m_custom_matrices {};
stereo_render_mode_options m_stereo_mode = stereo_render_mode_options::disabled;
bool m_in_emulation = false;
static stereo_matrices m_live_matrices;
static const std::unordered_map<stereo_render_mode_options, stereo_matrices> m_matrices;
};
+1 -1
View File
@@ -74,7 +74,7 @@ enum
};
#endif
inline int futex(volatile void* uaddr, int futex_op, uint val, const timespec* timeout = nullptr, uint mask = 0)
inline int futex(volatile void* uaddr, int futex_op, uint val, const timespec* timeout = nullptr, [[maybe_unused]] uint mask = 0)
{
#ifdef __linux__
return syscall(SYS_futex, uaddr, futex_op, static_cast<int>(val), timeout, nullptr, static_cast<int>(mask));
+1 -1
View File
@@ -33,7 +33,7 @@ public:
std::lock_guard lock(mutex);
if (std::shared_ptr<void> new_val = std::invoke(func); new_val)
{
storage.push_back(new_val);
storage.push_back(std::move(new_val));
}
delete_unused();
}
+7 -9
View File
@@ -24,29 +24,27 @@ namespace utils
return (m_hi << 24) | (m_mid << 16) | (m_lo << 8) | ((uint(m_type) & 0xf) << 4) | (m_type_index & 0xf);
}
std::string version::to_string() const
std::string version::to_string(bool simple) const
{
std::string version = std::to_string(hi()) + "." + std::to_string(mid());
std::string version = fmt::format("%d.%d", hi(), mid());
if (lo())
{
version += '.';
version += std::to_string(lo());
fmt::append(version, ".%d", lo());
}
if (type() != version_type::release)
if (!simple && type() != version_type::release)
{
if (!postfix().empty())
{
version += "-" + postfix();
fmt::append(version, "-%s", postfix());
}
version += ' ';
version += utils::to_string(type());
fmt::append(version, " %s", utils::to_string(type()));
if (type_index() > 1)
{
version += " " + std::to_string(type_index());
fmt::append(version, " %d", type_index());
}
}
+4 -4
View File
@@ -23,10 +23,10 @@ namespace utils
uint m_lo;
version_type m_type = version_type::release;
uint m_type_index = 1;
const char* m_postfix;
std::string_view m_postfix;
public:
constexpr version(uint hi, uint mid, uint lo, version_type type, uint type_index, const char* postfix)
constexpr version(uint hi, uint mid, uint lo, version_type type, uint type_index, std::string_view postfix)
: m_hi(hi)
, m_mid(mid)
, m_lo(lo)
@@ -56,7 +56,7 @@ namespace utils
return m_type;
}
std::string postfix() const
std::string_view postfix() const
{
return m_postfix;
}
@@ -67,7 +67,7 @@ namespace utils
}
uint to_hex() const;
std::string to_string() const;
std::string to_string(bool simple = false) const;
};
// Generic version comparison (e.g. 0.0.5 vs 1.3)
-4
View File
@@ -37,10 +37,6 @@ QSlider#sizeSlider::handle:horizontal {
QLabel#toolbar_icon_color {
color: rgba(64,64,64,255);
}
/* thumbnail icon color stylesheet */
QLabel#thumbnail_icon_color {
color: rgba(0,100,231,255);
}
/* gamelist icon color stylesheet */
QLabel#gamelist_icon_background_color {
color: rgba(209,209,209,255);
@@ -237,11 +237,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #262626;
}
/* Set Log colors */
QPlainTextEdit#log_frame {
background-color: #000; /* Black */
-5
View File
@@ -573,11 +573,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #23262d;
}
/* Log colors */
QPlainTextEdit#log_frame {
background-color: #23262d;
-5
View File
@@ -265,11 +265,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #444444;
}
/* Memory Viewer */
QLabel#memory_viewer_address_panel {
color: #00cbff; /* Font Color: Blue */
@@ -244,11 +244,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #262626;
}
/* Set Log colors */
QPlainTextEdit#log_frame {
background-color: #181d24; /* Black */
@@ -397,12 +397,6 @@ QLabel#gamelist_icon_background_color {
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #ffd785;
}
QLabel#log_level_always {
color: #00ffff; /* Cyan */
}
-5
View File
@@ -656,11 +656,6 @@ QLabel#color_button {
background: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #370048;
}
/* Debugger colors */
QLabel#debugger_frame_breakpoint {
color: #000; /* Font Color: Black */
-5
View File
@@ -664,11 +664,6 @@ QLabel#color_button {
background: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #8500ae;
}
/* Debugger colors */
QLabel#debugger_frame_breakpoint {
color: #000; /* Font Color: Black */
@@ -349,24 +349,24 @@ QPushButton:disabled {
}
QDialog QDialogButtonBox QPushButton {
QDialog QDialogButtonBox QPushButton:default {
color: #000000;
background-color: #4CC2FF;
border-color: #5AC7FF;
}
QDialog QDialogButtonBox QPushButton:hover {
QDialog QDialogButtonBox QPushButton:default:hover {
background-color: #48B2E9;
border-color: #56B8EB;
}
QDialog QDialogButtonBox QPushButton:pressed {
QDialog QDialogButtonBox QPushButton:default:pressed {
color: #22526A;
background-color: #45A4D5;
border-color: #45A4D5;
}
QDialog QDialogButtonBox QPushButton:disabled {
QDialog QDialogButtonBox QPushButton:default:disabled {
color: #ABABAB;
background-color: #4C4C4C;
border-color: #4C4C4C;
@@ -614,10 +614,15 @@ QComboBox QAbstractItemView {
QComboBox QAbstractItemView::item {
color: #FFFFFF;
padding: 4px 6px;
margin: 2px 0px;
background-color: transparent;
border-radius: 4px;
}
QComboBox QAbstractItemView::item:hover {
background-color: #383838;
}
QComboBox QAbstractItemView::item:selected {
background-color: #383838;
}
@@ -642,7 +647,7 @@ QDoubleSpinBox::up-button, QDoubleSpinBox::down-button {
border-radius: 4px;
width: 8px;
height: 8px;
padding: 3px 4px;
padding: 3px 4px;
}
QSpinBox::up-button:hover, QSpinBox::down-button:hover,
@@ -709,6 +714,16 @@ QSlider::handle:horizontal:disabled {
image: url("GuiConfigs/dark/slider-handle-disabled.svg");
}
QSlider::sub-page:horizontal {
background-color: #4CC2FF;
border-radius: 2px;
height: 4px;
}
QSlider::sub-page:horizontal:disabled {
background-color: #767A7D;
}
/* LINE EDIT */
QLineEdit {
@@ -791,7 +806,7 @@ QMenuBar::item:pressed {
QMenu {
background-color: #2C2C2C;
border: 1px solid #131313;
border: 1px solid #3E3E3E;
padding: 4px 0px;
}
@@ -799,12 +814,12 @@ QMenu::item {
color: #FFFFFF;
background-color: transparent;
border-radius: 4px;
padding: 8px 20px;
padding: 4px 20px;
margin: 0px 4px;
}
QMenu::item:selected {
background-color: #383838;
background-color: #353535;
}
QMenu::item:disabled {
@@ -814,8 +829,8 @@ QMenu::item:disabled {
QMenu::separator {
height: 1px;
background: #131313;
margin: 4px 0px;
background: #3E3E3E;
margin: 4px 8px;
}
QMenu::indicator, QMenu::right-arrow {
@@ -349,24 +349,24 @@ QPushButton:disabled {
}
QDialog QDialogButtonBox QPushButton {
QDialog QDialogButtonBox QPushButton:default {
color: #FFFFFF;
background-color: #0067C0;
border-color: #1473C5;
}
QDialog QDialogButtonBox QPushButton:hover {
QDialog QDialogButtonBox QPushButton:default:hover {
background-color: #1A76C6;
border-color: #2C80CA;
}
QDialog QDialogButtonBox QPushButton:pressed {
QDialog QDialogButtonBox QPushButton:default:pressed {
color: #C2DAEF;
background-color: #3284CB;
border-color: #3284CB;
}
QDialog QDialogButtonBox QPushButton:disabled {
QDialog QDialogButtonBox QPushButton:default:disabled {
color: #FFFFFF;
background-color: #C5C5C5;
border-color: #C5C5C5;
@@ -614,10 +614,15 @@ QComboBox QAbstractItemView {
QComboBox QAbstractItemView::item {
color: #1B1B1B;
padding: 4px 6px;
margin: 2px 0px;
background-color: transparent;
border-radius: 4px;
}
QComboBox QAbstractItemView::item:hover {
background-color: #F0F0F0;
}
QComboBox QAbstractItemView::item:selected {
background-color: #F0F0F0;
}
@@ -642,7 +647,7 @@ QDoubleSpinBox::up-button, QDoubleSpinBox::down-button {
border-radius: 4px;
width: 8px;
height: 8px;
padding: 3px 4px;
padding: 3px 4px;
}
QSpinBox::up-button:hover, QSpinBox::down-button:hover,
@@ -709,6 +714,16 @@ QSlider::handle:horizontal:disabled {
image: url("GuiConfigs/light/slider-handle-disabled.svg");
}
QSlider::sub-page:horizontal {
background-color: #1A76C6;
border-radius: 2px;
height: 4px;
}
QSlider::sub-page:horizontal:disabled {
background-color: #868788;
}
/* LINE EDIT */
QLineEdit {
@@ -791,7 +806,7 @@ QMenuBar::item:pressed {
QMenu {
background-color: #F9F9F9;
border: 1px solid #EEEEEE;
border: 1px solid #E5E5E5;
padding: 4px 0px;
}
@@ -799,7 +814,7 @@ QMenu::item {
color: #1B1B1B;
background-color: transparent;
border-radius: 4px;
padding: 8px 20px;
padding: 4px 20px;
margin: 0px 4px;
}
@@ -814,8 +829,8 @@ QMenu::item:disabled {
QMenu::separator {
height: 1px;
background: #EEEEEE;
margin: 4px 0px;
background: #E5E5E5;
margin: 4px 8px;
}
QMenu::indicator, QMenu::right-arrow {
-5
View File
@@ -379,11 +379,6 @@ QLabel#gamelist_icon_background_color {
color: transparent;
}
/* Set Windows Taskbar Thumbnail colors */
QLabel#thumbnail_icon_color {
color: #4d4940;
}
QLabel#log_level_always {
color: #00ffff; /* Cyan */
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 999 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Some files were not shown because too many files have changed in this diff Show More