Compare commits

..
1152 Commits
Author SHA1 Message Date
Frog Business 2ba2f75bce Wiimote to GunCon3 (#18154)
So I could play Deadstorm Pirates 2 players with DolphinBar + 2 Wiimotes
99% of this is AI assisted development.
I reviewed the code and the functionality.
- There is this logic where you might find it weird.
It maps first available player with GunCon3 to slot 0.
So if you have P4:G and P6:G, you'll have P4:0, P6:1
This is intentional because I couldn't figure out why P2 is reserved and
I needed to map to P1 and P2.
- Has a GUI so you can see your Wiimotes and remap them.
- Enabling PS Move cursor overlay will also show GunCon3 IRs on the
screen.

### NOTE

On Linux you'll need udev rules (same as Dolphin) for this to work. 
Put [THIS
FILE](https://github.com/dolphin-emu/dolphin/blob/master/Data/51-usb-device.rules)
in `/etc/udev/rules.d/`
2026-10-11 10:01:57 +00:00
Megamouse 26098fb42d Qt: Always detect app icon based on emulator variables 2026-10-11 10:56:06 +02:00
Sean Brar d1d0cbccea Savestates: Fix saving in-memory file descriptors 2026-10-11 09:55:22 +03:00
yahfz 7b4de2f13d PPU Loader: Skip ppc_seg mapping during virtual loads 2026-10-11 01:42:04 +03:00
Der_Floh dfc486fc6b Skylanders Portal IPC Server 2026-10-10 19:58:42 +00:00
izcarti 6a900d00e6 PPU Interpreter: Fix VSCR element in MFVSCR and MTVSCR
VSCR is the last big-endian word, stored in _u32[0], as the LLVM recompiler uses.
2026-10-10 22:32:11 +03:00
izcarti 31bd702e39 PPU: Add accurate vector estimates option
vrefp and vrsqrtefp are hardware exact only when enabled.
vexptefp and vlogefp are now exact by default.
2026-10-10 22:06:19 +03:00
izcarti 63ad856afa PPU LLVM: Estimate a whole vector per call 2026-10-10 22:06:19 +03:00
izcarti cb450d7e8f PPU: Hardware exact VMX estimates
vrefp, vrsqrtefp, vexptefp and vlogefp return the Cell's estimates instead
of exact results, matched bit for bit against a real PS3 with VSCR[NJ] set
and clear.
2026-10-10 22:06:19 +03:00
Max Gautier 68e0d6021c Include udev/devd rules in Linux/FreeBSD install
This allows RPCS3 to communicate with Dualshock 3,4 and DualSense
controller out of the box on Linux distributions and FreeBSD, without
the need for manual actions.
2026-10-10 19:56:54 +03:00
digant73andClaude Opus 5.5 10adf2ec39 rsx: Split the vertex interpreter source into two string literals
The single raw string literal exceeded the MSVC string literal size limit
(error C2026: string too big, trailing characters truncated).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-10 18:41:28 +03:00
Megamouse 987129bc91 Fix some warnings 2026-10-10 12:32:17 +02:00
Megamouse b195c2ff1b cellMusicDecode: fix deadlock and make members private 2026-10-10 12:32:17 +02:00
Malcolm f9b8c209a3 BufferUtils: Address reviews
-drop iota16, remove avx2 check, better reduction
2026-10-10 12:40:20 +03:00
Malcolm cd4d4e02ec BufferUtils: Optimize restart removal with SVE and SVE2.2 2026-10-10 12:40:20 +03:00
Malcolm d21c0d808d BufferUtils: Add table-based NEON and AVX2 compaction 2026-10-10 12:40:20 +03:00
Malcolm 52343fa2f3 BufferUtils: Add native NEON upload paths 2026-10-10 12:40:20 +03:00
Antonino Di Guardo ff91404b7c Qt: Fix race condition in qt_video_source_wrapper (#19774) 2026-10-10 08:15:18 +00:00
kd-11 e38d27157e rsx/vk: Implement rendering using no attachments 2026-10-10 10:30:35 +03:00
kd-11 0be621eb62 vk: Add support for attachment-less renderpasses 2026-10-10 10:30:35 +03:00
kd-11 78f27eaad6 rsx: Skip framebufferless draws if we have no side-effects 2026-10-10 10:30:35 +03:00
kd-11 66ba732829 rsx/gl: Implement support for framebuffer-less rendering 2026-10-10 10:30:35 +03:00
Liam 8f2fe1a99c rsx: Emulate float depth range on hosts without extended depth range support 2026-10-09 15:43:15 +00:00
kd-11 0be6d12140 vk: Remove outdated warning message about D16F being unsupported 2026-10-09 12:38:31 +03:00
kd-11 d6295528d7 rsx: Ensure F32->D24 conversions correctly round to nearest to match real hardware 2026-10-09 12:38:31 +03:00
kd-11 510f4c243e rsx: Fix depth_bounds range computation 2026-10-09 12:38:31 +03:00
kd-11 ffa4c71088 rsx: Fix DEPTH_FLOAT decoding for clear values 2026-10-09 12:38:31 +03:00
kd-11 5e89a0061e rsx: Update D16F pack/unpack logic to match hardware tests
- The format is insane. Bias is 16, not 7
- This means values outside [0,1] are impossible to encode
2026-10-09 12:38:31 +03:00
kd-11 b26e0cfa91 vk: Pause the driver manager routine when capturing media
- These are out-of-band events and should not be treated as 'real' sync points.
2026-10-09 12:38:31 +03:00
kd-11 33b2958da5 gl: Fixes for depth format upload and download 2026-10-09 12:38:31 +03:00
kd-11 cfd03fc026 vk: Fix edge cases in DEPTH format transfer logic
- Lots of edge cases and wrong sizes used for barriers
- Incorrect e4m12 conversion logic caused readback errors
2026-10-09 12:38:31 +03:00
kd-11 7c572eb4dd gl/vk: Correctly halve the invocation count when shrinking F32 to F16 2026-10-09 12:38:31 +03:00
kd-11 4d4c07c18a vk: Ensure input attachments are in uncompressed layouts 2026-10-09 12:38:31 +03:00
digant73 4c7d08582a overlays: Fix missing symbol glyphs (e.g. ★) in native UI on Windows 2026-10-09 07:52:44 +02:00
kd-11 304d544bc1 ci: Skip cache load step if PR is marked with 'CI: Disable Build Caches' label 2026-10-08 23:07:27 +03:00
kd-11 e4694a7a2c rsx/vp: Adjust constant access behavior to match real hardware
- Real hardware behavior for constants table access is complicated.
1. If you try to encode access of c[N] where N > 467 you read back 0 in the shader
2. If you try to bypass the limitation using ARL then the index wraps around 512.
3. Using the ARL bypass between 468 and 512 returns garbage.
2026-10-08 23:07:27 +03:00
kd-11 7f476dad89 rsx: Rework transform constant update logic
- This reverts commit 193975556d.
- Out of bounds writes are treated as NOP, same as real hardware
2026-10-08 23:07:27 +03:00
kd-11 222754bfd3 rsx: Use framebuffer aliasing bias to break ties between same-tag color and depth overlaps 2026-10-08 10:15:36 +03:00
Acts1631 d064a83d11 Keep title IDs within host path components
Crafted title IDs could escape serial-derived directories and redirect
recursive cache cleanup outside RPCS3's cache root. Reject structural
path components, escape identifiers used as host names, and make
cleanup matching literal and exact.
2026-10-08 08:02:13 +03:00
digant73 8ffc512beb Remove duplicate in emucore.vcxproj.filters 2026-10-07 20:25:47 +02:00
Antonino Di GuardoandClaude Opus 5.5 2bf8677d3c cellSearch: Put the whole search into the music selection context (#19750)
Analysis and fixes made by Opus 5.5.

## Bug
`cellSearchGetMusicSelectionContext` only put the selected (or a random)
track into the context, even when the search contained many tracks.
Games that pick custom music through cellSearch got a one-track
playlist, so with repeat ALL the same song played on loop forever.

## Fix
- For a search of single tracks the playlist now contains every track of
the search, and `first_track` / `current_track` point to the selected
one (random when shuffled, otherwise the first).
- `music_selection_context::find_content_id` starts from the selected
track instead of the first entry of the playlist.
- `audio_decoder` keeps the selected track first when shuffling and only
shuffles the rest.

Tested with NHL 14.

Fixes #14738
Part of #18779, #11596

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-07 17:41:28 +00:00
Yahfz ab412d5ddb rsx: Fix shader compilation (FP16 round_to_8bit) at low setting 2026-10-07 18:43:26 +03:00
Acts1631 e97200a884 Reject invalid RPCN message types
RPCN forwards MessageDetails from other users. The protobuf uint16
wrappers can carry 32-bit values, and narrowing them on the recipient
aborts RPCS3.

Validate both values before casting so malformed messages are
discarded.
2026-10-07 17:30:37 +03:00
Acts1631 cb63cc82ca Validate RPCN room message fields
RPCN room peers control message payloads and destination lists. Values
above the Matching2 limits overflow the recipient's fixed event buffer
and terminate the NP handler.

Reject malformed room message notifications before allocating event
data.
2026-10-07 16:17:15 +03:00
Acts1631 5f8dd1de61 Reject invalid signaling RTT timestamps
Signaling peers control the timestamps used for RTT calculation. A
future timestamp wraps the unsigned delta, and the fatal checked cast
terminates the signaling thread.

Reject future and oversized RTT values before updating peer state.
2026-10-07 15:19:45 +03:00
Megamouse 479ca74cad Update 7zip to 26.04 2026-10-07 08:20:07 +02:00
digant73andClaude Opus 5.5 925fbb2607 media_utils: Flush the audio decoder and resampler at the end of a track
The resampler buffers part of its input whenever the file's sample rate differs from the 48 kHz output,
because the output buffer was only sized for the frame's own samples. These samples piled up and were
never flushed, so a 44.1 kHz track came out 8.125% short (5-20 s cut from the end of every song).
The decoder itself was never drained either.

- Size the output for the pending resampler samples too and only append what swr_convert actually wrote.
- Flush the decoder and the resampler once the last packet has been read.
- Reserve the whole track up front, reuse the resampler output buffer and byteswap in place before
  appending, instead of growing the track buffer and allocating a buffer for every frame.

Fixes #18930 (custom music cut in Gran Turismo 5).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 07:31:29 +02:00
Megamouse 55a3aff337 gl: fix screenshots and recordings 2026-10-06 20:53:00 +02:00
brian218 12178de458 QT: Made HDD Model Name & HDD Serial Number settings accessible via GUI 2026-10-06 19:00:35 +02:00
Antonino Di Guardo 8e4659a6cb LV2: Fix sys_ppu_thread_start gate freezing PPU threads (#19707) 2026-10-06 15:59:20 +00:00
Antonino Di Guardo 532b6520b4 Add IRD based integrity check (#19421) 2026-10-06 10:22:13 +00:00
Whatcookie 1b90d1c149 rsx: Optimize recursion in the vertex program analyzer's instruction walk
Avoid use of std::function for recursion, and ensure that std::stack is backed by a vector, instead of the default deque.
2026-10-06 10:00:59 +00:00
brian218 c7642cb875 USIO: Eliminated frequent buffer memory reallocation to optimize memory performance 2026-10-06 12:31:13 +03:00
Elad 4dfdda9789 sys_net/Win32: Fix ECONNRESET on UDP socket 2026-10-06 11:59:40 +03:00
Elad 191932b854 Fix RSX capture memory allocations 2026-10-06 11:59:40 +03:00
Elad b1e8e74619 vm: Fix stack pages 2026-10-06 10:56:17 +03:00
Malcolm 183597deea RSX: use cache-line waits for event queue draining 2026-10-06 09:03:01 +02:00
brian218 2ff18d0fae QT: Added USIO Emulated Mode options to Settings GUI 2026-10-06 08:12:31 +02:00
Elad 3e7477107a Update contributors 2026-10-05 21:46:59 +03:00
Elad 7877ebe43d Fix RSX Debugger 2026-10-05 21:46:59 +03:00
Megamouse 30ee6cc358 Add brian218 to contributors 2026-10-05 20:07:01 +03:00
Megamouse 3db7c53c67 vm: fix fill64 2026-10-05 20:07:01 +03:00
Megamouse 70c8683ae2 usio: add proper mapping 2026-10-05 18:02:29 +02:00
brian218 b240813958 USIO: Made gun handler config player-specific in usio_config 2026-10-05 18:02:29 +02:00
brian218 c9fe397116 USIO & Pad: Added the ability to retrieve angle from analog sticks 2026-10-05 18:02:29 +02:00
brian218 2cc650538d USIO: Added support for analog stick input for crosshair 2026-10-05 18:02:29 +02:00
Megamouse b444d6ad24 qt: add value labels to sliders in pad settings 2026-10-05 17:08:02 +02:00
schm1dtmac ba4a4b561e [Mac OS X CI] Fixup for #19684, missed a path ugh 2026-10-05 11:16:30 +02:00
Antonino Di Guardo 7c3d7c7a23 Fix check on game data path (cellGameData API) 2026-10-05 08:52:32 +00:00
yahfz 52de29af04 vk: Don't use rebar for the vertex layout ring 2026-10-05 08:58:41 +03:00
yahfz 43a42d1a86 rsx: Fix FIFO reads while waiting for PUT 2026-10-05 01:44:55 +03:00
Elad 7b99edcfd6 rsx/savestates: Fix FIFO_control::restore_state() 2026-10-05 01:10:48 +03:00
Elad 7b7983ca1a vm/savestates: Rewrite and fix stack_guarded 2026-10-05 01:10:48 +03:00
digant73 a72c4c319b sys_fs: Add an option to emulate the BD-ROM read speed 2026-10-04 22:44:28 +03:00
Antonino Di Guardo fcbed0bc6d cellVdec: Fix decoding of streams without a leading sequence header and of reused AU buffers- #19658 2026-10-04 17:45:05 +00:00
kd-11 32b54f1864 rsx/vp: Process TXL input for potential ATTR references 2026-10-04 20:05:58 +03:00
Ani 193975556d Revert "rsx: Add bounds checking to transform constant loading"
This reverts commit 373d0ea7f0.
2026-10-04 18:16:56 +02:00
IdanandClaude Sonnet 5 d9608bf0f0 settings_dialog: fix Ctrl+Tab only cycling tabs once
Qt's QTabWidget only intercepts Ctrl+Tab/Ctrl+Shift+Tab while the tab
widget itself has keyboard focus. The dialog's own currentChanged
handler moves focus to the Close button after every tab switch, and
clicking into a tab's content moves focus to a child widget, so the
shortcut stopped working after the first switch.

Add explicit window-scoped shortcuts that cycle the tab index
directly, so Ctrl+Tab/Ctrl+Shift+Tab keep working regardless of which
widget currently has focus.

Fixes #19425

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-10-04 18:19:03 +03:00
Megamouse 46aee28f85 Remove log message and update comment 2026-10-04 08:54:12 +02:00
Elad 998298f9a8 Fix cellGemSetYaw's function unique signature (#19696)
This is the only known function that passes arguments in vector
registers.
Although we had an implementation for it, it was never used before.
Hopefully it works.
Attempting to fix "invalid" argument passed to cellGemSetYaw due to
wrong register decoding.
2026-10-04 08:20:42 +02:00
Megamouse c673da45f8 cellGem: Implement cellGemSetYaw (well, at least make it work for calibration) 2026-10-03 22:36:20 +02:00
Megamouse 1ce71092c8 Qt: Fix clearing mappings with rightclick on buttons that live in a groupbox with event filters 2026-10-03 21:55:44 +02:00
Megamouse 0d866154aa ps move: only try to reconnect once per second 2026-10-03 19:35:09 +02:00
Megamouse 0374854c80 Apply FusionBias 2026-10-03 19:35:09 +02:00
Megamouse f5edadb2ef ps move: add drift correction 2026-10-03 19:35:09 +02:00
Megamouse 103d41944c ps move: Only update ahrs orientation if a new input report arrived and handle ZCM1 half frames 2026-10-03 19:35:09 +02:00
Megamouse a664f405bc ps move: fix orientation mapping 2026-10-03 19:35:09 +02:00
Megamouse 5da9f4ab32 ps move: improve sample period 2026-10-03 19:35:09 +02:00
kd-11 db7d845e09 rsx: Implement optimized variants of iota16 and iota32
- Upto 20x faster than std::iota on msvc
- 1-3x bump for GCC and clang
2026-10-03 18:27:05 +03:00
yahfz e68ae2d051 RSX: Use 32-bit generated indices 2026-10-03 18:27:05 +03:00
Megamouse 1814fefb95 Update SDL to 3.4.18 2026-10-03 16:47:46 +02:00
Megamouse a1dc53fdf2 cellGem/Mouse: use float for x_pos and y_pos 2026-10-03 15:20:15 +02:00
Megamouse 0ca1c58e75 ps move: fix zcm2 calibration dump logging 2026-10-03 12:44:40 +02:00
Megamouse 8e245a6e15 ps move: ignore wrong input reports 2026-10-03 12:44:40 +02:00
Megamouse df7964560b ps move: make sure to read all calibration blocks 2026-10-03 12:44:40 +02:00
Megamouse 7d69855fbb ps move: fix accelerator typos in calibration 2026-10-03 12:44:40 +02:00
Megamouse 2f5c31155a ps move: mark garbage calibration as invalid and use default values 2026-10-03 12:44:40 +02:00
Megamouse 40da906c91 ps move: Ignore invalid ahrs data 2026-10-03 12:44:40 +02:00
Megamouse 5298e3b7a1 ps move: always apply calibration. we skipped that part if orientation was disabled (although you shouldn't disable it in the first place) 2026-10-03 12:44:40 +02:00
brian218 e8b4646145 USIO: Minor fixups for mouse input 2026-10-03 10:31:16 +02:00
schm1dtmac d5213de6dd [Mac OS X CI] Fix translations, Qt 6.12 changed the path 2026-10-02 23:23:02 +02:00
Yahfzandkd-11 b1f51cfaa6 rsx: Check Z-buffer dimensions when comparing framebuffer layouts
Co-authored-by: kd-11 <[email protected]>
2026-10-02 18:47:50 +00:00
kd-11 b7f6f4e80f rsx/fifo: Revert change in strict FIFO behavior when using atomic puller 2026-10-02 21:28:25 +03:00
kd-11 1c757181a0 rsx/lv2: Make the hw cursor resolution-aware 2026-10-02 19:56:35 +03:00
kd-11 5d8efbfeb9 rsx/lv2: Implement hardware bitmap cursor 2026-10-02 19:56:35 +03:00
kd-11 dd12be585e rsx/overlays: Use std::span in place of std::vector to allow arbitrary memory reads 2026-10-02 19:56:35 +03:00
kd-11 fc746de37d rsx/lv2: Document cellGcmCursor callbacks 2026-10-02 19:56:35 +03:00
yahfz f2b7edff27 acverdict 2026-10-02 18:42:30 +03:00
kd-11 18f18b305f gl/vk: Accept single-index draws for POINT rendering 2026-10-02 13:33:48 +03:00
kd-11 d10658b818 gl: Fix 2-sided stencil configuration caching 2026-10-02 13:33:48 +03:00
kd-11 b87a56979e vk/gl: Allow cached resources with upto 512 depth slices 2026-10-02 13:33:48 +03:00
kd-11 5df3970a75 vk: Fix leaky ref-counts for reused query pools (unused quirk) 2026-10-02 13:33:48 +03:00
kd-11 a3409242ce gl: Fix texture layout for RGB5A1 and BGR5A1 surfaces for readback/upload 2026-10-02 13:33:48 +03:00
kd-11 54ab16913e vk: Fix WAW barrier when clearing the WSI present surface 2026-10-02 13:33:48 +03:00
kd-11 2ccc4983fa gl: Fix partial clear of depth-only image (z16) when the DSV is dirty 2026-10-02 13:33:48 +03:00
kd-11 5741d891bb vk: Only request UAB-compatible set layouts if the bindings require it 2026-10-02 13:33:48 +03:00
kd-11 4dce4ecbe5 gl: Use proper custom slot for polygon offset state caching 2026-10-02 13:33:48 +03:00
kd-11 a7e274234f rsx/mtrsx: Fix fault range of emulated index expansion 2026-10-02 13:33:48 +03:00
kd-11 f1574d7060 rsx/nv3089: Clamp input height to 1 row
- Prevent underflow when calculating addresses. which can discard valid blit requests
2026-10-02 13:33:48 +03:00
kd-11 08b226b8f8 rsx/zcull: Fix find_query behavior
- Use umax instead of 0 to mean not-found.
2026-10-02 13:33:48 +03:00
kd-11 373d0ea7f0 rsx: Add bounds checking to transform constant loading 2026-10-02 13:33:48 +03:00
kd-11 babeda0ed2 rsx: Fix typo when replaying a constant_load_modifier_barrier 2026-10-02 13:33:48 +03:00
kd-11 c3f3529b98 rsx: Reset color write mask when re-evaluating color masks 2026-10-02 13:33:48 +03:00
brian218 96ccd89cd6 USIO: Added mouse and key/pad input support for shooter games 2026-10-02 11:13:40 +02:00
Megamouse 0850e0ff5c Update Qt to 6.12.0 2026-10-02 10:02:49 +02:00
Elad a7cbd46749 rsx: Debug commit 2026-10-02 04:56:21 +03:00
Elad 0e0cdc7c29 rsx: Make the initial GET update seq-cst 2026-10-02 04:56:21 +03:00
Elad acb249f057 rsx: Fix GET updates in NOP cmd 2026-10-02 04:56:21 +03:00
Elad a3dc7e6af4 rsx: Fix FIFO GET updates (Atomic FIFO exclusive fix) 2026-10-02 04:56:21 +03:00
Elad 982337435a rsx: Fix FIFO GET ordering after NV4097/NV406E-REF labels release 2026-10-02 04:56:21 +03:00
Elad cdc04e0d59 Fix _cellGcmInitBody 2026-10-02 04:56:21 +03:00
Elad 7aa2422a07 Fix RSX Debugger 2026-10-02 04:56:21 +03:00
Megamouse 17320679e3 VS: disable ZSTD in curl 2026-10-01 22:35:46 +02:00
Megamouse 1dd70e036e cellGem: fix cellGemHSVtoRGB 2026-10-01 22:35:46 +02:00
Megamouse 53d9522073 cellGem: Fix handle offset orientation 2026-10-01 21:18:49 +02:00
Megamouse 3b3c7f4f07 Fix infinite recursion when Emu.GetDir is /app_home/ 2026-10-01 21:00:18 +03:00
Megamouse a5515d2371 Update FAudio to 26.10 2026-10-01 18:28:25 +02:00
Antonino Di Guardo dfc0542a9f savedata: scoped filesystem sync 2026-10-01 13:38:26 +00:00
Vishrut Sachan 4d88114c92 ci: Auto-label PRs from title and linked issues 2026-10-01 15:09:35 +03:00
RipleyTom 81cbf7ba3d fix: various bugfixes
- sys_net: align sendmsg behaviour to sendto's
- np: ensure TUS info size fits into buffer
- signaling: retire all packets on timeout
2026-10-01 14:42:27 +03:00
Megamouse 83b1e07299 Fix some log messages 2026-10-01 12:42:01 +02:00
Megamouse 8307c54cd4 cellCamera: handle nullptr in cellCameraReadEx 2026-10-01 12:42:01 +02:00
Megamouse 805c931d49 cellGem: fix racing wheel mapping 2026-10-01 12:42:01 +02:00
Megamouse be69c054ee cellVoice: do not allow more than CELLVOICE_MAX_PORT ports 2026-10-01 12:25:46 +03:00
Megamouse d98d378704 cellAudioInGetDeviceInfo: fix error value 2026-10-01 12:25:46 +03:00
Megamouse d9a59820ba cellSearch: fix tag checks 2026-10-01 12:25:46 +03:00
Megamouse a1c6b12311 cellSearch: fix video content memcpy 2026-10-01 12:25:46 +03:00
Megamouse a3232fddee Update VulkanMemoryAllocator to 3.4.0 2026-10-01 10:52:00 +02:00
Megamouse 71d1a4527d _sys_ppu_thread_create: fix memory leak on error 2026-10-01 10:49:10 +03:00
Megamouse 5b350ff3e1 RawSpu: only work mmio stats when spu_log is trace 2026-10-01 09:12:56 +03:00
Megamouse 1c460fdd7f input: Fix SDL reconnect: Fix SDL open/close reference count and only try once per second 2026-10-01 07:43:05 +02:00
Ani 53d44aa4a1 rpcs3_version: Bump to 0.0.43 2026-10-01 00:11:48 +02:00
Antonino Di Guardo d42fc3dc41 LV2: Let the caller leave sys_ppu_thread_start before a lower-priorit… (#19655) 2026-10-01 00:21:49 +03:00
yahfz 1331e307ce rsx: Reuse texture views for remap changes 2026-09-30 21:00:45 +02:00
yahfz 058b5fb556 gt5 2026-09-30 21:00:45 +02:00
Megamouse 7b1d4f98ef Remaining fixes 2026-09-30 20:13:01 +02:00
yahfz fd818e7016 vk: Complete pending unresolve before feedback loops 2026-09-30 19:51:13 +02:00
RipleyTom 431b169358 fix: don't put 0 sized data packets in received_data 2026-09-30 18:29:21 +02:00
DevX-Cipher 38d27036f9 Building on windows made easier (#19507) 2026-09-30 16:08:29 +00:00
Megamouse da0dc28841 rsx: use std::span and const ref 2026-09-30 16:33:05 +02:00
Megamouse a8fabaf570 cellVdec: cache alpha channel per thread and only fill it on change 2026-09-30 16:33:05 +02:00
Antonino Di Guardo 1fe12b7778 Rename Close to Cancel button on some panels (#19468) 2026-09-30 13:50:36 +00:00
Megamouse 276ead3cef elf: Fix offset in case of fixup_shdrs 2026-09-30 16:05:46 +03:00
Megamouse a321a0a18d unself: fix iv_idx range checks 2026-09-30 16:05:46 +03:00
Megamouse 96bb9740bf rsx: fix on_notify_pre_memory_unmapped. eaAddress[ea] was set to null instead of ioAddress (typo ?) 2026-09-30 14:07:29 +02:00
Megamouse db90035c49 texture_cache: fix hash calculation 2026-09-30 14:07:29 +02:00
Megamouse 2ccdb73a31 rsx_cache: throw exception on OOB write to vp_jump_table 2026-09-30 14:07:29 +02:00
digant73 7390f3dd9a Fix FMV audio crackling with Audio Buffering enabled 2026-09-30 14:31:59 +03:00
Malcolm f0d2485981 CMake: Add LSE2 option 2026-09-30 13:46:49 +03:00
Malcolm be39b3b9f0 atomic: Detect LSE2 at runtime on ARM64 2026-09-30 13:46:49 +03:00
Antonino Di Guardo 80567b686b cellAudio: Acknowledge suspend_all while waiting for the audio mutex (#19607) 2026-09-30 10:05:37 +00:00
Megamouse fb4a09215a vm: fix endless loop in map_self if map returns nullptr 2026-09-30 12:06:39 +03:00
Megamouse dcbc44a399 cellGcmSys: Do not read past end in cellGcmMapMainMemory 2026-09-30 12:06:39 +03:00
Megamouse 2c961d0614 sceNpTrophy: limit count to 128 in sceNpTrophyGetTrophyUnlockState to prevent OOB in loop below 2026-09-30 12:06:39 +03:00
Megamouse 93eefd3820 cellImeJp: actually write all candidate chars to dst buffer 2026-09-30 12:06:39 +03:00
Megamouse 5753d99db1 cellHttpUtil: fix off by one in cellHttpUtilEscapeUri (looped for inSize+1) 2026-09-30 12:06:39 +03:00
Megamouse b4e2e9aae6 usb: fix OOB reads and throw exception on infinite loop in read_descriptors 2026-09-30 12:06:39 +03:00
Megamouse 38c6b90d76 usb: throw exception on OOB packet r/w 2026-09-30 12:06:39 +03:00
Megamouse cf6c06eb66 sys_fs: fix potential OOB write 2026-09-30 12:06:39 +03:00
Megamouse ad7c7a28aa cli: fix emu_argv propagation 2026-09-30 11:35:06 +03:00
Megamouse 00fe384258 fs::get_config_dir: set size to 0 on GetEnvironmentVariable failure 2026-09-30 11:35:06 +03:00
Megamouse 19ae2e9b23 overlays: Fix warning (font_name is assigned a value that is only valid in the if scope) 2026-09-30 08:48:19 +02:00
Megamouse 488c71dfd7 save_manager_dialog: update icons if any row visibility changes (could be negated before) 2026-09-30 08:48:19 +02:00
Megamouse 634c76f0bc g27 settings: break loop if mapping is not in progress anymore 2026-09-30 08:48:19 +02:00
Megamouse 622771ec00 media encoder: ignore decoders in av_codec_iterate 2026-09-30 08:48:19 +02:00
Megamouse 5e4d17e198 kernel_explorer: fix width and height in fmt::format 2026-09-30 08:48:19 +02:00
Megamouse 2ab2c23462 rsx_debugger: fix wrong pitch used for dst buffer in g8b8 mode 2026-09-30 08:48:19 +02:00
Megamouse 3363a48127 overlays: fix OOB in settings dropdown sync 2026-09-30 08:48:19 +02:00
Megamouse 7ae033756a debugger: exit loop deletion loop properly if m_item_count is 0 2026-09-30 08:48:19 +02:00
Megamouse f97106bdc2 gdb: handle EOF in cmd_write_memory 2026-09-30 08:48:19 +02:00
Megamouse 1cf89b1bda perf_meter: fix bucket logging 2026-09-30 09:25:06 +03:00
Megamouse 2d1ce572be Remove unused slow_mutex 2026-09-30 08:44:14 +03:00
Megamouse b69f207406 serialization: fix lv2_dir 2026-09-30 08:44:14 +03:00
Megamouse cefa1285a8 GUI: Fix claimed_paths push after game list refresh 2026-09-30 04:27:49 +02:00
RipleyTom c96c2099b7 fix: make p2ps msgs multimap & set min rtt_time to 1ms 2026-09-30 00:40:12 +03:00
Megamouse 9d52b33805 overlays: refactor fonts 2026-09-29 21:00:42 +02:00
Megamouse c68b528a73 VS: Fix some warnings 2026-09-29 21:00:42 +02:00
Megamouse 479d5c9c9e cellVdec: fix some VS warnings 2026-09-29 21:00:42 +02:00
Megamouse 8d501fb9d4 rsx: tidy up some includes 2026-09-29 21:00:42 +02:00
Ani c5d6b85c4c Update VulkanMemoryAllocator to 3.4.0 2026-09-29 20:00:28 +02:00
Yahfz 7f2e02671e Add option to emulate PS3 HDD read speed (#19593)
Fixes crashes in Armored Core Verdict and Armored Core V. 

RPCS3 HDD reads were finishing much faster than on PS3, so emulating
their timing gives the audio worker time to free old sound banks before
the new ones exhaust the heap.
2026-09-29 16:52:19 +00:00
FlexBy420 3e9d881aa6 Minor fixes to old steam theme (#19560) 2026-09-29 14:24:56 +00:00
schm1dtmac 615f529e65 [Mac OS X] Force enable LSE2 on Apple AArch64 as a workaround for missing macros.
AppleClang defines the macros noted in types.hpp, but not LLVM clang for some obnoxious reason.
2026-09-29 15:01:34 +02:00
Ani d9a72d6ca7 gui: General UX pass on the Settings Dialog (#19604)
### Remove 
- gui: Remove Debug "Approximate PPU Vector NaN Handling"
- gui: Remove I/O "Load SDL GameController Mappings"
- gui: Remove Advanced "VBlank NTSC Fixup", enable by default
- gui: Remove Debug "Accurate DFMA"

### Move
- gui: Move Advanced "Enable SPU Events Busy Loop" to Debug
- gui: Move Advanced "Set DAZ and FTZ" to Debug
- gui: Move Audio Device to the left column in Audio

### Group
- gui: Add "Savestates" section in Advanced

### Order
- gui: Alphabetically order the Advanced Tab
- gui: Alphabetically order the I/O tab

### Visibility
- gui: Hide formats list when Audio Format is not Manual
- gui: Hide 3D settings if GPU "Enable 3D Support" is disabled
- gui: Hide RCAS if GPU "Output Scaling" is not FSR1
2026-09-29 10:25:30 +00:00
Megamouse 56fabd9760 Update libpng to 1.6.59 2026-09-29 11:26:43 +02:00
Antonino Di GuardoandClaude Opus 5.5 58b3505593 Qt: Keep the game window fullscreen when it is shown again (#19541)
Fixes #18381

### Bug:
`gs_frame::show()` went through `QWindow::show()`. On desktop platforms
`QPlatformIntegration::defaultWindowState()` is `Qt::WindowNoState`, so
that always routes through `showNormal()`, which pushes
`Qt::WindowNoState` to the native window before the startup visibility
is applied. On a window that is already fullscreen this is a real "leave
fullscreen" request immediately followed by an "enter fullscreen" one,
and a window manager is free to resolve that pair as windowed.
`QXcbWindow::setWindowState()` returns early when the requested state
matches the current one, so the first call of a session is a no-op, but
a later one on a fullscreen window is not, and
`QWaylandWindow::setWindowState()` forwards unconditionally.

Only the OpenGL frame runs into this. `gl_gs_frame` shows itself from
its constructor so that wayland-egl has a mapped surface before the
context is created (c7b2a21f), so by the time `gs_frame::flip()` shows
the frame again on the first flip, the window is already fullscreen.
Vulkan and Null only ever show the frame on that first flip, which is
why they are fine. It also explains why this never reproduced on
Windows: `ShowWindow()` applies both states synchronously and the second
one wins.

### TO BE TESTED ON LINUX
Not runtime tested yet: it needs a run on X11 and on Wayland with an
OpenGL game and "Start games in fullscreen mode" enabled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-09-29 08:32:23 +00:00
Antonino Di Guardo 52616e0f10 Display ISO key mismatch (#19471)
Display an error message when booting a game from an encrypted ISO file
/ BD Drive in case:
- no decryption key file found
- wrong decryption key file provided (e.g. with key of another game)

Further, code improved to skip a key file for an ISO file recognized as
decrypted (avoid to decrypt (to corrupt) the ISO file with a wrongly
provided key).
2026-09-29 09:52:55 +02:00
kd-11 6fc79f7ccf Revert "rsx: keep depth buffers for zpass queries"
This reverts commit 2d293d8e5a.
2026-09-29 07:55:59 +03:00
digant73 1707d7fc88 remove unnecessary #ifdef 2026-09-28 22:18:44 +02:00
digant73 5c1ce9cbef cellVdec: Report the userdata of the AU each picture was decoded from 2026-09-28 22:18:44 +02:00
Yahfzandkd-11 2d293d8e5a rsx: keep depth buffers for zpass queries
ZPASS_COUNT is an observable side-effect of Z-buffer access, despite Z-TEST and Z-WRITE being disabled. Technically, this is a pure Z-READ operation.

Co-authored-by: kd-11 <[email protected]>
2026-09-28 17:20:17 +00:00
Megamouse 105c4988f0 mic: fix some warnings 2026-09-28 12:27:27 +02:00
Megamouse 9a8a66a29c Update wolfssl to 5.9.4 2026-09-28 12:27:27 +02:00
Ani 1f080485b9 ci: Bump FreeBSD to 14.5 2026-09-28 03:48:48 +02:00
Antonino Di Guardo c405227129 CPUThread: Fix deadlock when a CPU thread terminates abnormally 2026-09-27 23:54:51 +03:00
kd-11 3fa07db78b rsx/qt: Move the "disable blit engine upscaling" option to the advanced tab 2026-09-27 18:17:26 +03:00
digant73 205a4481f3 Fix ISO device paths 2026-09-27 15:10:08 +03:00
digant73 dad97b9a96 cellVdec: Output the pictures still held by the decoder on EndSeq 2026-09-27 02:53:16 +03:00
digant73 8e2d700fab Fix BD Drive read speed 2026-09-27 02:29:27 +03:00
Antonino Di Guardo 77cb9423db LV2: Wait for new PPU threads to start in sys_ppu_thread_start 2026-09-26 15:33:22 +00:00
Antonino Di Guardo a1c317a8c4 cellVdec: Postpone Context Destruction 2026-09-26 14:37:31 +00:00
Elad 3aab4c5d59 VM/sys_mmapper: Fix sys_mmapper error checking 2026-09-26 14:35:38 +03:00
Elad 063586ea81 Utilities\cfmt.h: Add binary formatting to fmt::format 2026-09-26 14:35:38 +03:00
Elad 6d22e2165d Fix vm::page_protect 2026-09-26 13:17:00 +03:00
Elad a70f698569 vm: Fix confusing enum flags naming 2026-09-26 13:17:00 +03:00
Elad 13eaa2b03c rsx/vm: Do not pause RSX on non-RSX allocations 2026-09-26 13:17:00 +03:00
Elad 4514ad6216 Fix PPU start delay accumulation 2026-09-26 00:01:32 +03:00
digant73 6e6ffc5058 Fix thread affinity on Linux for thread scheduler different than OS 2026-09-25 23:34:58 +03:00
digant73 9f696db955 Fix slow audio 2026-09-25 21:03:26 +03:00
kd-11 7f5f8c4a70 vk: Use all available threads for shader compilation during bootup 2026-09-25 20:33:15 +03:00
Megamouse e447511a67 CI: try to split msvc build and unit test build 2026-09-25 15:22:49 +02:00
ShadelessFox 38eba804f4 gdb: fix address check in the memory read routine 2026-09-25 08:37:02 +03:00
RipleyTom ef65627338 fix: fix build with LLVM 23.1 2026-09-25 05:57:53 +03:00
Megamouse a106fb0ee7 qt: don't treat empty savestates folder as error 2026-09-24 21:22:24 +02:00
MananSharma12 fadced35a5 gui: Display warning for corrupted items in Savestate and Trophy managers 2026-09-24 18:48:11 +02:00
Megamouse 3660716e4f Build/CI: Stop overriding '/W0' with '/W4' spam 2026-09-24 17:34:00 +02:00
YahfzandElad 712ab24775 Update rpcs3/rpcs3qt/tooltips.h
Co-authored-by: Elad <[email protected]>
2026-09-24 16:34:25 +03:00
yahfz 083859b94c putllc 2026-09-24 16:34:25 +03:00
Antonino Di GuardoandClaude Opus 5 0c382f4fc9 patch_engine: don't emit path-typed patch addresses as hex
save_patches always emitted the address element as fmt::format("0x%.8x"),
but for move_file and hide_file that element is a VFS path: load() keeps the
text in original_offset and skips u32 validation for those two types.
Round-tripping such a patch through save_patches replaced the source path
with 0x00000000.

The entry stays syntactically valid and keeps loading, so the patch is still
listed and can still be toggled in the Patch Manager while silently matching
no file. Re-downloading does not repair it either, since append_patches
discards an incoming patch whose Patch Version is not strictly greater.

Gate the emit on patch_type_uses_hex_offset, the predicate that already
existed for this and was used only on the load side. The numeric branch
keeps using offset rather than original_offset on purpose: an address
modifier is folded into offset at load time and the flat form emitted here
has nowhere to put it.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-24 13:45:26 +02:00
Antonino Di GuardoandClaude Opus 5 dc3c7327d8 patch_engine: make save_patches write atomically
save_patches opened the target with fs::rewrite (write + create + trunc),
then discarded the result of file.write() and returned true unconditionally.
A write that fails part way leaves a truncated file, load() rejects the
whole file on a parse error, and import_patches refuses to write when
load() fails, so every later import returns -1 with no in-app recovery.

75e66ab5e made the patch config and the pad config atomic but missed this
function; save_config, 70 lines up in the same file, already writes through
fs::pending_file and checks the result. Do the same here.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-24 13:45:26 +02:00
Megamouse c82221f292 cellGem: Allow custom camera_frame buffers
TV superstars demo passes its own buffer.
If we early out here we never increase the frame count and tracking
does not work properly.
2026-09-24 07:52:39 +02:00
Elad b5a174e933 LV2: Wait for an observable PPU schedular change from new threads 2026-09-23 23:13:17 +03:00
Elad f9b4d121ea Make sys_cond_signal_to permissive to CPU cycle errors 2026-09-23 23:13:17 +03:00
EladandAntonino Di Guardo c82e598950 LV2: Increase HW PPU Thread Signal Delay
Co-Authored-By: Antonino Di Guardo <[email protected]>
2026-09-23 23:13:17 +03:00
Elad 1e0e352f95 Util/stack_trace.cpp: Clean duplicate functions in CallStack dump 2026-09-23 23:13:17 +03:00
kd-11 56237b6858 rsx/lv2: Add a timeout to the queue drain logic
- Also adds an optimization to skip draining the queue if the command arg is the same.
2026-09-23 17:54:33 +03:00
kd-11 99a926d278 rsx: Force a full pipeline stall before invoking USER_COMMAND callback
- Proven with hardware tests
2026-09-23 17:54:33 +03:00
kd-11 ff40118b94 rsx/lv2: Fix back-to-back USER_COMMAND method invocation cloberring the callback argument 2026-09-23 17:54:33 +03:00
jpolo1224 fe9281f44a vk: run the conversion kernels 64-wide on Adreno
Adreno waves are 64 lanes, and a workgroup narrower than the wave does not pack
together with its neighbours -- it occupies a whole wave and masks the surplus
lanes off. At 32 that idled half of every wave on every dispatch, and these
kernels run on every texture upload of a kilobyte or more, plus every deswizzle
and detile.

Nothing argues the other way here. The kernels carry no shared memory and no
barriers, so group size is a scheduling hint with no LDS or synchronisation
cost to trade against.
2026-09-23 13:20:53 +03:00
Val Packett fdffb7d5f9 vk: Recognize Qualcomm Adreno drivers (blob and Mesa Turnip) 2026-09-23 13:20:53 +03:00
digant73 3fa2bf6688 Fix crash on DLC unlocked 2026-09-22 23:52:18 +03:00
Antonino Di Guardo c4d834480a Fix unpkg bugs- #19528
- PKG entry paths are converted to std::filesystem::path through explicit UTF-8 (utf8_to_wchar / wchar_to_utf8) instead of the narrow constructor, which read the bytes in the host ANSI code page and terminated the process on any it could not map (Shift-JIS file names such as s10c3_R126_<90 AC 91 CC>.mdat in Darkside Chronicles).
- The canonical path is converted back with UTF-8 as well, so a dev_hdd0 path with non-ASCII characters yields a valid key and    passes the containment check (upstream rejected every entry as "escapes installation directory").
- The installation directory is canonicalized without its closing / separators, like every entry: on a file system that cannot resolve it, the lexical form no longer keeps an empty last element that no entry can match (network drives).
- Absolute / . / .. checks run on the raw name bytes via a shared leaves_directory() helper; the .. case is now an installation failure instead of an emergency exit.
- The installation directory name read from the package is validated with the same helper and escaped.
- weakly_canonical is computed once per directory and reused for files not yet on disk (existing paths and folders are still    resolved whole): identical keys and verdicts, ~25x faster enumeration (6000 files: 1.7 s → 63 ms).
- Supersedes *19463 (trailing separator after the lexical fallback)
- Supersedes *19492
- Minor: map key moved instead of copied.
2026-09-22 20:07:28 +00:00
Elad 3efbf060a6 sys_fs: Fix SYS_APP_HOME readability control for disc games 2026-09-22 16:16:51 +03:00
kd-11 d08d568d5e vk: Fix renderpass keys attached to property blobs when seeding interpreter variants 2026-09-21 19:00:51 +03:00
kd-11 c938d3e049 vk: Support multiple attachments on renderpass key generation 2026-09-21 19:00:51 +03:00
kd-11 e59ed70470 rsx: Tweak logic regarding reuse of blit target sections
- Also optimizes for the common case where we overwrite the destination in full.
2026-09-21 19:00:51 +03:00
kd-11 accfecd2d1 vk: Expand the interpreter seed by taking most common formats into account 2026-09-20 21:09:01 +03:00
kd-11 507b395d4b vk: Support linking shaders with a common pipeline cache 2026-09-20 21:09:01 +03:00
kd-11 7022a322a6 vk/interpreter: Add more seed variants and remove pipeline cache from interpreter code 2026-09-20 21:09:01 +03:00
kd-11 71f8a5e09d vk: Clean up flat shading implementation 2026-09-20 21:09:01 +03:00
Walter 9e86f165d1 Revert "[LLVM SPU] Add InstCombine pass"
This reverts commit f4a74819d3.
2026-09-19 15:16:28 +03:00
Walter f4a74819d3 [LLVM SPU] Add InstCombine pass
The `InstCombine` is a very important pass for optimizing common expressions and simplifying logic. It could help produce sustainably better code at little cost.
2026-09-19 02:12:24 +03:00
Antonino Di Guardo 8db660b185 Fix sysFsReaddir #19512 2026-09-17 19:21:44 +00:00
kd-11 a90c841b39 rsx: Fix flush predictor behavior when using surface cache targets for blit engine 2026-09-17 21:42:07 +03:00
Megamouse e76fbf4489 Increase MSVC ccache to 7GB 2026-09-17 18:19:00 +02:00
Walter 92721aedfe [SPU LLVM] Avoid the SHUFB GFNI path when it prevents a OR combine
On non-AVX512 CPUs, the GFNI path can be expensive (on Intel) due to it requiring a variable blend. This patch prevents that case.
2026-09-17 14:09:29 +03:00
Edvard 6c0e2823f8 Add --big-picture CLI flag to force Big Picture Mode on launch (#19509) 2026-09-16 22:04:56 +00:00
Malcolmandjpolo1224 e13ee15791 SPU LLVM: Stop inverting float-to-int saturation on ARM64
- Fix CFLTS saturation in the approximate and accurate xfloat paths
- Original fix credit to jpolo1224 of armsx3 https://github.com/ARMSX2/ARMSX3/commit/424514fde67adb83540d39feea860b5eb17b3500
- Accurate-xfloat follow-up https://github.com/ARMSX2/ARMSX3/commit/19d23eb6913c34cb63c00861bf95e58c3144e78e

Co-authored-by: jpolo1224 <[email protected]>
2026-09-16 14:04:34 +03:00
Antonino Di Guardo 394a9e4b52 Unedat: Mute wrong log on edat and minor fixes 2026-09-16 09:45:36 +00:00
Yahfzandkd-11 a659805470 rsx: Reuse discarded render targets during surface splitting
Co-authored-by: kd-11 <[email protected]>
2026-09-16 08:06:56 +00:00
Malcolm e826098bcb SPU LLVM: Omit test_state and spu-null if they are unreachable 2026-09-16 09:28:19 +03:00
Megamouse 2d103407f8 cellMic: add EyeToy and PsEye types 2026-09-16 01:42:59 +02:00
schm1dtmac 4b9f2af41f [Mac OS X] Switch all Mac OS X CI to use MacPorts because of Homebrew 7 dropping Intel far too early.
This change really is the last straw I've had with Homebrew, I simply cannot trust that they won't do something similar to Apple Silicon in the future. Inevitably much of the Intel CI's downloaded deps will get built from source due to this which would cause build times to skyrocket, were we to keep using Homebrew.
2026-09-15 23:35:50 +02:00
EBgames7 ac6dc84e84 Infamous 2 Trophy Overlay Fix (#19473)
Infamous 2 displays infamous 1 trophy data in overlay if trophies are
present on local user account. If infamous 1 trophies are not present,
the overlay does not display any trophy data.

This code addition sets the trophy name list once (if empty) and
prevents future trophy contexts from changing it. The overlay now
displays the proper trophy data for infamous 2.
2026-09-15 20:47:40 +00:00
Megamouse fb62c6d03a clean up some includes 2026-09-15 22:01:55 +02:00
Megamouse be509deda0 Move emu callbacks to own file
Reduces some System.h includes
2026-09-15 22:01:55 +02:00
MohamedandClaude Fable 5 1b3e02044f LogitechG27: mirror mapped steering device presence on the usb bus
The emulated G27 was always attached while enabled, so games kept
reading a phantom wheel (centered steering after the previous commit,
formerly hard-left) and ignored pad steering input. Attach the emulated
device only while the mapped steering device is connected: games now
see the wheel plug in and out exactly like on real hardware, and pad
play works without disabling the option and restarting the game.

Also guard the personality reconnect against the device having been
detached between the game's mode-change request and the housekeeping
tick.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-09-15 21:10:22 +02:00
MohamedandClaude Fable 5 b7056bc88a LogitechG27: report neutral axis positions when the mapped device is missing
The emulated G27 fell back to MIN for every axis whose mapped SDL device
was not connected. For the steering axis MIN encodes full-left, so enabling
the emulated wheel without the physical device attached (or while playing
with a regular gamepad) made games receive permanent hard-left steering.
Fall back to the axis' neutral position instead: center for steering,
released for pedals (unchanged behavior for pedals).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-09-15 21:10:22 +02:00
Megamouse 2868fbe4ed BUILDING.md: update vulkan install on linux 2026-09-15 20:16:21 +02:00
FlexBy420 c1b1d00b4c Qt: Overhaul trophy manager (#19428)
* Allow to search game by title or via comm id
* More info columns
* Seperated games list and trophy list instead of displaying both at the
same time
2026-09-15 17:23:28 +00:00
Megamouse 0646d36708 ps move tracker: only create threads on demand 2026-09-15 18:18:34 +02:00
Megamouse ca522cf84c fix cctype usage
According to the documentation, we should cast to unsigned char.
Anything negative is undefined behavior.
2026-09-15 17:38:26 +02:00
digant73 b6bdf0d92d Fix UTF-8 filename 2026-09-15 11:59:38 +03:00
Malcolm ec4b1ae655 SPU LLVM: Use TBL for ARM64 byteswaps 2026-09-15 10:50:56 +03:00
Megamouse 1b569fde4d Fix some warnings 2026-09-15 03:10:16 +02:00
Megamouse 6c4b749fb8 Add new stylesheets to VS filters 2026-09-15 03:10:16 +02:00
Megamouse 932336ac30 VS: Use Ninja to build glslang and add ccache 2026-09-15 03:10:16 +02:00
digant73 b14b6d3cef Fix read file on system attribute 2026-09-15 01:08:48 +03:00
Elad 4f11259e58 Fix savestates 2026-09-14 18:35:47 +03:00
Elad bcd8a09f49 VM: Fix vm::main for SDK ver <2.00 2026-09-14 17:44:52 +03:00
Elad c74adaba8e Fix uncalled for ppu_register_function_at call
It was decoding bad data, was discovered when vm::main address changed so the data changed as well
2026-09-14 17:44:52 +03:00
Elad 12b4d3d50c Loader: Fix SDK ver <2.00 user memory pool size
Tested today.
2026-09-14 17:44:52 +03:00
Elad da2153db2c sys_memory: Optimize allocations 2026-09-14 17:44:52 +03:00
Elad e6c3cce5e2 sys_fs: Add debug stats 2026-09-14 17:44:52 +03:00
Malcolm 41f0ecc17b SPU LLVM: Ifdef some code to be x86 only
- might speedup arm via avoiding some x86 optimizations that don't use intrinsics
2026-09-14 08:35:50 +03:00
Yahfz 2003f2404f Reserve properly user mrm allocations (#19482) 2026-09-13 20:02:48 +00:00
Megamouse 726cd2d358 Remove some outdated includes 2026-09-13 16:44:38 +02:00
Megamouse c5375ccadf Update 7zip to 26.03 2026-09-13 16:44:38 +02:00
Yahfz 43cedf366b sysutil/audio: Implement shared memory handling (#19467) 2026-09-13 08:39:10 +00:00
digant73 6ba56a52a4 Fix silence on some 8ch to 2ch audio output configuration 2026-09-13 00:01:20 +03:00
Cri4Key 961c86fbbf Ensure SO_BROADCAST is set when sending to broadcast address in P2P 2026-09-11 20:54:05 +02:00
Cri4Key de9184f03c Add broadcast socket option keeper 2026-09-11 20:54:05 +02:00
Cri4Key 48cc1ac0a9 Allow broadcast P2P socket 2026-09-11 20:54:05 +02:00
MananSharma12 954d7968c7 gui: Fix ComboBox dropdown contrast in Kuroi (Dark) theme 2026-09-11 13:43:19 +02:00
Antonino Di Guardo 028d1e8f4a Fix some VFS issues - #19378 2026-09-10 18:56:40 +00:00
FlexBy420 448fa5dd3a Add new theme based on old steam look (#19446) 2026-09-10 17:50:18 +00:00
Malcolm Jestadt bcb2d22311 BufferUtils: Optimize upload_untouched_skip_restart with AVX-512 paths
- u16 path needs AVX-512-ICL because vpcompressw isn't included in skylake-x level AVX-512

- u32 path is untested as I couldn't find any games that hit it
2026-09-10 19:17:26 +02:00
BeezBumba 8d414937d9 Fix slow startup with BPM (#19388) 2026-09-10 16:39:34 +00:00
Elad 99a91bb562 SPU LLVM: Always write cache when using debug option 2026-09-10 19:06:37 +03:00
Elad c59667b689 Fix theoretical PKG_MAX_FILE_COUNT limit
As long as there is no proven calculation that limits it we should not lower it.
2026-09-10 18:32:18 +03:00
Acts1631 36eaed481c Abort on parent-directory PKG entries 2026-09-10 18:32:18 +03:00
Acts1631 71e9f4ea57 Bound PKG entry table allocation
PKG file_count was used for vector allocation before validating
that the encrypted package data contained the entry table. Limit the
count and require the entry table to fit in the declared data region
before allocating.
2026-09-10 18:32:18 +03:00
Acts1631 09bb101de1 Fix PKG extraction path traversal
PKG entry names could contain traversal components and escape the
installation directory. Reject absolute and special components, then
require the resolved target to remain below the installation root
before creating or writing files.
2026-09-10 18:32:18 +03:00
Elad 973bb520ac More CellError formatting handlers 2026-09-10 17:33:45 +03:00
Elad fb2f1326ad Silence syscall 579 2026-09-10 17:33:45 +03:00
Elad 9c6df388e8 Debugger: Relax thread updates 2026-09-10 17:33:45 +03:00
kd-11 f2ac83f5eb ci/build: Fix missing include for MacOS builds 2026-09-10 15:57:17 +02:00
kd-11 a226238355 rsx: Extra memory safety when rsx::thread crashes 2026-09-10 15:57:17 +02:00
MananSharma12 774ff4933d gui: set vertical alignment for sizeSlider 2026-09-10 15:24:05 +02:00
Sean Brar 17075366c6 Loader: reject unreadable ISO directory metadata 2026-09-10 14:30:55 +03:00
Sean Brar a89b77c1c5 Loader: stop ISO extent reads at logical EOF 2026-09-10 14:30:55 +03:00
Sean Brar aed242aa3f Loader: recover when an ISO member is missing 2026-09-10 14:30:55 +03:00
Walter ca223f70bc [SPU LLVM] 8-bit add/sub renarrowing + compare fast paths
This patch adds a optimization to fold 8-bit addition/subtraction idioms back into a native 8-bit add. Also adds fast paths to the `SHUFB` and `ABSDB` instructions for when a operand came from a compare.
2026-09-10 11:54:14 +03:00
kd-11 14bc19b7bd ci: Remove code caches if PR has 'shaders' label 2026-09-10 10:20:50 +03:00
kd-11 06d28a5f11 rsx: Fix alpha test compilation when using native float16 types 2026-09-10 10:20:50 +03:00
Karim DRIDI ceb1ab0718 GDB: Fix PPU single-step state setup 2026-09-09 19:51:03 +03:00
kd-11 54014a7de4 rsx/qt: Add a debug setting to force programmable blending 2026-09-07 21:09:01 +03:00
kd-11 9a26a70e71 rsx: Fix decoding of 16-bit blend constants 2026-09-07 21:09:01 +03:00
kd-11 5aa23d0276 rsx: Don't force PB when we don't need to for performance reasons 2026-09-07 21:09:01 +03:00
kd-11 8a78c3ca59 rsx: Fix a really weird quirk when blending with XRGB output formats
- Regardless of the O/Z tag on the format, DST_ALPHA is always 1
- I don't know why it's that way, it shouldn't be but we're probably just looking at a hardware bug
2026-09-07 21:09:01 +03:00
kd-11 9c850a34f2 rsx: Fix ROP operation order.
- The correct order is sRGB -> ROUND -> ALPHA_TEST -> BLEND
- Blending DOES NOT run in linear space at all. The bytes are decoded as-is.
2026-09-07 21:09:01 +03:00
kd-11 78cb66ecfe vk/gl: Fix byte order for RGB565 formats in line with hardware tests 2026-09-07 21:09:01 +03:00
kd-11 244491298b vk: Clean up decode_rsx_state in preparation for refactor 2026-09-07 21:09:01 +03:00
kd-11 d55e9fcf22 rsx/vk: Implement programmable blending for MSAA targets 2026-09-07 21:09:01 +03:00
kd-11 0885cc617e rsx: Minor optimization wrt shader export program options
- No need to rerun the blend config and depth state evaluation every time the shader changes.
- There's probably more that can be done, but I'll check later.
2026-09-07 21:09:01 +03:00
kd-11 b99fbe7bec rsx: Minor refactor to prepare for MSAA support 2026-09-07 21:09:01 +03:00
kd-11 5a43724b44 rsx: Support variable blend target masks with programmable blending 2026-09-07 21:09:01 +03:00
kd-11 8e92a8d845 rsx/fp: Fix failing test cases for programmable blending 2026-09-07 21:09:01 +03:00
kd-11 05b4b10360 rsx: Properly implement signed blending modes 2026-09-07 21:09:01 +03:00
kd-11 87676e3632 rsx/vk: Respect programmable blending when requested 2026-09-07 21:09:01 +03:00
kd-11 e606570b44 vk: Set attachment usage flags to allow input attachments always
- Temporary measure. That really needs to be handled carefullly since most games will not actually need programmable blending.
2026-09-07 21:09:01 +03:00
kd-11 b6dc4e8e04 vk: Properly handle sub-pass dependency barriers 2026-09-07 21:09:01 +03:00
kd-11 284233bc6d vk: Bind input attachments if required by pipeline configuration 2026-09-07 21:09:01 +03:00
kd-11 d7d1d9133b vk: Properly propagate programmable blending flag down to renderpass caching 2026-09-07 21:09:01 +03:00
kd-11 c47bbab85f rsx/vk: Plumb programmable blending shader emitter 2026-09-07 21:09:01 +03:00
kd-11 ab95783bc9 rsx: Update programmable blending code to be in line with current emulator state 2026-09-07 21:09:01 +03:00
kd-11 065b490eb4 rsx: Force a backend sync when calling nv4097::set_notify 2026-09-06 12:55:51 +03:00
kd-11 57dd6e763a rsx/zcull: Use partial MM flush for report sync 2026-09-06 12:55:51 +03:00
kd-11 7a953ecf04 rsx/zcull: Fix broken nv3089 optimization 2026-09-06 12:55:51 +03:00
kd-11 0ead9328f2 rsx/mm: Implement partial queue flush 2026-09-06 12:55:51 +03:00
kd-11 1559b15afe rsx: Fix broken ZCULL optimization 2026-09-06 12:55:51 +03:00
kd-11 25f1a9dfca rsx/sync: Improve guest synchronization with host GPU operations 2026-09-06 12:55:51 +03:00
kd-11 2f53c4389f rsx: Refactor rsx_utils header into smaller pieces 2026-09-06 11:54:20 +03:00
BeezBumba de6c1b526d fix button labels in BPM 2026-09-05 07:08:08 +02:00
Megamouse 33a723affa CI: Use ccache in VS cmake submodules 2026-09-05 00:27:02 +02:00
Megamouse bf949109ad Build curl with cmake 2026-09-04 16:40:18 +02:00
Megamouse fbaaf2b57f Update curl to 8.22.0 2026-09-04 16:40:18 +02:00
Acts1631 7be182e33b Bound Clans member attribute encoding 2026-09-04 09:14:33 +03:00
RipleyTom e6235886f1 fix: check ticket encoded correctly 2026-09-04 07:11:47 +03:00
Elad 5ab2398b29 SaveStates: Reject unrealistic memory allocations 2026-09-04 00:12:17 +03:00
Megamouse db543e095e Update SDL to 3.4.16 2026-09-03 21:51:30 +02:00
Acts1631 645458b0fc Validate SELF metadata header sizes 2026-09-03 22:09:02 +03:00
Acts1631 0a85b394ec Reject overflowing ELF section ranges 2026-09-03 18:53:46 +03:00
Acts1631 275c2d4093 Reject overflowing savestate collection counts 2026-09-03 13:03:26 +03:00
Megamouse 4cb260c555 Add lock to handle_button_press
We don't want to change UI elements while we are compiling.
2026-09-03 11:13:13 +02:00
Megamouse 8ac75b7dc4 Do not exit big picture with circle
This is the default behavior of the home_menu_page, which was only
intended for use during gameplay originally.
We also expect the game grid to have a parent.
2026-09-03 11:13:13 +02:00
Megamouse 65c8fb5699 big picture: initialize missing input handlers
We need to init the input handlers, otherwise we have a chance to crash
when the fxo is used in some input loop
2026-09-03 11:13:13 +02:00
Acts1631 df92b1d886 Bounds-check Cg binary byte swapping 2026-09-02 22:13:12 +03:00
Megamouse 0514f521e9 big picture: fix image/video aspect ratios 2026-09-02 16:23:30 +02:00
Megamouse cd7d81639a big picture: lock reload mutex at function entry 2026-09-02 16:23:30 +02:00
Megamouse 216b74426a big picture: increase auto repeat interval. It was way too fast. 2026-09-02 16:23:30 +02:00
Megamouse 1a907b5659 big picture: don't jump to the last item when pressing down in the last row 2026-09-02 16:23:30 +02:00
schm1dtmac c19594254e [Mac OS X] Fix sys_ss_random_number_generator & cleanup some dead code (#19382) 2026-09-02 12:00:05 +00:00
Megamouse 9bb7e2e749 Update FAudio to 26.09 2026-09-02 08:08:41 +02:00
Megamouse 17711f219f Update fusion to 1.3.3 2026-09-02 08:08:41 +02:00
Megamouse 677e13da42 overlays: Fix iso media path loading 2026-09-01 23:20:37 +02:00
Megamouse e04198e825 iso: Improve movie and audio path checks
Also reduce need for checking iso files for non-iso games
2026-09-01 23:20:37 +02:00
Megamouse 4048b7aaef big picture mode: Create tiles multithreaded 2026-09-01 23:20:37 +02:00
Megamouse 83a522a8e1 overlays: parse big picture game entries multithreaded 2026-09-01 23:20:37 +02:00
Megamouse 6a5eb794cb Parse games dir before entering big picture mode 2026-09-01 23:20:37 +02:00
Megamouse 5955980aea overlays: use new game enumeration in big picture mode 2026-09-01 23:20:37 +02:00
Megamouse 7338e1610f Refactor game enumeration 2026-09-01 23:20:37 +02:00
Megamouse 2893b42a6f Qt: log some game window settings 2026-09-01 11:44:57 +02:00
Megamouse 12619da666 overlays: localize shader compilation dialogs 2026-09-01 11:44:57 +02:00
Megamouse a7a3e4fc90 Qt: add horizontal scrollbar to changelog 2026-09-01 10:14:53 +02:00
FlexBy420 42e9eda2c5 RPCN: Add delete trophies from rpcn button (#19306)
Allows user to delete their synced trophies
2026-09-01 07:35:45 +00:00
Megamouse 5e40242bdd Qt: Don't set game window visibility on boot if resize is enabled 2026-09-01 08:56:47 +02:00
Megamouse 44a2e4d663 Loader: Only use a single thread when installing packages from an optical drive 2026-08-31 21:04:33 +02:00
Antonino Di Guardo a99fde6f5b Add BD Drive support for Linux, macOS and FreeBSD (#19233)
Follow up of #18648 and #18345 adding BD Drive support to the remaining supported OSes.
As it happens on Windows, both physical BD Drive and virtual drive (e.g. mounted `.iso` file) are supported.

Code for mac OS and FreeBSD provided by AI.

- key files need to be provided under `<rpcs3>/data/redump` folder (currently it needs to be manually created). This folder is also already the fallback folder for any encrypted ISO file

Fixes #18345
2026-08-31 16:44:29 +02:00
Gabriel Costa c6e96729cc rsx/fp: Fix SAT and ABS modifier precedence
- Real RSX applies the SAT modifier before ABS
2026-08-31 10:31:46 +00:00
Masamune3210 d9799c7f38 unpkg: use lexical path normalization for package entries 2026-08-31 10:18:12 +03:00
Masamune3210 54993de362 unpkg: handle canonicalization failures on mounted filesystems 2026-08-31 10:18:12 +03:00
Megamouse 0c0614a4df big picture: navigate down even if there is no tile directly below 2026-08-31 04:12:56 +02:00
kd-11 c006a7f1a5 rsx/qt: Move blit engine upscaling option to debug settings 2026-08-31 02:15:50 +03:00
kd-11 d267b420f8 rsx: Don't overfit memory allocations in system RAM
- Avoids a lot of faults that would trigger slow flush operations when CELL is touching memory outside of the range we care about.
2026-08-31 01:27:51 +03:00
kd-11 726263377f rsx/mm: Add unit tests 2026-08-31 01:27:51 +03:00
kd-11 0c486fb63a rsx/mm: Implement range merging mechanics 2026-08-31 01:27:51 +03:00
kd-11 a8bfc50762 rsx/mm: Avoid flushing entire queue unless actually necessary
- Host MM operations are slow af
2026-08-31 01:27:51 +03:00
kd-11 85f0cc01ea rsx: Loosen the access ordering guarantees a bit 2026-08-31 01:27:51 +03:00
kd-11 78e70af989 rsx: Add missing mm_flush in blit engine before RCB reload 2026-08-31 01:27:51 +03:00
Megamouse 3ef20ebb01 Fix iso path checks 2026-08-30 16:23:38 +03:00
Elad da5d5e5027 SaveStates: Fix sys_prx saving 2026-08-30 11:57:23 +03:00
Elad e2b2493c7f sys_prx: Add some logging 2026-08-30 11:57:23 +03:00
Elad 30f56dd404 SaveState: Fix sys_overlay saving 2026-08-30 11:57:23 +03:00
Elad 7bd312f128 Fix vfs::retrieve for ISO files 2026-08-30 11:57:23 +03:00
BeezBumba e674414875 Add Audio support for BPM ICON1.PAM (#19336)
Previously in the Big Picture Mode when selecting a game to look at its
details, the ICON1.PAM video would start to play but there would be no
audio playing if the .PAM file had it. This PR fixes that.

Note: the change in qt_video_source.cpp is needed because it seemed like
it didn't use it's own parameter. Without that, the audio would not fade
out even after you left the game details.
2026-08-29 21:11:51 +00:00
Megamouse c85105a7fd overlays: use get_game_content_path in BPM 2026-08-29 22:26:39 +02:00
Megamouse 1d644186f4 VS: move BigPicture to own filter 2026-08-29 22:26:39 +02:00
Antonino Di Guardo 010bf1753e Improve Game Collections (#19349)
Follow up of #19292 to improve Game Collections in context menu:
- Add and remove the game to/from multiple collections (e.g. "3rd person" and "Fantasy")
- Create a collection and add the game to it
- Remove the game from current collection if it is not the "All games"
2026-08-29 18:56:56 +00:00
BeezBumba 01c59b99a7 Fix font issues with game titles (#19341)
It fixes certain Japanese characters in game titles and some missing
characters in the BPM.
2026-08-29 18:14:20 +00:00
schm1dtmac eb61fc1fbd [Mac OS X] Fix ISO Verification Failed crashes 2026-08-29 16:01:12 +03:00
mariobob 98906eb035 gui: Fix randomly untranslated game list categories 2026-08-28 16:46:11 +02:00
kd-11 48d2b24813 rsx: Implement workaround for pitch compatibility of overlapping sections with blit engine targets
- Avoid generating surfaces that introduce pitch conflict!
2026-08-28 14:55:44 +03:00
kd-11 42cfad20eb vk: Set up easy debug printing for captured traces 2026-08-28 14:55:44 +03:00
kd-11 85bc1d7074 rsx: Ensure blit targets do not straddle tile boundaries 2026-08-28 14:55:44 +03:00
kd-11 7a4c82aec9 rsx: Allow unlocked DST surfaces to still take writes from the host side 2026-08-28 14:55:44 +03:00
kd-11 0d9afb039e rsx: Do not force blit writes to LOCATION_MAIN to use CPU blit unconditionally
- Blit DST targets are now owned by the surface cache. So always try matching there first.
- Block transfers still go through CPU copy path.
2026-08-28 14:55:44 +03:00
kd-11 71a6aeadcf rsx: Propagate swizzle flag to surface cache from blit engine 2026-08-28 14:55:44 +03:00
kd-11 124462fbab rsx: Avoid false surface match rejection when data is uploaded into the surface cache during RTT scan 2026-08-28 14:55:44 +03:00
kd-11 7d1b67b17a rsx: Avoid unconditional interpolation in blit engine if the original PS3 request did not actually do interpolation 2026-08-28 14:55:44 +03:00
kd-11 6f3df0ba7b rsx: Disable blit engine upscaling by default
- Temporary measure to keep regression testing on track.
2026-08-28 14:55:44 +03:00
kd-11 26209734e3 rsx: Fix potential section leak when discarding locked framebuffer region 2026-08-28 14:55:44 +03:00
kd-11 37d64bf887 rsx: Limit full range blit target invalidation to nul sections only 2026-08-28 14:55:44 +03:00
kd-11 e3585a4ec1 rsx: Ensure blit targets are always locked regardless of origin 2026-08-28 14:55:44 +03:00
kd-11 ac50c09b9d rsx: Fix BGRA8 gcm_format -> surface_format selection 2026-08-28 14:55:44 +03:00
kd-11 cb53f2c4d6 rsx: Fix build on non-windows platforms 2026-08-28 14:55:44 +03:00
kd-11 802320ec67 rsx: Allow blit engine to preserve resolution scaling
- Since we're using the surface cache for storage, might as well enable resolution scaling on blit resources.
2026-08-28 14:55:44 +03:00
kd-11 27bfd637e6 rsx: Move blit_engine_utils nested group to protected section (refactor part10) 2026-08-28 14:55:44 +03:00
kd-11 2caa367615 rsx: Move some blit engine helpers to cpp file (refactor part9) 2026-08-28 14:55:44 +03:00
kd-11 34c34504f3 rsx: Move blit functions to the subclass (refactor part7) 2026-08-28 14:55:44 +03:00
kd-11 5d8862f6dd rsx: Move blit engine target creation to separate function (refactor part6) 2026-08-28 14:55:44 +03:00
kd-11 eea763352a rsx: Move blit_src creation to a separate helper 2026-08-28 14:55:44 +03:00
kd-11 5b2039d588 rsx: Drop unused paths from blit engine (refactor part4)
- We now create all targets in the surface cache. We don't need to do any local scans.
2026-08-28 14:55:44 +03:00
kd-11 69ba2e2f14 rsx: Blit engine refactor part3
- Move some lambdas into the blit_engine_utils wrapper
2026-08-28 14:55:44 +03:00
kd-11 14b71c2e11 rsx: Refactor upload_scaled_image part2 2026-08-28 14:55:44 +03:00
kd-11 bbdf5465f9 rsx: Refactor upload_scaled_image part1
- Moves some common logic into a pseudo-namespace. More to come.
2026-08-28 14:55:44 +03:00
kd-11 985ac336f5 rsx: Minor despaghetification of some texture cache logic 2026-08-28 14:55:44 +03:00
kd-11 45c42814ef rsx: Fix blit surface intersection logic in the surface cache
- Ensure intersection results are committed by pushing a write barrier before the write tag operation
2026-08-28 14:55:44 +03:00
kd-11 f4a2b507f1 rsx: Move blit target storage to the surface cache 2026-08-28 14:55:44 +03:00
Elad 03d03b2bb4 PPU Debugger: Fix R0 insert to callstack 2026-08-27 23:04:19 +03:00
Elad 46718dcb33 PPU Debugger: Support tail calls in callstack 2026-08-27 23:04:19 +03:00
Megamouse 6567a5a2f8 Qt: Also search in notes of "All titles" in the patch manager 2026-08-26 20:15:41 +02:00
Megamouse 11aa943145 Qt: use hash instead of counter for identical patch names 2026-08-26 20:15:41 +02:00
Megamouse f2d44c63af rsx: default initialize some members 2026-08-26 20:15:41 +02:00
Megamouse 5d3625b7eb Fix typo c_moudles_per_jit 2026-08-26 20:15:41 +02:00
Walter 2416d65262 [SPU LLVM] SHUFB known special constants fast paths
Adds additional paths for the special index constants calculation where we know certain constants can't occur due to LLVM's known bits analysis. Also, adds a path for when we know that only the constants will be used.

This was based on patterns found in LBP2 and RE3.
2026-08-26 09:52:11 +03:00
schm1dtmac e8961edf40 [macOS] Disable Apple-specific hacks for formats now supported by MVK on Apple GPUs, enable async compute 2026-08-25 17:39:12 +02:00
BeezBumba fdcfded8df Add Big Picture Mode using RSX overlay UI 2026-08-25 11:11:08 +00:00
Megamouse 19b9c2e60b cellVdecGetPicItem: Fix potential use after free of AVFrame
The frames are protected by vdec->mutex.
But in cellVdecGetPicItem we fetched a raw pointer to picture.avf and
used it after releasing the lock.
2026-08-25 11:11:03 +02:00
schm1dtmac bd9c4705f2 [macOS] Attempt to hackfix the PPU LLVM compilation regression (#19103) 2026-08-25 09:32:12 +03:00
Antonino Di Guardo 448cc23fac Add Game Collections support (#19292) 2026-08-24 23:52:32 +00:00
Megamouse f9a843306f Fix some warnings 2026-08-25 00:32:39 +02:00
Megamouse 85c9fa215b Qt: improve ps move tracker dialog layout a bit 2026-08-25 00:32:39 +02:00
Megamouse 8a3061d175 Qt: add ps move default brightness
The RGB values will not be at 1% anymore, but the default brightness.
2026-08-25 00:32:39 +02:00
Megamouse 9ead7c34b1 Qt: don't update color sliders recursively with hue change 2026-08-25 00:32:39 +02:00
Megamouse 6a249ffdc9 Qt: set ps move slider ranges before connecting their signals
Signals are sent when the initial value is 0 and range doesn't contain 0
2026-08-25 00:32:39 +02:00
Megamouse b848546d19 Qt: fix some warnings in ps move dialog 2026-08-25 00:32:39 +02:00
digant73 3aea3b15dc Fix ISO timestamps 2026-08-24 05:12:07 +02:00
kd-11 071c9f10f1 rsx: Relax checking of NV4097_SET_SHADE_MODE inputs to match hw 2026-08-24 03:22:05 +03:00
Megamouse 68f260a698 Update Qt to 6.11.2 2026-08-23 19:11:06 +02:00
Megamouse 261b467b83 Qt: Allow to select ps move hue by mouse click 2026-08-23 15:24:13 +02:00
Megamouse 9bcd45d70c opencv: simplify includes. there's no need for photo 2026-08-23 15:24:13 +02:00
Megamouse 8bbdd3715a psmove: Add minor optimization for non diagnostic mode 2026-08-23 15:24:13 +02:00
Megamouse b8816a1e0e Update opencv to 4.14.0 2026-08-23 15:24:13 +02:00
Ani 5bc2928588 gui: Fix firmware install through drag-and-drop
Some browsers such as Firefox download the PS3UPDAT.pup file with a lowercase extension
2026-08-23 14:12:24 +02:00
kd-11 e678a8e572 rsx: Fix tiled region matching 2026-08-23 13:28:50 +02:00
Gabriel Costa 3aac7d776d rsx/fp: Improve DP3 instruction precision 2026-08-22 14:17:01 +00:00
RipleyTom 8bbcd5936d Bugfixes 2026-08-22 14:56:31 +03:00
Tagflag2d b97f4bd8da rsx: Implement flat shading semantics 2026-08-21 17:50:34 +00:00
RipleyTom 8fd2ae954d Filter UnlockTrophy reply 2026-08-21 07:35:12 +02:00
Megamouse 243d7db5b5 vfs: avoid double slash 2026-08-21 02:26:59 +03:00
Megamouse 809359cb20 sys_fs: simplify get_name 2026-08-21 02:26:59 +03:00
Megamouse bab81aa23e Fix rpcn type cast warnings 2026-08-20 11:03:16 +02:00
Megamouse 8a6c96745a Fix iso magic read check 2026-08-20 11:03:16 +02:00
Megamouse 358101c47b Fix unused variable warnings 2026-08-20 11:03:16 +02:00
yahfz c4eff69711 SPU LLVM: Document AVX-512 XFloat lowering 2026-08-20 09:36:19 +03:00
yahfz 5d2601599e [SPU LLVM] Optimize AVX-512 XFloat conversion 2026-08-20 09:36:19 +03:00
digant73 e5e280cd3f Fix duplicate path addition 2026-08-20 00:27:30 +02:00
Megamouse c122edd638 unpkg: Fix buffer size checks 2026-08-19 23:30:34 +02:00
Megamouse d12d8782af unpkg: Mark pkg installation as failed if any thread throws an exception 2026-08-19 23:30:34 +02:00
kd-11 64da425e81 gl: Fix copy_image_static behavior when formats are mismatched 2026-08-19 20:43:05 +02:00
kd-11 b78bae0b9f rsx: Integrate ROP remapping to the interpreter system
- Base pipelines have the remapping active, optimized variants can toggle it away.
2026-08-19 14:08:55 +03:00
kd-11 ca25fbaa5d vk/gl: Support ROP output remap in the interpreter 2026-08-19 14:08:55 +03:00
kd-11 323e2d35a2 rsx/fp: Implement support for ROP_OUTPUT_REMAP in the backends 2026-08-19 14:08:55 +03:00
kd-11 57ecb42433 rsx/fp: Plumb through support for channel remapping during ROP 2026-08-19 14:08:55 +03:00
kd-11 84ceef9717 rsx/glsl: Shrink command space in ROP_CONTROL structure to make room 2026-08-19 14:08:55 +03:00
kd-11 0dd3d6528c rsx/prog: Move in-shader color remap to FP prolog
- We need it for some other stuff
2026-08-19 14:08:55 +03:00
Antonino Di Guardo ddd82ecada Make optional VSH on File ➔ All Titles ➔ Create LLVM Caches dialog (#19270)
Make optional VSH CPU compilation on `File ➔ All Titles ➔ Create LLVM
Caches` dialog. By default it is now excluded due to VSH caches are
fully covered by the dedicated submenu `File ➔ Firmware`.
2026-08-19 08:15:27 +02:00
Ani 7973b8ac6d windows: Fix clang x64/arm64 builds 2026-08-18 21:54:09 +02:00
FlexBy420 3c15df4e4d Update sceNpTrophy.cpp 2026-08-18 14:19:42 +02:00
kd-11 719cf8a54a gl: Fix build warning 2026-08-18 13:47:28 +03:00
kd-11 1b879360b8 rsx: Fix OOB section writes generated due to mipmap dimension clamping 2026-08-18 13:47:28 +03:00
kd-11 ad059d03af vk: Avoid redundant copy when writing to mip level or Z layer 2026-08-18 13:47:28 +03:00
kd-11 78ba581137 vk: Extend copy image API to support 3D offsets and extents 2026-08-18 13:47:28 +03:00
kd-11 cd044148be gl: Avoid redundant copies when copying to mipmaps or 3D slices 2026-08-18 13:47:28 +03:00
kd-11 91cd82a0c2 gl: Extend copy image API to allow explicit 3D offsets 2026-08-18 13:47:28 +03:00
kd-11 e7c3d6ab26 gl: Implement support for explicit multi-layer image copy operations 2026-08-18 13:47:28 +03:00
kd-11 a88331bb22 rsx/vk: Implement support for multi-layer, multi-level and explicit mip/layer image transfers 2026-08-18 13:47:28 +03:00
kd-11 6892ee4c2e rsx: Fix mipmap gather source offsets 2026-08-18 13:47:28 +03:00
Megamouse 0059e4e92e unpkg: fix OOB read at end of file
Use sizeof(u128) instead of 16.
Clear padding after archive_read_block.
Use aligned_div instead of manually aligning blocks.
Fix local_buf size when using raw ptr of the original buffer.
2026-08-18 10:20:30 +02:00
Megamouse 46b7428fad unpkg: also check potential overflow in pkg data size check 2026-08-18 10:20:30 +02:00
Megamouse 582b5ba29e unpkg: fix OOB memset, use safe versions of write_to_ptr and read_from_ptr 2026-08-18 10:20:30 +02:00
FlexBy420 cb175278b6 RPCN: Sync trophies (#18760)
Add synching local trophies with RPCN server trophies, allows users to
essentially cloud save their trophies when they are connected to RPCN.

This PR also aims to add support for global earned % trophies simillar
to steam for RPCN part of website.

No local trophies and not connected to RPCN
<img width="1183" height="717" alt="obraz"
src="https://github.com/user-attachments/assets/f0b3add1-506d-43e5-8dae-cd34e041e2bd"
/>
After booting the game with RPCN enabled
<img width="1184" height="713" alt="obraz"
src="https://github.com/user-attachments/assets/d5992ddc-7fad-4b38-b4f9-006a832ffed5"
/>

RPCN Side PR
https://github.com/RipleyTom/rpcn/pull/140
2026-08-18 06:54:51 +02:00
yahfz 82164a54c1 [SPU LLVM] Avoid redundant XFloat normalization in SELB 2026-08-18 03:48:46 +02:00
Malcolmandjpolo1224 6161ecd7aa PPU: Stop inverting float-to-int saturation on ARM64
- This was breaking armored core 4/4a on ARM
- Original fix credit to jpolo1224 of armsx3 https://github.com/ARMSX2/ARMSX3/commit/87ccdb85152a707f5d0c8122ed39344b4648501e

Co-authored-by: jpolo1224 <[email protected]>
2026-08-18 03:12:13 +02:00
Megamouse de33fda28c rsx_debugger: fix g8b8 conversion 2026-08-17 22:42:05 +02:00
Neil Monday f9f88aa9e5 Use max() to bring negative floats up to 0.0 before uint conversion. 2026-08-17 15:17:17 +02:00
Ani 3be5aa99cc gui: Correctly disable the View Folder button 2026-08-17 02:22:11 +02:00
Zion Nimchuk 3e68a7f385 Add 60 second retry to translation downloads in CI to avoid rate limits 2026-08-17 01:20:35 +02:00
kd-11 9a4b849260 rsx: Fix fbo offset scaling when src and dst bpp is mismatched 2026-08-17 00:15:54 +03:00
kd-11 9a24c8d11f gl/vk: Fix flattened interpreter input subresource range computation 2026-08-17 00:15:54 +03:00
kd-11 0617eff348 rsx: Ensure ref_address is properly set for all sampled images 2026-08-17 00:15:54 +03:00
kd-11 003b368980 rsx: Drill down the copy specification from descriptors when handling dynamic copies 2026-08-17 00:15:54 +03:00
kd-11 6f5f198acd rsx: Fix check for cyclic ref in fast_fbo_check 2026-08-17 00:15:54 +03:00
kd-11 107b751a43 rsx: Enable fast path when scanning for 3D mipmaps 2026-08-17 00:15:54 +03:00
kd-11 4475671bbf RSX: Allow process_framebuffer_resource_fast to take in descriptors with an offset
- Allows to skip going through the merge route when we already have a good match
2026-08-17 00:15:54 +03:00
kd-11 7e35f59997 RSX: Implement host-side mipmap scanning for 3D textures 2026-08-17 00:15:54 +03:00
kd-11 970d745818 rsx: Respect mip levels actually used during image reconstruction 2026-08-17 00:15:54 +03:00
kd-11 adec3ae7f9 rsx: Implement per-mip-level size calculation logic and use it to properly compute 3D texture slice height 2026-08-17 00:15:54 +03:00
kd-11 5e2d0eb762 rsx: Fix incorrect calculation of texture size when border texels are present
- The computation did not match get_subresources_layout behavior.
2026-08-17 00:15:54 +03:00
kd-11 26782525f4 rsx: Fix get_texture_size for 3D textures with mipmaps
- Depth also shrinks for every mip level
2026-08-17 00:15:54 +03:00
kd-11 d0e6d4eefc rsx: Minor improvements to texture cache
- Adds depth to temp subresource key to avoid 3D mismatch (resample)
- Fix narrowing warning for block_h calculations
2026-08-17 00:15:54 +03:00
kd-11 f19d398bec rsx: Check for completeness in X when gathering slices
- This was intentionally ommitted as a speedhack before, but makes sense to check just in case.
2026-08-17 00:15:54 +03:00
kd-11 6b80ac4805 rsx: Simplify merged source sorting when selecting slices
- Sort ranges is a relic and the information is duplicated in the sort_list object
2026-08-17 00:15:54 +03:00
kd-11 13ceef9f46 rsx: Fix slice gather from local resource (e.g blit engine output) 2026-08-17 00:15:54 +03:00
Walter ffc50905a6 [SPU LLVM] Avoid GFNI combine bug in SHUFB
Due to a bug where `SHUFB`'s GFNI constant generation path expects to be combine using a select instead of a OR, it was causing issues with on non-AVX512 CPUs so support was reverted (see #19217). That can still happen on AVX512 CPUs when the shuffle is single source. This patch fixes it and re-lower the target requirements back to just GFNI by avoiding the OR well on the GFNI path. I also renamed a variable and added a comment to better clarify its behavior.
2026-08-16 19:35:42 +03:00
kd-11 cbc7b60ba5 rsx: Cleanup 2026-08-16 13:50:03 +03:00
kd-11 47efd770a8 rsx: Clean up get_merged_texture_memory_region
- Cleaner generation of src_area and dst_area outputs.
- Normalized comparisons in 1bpp space then convert to target space after.
2026-08-16 13:50:03 +03:00
kd-11 f53547b173 rsx: Refactor deferred_subresource constructor into discrete wrappers for each output intent
- Instead of filling over 10 arguments and having the ctor silently drop half of them, we create proper wrappers to construct objects for a singular purpose.
2026-08-16 13:50:03 +03:00
kd-11 cb5b866c61 rsx: Refactor deferred_subresource to be more explicit
- Use defined src and dst rects as well as the transformation if any to be applied.
2026-08-16 13:50:03 +03:00
Zion Nimchuk 2f3c0f04d2 Update docker with updated SDL3 2026-08-16 09:57:33 +02:00
schm1dtmac 3f493fb209 [Qt] Hide titlebars by default 2026-08-16 02:07:48 +02:00
Antonino Di Guardo f7eb0d8d76 Enrich game list title (#19229)
Add on Game List title a brief recap of total number of entries in the
list and total number of Disc, HDD and all the other remaining types of
content.
2026-08-15 23:19:01 +00:00
digant73 fc93d932c8 Swap PR number with PR text in update manager 2026-08-15 13:28:58 +02:00
digant73 3cbf9b8b6c fix crash with vfs exception 2026-08-15 04:39:42 +03:00
kd-11 12b1efc266 rsx/fp: Fix decoding of LOOP and REP instructions
- Verified with hardware tests. RSX does not support proper loops.
- The LOOP/REP instruction simply codes a "REPEAT n" instruction for a block of code.
- There is no accumulator register. The compiler emits a preamble inside the loop block to simulate the running counter.
- Oddly enough, the original start and step values are stored in the instruction but are unused. Maybe useful for debugging real hardware?
2026-08-14 11:15:20 +03:00
Megamouse 4c63acfb40 Qt: Add unofficial build warning 2026-08-14 02:07:18 +02:00
Megamouse 3f4364fe74 Qt: Decrease layout margin in settings_dialog 2026-08-14 01:02:56 +02:00
Ani ee43ab7362 Revert "[SPU LLVM] Decrease SHUFB's constant generation target requirements"
This reverts commit 26e37d8c8c.
2026-08-14 00:19:17 +02:00
Megamouse 2dc6cf014c Qt: add Open Custom Gamepad Config Folder action to game list context menu 2026-08-13 21:36:51 +02:00
Megamouse c285c2fb41 Qt: fix settings_dialog tab index 2026-08-13 19:14:26 +02:00
Megamouse c41595e79f Qt: implement auto_scroll_label and use it for the settings descriptions 2026-08-13 14:42:31 +02:00
Lalit Shankar Chowdhury bf541b5828 qt: make settings description static 2026-08-13 14:42:31 +02:00
Megamouse 41e2d101e7 Update discord-rpc 2026-08-13 11:55:39 +02:00
kd-11 c27b38f300 vk: Run GC on the driver manager thread 2026-08-13 11:39:34 +03:00
kd-11 5bd7fd7817 vk: Implement an asynchronous driver manager thread 2026-08-13 11:39:34 +03:00
kd-11 7f9b8d23cd vk: Enhanced thread safety when handling the query subpool allocation cache 2026-08-13 11:39:34 +03:00
kd-11 01e3fed466 vk: Enhanced thread safety when handling descriptor subpools 2026-08-13 11:39:34 +03:00
kd-11 ea0e10e704 vk: Ensure all drawable surfaces invalidate fbo cache on deletion 2026-08-13 11:39:34 +03:00
kd-11 c2eb11eae6 vk: Seal some data leaks with the framebuffer cache
- Maybe fixes some device lost crashes when running in VRAM-constrained situations
2026-08-13 11:39:34 +03:00
Walter 26e37d8c8c [SPU LLVM] Decrease SHUFB's constant generation target requirements
The constant generation AVX512-ICL path only requires the feature GFNI, which exists on non-AVX512 CPUs. This was a hold-over from when the shuffle step was merged together. (The proceeding unsigned minimum is from SSE2)
2026-08-12 15:38:43 +03:00
Lalit Shankar Chowdhury 9b1eb45a47 PPU: implement AVX2 path for gv_rol32 2026-08-12 14:01:33 +03:00
kd-11 92870a3d4e rsx: nv0039 cleanup
- Enforce some behavior observed on real hardware
2026-08-12 03:33:10 +03:00
Nick Gregory f7cfdc6570 rsx: Fix nv0039 image (de)interleaving functionality 2026-08-11 19:40:15 +00:00
Megamouse a603fbba8c Update discord-rpc 2026-08-11 15:52:57 +02:00
Megamouse db907a2586 TAR: Simplify result string creation 2026-08-11 10:55:02 +02:00
Megamouse b9cee7a3a9 Fix IsPathInsideDir arguments during file extraction 2026-08-11 10:55:02 +02:00
Megamouse d7c15851b4 Qt: run initial dialogs on the main event loop 2026-08-11 08:56:42 +02:00
Megamouse a723152dea Qt: make sure progress dialog stays hidden in the beginning 2026-08-11 08:56:42 +02:00
RipleyTom 2f4034590f sys_net: fix possible event gap in recvfrom 2026-08-10 20:03:56 +03:00
RipleyTom 7b6a8cc2d6 sys_net: more fixes
Add parameter checks to sys_net_infoctl
Fix P2P getpeername() fatal
Fix possible deadlock in tcp_timeout_monitor
Remove vport assert from poll
Add upgrade path for new P2PS state in savestates
Fix P2PS close_stream() not waking threads
Fix possible deadlock in P2PS connect()
Ensure RST is sent on unhandled packets
2026-08-10 20:03:56 +03:00
RipleyTom 6df35891ad sys_net: fixes and improvements
Add thread lock for p2p sockets(used for poll/select to avoid event gap)
Fix poll/select returning EINTR if no sockets were polled
Implement sys_net_infoctl cmd 6(sys_net_get_sockinfo)
Cleanup sys_net_infoctl cmd 9 code
Add SYS_NET_STATE_* values to header
Rewrite P2P and P2PS poll/select implementations
Add extra P2PS state for disconnected and report it as readable with 0 bytes(EOF)
Fix P2PS sockets connecting without being bound first missing hashmap insert
Add missing error check in sceNpSignalingActivateConnection
2026-08-10 20:03:56 +03:00
Megamouse eaef23d43a unself: fix overflow checks 2026-08-10 17:35:26 +02:00
Megamouse 8cde4b2153 unself: fix more potential OOB 2026-08-10 17:35:26 +02:00
Megamouse ed3af84437 unself: add some sanity checks and optimize uncompress a bit 2026-08-10 17:35:26 +02:00
Megamouse 81b85e55e4 unself: cache buffer during decrypt 2026-08-10 17:35:26 +02:00
Megamouse 9af11f5cf1 unself: add some OOB checks 2026-08-10 17:35:26 +02:00
Megamouse d6d5c60823 ISO: mark archive as invalid on error and add sanity checks 2026-08-10 14:45:00 +02:00
Megamouse 0230580a88 ISO: exit loop at end of file 2026-08-10 14:45:00 +02:00
Megamouse ae98583ed2 ISO: ensure filename size during parsing 2026-08-10 14:45:00 +02:00
Megamouse 628ea5ec15 ISO: ensure we're not trying to install files outside of their parent 2026-08-10 14:45:00 +02:00
Megamouse 400d9a1c24 ISO: fix potential overflow 2026-08-10 14:45:00 +02:00
Megamouse 58ef670992 Add file path validations during extraction 2026-08-10 12:35:49 +02:00
Megamouse de13ae4753 Initialize emu callbacks before initializing the emulator 2026-08-10 12:35:49 +02:00
Megamouse f48ca59235 unedat: fix division by 0 2026-08-10 10:53:30 +02:00
Megamouse 804e06356b unedat: fix some data types to prevent overflow 2026-08-10 10:53:30 +02:00
Megamouse 70e3e15e2f unedat: Fix more potential OOB reads 2026-08-10 10:53:30 +02:00
Megamouse 852407b8cb unedat: don't use raw pointers everywhere and use more const 2026-08-10 10:53:30 +02:00
Megamouse f945ab62c0 Fix steam shortcut creation
Look for AutoLogin by first.
Look for MostRecent and Timestamp as fallbacks.
2026-08-10 09:10:42 +02:00
Megamouse ec208289fa elf: remove unnecessary -1 on both sides of a size check to prevent underflow 2026-08-10 02:34:41 +02:00
Megamouse b93c4733a8 Fix OOB buffer read in TRPLoader::LoadHeader 2026-08-10 01:33:53 +02:00
Walter 6d42df0ffc CPUTranslator: Add missing Intel Intrinsic header
MSVC compiles without it, but other compilers need it to be explicitly included.
2026-08-09 09:13:41 +03:00
Walter 502ea1f436 CPUTranslator: Additional constant folding for intrinsics
LLVM is unable to constant fold its X86 intrinsics directly, so this patch adds manual evaluation by calling their equivalent Intel Intrinsic.
2026-08-09 09:13:41 +03:00
Lalit Shankar Chowdhury 8d034a36e8 vk: Sort enumerated GPUs according to priority 2026-08-08 18:39:16 +03:00
Lalit Shankar Chowdhury 75fea2216b Qt: Remember last used path when adding games from folder or ISO
Signed-off-by: Lalit Shankar Chowdhury <[email protected]>
2026-08-08 16:29:09 +02:00
Florin9doi 3d587726a2 spu: Clear the MFC_LSA_offs bits higher than the limit 2026-08-05 15:19:12 +03:00
Sanjay Govind f3f52feddf Update SDL to 3.4.14 2026-08-05 08:47:26 +02:00
AniandMegamouse 652cf60bfe Update .github/ISSUE_TEMPLATE/1-regression-report.yml
Co-authored-by: Megamouse <[email protected]>
2026-08-04 22:34:03 +02:00
Ani 96fee314f0 .github: Improve regression issue template
- Require 3 log files
- Remove quick summary
- Remove other details
- Add dropdown to confirm user has uploaded the required log files
- Specify visual capture as RSX .rrc or RenderDoc .rdc
2026-08-04 22:34:03 +02:00
Megamouse a6d07c0e55 rsx: fix exception data_heap in debug builds
The AUDIT in .inside() triggers whenever m_cached_buffer_range was not
assigned yet.
Added another AUDIT to ensure that m_cached_buffer_range is valid after
assignment.
2026-08-04 08:32:51 +02:00
Antonino Di Guardo 4214dff35e rsx: Apply alpha test for all primitive types
Enables alpha test for point sprites, lines, etc as required by the GL spec.
2026-08-03 22:58:25 +00:00
Megamouse 228d04195d Fix infinite ensure recursion in debug builds 2026-08-03 23:33:45 +02:00
Megamouse ee8988ea21 msvc: fix openal debug build 2026-08-03 22:45:24 +02:00
Megamouse efee6e2423 msvc: fix libprotobuf-lite debug dependency 2026-08-03 21:45:12 +02:00
Elad c36590bb06 VSH fix 2026-08-03 18:53:00 +03:00
Elad daa437904e Fix memory leak in cellCamerEnd
cellCameraOpenEx already dealloacted pbuf, but this was not updated by the internal structure and caused cellCameraEnd to call vm::dealloc on the same addresses again. This can lead to cellCameraEnd to deallocate memory that is not related to cellCamera at all!
2026-08-03 11:20:53 +03:00
Elad df47950f98 lv2: Support more formatters for CellError 2026-08-03 11:20:53 +03:00
Elad 2d88aefbba Implement vm::hle_malloc_allocator
Memory allocator using C-memalign and C-free functions of CellOS.
Safer alternative to page allocator in HLE.
2026-08-03 11:20:53 +03:00
Elad 7bdd927957 Ancient emulation bug fixes
* Register wait flat for sys_overlay_load_module and sys_overlay_load_module_by_fd
* Register wait flag for cellOskDialogLoadAsync
* Register wait flag for cellCameraOpenEx
2026-08-03 11:20:53 +03:00
Alasonga f61c0cb5df cmake: fix Windows/MSVC build issues with zlib path and wolfSSL TLS1.3 2026-08-03 09:24:56 +02:00
Megamouse 59e59c7de6 Fix recording codec selection 2026-08-02 23:46:45 +02:00
Megamouse 401cc4ae8f recording: support AV_SAMPLE_FMT_FLT 2026-08-02 23:46:45 +02:00
Megamouse 9d91ba6168 Log recording config 2026-08-02 23:46:45 +02:00
Elad a0bebfa5ca Remove unused setting 2026-08-02 15:54:27 +03:00
Elad d7ed328f4f Fix vm::writer_lock deadlock-inducing usage on PPU 2026-08-02 15:54:27 +03:00
Megamouse d509eb8664 qt: reduce lines of code in settings_dialog 2026-08-02 09:53:33 +02:00
Megamouse 84d5056e44 Update FAudio to 26.08 2026-08-02 00:11:19 +02:00
Antonino Di Guardo f113e7bb93 rsx/copypasta: Fix reversed 2-sided lighting input registers for FS stage (#19123) 2026-08-01 12:48:07 +00:00
digant73 5295f3ac18 fix emulator crash on crashed game window closure 2026-08-01 01:58:20 +03:00
Ani cd814f8c92 rpcs3_version: Bump to 0.0.42 2026-07-31 20:14:38 +02:00
Vishrut Sachan 354e1170ae overlay: Add trophy list sorting options 2026-07-31 19:20:38 +02:00
Ani ca3e5b268e ci/bsd: Compile with clang 22 2026-07-31 18:41:29 +02:00
Walter 27f0e879d3 [SPU LLVM] Shorten FI's dependency chain
Shortens the dependency chain in the `FI` instruction by calculating the exponent adjustment and clamping separately from the mantissa. They can be safely combine as `+-FLT_MAX` overwrites the mantissa as all its bits are set.

Also fixes an AVX512 SNaN clamping issue and poor code gen on pre AVX2 targets.
2026-07-31 10:16:32 +03:00
Megamouse ed195ef077 rsx: fix some msvc warnings 2026-07-31 07:41:40 +02:00
Ani f1a858f351 ci: Fetch llvm-devel on FreeBSD
Required to have latest clang-devel
2026-07-30 22:39:41 +02:00
Ani b57cca4ae4 ci: Specify LLVM22 on FreeBSD build
RPCS3 does not yet support building with newer LLVM
2026-07-30 22:39:41 +02:00
Ani 75ec6a8dca ci: Update FreeBSD to 14.4 2026-07-30 22:39:41 +02:00
kd-11 76de5ba764 rsx: Fix interpreter error spam due to incorrect format lookup 2026-07-30 20:12:21 +03:00
kd-11 ff162b9c99 rsx/doc: Update comments regarding the WCB requirement hack 2026-07-30 18:02:06 +03:00
kd-11 5017397c4e gl/vk: Implement section load from CPU during subresource gather operations 2026-07-30 18:02:06 +03:00
kd-11 4c52ab803c rsx: Refactor texture layout decoder to support arbitrary image sections as input 2026-07-30 18:02:06 +03:00
kd-11 d277003ef7 rsx: Skip invalid mip levels during texture upload 2026-07-30 18:02:06 +03:00
kd-11 c2abae56cd rsx: Refactor temporary subresource handling 2026-07-30 18:02:06 +03:00
kd-11 a5bbb23273 rsx: Set data load flags when slice gathering is incomplete 2026-07-30 18:02:06 +03:00
kd-11 a2c78dd32c rsx: Set bg load flag when re-assembling textures on the GPU 2026-07-30 18:02:06 +03:00
Megamouse a7fe472583 Allow to skip empty strings in fmt::merge 2026-07-30 02:35:53 +02:00
Sanjay Govind bad72a3844 add missing vids and pids for wii MPA devices 2026-07-30 01:43:13 +02:00
Darkhost1999 81431604ec UI/UX: Add Categories Broken and Completed to Filter Game List (#19106)
Adds filtering options to manage the game list
The existing option `hide` does not feel sufficient because there are
different reasons a user may want to hide a game

Adds option Broken
Let's the user define games as broken.

Adds an option for completed
Let's the user define games as completed.

This uses copy pasta of existing code.
AI was not used. I used github search, control + F, git blame, and
intellisense.
I understood build errors, made necessary edits as needed, compiled and
tested the code.

The options show_hidden, show_broken, show_completed do not show up in
the current_settings.ini file until you toggle the option under view.
This happens on Master as well with the option show_hidden. The settings
show up in the ini file in the order that they are created this is not a
bug it is working by design.
2026-07-30 01:11:19 +02:00
primetime43 884652109c Mark invite list dirty only on add
Move `m_list_dirty = true` inside the successful insert path in `add_game_invite`, so the friends invite overlay only refreshes when a new invite is actually added instead of on duplicate/no-op updates.
2026-07-29 19:10:39 +02:00
primetime43 709016a3ab Fix friends invite lifecycle in overlay
Track RPCN invite messages in a dedicated in-memory list, append new invites from the callback, and remove invites immediately after accept/dismiss so stale entries are not reprocessed on reload. Also make `np_handler::select_invitation` return `bool` consistently and clear selected invitation data if the system notification fails.
2026-07-29 19:10:39 +02:00
primetime43 50c78cb0e1 Fix style issues to follow RPCS3 guide
Fix style issues to follow RPCS3 guide
2026-07-29 19:10:39 +02:00
primetime43 d4a37a1dd4 Add game invite handling to friends overlay #18417
Split the friends dialog invite flow into friend requests and game invitations, add a dedicated game invite page, and wire accept/reject actions with the proper prompts. Accepting now routes through a new `np_handler::select_invitation` helper that validates invite messages, notifies the game, and marks invites as used. Also added locking around selected-message state in `np_handler` to make selection access thread-safe, plus new localized strings for the added UI text.
2026-07-29 19:10:39 +02:00
Antonino Di Guardoandkd-11 cf9133abed fix 1st regression on black textures in Sonic Generations
Fix OOB read in inner MSAA texel lookup for the software filter.

---------

Co-authored-by: kd-11 <[email protected]>
2026-07-28 22:22:36 +00:00
isztldav b6ee57853f Fix value assignment in iota16
iota16() discarded the _mm_add_epi16 result, so `values` never advanced and every 8-element block was written as 0..7 instead of a rising sequence
2026-07-28 21:39:19 +00:00
Megamouse b778355c68 Remove outdated LLVM ifdefs 2026-07-28 21:24:05 +02:00
Megamouse 831a078e3f Replace some abort() calls with fmt::throw_exception 2026-07-28 18:41:37 +02:00
Megamouse 0d999c08c4 vk: remove unused setting 2026-07-28 17:39:20 +03:00
Elad d3abc6eee3 Improve logging of RawSPU MMIO
Reduce spam and add value.
2026-07-28 12:16:35 +03:00
Elad 942feb64a3 Fix Emu.IsVsh() to fix liblv2.sprx load for PS1 classics 2026-07-28 12:16:35 +03:00
Elad 5e8ba021ac SPU/ARM64: Implement RawSPU MMIO on ARM 2026-07-28 12:16:35 +03:00
Megamouse 22d9cd0424 Identify DLC based on package_type 2026-07-28 07:28:05 +02:00
Megamouse dbc0ab4821 Use localization for title and changelog if possible 2026-07-28 07:28:05 +02:00
Megamouse 4bd4fc6a5e Update fusion to 1.3.2 2026-07-27 16:18:26 +02:00
Megamouse 9173ff1657 Fix some warnings 2026-07-27 16:18:26 +02:00
Megamouse 4add14cb72 Fix recording encoder selection
Codecs are identified by name, not by ID.
Let's keep the ID as fallback instead.
2026-07-27 16:18:26 +02:00
Megamouse 7a3deb649f Fix package install failure warning message 2026-07-27 13:33:27 +02:00
kd-11 a1deb2921c vk: Port MSAA and D24S8 redirection flattening logic from ogl 2026-07-27 01:40:53 +03:00
kd-11 3ac6ce68d4 gl: Handle edge cases in the interpreter sampler flattener
- Handle edge case where both MSAA and redirect are set
- Properly configure the descriptor for caching
- Cleanup and simplification
2026-07-27 01:40:53 +03:00
kd-11 7919f44b9b rsx: Autogenerate image attributes from RSXTexture wrappers 2026-07-27 01:40:53 +03:00
kd-11 0705c1b0c4 rsx: Minor fixes to improve subresource cache coherency 2026-07-27 01:40:53 +03:00
kd-11 709acc39ca rsx: Minor refactor to prep for surface cache access to texture cache helpers 2026-07-27 01:40:53 +03:00
kd-11 d3ef2822f8 gl: Flatten redirected depth and MSAA images to 1spp color images for interpreter 2026-07-27 01:40:53 +03:00
kd-11 3164e6fe46 gl: Fix interpreter setup when no textures are in use 2026-07-27 01:40:53 +03:00
Megamouse 24fbafdb1d Update llvm to 22.1.8 2026-07-26 18:42:53 +02:00
Megamouse 428599535b VS: Make cmake build commands multiline 2026-07-26 18:42:53 +02:00
kd-11 79822e1ac5 rsx: Minor optimization in LIT emulation 2026-07-26 16:03:08 +03:00
kd-11 4332190805 rsxfp/interpreter - Fix IFE decoding 2026-07-26 16:03:08 +03:00
kd-11 0e44b93c69 rsxfp/interpreter - Fix 0 iteration edge case in IFE 2026-07-26 16:03:08 +03:00
kd-11 7a24caf715 rsxvp/interpreter - Fix CLB stack overflow 2026-07-26 16:03:08 +03:00
kd-11 04dd333f8d rsxfp/interpreter - Handle loop with 0 iterations 2026-07-26 16:03:08 +03:00
kd-11 969913e3a7 rsxvp/interpreter - Guard against stack overflow during subroutine calls 2026-07-26 16:03:08 +03:00
kd-11 2e1e416c35 rsxvp/interpreter - rewrite register output blocks 2026-07-26 16:03:08 +03:00
kd-11 e59af03ae2 rsx: Re-implement support for LIT instruction 2026-07-26 16:03:08 +03:00
kd-11 84b905dd69 rsxfp/interpreter - Flush zero to destination register if instruction is unimplemented. 2026-07-26 16:03:08 +03:00
kd-11 429f1fbcbb rsxfp/interpreter - Clamp SQRT inputs to match decompiler 2026-07-26 16:03:08 +03:00
kd-11 22f8cb040a rsxfp/interpreter - Update PK16/UP16 to match fixed variants in the decompiler 2026-07-26 16:03:08 +03:00
kd-11 88569563d8 rsxfp/interpreter - Fix loop counter bug 2026-07-26 16:03:08 +03:00
kd-11 28b3deaf8e rsxfp/interpreter - Fix commit of CC register writes to take SAT and SCALE into account
- Requires HWTEST but this matches the decompiler behavior
2026-07-26 16:03:08 +03:00
kd-11 9e2b54e6ac rsxfp/interpreter - Avoid OOB writes in register init loop 2026-07-26 16:03:08 +03:00
kd-11 696fdc3059 rsxfp/interpreter - Fix typo in LRP instruction emulation
- RSX-native instruction has the operands reversed
2026-07-26 16:03:08 +03:00
kd-11 2484984a31 rsxfp/interpreter - Check for instruction cond before executing RET/BRK 2026-07-26 16:03:08 +03:00
kd-11 cb4914754a rsxfp/interpreter - Fix IFE ELSE address computation 2026-07-26 16:03:08 +03:00
kd-11 b39b7a23dc rsxvp/interpreter - Rebase BRA input address before jump 2026-07-26 16:03:08 +03:00
kd-11 11e147c646 rsxvp/interpreter - Fix oob writes when flushing instruction outputs to export registers 2026-07-26 16:03:08 +03:00
kd-11 1e14e7521b rsxvp/interpreter - Fix oob writes if ARL data is corrupted 2026-07-26 16:03:08 +03:00
kd-11 a013b60cde rsxvp/interpreter - Fix CAL/RET stack underflow bug 2026-07-26 16:03:08 +03:00
kd-11 24ba41a3e1 rsxvp/interpreter - Fix computation of instruction addresses 2026-07-26 16:03:08 +03:00
Megamouse 7a90d09cfe Qt: move guest memory dump code to own class 2026-07-23 10:58:18 +02:00
caner 5ecfc95c13 Qt: add guest memory dump utility (#19068)
This adds a tool that writes a snapshot of the full PS3 guest address
space to disk for offline analysis.

This tool produces a flat image that any hex editor or script can index
directly by guest address. It dumps allocated PS3 guest memory only, not
RPCS3 host-process memory, host registers, or GPU-side state.

What it does:

1. Pauses emulation and waits up to five seconds for every PPU, SPU, and
RSX thread to settle. If they do not settle, nothing is written.
2. Copies every allocated guest page into an intermediate buffer on a
named worker thread, then writes it to a sparse `guest_memory.bin` whose
file offset equals the PS3 effective address. Reads go through
`vm::g_sudo_addr` so guest protected pages are captured too.
3. Saves each live SPU thread's 256 KB local store to its own file, with
its ID, LV2 ID, PC, and type recorded.
4. Writes `manifest.json`, listing every allocated region with its
addresses and permissions, the storage mode, and the SPU local-store
table.
5. Resumes emulation.

The menu entry is under Utilities next to Memory Viewer and is enabled
while a game is loaded. Free space is checked before writing. If sparse
file setup fails, the incomplete attempt is removed and the user can
choose another destination or cancel. Failed or cancelled dumps remove
their output folder instead of leaving a partial image.

Tested on Windows using an NTFS destination with a build from this
branch: dumped a running game with 479,535,104 allocated guest bytes
across 76 regions and five SPU local stores. The image was sparse, its
offsets matched guest addresses, and emulation resumed cleanly. The
sparse file failure path was also exercised with a temporary local test:
choosing another location reopened the destination picker, while
cancelling aborted the attempt without leaving partial output. Runtime
behavior on Linux and macOS is untested.

The first draft of this implementation was AI assisted. I reviewed and
adjusted the code and tested the Windows/NTFS path myself. I am happy to
rework anything or answer any questions.
2026-07-23 00:08:05 +00:00
Megamouse 8604f1c5d8 cli: allow to boot last savestate of a game 2026-07-22 09:13:41 +02:00
RipleyTom 8b05c8cc1f bugfixes 2026-07-21 21:49:00 +03:00
Elad d75543a5b1 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 21:49:00 +03:00
RipleyTom 2aeb08f929 Fix: get_known_bits fix 2026-07-21 21:49:00 +03:00
Elad 85c59207f7 LLVM: Improve v128 constant extraction 2026-07-21 20:35:56 +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 RattiandElad 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 <[email protected]>
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
EladandMegamouse b90eef3fa7 PPU LLVM: Fix core_lock locking
Co-Authored-By: Megamouse <[email protected]>
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 HotchkissandClaude Opus 4.8 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 <[email protected]>
2026-06-24 02:00:35 +03:00
Christopher HotchkissandClaude Opus 4.8 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 <[email protected]>
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
Rad0vanandClaude Opus 4.8 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) <[email protected]>
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) <[email protected]>
(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
schm1dtmacandElad 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 <[email protected]>
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
HaxyandElad 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 <[email protected]>
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 <[email protected]>
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
digant73andMegamouse 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 <[email protected]>

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
983 changed files with 60677 additions and 22850 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 \
+12 -62
View File
@@ -9,36 +9,12 @@ AVVER="${COMM_TAG}-${COMM_COUNT}"
export LVER="${COMM_TAG}-${COMM_COUNT}-${COMM_HASH}"
echo "AVVER=$AVVER" >> .ci/ci-vars.env
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
brew update
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 || true
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 [email protected] 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 protobuf || true
fi
# Clang depends on LLVM_COMPILER_VER so it needs to be installed here.
sudo port install "clang-$LLVM_COMPILER_VER"
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
export WORKDIR;
WORKDIR="$(pwd)"
@@ -66,28 +42,25 @@ cd "$WORKDIR"
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 SDL3_DIR="/opt/local/lib/cmake/SDL3"
export OpenCV_DIR="/opt/local/libexec/opencv4"
export PATH="/opt/local/libexec/llvm-$LLVM_COMPILER_VER/bin:/$WORKDIR/qt-downloader/$QT_VER/clang_64/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:$PATH"
export LDFLAGS="-L/opt/local/lib -Wl,-rpath,/opt/local/lib"
export VULKAN_SDK="/opt/local"
export LLVM_DIR="/opt/local/libexec/llvm-$LLVM_COMPILER_VER"
export PATH="/opt/homebrew/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
VULKAN_SDK="$BREW_PATH/opt/molten-vk"
ln -s "$BREW_PATH/opt/vulkan-loader/lib/libvulkan.dylib" "$VULKAN_SDK/lib/libvulkan.dylib"
export LLVM_DIR
LLVM_DIR="$BREW_PATH/opt/llvm@$LLVM_COMPILER_VER"
# Pull all the submodules except some
# shellcheck disable=SC2046
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/SDL/ && !/feralinteractive/ { print $3 }' .gitmodules)
git submodule -q update --init --depth=1 --jobs=8 $(awk '/path/ && !/llvm/ && !/opencv/ && !/libsdl-org/ && !/feralinteractive/ && !/curl/ && !/zlib/ { 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}" \
@@ -102,29 +75,6 @@ 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=$?;
+5 -2
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,7 +37,7 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; then
# Download translations
mkdir -p "./AppDir/usr/translations"
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
ZIP_URL=$(curl -fsSL --retry 3 --retry-delay 60 "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
| grep "browser_download_url" \
| grep "RPCS3-languages.zip" \
| cut -d '"' -f 4)
@@ -42,7 +45,7 @@ if [ "$DEPLOY_APPIMAGE" = "true" ]; 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" || {
curl -fsSL --retry 3 --retry-delay 60 -o translations.zip "$ZIP_URL" || {
echo "Failed to download translations.zip. Continuing without translations."
exit 0
}
+18 -28
View File
@@ -5,15 +5,12 @@ 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/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"
sed -i '' "s/.\//..\/..\/..\/Frameworks\//g" "rpcs3.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json"
cp "$(realpath $BREW_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++abi.1.0.dylib)" "rpcs3.app/Contents/Frameworks/libc++abi.1.dylib"
cp "$(realpath $BREW_PATH/opt/gcc/lib/gcc/current/libgcc_s.1.1.dylib)" "rpcs3.app/Contents/Frameworks/libgcc_s.1.1.dylib"
rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
"rpcs3.app/Contents/Frameworks/QtQml.framework" \
"rpcs3.app/Contents/Frameworks/QtQmlModels.framework" \
@@ -26,39 +23,32 @@ rm -rf "rpcs3.app/Contents/Frameworks/QtPdf.framework" \
../../.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 || \
mkdir -p "rpcs3.app/Contents/Resources/translations"
ZIP_URL="https://github.com/RPCS3/rpcs3_translations/releases/latest/download/RPCS3-languages.zip"
echo "Downloading translations from: $ZIP_URL"
if curl -fsSL --retry 3 --retry-delay 60 "$ZIP_URL" -o "translations.zip"; then
echo "Successfully downloaded translations."
if unzip -o translations.zip -d "rpcs3.app/Contents/Resources/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
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 || true
cp $QT_TRANS/qt_*.qm rpcs3.app/Contents/Resources/translations
cp $QT_TRANS/qtbase_*.qm rpcs3.app/Contents/Resources/translations
cp $QT_TRANS/qtmultimedia_*.qm rpcs3.app/Contents/Resources/translations
rm -f rpcs3.app/Contents/Resources/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
# NOTE: "--deep" is deprecated
codesign --deep -fs - RPCS3.app
@@ -66,7 +56,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"
+3 -2
View File
@@ -24,10 +24,11 @@ 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
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
ZIP_URL=$(curl -fsSL --retry 3 --retry-delay 60 "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
| grep "browser_download_url" \
| grep "RPCS3-languages.zip" \
| cut -d '"' -f 4)
@@ -35,7 +36,7 @@ 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" || {
curl -fsSL --retry 3 --retry-delay 60 -o translations.zip "$ZIP_URL" || {
echo "Failed to download translations.zip. Continuing without translations."
exit 0
}
+3 -2
View File
@@ -14,10 +14,11 @@ 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
ZIP_URL=$(curl -fsSL "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
ZIP_URL=$(curl -fsSL --retry 3 --retry-delay 60 "https://api.github.com/repos/RPCS3/rpcs3_translations/releases/latest" \
| grep "browser_download_url" \
| grep "RPCS3-languages.zip" \
| cut -d '"' -f 4)
@@ -25,7 +26,7 @@ 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" || {
curl -fsSL --retry 3 --retry-delay 60 -o translations.zip "$ZIP_URL" || {
echo "Failed to download translations.zip. Continuing without translations."
exit 0
}
+1 -1
View File
@@ -8,7 +8,7 @@ sed -i '' 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
export ASSUME_ALWAYS_YES=true
pkg info # debug
# WITH_LLVM
# WITH_LLVM and Clang compiler
pkg install "llvm$LLVM_COMPILER_VER"
# Mandatory dependencies (qtX-base is pulled via qtX-multimedia)
+2 -2
View File
@@ -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"
+32 -25
View File
@@ -7,14 +7,7 @@ body:
attributes:
value: |
# Summary
Please do not ask for help or report compatibility regressions here, use [RPCS3 Discord server](https://discord.gg/rpcs3) or [forums](https://forums.rpcs3.net/) instead.
- type: textarea
id: quick-summary
attributes:
label: Quick summary
description: Please briefly describe what has stopped working correctly.
validations:
required: true
Please do not ask for help here, use the [RPCS3 Discord server](https://discord.gg/rpcs3) or the [RPCS3 Forum](https://forums.rpcs3.net/) instead.
- type: textarea
id: details
attributes:
@@ -26,21 +19,29 @@ body:
attributes:
value: |
# Identify the regressed build
Please provide the _exact_ build (or commit) information that introduced the regression you're reporting.
Please provide the _exact_ build information that **introduced** the regression you're reporting (i.e. the first version where it happens).
* Please see [How to find the build that caused a regression](https://wiki.rpcs3.net/index.php?title=Help:Using_different_versions_of_RPCS3#How_to_find_the_build_that_caused_a_regression.3F) in our wiki.
* You can find [History of RPCS3 builds](https://rpcs3.net/compatibility?b) here.
* You can find the [History of RPCS3 builds](https://rpcs3.net/builds) here.
Make sure you're running with settings as close to default as possible
* **Do NOT enable any emulator game patches when reporting issues**
* Only change settings that are required for the game to work
* **Only change settings that are required for the game to work**
- type: input
id: regressed-build
id: last-good-build
attributes:
label: Build with regression
description: Provide _exact_ build (or commit) information that introduced the regression you're reporting.
label: Last working build
description: Provide the _exact_ last working build. This needs to be the build right before the first broken build.
placeholder: v0.0.23-13948-31df99f7
validations:
required: true
- type: input
id: first-bad-build
attributes:
label: First broken build
description: Provide the _exact_ first broken build. This needs to be the build right after the last working build.
placeholder: v0.0.23-13949-d1a46b49
validations:
required: true
- type: markdown
attributes:
value: |
@@ -56,12 +57,25 @@ body:
- type: textarea
id: logs
attributes:
label: Attach two log files
label: Attach 3 log files
description: |
Attach one file for the build with regression and another for a build that works.
* A RPCS3 log file for the last working build
* A RPCS3 log file for the first broken build
* A RPCS3 log file for the latest master build (not required if latest master build is the first broken build)
Drag & drop the files into this input field, or upload them to another service (f.ex. Dropbox, Mega) and provide a link.
validations:
required: true
- type: dropdown
id: require-log-files
attributes:
label: I have attached all 3 required log files
options:
- "Yes"
- "No"
default: 1
validations:
required: true
- type: markdown
attributes:
value: |
@@ -73,8 +87,8 @@ body:
- type: textarea
id: captures
attributes:
label: Attach capture files for visual issues
description: Compress your capture with 7z, Rar etc. and attach it here, or upload it to the cloud (Dropbox, Mega etc) and add a link to it.
label: Attach the RSX (.rrc) or RenderDoc (.rdc) capture files for visual issues
description: Compress your capture with .7z, .gz, etc. and attach it here, or upload it to another service (f.ex. Dropbox, Mega) and provide a link.
validations:
required: false
- type: textarea
@@ -84,10 +98,3 @@ body:
description: Provide information about your system, such as operating system, CPU and GPU model, GPU driver version and other information that describes your system configuration.
validations:
required: false
- type: textarea
id: other-details
attributes:
label: Other details
description: Include anything else you deem to be important.
validations:
required: false
+9
View File
@@ -0,0 +1,9 @@
ports:
- name: abseil
- name: ccache
- name: gtest
- name: opencv4
- name: sdl3
- name: vulkan-headers
- name: vulkan-loader
- name: MoltenVK
+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'
+51
View File
@@ -0,0 +1,51 @@
name: Label PRs
on:
pull_request_target:
types:
- opened
- edited
jobs:
Label_PRs:
name: Label from title and linked issues
runs-on: ubuntu-latest
if: github.repository == 'RPCS3/rpcs3'
permissions:
issues: read
pull-requests: write
steps:
- name: Add labels from title and linked issues
uses: actions/github-script@v9
with:
retries: 3
script: |
const AREAS = [
'Build and CI', 'CLI', 'Filesystem', 'GUI', 'Input', 'ISO', 'Localization', 'Overlay', 'Render: Vulkan', 'RSX', 'Savestates',
];
const {repository: {pullRequest: pull}} = await github.graphql(`
query($owner: String!, $repo: String!, $number: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $number) {
labels(first: 100) { nodes { name } }
closingIssuesReferences(first: 50) { nodes { labels(first: 100) { nodes { name } } } }
timelineItems(itemTypes: [UNLABELED_EVENT], last: 100) { nodes { ... on UnlabeledEvent { label { name } } } }
}
}
}`, {...context.repo, number: context.issue.number});
if (pull.labels.nodes.some(x => AREAS.includes(x.name)))
return;
// Skip labels a maintainer removed
const removed = pull.timelineItems.nodes.map(x => x.label.name);
const fromTitle = /^rsx\b/i.test(context.payload.pull_request.title) ? ['RSX'] : [];
const fromIssues = pull.closingIssuesReferences.nodes.flatMap(i => i.labels.nodes.map(x => x.name));
const labels = [...new Set([...fromTitle, ...fromIssues])]
.filter(name => AREAS.includes(name) && !removed.includes(name));
if (labels.length > 0) {
console.log(`Adding labels: ${labels.join(', ')}`);
await github.rest.issues.addLabels({...context.repo, issue_number: context.issue.number, labels});
}
+227 -58
View File
@@ -22,31 +22,95 @@ env:
BUILD_ARTIFACTSTAGINGDIRECTORY: ${{ github.workspace }}/artifacts/
jobs:
Clean_Code_Caches:
name: Clean caches
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
pull-requests: read
outputs:
skip_ccache: ${{ steps.pr_labels.outputs.skip_ccache }}
steps:
- name: "Look for the 'CI: Disable Build Caches' label on the PR"
id: pr_labels
if: github.event_name == 'pull_request'
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
run: |
# Query the live labels so adding the label and re-running all jobs works without a new push
labels=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" --jq '.labels[].name' 2>/dev/null) \
|| labels=$(jq -r '.pull_request.labels[]?.name' "$GITHUB_EVENT_PATH")
echo "Labels: ${labels:-<none>}"
skip=false
if grep -qix 'ci: disable build caches' <<< "$labels"; then
skip=true
echo "Builds will not restore ccache because of the 'CI: Disable Build Caches' label." >> "$GITHUB_STEP_SUMMARY"
fi
echo "skip_ccache=$skip" >> "$GITHUB_OUTPUT"
- name: "Look for the 'Shaders' or 'CI: Disable Build Caches' label on the merged PR"
id: labels
if: github.event_name == 'push' && github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master'
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
run: |
found=false
for sha in $(jq -r '[.after, (.commits[]?.id)] | map(select(. != null)) | unique[]' "$GITHUB_EVENT_PATH"); do
labels=$(gh api "repos/${{ github.repository }}/commits/$sha/pulls" --jq '.[].labels[].name' 2>/dev/null || true)
echo "$sha: ${labels:-<no associated PR>}"
if grep -qixE 'shaders|ci: disable build caches' <<< "$labels"; then
found=true
fi
done
echo "clean=$found" >> "$GITHUB_OUTPUT"
- name: Remove all code caches
if: steps.labels.outputs.clean == 'true'
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api --paginate "repos/${{ github.repository }}/actions/caches?per_page=100" \
--jq '.actions_caches[] | select(.key | contains("-ccache-")) | "\(.id)\t\(.key)"' > code_caches.tsv
if [ ! -s code_caches.tsv ]; then
echo "No code caches to remove."
exit 0
fi
while IFS=$'\t' read -r id key; do
echo "Removing $key (id $id)"
gh api -X DELETE "repos/${{ github.repository }}/actions/caches/$id" --silent
done < code_caches.tsv
echo "Removed $(wc -l < code_caches.tsv) code cache(s) after merging a 'Shaders' or 'CI: Disable Build Caches' PR." >> "$GITHUB_STEP_SUMMARY"
Linux_Build:
# Only run push event on master branch of main repo, but run all PRs
needs: Clean_Code_Caches
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
docker_img: "rpcs3/rpcs3-ci-jammy:1.10"
docker_img: "rpcs3/rpcs3-ci-jammy:2.1"
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.10"
docker_img: "rpcs3/rpcs3-ci-jammy:2.1"
build_sh: "/rpcs3/.ci/build-linux.sh"
compiler: gcc
- os: ubuntu-24.04-arm
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.10"
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:2.1"
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.10"
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:2.1"
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
compiler: gcc
name: RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }}
@@ -68,6 +132,7 @@ jobs:
fetch-depth: 0
- name: Restore build Ccache
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
uses: actions/cache/restore@main
id: restore-build-ccache
with:
@@ -117,38 +182,44 @@ jobs:
Mac_Build:
# Only run push event on master branch of main repo, but run all PRs
needs: Clean_Code_Caches
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
strategy:
fail-fast: false
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.11.0'
QT_VER: '6.12.0'
QT_VER_MAIN: '6'
LLVM_COMPILER_VER: '21'
LLVM_COMPILER_VER: '22'
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'
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup MacPorts
uses: melusina-org/setup-macports@v1
with:
cache: 'disable'
- name: Restore Build Ccache
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
uses: actions/cache/restore@main
id: restore-build-ccache
with:
@@ -207,26 +278,30 @@ jobs:
Windows_Build:
# Only run push event on master branch of main repo, but run all PRs
needs: Clean_Code_Caches
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.11.0'
QT_VER: '6.12.0'
QT_VER_MSVC: 'msvc2022'
QT_DATE: '202603180535'
LLVM_VER: '19.1.7'
VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
QT_DATE: '202609280346'
LLVM_VER: '22.1.8'
VULKAN_VER: '1.4.341.1'
VULKAN_SDK_SHA: 'bcf2d75aa9556889ab974858666e20b3655b6055a0db704ccb47279ff33b5bfe'
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
CCACHE_BIN_DIR: 'C:\ccache_bin'
CCACHE_DIR: 'C:\ccache'
CCACHE_INODECACHE: 'true'
CCACHE_SLOPPINESS: 'time_macros'
CCACHE_MAXSIZE: '7G'
CCACHE_LAUNCH_ARGS: '-DCMAKE_C_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe -DCMAKE_CXX_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe'
DEPS_CACHE_DIR: ./dependency_cache
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
SKIP_RPCS3_TEST: 'true'
steps:
- name: Checkout repository
@@ -235,7 +310,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
@@ -250,6 +325,132 @@ jobs:
run: .ci/get_keys-windows.sh
- name: Restore Build Ccache
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
uses: actions/cache/restore@main
id: restore-build-ccache
with:
path: ${{ env.CCACHE_DIR }}
key: "${{ runner.os }}-ccache-${{ env.COMPILER }}-${{github.run_id}}"
restore-keys: ${{ runner.os }}-ccache-${{ env.COMPILER }}-
- name: Restore Dependencies Cache
uses: actions/cache/restore@main
id: restore-dependencies-cache
with:
path: ${{ env.DEPS_CACHE_DIR }}
key: "${{ runner.os }}-${{ env.COMPILER }}-${{ env.QT_VER }}-${{ env.VULKAN_SDK_SHA }}-${{ env.CCACHE_SHA }}-${{ hashFiles('llvm.lock') }}"
restore-keys: ${{ runner.os }}-${{ env.COMPILER }}-
- name: Download and unpack dependencies
run: |
.ci/setup-windows.sh
.ci/setup-windows-ci-vars.sh win64 msvc
- name: Export Variables
run: |
while IFS='=' read -r key val; do
# Skip lines that are empty or start with '#'
[[ -z "$key" || "$key" =~ ^# ]] && continue
echo "$key=$val" >> "${{ github.env }}"
done < .ci/ci-vars.env
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@main
- name: Compile RPCS3
shell: pwsh
run: msbuild rpcs3.sln /p:Configuration=Release /v:minimal /p:Platform=x64 /p:PreferredToolArchitecture=x64 /p:CLToolPath=${{ env.CCACHE_BIN_DIR }} /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="${{ github.workspace }}\buildfiles\msvc\ci_only.targets"
- name: Pack up build artifacts
run: |
mkdir -p "${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}"
.ci/deploy-windows.sh
- name: Upload artifacts (7z)
uses: actions/upload-artifact@main
with:
name: RPCS3 for Windows (MSVC)
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}
compression-level: 0
if-no-files-found: error
- name: Deploy master build to GitHub Releases
if: |
github.event_name != 'pull_request' &&
github.repository == 'RPCS3/rpcs3' &&
github.ref == 'refs/heads/master'
env:
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
run: .ci/github-upload.sh
- name: Show ccache stats
if: github.ref == 'refs/heads/master'
run: ccache --show-stats --verbose
- name: Save Build Ccache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@main
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ steps.restore-build-ccache.outputs.cache-primary-key }}
- name: Save Dependencies Cache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@main
with:
path: ${{ env.DEPS_CACHE_DIR }}
key: ${{ steps.restore-dependencies-cache.outputs.cache-primary-key }}
Windows_Build_Test:
# Only run push event on master branch of main repo, but run all PRs
needs: Clean_Code_Caches
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
name: RPCS3 Windows Unit Test
runs-on: windows-2025-vs2026
env:
COMPILER: msvc
QT_VER_MAIN: '6'
QT_VER: '6.12.0'
QT_VER_MSVC: 'msvc2022'
QT_DATE: '202609280346'
LLVM_VER: '22.1.8'
VULKAN_VER: '1.4.341.1'
VULKAN_SDK_SHA: 'bcf2d75aa9556889ab974858666e20b3655b6055a0db704ccb47279ff33b5bfe'
CCACHE_SHA: '859141059ac950e1e8cd042c66f842f26b9e3a62a1669a69fe6ba180cb58bbdf'
CCACHE_BIN_DIR: 'C:\ccache_bin'
CCACHE_DIR: 'C:\ccache'
CCACHE_INODECACHE: 'true'
CCACHE_SLOPPINESS: 'time_macros'
CCACHE_MAXSIZE: '7G'
CCACHE_LAUNCH_ARGS: '-DCMAKE_C_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe -DCMAKE_CXX_COMPILER_LAUNCHER=C:\ccache_bin\ccache.exe'
DEPS_CACHE_DIR: ./dependency_cache
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
SKIP_RPCS3_EXE: 'true'
steps:
- name: Checkout repository
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Setup NuGet
uses: nuget/setup-nuget@v4
- name: Restore NuGet packages
run: nuget restore rpcs3.sln
- name: Setup env
shell: pwsh
run: |
echo "QTDIR=C:\Qt\${{ env.QT_VER }}\${{ env.QT_VER_MSVC }}_64" >> ${{ github.env }}
echo "VULKAN_SDK=C:\VulkanSDK\${{ env.VULKAN_VER }}" >> ${{ github.env }}
- name: Get Cache Keys
run: .ci/get_keys-windows.sh
- name: Restore Build Ccache
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
uses: actions/cache/restore@main
id: restore-build-ccache
with:
@@ -290,44 +491,9 @@ jobs:
shell: pwsh
run: build\lib\Release-x64\rpcs3_test.exe
- name: Pack up build artifacts
run: |
mkdir -p "${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}"
.ci/deploy-windows.sh
- name: Upload artifacts (7z)
uses: actions/upload-artifact@main
with:
name: RPCS3 for Windows (MSVC)
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}
compression-level: 0
if-no-files-found: error
- name: Deploy master build to GitHub Releases
if: |
github.event_name != 'pull_request' &&
github.repository == 'RPCS3/rpcs3' &&
github.ref == 'refs/heads/master'
env:
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
run: .ci/github-upload.sh
- name: Save Build Ccache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@main
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ steps.restore-build-ccache.outputs.cache-primary-key }}
- name: Save Dependencies Cache
if: github.ref == 'refs/heads/master'
uses: actions/cache/save@main
with:
path: ${{ env.DEPS_CACHE_DIR }}
key: ${{ steps.restore-dependencies-cache.outputs.cache-primary-key }}
Windows_Build_Clang:
# Only run push event on master branch of main repo, but run all PRs
needs: Clean_Code_Caches
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
strategy:
fail-fast: false
@@ -387,6 +553,7 @@ jobs:
p7zip
- name: Restore build Ccache
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
uses: actions/cache/restore@main
id: restore-build-ccache
with:
@@ -437,6 +604,7 @@ jobs:
FreeBSD_Build:
# Only run push event on master branch of main repo, but run all PRs
needs: Clean_Code_Caches
if: github.event_name != 'push' || (github.repository == 'RPCS3/rpcs3' && github.ref_name == 'master')
name: RPCS3 FreeBSD
runs-on: ubuntu-latest
@@ -444,10 +612,10 @@ jobs:
env:
CCACHE_DIR: ${{ github.workspace }}/ccache
QT_VER_MAIN: '6'
LLVM_COMPILER_VER: '-devel'
CC: 'clang-devel'
CXX: 'clang++-devel'
LLVM_CONFIG: 'llvm-config-devel'
LLVM_COMPILER_VER: '22'
LLVM_CONFIG: 'llvm-config22'
CC: 'clang22'
CXX: 'clang++22'
steps:
- name: Checkout repository
@@ -456,6 +624,7 @@ jobs:
fetch-depth: 0
- name: Restore Build Ccache
if: needs.Clean_Code_Caches.outputs.skip_ccache != 'true'
uses: actions/cache/restore@main
id: restore-build-ccache
with:
@@ -470,7 +639,7 @@ jobs:
envs: 'QT_VER_MAIN LLVM_COMPILER_VER CCACHE_DIR CC CXX LLVM_CONFIG'
usesh: true
copyback: false
release: "14.3"
release: "14.5"
run: .ci/install-freebsd.sh && .ci/build-freebsd.sh
- name: Save Build Ccache
+3
View File
@@ -126,3 +126,6 @@ CMakeUserPresets.json
.cache/
.lldbinit
# claude
CLAUDE.md
+45 -4
View File
@@ -49,16 +49,57 @@
<PropertyGroup Label="UserMacros">
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="./Release" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_SYSTEM_VERSION=10.0 -DLIBTYPE=STATIC -DFORCE_STATIC_VCRT=true -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
%25CCACHE_LAUNCH_ARGS%25 ^
-DCMAKE_BUILD_TYPE="Release" ^
-DCMAKE_INSTALL_PREFIX="./Release" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DLIBTYPE=STATIC ^
-DFORCE_STATIC_VCRT=true ^
-DALSOFT_UTILS=false ^
-DALSOFT_EXAMPLES=false ^
-DALSOFT_INSTALL=false ^
-DALSOFT_INSTALL_CONFIG=false ^
-DALSOFT_INSTALL_HRTF_DATA=false ^
-DALSOFT_INSTALL_AMBDEC_PRESETS=false ^
-DALSOFT_INSTALL_EXAMPLES=false ^
-DALSOFT_INSTALL_UTILS=false ^
"$(SolutionDir)3rdparty\OpenAL\openal-soft"
</CmakeReleaseCLI>
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="./Debug" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DCMAKE_SYSTEM_VERSION=10.0 -DLIBTYPE=STATIC -DALSOFT_UTILS=false -DALSOFT_EXAMPLES=false -DALSOFT_INSTALL=false -DALSOFT_INSTALL_CONFIG=false -DALSOFT_INSTALL_HRTF_DATA=false -DALSOFT_INSTALL_AMBDEC_PRESETS=false -DALSOFT_INSTALL_EXAMPLES=false -DALSOFT_INSTALL_UTILS=false "$(SolutionDir)3rdparty\OpenAL\openal-soft"
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
%25CCACHE_LAUNCH_ARGS%25 ^
-DCMAKE_BUILD_TYPE="Debug" ^
-DCMAKE_INSTALL_PREFIX="./Debug" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DALSOFT_UTILS=false ^
-DALSOFT_EXAMPLES=false ^
-DALSOFT_INSTALL=false ^
-DALSOFT_INSTALL_CONFIG=false ^
-DALSOFT_INSTALL_HRTF_DATA=false ^
-DALSOFT_INSTALL_AMBDEC_PRESETS=false ^
-DALSOFT_INSTALL_EXAMPLES=false ^
-DALSOFT_INSTALL_UTILS=false ^
"$(SolutionDir)3rdparty\OpenAL\openal-soft"
</CmakeDebugCLI>
<CmakeCopyCLI>
echo Copying..
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OpenAL32.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
</CmakeCopyCLI>
<CmakeCopyDebugCLI>
echo Copying..
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OpenAL32.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\OpenAL32.dll" "$(SolutionDir)bin"
</CmakeCopyDebugCLI>
<CmakeCleanCLI>
echo Cleaning..
del "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\OpenAL32.lib"
@@ -71,13 +112,13 @@
<NMakeBuildCommandLine>
$(CmakeDebugCLI)
ninja
$(CmakeCopyCLI)
$(CmakeCopyDebugCLI)
</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
$(CmakeCleanCLI)
$(CmakeDebugCLI)
ninja
$(CmakeCopyCLI)
$(CmakeCopyDebugCLI)
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>
$(CmakeCleanCLI)
+15 -15
View File
@@ -7,24 +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)
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)
+117 -402
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
@@ -11,16 +11,20 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<Keyword>MakeFileProj</Keyword>
<ProjectGuid>{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}</ProjectGuid>
<RootNamespace>libcurl</RootNamespace>
</PropertyGroup>
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_macros.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
@@ -31,408 +35,119 @@
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<PropertyGroup Label="UserMacros">
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
%25CCACHE_LAUNCH_ARGS%25 ^
-DCMAKE_BUILD_TYPE="Release" ^
-DCMAKE_INSTALL_PREFIX="./Release" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_CURL_EXE=OFF ^
-DBUILD_TESTING=OFF ^
-DCURL_USE_WOLFSSL=ON ^
-DCURL_USE_IPV6=ON ^
-DCURL_USE_SCHANNEL=OFF ^
-DCURL_USE_OPENSSL=OFF ^
-DCURL_USE_LIBPSL=OFF ^
-DCURL_ZLIB=OFF ^
-DCURL_ZSTD=OFF ^
-DCURL_USE_LIBSSH2=OFF ^
-DCMAKE_C_FLAGS="/DWOLFSSL_ALT_CERT_CHAINS /DHAVE_SNI /DNO_MD4 /DWOLFSSL_USER_SETTINGS /DUSE_IPV6 /I\"$(SolutionDir)3rdparty\curl\extra\" /I\"$(SolutionDir)3rdparty\wolfssl\wolfssl\" /I\"$(SolutionDir)3rdparty\wolfssl\wolfssl\wolfssl\" /I\"$(SolutionDir)3rdparty\wolfssl\extra\win32\"" ^
-DCMAKE_C_FLAGS_RELEASE="/O2 /Ob1 /GF /Gy" ^
-DWOLFSSL_INCLUDE_DIR="$(SolutionDir)3rdparty\wolfssl\wolfssl" ^
-DWOLFSSL_LIBRARY="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\wolfssl.lib" ^
"$(SolutionDir)3rdparty\curl\curl"
</CmakeReleaseCLI>
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
%25CCACHE_LAUNCH_ARGS%25 ^
-DCMAKE_BUILD_TYPE="Debug" ^
-DCMAKE_INSTALL_PREFIX="./Debug" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DBUILD_SHARED_LIBS=OFF ^
-DBUILD_CURL_EXE=OFF ^
-DBUILD_TESTING=OFF ^
-DCURL_USE_WOLFSSL=ON ^
-DCURL_USE_IPV6=ON ^
-DCURL_USE_SCHANNEL=OFF ^
-DCURL_USE_OPENSSL=OFF ^
-DCURL_USE_LIBPSL=OFF ^
-DCURL_ZLIB=OFF ^
-DCURL_USE_LIBSSH2=OFF ^
-DCMAKE_C_FLAGS="/DWOLFSSL_ALT_CERT_CHAINS /DHAVE_SNI /DNO_MD4 /DWOLFSSL_USER_SETTINGS /DUSE_IPV6 /I\"$(SolutionDir)3rdparty\curl\extra\" /I\"$(SolutionDir)3rdparty\wolfssl\wolfssl\" /I\"$(SolutionDir)3rdparty\wolfssl\wolfssl\wolfssl\" /I\"$(SolutionDir)3rdparty\wolfssl\extra\win32\"" ^
-DCMAKE_C_FLAGS_DEBUG="/Od /Ob0 /GF /Gy" ^
-DWOLFSSL_INCLUDE_DIR="$(SolutionDir)3rdparty\wolfssl\wolfssl" ^
-DWOLFSSL_LIBRARY="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\wolfssl.lib" ^
"$(SolutionDir)3rdparty\curl\curl"
</CmakeDebugCLI>
<CmakeCopyCLI>
echo Copying..
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\lib\libcurl.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
</CmakeCopyCLI>
<CmakeCopyDebugCLI>
echo Copying..
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\lib\libcurl-d.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)"
</CmakeCopyDebugCLI>
<CmakeCleanCLI>
echo Cleaning..
del "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\libcurl.lib"
rmdir /s /q "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
</CmakeCleanCLI>
<CmakeCleanDebugCLI>
echo Cleaning..
del "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\libcurl-d.lib"
rmdir /s /q "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
</CmakeCleanDebugCLI>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
<NMakeBuildCommandLine>
$(CmakeDebugCLI)
ninja
$(CmakeCopyDebugCLI)
</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
$(CmakeCleanDebugCLI)
$(CmakeDebugCLI)
ninja
$(CmakeCopyDebugCLI)
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>
$(CmakeCleanDebugCLI)
</NMakeCleanCommandLine>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
<NMakeBuildCommandLine>
$(CmakeReleaseCLI)
ninja
$(CmakeCopyCLI)
</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
$(CmakeCleanCLI)
$(CmakeReleaseCLI)
ninja
$(CmakeCopyCLI)
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>
$(CmakeCleanCLI)
</NMakeCleanCommandLine>
</PropertyGroup>
<ItemDefinitionGroup>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>curl\include;curl\lib;extra;$(SolutionDir)3rdparty\wolfssl\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\wolfssl;$(SolutionDir)3rdparty\wolfssl\extra\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WOLFSSL_ALT_CERT_CHAINS;HAVE_SNI;NDEBUG;BUILDING_LIBCURL;CURL_STATICLIB;USE_WOLFSSL;NO_MD4;WOLFSSL_USER_SETTINGS;USE_IPV6;SIZEOF_LONG=4;SIZEOF_LONG_LONG=8;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Lib>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
<TargetMachine>MachineX64</TargetMachine>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="curl\lib\altsvc.c" />
<ClCompile Include="curl\lib\amigaos.c" />
<ClCompile Include="curl\lib\asyn-ares.c" />
<ClCompile Include="curl\lib\asyn-base.c" />
<ClCompile Include="curl\lib\asyn-thrdd.c" />
<ClCompile Include="curl\lib\bufq.c" />
<ClCompile Include="curl\lib\bufref.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-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\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" />
<ClCompile Include="curl\lib\curlx\timeval.c" />
<ClCompile Include="curl\lib\curlx\version_win32.c" />
<ClCompile Include="curl\lib\curlx\wait.c" />
<ClCompile Include="curl\lib\curlx\warnless.c" />
<ClCompile Include="curl\lib\curlx\winapi.c" />
<ClCompile Include="curl\lib\curl_addrinfo.c" />
<ClCompile Include="curl\lib\curl_endian.c" />
<ClCompile Include="curl\lib\curl_fnmatch.c" />
<ClCompile Include="curl\lib\curl_fopen.c" />
<ClCompile Include="curl\lib\curl_gethostname.c" />
<ClCompile Include="curl\lib\curl_get_line.c" />
<ClCompile Include="curl\lib\curl_gssapi.c" />
<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" />
<ClCompile Include="curl\lib\cw-out.c" />
<ClCompile Include="curl\lib\cw-pause.c" />
<ClCompile Include="curl\lib\dict.c" />
<ClCompile Include="curl\lib\dllmain.c" />
<ClCompile Include="curl\lib\doh.c" />
<ClCompile Include="curl\lib\dynhds.c" />
<ClCompile Include="curl\lib\easy.c" />
<ClCompile Include="curl\lib\easygetopt.c" />
<ClCompile Include="curl\lib\easyoptions.c" />
<ClCompile Include="curl\lib\escape.c" />
<ClCompile Include="curl\lib\fake_addrinfo.c" />
<ClCompile Include="curl\lib\file.c" />
<ClCompile Include="curl\lib\fileinfo.c" />
<ClCompile Include="curl\lib\formdata.c" />
<ClCompile Include="curl\lib\ftp.c" />
<ClCompile Include="curl\lib\ftplistparser.c" />
<ClCompile Include="curl\lib\getenv.c" />
<ClCompile Include="curl\lib\getinfo.c" />
<ClCompile Include="curl\lib\gopher.c" />
<ClCompile Include="curl\lib\hash.c" />
<ClCompile Include="curl\lib\headers.c" />
<ClCompile Include="curl\lib\hmac.c" />
<ClCompile Include="curl\lib\hostip.c" />
<ClCompile Include="curl\lib\hostip4.c" />
<ClCompile Include="curl\lib\hostip6.c" />
<ClCompile Include="curl\lib\hsts.c" />
<ClCompile Include="curl\lib\http.c" />
<ClCompile Include="curl\lib\http1.c" />
<ClCompile Include="curl\lib\http2.c" />
<ClCompile Include="curl\lib\httpsrr.c" />
<ClCompile Include="curl\lib\http_aws_sigv4.c" />
<ClCompile Include="curl\lib\http_chunks.c" />
<ClCompile Include="curl\lib\http_digest.c" />
<ClCompile Include="curl\lib\http_negotiate.c" />
<ClCompile Include="curl\lib\http_ntlm.c" />
<ClCompile Include="curl\lib\http_proxy.c" />
<ClCompile Include="curl\lib\idn.c" />
<ClCompile Include="curl\lib\if2ip.c" />
<ClCompile Include="curl\lib\imap.c" />
<ClCompile Include="curl\lib\ldap.c" />
<ClCompile Include="curl\lib\llist.c" />
<ClCompile Include="curl\lib\macos.c" />
<ClCompile Include="curl\lib\md4.c" />
<ClCompile Include="curl\lib\md5.c" />
<ClCompile Include="curl\lib\memdebug.c" />
<ClCompile Include="curl\lib\mime.c" />
<ClCompile Include="curl\lib\mprintf.c" />
<ClCompile Include="curl\lib\mqtt.c" />
<ClCompile Include="curl\lib\multi.c" />
<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\pingpong.c" />
<ClCompile Include="curl\lib\pop3.c" />
<ClCompile Include="curl\lib\progress.c" />
<ClCompile Include="curl\lib\psl.c" />
<ClCompile Include="curl\lib\rand.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\slist.c" />
<ClCompile Include="curl\lib\smb.c" />
<ClCompile Include="curl\lib\smtp.c" />
<ClCompile Include="curl\lib\socketpair.c" />
<ClCompile Include="curl\lib\socks.c" />
<ClCompile Include="curl\lib\socks_gssapi.c" />
<ClCompile Include="curl\lib\socks_sspi.c" />
<ClCompile Include="curl\lib\splay.c" />
<ClCompile Include="curl\lib\strcase.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\transfer.c" />
<ClCompile Include="curl\lib\uint-bset.c" />
<ClCompile Include="curl\lib\uint-hash.c" />
<ClCompile Include="curl\lib\uint-spbset.c" />
<ClCompile Include="curl\lib\uint-table.c" />
<ClCompile Include="curl\lib\url.c" />
<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\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_scache.c" />
<ClCompile Include="curl\lib\vtls\vtls_spack.c" />
<ClCompile Include="curl\lib\vtls\x509asn1.c" />
<ClCompile Include="curl\lib\vauth\cleartext.c" />
<ClCompile Include="curl\lib\vauth\cram.c" />
<ClCompile Include="curl\lib\vauth\digest.c" />
<ClCompile Include="curl\lib\vauth\digest_sspi.c" />
<ClCompile Include="curl\lib\vauth\krb5_gssapi.c" />
<ClCompile Include="curl\lib\vauth\krb5_sspi.c" />
<ClCompile Include="curl\lib\vauth\ntlm.c" />
<ClCompile Include="curl\lib\vauth\ntlm_sspi.c" />
<ClCompile Include="curl\lib\vauth\oauth2.c" />
<ClCompile Include="curl\lib\vauth\spnego_gssapi.c" />
<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\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\openssl.c" />
<ClCompile Include="curl\lib\vtls\schannel.c" />
<ClCompile Include="curl\lib\vtls\schannel_verify.c" />
<ClCompile Include="curl\lib\vtls\vtls.c" />
<ClCompile Include="curl\lib\vtls\wolfssl.c" />
<ClCompile Include="curl\lib\ws.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="curl\include\curl\curl.h" />
<ClInclude Include="curl\include\curl\curlver.h" />
<ClInclude Include="curl\include\curl\easy.h" />
<ClInclude Include="curl\include\curl\mprintf.h" />
<ClInclude Include="curl\include\curl\multi.h" />
<ClInclude Include="curl\include\curl\stdcheaders.h" />
<ClInclude Include="curl\include\curl\system.h" />
<ClInclude Include="curl\include\curl\typecheck-gcc.h" />
<ClInclude Include="curl\include\curl\urlapi.h" />
<ClInclude Include="curl\lib\altsvc.h" />
<ClInclude Include="curl\lib\amigaos.h" />
<ClInclude Include="curl\lib\arpa_telnet.h" />
<ClInclude Include="curl\lib\asyn.h" />
<ClInclude Include="curl\lib\bufq.h" />
<ClInclude Include="curl\lib\bufref.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-socket.h" />
<ClInclude Include="curl\lib\cfilters.h" />
<ClInclude Include="curl\lib\config-mac.h" />
<ClInclude Include="curl\lib\config-os400.h" />
<ClInclude Include="curl\lib\config-plan9.h" />
<ClInclude Include="curl\lib\config-riscos.h" />
<ClInclude Include="curl\lib\config-win32.h" />
<ClInclude Include="curl\lib\conncache.h" />
<ClInclude Include="curl\lib\connect.h" />
<ClInclude Include="curl\lib\content_encoding.h" />
<ClInclude Include="curl\lib\cookie.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" />
<ClInclude Include="curl\lib\curlx\timeval.h" />
<ClInclude Include="curl\lib\curlx\version_win32.h" />
<ClInclude Include="curl\lib\curlx\wait.h" />
<ClInclude Include="curl\lib\curlx\warnless.h" />
<ClInclude Include="curl\lib\curlx\winapi.h" />
<ClInclude Include="curl\lib\curl_addrinfo.h" />
<ClInclude Include="curl\lib\curl_ctype.h" />
<ClInclude Include="curl\lib\curl_endian.h" />
<ClInclude Include="curl\lib\curl_fnmatch.h" />
<ClInclude Include="curl\lib\curl_fopen.h" />
<ClInclude Include="curl\lib\curl_gethostname.h" />
<ClInclude Include="curl\lib\curl_get_line.h" />
<ClInclude Include="curl\lib\curl_gssapi.h" />
<ClInclude Include="curl\lib\curl_hmac.h" />
<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_memrchr.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\doh.h" />
<ClInclude Include="curl\lib\dynhds.h" />
<ClInclude Include="curl\lib\easyif.h" />
<ClInclude Include="curl\lib\easyoptions.h" />
<ClInclude Include="curl\lib\easy_lock.h" />
<ClInclude Include="curl\lib\escape.h" />
<ClInclude Include="curl\lib\fake_addrinfo.h" />
<ClInclude Include="curl\lib\file.h" />
<ClInclude Include="curl\lib\fileinfo.h" />
<ClInclude Include="curl\lib\formdata.h" />
<ClInclude Include="curl\lib\ftp.h" />
<ClInclude Include="curl\lib\ftplistparser.h" />
<ClInclude Include="curl\lib\functypes.h" />
<ClInclude Include="curl\lib\getinfo.h" />
<ClInclude Include="curl\lib\gopher.h" />
<ClInclude Include="curl\lib\hash.h" />
<ClInclude Include="curl\lib\headers.h" />
<ClInclude Include="curl\lib\hostip.h" />
<ClInclude Include="curl\lib\hsts.h" />
<ClInclude Include="curl\lib\http.h" />
<ClInclude Include="curl\lib\http1.h" />
<ClInclude Include="curl\lib\http2.h" />
<ClInclude Include="curl\lib\httpsrr.h" />
<ClInclude Include="curl\lib\http_aws_sigv4.h" />
<ClInclude Include="curl\lib\http_chunks.h" />
<ClInclude Include="curl\lib\http_digest.h" />
<ClInclude Include="curl\lib\http_negotiate.h" />
<ClInclude Include="curl\lib\http_ntlm.h" />
<ClInclude Include="curl\lib\http_proxy.h" />
<ClInclude Include="curl\lib\idn.h" />
<ClInclude Include="curl\lib\if2ip.h" />
<ClInclude Include="curl\lib\imap.h" />
<ClInclude Include="curl\lib\llist.h" />
<ClInclude Include="curl\lib\macos.h" />
<ClInclude Include="curl\lib\mime.h" />
<ClInclude Include="curl\lib\mqtt.h" />
<ClInclude Include="curl\lib\multihandle.h" />
<ClInclude Include="curl\lib\multiif.h" />
<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\pingpong.h" />
<ClInclude Include="curl\lib\pop3.h" />
<ClInclude Include="curl\lib\progress.h" />
<ClInclude Include="curl\lib\psl.h" />
<ClInclude Include="curl\lib\rand.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" />
<ClInclude Include="curl\lib\sendf.h" />
<ClInclude Include="curl\lib\setopt.h" />
<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\sigpipe.h" />
<ClInclude Include="curl\lib\slist.h" />
<ClInclude Include="curl\lib\smb.h" />
<ClInclude Include="curl\lib\smtp.h" />
<ClInclude Include="curl\lib\sockaddr.h" />
<ClInclude Include="curl\lib\socketpair.h" />
<ClInclude Include="curl\lib\socks.h" />
<ClInclude Include="curl\lib\splay.h" />
<ClInclude Include="curl\lib\strcase.h" />
<ClInclude Include="curl\lib\strdup.h" />
<ClInclude Include="curl\lib\strerror.h" />
<ClInclude Include="curl\lib\strtok.h" />
<ClInclude Include="curl\lib\strtoofft.h" />
<ClInclude Include="curl\lib\system_win32.h" />
<ClInclude Include="curl\lib\telnet.h" />
<ClInclude Include="curl\lib\tftp.h" />
<ClInclude Include="curl\lib\transfer.h" />
<ClInclude Include="curl\lib\uint-bset.h" />
<ClInclude Include="curl\lib\uint-hash.h" />
<ClInclude Include="curl\lib\uint-spbset.h" />
<ClInclude Include="curl\lib\uint-table.h" />
<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\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_int.h" />
<ClInclude Include="curl\lib\vtls\vtls_scache.h" />
<ClInclude Include="curl\lib\vtls\vtls_spack.h" />
<ClInclude Include="curl\lib\vtls\x509asn1.h" />
<ClInclude Include="curl\lib\vauth\digest.h" />
<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\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\openssl.h" />
<ClInclude Include="curl\lib\vtls\schannel.h" />
<ClInclude Include="curl\lib\vtls\vtls.h" />
<ClInclude Include="curl\lib\vtls\wolfssl.h" />
<ClInclude Include="curl\lib\ws.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="curl\lib\libcurl.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
File diff suppressed because it is too large Load Diff
+8 -4
View File
@@ -13,17 +13,21 @@
<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\FusionConfig.h" />
<ClInclude Include="fusion\Fusion\FusionConvention.h" />
<ClInclude Include="fusion\Fusion\FusionInline.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" />
<ClCompile Include="fusion\Fusion\FusionConvention.c" />
<ClCompile Include="fusion\Fusion\FusionRemap.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<RootNamespace>Fusion</RootNamespace>
+12 -4
View File
@@ -8,12 +8,14 @@
<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" />
<ClInclude Include="fusion\Fusion\FusionConfig.h" />
<ClInclude Include="fusion\Fusion\FusionInline.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="fusion\Fusion\FusionAhrs.c">
@@ -22,7 +24,13 @@
<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>
<ClCompile Include="fusion\Fusion\FusionConvention.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="fusion\Fusion\FusionRemap.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
+39 -14
View File
@@ -37,19 +37,46 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<CmakeGenerator>"Visual Studio $(VisualStudioVersion.Substring(0,2))"</CmakeGenerator>
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DGLSLANG_TESTS=OFF -DENABLE_GLSLANG_BINARIES=OFF -DBUILD_EXTERNAL=OFF -DENABLE_SPVREMAPPER=OFF -DENABLE_HLSL=OFF -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
%25CCACHE_LAUNCH_ARGS%25 ^
-DCMAKE_BUILD_TYPE="Release" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-DGLSLANG_TESTS=OFF ^
-DENABLE_GLSLANG_BINARIES=OFF ^
-DBUILD_EXTERNAL=OFF ^
-DENABLE_SPVREMAPPER=OFF ^
-DENABLE_HLSL=OFF ^
-DENABLE_OPT=OFF ^
-S "$(SolutionDir)3rdparty\glslang\glslang"
</CmakeReleaseCLI>
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
cmake -G $(CmakeGenerator) -A x64 -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DGLSLANG_TESTS=OFF -DENABLE_GLSLANG_BINARIES=OFF -DBUILD_EXTERNAL=OFF -DENABLE_SPVREMAPPER=OFF -DENABLE_HLSL=OFF -DENABLE_OPT=OFF -S glslang -B "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
cd "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)"
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
%25CCACHE_LAUNCH_ARGS%25 ^
-DCMAKE_BUILD_TYPE="Debug" ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug ^
-DGLSLANG_TESTS=OFF ^
-DENABLE_GLSLANG_BINARIES=OFF ^
-DBUILD_EXTERNAL=OFF ^
-DENABLE_SPVREMAPPER=OFF ^
-DENABLE_HLSL=OFF ^
-DENABLE_OPT=OFF ^
-S "$(SolutionDir)3rdparty\glslang\glslang"
</CmakeDebugCLI>
<CmakeCopyCLI>
echo Copying..
mkdir "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\SPIRV\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\OSDependent\Windows\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\$(CONFIGURATION)\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\SPIRV\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\OSDependent\Windows\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
copy "$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\glslang\*.lib" "$(SolutionDir)build\lib\$(Configuration)-$(Platform)\$(ProjectName)"
</CmakeCopyCLI>
<CmakeCleanCLI>
echo Cleaning..
@@ -63,17 +90,16 @@
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
<NMakeBuildCommandLine>
$(CmakeReleaseCLI)
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:build /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
ninja
$(CmakeCopyCLI)
</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
$(CmakeCleanCLI)
$(CmakeReleaseCLI)
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
ninja
$(CmakeCopyCLI)
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>
$(CmakeReleaseCLI)
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:clean /p:Configuration=Release /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
$(CmakeCleanCLI)
</NMakeCleanCommandLine>
</PropertyGroup>
@@ -82,17 +108,16 @@
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
<NMakeBuildCommandLine>
$(CmakeDebugCLI)
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:build /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
ninja
$(CmakeCopyCLI)
</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>
$(CmakeCleanCLI)
$(CmakeDebugCLI)
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:rebuild /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
ninja
$(CmakeCopyCLI)
</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>
$(CmakeDebugCLI)
msbuild.exe "$(IntDir)\ALL_BUILD.vcxproj" /t:clean /p:Configuration=Debug /p:ForceImportBeforeCppTargets="$(PropsAbsPath)" /m
$(CmakeCleanCLI)
</NMakeCleanCommandLine>
</PropertyGroup>
-2
View File
@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
+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" />
+1 -1
View File
@@ -51,7 +51,7 @@ if(WITH_LLVM)
set(STATIC_LINK_LLVM ON CACHE BOOL "Link against LLVM statically. This will get set to ON if you build LLVM from the submodule." FORCE)
find_package(LLVM 19.1 CONFIG)
find_package(LLVM 22.1 CONFIG)
if(NOT LLVM_FOUND)
message(FATAL_ERROR "Couldn't build LLVM from the submodule. You might need to run `git submodule update --init`")
endif()
+56 -2
View File
@@ -40,11 +40,65 @@
<PropertyGroup Label="UserMacros">
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
-DCMAKE_BUILD_TYPE="Release" ^
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-DLLVM_TARGETS_TO_BUILD=X86 ^
-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc ^
-DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc ^
-DLLVM_BUILD_RUNTIME=OFF ^
-DLLVM_BUILD_TOOLS=OFF ^
-DLLVM_BUILD_BENCHMARKS=OFF ^
-DLLVM_BUILD_DOCS=OFF ^
-DLLVM_BUILD_EXAMPLES=OFF ^
-DLLVM_BUILD_TESTS=OFF ^
-DLLVM_INCLUDE_TOOLS=OFF ^
-DLLVM_INCLUDE_DOCS=OFF ^
-DLLVM_INCLUDE_EXAMPLES=OFF ^
-DLLVM_INCLUDE_TESTS=OFF ^
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
-DLLVM_INCLUDE_UTILS=OFF ^
-DLLVM_INSTALL_UTILS=OFF ^
-DLLVM_ENABLE_DIA_SDK=OFF ^
-DLLVM_ENABLE_PDB=OFF ^
-DLLVM_USE_INTEL_JITEVENTS=ON ^
"$(SolutionDir)3rdparty\llvm\llvm\llvm"
</CmakeReleaseCLI>
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
-DCMAKE_BUILD_TYPE="Debug" ^
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL ^
-DLLVM_TARGETS_TO_BUILD=X86 ^
-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc ^
-DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc ^
-DLLVM_BUILD_RUNTIME=OFF ^
-DLLVM_BUILD_TOOLS=OFF ^
-DLLVM_BUILD_BENCHMARKS=OFF ^
-DLLVM_BUILD_DOCS=OFF ^
-DLLVM_BUILD_EXAMPLES=OFF ^
-DLLVM_BUILD_TESTS=OFF ^
-DLLVM_INCLUDE_TOOLS=OFF ^
-DLLVM_INCLUDE_DOCS=OFF ^
-DLLVM_INCLUDE_EXAMPLES=OFF ^
-DLLVM_INCLUDE_TESTS=OFF ^
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
-DLLVM_INCLUDE_UTILS=OFF ^
-DLLVM_INSTALL_UTILS=OFF ^
-DLLVM_ENABLE_DIA_SDK=OFF ^
-DLLVM_ENABLE_PDB=OFF ^
-DLLVM_USE_INTEL_JITEVENTS=ON ^
"$(SolutionDir)3rdparty\llvm\llvm\llvm"
</CmakeDebugCLI>
<CmakeCleanCLI>
echo Cleaning..
+56 -2
View File
@@ -40,11 +40,65 @@
<PropertyGroup Label="UserMacros">
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="clang-cl.exe" ^
-DCMAKE_C_COMPILER="clang-cl.exe" ^
-DCMAKE_BUILD_TYPE="Release" ^
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-DLLVM_TARGETS_TO_BUILD=X86 ^
-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc ^
-DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc ^
-DLLVM_BUILD_RUNTIME=OFF ^
-DLLVM_BUILD_TOOLS=OFF ^
-DLLVM_BUILD_BENCHMARKS=OFF ^
-DLLVM_BUILD_DOCS=OFF ^
-DLLVM_BUILD_EXAMPLES=OFF ^
-DLLVM_BUILD_TESTS=OFF ^
-DLLVM_INCLUDE_TOOLS=OFF ^
-DLLVM_INCLUDE_DOCS=OFF ^
-DLLVM_INCLUDE_EXAMPLES=OFF ^
-DLLVM_INCLUDE_TESTS=OFF ^
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
-DLLVM_INCLUDE_UTILS=OFF ^
-DLLVM_INSTALL_UTILS=OFF ^
-DLLVM_ENABLE_DIA_SDK=OFF ^
-DLLVM_ENABLE_PDB=OFF ^
-DLLVM_USE_INTEL_JITEVENTS=ON ^
"$(SolutionDir)3rdparty\llvm\llvm\llvm"
</CmakeReleaseCLI>
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
cd "$(SolutionDir)build\tmp\llvm_build-$(Configuration)-$(Platform)"
cmake -G Ninja -DCMAKE_CXX_COMPILER="clang-cl.exe" -DCMAKE_C_COMPILER="clang-cl.exe" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc -DLLVM_BUILD_RUNTIME=OFF -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_BENCHMARKS=OFF -DLLVM_BUILD_DOCS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_BUILD_TESTS=OFF\ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INSTALL_UTILS=OFF -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_PDB=OFF -DLLVM_USE_INTEL_JITEVENTS=ON "$(SolutionDir)3rdparty\llvm\llvm\llvm"
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="clang-cl.exe" ^
-DCMAKE_C_COMPILER="clang-cl.exe" ^
-DCMAKE_BUILD_TYPE="Debug" ^
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build" ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL ^
-DLLVM_TARGETS_TO_BUILD=X86 ^
-DLLVM_DEFAULT_TARGET_TRIPLE:STRING=x86_64-pc-windows-msvc ^
-DLLVM_HOST_TRIPLE:STRING=x86_64-pc-windows-msvc ^
-DLLVM_BUILD_RUNTIME=OFF ^
-DLLVM_BUILD_TOOLS=OFF ^
-DLLVM_BUILD_BENCHMARKS=OFF ^
-DLLVM_BUILD_DOCS=OFF ^
-DLLVM_BUILD_EXAMPLES=OFF ^
-DLLVM_BUILD_TESTS=OFF ^
-DLLVM_INCLUDE_TOOLS=OFF ^
-DLLVM_INCLUDE_DOCS=OFF ^
-DLLVM_INCLUDE_EXAMPLES=OFF ^
-DLLVM_INCLUDE_TESTS=OFF ^
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
-DLLVM_INCLUDE_UTILS=OFF ^
-DLLVM_INSTALL_UTILS=OFF ^
-DLLVM_ENABLE_DIA_SDK=OFF ^
-DLLVM_ENABLE_PDB=OFF ^
-DLLVM_USE_INTEL_JITEVENTS=ON ^
"$(SolutionDir)3rdparty\llvm\llvm\llvm"
</CmakeDebugCLI>
<CmakeCleanCLI>
echo Cleaning..
+72 -59
View File
@@ -56,6 +56,63 @@ namespace pine
typedef unsigned long long SOCKET;
#ifndef _WIN32
inline std::string get_socket_path(std::string_view file_name, int slot, int default_slot)
{
#ifdef __APPLE__
const char* runtime_dir = std::getenv("TMPDIR");
#else
const char* runtime_dir = std::getenv("XDG_RUNTIME_DIR");
#endif
// fallback in case macOS or other OSes don't implement the XDG base
// spec
std::string path = runtime_dir ? std::string(runtime_dir) + '/' : std::string("/tmp/");
path += file_name;
if (slot != default_slot)
{
fmt::append(path, ".%d", slot);
}
return path;
}
#endif
#ifdef _WIN32
inline const char* bind_and_listen(SOCKET sock, u16 port)
{
const int exclusive = 1;
if (setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, reinterpret_cast<const char*>(&exclusive), sizeof(exclusive)) != 0)
return "setsockopt(SO_EXCLUSIVEADDRUSE) failed";
sockaddr_in server{};
server.sin_family = AF_INET;
server.sin_port = htons(port);
if (inet_pton(AF_INET, "127.0.0.1", &server.sin_addr.s_addr) != 1)
return "inet_pton failed";
#else
inline const char* bind_and_listen(int sock, const std::string& socket_path)
{
sockaddr_un server{};
if (socket_path.size() >= sizeof(server.sun_path))
return "socket path is too long";
server.sun_family = AF_UNIX;
std::memcpy(server.sun_path, socket_path.c_str(), socket_path.size() + 1);
unlink(socket_path.c_str());
#endif
if (bind(sock, reinterpret_cast<sockaddr*>(&server), sizeof(server)) != 0)
return "bind failed";
if (listen(sock, 4096) != 0)
return "listen failed";
return nullptr;
}
template<typename Impl>
class pine_server : public Impl
{
@@ -164,14 +221,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 +572,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 +584,7 @@ namespace pine
pine_server() noexcept
{
#ifdef _WIN32
WSADATA wsa;
struct sockaddr_in server;
WSADATA wsa {};
m_sock = INVALID_SOCKET;
m_msgsock = INVALID_SOCKET;
@@ -541,45 +600,9 @@ namespace pine
return;
}
// yes very good windows s/sun/sin/g sure is fine
server.sin_family = AF_INET;
// localhost only
if (!inet_pton(server.sin_family, "127.0.0.1", &server.sin_addr.s_addr))
{
fmt::throw_exception("IPC: Failed to convert localhost");
}
server.sin_port = htons(Impl::get_port());
if (bind(m_sock, reinterpret_cast<struct sockaddr*>(&server), sizeof(server)) == SOCKET_ERROR)
{
Impl::error("IPC: Error while binding to socket! Shutting down...");
return;
}
const char* failure = bind_and_listen(m_sock, static_cast<u16>(Impl::get_port()));
#else
char* runtime_dir = nullptr;
#ifdef __APPLE__
runtime_dir = std::getenv("TMPDIR");
#else
runtime_dir = std::getenv("XDG_RUNTIME_DIR");
#endif
// fallback in case macOS or other OSes don't implement the XDG base
// spec
if (runtime_dir == nullptr)
m_socket_name = "/tmp/rpcs3.sock";
else
{
m_socket_name = runtime_dir;
m_socket_name += "/rpcs3.sock";
}
const int slot = Impl::get_port();
if (slot != IPC_DEFAULT_SLOT)
{
fmt::append(m_socket_name, ".%d", slot);
}
struct sockaddr_un server;
m_socket_name = get_socket_path("rpcs3.sock", Impl::get_port(), IPC_DEFAULT_SLOT);
m_sock = socket(AF_UNIX, SOCK_STREAM, 0);
if (m_sock < 0)
@@ -587,23 +610,13 @@ namespace pine
Impl::error("IPC: Cannot open socket! Shutting down...");
return;
}
server.sun_family = AF_UNIX;
strcpy(server.sun_path, m_socket_name.c_str());
// we unlink the socket so that when releasing this thread the socket gets
// freed even if we didn't close correctly the loop
unlink(m_socket_name.c_str());
if (bind(m_sock, std::bit_cast<struct sockaddr*>(&server), sizeof(struct sockaddr_un)))
{
Impl::error("IPC: Error while binding to socket! Shutting down...");
return;
}
const char* failure = bind_and_listen(m_sock, m_socket_name);
#endif
// maximum queue of 4096 commands before refusing, approximated to the
// nearest legal value. We do not use SOMAXCONN as windows have this idea
// that a "reasonable" value is 5, which is not.
listen(m_sock, 4096);
if (failure)
{
Impl::error("IPC: Error while setting up socket (%s)! Shutting down...", failure);
}
}
pine_server(const pine_server&) = delete;
+48 -2
View File
@@ -41,12 +41,58 @@
<CmakeReleaseCLI>call vsdevcmd.bat -arch=amd64
if not exist "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" mkdir "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)"
cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)"
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -Dprotobuf_INSTALL=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -Dprotobuf_BUILD_PROTOBUF_BINARIES=ON -Dprotobuf_BUILD_PROTOC_BINARIES=OFF -Dprotobuf_BUILD_LIBPROTOC=OFF -Dprotobuf_BUILD_LIBUPB=OFF -Dprotobuf_ALLOW_CCACHE=ON -Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=ON "$(SolutionDir)3rdparty\protobuf\protobuf"
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
%25CCACHE_LAUNCH_ARGS%25 ^
-DCMAKE_CXX_STANDARD=20 ^
-DCMAKE_BUILD_TYPE="Release" ^
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-Dprotobuf_INSTALL=ON ^
-Dprotobuf_BUILD_TESTS=OFF ^
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
-Dprotobuf_BUILD_EXAMPLES=OFF ^
-Dprotobuf_BUILD_PROTOBUF_BINARIES=ON ^
-Dprotobuf_BUILD_PROTOC_BINARIES=OFF ^
-Dprotobuf_BUILD_LIBPROTOC=OFF ^
-Dprotobuf_BUILD_LIBUPB=OFF ^
-Dprotobuf_ALLOW_CCACHE=ON ^
-Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON ^
-Dprotobuf_WITH_ZLIB=OFF ^
-Dprotobuf_MSVC_STATIC_RUNTIME=ON ^
"$(SolutionDir)3rdparty\protobuf\protobuf"
</CmakeReleaseCLI>
<CmakeDebugCLI>call vsdevcmd.bat -arch=amd64
if not exist "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)" mkdir "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)"
cd "$(SolutionDir)build\tmp\protobuf_build-$(Configuration)-$(Platform)"
cmake -G Ninja -DCMAKE_CXX_COMPILER="cl.exe" -DCMAKE_C_COMPILER="cl.exe" -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -Dprotobuf_INSTALL=ON -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -Dprotobuf_BUILD_PROTOBUF_BINARIES=ON -Dprotobuf_BUILD_PROTOC_BINARIES=OFF -Dprotobuf_BUILD_LIBPROTOC=OFF -Dprotobuf_BUILD_LIBUPB=OFF -Dprotobuf_ALLOW_CCACHE=ON -Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF "$(SolutionDir)3rdparty\protobuf\protobuf"
if not defined CCACHE_LAUNCH_ARGS set CCACHE_LAUNCH_ARGS=
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER="cl.exe" ^
-DCMAKE_C_COMPILER="cl.exe" ^
%25CCACHE_LAUNCH_ARGS%25 ^
-DCMAKE_CXX_STANDARD=20 ^
-DCMAKE_BUILD_TYPE="Debug" ^
-DCMAKE_INSTALL_PREFIX="$(SolutionDir)build\lib\$(Configuration)-$(Platform)\protobuf_build" ^
-DCMAKE_SYSTEM_VERSION=10.0 ^
-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=$(WindowsTargetPlatformVersion) ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL ^
-Dprotobuf_INSTALL=ON ^
-Dprotobuf_BUILD_TESTS=OFF ^
-Dprotobuf_BUILD_CONFORMANCE=OFF ^
-Dprotobuf_BUILD_EXAMPLES=OFF ^
-Dprotobuf_BUILD_PROTOBUF_BINARIES=ON ^
-Dprotobuf_BUILD_PROTOC_BINARIES=OFF ^
-Dprotobuf_BUILD_LIBPROTOC=OFF ^
-Dprotobuf_BUILD_LIBUPB=OFF ^
-Dprotobuf_ALLOW_CCACHE=ON ^
-Dprotobuf_FORCE_FETCH_DEPENDENCIES=ON ^
-Dprotobuf_WITH_ZLIB=OFF ^
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF ^
"$(SolutionDir)3rdparty\protobuf\protobuf"
</CmakeDebugCLI>
<CmakeCleanCLI>
echo Cleaning..
+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"
+16 -16
View File
@@ -4,23 +4,23 @@ 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 ON CACHE INTERNAL "" FORCE)
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)
target_compile_definitions(wolfssl INTERFACE 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
+107 -5
View File
@@ -71,15 +71,44 @@
</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_hs.c" />
<ClCompile Include="wolfssl\src\ssl_api_pk.c" />
<ClCompile Include="wolfssl\src\ssl_api_rw.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_err.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\ssl_tsp.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 +168,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 +266,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 +278,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 +291,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 +310,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 +318,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 +348,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" />
+25 -16
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.11.0](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.12.0](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.11.0\msvc2022_64\`
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.12.0\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.11.0\msvc2022_64\`
- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.12.0\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.11.0](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.12.0](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.**
@@ -72,14 +72,7 @@ You can either use `update-alternatives` to setup `gcc-13`/`g++-13` as your defa
##### Vulkan SDK
For Ubuntu systems, it is strongly recommended to use the PPA from [LunarG](https://packages.lunarg.com/) which will provide a compatible Vulkan SDK to compile RPCS3. If your Vulkan SDK is older, it can lead to compilation errors.
```
. /etc/os-release
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.268-$UBUNTU_CODENAME.list https://packages.lunarg.com/vulkan/1.3.268/lunarg-vulkan-1.3.268-$UBUNTU_CODENAME.list
sudo apt update
sudo apt install vulkan-sdk
```
For Ubuntu systems, it is strongly recommended to use the official [Linux Tarball Vulkan SDK](https://vulkan.lunarg.com/doc/view/1.4.341.0/linux/getting_started.html) which will provide a compatible Vulkan SDK to compile RPCS3. If your Vulkan SDK is older, it can lead to compilation errors.
##### CMake
@@ -123,7 +116,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.11.0\msvc2022_64`, version will fill in automatically
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.12.0\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**)
@@ -132,7 +125,7 @@ Start **Visual Studio**, click on `Open a project or solution` and select the `r
**NOTE:** The recommended build configuration is `Release`. (On older revisions: `Release - LLVM`)
To speed up the compilation time, you may want to download and extract to `<rpcs3_root>\build\lib_ext\<$(Configuration)>-x64` (e.g. `c:\rpcs3\build\lib_ext\Release-x64`; the path needs to be created) the following precompiled lib:
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z)
- [LLVM libs](https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-22.1.8/llvmlibs_mt.7z)
**NOTES:**
- `<$(Configuration)>` can assume values `Release` or `Debug`.
@@ -179,6 +172,22 @@ In case you preferred to install and use the standalone **CMake** tool:
```
3) once the build is completed, the **RPCS3** application will be available under the `<rpcs3_root>\build-msvc\bin` folder
#### Building with the PowerShell script
As an alternative to building through Visual Studio, run the PowerShell helper from the repository root:
```powershell
.\scripts\win_build.ps1
```
The script locates a supported Visual Studio installation, finds Qt from `Qt6_ROOT` or a standard `C:\Qt` installation, configures a Release Ninja Multi-Config build, and then builds it. Pass `-Cores <count>` to set the parallel build count; by default it uses all logical processors:
```powershell
.\scripts\win_build.ps1 -Cores 8
```
The resulting application is placed in `<rpcs3_root>\build\bin`.
### Linux
While still in the project root:
+4 -2
View File
@@ -29,6 +29,7 @@ else()
endif()
option(USE_NATIVE_INSTRUCTIONS "USE_NATIVE_INSTRUCTIONS makes rpcs3 compile with -march=native, which is useful for local builds, but not good for packages." ON)
option(USE_ARM_LSE2 "Compile with LSE2 instructions" OFF)
option(WITH_LLVM "Enable usage of LLVM library" ON)
option(BUILD_LLVM "Build LLVM from git submodule" OFF)
option(STATIC_LINK_LLVM "Link against LLVM statically. This will get set to ON if you build LLVM from the submodule." OFF)
@@ -63,6 +64,7 @@ option(USE_LTO "Use LTO for building" ON)
option(BUILD_RPCS3_TESTS "Build RPCS3 unit tests." OFF)
option(RUN_RPCS3_TESTS "Run RPCS3 unit tests. Requires BUILD_RPCS3_TESTS" OFF)
option(USE_GAMEMODE "Choose whether to enable GameMode features or not." ON)
option(BUNDLE_UDEV_RULES "Include udev rules on Linux/FreeBSD" OFF)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/buildfiles/cmake")
@@ -94,8 +96,8 @@ 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)
+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.
+140 -51
View File
@@ -2,6 +2,7 @@
#include "Config.h"
#include "util/types.hpp"
#include "util/yaml.hpp"
#include "util/cctype.hpp"
#include <charconv>
@@ -40,7 +41,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 +69,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 +77,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 +108,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 +116,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 +129,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 +153,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 +167,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 +194,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 +208,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 +221,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 +238,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 +252,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 +263,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 +300,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 +311,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;
}
@@ -468,37 +466,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:
{
@@ -506,7 +517,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;
@@ -516,7 +530,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;
@@ -533,22 +548,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));
@@ -558,20 +587,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();
@@ -598,12 +650,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
@@ -620,8 +677,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);
@@ -644,6 +700,39 @@ 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;
}
bool cfg::_bool::from_string(std::string_view value, bool /*dynamic*/)
{
if (value.size() != 4 && value.size() != 5)
{
return false;
}
char copy[5];
std::transform(value.begin(), value.end(), std::begin(copy), utils::tolower<char>);
if (value.size() == 5 && std::string_view{copy, 5} == "false")
m_value = false;
else if (value.size() == 4 && std::string_view{copy, 4} == "true")
m_value = true;
else
return false;
return true;
}
std::string cfg::map_entry::get_value(std::string_view key)
{
if (auto it = m_map.find(key); it != m_map.end())
@@ -689,7 +778,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{})
+23 -28
View File
@@ -25,7 +25,7 @@ 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);
@@ -110,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
@@ -161,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
@@ -209,25 +212,7 @@ namespace cfg
return def ? "true" : "false";
}
bool from_string(std::string_view value, bool /*dynamic*/ = false) override
{
if (value.size() != 4 && value.size() != 5)
{
return false;
}
char copy[5];
std::transform(value.begin(), value.end(), std::begin(copy), ::tolower);
if (value.size() == 5 && std::string_view{copy, 5} == "false")
m_value = false;
else if (value.size() == 4 && std::string_view{copy, 4} == "true")
m_value = true;
else
return false;
return true;
}
bool from_string(std::string_view value, bool dynamic = false) override;
void set(const bool& value)
{
@@ -301,7 +286,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));
@@ -382,7 +367,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;
@@ -451,7 +436,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;
}
@@ -462,7 +447,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;
}
@@ -473,7 +458,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;
@@ -560,7 +545,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;
@@ -646,7 +631,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;
@@ -704,6 +689,11 @@ namespace cfg
return *m_value.load().get();
}
std::string get() const
{
return *m_value.load().get();
}
std::string def_to_string() const override
{
return def;
@@ -714,6 +704,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)
+410 -17
View File
@@ -26,6 +26,7 @@ std::string g_android_cache_dir;
#include <cwchar>
#include <Windows.h>
#include <winioctl.h>
static std::unique_ptr<wchar_t[]> to_wchar(std::string_view source)
{
@@ -38,6 +39,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));
@@ -136,6 +148,7 @@ static fs::error to_error(DWORD e)
#include <sys/statvfs.h>
#include <sys/file.h>
#include <sys/uio.h>
#include <sys/ioctl.h>
#include <dirent.h>
#include <fcntl.h>
#include <libgen.h>
@@ -147,12 +160,19 @@ static fs::error to_error(DWORD e)
#include <copyfile.h>
#include <mach-o/dyld.h>
#include <limits.h>
#include <sys/disk.h>
#include <sys/param.h>
#include <sys/mount.h>
#elif defined(__linux__) || defined(__sun)
#include <sys/sendfile.h>
#include <sys/syscall.h>
#include <sys/sysmacros.h>
#include <linux/fs.h>
#else
#include <fstream>
#include <sys/disk.h>
#include <sys/param.h>
#include <sys/mount.h>
#endif
static fs::error to_error(int e)
@@ -166,12 +186,103 @@ 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;
}
}
#if defined(__linux__)
// Major numbers of the block devices an optical disc can be accessed through (see "Documentation/admin-guide/devices.txt")
constexpr unsigned int s_scsi_cdrom_major = 11; // Optical drive (e.g. "/dev/sr0")
constexpr unsigned int s_loopback_major = 7; // Disc image attached with "mount"/"losetup" (e.g. "/dev/loop0")
#endif
// Check whether the provided device node is an optical drive (e.g. a Blu-Ray Disc drive) or a mounted disc image
static bool is_optical_device_node(const struct ::stat& file_info)
{
#if defined(__linux__)
// An optical drive is exposed as a block device using the SCSI CD-ROM major number (e.g. "/dev/sr0", "/dev/scd0" or the "/dev/cdrom" link).
// A disc image attached through "mount -o loop" (or "losetup") is exposed as a loopback block device instead (e.g. "/dev/loop0"):
// it is the counterpart of an ISO file mounted on Windows, where the resulting virtual drive is reported as DRIVE_CDROM
if (!S_ISBLK(file_info.st_mode))
{
return false;
}
const unsigned int device_major = major(file_info.st_rdev);
return device_major == s_scsi_cdrom_major || device_major == s_loopback_major;
#elif defined(__APPLE__)
// The raw (unbuffered) device is a character device (e.g. "/dev/rdisk2").
// NOTE: there is no cheap way to tell an optical drive from any other raw disk here, so any raw disk node is accepted
return S_ISCHR(file_info.st_mode);
#else
// On the BSDs an optical drive is a character device (e.g. "/dev/cd0")
return S_ISCHR(file_info.st_mode) || S_ISBLK(file_info.st_mode);
#endif
}
// Check whether the path is the root of a mounted filesystem (e.g. the mount point of a disc): "st_dev" changes when crossing a mount point
[[maybe_unused]] static bool is_mount_point(const std::string& path, const struct ::stat& file_info)
{
// A file is never a mount point: discard it without any syscall (the "stat()" below would fail with ENOTDIR anyway)
if (!S_ISDIR(file_info.st_mode))
{
return false;
}
struct ::stat parent_info;
if (::stat((path + "/..").c_str(), &parent_info) != 0)
{
return false;
}
return parent_info.st_dev != file_info.st_dev;
}
// Retrieve the size of a raw device: "fstat()" reports no size (0) on such a device
static u64 get_raw_device_size(int fd)
{
#if defined(__linux__)
if (u64 size = 0; ::ioctl(fd, BLKGETSIZE64, &size) == 0)
{
return size;
}
#elif defined(__APPLE__)
u64 block_count = 0;
u32 block_size = 0;
if (::ioctl(fd, DKIOCGETBLOCKCOUNT, &block_count) == 0 && ::ioctl(fd, DKIOCGETBLOCKSIZE, &block_size) == 0)
{
if (block_size && block_count > u64{umax} / block_size)
{
fmt::throw_exception("Raw device size overflow (block count: 0x%x, block size: 0x%x)", block_count, block_size);
}
return block_count * block_size;
}
#elif defined(__FreeBSD__) || defined(__DragonFly__)
if (off_t media_size = 0; ::ioctl(fd, DIOCGMEDIASIZE, &media_size) == 0)
{
return static_cast<u64>(media_size);
}
#endif
// Fallback: seek to the end of the device (restoring the current position afterwards)
const off_t old_pos = ::lseek(fd, 0, SEEK_CUR);
const off_t end_pos = ::lseek(fd, 0, SEEK_END);
if (old_pos >= 0)
{
::lseek(fd, old_pos, SEEK_SET);
}
return end_pos > 0 ? static_cast<u64>(end_pos) : 0;
}
#endif
static std::string path_append(std::string_view path, std::string_view more)
@@ -399,11 +510,12 @@ namespace fs
class windows_file final : public file_base
{
HANDLE m_handle;
u64 m_raw_device_size; // Size of the raw device, 0 if it's not one: it never changes, so it's retrieved once when the file is opened
atomic_t<u64> m_pos {0};
public:
windows_file(HANDLE handle)
: m_handle(handle)
windows_file(HANDLE handle, u64 raw_device_size = 0)
: m_handle(handle), m_raw_device_size(raw_device_size)
{
}
@@ -563,11 +675,17 @@ 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_size)
{
// 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, the size was already retrieved with DeviceIoControl() when the file was opened
return m_raw_device_size;
}
native_handle get_handle() override
@@ -606,10 +724,11 @@ namespace fs
class unix_file final : public file_base
{
int m_fd;
u64 m_raw_device_size; // Size of the raw device, 0 if it's not one: it never changes, so it's retrieved once when the file is opened
public:
unix_file(int fd)
: m_fd(fd)
unix_file(int fd, u64 raw_device_size = 0)
: m_fd(fd), m_raw_device_size(raw_device_size)
{
}
@@ -628,8 +747,8 @@ namespace fs
stat_t info {};
info.is_directory = S_ISDIR(file_info.st_mode);
info.is_writable = file_info.st_mode & 0200; // HACK: approximation
info.size = file_info.st_size;
info.is_writable = !m_raw_device_size && (file_info.st_mode & 0200); // HACK: approximation
info.size = m_raw_device_size ? m_raw_device_size : static_cast<u64>(file_info.st_size); // A raw device reports no size through "fstat()"
info.atime = file_info.st_atime;
info.mtime = file_info.st_mtime;
info.ctime = info.mtime;
@@ -735,10 +854,16 @@ namespace fs
u64 size() override
{
struct ::stat file_info;
ensure(::fstat(m_fd, &file_info) == 0); // "file::size"
if (!m_raw_device_size)
{
struct ::stat file_info;
ensure(::fstat(m_fd, &file_info) == 0); // "file::size"
return file_info.st_size;
return file_info.st_size;
}
// For a raw device, the size was already retrieved with an ioctl when the file was opened
return m_raw_device_size;
}
native_handle get_handle() override
@@ -1090,6 +1215,203 @@ bool fs::is_symlink(const std::string& path)
return true;
}
bool fs::is_optical_raw_device(const std::string& path)
{
#ifdef _WIN32
if (path.starts_with("\\\\.\\"))
{
return true;
}
return false;
#else
#ifdef __APPLE__
// On Mac OS X optical disks will only ever be mounted under /dev/disk(whatever), similar for raw devices,
// so reject anything not containing the disk string.
if (!path.starts_with("/dev/disk") && !path.starts_with("/dev/rdisk"))
{
return false;
}
#else
// Skip a useless check if the path cannot point to a device node (device nodes always live in "/dev")
if (!path.starts_with("/dev/"))
{
return false;
}
#endif
struct ::stat file_info;
if (::stat(path.c_str(), &file_info) != 0)
{
return false;
}
return is_optical_device_node(file_info);
#endif
}
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;
}
return false;
#elif defined(__linux__)
// Here the path points to a mounted optical disc (e.g. "/media/user/PS3_DISC") or to a mounted disc image
// (e.g. "mount -o loop game.iso /mnt/game"), so retrieve the device backing the filesystem it belongs to
struct ::stat file_info;
if (::stat(path.c_str(), &file_info) != 0)
{
return false;
}
// "st_dev" of anything stored on a filesystem backed by a block device matches "st_rdev" of the device itself
const dev_t device_id = file_info.st_dev;
const unsigned int device_major = major(device_id);
// Discard at once anything which is not backed by an optical drive or by a loopback device, so that the checks
// below (each one costing at least a syscall) only run on an actual candidate
if (device_major != s_scsi_cdrom_major && device_major != s_loopback_major)
{
return false;
}
// Skip a useless check to detect an optical raw device if the path is not the mount point of the disc, it means we are
// navigating on subfolders (on Windows, in the same way, only the drive root is accepted)
if (!is_mount_point(path, file_info))
{
return false;
}
const unsigned int device_minor = minor(device_id);
// Retrieve the device name from sysfs (e.g. "/sys/dev/block/11:0" -> "../../devices/[...]/block/sr0")
std::string device_path;
char link_target[1024]; // NOTE: "readlink()" never null terminates, so the buffer is used through the returned length only
if (const ssize_t len = ::readlink(("/sys/dev/block/" + std::to_string(device_major) + ":" + std::to_string(device_minor)).c_str(), link_target, sizeof(link_target)); len > 0)
{
const std::string_view target{link_target, static_cast<usz>(len)};
device_path = "/dev/";
device_path += target.substr(target.find_last_of('/') + 1);
}
else if (device_major == s_scsi_cdrom_major)
{
// Fallback (sysfs not available): the minor number matches the index of the SCSI CD-ROM device
device_path = "/dev/sr" + std::to_string(device_minor);
}
else
{
return false;
}
// Ensure the resolved node really points to the same optical device
struct ::stat device_info;
if (::stat(device_path.c_str(), &device_info) != 0 || device_info.st_rdev != device_id || !is_optical_device_node(device_info))
{
return false;
}
if (raw_device)
{
*raw_device = device_path;
}
return true;
#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
// Here the path points to a mounted optical disc or to a mounted disc image (e.g. attached with "hdiutil"/"mdconfig"),
// so retrieve the device backing the filesystem it belongs to
struct ::stat file_info;
if (::stat(path.c_str(), &file_info) != 0)
{
return false;
}
// Skip a useless check to detect an optical raw device if the path is not the mount point of the disc, it means we are
// navigating on subfolders (on Windows, in the same way, only the drive root is accepted). There is no cheap way to
// discard a device here (unlike the major number on Linux), so this is the filter which must come first: it rejects
// any file without a single syscall and any other folder with just one more
if (!is_mount_point(path, file_info))
{
return false;
}
struct ::statfs mount_info;
if (::statfs(path.c_str(), &mount_info) != 0)
{
return false;
}
std::string device_path = mount_info.f_mntfromname; // e.g. "/dev/disk2"
if (!device_path.starts_with("/dev/"))
{
return false;
}
#ifdef __APPLE__
// Use the raw (unbuffered) device (e.g. "/dev/disk2" -> "/dev/rdisk2")
if (!device_path.starts_with("/dev/r"))
{
device_path.insert(5, 1, 'r');
}
#endif
// Ensure the resolved node really points to a raw device
struct ::stat device_info;
if (::stat(device_path.c_str(), &device_info) != 0 || !is_optical_device_node(device_info))
{
return false;
}
if (raw_device)
{
*raw_device = device_path;
}
return true;
#else
// Not supported on this platform
return false;
#endif
}
bool fs::statfs(const std::string& path, fs::device_stat& info)
{
if (auto device = get_virtual_device(path))
@@ -1570,11 +1892,29 @@ bool fs::utime(const std::string& path, s64 atime, s64 mtime)
#endif
}
void fs::sync()
void fs::sync(const std::string& path)
{
#ifdef _WIN32
static_cast<void>(path);
fs::g_tls_error = fs::error::unknown;
#elif defined(__linux__)
// Only flush the filesystem containing the path: a global sync() also waits on every other mounted
// filesystem and may block indefinitely on a slow or stalled one (e.g. network or FUSE mounts)
const int fd = ::open(path.c_str(), O_RDONLY | O_CLOEXEC);
if (fd == -1)
{
fs::g_tls_error = to_error(errno);
return;
}
const int res = ::syncfs(fd);
const int err = errno;
::close(fd);
fs::g_tls_error = res == 0 ? fs::error::ok : to_error(err);
#else
static_cast<void>(path);
::sync();
fs::g_tls_error = fs::error::ok;
#endif
@@ -1657,9 +1997,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, static_cast<u64>(ensure(geometry.DiskSize.QuadPart)));
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 +2030,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;
}
@@ -1682,7 +2042,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
return;
}
if (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
if ((mode & fs::write) && (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
{
CloseHandle(handle);
g_tls_error = fs::error::acces;
@@ -1698,6 +2058,9 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
m_file = std::make_unique<windows_file>(handle);
#else
// An optical raw device can only be read: any write related flag makes the opening fail (handled as any other error)
const bool raw_device = is_optical_raw_device(path);
int flags = O_CLOEXEC; // Ensures all files are closed on execl for auto updater
if (mode & fs::read && mode & fs::write) flags |= O_RDWR;
@@ -1713,7 +2076,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
if (mode & fs::write && mode & fs::unread)
{
if (!(mode & (fs::excl + fs::lock)) && mode & fs::trunc)
if (!raw_device && !(mode & (fs::excl + fs::lock)) && mode & fs::trunc)
{
// Alternative to truncation for "unread" flag (TODO)
if (mode & fs::create)
@@ -1746,6 +2109,23 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
ensure(::ftruncate(fd, 0) == 0);
}
// If path points to an optical raw device, complete the file opening
if (raw_device)
{
// Try to retrieve the size of the content. If it fails, no disc is probably mounted so abort the file opening
const u64 raw_device_size = get_raw_device_size(fd);
if (!raw_device_size)
{
::close(fd);
g_tls_error = fs::error::noent;
return;
}
m_file = std::make_unique<unix_file>(fd, raw_device_size);
return;
}
m_file = std::make_unique<unix_file>(fd);
if (mode & fs::isfile && !(mode & fs::write) && get_stat().is_directory)
@@ -1872,6 +2252,17 @@ fs::native_handle fs::file::get_handle() const
#endif
}
bool fs::set_sparse([[maybe_unused]] const fs::file& file)
{
#ifdef _WIN32
FILE_SET_SPARSE_BUFFER sparse{TRUE};
DWORD returned = 0;
return DeviceIoControl(file.get_handle(), FSCTL_SET_SPARSE, &sparse, sizeof(sparse), nullptr, 0, &returned, nullptr) != FALSE;
#else
return true;
#endif
}
fs::file_id fs::file::get_id() const
{
if (m_file)
@@ -2156,6 +2547,7 @@ const std::string& fs::get_config_dir([[maybe_unused]] bool get_config_subdirect
// Clear buffer on failure and notify user
MessageBoxA(nullptr, fmt::format("GetEnvironmentVariable(RPCS3_CONFIG_DIR) failed: error: %s", fmt::win_error{GetLastError(), nullptr}).c_str(), "fs::get_config_dir()", MB_ICONERROR);
buf.clear();
size = 0;
}
}
@@ -2833,6 +3225,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";
+26 -2
View File
@@ -198,6 +198,19 @@ namespace fs
// Return "path" plus an ending delimiter (if missing) if "path" is an existing directory. Otherwise, an empty string
std::string get_path_if_dir(const std::string& path);
// Check whether the path is the bare name of a drive (e.g. "E:"), that is a root path whose trailing delimiter was
// trimmed: such a path does not point to the root of the drive but to the current directory of that drive, so the
// delimiter must be restored before using or storing it.
// NOTE: always false on the other platforms, where a name ending with ':' is a regular path component
inline bool is_drive_name([[maybe_unused]] std::string_view path)
{
#ifdef _WIN32
return !path.empty() && path.back() == ':';
#else
return false;
#endif
}
// Get file information
bool get_stat(const std::string& path, stat_t& info);
@@ -213,6 +226,13 @@ 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 (e.g. "\\.\E:" on Windows, "/dev/sr0" on Linux, "/dev/rdisk2" on macOS)
bool is_optical_raw_device(const std::string& path);
// Check whether the path points to an optical drive or to a mounted disc image (either the raw device itself or the
// mount point of the disc/image). 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);
@@ -243,8 +263,8 @@ namespace fs
// Set file access/modification time
bool utime(const std::string& path, s64 atime, s64 mtime);
// Synchronize filesystems (TODO)
void sync();
// Synchronize the filesystem containing the given path (only that filesystem where supported)
void sync(const std::string& path);
class file final
{
@@ -490,6 +510,9 @@ namespace fs
}
};
// Enable sparse-file semantics when required by the host platform.
bool set_sparse(const file& file);
class dir final
{
std::unique_ptr<dir_base> m_dir{};
@@ -683,6 +706,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;
+123 -14
View File
@@ -12,6 +12,12 @@
#include <charconv>
#if defined(__APPLE__)
#include <pthread.h>
#elif defined(ANDROID)
#include "util/cctype.hpp"
#endif
LOG_CHANNEL(jit_log, "JIT");
#ifdef LLVM_AVAILABLE
@@ -50,6 +56,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 +243,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 +262,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 +553,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 +683,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 +693,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);
@@ -658,11 +709,7 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
std::string result;
auto null_mod = std::make_unique<llvm::Module> ("null_", *m_context);
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
null_mod->setTargetTriple(llvm::Triple(jit_compiler::triple1()));
#else
null_mod->setTargetTriple(jit_compiler::triple1());
#endif
std::unique_ptr<llvm::RTDyldMemoryManager> mem;
@@ -676,11 +723,7 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
else
{
mem = std::make_unique<MemoryManager2>(std::move(symbols_cement));
#if LLVM_VERSION_MAJOR >= 21 && (LLVM_VERSION_MINOR >= 1 || LLVM_VERSION_MAJOR >= 22)
null_mod->setTargetTriple(llvm::Triple(jit_compiler::triple2()));
#else
null_mod->setTargetTriple(jit_compiler::triple2());
#endif
}
}
else
@@ -701,6 +744,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 +840,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 +880,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 +953,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);
@@ -932,7 +1041,7 @@ const char * fallback_cpu_detection()
return "cortex-a78";
}
std::transform(result.begin(), result.end(), result.begin(), ::tolower);
std::transform(result.begin(), result.end(), result.begin(), utils::tolower<char>);
return result;
}();
+2 -1
View File
@@ -26,6 +26,7 @@
*/
#include "LUrlParser.h"
#include "util/cctype.hpp"
#include <algorithm>
#include <cstring>
@@ -36,7 +37,7 @@ static bool IsSchemeValid( const std::string& SchemeName )
{
return std::all_of(SchemeName.cbegin(), SchemeName.cend(), [](const auto& c)
{
return isalpha(c) || c == '+' || c == '-' || c == '.';
return utils::isalpha(c) || c == '+' || c == '-' || c == '.';
});
}
+21 -6
View File
@@ -3,6 +3,7 @@
#include "cfmt.h"
#include "util/endian.hpp"
#include "util/v128.hpp"
#include "util/cctype.hpp"
#include <locale>
#include <codecvt>
@@ -198,12 +199,12 @@ fmt::base57_result fmt::base57_result::from_string(std::string_view str)
{
auto to_val = [](u8 c) -> u64
{
if (std::isdigit(c))
if (utils::isdigit(c))
{
return c - '0';
}
if (std::isupper(c))
if (utils::isupper(c))
{
// Omitted characters
if (c == 'B' || c == 'D' || c == 'I' || c == 'O')
@@ -231,7 +232,7 @@ fmt::base57_result fmt::base57_result::from_string(std::string_view str)
return c - 'A' + 10;
}
if (std::islower(c))
if (utils::islower(c))
{
// Omitted characters
if (c == 'l')
@@ -611,7 +612,7 @@ void fmt_class_string<std::source_location>::format(std::string& out, u64 arg)
#ifdef _WIN32
if (DWORD error = GetLastError())
{
fmt::append(out, " (error=%s)", error, fmt::win_error_to_string(error));
fmt::append(out, " (error=%s)", fmt::win_error_to_string(error));
}
#else
if (int error = errno)
@@ -630,6 +631,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 +929,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);
}
@@ -938,7 +953,7 @@ std::string fmt::to_upper(std::string_view string)
{
std::string result;
result.resize(string.size());
std::transform(string.begin(), string.end(), result.begin(), ::toupper);
std::transform(string.begin(), string.end(), result.begin(), utils::toupper<char>);
return result;
}
@@ -946,7 +961,7 @@ std::string fmt::to_lower(std::string_view string)
{
std::string result;
result.resize(string.size());
std::transform(string.begin(), string.end(), result.begin(), ::tolower);
std::transform(string.begin(), string.end(), result.begin(), utils::tolower<char>);
return result;
}
+30 -8
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);
@@ -161,7 +161,7 @@ namespace fmt
std::string_view trim_back_sv(std::string_view source, std::string_view values = " \t");
template <typename T>
std::string merge(const T& source, std::string_view separator)
std::string merge(const T& source, std::string_view separator, bool is_skip_empty = false)
{
if (source.empty())
{
@@ -180,6 +180,23 @@ namespace fmt
auto it = source.begin();
auto end = source.end();
if (is_skip_empty)
{
for (; it != end; ++it)
{
if (it->empty()) continue;
if (!result.empty() && !separator.empty())
{
result.append(separator);
}
result.append(*it);
}
return result;
}
for (--end; it != end; ++it)
{
result.append(*it);
@@ -192,7 +209,7 @@ namespace fmt
}
template <typename T>
std::string merge(std::initializer_list<T> sources, std::string_view separator)
std::string merge(std::initializer_list<T> sources, std::string_view separator, bool is_skip_empty = false)
{
if (!sources.size())
{
@@ -213,6 +230,11 @@ namespace fmt
for (const auto& v : sources)
{
if (v.empty()) continue;
std::string sub = fmt::merge(v, separator, is_skip_empty);
if (sub.empty()) continue;
if (first)
{
first = false;
@@ -222,7 +244,7 @@ namespace fmt
result.append(separator);
}
result.append(fmt::merge(v, separator));
result.append(std::move(sub));
}
return result;
+741 -42
View File
File diff suppressed because it is too large Load Diff
+13 -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
@@ -907,3 +905,6 @@ public:
::operator delete(static_cast<void*>(m_threads), std::align_val_t{alignof(Thread)});
}
};
usz map_workload(std::string_view thread_name, usz thread_count, usz count, std::function<void(usz)>&& func);
usz map_workload(std::string_view thread_name, usz thread_count, std::function<void()>&& func);
+26 -9
View File
@@ -5,11 +5,13 @@
#include "version.h"
#include "Emu/IdManager.h"
#include "Emu/Memory/vm.h"
#include "Emu/emu_callbacks.h"
#include "Emu/System.h"
#include "Emu/VFS.h"
#include "util/types.hpp"
#include "util/asm.hpp"
#include "util/cctype.hpp"
#include <charconv>
#include <regex>
@@ -329,7 +331,7 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, std::st
is_valid = false;
continue;
}
else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return std::isalnum(static_cast<unsigned char>(c)); }))
else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return utils::isalnum(c); }))
{
append_log_message(log_messages, fmt::format("Error: Serial '%s' invalid (patch: %s, key: %s, location: %s, file: %s)", serial, description, main_key, get_yaml_node_location(serial_node), path), &patch_log.error);
is_valid = false;
@@ -962,7 +964,7 @@ static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_inf
const u32 alloc_size = utils::align(static_cast<u32>(p.value.long_value) + alloc_at % 4096, 4096);
// Allocate map if needed, if allocated flags will indicate that bit 62 is set (unique identifier)
auto alloc_map = vm::reserve_map(vm::any, alloc_at & -0x10000, utils::align(alloc_size, 0x10000), vm::page_size_64k | (1ull << 62));
auto alloc_map = vm::reserve_map(vm::any, alloc_at & -0x10000, utils::align(alloc_size, 0x10000), vm::block_size_64k | (1ull << 62));
u64 flags = vm::alloc_unwritable;
@@ -1188,7 +1190,7 @@ static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_inf
if (!addr)
{
patch_log.error("Failed to allocate 0x%x bytes for code (entry=0x%x)", alloc_size, addr, out_branch);
patch_log.error("Failed to allocate 0x%x bytes for code (entry=0x%x)", alloc_size, out_branch);
continue;
}
@@ -1386,7 +1388,7 @@ static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_inf
if (exec_addr)
{
Emu.GetCallbacks().add_breakpoint(exec_addr);
g_emu_callbacks.add_breakpoint(exec_addr);
}
break;
@@ -1434,7 +1436,7 @@ static usz apply_modification(std::vector<u32>& applied, patch_engine::patch_inf
if (dest_path.empty())
{
patch_log.error("Failed to patch file path at '%s': destination is not mounted", original_vfs_path, dest_vfs_path);
patch_log.error("Failed to patch file path at '%s': destination is not mounted", original_vfs_path);
continue;
}
@@ -1803,8 +1805,9 @@ static void append_patches(patch_engine::patch_map& existing_patches, const patc
bool patch_engine::save_patches(const patch_map& patches, const std::string& path, std::stringstream* log_messages)
{
fs::file file(path, fs::rewrite);
if (!file)
fs::pending_file file(path);
if (!file.file)
{
append_log_message(log_messages, fmt::format("Failed to open patch file %s (%s)", path, fs::g_tls_error), &patch_log.fatal);
return false;
@@ -1904,7 +1907,17 @@ bool patch_engine::save_patches(const patch_map& patches, const std::string& pat
out << YAML::Flow;
out << YAML::BeginSeq;
out << fmt::format("%s", data.type);
out << fmt::format("0x%.8x", data.offset);
if (patch_type_uses_hex_offset(data.type))
{
out << fmt::format("0x%.8x", data.offset);
}
else
{
// This element is a path for move_file and hide_file, not an address
out << data.original_offset;
}
out << data.original_value;
out << YAML::EndSeq;
}
@@ -1918,7 +1931,11 @@ bool patch_engine::save_patches(const patch_map& patches, const std::string& pat
out << YAML::EndMap;
file.write(out.c_str(), out.size());
if (file.file.write(out.c_str(), out.size()) < out.size() || !file.commit())
{
append_log_message(log_messages, fmt::format("Failed to write patch file %s (%s)", path, fs::g_tls_error), &patch_log.fatal);
return false;
}
return true;
}
+22 -6
View File
@@ -146,25 +146,41 @@ public:
constexpr bool test_and_set(T bit)
{
bool r = (m_data & shift(bit)) != 0;
m_data |= shift(bit);
const under s = shift(bit);
const bool r = (m_data & s) != 0;
m_data |= s;
return r;
}
constexpr bool test_and_set(T bit, bool value)
{
const under s = shift(bit);
const bool r = (m_data & s) != 0;
m_data = (value ? (m_data | s) : (m_data & ~s));
return r;
}
constexpr bool test_and_reset(T bit)
{
bool r = (m_data & shift(bit)) != 0;
m_data &= ~shift(bit);
const under s = shift(bit);
const bool r = (m_data & s) != 0;
m_data &= ~s;
return r;
}
constexpr bool test_and_complement(T bit)
{
bool r = (m_data & shift(bit)) != 0;
m_data ^= shift(bit);
const under s = shift(bit);
const bool r = (m_data & s) != 0;
m_data ^= s;
return r;
}
constexpr bool test(bs_t arg) const
{
return (m_data & arg.m_data) != 0;
}
constexpr bool all_of(bs_t arg) const
{
return (m_data & arg.m_data) == arg.m_data;
+83
View File
@@ -91,6 +91,24 @@ usz cfmt_append(Dst& out, const Char* fmt, Src&& src)
}
};
const auto write_binary = [&](auto value, u64 min_num)
{
if constexpr (sizeof(value) == 16)
{
out.resize(out.size() + std::max<u64>(min_num, 128 - utils::clz128(value | 1)), '0');
}
else
{
out.resize(out.size() + std::max<u64>(min_num, 64 - std::countl_zero<u64>(value | 1)), '0');
}
// Write in reversed order
for (auto i = out.rbegin(); value; i++, value >>= 1)
{
*i = static_cast<usz>(value & 0b1) ? '1' : '0';
}
};
const auto write_decimal = [&](auto value, s64 min_size)
{
const usz start = out.size();
@@ -635,6 +653,71 @@ usz cfmt_append(Dst& out, const Char* fmt, Src&& src)
break;
}
case 'b':
case 'B':
{
if (!src.test(ctx.args)) [[unlikely]]
{
drop_sequence();
break;
}
const usz src_type = src.type(ctx.args);
if (!ctx.type || src_type > 8)
{
ctx.type = static_cast<u8>(src_type);
if (!ctx.type)
{
ctx.type = src.size_int;
}
}
const u64 mask =
ctx.type == 1 ? 0xff :
ctx.type == 2 ? 0xffff :
ctx.type == 4 ? 0xffff'ffffu :
0xffff'ffff'ffff'ffffu;
// Trunc sign-extended signed types
const u64 val = src.template get<u64>(ctx.args) & mask;
const usz start = out.size();
if (!ctx.dot || ctx.prec)
{
if (ctx.type >= 16)
{
u128 val2 = *reinterpret_cast<const u128*>(val);
write_binary(val2, ctx.prec);
}
else
{
write_binary(val, ctx.prec);
}
}
const usz size2 = out.size() - start;
if (size2 < ctx.width)
{
// Add padding if necessary
if (ctx.zeros && !ctx.left && !ctx.dot)
{
out.insert(out.begin() + start + (ctx.alter && val ? 2 : 0), ctx.width - size2, '0');
}
else
{
out.insert(ctx.left ? out.end() : out.begin() + start, ctx.width - size2, ' ');
}
}
src.skip(ctx.args);
ctx = {0};
break;
}
case 'p':
{
if (!src.test(ctx.args) || ctx.type) [[unlikely]]
+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;
}
+1 -1
View File
@@ -47,7 +47,7 @@ namespace date_time
std::string parse_buf;
if constexpr(separator != 0)
if constexpr (separator != 0)
parse_buf = std::string("%Y") + separator + "%m" + separator + "%d" + separator + "%H" + separator + "%M" + separator + "%S";
else
parse_buf = "%Y%m%d%H%M%S";
+61 -3
View File
@@ -1,5 +1,6 @@
#pragma once
#include <array>
#include <cmath>
#include <type_traits>
@@ -723,15 +724,24 @@ struct coord3_base
struct { T width, height, depth; };
};
constexpr coord3_base() : position{}, size{}
constexpr coord3_base()
: position{}, size{}
{
}
constexpr coord3_base(const position3_base<T>& position, const size3_base<T>& size) : position{ position }, size{ size }
constexpr coord3_base(const position3_base<T>& position, const size3_base<T>& size)
: position{ position }, size{ size }
{
}
constexpr coord3_base(T x, T y, T z, T width, T height, T depth) : x{ x }, y{ y }, z{ z }, width{ width }, height{ height }, depth{ depth }
constexpr coord3_base(T x, T y, T z, T width, T height, T depth)
: x{ x }, y{ y }, z{ z }, width{ width }, height{ height }, depth{ depth }
{
}
constexpr coord3_base(const area_base<T>& area, T z = 0, T depth = 1)
: x{ area.x1 }, y{ area.y1 }, z{ z }
, width{ area.x2 - area.x1 }, height{ area.y2 - area.y1 }, depth{ depth }
{
}
@@ -754,6 +764,51 @@ struct coord3_base
{
return{ static_cast<NT>(x), static_cast<NT>(y), static_cast<NT>(z), static_cast<NT>(width), static_cast<NT>(height), static_cast<NT>(depth) };
}
void flip_horizontal()
requires std::is_signed_v<T>
{
auto x2 = x + width;
x = x2;
width = -width;
}
void flip_vertical()
requires std::is_signed_v<T>
{
auto y2 = y + height;
y = y2;
height = -height;
}
bool is_flipped() const
requires std::is_signed_v<T>
{
return width < 0 || height < 0 || depth < 0;
}
area_base<T> to_area() const
{
return { x, y, x + width, y + height };
}
T abs_width() const
requires std::is_signed_v<T>
{
return width < 0 ? -width : width;
}
T abs_height() const
requires std::is_signed_v<T>
{
return height < 0 ? -height : height;
}
T abs_depth() const
requires std::is_signed_v<T>
{
return depth < 0 ? -depth : depth;
}
};
@@ -1027,3 +1082,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);
+5
View File
@@ -28,6 +28,11 @@ class shared_mutex final
public:
constexpr shared_mutex() = default;
const atomic_t<u32>& raw() const
{
return m_value;
}
bool try_lock_shared()
{
const u32 value = m_value.load();
+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)
{
+64 -16
View File
@@ -13,6 +13,33 @@
namespace utils
{
void clean_backtrace(std::vector<std::string>& result)
{
for (usz it = 1, first_in_seq = 0, del_count = 0;;)
{
if (it >= result.size() || result[it] != result[first_in_seq])
{
if (del_count)
{
fmt::append(result[first_in_seq], " x%u", del_count + 1);
}
if (it < result.size())
{
first_in_seq = it;
it++;
del_count = 0;
continue;
}
break;
}
result.erase(result.begin() + it);
del_count++;
}
}
#ifdef _WIN32
std::string wstr_to_utf8(LPWSTR data, int str_len)
{
@@ -30,42 +57,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,26 +146,27 @@ 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));
}
}
clean_backtrace(result);
return result;
}
#else
@@ -147,6 +194,7 @@ namespace utils
free(symbols);
#endif
clean_backtrace(result);
return result;
}
#endif
+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();
}
+9 -10
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());
}
}
@@ -57,7 +55,8 @@ namespace utils
int compare_versions(const std::string& v1, const std::string& v2, bool& ok)
{
// Check if both version strings are valid
ok = std::regex_match(v1, std::regex("[0-9.]*")) && std::regex_match(v2, std::regex("[0-9.]*"));
static const std::regex comp = std::regex("[0-9.]*");
ok = std::regex_match(v1, comp) && std::regex_match(v2, comp);
if (!ok)
{
+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)
+10
View File
@@ -208,6 +208,16 @@ QComboBox {
padding-bottom: 0.2em;
padding-left: 0.4em;
}
QComboBox QAbstractItemView {
background-color: #323232;
color: #fff;
border: 0.05em solid #1e1e1e;
}
QComboBox QAbstractItemView::item:selected,
QComboBox QAbstractItemView::item:hover {
background-color: #444444;
color: #fff;
}
QComboBox::disabled {
background-color: #828790;
color: #fff;
File diff suppressed because it is too large Load Diff
@@ -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 {
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

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