Compare commits

...

190 Commits

Author SHA1 Message Date
Ani 2f8ed1a6bd rpcs3_version: Bump to 0.0.36 2025-03-30 21:45:32 +02:00
Megamouse 781da9dc59 input: disable pad vibration after no new data was sent for 3 seconds
This is supposedly how the lib does it.
2025-03-30 20:42:15 +02:00
Vestral 1e6a4dc5c8 Fix discord after #16885 2025-03-30 19:58:28 +02:00
Megamouse 282fbcc3e5 Qt: fix wrong save data movie playing when selecting a different entry 2025-03-30 12:35:16 +02:00
Megamouse cd9c156937 7z: log error code when opening the file 2025-03-30 12:35:16 +02:00
DH cd840ef70a LLVM JIT: do not produce broken binaries on crash 2025-03-30 08:18:09 +03:00
Zion Nimchuk 55190c2125 Update Qt to 6.8.3 and update clang compiler 2025-03-29 23:21:54 +01:00
Megamouse 01cdc83aeb Qt: play ICON1.PAM in save data manager details 2025-03-29 15:09:25 +01:00
Megamouse b9e0a36816 Qt: Add qt video source class for more generic video playback 2025-03-29 15:09:25 +01:00
Megamouse fccb761ef2 Qt: play ICON1.PAM in save data manager 2025-03-29 12:18:18 +01:00
Megamouse 0ffb4e62e6 Qt: pass game list events to base class 2025-03-29 12:18:18 +01:00
Megamouse bd1102d3b7 Qt: simplify icon_ready_callback in game list 2025-03-29 12:18:18 +01:00
Megamouse 91427646f5 VulkanMemoryAllocator: Match current master commit 2025-03-28 20:41:41 +01:00
Megamouse 596e6cc2c3 Add VulkanMemoryAllocator v2.3.0 submodule 2025-03-28 20:41:41 +01:00
elad335 9c99e75939 SPU Debug: WrDec and LSA view
Report the last written value to WrDec.
2025-03-28 19:56:54 +03:00
elad335 047f71b434 PPU/cellSpurs: MGS4: Fix cellSpursAddUrgentCommand race condition
cellSpursAddUrgentCommand searches in 4 slots for an empty slot to put the command at.
At first, it seems to do so unordered.

Meanwhile, on SPU side, it expects an order between all the commands because it pops them it in FIFO manner.
Not keeping track of how many commands are queued in total.

After second observation of cellSpursAddUrgentCommand, something odd comes takes places here.
Usually, reservation loops are individual and are expected to be closed without any changes of the previous loop affected by the proceeding one.
But in this case, after a single failure, the entire operayion is reset, a loop of 4 reservation operations suddenly is reset completely.

This makes one wonder if it the HW expects sometjing else here, perhaps it caches the reservation internally here?
After some adjustments to LDARX and STDCX to cache the reservation between succeeding loops, Metal Gear Solid 4 no longer freezes!
2025-03-28 19:56:54 +03:00
elad335 91b1ec6d5c SPU LLVM: Dump some funcs 2025-03-28 19:56:54 +03:00
Ani a7df3cfb40 config: Set default Driver Wake-Up Delay to 0 2025-03-28 18:46:41 +03:00
Megamouse 949a80dc0a Loader: deny boot if the firmware is too old 2025-03-28 18:18:09 +03:00
Ian Carpenter 095c884331 unpkg: Restore support for PSP/Vita packages 2025-03-28 14:43:38 +03:00
Ani 32a8bcf525 config: Increase max vblank rate to 6000 2025-03-28 10:47:23 +03:00
Megamouse a469bfd4da overlays: hide friends list in home menu if rpcn is not configured 2025-03-27 18:08:30 +01:00
Megamouse 6921684cd9 Update Qt to 6.8.3 2025-03-27 09:25:02 +01:00
Megamouse 76c069e8bf VS/MSVC: Move LTCG and GL to CI only
This was taking too long on my local builds after simple code changes.
2025-03-27 04:35:27 +01:00
Megamouse b571978f24 Windows/Qt: do not deploy dx and ffmpeg libs 2025-03-27 02:33:32 +01:00
Megamouse b8236e183c cellMic: log ALCenum error string 2025-03-27 00:51:15 +01:00
Megamouse 2a7e957c61 Qt: fix custom icons when "Prefer game data icons" is set 2025-03-26 18:33:51 +01:00
Megamouse 467c4ba2cf Qt: add option to prefer game data icons in the game list 2025-03-26 12:07:59 +01:00
RipleyTom 324af04426 Set PSN to disconnected when net status is disconnected 2025-03-25 21:46:38 +01:00
Megamouse 1b5d9a34df overlays/rpcn: Create list even if rpcn connection failed 2025-03-25 18:40:25 +01:00
Malcolm Jestadt c52920755a SPU LLVM: Don't use vperm2b256to128 outside of CPUTranslator.h
- The vperm2b function uses vperm2b256to128 when it's ideal
2025-03-25 10:42:02 +02:00
Megamouse faef63e8a7 patches: fix c_utf8 validation 2025-03-24 21:44:23 +01:00
kd-11 ff135384ef Fix for GCC builds 2025-03-24 17:00:07 +03:00
kd-11 a51602018e rsx: Code cleanup and fix fragment texture dirty trigger 2025-03-24 17:00:07 +03:00
kd-11 1616942943 rsx: Always execute pre-draw pipeline analysis regardless of flags 2025-03-24 17:00:07 +03:00
kd-11 ba7b7b65a1 rsx: Bypass sampling cache logic when dealing with host generated textures 2025-03-24 17:00:07 +03:00
RipleyTom 40ff182c31 Fix p2p binding to vport 0 2025-03-23 06:08:09 +01:00
Whatcookie d9071abd8b Utils: Remove AVX10-256 detection (#16904)
- Intel recently removed 256b AVX10 from the AVX10 spec.
2025-03-22 13:28:45 +02:00
Megamouse b4f453f687 overlays: don't check for hdd dirs if we play a disc game 2025-03-21 20:47:45 +01:00
Megamouse 4c742f7742 Fix typo 2025-03-21 20:47:45 +01:00
Megamouse fda51920b7 overlays: prefer overlay_picture over content_icon 2025-03-21 20:47:45 +01:00
Megamouse 4905fda371 Qt: Don't fetch ICON0.PNG from game data for disc games
ICON0.PNG is not supposed to be updateable, so we can ignore the hdd0 dir for disc games in that case
2025-03-21 20:47:45 +01:00
Megamouse 1ae1288a88 overlays: Look for the overlay in the same dir as the background 2025-03-21 20:47:45 +01:00
Megamouse 6fb0e991ea overlays: Don't use ICON0.PNG from hdd0 if the game is a disc game
ICON0.PNG is not supposed to be updateable, so we can ignore the hdd0 dir for disc games in that case
2025-03-21 20:47:45 +01:00
Megamouse 650176fac7 overlays: Simplify game content search 2025-03-21 20:47:45 +01:00
Megamouse 95aad6ceb5 overlays: adjust size and position of overlay image 2025-03-21 20:47:45 +01:00
Megamouse 7cd5d812d2 overlays: add background overlay image 2025-03-21 20:47:45 +01:00
Megamouse b2ff24453c overlays: fix background image logic
Also make the path getter more generic
2025-03-21 20:47:45 +01:00
Megamouse 12eacfa67b overlays: use std::string instead of raw path argument
It will be converted to string anyway
2025-03-21 20:47:45 +01:00
Megamouse cd25e91321 VS/MSVC: Enable LTCG and GL on release builds 2025-03-21 16:35:53 +01:00
Megamouse 518bfeca3f Update libusb to 1.0.28 2025-03-20 23:52:10 +01:00
Megamouse 76495f07b8 Qt: Remove supporters from translations 2025-03-20 08:52:08 +01:00
Megamouse ccecd1a627 Qt: only show shortcut confirmation once 2025-03-20 08:52:08 +01:00
Megamouse 8f3eff293d Remove unnecessary localization 2025-03-20 08:52:08 +01:00
Megamouse 806c9230cd Fix typo 2025-03-20 08:52:08 +01:00
Megamouse 24b6b6cad5 Qt: fix handler not found in pad settings after changing language 2025-03-20 08:52:08 +01:00
Megamouse 971fd40353 Remove some useless translations 2025-03-20 08:52:08 +01:00
Megamouse 2aba8c639e Fix typo 2025-03-20 08:52:08 +01:00
Megamouse 1a51ce1e66 SPU: Add Disable SPU GETLLAR Spin Optimization checkbox 2025-03-18 09:30:28 +02:00
Hugo Locurcio 1398e7702b Improve BUILDING.md documentation
- Add llvm-devel dependency to Fedora (required to compile).
- Recommend using the Ninja generator on Linux to speed up compilation
  (and mention it in the package installation lists).
- Use shorter CMake commands and use the standard `build` folder as a target.
- Use `--recursive` in Git clone to automatically fetch submodules.
- Fix path of output binary file on Linux.
2025-03-18 02:54:49 +01:00
Vestral a45f604cd8 Fix discord-rpc build when ASLR is enabled 2025-03-18 02:32:05 +01:00
Megamouse ec29650029 Fix warning 2025-03-17 23:11:31 +01:00
Megamouse 4b31e34ea4 Qt: use white checkmarks in Darker Style 2025-03-17 23:11:31 +01:00
Megamouse ae83c28bc8 Qt: Simplify hover movie code 2025-03-17 14:41:08 +01:00
Megamouse 58327ca23c Qt/optimization: Don't look for PAM files if the game has a hover gif 2025-03-17 14:41:08 +01:00
Megamouse 5b540aed73 Qt: Do not use gamedata icon if game has custom icon 2025-03-17 14:41:08 +01:00
Megamouse 6e080044a0 Qt: fix code style of some variables 2025-03-17 14:41:08 +01:00
Megamouse 42ba0b6271 Qt: Use localized game icons and titles 2025-03-17 00:47:43 +01:00
kd-11 a1fa8dd701 config: Revert default shader compiler to async with draw-skip 2025-03-16 16:48:20 +01:00
kd-11 aea1efd5f2 rsx: Fix instancing constants lookup layout when running interpreter 2025-03-16 16:33:39 +03:00
kd-11 5ae05e26c4 vk: Implement instancing when running in interpreter mode 2025-03-16 16:33:39 +03:00
kd-11 023221bd3b gl: Reimplement driver capabilities detection in a more sane way 2025-03-16 16:33:39 +03:00
kd-11 14575f3efd rsx: Always initialize CC register in FP interpreter 2025-03-16 16:33:39 +03:00
kd-11 9f3eb33d80 gl: Double instancing buffer size to improve frametimes 2025-03-16 16:33:39 +03:00
kd-11 225d0b9482 gl: Support transform instancing in the shader interpreter 2025-03-16 16:33:39 +03:00
kd-11 65c0d3d425 gl: Add support for hardware instancing 2025-03-16 16:33:39 +03:00
kd-11 3d3fc2f3cd rsx: Fix cache invalidation when instancing state changes 2025-03-16 16:33:39 +03:00
Malcolm Jestadt f9a72e8d75 SPU LLVM: Preserve sign on inf to NaN conversion in spu_re_acc with vfixupimmps 2025-03-15 10:46:08 +02:00
Attila Fidan 7b212e0e57 sys_usbd: Fix null pointer deref on destruction 2025-03-13 01:36:09 +01:00
Jan Beich a108ce8015 CI: upgrade FreeBSD to 13.5
FreeBSD doesn't support /latest and /quarterly package repos on EOL
versions. 13.4 reaches EOL on 2025-06-30, so avoid CI breakage.
2025-03-12 23:35:59 +01:00
Megamouse ff21a05c96 Always run Actions, we need them for merges 2025-03-12 20:26:06 +01:00
Megamouse 25eb869d5f Readme: Improve build tags 2025-03-12 20:26:06 +01:00
Megamouse ff40128df6 Qt: Detach markup from dialog translations 2025-03-12 18:49:24 +01:00
kd-11 b2ed787c3a rsx: Invalidate program cache hint if the current vertex or fragment program is re-evaluated 2025-03-12 15:36:29 +03:00
Megamouse ec5b2bc8d2 Fix missing enum in switch case 2025-03-12 01:08:49 +01:00
Megamouse 3a71da35a9 Fix redundant forward declaration warning 2025-03-12 01:08:49 +01:00
Megamouse 4c788abad1 Use named_thread in gui_pad_thread 2025-03-12 01:08:49 +01:00
Megamouse 3737cc37f6 Qt: Hide interpreter_only unless it is selected or the debug mode is active 2025-03-11 06:58:23 +01:00
Megamouse d0c2cb7ae1 main: Fix some warning 2025-03-11 06:58:23 +01:00
DH db945f6aed android: do not invalidate swapchain on VK_SUBOPTIMAL_KHR
Workaround
2025-03-10 21:09:27 +01:00
Megamouse b3f5ed55a1 Set vulkan to default renderer whenever we have vulkan support 2025-03-10 21:09:27 +01:00
Megamouse fa5a16e9fc hid_init: use hid_error in log message 2025-03-10 21:09:27 +01:00
DH 0c233c6578 [android] hid: enumerate by vendor/product ids 2025-03-10 21:09:27 +01:00
DH 8100779512 hid: add support of android devices 2025-03-10 21:09:27 +01:00
DH d766baef12 fs::file: implement release_handle
cleanup
2025-03-10 21:09:27 +01:00
DH 95d0cb18e4 Coding style issues fixes
Thanks @Megamouse
2025-03-10 21:09:27 +01:00
DH 976b0a8f1d cpu stats: do not try parse /proc/stat on android 2025-03-10 21:09:27 +01:00
DH 919cb8e05c android: atomic: do not test SYS_futex_waitv syscall 2025-03-10 21:09:27 +01:00
DH cac068dad9 rsx: implement android swapchain 2025-03-10 21:09:27 +01:00
DH 7520c09087 rsx: reduce shaders_cache::unpacked_type size for android 2025-03-10 21:09:27 +01:00
DH edf096fc13 vm: do not check overcommit_memory on android 2025-03-10 21:09:27 +01:00
DH 2ebf257f84 vm: removed c_page_size, it cannot be used by globals 2025-03-10 21:09:27 +01:00
DH 57e7cee84e android: cfg: vulkan renderer is default 2025-03-10 21:09:27 +01:00
DH adaf24310d add missed include to PUP.h 2025-03-10 21:09:27 +01:00
DH 94f52d6dc0 android: jit: teach fallback_cpu_detection provide meaningful results for aarch64 2025-03-10 21:09:27 +01:00
DH 3080b55d02 cfg: remove string::get() 2025-03-10 21:09:27 +01:00
DH bbb682a440 unpkg: allow package_reader creation with provided fs::file 2025-03-10 21:09:27 +01:00
DH f3d988d8ab fs::file: add from_native_handle constructor
fs::get_*_dir tweaks for android
2025-03-10 21:09:27 +01:00
DH 2c122a4401 llvm: disable extra targets for android
explicitly specify native target, llvm determines wrongly if cross compiler used
2025-03-10 21:09:27 +01:00
DH 26ce38a4ac 3rdparty/fusion: Always do build in release mode
this library has python numpy dependency in debug build
2025-03-10 21:09:27 +01:00
DH 5084fb82b8 Android stuff 2 2025-03-10 21:09:27 +01:00
DH 798c194025 android stuff 2025-03-10 21:09:27 +01:00
kd-11 11e214f332 rsx: Handle out-of-bounds read/writes from FIFO register IO 2025-03-10 16:07:26 +03:00
AniLeo ddd3ac3663 Settings: Move 'Max Shader Compile Threads' next to the equivalent LLVM setting 2025-03-10 08:16:19 +01:00
AniLeo bacce9bb37 Settings: Move 'Vulkan Queue Scheduler' to Debug 2025-03-10 08:16:19 +01:00
AniLeo aa819c8b97 Settings: Move 'Disable On-Disk Shader Cache' to Debug 2025-03-10 08:16:19 +01:00
AniLeo af768d5c22 Settings: Move 'Disable Asynchronous Memory Manager' to Debug 2025-03-10 08:16:19 +01:00
AniLeo 2bf5ae3272 Settings: Move 'SPU Profiler' to Debug 2025-03-10 08:16:19 +01:00
AniLeo a074b14631 Settings: Move 'PPU Vector NaN Fixup' to Debug 2025-03-10 08:16:19 +01:00
AniLeo ac7d53cc37 Settings: Specify FSR 1 2025-03-10 08:16:19 +01:00
AniLeo 6d46d45983 Settings: Default 'Shader Mode' to Async with Interpreter 2025-03-10 08:16:19 +01:00
AniLeo eea2f19d82 Settings: Move 'SPU Block Size' to the middle column 2025-03-10 08:16:19 +01:00
kd-11 2dfbab457a rsx: Reupload surface if the surface cache denies knowledge of it 2025-03-09 22:01:49 +03:00
Zion Nimchuk 5e5f82d1a2 Set CI msbuild verbosity to minimal to reduce spam 2025-03-09 11:02:57 +02:00
Elad 5e4637e15c SPU LLVM: Subtract Timebase from decrementer 2025-03-09 07:42:59 +02:00
FlexBy420 a3d2e93b14 move script to .ci/generate-qt-ts.sh 2025-03-08 23:47:04 +01:00
FlexBy420 100454398c Make suggested changes and remove unnecessary package 2025-03-08 23:47:04 +01:00
FlexBy420 cce43beeae Apply suggestions from code review
Co-authored-by: Megamouse <studienricky89@googlemail.com>
2025-03-08 23:47:04 +01:00
FlexBy420 ebcb61b34b fix the branch name in qt-ts.yml 2025-03-08 23:47:04 +01:00
FlexBy420 47b880fa8d Move ts generator job to seperate workflow file 2025-03-08 23:47:04 +01:00
FlexBy420 cd76f05a86 Create qt-ts.yml 2025-03-08 23:47:04 +01:00
FlexBy420 9173fc9815 fix branch name in .ts job 2025-03-08 23:47:04 +01:00
FlexBy420 7df5cb84b5 add a job for generating translation template file (.ts) 2025-03-08 23:47:04 +01:00
kd-11 e6b3c2061e rsx: Fix boundary seek logic for FIFO addresses 2025-03-09 01:36:26 +03:00
schm1dtmac 563a3d3587 Target macOS 14 instead of 13 (fixes camera) 2025-03-09 01:02:49 +03:00
kd-11 3be1e0b6ff rsx: Clean up and simplify texture register manipulation tests 2025-03-08 22:10:55 +03:00
kd-11 93899bf5a9 rsx/FIFO: Reimplement grabbing command args as a contiguous pointer
- Allows grabbing indefinite size of buffer as long as the data is contiguously mapped.
2025-03-08 22:10:55 +03:00
kd-11 ec120d1cbb rsx: Add stubs for FP rehash checks on barrier acquire 2025-03-08 22:10:55 +03:00
kd-11 df7a2ab467 rsx: Unify fragment texture config changes dirty bit tracking
- Reverts unnecessary changes to dirty tracking.
- The GPU keeps a separate set of details, so all dirty bits are treated equal.
2025-03-08 22:10:55 +03:00
kd-11 a39a743abe rsx/prog: Fix compiler warning 2025-03-08 22:10:55 +03:00
kd-11 eca86ad449 rsx: Add program cache lookup ellision rate to overlay 2025-03-08 22:10:55 +03:00
kd-11 a1c8f3a528 rsx/prog: Use a proper cache hint key instead of disjointed counters 2025-03-08 22:10:55 +03:00
Elad 26495a8455 SPU: Fixup 2025-03-08 14:21:57 +02:00
Elad 32df7315be RSX: Do not invalidate FP analysis on same register writes 2025-03-08 14:21:57 +02:00
Elad 7995181235 RSX: Return FP shader as is if no changes were made 2025-03-08 14:21:57 +02:00
Elad 75dc2a12e2 RSX: Return VP shader as is if no changes were made 2025-03-08 14:21:57 +02:00
Elad ae39c5b8cb RSX: Optimize vertex program ucode invalidation 2025-03-08 14:21:57 +02:00
Megamouse eb43fbbb2a Update SDL to 3.2.8 2025-03-08 10:03:00 +01:00
Elad e4ed5c47a3 Fixup 2025-03-08 10:48:21 +02:00
Elad e4b9a21acc SPU Analyzer: Fix for value propagation 2025-03-08 10:36:26 +02:00
Whatcookie bfb9dfea7e RSX: ProgramStateCache loops optimizations 2025-03-07 09:54:12 +02:00
Elad 8ed2089070 RSX: Fix UB in FIFO_control::get_current_arg_ptr() 2025-03-07 09:41:52 +02:00
JoãoPaulo 583ec5d819 Update FW 4.92 Latest Version (#16811)
Update FW 4.92 Latest Version
Updates the latest FW version according to: https://www.playstation.com/en-us/support/hardware/ps3/system-software/
List of changes:
This system software update improves system performance.
2025-03-05 15:00:07 +02:00
kd-11 59280a133c vk: Do not force strict query scopes by default 2025-03-05 14:40:35 +03:00
Megamouse ba12de867e static analysis: fix memory leak in decompress 2025-03-05 00:12:30 +01:00
Megamouse ca3d02fc61 static analysis: ensure is always false 2025-03-05 00:12:30 +01:00
Megamouse a49c4c7682 static analysis: duplicate assignment 2025-03-05 00:12:30 +01:00
Megamouse 4f52c67566 static analysis: suspicious code 2025-03-05 00:12:30 +01:00
Megamouse 7a6a96254c static analysis: remove unused overrides 2025-03-05 00:12:30 +01:00
Megamouse 6abb863a54 static analysis: std::move 2025-03-05 00:12:30 +01:00
Megamouse e8463403f5 static analysis: uninitialized variables 2025-03-05 00:12:30 +01:00
Megamouse 815a4e7dc1 static analysis: less references 2025-03-05 00:12:30 +01:00
Megamouse df2f68da44 static analysis: more const ref 2025-03-05 00:12:30 +01:00
Megamouse a8fc3f5f74 static analysis: more const 2025-03-05 00:12:30 +01:00
Megamouse d3c5cc7b13 ci: Use more variables for LLVM and QT 2025-03-04 23:44:45 +01:00
Megamouse 760e43ad2c VS: move LLVM AdditionalDependencies to rpcs3_default.props 2025-03-04 23:44:45 +01:00
Megamouse 229734e45f VS: add some missing filters 2025-03-04 23:44:45 +01:00
RipleyTom 66952fe301 Add memory breakpoints
RPCS3 needs to be compiled with -DHAS_MEMORY_BREAKPOINTS=ON for it to be available
2025-03-04 15:41:36 +01:00
Megamouse cb659474d9 overlays: fix friends/trophy list input on paused emulation 2025-03-03 18:21:35 +01:00
Megamouse d429776418 Qt/patches: Only consider bootable games 2025-03-03 17:49:31 +01:00
Megamouse d034f6a77f Qt/patches: move game list loop to patch manager
This deduplicates some code
2025-03-03 17:49:31 +01:00
Malcolm Jestadt 1920aee415 RSX: Fix issue where linux builds could hit illegal instruction on machines without AVX-512
- Place avx-512 function attributes in their own functions
2025-03-03 15:58:55 +03:00
Elad 783079266e Emulator: Implement config CLI args, add barrier for host CLI args 2025-03-03 06:54:00 +02:00
Megamouse bd41774960 overlays/osk: implement horizontal scroll 2025-03-02 23:44:08 +01:00
Megamouse 4aa25285a3 overlays: use thread local static vector in get_glyph_data 2025-03-02 23:44:08 +01:00
Megamouse 7fd1f5b5d3 Fix some warning 2025-03-02 23:44:08 +01:00
Megamouse 72ee5ed10d overlays: add ability to hide hidden trophies 2025-03-02 23:02:22 +01:00
Megamouse 048a44cbe5 overlays: add getter for selected entry 2025-03-02 23:02:22 +01:00
Megamouse 6f5f7ece06 overlays: fix and optimize layout exit loops 2025-03-02 23:02:22 +01:00
Zion Nimchuk b3d28e2309 Switch Windows and Linux x64 builds and deployments to GitHub Actions 2025-03-02 22:35:04 +01:00
trigger 1dc3ebf891 SPU Analyzer: A fixup for crash, TODO: proper fix 2025-03-02 10:24:42 +02:00
Malcolm Jestadt 6bd1ab576c RSX: Use AVX-512-ICL code in get_vertecx_program_ucode_hash and in vertex_program_compare
- Code is about 4 times as fast on my zen4 machine
- Should be twice as fast on zen5 machines with full width AVX-512
2025-03-02 09:07:07 +02:00
trigger 8e6272bfee Qt: Fix boot failed dialog 2025-03-01 20:00:21 +01:00
kd-11 0aca5e222f vk: Fix MacOS build 2025-03-01 18:02:32 +03:00
kd-11 b8411a90cd vk/swapchain: Fix WSI swapchain configuration overrides 2025-03-01 18:02:32 +03:00
kd-11 4e9365f76b vk/swapchain: Consolidate native swapchain implementation for platforms where it is not implemented
- NATIVE swapchain only matters in headless scenarios or where we otherwise cannot access WSI properly.
- It is now optional, with a stub provided when WSI is not available.
2025-03-01 18:02:32 +03:00
kd-11 602fe15641 vk/swapchain: Move platform-specific code to appropriate headers 2025-03-01 18:02:32 +03:00
kd-11 8b2e792d31 vk: Refactor swapchain into separate platform headers 2025-03-01 18:02:32 +03:00
kd-11 aca1cdf0b6 vk: Refactor instance management header 2025-03-01 18:02:32 +03:00
trigger af23df842d PPU: Report encrypted modules with KLIC in main file, opportunistic compilation at exit-spawn (#16743) 2025-03-01 11:45:03 +02:00
309 changed files with 8915 additions and 23425 deletions
+15 -15
View File
@@ -4,13 +4,13 @@
brew_arm64_install_packages() {
for pkg in "$@"; do
echo "Fetching bottle for $pkg (arm64)..."
bottle_path="$("$BREW_ARM64_PATH/bin/brew" --cache --bottle-tag=arm64_ventura "$pkg")"
bottle_path="$("$BREW_ARM64_PATH/bin/brew" --cache --bottle-tag=arm64_sonoma "$pkg")"
if [ ! -f "$bottle_path" ]; then
if ! "$BREW_ARM64_PATH/bin/brew" fetch --force --verbose --debug --bottle-tag=arm64_ventura "$pkg"; then
if ! "$BREW_ARM64_PATH/bin/brew" fetch --force --verbose --debug --bottle-tag=arm64_sonoma "$pkg"; then
echo "Failed to fetch bottle for $pkg"
return 1
fi
bottle_path="$("$BREW_ARM64_PATH/bin/brew" --cache --bottle-tag=arm64_ventura "$pkg")"
bottle_path="$("$BREW_ARM64_PATH/bin/brew" --cache --bottle-tag=arm64_sonoma "$pkg")"
fi
echo "Installing $pkg (arm64)..."
@@ -31,7 +31,7 @@ sudo rm -rf /usr/local/Cellar/curl /usr/local/opt/curl
/usr/local/bin/brew link --overwrite python || true
/usr/local/bin/brew install -f --overwrite nasm ninja p7zip ccache pipenv #create-dmg
/usr/local/bin/brew link -f curl || true
/usr/local/bin/brew install llvm@$LLVM_COMPILER_VER glew cmake sdl2 vulkan-headers coreutils
/usr/local/bin/brew install llvm@$LLVM_COMPILER_VER glew cmake sdl3 vulkan-headers coreutils
/usr/local/bin/brew link -f llvm@$LLVM_COMPILER_VER ffmpeg@5 || true
export BREW_ARM64_PATH="/opt/homebrew1"
@@ -45,9 +45,9 @@ brew_arm64_install_packages curl
mv /opt/homebrew1/opt/curl/bin/curl /opt/homebrew1/opt/curl/bin/curl.bak
ln -s /usr/local/opt/curl/bin/curl /opt/homebrew1/opt/curl/bin/curl
brew_arm64_install_packages 0mq aom aribb24 ca-certificates cjson dav1d ffmpeg@5 fontconfig freetype freetype2 gettext glew gmp gnutls lame libbluray libidn2 libnettle libogg libpng librist libsodium libsoxr libtasn libtasn1 libunistring libvmaf libvorbis libvpx libx11 libxau libxcb libxdmcp llvm@$LLVM_COMPILER_VER mbedtls molten-vk nettle opencore-amr openjpeg openssl opus p11-kit pkg-config pkgconfig pzstd rav1e sdl2 snappy speex srt svt-av1 theora vulkan-headers webp x264 x265 xz z3 zeromq zmq zstd
brew_arm64_install_packages 0mq aom aribb24 ca-certificates cjson dav1d ffmpeg@5 fontconfig freetype freetype2 gettext glew gmp gnutls lame libbluray libidn2 libnettle libogg libpng librist libsodium libsoxr libtasn libtasn1 libunistring libvmaf libvorbis libvpx libx11 libxau libxcb libxdmcp llvm@$LLVM_COMPILER_VER mbedtls molten-vk nettle opencore-amr openjpeg openssl opus p11-kit pkg-config pkgconfig pzstd rav1e sdl3 snappy speex srt svt-av1 theora vulkan-headers webp x264 x265 xz z3 zeromq zmq zstd
"$BREW_ARM64_PATH/bin/brew" link -f ffmpeg@5
ln -s /opt/homebrew1/opt/llvm@19/lib/unwind/libunwind.1.dylib /opt/homebrew1/opt/llvm@19/lib/libunwind.1.dylib
ln -s "/opt/homebrew1/opt/llvm@$LLVM_COMPILER_VER/lib/unwind/libunwind.1.dylib" "/opt/homebrew1/opt/llvm@$LLVM_COMPILER_VER/lib/libunwind.1.dylib"
# moltenvk based on commit for 1.2.11 release
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/6bfc8950c696d1f952425e8af2a6248603dc0df9/Formula/m/molten-vk.rb
@@ -72,13 +72,13 @@ if [ ! -d "/tmp/Qt/$QT_VER" ]; then
git clone https://github.com/engnr/qt-downloader.git
cd qt-downloader
git checkout f52efee0f18668c6d6de2dec0234b8c4bc54c597
# nested Qt 6.8.2 URL workaround
# nested Qt 6.8.3 URL workaround
# sed -i '' "s/'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/'qt{0}_{0}{1}{2}'.format(major, minor, patch), 'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/g" qt-downloader
# sed -i '' "s/'{}\/{}\/qt{}_{}\/'/'{0}\/{1}\/qt{2}_{3}\/qt{2}_{3}\/'/g" qt-downloader
cd "/tmp/Qt"
"$BREW_X64_PATH/bin/pipenv" run pip3 install py7zr requests semantic_version lxml
mkdir -p "$QT_VER/macos" ; ln -s "macos" "$QT_VER/clang_64"
# sed -i '' 's/args\.version \/ derive_toolchain_dir(args) \/ //g' "$WORKDIR/qt-downloader/qt-downloader" # Qt 6.8.2 workaround
# sed -i '' 's/args\.version \/ derive_toolchain_dir(args) \/ //g' "$WORKDIR/qt-downloader/qt-downloader" # Qt 6.8.3 workaround
"$BREW_X64_PATH/bin/pipenv" run "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia qtimageformats # -o "$QT_VER/clang_64"
fi
@@ -86,12 +86,12 @@ 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 SDL2_DIR="$BREW_ARM64_PATH/opt/sdl2/lib/cmake/SDL2"
export SDL3_DIR="$BREW_ARM64_PATH/opt/sdl3/lib/cmake/SDL3"
export PATH="$BREW_X64_PATH/opt/llvm@$LLVM_COMPILER_VER/bin:$WORKDIR/qt-downloader/$QT_VER/clang_64/bin:$BREW_BIN:$BREW_SBIN:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:$PATH"
export LDFLAGS="-L$BREW_ARM64_PATH/lib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libavcodec.dylib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libavformat.dylib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libavutil.dylib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libswscale.dylib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libswresample.dylib $BREW_ARM64_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++.1.dylib $BREW_ARM64_PATH/lib/libSDL2.dylib $BREW_ARM64_PATH/lib/libGLEW.dylib $BREW_ARM64_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/libunwind.1.dylib -Wl,-rpath,$BREW_ARM64_PATH/lib"
export CPPFLAGS="-I$BREW_ARM64_PATH/include -I$BREW_X64_PATH/include -no-pie -D__MAC_OS_X_VERSION_MIN_REQUIRED=130000"
export CFLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=130000"
export LDFLAGS="-L$BREW_ARM64_PATH/lib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libavcodec.dylib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libavformat.dylib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libavutil.dylib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libswscale.dylib $BREW_ARM64_PATH/opt/ffmpeg@5/lib/libswresample.dylib $BREW_ARM64_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/c++/libc++.1.dylib $BREW_ARM64_PATH/lib/libSDL3.dylib $BREW_ARM64_PATH/lib/libGLEW.dylib $BREW_ARM64_PATH/opt/llvm@$LLVM_COMPILER_VER/lib/libunwind.1.dylib -Wl,-rpath,$BREW_ARM64_PATH/lib"
export CPPFLAGS="-I$BREW_ARM64_PATH/include -I$BREW_X64_PATH/include -no-pie -D__MAC_OS_X_VERSION_MIN_REQUIRED=140000"
export CFLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=140000"
export LIBRARY_PATH="$BREW_ARM64_PATH/lib"
export LD_LIBRARY_PATH="$BREW_ARM64_PATH/lib"
@@ -112,11 +112,11 @@ sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVer
rm -rf build
mkdir build && cd build || exit 1
export MACOSX_DEPLOYMENT_TARGET=13.0
export MACOSX_DEPLOYMENT_TARGET=14.0
"$BREW_X64_PATH/bin/cmake" .. \
-DUSE_SDL=ON \
-DUSE_DISCORD_RPC=OFF \
-DUSE_DISCORD_RPC=ON \
-DUSE_VULKAN=ON \
-DUSE_ALSA=OFF \
-DUSE_PULSE=OFF \
@@ -144,7 +144,7 @@ export MACOSX_DEPLOYMENT_TARGET=13.0
-DCMAKE_IGNORE_PREFIX_PATH=/usr/local/opt \
-DCMAKE_SYSTEM_PROCESSOR=arm64 \
-DCMAKE_TOOLCHAIN_FILE=buildfiles/cmake/TCDarwinARM64.cmake \
-DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=130000" \
-DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=140000" \
-G Ninja
"$BREW_PATH/bin/ninja"; build_status=$?;
+8 -8
View File
@@ -13,7 +13,7 @@ arch -x86_64 /usr/local/bin/brew install -f --overwrite python || arch -x86_64 /
arch -x86_64 /usr/local/bin/brew uninstall -f --ignore-dependencies ffmpeg
arch -x86_64 /usr/local/bin/brew install -f --build-from-source ffmpeg@5
arch -x86_64 /usr/local/bin/brew reinstall -f --build-from-source gnutls freetype
arch -x86_64 /usr/local/bin/brew install llvm@$LLVM_COMPILER_VER glew cmake sdl2 vulkan-headers coreutils
arch -x86_64 /usr/local/bin/brew install llvm@$LLVM_COMPILER_VER glew cmake sdl3 vulkan-headers coreutils
arch -x86_64 /usr/local/bin/brew link -f llvm@$LLVM_COMPILER_VER ffmpeg@5
# moltenvk based on commit for 1.2.11 release
@@ -39,13 +39,13 @@ if [ ! -d "/tmp/Qt/$QT_VER" ]; then
git clone https://github.com/engnr/qt-downloader.git
cd qt-downloader
git checkout f52efee0f18668c6d6de2dec0234b8c4bc54c597
# nested Qt 6.8.2 URL workaround
# nested Qt 6.8.3 URL workaround
# sed -i '' "s/'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/'qt{0}_{0}{1}{2}'.format(major, minor, patch), 'qt{0}_{0}{1}{2}'.format(major, minor, patch)]))/g" qt-downloader
# sed -i '' "s/'{}\/{}\/qt{}_{}\/'/'{0}\/{1}\/qt{2}_{3}\/qt{2}_{3}\/'/g" qt-downloader
cd "/tmp/Qt"
"$BREW_X64_PATH/bin/pipenv" run pip3 install py7zr requests semantic_version lxml
mkdir -p "$QT_VER/macos" ; ln -s "macos" "$QT_VER/clang_64"
# sed -i '' 's/args\.version \/ derive_toolchain_dir(args) \/ //g' "$WORKDIR/qt-downloader/qt-downloader" # Qt 6.8.2 workaround
# sed -i '' 's/args\.version \/ derive_toolchain_dir(args) \/ //g' "$WORKDIR/qt-downloader/qt-downloader" # Qt 6.8.3 workaround
"$BREW_X64_PATH/bin/pipenv" run "$WORKDIR/qt-downloader/qt-downloader" macos desktop "$QT_VER" clang_64 --opensource --addons qtmultimedia qtimageformats # -o "$QT_VER/clang_64"
fi
@@ -53,12 +53,12 @@ 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 SDL2_DIR="$BREW_X64_PATH/opt/sdl2/lib/cmake/SDL2"
export SDL3_DIR="$BREW_X64_PATH/opt/sdl3/lib/cmake/SDL3"
export PATH="$BREW_X64_PATH/opt/llvm@$LLVM_COMPILER_VER/bin:$WORKDIR/qt-downloader/$QT_VER/clang_64/bin:$BREW_BIN:$BREW_SBIN:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:$PATH"
export LDFLAGS="-L$BREW_X64_PATH/lib -Wl,-rpath,$BREW_X64_PATH/lib"
export CPPFLAGS="-I$BREW_X64_PATH/include -msse -msse2 -mcx16 -no-pie -D__MAC_OS_X_VERSION_MIN_REQUIRED=130000"
export CFLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=130000"
export CPPFLAGS="-I$BREW_X64_PATH/include -msse -msse2 -mcx16 -no-pie -D__MAC_OS_X_VERSION_MIN_REQUIRED=140000"
export CFLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=140000"
export LIBRARY_PATH="$BREW_X64_PATH/lib"
export LD_LIBRARY_PATH="$BREW_X64_PATH/lib"
@@ -78,7 +78,7 @@ sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVer
mkdir build && cd build || exit 1
export MACOSX_DEPLOYMENT_TARGET=13.0
export MACOSX_DEPLOYMENT_TARGET=14.0
"$BREW_X64_PATH/bin/cmake" .. \
-DUSE_SDL=ON \
@@ -107,7 +107,7 @@ export MACOSX_DEPLOYMENT_TARGET=13.0
-DLLVM_TARGET_ARCH=X86_64 \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_IGNORE_PATH="$BREW_PATH/lib" \
-DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=130000" \
-DCMAKE_CXX_FLAGS="-D__MAC_OS_X_VERSION_MIN_REQUIRED=140000" \
-G Ninja
"$BREW_PATH/bin/ninja"; build_status=$?;
+1 -1
View File
@@ -37,7 +37,7 @@ install_name_tool \
-delete_rpath /opt/homebrew/lib \
-delete_rpath /opt/homebrew1/opt/llvm@$LLVM_COMPILER_VER/lib \
-delete_rpath /usr/local/lib RPCS3.app/Contents/MacOS/rpcs3
#-delete_rpath /opt/homebrew1/Cellar/sdl2/2.30.7/lib
#-delete_rpath /opt/homebrew1/Cellar/sdl3/3.2.8/lib
# Need to do this rename hack due to case insensitive filesystem
mv rpcs3.app RPCS3_.app
+1 -1
View File
@@ -39,7 +39,7 @@ mv RPCS3_.app RPCS3.app
install_name_tool \
-delete_rpath /usr/local/lib \
-delete_rpath /usr/local/opt/llvm@$LLVM_COMPILER_VER/lib RPCS3.app/Contents/MacOS/rpcs3
#-delete_rpath /usr/local/Cellar/sdl2/2.30.3/lib
#-delete_rpath /usr/local/Cellar/sdl3/3.2.8/lib
# NOTE: "--deep" is deprecated
codesign --deep -fs - RPCS3.app
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh -ex
mkdir -p ../translations
LUPDATE_PATH=$(find /usr -name lupdate -type f 2>/dev/null | head -n 1)
if [ -z "$LUPDATE_PATH" ]; then
echo "Error: lupdate not found!"
exit 1
else
echo "lupdate found at: $LUPDATE_PATH"
$LUPDATE_PATH -recursive . -ts ../translations/rpcs3_template.ts
sed -i 's|filename="\.\./|filename="./|g' ../translations/rpcs3_template.ts
fi
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/sh -ex
curl -fLo "./llvm.lock" "https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z.sha256"
curl -fLo "./llvm.lock" "https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z.sha256"
curl -fLo "./glslang.lock" "https://github.com/RPCS3/glslang/releases/download/custom-build-win/glslanglibs_mt.7z.sha256"
+5 -5
View File
@@ -9,10 +9,10 @@ export ASSUME_ALWAYS_YES=true
pkg info # debug
# WITH_LLVM
pkg install llvm19
pkg install "llvm$LLVM_COMPILER_VER"
# Mandatory dependencies (qt6-base is pulled via qt6-multimedia)
pkg install git ccache cmake ninja qt6-multimedia qt6-svg glew openal-soft ffmpeg
# Mandatory dependencies (qtX-base is pulled via qtX-multimedia)
pkg install git ccache cmake ninja "qt$QT_VER_MAIN-multimedia" "qt$QT_VER_MAIN-svg" glew openal-soft ffmpeg
# Optional dependencies (libevdev is pulled by qt6-base)
pkg install pkgconf alsa-lib pulseaudio sdl2 evdev-proto vulkan-headers vulkan-loader
# Optional dependencies (libevdev is pulled by qtX-base)
pkg install pkgconf alsa-lib pulseaudio sdl3 evdev-proto vulkan-headers vulkan-loader
+2 -2
View File
@@ -19,9 +19,9 @@ QT_DECL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtdeclarative${QT_SUFFIX}"
QT_TOOL_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qttools${QT_SUFFIX}"
QT_MM_URL="${QT_HOST}${QT_PREFIX}addons.qtmultimedia.${QT_PREFIX_2}qtmultimedia${QT_SUFFIX}"
QT_SVG_URL="${QT_HOST}${QT_PREFIX}${QT_PREFIX_2}qtsvg${QT_SUFFIX}"
LLVMLIBS_URL='https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-19.1.7/llvmlibs_mt.7z'
LLVMLIBS_URL="https://github.com/RPCS3/llvm-mirror/releases/download/custom-build-win-${LLVM_VER}/llvmlibs_mt.7z"
GLSLANG_URL='https://github.com/RPCS3/glslang/releases/latest/download/glslanglibs_mt.7z'
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-1.3.268.0-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
VULKAN_SDK_URL="https://www.dropbox.com/scl/fi/sjjh0fc4ld281pjbl2xzu/VulkanSDK-${VULKAN_VER}-Installer.exe?rlkey=f6wzc0lvms5vwkt2z3qabfv9d&dl=1"
CCACHE_URL="https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-windows-x86_64.zip"
DEP_URLS=" \
+7 -5
View File
@@ -7,7 +7,9 @@ env:
BUILD_SOURCEBRANCHNAME: $CIRRUS_BRANCH
RPCS3_TOKEN: ENCRYPTED[100ebb8e3552bf2021d0ef55dccda3e58d27be5b6cab0b0b92843ef490195d3c4edaefa087e4a3b425caa6392300b9b1]
QT_VER_MAIN: '6'
QT_VER: '6.8.2'
QT_VER: '6.8.3'
LLVM_COMPILER_VER: '19'
LLVM_VER: '19.1.7'
# windows_task:
# matrix:
@@ -21,7 +23,7 @@ env:
# COMPILER: msvc
# BUILD_ARTIFACTSTAGINGDIRECTORY: ${CIRRUS_WORKING_DIR}\artifacts\
# QT_VER_MSVC: 'msvc2022'
# QT_DATE: '202501260838'
# QT_DATE: '202503201308'
# QTDIR: C:\Qt\${QT_VER}\${QT_VER_MSVC}_64
# VULKAN_VER: '1.3.268.0'
# VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
@@ -56,7 +58,7 @@ env:
# linux_task:
# container:
# image: rpcs3/rpcs3-ci-jammy:1.1
# image: rpcs3/rpcs3-ci-jammy:1.2
# cpu: 4
# memory: 16G
# env:
@@ -103,7 +105,7 @@ freebsd_task:
matrix:
- name: Cirrus FreeBSD
freebsd_instance:
image_family: freebsd-13-4
image_family: freebsd-13-5
cpu: 8
memory: 8G
env:
@@ -132,7 +134,7 @@ freebsd_task:
# matrix:
# - name: Cirrus Linux AArch64 Clang
# arm_container:
# image: 'docker.io/rpcs3/rpcs3-ci-jammy-aarch64:1.1'
# image: 'docker.io/rpcs3/rpcs3-ci-jammy-aarch64:1.2'
# cpu: 8
# memory: 8G
# clang_script:
+34
View File
@@ -0,0 +1,34 @@
name: Generate Translation Template
on:
workflow_dispatch:
push:
branches:
- master
paths:
- 'rpcs3/**'
jobs:
Generate_Translation_Template:
name: Generate Translation Template
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Install Qt Tools
run: |
sudo apt update
sudo apt install -y qt6-l10n-tools
- name: Generate .ts file using lupdate (Qt)
working-directory: rpcs3
run: |
../.ci/generate-qt-ts.sh
- name: Upload translation template
uses: actions/upload-artifact@main
with:
name: RPCS3_Translation_Template
path: translations/rpcs3_template.ts
compression-level: 0
+28 -28
View File
@@ -1,16 +1,11 @@
name: Build RPCS3
defaults:
run:
shell: bash
on:
push:
paths-ignore:
- '.cirrus.yml'
- '.azure-pipelines.yml'
- 'README.md'
pull_request:
paths-ignore:
- '.cirrus.yml'
- '.azure-pipelines.yml'
- 'README.md'
workflow_dispatch:
concurrency:
@@ -30,15 +25,17 @@ jobs:
matrix:
include:
- os: ubuntu-24.04
docker_img: "rpcs3/rpcs3-ci-jammy:1.1"
docker_img: "rpcs3/rpcs3-ci-jammy:1.3"
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.1"
docker_img: "rpcs3/rpcs3-ci-jammy:1.3"
build_sh: "/rpcs3/.ci/build-linux.sh"
compiler: gcc
- os: ubuntu-24.04-arm
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.1"
docker_img: "rpcs3/rpcs3-ci-jammy-aarch64:1.3"
build_sh: "/rpcs3/.ci/build-linux-aarch64.sh"
compiler: clang
UPLOAD_COMMIT_HASH: a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1
@@ -86,14 +83,13 @@ jobs:
name: RPCS3 for Linux (${{ runner.arch }}, ${{ matrix.compiler }})
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}/*.AppImage
compression-level: 0
- name: Deploy master build to GitHub Releases
if: |
github.event_name != 'pull_request' &&
github.repository == 'RPCS3/rpcs3' &&
github.ref == 'refs/heads/master' &&
matrix.compiler == 'clang' &&
runner.arch == 'ARM64'
matrix.compiler == 'clang'
env:
RPCS3_TOKEN: ${{ secrets.RPCS3_TOKEN }}
run: |
@@ -109,9 +105,10 @@ jobs:
env:
COMPILER: msvc
QT_VER_MAIN: '6'
QT_VER: '6.8.2'
QT_VER: '6.8.3'
QT_VER_MSVC: 'msvc2022'
QT_DATE: '202501260838'
QT_DATE: '202503201308'
LLVM_VER: '19.1.7'
VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
CCACHE_SHA: '6252f081876a9a9f700fae13a5aec5d0d486b28261d7f1f72ac11c7ad9df4da9'
@@ -120,6 +117,8 @@ jobs:
CCACHE_INODECACHE: 'true'
CCACHE_SLOPPINESS: 'time_macros'
DEPS_CACHE_DIR: ./dependency_cache
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
steps:
- name: Checkout repository
@@ -128,12 +127,12 @@ jobs:
fetch-depth: 0
- 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
shell: bash
run: .ci/get_keys-windows.sh
- name: Setup Build Ccache
@@ -142,7 +141,7 @@ jobs:
path: ${{ env.CCACHE_DIR }}
key: "${{ runner.os }}-ccache-${{ env.COMPILER }}-${{github.run_id}}"
restore-keys: ${{ runner.os }}-ccache-${{ env.COMPILER }}-
- name: Setup Dependencies Cache
uses: actions/cache@main
with:
@@ -151,11 +150,9 @@ jobs:
restore-keys: ${{ runner.os }}-${{ env.COMPILER }}-
- name: Download and unpack dependencies
shell: bash
run: .ci/setup-windows.sh
- name: Export Variables
shell: bash
run: |
while IFS='=' read -r key val; do
# Skip lines that are empty or start with '#'
@@ -167,24 +164,27 @@ jobs:
uses: microsoft/setup-msbuild@main
- name: Compile RPCS3
run: msbuild rpcs3.sln /p:Configuration=Release /p:Platform=x64 /p:CLToolPath=${{ env.CCACHE_BIN_DIR }} /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="${{ github.workspace }}\buildfiles\msvc\ci_no_debug_info.targets"
shell: pwsh
run: msbuild rpcs3.sln /p:Configuration=Release /v:minimal /p:Platform=x64 /p:CLToolPath=${{ env.CCACHE_BIN_DIR }} /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="${{ github.workspace }}\buildfiles\msvc\ci_only.targets"
- name: Pack up build artifacts
shell: bash
run: |
mkdir -p "${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}"
.ci/deploy-windows.sh
- name: Upload artifacts (7z)
#TODO: Upload artifact to release repository
#condition for release
#if: |
# github.event_name != 'pull_request' &&
# github.repository == 'RPCS3/rpcs3' &&
# github.ref == 'refs/heads/master'
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
+8
View File
@@ -100,3 +100,11 @@
path = 3rdparty/fusion/fusion
url = ../../xioTechnologies/Fusion.git
ignore = dirty
[submodule "3rdparty/discord-rpc/discord-rpc"]
path = 3rdparty/discord-rpc/discord-rpc
url = ../../Vestrel/discord-rpc
ignore = dirty
[submodule "3rdparty/GPUOpen/VulkanMemoryAllocator"]
path = 3rdparty/GPUOpen/VulkanMemoryAllocator
url = ../../Megamouse/VulkanMemoryAllocator.git
ignore = dirty
+87 -72
View File
@@ -79,6 +79,10 @@ else()
# we don't have the system libusb, so we compile from submodule
unset(LIBUSB_LIBRARIES CACHE)
add_subdirectory(libusb EXCLUDE_FROM_ALL)
if (NOT TARGET usb-1.0 AND TARGET usb-1.0-static)
add_library(usb-1.0 ALIAS usb-1.0-static)
endif()
endif()
endif()
@@ -86,7 +90,6 @@ endif()
# hidapi
add_subdirectory(hidapi)
# glslang
add_subdirectory(glslang EXCLUDE_FROM_ALL)
add_library(3rdparty_glslang INTERFACE)
@@ -99,24 +102,28 @@ add_subdirectory(yaml-cpp)
# OpenGL
find_package(OpenGL REQUIRED OPTIONAL_COMPONENTS EGL)
if (NOT ANDROID)
find_package(OpenGL REQUIRED OPTIONAL_COMPONENTS EGL)
add_library(3rdparty_opengl INTERFACE)
target_include_directories(3rdparty_opengl INTERFACE GL)
add_library(3rdparty_opengl INTERFACE)
target_include_directories(3rdparty_opengl INTERFACE GL)
if (WIN32)
if(NOT MSVC)
if (WIN32)
if(NOT MSVC)
target_link_libraries(3rdparty_opengl INTERFACE OpenGL::GL OpenGL::GLU)
else()
target_link_libraries(3rdparty_opengl INTERFACE dxgi.lib d2d1.lib dwrite.lib)
endif()
elseif(APPLE)
target_link_libraries(3rdparty_opengl INTERFACE OpenGL::GL OpenGL::GLU)
else()
target_link_libraries(3rdparty_opengl INTERFACE dxgi.lib d2d1.lib dwrite.lib)
target_link_libraries(3rdparty_opengl INTERFACE OpenGL::GL OpenGL::GLU OpenGL::GLX)
endif()
elseif(APPLE)
target_link_libraries(3rdparty_opengl INTERFACE OpenGL::GL OpenGL::GLU)
else()
target_link_libraries(3rdparty_opengl INTERFACE OpenGL::GL OpenGL::GLU OpenGL::GLX)
add_library(3rdparty_opengl INTERFACE)
target_compile_definitions(3rdparty_opengl INTERFACE WITHOUT_OPENGL=1)
endif()
# stblib
add_subdirectory(stblib)
@@ -181,7 +188,7 @@ if(USE_VULKAN)
target_compile_definitions(3rdparty_vulkan INTERFACE -DHAVE_VULKAN)
target_link_libraries(3rdparty_vulkan INTERFACE Vulkan::Vulkan)
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT ANDROID)
find_package(Wayland)
if (WAYLAND_FOUND)
target_include_directories(3rdparty_vulkan
@@ -205,21 +212,24 @@ endif()
add_subdirectory(asmjit EXCLUDE_FROM_ALL)
# OpenAL
add_subdirectory(OpenAL EXCLUDE_FROM_ALL)
if (NOT ANDROID)
add_subdirectory(OpenAL EXCLUDE_FROM_ALL)
else()
add_library(3rdparty_openal INTERFACE)
target_compile_definitions(3rdparty_openal INTERFACE WITHOUT_OPENAL=1)
endif()
# FAudio
set(FAUDIO_TARGET 3rdparty_dummy_lib)
if(USE_FAUDIO)
# FAudio depends on SDL2
find_package(SDL2)
# FAudio depends on SDL3
find_package(SDL3)
if (USE_SYSTEM_FAUDIO)
if (NOT SDL2_FOUND OR SDL2_VERSION VERSION_LESS 2.0.12)
if (NOT SDL3_FOUND OR SDL3_VERSION VERSION_LESS 3.2.0)
message(WARNING
"RPCS3: System FAudio requires SDL 2.0.9 or newer. Please note, this warning"
"can also be displayed with SDL2 versions between 2.0.9-2.0.12, as the"
"CMake config files are not correctly installed. Since a valid SDL2"
">=2.0.9 version cannot be found, building with FAudio will be skipped.")
set(USE_FAUDIO OFF CACHE BOOL "Disabled using system FAudio with SDL < 2.0.12" FORCE)
"RPCS3: System FAudio requires SDL 3.2.0 or newer. Since a valid SDL3"
">=3.2.0 version cannot be found, building with FAudio will be skipped.")
set(USE_FAUDIO OFF CACHE BOOL "Disabled using system FAudio with SDL < 3.2.0" FORCE)
else()
message(STATUS "RPCS3: Using system FAudio")
find_package(FAudio REQUIRED CONFIGS FAudioConfig.cmake FAudio-config.cmake)
@@ -229,11 +239,11 @@ if(USE_FAUDIO)
set(FAUDIO_TARGET 3rdparty_FAudio)
endif()
else()
if (NOT SDL2_FOUND OR SDL2_VERSION VERSION_LESS 2.24.0)
if (NOT SDL3_FOUND OR SDL3_VERSION VERSION_LESS 3.2.0)
message(WARNING
"-- RPCS3: 3rdparty FAudio requires SDL 2.24.0 or newer. Since a valid SDL2"
">=2.24.0 version cannot be found, building with FAudio will be skipped.")
set(USE_FAUDIO OFF CACHE BOOL "Disabled FAudio with SDL < 2.24.0" FORCE)
"-- RPCS3: 3rdparty FAudio requires SDL 3.2.0 or newer. Since a valid SDL3"
">=3.2.0 version cannot be found, building with FAudio will be skipped.")
set(USE_FAUDIO OFF CACHE BOOL "Disabled FAudio with SDL < 3.2.0" FORCE)
else()
message(STATUS "RPCS3: Using builtin FAudio")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared library")
@@ -248,47 +258,52 @@ set_property(TARGET ${FAUDIO_TARGET} PROPERTY FOLDER "3rdparty/")
# FFMPEG
add_library(3rdparty_ffmpeg INTERFACE)
if(NOT ANDROID)
add_library(3rdparty_ffmpeg INTERFACE)
# Select the version of ffmpeg to use, default is builtin
if(USE_SYSTEM_FFMPEG)
message(STATUS "RPCS3: using shared ffmpeg")
find_package(FFMPEG REQUIRED)
# Select the version of ffmpeg to use, default is builtin
if(USE_SYSTEM_FFMPEG)
message(STATUS "RPCS3: using shared ffmpeg")
find_package(FFMPEG REQUIRED)
target_include_directories(3rdparty_ffmpeg INTERFACE ${FFMPEG_INCLUDE_DIR})
target_link_libraries(3rdparty_ffmpeg INTERFACE ${FFMPEG_LIBRARIES})
else()
message(STATUS "RPCS3: using builtin ffmpeg")
add_subdirectory(ffmpeg EXCLUDE_FROM_ALL)
# ffmpeg-core libraries are extracted to CMAKE_BINARY_DIR
set(FFMPEG_LIB_DIR "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib")
target_include_directories(3rdparty_ffmpeg INTERFACE ${FFMPEG_INCLUDE_DIR})
target_link_libraries(3rdparty_ffmpeg INTERFACE ${FFMPEG_LIBRARIES})
else()
message(STATUS "RPCS3: using builtin ffmpeg")
add_subdirectory(ffmpeg EXCLUDE_FROM_ALL)
# ffmpeg-core libraries are extracted to CMAKE_BINARY_DIR
set(FFMPEG_LIB_DIR "${CMAKE_BINARY_DIR}/3rdparty/ffmpeg/lib")
if (WIN32)
target_link_libraries(3rdparty_ffmpeg INTERFACE "Bcrypt.lib")
if (WIN32)
target_link_libraries(3rdparty_ffmpeg INTERFACE "Bcrypt.lib")
endif()
find_library(FFMPEG_LIB_AVFORMAT avformat PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
find_library(FFMPEG_LIB_AVCODEC avcodec PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
find_library(FFMPEG_LIB_AVUTIL avutil PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
find_library(FFMPEG_LIB_SWSCALE swscale PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
find_library(FFMPEG_LIB_SWRESAMPLE swresample PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
if (FFMPEG_LIB_AVFORMAT MATCHES "FFMPEG_LIB_AVFORMAT-NOTFOUND")
message(FATAL_ERROR "@#$%! FFMPEG NOT FOUND! ${FFMPEG_LIB_DIR}")
endif()
target_link_libraries(3rdparty_ffmpeg
INTERFACE
${FFMPEG_LIB_AVFORMAT}
${FFMPEG_LIB_AVCODEC}
${FFMPEG_LIB_AVUTIL}
${FFMPEG_LIB_SWSCALE}
${FFMPEG_LIB_SWRESAMPLE}
)
target_include_directories(3rdparty_ffmpeg INTERFACE "ffmpeg/include")
endif()
find_library(FFMPEG_LIB_AVFORMAT avformat PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
find_library(FFMPEG_LIB_AVCODEC avcodec PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
find_library(FFMPEG_LIB_AVUTIL avutil PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
find_library(FFMPEG_LIB_SWSCALE swscale PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
find_library(FFMPEG_LIB_SWRESAMPLE swresample PATHS ${FFMPEG_LIB_DIR} NO_DEFAULT_PATH)
target_link_libraries(3rdparty_ffmpeg
INTERFACE
${FFMPEG_LIB_AVFORMAT}
${FFMPEG_LIB_AVCODEC}
${FFMPEG_LIB_AVUTIL}
${FFMPEG_LIB_SWSCALE}
${FFMPEG_LIB_SWRESAMPLE}
)
target_include_directories(3rdparty_ffmpeg INTERFACE "ffmpeg/include")
endif()
# GLEW
add_library(3rdparty_glew INTERFACE)
if(NOT MSVC)
if(NOT MSVC AND NOT ANDROID)
find_package(GLEW REQUIRED)
target_link_libraries(3rdparty_glew INTERFACE GLEW::GLEW)
endif()
@@ -303,26 +318,26 @@ add_subdirectory(wolfssl EXCLUDE_FROM_ALL)
# CURL
add_subdirectory(curl EXCLUDE_FROM_ALL)
# SDL2
set(SDL2_TARGET 3rdparty_dummy_lib)
# SDL3
set(SDL3_TARGET 3rdparty_dummy_lib)
if(USE_SDL)
if(USE_SYSTEM_SDL)
find_package(SDL2)
if(SDL2_FOUND AND NOT SDL2_VERSION VERSION_LESS 2.24.0)
message(STATUS "Using system SDL2")
add_library(3rdparty_sdl2 INTERFACE)
target_compile_definitions(3rdparty_sdl2 INTERFACE -DHAVE_SDL2=1)
target_link_libraries(3rdparty_sdl2 INTERFACE SDL2::SDL2)
set(SDL2_TARGET 3rdparty_sdl2)
find_package(SDL3)
if(SDL3_FOUND AND NOT SDL3_VERSION VERSION_LESS 3.2.0)
message(STATUS "Using system SDL3 version '${SDL3_VERSION}'")
add_library(3rdparty_sdl3 INTERFACE)
target_compile_definitions(3rdparty_sdl3 INTERFACE -DHAVE_SDL3=1)
target_link_libraries(3rdparty_sdl3 INTERFACE SDL3::SDL3)
set(SDL3_TARGET 3rdparty_sdl3)
else()
message(FATAL_ERROR "SDL2 is not available on this system")
message(FATAL_ERROR "SDL3 is not available on this system")
endif()
else()
message(STATUS "Using static SDL2 from 3rdparty")
add_library(3rdparty_sdl2 INTERFACE)
target_compile_definitions(3rdparty_sdl2 INTERFACE -DHAVE_SDL2=1)
message(STATUS "Using static SDL3 from 3rdparty")
add_library(3rdparty_sdl3 INTERFACE)
target_compile_definitions(3rdparty_sdl3 INTERFACE -DHAVE_SDL3=1)
add_subdirectory(libsdl-org EXCLUDE_FROM_ALL)
set(SDL2_TARGET 3rdparty_sdl2)
set(SDL3_TARGET 3rdparty_sdl3)
endif()
endif()
@@ -365,7 +380,7 @@ add_library(3rdparty::glew ALIAS 3rdparty_glew)
add_library(3rdparty::wolfssl ALIAS wolfssl)
add_library(3rdparty::libcurl ALIAS 3rdparty_libcurl)
add_library(3rdparty::soundtouch ALIAS soundtouch)
add_library(3rdparty::sdl2 ALIAS ${SDL2_TARGET})
add_library(3rdparty::sdl3 ALIAS ${SDL3_TARGET})
add_library(3rdparty::miniupnpc ALIAS libminiupnpc-static)
add_library(3rdparty::rtmidi ALIAS rtmidi)
add_library(3rdparty::opencv ALIAS ${OPENCV_TARGET})
File diff suppressed because it is too large Load Diff
+9 -30
View File
@@ -1,36 +1,15 @@
# DiscordRPC
add_library(3rdparty_discordRPC INTERFACE)
check_cxx_compiler_flag("-msse -msse2 -mcx16" COMPILER_X86)
if (USE_DISCORD_RPC AND (WIN32 OR CMAKE_SYSTEM MATCHES "Linux" OR APPLE))
set(BUILD_EXAMPLES FALSE CACHE BOOL "Build example apps")
set(ENABLE_IO_THREAD TRUE CACHE BOOL "Start up a separate I/O thread, otherwise I'd need to call an update function")
set(USE_STATIC_CRT FALSE CACHE BOOL "Use /MT[d] for dynamic library")
set(WARNINGS_AS_ERRORS FALSE CACHE BOOL "When enabled, compiles with `-Werror` (on *nix platforms).")
# We don't want Discord Rich Presence on the BSDs and other OSes
if (USE_DISCORD_RPC AND (WIN32 OR CMAKE_SYSTEM MATCHES "Linux" OR APPLE) AND COMPILER_X86)
if (WIN32 AND NOT MSVC)
ExternalProject_Add(discordRPC
GIT_REPOSITORY https://github.com/discordapp/discord-rpc
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}
INSTALL_COMMAND ""
)
endif()
target_include_directories(3rdparty_discordRPC INTERFACE include)
add_subdirectory(discord-rpc EXCLUDE_FROM_ALL)
target_include_directories(3rdparty_discordRPC INTERFACE discord-rpc/include)
target_compile_definitions(3rdparty_discordRPC INTERFACE -DWITH_DISCORD_RPC)
set(DISCORD_RPC_LIB NOTFOUND)
if (WIN32)
if (NOT MSVC)
set(DISCORD_RPC_LIB ${CMAKE_CURRENT_BINARY_DIR}/src/libdiscord-rpc.a)
else()
find_library(DISCORD_RPC_LIB discord-rpc PATHS lib/ NO_DEFAULT_PATH)
endif()
elseif(CMAKE_SYSTEM MATCHES "Linux")
find_library(DISCORD_RPC_LIB discord-rpc-linux PATHS lib/ NO_DEFAULT_PATH)
elseif(APPLE)
find_library(DISCORD_RPC_LIB discord-rpc-mac PATHS lib/ NO_DEFAULT_PATH)
endif()
target_link_libraries(3rdparty_discordRPC INTERFACE ${DISCORD_RPC_LIB})
if(APPLE)
target_link_libraries(3rdparty_discordRPC INTERFACE "objc" "-framework Foundation" "-framework CoreServices")
endif()
target_link_libraries(3rdparty_discordRPC INTERFACE discord-rpc)
endif()
+78
View File
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="discord-rpc\include\discord_register.h" />
<ClInclude Include="discord-rpc\include\discord_rpc.h" />
<ClInclude Include="discord-rpc\src\backoff.h" />
<ClInclude Include="discord-rpc\src\connection.h" />
<ClInclude Include="discord-rpc\src\msg_queue.h" />
<ClInclude Include="discord-rpc\src\rpc_connection.h" />
<ClInclude Include="discord-rpc\src\serialization.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="discord-rpc\src\connection_win.cpp" />
<ClCompile Include="discord-rpc\src\discord_register_win.cpp" />
<ClCompile Include="discord-rpc\src\discord_rpc.cpp" />
<ClCompile Include="discord-rpc\src\dllmain.cpp" />
<ClCompile Include="discord-rpc\src\rpc_connection.cpp" />
<ClCompile Include="discord-rpc\src\serialization.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{81b0d6d6-84e6-40c1-8dbd-47cbcb3051ad}</ProjectGuid>
<RootNamespace>discord-rpc</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>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)\buildfiles\msvc\rpcs3_default.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(SolutionDir)\buildfiles\msvc\rpcs3_debug.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(SolutionDir)\buildfiles\msvc\rpcs3_release.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)build\lib\$(Configuration)-$(Platform)\</OutDir>
<IntDir>$(SolutionDir)build\tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>./discord-rpc/include;./discord-rpc/thirdparty/rapidjson-1.1.0/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
+54
View File
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header files">
<UniqueIdentifier>{719448a4-8eab-4e75-b6b7-687e2b217490}</UniqueIdentifier>
</Filter>
<Filter Include="Source files">
<UniqueIdentifier>{7c0d57b3-e2ef-45c2-aa2d-2765e5c73279}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="discord-rpc\src\backoff.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="discord-rpc\src\connection.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="discord-rpc\src\msg_queue.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="discord-rpc\src\rpc_connection.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="discord-rpc\src\serialization.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="discord-rpc\include\discord_register.h">
<Filter>Header files</Filter>
</ClInclude>
<ClInclude Include="discord-rpc\include\discord_rpc.h">
<Filter>Header files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="discord-rpc\src\connection_win.cpp">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="discord-rpc\src\discord_register_win.cpp">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="discord-rpc\src\discord_rpc.cpp">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="discord-rpc\src\dllmain.cpp">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="discord-rpc\src\rpc_connection.cpp">
<Filter>Source files</Filter>
</ClCompile>
<ClCompile Include="discord-rpc\src\serialization.cpp">
<Filter>Source files</Filter>
</ClCompile>
</ItemGroup>
</Project>
-26
View File
@@ -1,26 +0,0 @@
#pragma once
#if defined(DISCORD_DYNAMIC_LIB)
#if defined(_WIN32)
#if defined(DISCORD_BUILDING_SDK)
#define DISCORD_EXPORT __declspec(dllexport)
#else
#define DISCORD_EXPORT __declspec(dllimport)
#endif
#else
#define DISCORD_EXPORT __attribute__((visibility("default")))
#endif
#else
#define DISCORD_EXPORT
#endif
#ifdef __cplusplus
extern "C" {
#endif
DISCORD_EXPORT void Discord_Register(const char* applicationId, const char* command);
DISCORD_EXPORT void Discord_RegisterSteamGame(const char* applicationId, const char* steamId);
#ifdef __cplusplus
}
#endif
-87
View File
@@ -1,87 +0,0 @@
#pragma once
#include <stdint.h>
// clang-format off
#if defined(DISCORD_DYNAMIC_LIB)
# if defined(_WIN32)
# if defined(DISCORD_BUILDING_SDK)
# define DISCORD_EXPORT __declspec(dllexport)
# else
# define DISCORD_EXPORT __declspec(dllimport)
# endif
# else
# define DISCORD_EXPORT __attribute__((visibility("default")))
# endif
#else
# define DISCORD_EXPORT
#endif
// clang-format on
#ifdef __cplusplus
extern "C" {
#endif
typedef struct DiscordRichPresence {
const char* state; /* max 128 bytes */
const char* details; /* max 128 bytes */
int64_t startTimestamp;
int64_t endTimestamp;
const char* largeImageKey; /* max 32 bytes */
const char* largeImageText; /* max 128 bytes */
const char* smallImageKey; /* max 32 bytes */
const char* smallImageText; /* max 128 bytes */
const char* partyId; /* max 128 bytes */
int partySize;
int partyMax;
const char* matchSecret; /* max 128 bytes */
const char* joinSecret; /* max 128 bytes */
const char* spectateSecret; /* max 128 bytes */
int8_t instance;
} DiscordRichPresence;
typedef struct DiscordUser {
const char* userId;
const char* username;
const char* discriminator;
const char* avatar;
} DiscordUser;
typedef struct DiscordEventHandlers {
void (*ready)(const DiscordUser* request);
void (*disconnected)(int errorCode, const char* message);
void (*errored)(int errorCode, const char* message);
void (*joinGame)(const char* joinSecret);
void (*spectateGame)(const char* spectateSecret);
void (*joinRequest)(const DiscordUser* request);
} DiscordEventHandlers;
#define DISCORD_REPLY_NO 0
#define DISCORD_REPLY_YES 1
#define DISCORD_REPLY_IGNORE 2
DISCORD_EXPORT void Discord_Initialize(const char* applicationId,
DiscordEventHandlers* handlers,
int autoRegister,
const char* optionalSteamId);
DISCORD_EXPORT void Discord_Shutdown(void);
/* checks for incoming messages, dispatches callbacks */
DISCORD_EXPORT void Discord_RunCallbacks(void);
/* If you disable the lib starting its own io thread, you'll need to call this from your own */
#ifdef DISCORD_DISABLE_IO_THREAD
DISCORD_EXPORT void Discord_UpdateConnection(void);
#endif
DISCORD_EXPORT void Discord_UpdatePresence(const DiscordRichPresence* presence);
DISCORD_EXPORT void Discord_ClearPresence(void);
DISCORD_EXPORT void Discord_Respond(const char* userid, /* DISCORD_REPLY_ */ int reply);
DISCORD_EXPORT void Discord_UpdateHandlers(DiscordEventHandlers* handlers);
#ifdef __cplusplus
} /* extern "C" */
#endif
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
View File
@@ -1 +1,5 @@
# To avoid python numpy dependency in debug build, force release build of this library
set(ORIG_BUILD_TYPE ${CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE Release)
add_subdirectory(fusion EXCLUDE_FROM_ALL)
set(CMAKE_BUILD_TYPE ${ORIG_BUILD_TYPE})
+2
View File
@@ -15,6 +15,8 @@ elseif(CMAKE_SYSTEM MATCHES "Linux")
target_link_libraries(3rdparty_hidapi INTERFACE hidapi-hidraw udev)
elseif(WIN32)
target_link_libraries(3rdparty_hidapi INTERFACE hidapi::hidapi hidapi::include Shlwapi.lib)
elseif(ANDROID)
target_link_libraries(3rdparty_hidapi INTERFACE hidapi::libusb)
else()
target_link_libraries(3rdparty_hidapi INTERFACE hidapi-libusb usb)
endif()
+198 -138
View File
@@ -11,137 +11,141 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
<ClCompile Include="SDL\src\joystick\SDL_steam_virtual_gamepad.c" />
<ClCompile Include="SDL\src\joystick\steam\SDL_steamcontroller.c" />
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_lsx.c" />
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_sse.c" />
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_std.c" />
<ClInclude Include="SDL\include\begin_code.h" />
<ClInclude Include="SDL\include\close_code.h" />
<ClInclude Include="SDL\include\SDL.h" />
<ClInclude Include="SDL\include\SDL_assert.h" />
<ClInclude Include="SDL\include\SDL_atomic.h" />
<ClInclude Include="SDL\include\SDL_audio.h" />
<ClInclude Include="SDL\include\SDL_bits.h" />
<ClInclude Include="SDL\include\SDL_blendmode.h" />
<ClInclude Include="SDL\include\SDL_clipboard.h" />
<ClInclude Include="SDL\include\SDL_config.h" />
<ClInclude Include="SDL\include\SDL_config_windows.h" />
<ClInclude Include="SDL\include\SDL_copying.h" />
<ClInclude Include="SDL\include\SDL_cpuinfo.h" />
<ClInclude Include="SDL\include\SDL_egl.h" />
<ClInclude Include="SDL\include\SDL_endian.h" />
<ClInclude Include="SDL\include\SDL_error.h" />
<ClInclude Include="SDL\include\SDL_events.h" />
<ClInclude Include="SDL\include\SDL_filesystem.h" />
<ClInclude Include="SDL\include\SDL_gamecontroller.h" />
<ClInclude Include="SDL\include\SDL_gesture.h" />
<ClInclude Include="SDL\include\SDL_guid.h" />
<ClInclude Include="SDL\include\SDL_haptic.h" />
<ClInclude Include="SDL\include\SDL_hints.h" />
<ClInclude Include="SDL\include\SDL_hidapi.h" />
<ClInclude Include="SDL\include\SDL_joystick.h" />
<ClInclude Include="SDL\include\SDL_keyboard.h" />
<ClInclude Include="SDL\include\SDL_keycode.h" />
<ClInclude Include="SDL\include\SDL_loadso.h" />
<ClInclude Include="SDL\include\SDL_locale.h" />
<ClInclude Include="SDL\include\SDL_log.h" />
<ClInclude Include="SDL\include\SDL_main.h" />
<ClInclude Include="SDL\include\SDL_messagebox.h" />
<ClInclude Include="SDL\include\SDL_metal.h" />
<ClInclude Include="SDL\include\SDL_misc.h" />
<ClInclude Include="SDL\include\SDL_mouse.h" />
<ClInclude Include="SDL\include\SDL_mutex.h" />
<ClInclude Include="SDL\include\SDL_name.h" />
<ClInclude Include="SDL\include\SDL_opengl.h" />
<ClInclude Include="SDL\include\SDL_opengl_glext.h" />
<ClInclude Include="SDL\include\SDL_opengles.h" />
<ClInclude Include="SDL\include\SDL_opengles2.h" />
<ClInclude Include="SDL\include\SDL_opengles2_gl2.h" />
<ClInclude Include="SDL\include\SDL_opengles2_gl2ext.h" />
<ClInclude Include="SDL\include\SDL_opengles2_gl2platform.h" />
<ClInclude Include="SDL\include\SDL_opengles2_khrplatform.h" />
<ClInclude Include="SDL\include\SDL_pixels.h" />
<ClInclude Include="SDL\include\SDL_platform.h" />
<ClInclude Include="SDL\include\SDL_power.h" />
<ClInclude Include="SDL\include\SDL_quit.h" />
<ClInclude Include="SDL\include\SDL_rect.h" />
<ClInclude Include="SDL\include\SDL_render.h" />
<ClInclude Include="SDL\include\SDL_revision.h" />
<ClInclude Include="SDL\include\SDL_rwops.h" />
<ClInclude Include="SDL\include\SDL_scancode.h" />
<ClInclude Include="SDL\include\SDL_sensor.h" />
<ClInclude Include="SDL\include\SDL_shape.h" />
<ClInclude Include="SDL\include\SDL_stdinc.h" />
<ClInclude Include="SDL\include\SDL_surface.h" />
<ClInclude Include="SDL\include\SDL_system.h" />
<ClInclude Include="SDL\include\SDL_syswm.h" />
<ClInclude Include="SDL\include\SDL_test.h" />
<ClInclude Include="SDL\include\SDL_test_assert.h" />
<ClInclude Include="SDL\include\SDL_test_common.h" />
<ClInclude Include="SDL\include\SDL_test_compare.h" />
<ClInclude Include="SDL\include\SDL_test_crc32.h" />
<ClInclude Include="SDL\include\SDL_test_font.h" />
<ClInclude Include="SDL\include\SDL_test_fuzzer.h" />
<ClInclude Include="SDL\include\SDL_test_harness.h" />
<ClInclude Include="SDL\include\SDL_test_images.h" />
<ClInclude Include="SDL\include\SDL_test_log.h" />
<ClInclude Include="SDL\include\SDL_test_md5.h" />
<ClInclude Include="SDL\include\SDL_test_memory.h" />
<ClInclude Include="SDL\include\SDL_test_random.h" />
<ClInclude Include="SDL\include\SDL_thread.h" />
<ClInclude Include="SDL\include\SDL_timer.h" />
<ClInclude Include="SDL\include\SDL_touch.h" />
<ClInclude Include="SDL\include\SDL_types.h" />
<ClInclude Include="SDL\include\SDL_version.h" />
<ClInclude Include="SDL\include\SDL_video.h" />
<ClInclude Include="SDL\include\SDL_vulkan.h" />
<ClInclude Include="SDL\include\SDL3\SDL_begin_code.h" />
<ClInclude Include="SDL\include\SDL3\SDL_camera.h" />
<ClInclude Include="SDL\include\SDL3\SDL_close_code.h" />
<ClInclude Include="SDL\include\SDL3\SDL.h" />
<ClInclude Include="SDL\include\SDL3\SDL_assert.h" />
<ClInclude Include="SDL\include\SDL3\SDL_atomic.h" />
<ClInclude Include="SDL\include\SDL3\SDL_audio.h" />
<ClInclude Include="SDL\include\SDL3\SDL_bits.h" />
<ClInclude Include="SDL\include\SDL3\SDL_blendmode.h" />
<ClInclude Include="SDL\include\SDL3\SDL_clipboard.h" />
<ClInclude Include="SDL\include\SDL3\SDL_copying.h" />
<ClInclude Include="SDL\include\SDL3\SDL_cpuinfo.h" />
<ClInclude Include="SDL\include\SDL3\SDL_egl.h" />
<ClInclude Include="SDL\include\SDL3\SDL_endian.h" />
<ClInclude Include="SDL\include\SDL3\SDL_error.h" />
<ClInclude Include="SDL\include\SDL3\SDL_events.h" />
<ClInclude Include="SDL\include\SDL3\SDL_filesystem.h" />
<ClInclude Include="SDL\include\SDL3\SDL_gamepad.h" />
<ClInclude Include="SDL\include\SDL3\SDL_gpu.h" />
<ClInclude Include="SDL\include\SDL3\SDL_guid.h" />
<ClInclude Include="SDL\include\SDL3\SDL_haptic.h" />
<ClInclude Include="SDL\include\SDL3\SDL_hints.h" />
<ClInclude Include="SDL\include\SDL3\SDL_hidapi.h" />
<ClInclude Include="SDL\include\SDL3\SDL_asyncio.h" />
<ClInclude Include="SDL\include\SDL3\SDL_joystick.h" />
<ClInclude Include="SDL\include\SDL3\SDL_keyboard.h" />
<ClInclude Include="SDL\include\SDL3\SDL_keycode.h" />
<ClInclude Include="SDL\include\SDL3\SDL_loadso.h" />
<ClInclude Include="SDL\include\SDL3\SDL_locale.h" />
<ClInclude Include="SDL\include\SDL3\SDL_log.h" />
<ClInclude Include="SDL\include\SDL3\SDL_main.h" />
<ClInclude Include="SDL\include\SDL3\SDL_messagebox.h" />
<ClInclude Include="SDL\include\SDL3\SDL_metal.h" />
<ClInclude Include="SDL\include\SDL3\SDL_misc.h" />
<ClInclude Include="SDL\include\SDL3\SDL_mouse.h" />
<ClInclude Include="SDL\include\SDL3\SDL_mutex.h" />
<ClInclude Include="SDL\include\SDL3\SDL_opengl.h" />
<ClInclude Include="SDL\include\SDL3\SDL_opengl_glext.h" />
<ClInclude Include="SDL\include\SDL3\SDL_opengles.h" />
<ClInclude Include="SDL\include\SDL3\SDL_opengles2.h" />
<ClInclude Include="SDL\include\SDL3\SDL_opengles2_gl2.h" />
<ClInclude Include="SDL\include\SDL3\SDL_opengles2_gl2ext.h" />
<ClInclude Include="SDL\include\SDL3\SDL_opengles2_gl2platform.h" />
<ClInclude Include="SDL\include\SDL3\SDL_opengles2_khrplatform.h" />
<ClInclude Include="SDL\include\SDL3\SDL_pen.h" />
<ClInclude Include="SDL\include\SDL3\SDL_pixels.h" />
<ClInclude Include="SDL\include\SDL3\SDL_platform.h" />
<ClInclude Include="SDL\include\SDL3\SDL_platform_defines.h" />
<ClInclude Include="SDL\include\SDL3\SDL_power.h" />
<ClInclude Include="SDL\include\SDL3\SDL_process.h" />
<ClInclude Include="SDL\include\SDL3\SDL_properties.h" />
<ClInclude Include="SDL\include\SDL3\SDL_rect.h" />
<ClInclude Include="SDL\include\SDL3\SDL_render.h" />
<ClInclude Include="SDL\include\SDL3\SDL_revision.h" />
<ClInclude Include="SDL\include\SDL3\SDL_iostream.h" />
<ClInclude Include="SDL\include\SDL3\SDL_scancode.h" />
<ClInclude Include="SDL\include\SDL3\SDL_sensor.h" />
<ClInclude Include="SDL\include\SDL3\SDL_stdinc.h" />
<ClInclude Include="SDL\include\SDL3\SDL_storage.h" />
<ClInclude Include="SDL\include\SDL3\SDL_surface.h" />
<ClInclude Include="SDL\include\SDL3\SDL_system.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_assert.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_common.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_compare.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_crc32.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_font.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_fuzzer.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_harness.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_log.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_md5.h" />
<ClInclude Include="SDL\include\SDL3\SDL_test_memory.h" />
<ClInclude Include="SDL\include\SDL3\SDL_thread.h" />
<ClInclude Include="SDL\include\SDL3\SDL_time.h" />
<ClInclude Include="SDL\include\SDL3\SDL_timer.h" />
<ClInclude Include="SDL\include\SDL3\SDL_touch.h" />
<ClInclude Include="SDL\include\SDL3\SDL_version.h" />
<ClInclude Include="SDL\include\SDL3\SDL_video.h" />
<ClInclude Include="SDL\include\SDL3\SDL_vulkan.h" />
<ClInclude Include="SDL\src\audio\directsound\SDL_directsound.h" />
<ClInclude Include="SDL\src\audio\disk\SDL_diskaudio.h" />
<ClInclude Include="SDL\src\audio\dummy\SDL_dummyaudio.h" />
<ClInclude Include="SDL\src\audio\SDL_audio_c.h" />
<ClInclude Include="SDL\src\audio\SDL_audiodev_c.h" />
<ClInclude Include="SDL\src\audio\SDL_sysaudio.h" />
<ClInclude Include="SDL\src\audio\SDL_audioqueue.h" />
<ClInclude Include="SDL\src\audio\SDL_audioresample.h" />
<ClInclude Include="SDL\src\audio\SDL_wave.h" />
<ClInclude Include="SDL\src\audio\wasapi\SDL_wasapi.h" />
<ClInclude Include="SDL\src\audio\winmm\SDL_winmm.h" />
<ClInclude Include="SDL\src\camera\SDL_camera_c.h" />
<ClInclude Include="SDL\src\camera\SDL_syscamera.h" />
<ClInclude Include="SDL\src\core\windows\SDL_directx.h" />
<ClInclude Include="SDL\src\core\windows\SDL_gameinput.h" />
<ClInclude Include="SDL\src\core\windows\SDL_hid.h" />
<ClInclude Include="SDL\src\core\windows\SDL_immdevice.h" />
<ClInclude Include="SDL\src\core\windows\SDL_windows.h" />
<ClInclude Include="SDL\src\core\windows\SDL_xinput.h" />
<ClInclude Include="SDL\src\cpuinfo\SDL_cpuinfo_c.h" />
<ClInclude Include="SDL\src\dynapi\SDL_dynapi.h" />
<ClInclude Include="SDL\src\dynapi\SDL_dynapi_overrides.h" />
<ClInclude Include="SDL\src\dynapi\SDL_dynapi_procs.h" />
<ClInclude Include="SDL\src\dynapi\SDL_dynapi_unsupported.h" />
<ClInclude Include="SDL\src\events\blank_cursor.h" />
<ClInclude Include="SDL\src\events\default_cursor.h" />
<ClInclude Include="SDL\src\events\scancodes_windows.h" />
<ClInclude Include="SDL\src\events\SDL_categories_c.h" />
<ClInclude Include="SDL\src\events\SDL_clipboardevents_c.h" />
<ClInclude Include="SDL\src\events\SDL_displayevents_c.h" />
<ClInclude Include="SDL\src\events\SDL_dropevents_c.h" />
<ClInclude Include="SDL\src\events\SDL_events_c.h" />
<ClInclude Include="SDL\src\events\SDL_gesture_c.h" />
<ClInclude Include="SDL\src\events\SDL_eventwatch_c.h" />
<ClInclude Include="SDL\src\events\SDL_keyboard_c.h" />
<ClInclude Include="SDL\src\events\SDL_keymap_c.h" />
<ClInclude Include="SDL\src\events\SDL_mouse_c.h" />
<ClInclude Include="SDL\src\events\SDL_touch_c.h" />
<ClInclude Include="SDL\src\events\SDL_windowevents_c.h" />
<ClInclude Include="SDL\src\filesystem\SDL_sysfilesystem.h" />
<ClInclude Include="SDL\src\gpu\SDL_sysgpu.h" />
<ClInclude Include="SDL\src\gpu\vulkan\SDL_gpu_vulkan_vkfuncs.h" />
<ClInclude Include="SDL\src\io\SDL_asyncio_c.h" />
<ClInclude Include="SDL\src\io\SDL_sysasyncio.h" />
<ClInclude Include="SDL\src\haptic\SDL_haptic_c.h" />
<ClInclude Include="SDL\src\haptic\SDL_syshaptic.h" />
<ClInclude Include="SDL\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="SDL\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="SDL\src\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="SDL\src\hidapi\hidapi\hidapi.h" />
<ClInclude Include="SDL\src\hidapi\SDL_hidapi_c.h" />
<ClInclude Include="SDL\src\joystick\controller_type.h" />
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_nintendo.h" />
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_rumble.h" />
<ClInclude Include="SDL\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="SDL\src\joystick\SDL_gamepad_c.h" />
<ClInclude Include="SDL\src\joystick\SDL_gamepad_db.h" />
<ClInclude Include="SDL\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="SDL\src\joystick\SDL_steam_virtual_gamepad.h" />
<ClInclude Include="SDL\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="SDL\src\joystick\steam\SDL_steamcontroller.h" />
<ClInclude Include="SDL\src\joystick\usb_ids.h" />
<ClInclude Include="SDL\src\joystick\virtual\SDL_virtualjoystick_c.h" />
<ClInclude Include="SDL\src\joystick\windows\SDL_dinputjoystick_c.h" />
@@ -151,6 +155,7 @@
<ClInclude Include="SDL\src\libm\math_libm.h" />
<ClInclude Include="SDL\src\libm\math_private.h" />
<ClInclude Include="SDL\src\locale\SDL_syslocale.h" />
<ClInclude Include="SDL\src\main\SDL_main_callbacks.h" />
<ClInclude Include="SDL\src\misc\SDL_sysurl.h" />
<ClInclude Include="SDL\src\power\SDL_syspower.h" />
<ClInclude Include="SDL\src\render\direct3d11\SDL_shaders_d3d11.h" />
@@ -172,17 +177,36 @@
<ClInclude Include="SDL\src\render\software\SDL_render_sw_c.h" />
<ClInclude Include="SDL\src\render\software\SDL_rotate.h" />
<ClInclude Include="SDL\src\render\software\SDL_triangle.h" />
<ClInclude Include="SDL\src\render\vulkan\SDL_shaders_vulkan.h" />
<ClInclude Include="SDL\src\SDL_assert_c.h" />
<ClInclude Include="SDL\src\SDL_dataqueue.h" />
<ClInclude Include="SDL\src\SDL_error_c.h" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps3.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steam.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_wii.c" />
<ClCompile Include="SDL\src\core\windows\pch.c" />
<ClCompile Include="SDL\src\camera\dummy\SDL_camera_dummy.c" />
<ClCompile Include="SDL\src\camera\mediafoundation\SDL_camera_mediafoundation.c" />
<ClCompile Include="SDL\src\camera\SDL_camera.c" />
<ClCompile Include="SDL\src\dialog\SDL_dialog.c" />
<ClCompile Include="SDL\src\dialog\SDL_dialog_utils.c" />
<ClCompile Include="SDL\src\filesystem\SDL_filesystem.c" />
<ClCompile Include="SDL\src\filesystem\windows\SDL_sysfsops.c" />
<ClCompile Include="SDL\src\io\windows\SDL_asyncio_windows_ioring.c" />
<ClCompile Include="SDL\src\gpu\SDL_gpu.c" />
<ClCompile Include="SDL\src\gpu\d3d12\SDL_gpu_d3d12.c" />
<ClCompile Include="SDL\src\gpu\vulkan\SDL_gpu_vulkan.c" />
<ClCompile Include="SDL\src\io\generic\SDL_asyncio_generic.c" />
<ClCompile Include="SDL\src\io\SDL_asyncio.c" />
<ClCompile Include="SDL\src\main\generic\SDL_sysmain_callbacks.c" />
<ClCompile Include="SDL\src\main\SDL_main_callbacks.c" />
<ClCompile Include="SDL\src\main\SDL_runapp.c" />
<ClCompile Include="SDL\src\main\windows\SDL_sysmain_runapp.c" />
<ClCompile Include="SDL\src\render\vulkan\SDL_render_vulkan.c" />
<ClCompile Include="SDL\src\render\vulkan\SDL_shaders_vulkan.c" />
<ClCompile Include="SDL\src\SDL_guid.c" />
<ClInclude Include="SDL\src\SDL_hashtable.h" />
<ClInclude Include="SDL\src\SDL_hints_c.h" />
<ClInclude Include="SDL\src\SDL_internal.h" />
<ClInclude Include="SDL\src\SDL_list.h" />
<ClInclude Include="SDL\src\SDL_log_c.h" />
<ClInclude Include="SDL\src\SDL_properties_c.h" />
<ClInclude Include="SDL\src\sensor\dummy\SDL_dummysensor.h" />
<ClInclude Include="SDL\src\sensor\SDL_sensor_c.h" />
<ClInclude Include="SDL\src\sensor\SDL_syssensor.h" />
@@ -191,24 +215,17 @@
<ClInclude Include="SDL\src\thread\SDL_thread_c.h" />
<ClInclude Include="SDL\src\thread\generic\SDL_syscond_c.h" />
<ClInclude Include="SDL\src\thread\windows\SDL_sysmutex_c.h" />
<ClInclude Include="SDL\src\thread\generic\SDL_sysrwlock_c.h" />
<ClInclude Include="SDL\src\thread\windows\SDL_systhread_c.h" />
<ClInclude Include="SDL\src\timer\SDL_timer_c.h" />
<ClInclude Include="SDL\src\video\dummy\SDL_nullevents_c.h" />
<ClInclude Include="SDL\src\video\dummy\SDL_nullframebuffer_c.h" />
<ClInclude Include="SDL\src\video\dummy\SDL_nullvideo.h" />
<ClInclude Include="SDL\src\video\khronos\vk_video\vulkan_video_codecs_common.h" />
<ClInclude Include="SDL\src\video\khronos\vk_video\vulkan_video_codec_h264std.h" />
<ClInclude Include="SDL\src\video\khronos\vk_video\vulkan_video_codec_h264std_decode.h" />
<ClInclude Include="SDL\src\video\khronos\vk_video\vulkan_video_codec_h264std_encode.h" />
<ClInclude Include="SDL\src\video\khronos\vk_video\vulkan_video_codec_h265std.h" />
<ClInclude Include="SDL\src\video\khronos\vk_video\vulkan_video_codec_h265std_decode.h" />
<ClInclude Include="SDL\src\video\khronos\vk_video\vulkan_video_codec_h265std_encode.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vk_icd.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vk_layer.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vk_platform.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vk_sdk_platform.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan.hpp" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_android.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_beta.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_core.h" />
@@ -224,29 +241,39 @@
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_xcb.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_xlib.h" />
<ClInclude Include="SDL\src\video\khronos\vulkan\vulkan_xlib_xrandr.h" />
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenevents_c.h" />
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenframebuffer_c.h" />
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenopengles.h" />
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenvideo.h" />
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenvulkan.h" />
<ClInclude Include="SDL\src\video\offscreen\SDL_offscreenwindow.h" />
<ClInclude Include="SDL\src\video\SDL_blit.h" />
<ClInclude Include="SDL\src\video\SDL_blit_auto.h" />
<ClInclude Include="SDL\src\video\SDL_blit_copy.h" />
<ClInclude Include="SDL\src\video\SDL_blit_slow.h" />
<ClInclude Include="SDL\src\video\SDL_clipboard_c.h" />
<ClInclude Include="SDL\src\video\SDL_egl_c.h" />
<ClInclude Include="SDL\src\video\SDL_pixels_c.h" />
<ClInclude Include="SDL\src\video\SDL_rect_c.h" />
<ClInclude Include="SDL\src\video\SDL_RLEaccel_c.h" />
<ClInclude Include="SDL\src\video\SDL_shape_internals.h" />
<ClInclude Include="SDL\src\video\SDL_stb_c.h" />
<ClInclude Include="SDL\src\video\SDL_surface_c.h" />
<ClInclude Include="SDL\src\video\SDL_sysvideo.h" />
<ClInclude Include="SDL\src\video\SDL_vulkan_internal.h" />
<ClInclude Include="SDL\src\video\SDL_yuv_c.h" />
<ClInclude Include="SDL\src\video\windows\SDL_msctf.h" />
<ClInclude Include="SDL\src\video\windows\SDL_vkeys.h" />
<ClInclude Include="SDL\src\video\windows\SDL_surface_utils.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsclipboard.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsevents.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsframebuffer.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowskeyboard.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsgameinput.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsmessagebox.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsmodes.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsmouse.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsopengl.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsopengles.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsrawinput.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsshape.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsvideo.h" />
<ClInclude Include="SDL\src\video\windows\SDL_windowsvulkan.h" />
@@ -261,8 +288,6 @@
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_sse_func.h" />
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_std.h" />
<ClInclude Include="SDL\src\video\yuv2rgb\yuv_rgb_std_func.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="SDL\src\atomic\SDL_atomic.c" />
<ClCompile Include="SDL\src\atomic\SDL_spinlock.c" />
<ClCompile Include="SDL\src\audio\directsound\SDL_directsound.c" />
@@ -272,78 +297,71 @@
<ClCompile Include="SDL\src\audio\SDL_audiocvt.c" />
<ClCompile Include="SDL\src\audio\SDL_audiodev.c" />
<ClCompile Include="SDL\src\audio\SDL_audiotypecvt.c" />
<ClCompile Include="SDL\src\audio\SDL_audioqueue.c" />
<ClCompile Include="SDL\src\audio\SDL_audioresample.c" />
<ClCompile Include="SDL\src\audio\SDL_mixer.c" />
<ClCompile Include="SDL\src\audio\SDL_wave.c" />
<ClCompile Include="SDL\src\audio\winmm\SDL_winmm.c" />
<ClCompile Include="SDL\src\audio\wasapi\SDL_wasapi.c" />
<ClCompile Include="SDL\src\audio\wasapi\SDL_wasapi_win32.c" />
<ClCompile Include="SDL\src\core\SDL_core_unsupported.c" />
<ClCompile Include="SDL\src\core\windows\SDL_gameinput.c" />
<ClCompile Include="SDL\src\core\windows\SDL_hid.c" />
<ClCompile Include="SDL\src\core\windows\SDL_immdevice.c" />
<ClCompile Include="SDL\src\core\windows\SDL_windows.c" />
<ClCompile Include="SDL\src\core\windows\SDL_xinput.c" />
<ClCompile Include="SDL\src\cpuinfo\SDL_cpuinfo.c" />
<ClCompile Include="SDL\src\dialog\windows\SDL_windowsdialog.c" />
<ClCompile Include="SDL\src\dynapi\SDL_dynapi.c" />
<ClCompile Include="SDL\src\events\SDL_categories.c" />
<ClCompile Include="SDL\src\events\SDL_clipboardevents.c" />
<ClCompile Include="SDL\src\events\SDL_displayevents.c" />
<ClCompile Include="SDL\src\events\SDL_dropevents.c" />
<ClCompile Include="SDL\src\events\SDL_events.c" />
<ClCompile Include="SDL\src\events\SDL_gesture.c" />
<ClCompile Include="SDL\src\events\SDL_eventwatch.c" />
<ClCompile Include="SDL\src\events\SDL_keyboard.c" />
<ClCompile Include="SDL\src\events\SDL_keymap.c" />
<ClCompile Include="SDL\src\events\SDL_mouse.c" />
<ClCompile Include="SDL\src\events\SDL_pen.c" />
<ClCompile Include="SDL\src\events\SDL_quit.c" />
<ClCompile Include="SDL\src\events\SDL_touch.c" />
<ClCompile Include="SDL\src\events\SDL_windowevents.c" />
<ClCompile Include="SDL\src\file\SDL_rwops.c" />
<ClCompile Include="SDL\src\io\SDL_iostream.c" />
<ClCompile Include="SDL\src\filesystem\windows\SDL_sysfilesystem.c" />
<ClCompile Include="SDL\src\haptic\dummy\SDL_syshaptic.c" />
<ClCompile Include="SDL\src\haptic\SDL_haptic.c" />
<ClCompile Include="SDL\src\haptic\windows\SDL_dinputhaptic.c" />
<ClCompile Include="SDL\src\haptic\windows\SDL_windowshaptic.c" />
<ClCompile Include="SDL\src\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="SDL\src\hidapi\SDL_hidapi.c" />
<ClCompile Include="SDL\src\joystick\controller_type.c" />
<ClCompile Include="SDL\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="SDL\src\joystick\gdk\SDL_gameinputjoystick.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapijoystick.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_combined.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_luna.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps3.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps4.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps5.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_rumble.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_shield.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_stadia.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steam.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steam_hori.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steamdeck.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_switch.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_wii.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
<ClCompile Include="SDL\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="SDL\src\joystick\SDL_gamepad.c" />
<ClCompile Include="SDL\src\joystick\SDL_joystick.c" />
<ClCompile Include="SDL\src\joystick\SDL_steam_virtual_gamepad.c" />
<ClCompile Include="SDL\src\joystick\virtual\SDL_virtualjoystick.c" />
<ClCompile Include="SDL\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="SDL\src\joystick\windows\SDL_rawinputjoystick.c" />
<ClCompile Include="SDL\src\joystick\windows\SDL_windowsjoystick.c" />
<ClCompile Include="SDL\src\joystick\windows\SDL_windows_gaming_input.c" />
<ClCompile Include="SDL\src\joystick\windows\SDL_xinputjoystick.c" />
<ClCompile Include="SDL\src\libm\e_atan2.c" />
<ClCompile Include="SDL\src\libm\e_exp.c" />
<ClCompile Include="SDL\src\libm\e_fmod.c" />
<ClCompile Include="SDL\src\libm\e_log.c" />
<ClCompile Include="SDL\src\libm\e_log10.c" />
<ClCompile Include="SDL\src\libm\e_pow.c" />
<ClCompile Include="SDL\src\libm\e_rem_pio2.c" />
<ClCompile Include="SDL\src\libm\e_sqrt.c" />
<ClCompile Include="SDL\src\libm\k_cos.c" />
<ClCompile Include="SDL\src\libm\k_rem_pio2.c" />
<ClCompile Include="SDL\src\libm\k_sin.c" />
<ClCompile Include="SDL\src\libm\k_tan.c" />
<ClCompile Include="SDL\src\libm\s_atan.c" />
<ClCompile Include="SDL\src\libm\s_copysign.c" />
<ClCompile Include="SDL\src\libm\s_cos.c" />
<ClCompile Include="SDL\src\libm\s_fabs.c" />
<ClCompile Include="SDL\src\libm\s_floor.c" />
<ClCompile Include="SDL\src\libm\s_scalbn.c" />
<ClCompile Include="SDL\src\libm\s_sin.c" />
<ClCompile Include="SDL\src\libm\s_tan.c" />
<ClCompile Include="SDL\src\libm\s_modf.c" />
<ClCompile Include="SDL\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="SDL\src\locale\SDL_locale.c" />
<ClCompile Include="SDL\src\locale\windows\SDL_syslocale.c" />
@@ -351,18 +369,24 @@
<ClCompile Include="SDL\src\misc\windows\SDL_sysurl.c" />
<ClCompile Include="SDL\src\power\SDL_power.c" />
<ClCompile Include="SDL\src\power\windows\SDL_syspower.c" />
<ClCompile Include="SDL\src\process\SDL_process.c" />
<ClCompile Include="SDL\src\process\windows\SDL_windowsprocess.c" />
<ClCompile Include="SDL\src\render\direct3d11\SDL_shaders_d3d11.c" />
<ClCompile Include="SDL\src\render\direct3d12\SDL_render_d3d12.c" />
<ClCompile Include="SDL\src\render\direct3d12\SDL_shaders_d3d12.c" />
<ClCompile Include="SDL\src\render\direct3d\SDL_render_d3d.c" />
<ClCompile Include="SDL\src\render\direct3d11\SDL_render_d3d11.c" />
<ClCompile Include="SDL\src\render\direct3d\SDL_shaders_d3d.c" />
<ClCompile Include="SDL\src\render\gpu\SDL_pipeline_gpu.c" />
<ClCompile Include="SDL\src\render\gpu\SDL_render_gpu.c" />
<ClCompile Include="SDL\src\render\gpu\SDL_shaders_gpu.c" />
<ClCompile Include="SDL\src\render\opengl\SDL_render_gl.c" />
<ClCompile Include="SDL\src\render\opengl\SDL_shaders_gl.c" />
<ClCompile Include="SDL\src\render\opengles2\SDL_render_gles2.c" />
<ClCompile Include="SDL\src\render\opengles2\SDL_shaders_gles2.c" />
<ClCompile Include="SDL\src\render\SDL_d3dmath.c" />
<ClCompile Include="SDL\src\render\SDL_render.c" />
<ClCompile Include="SDL\src\render\SDL_render_unsupported.c" />
<ClCompile Include="SDL\src\render\SDL_yuv_sw.c" />
<ClCompile Include="SDL\src\render\software\SDL_blendfillrect.c" />
<ClCompile Include="SDL\src\render\software\SDL_blendline.c" />
@@ -374,11 +398,12 @@
<ClCompile Include="SDL\src\render\software\SDL_triangle.c" />
<ClCompile Include="SDL\src\SDL.c" />
<ClCompile Include="SDL\src\SDL_assert.c" />
<ClCompile Include="SDL\src\SDL_dataqueue.c" />
<ClCompile Include="SDL\src\SDL_list.c" />
<ClCompile Include="SDL\src\SDL_error.c" />
<ClCompile Include="SDL\src\SDL_hashtable.c" />
<ClCompile Include="SDL\src\SDL_hints.c" />
<ClCompile Include="SDL\src\SDL_list.c" />
<ClCompile Include="SDL\src\SDL_log.c" />
<ClCompile Include="SDL\src\SDL_properties.c" />
<ClCompile Include="SDL\src\SDL_utils.c" />
<ClCompile Include="SDL\src\sensor\dummy\SDL_dummysensor.c" />
<ClCompile Include="SDL\src\sensor\SDL_sensor.c" />
@@ -388,23 +413,43 @@
<ClCompile Include="SDL\src\stdlib\SDL_getenv.c" />
<ClCompile Include="SDL\src\stdlib\SDL_iconv.c" />
<ClCompile Include="SDL\src\stdlib\SDL_malloc.c" />
<ClCompile Include="SDL\src\stdlib\SDL_memcpy.c" />
<ClCompile Include="SDL\src\stdlib\SDL_memmove.c" />
<ClCompile Include="SDL\src\stdlib\SDL_memset.c" />
<ClCompile Include="SDL\src\stdlib\SDL_mslibc.c" />
<ClCompile Include="SDL\src\stdlib\SDL_murmur3.c" />
<ClCompile Include="SDL\src\stdlib\SDL_qsort.c" />
<ClCompile Include="SDL\src\stdlib\SDL_random.c" />
<ClCompile Include="SDL\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="SDL\src\stdlib\SDL_string.c" />
<ClCompile Include="SDL\src\stdlib\SDL_strtokr.c" />
<ClCompile Include="SDL\src\storage\generic\SDL_genericstorage.c" />
<ClCompile Include="SDL\src\storage\steam\SDL_steamstorage.c" />
<ClCompile Include="SDL\src\storage\SDL_storage.c" />
<ClCompile Include="SDL\src\thread\generic\SDL_syscond.c" />
<ClCompile Include="SDL\src\thread\generic\SDL_sysrwlock.c" />
<ClCompile Include="SDL\src\thread\SDL_thread.c" />
<ClCompile Include="SDL\src\thread\windows\SDL_syscond_cv.c" />
<ClCompile Include="SDL\src\thread\windows\SDL_sysmutex.c" />
<ClCompile Include="SDL\src\thread\windows\SDL_sysrwlock_srw.c" />
<ClCompile Include="SDL\src\thread\windows\SDL_syssem.c" />
<ClCompile Include="SDL\src\thread\windows\SDL_systhread.c" />
<ClCompile Include="SDL\src\thread\windows\SDL_systls.c" />
<ClCompile Include="SDL\src\timer\SDL_timer.c" />
<ClCompile Include="SDL\src\timer\windows\SDL_systimer.c" />
<ClCompile Include="SDL\src\time\SDL_time.c" />
<ClCompile Include="SDL\src\time\windows\SDL_systime.c" />
<ClCompile Include="SDL\src\tray\windows\SDL_tray.c" />
<ClCompile Include="SDL\src\tray\SDL_tray_utils.c" />
<ClCompile Include="SDL\src\video\dummy\SDL_nullevents.c" />
<ClCompile Include="SDL\src\video\dummy\SDL_nullframebuffer.c" />
<ClCompile Include="SDL\src\video\dummy\SDL_nullvideo.c" />
<ClCompile Include="SDL\src\video\offscreen\SDL_offscreenevents.c" />
<ClCompile Include="SDL\src\video\offscreen\SDL_offscreenframebuffer.c" />
<ClCompile Include="SDL\src\video\offscreen\SDL_offscreenopengles.c" />
<ClCompile Include="SDL\src\video\offscreen\SDL_offscreenvideo.c" />
<ClCompile Include="SDL\src\video\offscreen\SDL_offscreenvulkan.c" />
<ClCompile Include="SDL\src\video\offscreen\SDL_offscreenwindow.c" />
<ClCompile Include="SDL\src\video\SDL_blit.c" />
<ClCompile Include="SDL\src\video\SDL_blit_0.c" />
<ClCompile Include="SDL\src\video\SDL_blit_1.c" />
@@ -420,25 +465,35 @@
<ClCompile Include="SDL\src\video\SDL_pixels.c" />
<ClCompile Include="SDL\src\video\SDL_rect.c" />
<ClCompile Include="SDL\src\video\SDL_RLEaccel.c" />
<ClCompile Include="SDL\src\video\SDL_shape.c" />
<ClCompile Include="SDL\src\video\SDL_stb.c" />
<ClCompile Include="SDL\src\video\SDL_stretch.c" />
<ClCompile Include="SDL\src\video\SDL_surface.c" />
<ClCompile Include="SDL\src\video\SDL_video.c" />
<ClCompile Include="SDL\src\video\SDL_video_unsupported.c" />
<ClCompile Include="SDL\src\video\SDL_vulkan_utils.c" />
<ClCompile Include="SDL\src\video\SDL_yuv.c" />
<ClCompile Include="SDL\src\video\windows\SDL_surface_utils.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsclipboard.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsevents.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsframebuffer.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowskeyboard.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsgameinput.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsmessagebox.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsmodes.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsmouse.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsopengl.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsopengles.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsrawinput.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsshape.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsvideo.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowsvulkan.c" />
<ClCompile Include="SDL\src\video\windows\SDL_windowswindow.c" />
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_lsx.c" />
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_sse.c" />
<ClCompile Include="SDL\src\video\yuv2rgb\yuv_rgb_std.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="SDL\src\core\windows\version.rc" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA}</ProjectGuid>
@@ -467,13 +522,18 @@
<Import Project="$(SolutionDir)\buildfiles\msvc\rpcs3_release.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IncludePath>SDL\src;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<SDLCheck>false</SDLCheck>
<AdditionalIncludeDirectories>SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>SDL\include;SDL\include\build_config;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ProgramDatabase</DebugInformationFormat>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">SDL_HIDAPI_DISABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">SDL_HIDAPI_DISABLED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+1575 -416
View File
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -77,7 +77,7 @@ int main()
elseif (UNIX)
# Unix is for all *NIX systems including OSX
add_compile_definitions(PLATFORM_POSIX=1 HAVE_CLOCK_GETTIME)
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR ANDROID)
set(OS_LINUX 1)
set(PLATFORM_SRC
@@ -87,7 +87,9 @@ elseif (UNIX)
events_posix.c
)
list(APPEND LIBUSB_LIBRARIES rt)
if(NOT ANDROID)
list(APPEND LIBUSB_LIBRARIES rt)
endif()
endif()
endif()
+11 -1
View File
@@ -5,7 +5,17 @@ if(WITH_LLVM)
if(BUILD_LLVM)
message(STATUS "LLVM will be built from the submodule.")
set(LLVM_TARGETS_TO_BUILD "AArch64;X86" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
if (ANDROID)
if (COMPILER_ARM)
set(LLVM_TARGETS_TO_BUILD "AArch64" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
set(LLVM_TARGET_ARCH "${CMAKE_SYSTEM_PROCESSOR}-none-linux-android${ANDROID_NATIVE_API_LEVEL}" CACHE STRING "")
else()
set(LLVM_TARGETS_TO_BUILD "X86" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
endif()
else()
set(LLVM_TARGETS_TO_BUILD "AArch64;X86" CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
endif()
option(LLVM_BUILD_RUNTIME "Build the LLVM runtime libraries." OFF)
option(LLVM_BUILD_TOOLS "Build the LLVM tools. If OFF, just generate build targets." OFF)
option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." OFF)
+19 -17
View File
@@ -19,38 +19,38 @@ 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.8.2](https://www.qt.io/download-qt-installer) In case you can't download from the official installer, you can use [Another Qt installer](https://github.com/miurahr/aqtinstall) (In that case you will need to manually add the "qtmultimedia" module when installing Qt)
- [Qt 6.8.3](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.
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.8.2\msvc2022_64\`
- add and set the `QTDIR` environment variable, e.g. `<QtInstallFolder>\6.8.3\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.8.2\msvc2022_64\`
- add and set the `Qt6_ROOT` environment variable to the **Qt** libs path, e.g. `<QtInstallFolder>\6.8.3\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.8.2](https://www.qt.io/download-qt-installer)
- [Qt 6.8.3](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.
- [SDL2](https://github.com/libsdl-org/SDL/releases) (for the FAudio backend)
- [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.**
#### Arch Linux
sudo pacman -S glew openal cmake vulkan-validation-layers qt6-base qt6-declarative qt6-multimedia qt6-svg sdl2 sndio jack2 base-devel
sudo pacman -S glew openal cmake ninja vulkan-validation-layers qt6-base qt6-declarative qt6-multimedia qt6-svg sdl3 sndio jack2 base-devel
#### Debian & Ubuntu
sudo apt-get install build-essential libasound2-dev libpulse-dev libopenal-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git libevdev-dev libsdl2-2.0 libsdl2-dev libjack-dev libsndio-dev
sudo apt-get install build-essential ninja-build libasound2-dev libpulse-dev libopenal-dev libglew-dev zlib1g-dev libedit-dev libvulkan-dev libudev-dev git libevdev-dev libsdl3-3.2 libsdl3-dev libjack-dev libsndio-dev
Ubuntu is usually horrendously out of date, and some packages need to be downloaded by hand. This part is for Qt, GCC, Vulkan, and CMake
@@ -67,7 +67,7 @@ sudo apt-get update
sudo apt-get install gcc-13 g++-13
```
You can either use `update-alternatives` to setup `gcc-13`/`g++-13` as your default compilers or prefix any `cmake` command by `CXX=g++-13 CC=gcc-13 ` to use it.
You can either use `update-alternatives` to setup `gcc-13`/`g++-13` as your default compilers or prefix the `cmake` build file generation command by `CXX=g++-13 CC=gcc-13` to use it.
##### Vulkan SDK
@@ -94,19 +94,21 @@ sudo apt-get install cmake
#### Fedora
sudo dnf install alsa-lib-devel cmake glew glew-devel libatomic libevdev-devel libudev-devel openal-devel qt6-qtbase-devel qt6-qtbase-private-devel vulkan-devel pipewire-jack-audio-connection-kit-devel qt6-qtmultimedia-devel qt6-qtsvg-devel
sudo dnf install alsa-lib-devel cmake ninja-build glew glew-devel libatomic libevdev-devel libudev-devel openal-devel qt6-qtbase-devel qt6-qtbase-private-devel vulkan-devel pipewire-jack-audio-connection-kit-devel qt6-qtmultimedia-devel qt6-qtsvg-devel llvm-devel
#### OpenSUSE
sudo zypper install git cmake libasound2 libpulse-devel openal-soft-devel glew-devel zlib-devel libedit-devel vulkan-devel libudev-devel libqt6-qtbase-devel libqt6-qtmultimedia-devel libqt6-qtsvg-devel libQt6Gui-private-headers-devel libevdev-devel libsndio7_1 libjack-devel
sudo zypper install git cmake ninja libasound2 libpulse-devel openal-soft-devel glew-devel zlib-devel libedit-devel vulkan-devel libudev-devel libqt6-qtbase-devel libqt6-qtmultimedia-devel libqt6-qtsvg-devel libQt6Gui-private-headers-devel libevdev-devel libsndio7_1 libjack-devel
## Setup the project
Clone and initialize the repository
```
git clone https://github.com/RPCS3/rpcs3.git
```bash
git clone --recurse-submodules https://github.com/RPCS3/rpcs3.git
cd rpcs3
# This is automatically done by `git clone --recurse-submodules`,
# but in case you forgot it, you can manually fetch submodules this way:
git submodule update --init
```
@@ -119,7 +121,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.8.2\msvc2022_64`, version will fill in automatically
2) add the path to your Qt installation with compiler e.g. `<QtInstallFolder>\6.8.3\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**)
@@ -181,11 +183,11 @@ In case you preferred to install and use the standalone **CMake** tool:
While still in the project root:
1) `cd .. && mkdir --parents rpcs3_build && cd rpcs3_build`
2) `cmake ../rpcs3/ && make` or `CXX=g++-13 CC=gcc-13 cmake ../rpcs3/ && make` to force these compilers
3) run RPCS3 with `./bin/rpcs3`
1) `cmake -B build -G Ninja` to generate build files with the default compiler (override the compiler by prepending e.g. `CC=clang CXX=clang++`)
2) `cmake --build build` to compile
3) run RPCS3 with `build/bin/rpcs3`
If compiling for ARM, pass the flag `-DUSE_NATIVE_INSTRUCTIONS=OFF` to the cmake command. This resolves some Neon errors when compiling our SIMD headers.
If compiling for ARM, pass the flag `-DUSE_NATIVE_INSTRUCTIONS=OFF` to the first `cmake` command. This resolves some NEON errors when compiling our SIMD headers.
When using GDB, configure it to ignore SIGSEGV signal (`handle SIGSEGV nostop noprint`).
If desired, use the various build options in [CMakeLists](https://github.com/RPCS3/rpcs3/blob/master/CMakeLists.txt).
+1
View File
@@ -30,6 +30,7 @@ option(USE_SYSTEM_FFMPEG "Prefer system ffmpeg instead of the prebuild one" OFF)
option(USE_SYSTEM_OPENAL "Prefer system OpenAL instead of the prebuild one" ON)
option(USE_SYSTEM_CURL "Prefer system Curl instead of the prebuild one" ON)
option(USE_SYSTEM_OPENCV "Prefer system OpenCV instead of the builtin one" ON)
option(HAS_MEMORY_BREAKPOINTS "Add support for memory breakpoints to the interpreter" OFF)
option(USE_LTO "Use LTO for building" ON)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/buildfiles/cmake")
+3 -2
View File
@@ -1,8 +1,9 @@
RPCS3
=====
[![Azure Build Status](https://dev.azure.com/nekotekina/nekotekina/_apis/build/status/RPCS3.rpcs3?branchName=master)](https://dev.azure.com/nekotekina/nekotekina/_build?definitionId=4&branchName=master)
[![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/RPCS3/rpcs3?label=Cirrus%20CI&logo=cirrus-ci)](https://cirrus-ci.com/github/RPCS3/rpcs3)
[![Azure Build Status](https://dev.azure.com/nekotekina/nekotekina/_apis/build/status/RPCS3.rpcs3?branchName=master)](https://dev.azure.com/nekotekina/nekotekina/_build?definitionId=8&_a=summary&repositoryFilter=4)
[![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/RPCS3/rpcs3/master?label=Cirrus%20CI&logo=cirrus-ci)](https://cirrus-ci.com/github/RPCS3/rpcs3)
[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/RPCS3/rpcs3/rpcs3.yml?branch=master&logo=github&label=Actions)](https://github.com/RPCS3/rpcs3/actions/workflows/rpcs3.yml)
[![RPCS3 Discord Server](https://img.shields.io/discord/272035812277878785?color=5865F2&label=RPCS3%20Discord&logo=discord&logoColor=white)](https://discord.me/rpcs3)
The world's first free and open-source PlayStation 3 emulator/debugger, written in C++ for Windows, Linux, macOS and FreeBSD.
+13
View File
@@ -337,6 +337,18 @@ void cfg::encode(YAML::Emitter& out, const cfg::_base& rhs)
out << YAML::EndMap;
return;
}
case type::node_map:
{
//out << YAML::Block; // Does nothing, output is in Flow mode still (TODO)
out << YAML::BeginMap;
for (const auto& np : static_cast<const node_map_entry&>(rhs).get_map())
{
out << YAML::Key << np.first;
out << YAML::Value << fmt::format("%s", np.second);
}
out << YAML::EndMap;
return;
}
case type::log:
{
out << YAML::BeginMap;
@@ -417,6 +429,7 @@ void cfg::decode(const YAML::Node& data, cfg::_base& rhs, bool dynamic)
break;
}
case type::map:
case type::node_map:
{
if (!data.IsMap())
{
+14 -19
View File
@@ -41,6 +41,7 @@ namespace cfg
string, // cfg::string type
set, // cfg::set_entry type
map, // cfg::map_entry type
node_map, // cfg::node_map_entry type
log, // cfg::log_entry type
device, // cfg::device_entry type
};
@@ -542,7 +543,7 @@ namespace cfg
std::string def;
string(node* owner, std::string name, std::string def = {}, bool dynamic = false)
: _base(type::string, owner, name, dynamic)
: _base(type::string, owner, std::move(name), dynamic)
, m_value(def)
, def(std::move(def))
{
@@ -553,21 +554,6 @@ namespace cfg
return *m_value.load().get();
}
std::pair<const std::string&, shared_ptr<std::string>> get() const
{
auto v = m_value.load();
if (auto s = v.get())
{
return {*s, std::move(v)};
}
else
{
static const std::string _empty;
return {_empty, {}};
}
}
void from_default() override;
std::string to_string() const override
@@ -627,13 +613,13 @@ namespace cfg
template<typename T>
using map_of_type = std::map<std::string, T, std::less<>>;
class map_entry final : public _base
class map_entry : public _base
{
map_of_type<std::string> m_map{};
public:
map_entry(node* owner, const std::string& name)
: _base(type::map, owner, name, true)
map_entry(node* owner, const std::string& name, type _type = type::map)
: _base(_type, owner, name, true)
{
}
@@ -652,6 +638,15 @@ namespace cfg
void from_default() override;
};
class node_map_entry final : public map_entry
{
public:
node_map_entry(node* owner, const std::string& name)
: map_entry(owner, name, type::node_map)
{
}
};
class log_entry final : public _base
{
map_of_type<logs::level> m_map{};
+431 -376
View File
@@ -14,6 +14,12 @@
using namespace std::literals::string_literals;
#ifdef ANDROID
std::string g_android_executable_dir;
std::string g_android_config_dir;
std::string g_android_cache_dir;
#endif
#ifdef _WIN32
#include "Utilities/StrUtil.h"
@@ -387,6 +393,399 @@ namespace fs
g_tls_error = error::readonly;
return false;
}
#ifdef _WIN32
class windows_file final : public file_base
{
HANDLE m_handle;
atomic_t<u64> m_pos;
public:
windows_file(HANDLE handle)
: m_handle(handle)
, m_pos(0)
{
}
~windows_file() override
{
if (m_handle != nullptr)
{
CloseHandle(m_handle);
}
}
stat_t get_stat() override
{
FILE_BASIC_INFO basic_info;
ensure(GetFileInformationByHandleEx(m_handle, FileBasicInfo, &basic_info, sizeof(FILE_BASIC_INFO))); // "file::stat"
stat_t info;
info.is_directory = (basic_info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
info.is_writable = (basic_info.FileAttributes & FILE_ATTRIBUTE_READONLY) == 0;
info.size = this->size();
info.atime = to_time(basic_info.LastAccessTime);
info.mtime = to_time(basic_info.LastWriteTime);
info.ctime = info.mtime;
if (info.atime < info.mtime)
info.atime = info.mtime;
return info;
}
void sync() override
{
ensure(FlushFileBuffers(m_handle)); // "file::sync"
}
bool trunc(u64 length) override
{
FILE_END_OF_FILE_INFO _eof;
_eof.EndOfFile.QuadPart = length;
if (!SetFileInformationByHandle(m_handle, FileEndOfFileInfo, &_eof, sizeof(_eof)))
{
g_tls_error = to_error(GetLastError());
return false;
}
return true;
}
u64 read(void* buffer, u64 count) override
{
u64 nread_sum = 0;
for (char* data = static_cast<char*>(buffer); count;)
{
const DWORD size = static_cast<DWORD>(std::min<u64>(count, DWORD{umax} & -4096));
DWORD nread = 0;
OVERLAPPED ovl{};
const u64 pos = m_pos;
ovl.Offset = DWORD(pos);
ovl.OffsetHigh = DWORD(pos >> 32);
ensure(ReadFile(m_handle, data, size, &nread, &ovl) || GetLastError() == ERROR_HANDLE_EOF); // "file::read"
nread_sum += nread;
m_pos += nread;
if (nread < size)
{
break;
}
count -= size;
data += size;
}
return nread_sum;
}
u64 read_at(u64 offset, void* buffer, u64 count) override
{
u64 nread_sum = 0;
for (char* data = static_cast<char*>(buffer); count;)
{
const DWORD size = static_cast<DWORD>(std::min<u64>(count, DWORD{umax} & -4096));
DWORD nread = 0;
OVERLAPPED ovl{};
ovl.Offset = DWORD(offset);
ovl.OffsetHigh = DWORD(offset >> 32);
ensure(ReadFile(m_handle, data, size, &nread, &ovl) || GetLastError() == ERROR_HANDLE_EOF); // "file::read"
nread_sum += nread;
if (nread < size)
{
break;
}
count -= size;
data += size;
offset += size;
}
return nread_sum;
}
u64 write(const void* buffer, u64 count) override
{
u64 nwritten_sum = 0;
for (const char* data = static_cast<const char*>(buffer); count;)
{
const DWORD size = static_cast<DWORD>(std::min<u64>(count, DWORD{umax} & -4096));
DWORD nwritten = 0;
OVERLAPPED ovl{};
const u64 pos = m_pos.fetch_add(size);
ovl.Offset = DWORD(pos);
ovl.OffsetHigh = DWORD(pos >> 32);
ensure(WriteFile(m_handle, data, size, &nwritten, &ovl)); // "file::write"
ensure(nwritten == size);
nwritten_sum += nwritten;
if (nwritten < size)
{
break;
}
count -= size;
data += size;
}
return nwritten_sum;
}
u64 seek(s64 offset, seek_mode whence) override
{
if (whence > seek_end)
{
fmt::throw_exception("Invalid whence (0x%x)", whence);
}
const s64 new_pos =
whence == fs::seek_set ? offset :
whence == fs::seek_cur ? offset + m_pos :
whence == fs::seek_end ? offset + size() : -1;
if (new_pos < 0)
{
fs::g_tls_error = fs::error::inval;
return -1;
}
m_pos = new_pos;
return m_pos;
}
u64 size() override
{
LARGE_INTEGER size;
ensure(GetFileSizeEx(m_handle, &size)); // "file::size"
return size.QuadPart;
}
native_handle get_handle() override
{
return m_handle;
}
file_id get_id() override
{
file_id id{"windows_file"};
id.data.resize(sizeof(FILE_ID_INFO));
FILE_ID_INFO info;
if (!GetFileInformationByHandleEx(m_handle, FileIdInfo, &info, sizeof(info)))
{
// Try GetFileInformationByHandle as a fallback
BY_HANDLE_FILE_INFORMATION info2;
ensure(GetFileInformationByHandle(m_handle, &info2));
info = {};
info.VolumeSerialNumber = info2.dwVolumeSerialNumber;
std::memcpy(&info.FileId, &info2.nFileIndexHigh, 8);
}
std::memcpy(id.data.data(), &info, sizeof(info));
return id;
}
void release() override
{
m_handle = nullptr;
}
};
#else
class unix_file final : public file_base
{
int m_fd;
public:
unix_file(int fd)
: m_fd(fd)
{
}
~unix_file() override
{
if (m_fd >= 0)
{
::close(m_fd);
}
}
stat_t get_stat() override
{
struct ::stat file_info;
ensure(::fstat(m_fd, &file_info) == 0); // "file::stat"
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.atime = file_info.st_atime;
info.mtime = file_info.st_mtime;
info.ctime = info.mtime;
if (info.atime < info.mtime)
info.atime = info.mtime;
return info;
}
void sync() override
{
ensure(::fsync(m_fd) == 0); // "file::sync"
}
bool trunc(u64 length) override
{
if (::ftruncate(m_fd, length) != 0)
{
g_tls_error = to_error(errno);
return false;
}
return true;
}
u64 read(void* buffer, u64 count) override
{
u64 result = 0;
// Loop because (huge?) read can be processed partially
while (auto r = ::read(m_fd, buffer, count))
{
ensure(r > 0); // "file::read"
count -= r;
result += r;
buffer = static_cast<u8*>(buffer) + r;
if (!count)
break;
}
return result;
}
u64 read_at(u64 offset, void* buffer, u64 count) override
{
u64 result = 0;
// For safety; see read()
while (auto r = ::pread(m_fd, buffer, count, offset))
{
ensure(r > 0); // "file::read_at"
count -= r;
offset += r;
result += r;
buffer = static_cast<u8*>(buffer) + r;
if (!count)
break;
}
return result;
}
u64 write(const void* buffer, u64 count) override
{
u64 result = 0;
// For safety; see read()
while (auto r = ::write(m_fd, buffer, count))
{
ensure(r > 0); // "file::write"
count -= r;
result += r;
buffer = static_cast<const u8*>(buffer) + r;
if (!count)
break;
}
return result;
}
u64 seek(s64 offset, seek_mode whence) override
{
if (whence > seek_end)
{
fmt::throw_exception("Invalid whence (0x%x)", whence);
}
const int mode =
whence == seek_set ? SEEK_SET :
whence == seek_cur ? SEEK_CUR : SEEK_END;
const auto result = ::lseek(m_fd, offset, mode);
if (result == -1)
{
g_tls_error = to_error(errno);
return -1;
}
return result;
}
u64 size() override
{
struct ::stat file_info;
ensure(::fstat(m_fd, &file_info) == 0); // "file::size"
return file_info.st_size;
}
native_handle get_handle() override
{
return m_fd;
}
file_id get_id() override
{
struct ::stat file_info;
ensure(::fstat(m_fd, &file_info) == 0); // "file::get_id"
file_id id{"unix_file"};
id.data.resize(sizeof(file_info.st_dev) + sizeof(file_info.st_ino));
std::memcpy(id.data.data(), &file_info.st_dev, sizeof(file_info.st_dev));
std::memcpy(id.data.data() + sizeof(file_info.st_dev), &file_info.st_ino, sizeof(file_info.st_ino));
return id;
}
u64 write_gather(const iovec_clone* buffers, u64 buf_count) override
{
static_assert(sizeof(iovec) == sizeof(iovec_clone), "Weird iovec size");
static_assert(offsetof(iovec, iov_len) == offsetof(iovec_clone, iov_len), "Weird iovec::iov_len offset");
u64 result = 0;
while (buf_count)
{
iovec arg[256];
const auto count = std::min<u64>(buf_count, 256);
std::memcpy(&arg, buffers, sizeof(iovec) * count);
const auto added = ::writev(m_fd, arg, count);
ensure(added != -1); // "file::write_gather"
result += added;
buf_count -= count;
buffers += count;
}
return result;
}
void release() override
{
m_fd = -1;
}
};
#endif
}
shared_ptr<fs::device_base> fs::device_manager::get_device(const std::string& path)
@@ -1241,205 +1640,6 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
return;
}
class windows_file final : public file_base
{
const HANDLE m_handle;
atomic_t<u64> m_pos;
public:
windows_file(HANDLE handle)
: m_handle(handle)
, m_pos(0)
{
}
~windows_file() override
{
CloseHandle(m_handle);
}
stat_t get_stat() override
{
FILE_BASIC_INFO basic_info;
ensure(GetFileInformationByHandleEx(m_handle, FileBasicInfo, &basic_info, sizeof(FILE_BASIC_INFO))); // "file::stat"
stat_t info;
info.is_directory = (basic_info.FileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
info.is_writable = (basic_info.FileAttributes & FILE_ATTRIBUTE_READONLY) == 0;
info.size = this->size();
info.atime = to_time(basic_info.LastAccessTime);
info.mtime = to_time(basic_info.LastWriteTime);
info.ctime = info.mtime;
if (info.atime < info.mtime)
info.atime = info.mtime;
return info;
}
void sync() override
{
ensure(FlushFileBuffers(m_handle)); // "file::sync"
}
bool trunc(u64 length) override
{
FILE_END_OF_FILE_INFO _eof;
_eof.EndOfFile.QuadPart = length;
if (!SetFileInformationByHandle(m_handle, FileEndOfFileInfo, &_eof, sizeof(_eof)))
{
g_tls_error = to_error(GetLastError());
return false;
}
return true;
}
u64 read(void* buffer, u64 count) override
{
u64 nread_sum = 0;
for (char* data = static_cast<char*>(buffer); count;)
{
const DWORD size = static_cast<DWORD>(std::min<u64>(count, DWORD{umax} & -4096));
DWORD nread = 0;
OVERLAPPED ovl{};
const u64 pos = m_pos;
ovl.Offset = DWORD(pos);
ovl.OffsetHigh = DWORD(pos >> 32);
ensure(ReadFile(m_handle, data, size, &nread, &ovl) || GetLastError() == ERROR_HANDLE_EOF); // "file::read"
nread_sum += nread;
m_pos += nread;
if (nread < size)
{
break;
}
count -= size;
data += size;
}
return nread_sum;
}
u64 read_at(u64 offset, void* buffer, u64 count) override
{
u64 nread_sum = 0;
for (char* data = static_cast<char*>(buffer); count;)
{
const DWORD size = static_cast<DWORD>(std::min<u64>(count, DWORD{umax} & -4096));
DWORD nread = 0;
OVERLAPPED ovl{};
ovl.Offset = DWORD(offset);
ovl.OffsetHigh = DWORD(offset >> 32);
ensure(ReadFile(m_handle, data, size, &nread, &ovl) || GetLastError() == ERROR_HANDLE_EOF); // "file::read"
nread_sum += nread;
if (nread < size)
{
break;
}
count -= size;
data += size;
offset += size;
}
return nread_sum;
}
u64 write(const void* buffer, u64 count) override
{
u64 nwritten_sum = 0;
for (const char* data = static_cast<const char*>(buffer); count;)
{
const DWORD size = static_cast<DWORD>(std::min<u64>(count, DWORD{umax} & -4096));
DWORD nwritten = 0;
OVERLAPPED ovl{};
const u64 pos = m_pos.fetch_add(size);
ovl.Offset = DWORD(pos);
ovl.OffsetHigh = DWORD(pos >> 32);
ensure(WriteFile(m_handle, data, size, &nwritten, &ovl)); // "file::write"
ensure(nwritten == size);
nwritten_sum += nwritten;
if (nwritten < size)
{
break;
}
count -= size;
data += size;
}
return nwritten_sum;
}
u64 seek(s64 offset, seek_mode whence) override
{
if (whence > seek_end)
{
fmt::throw_exception("Invalid whence (0x%x)", whence);
}
const s64 new_pos =
whence == fs::seek_set ? offset :
whence == fs::seek_cur ? offset + m_pos :
whence == fs::seek_end ? offset + size() : -1;
if (new_pos < 0)
{
fs::g_tls_error = fs::error::inval;
return -1;
}
m_pos = new_pos;
return m_pos;
}
u64 size() override
{
LARGE_INTEGER size;
ensure(GetFileSizeEx(m_handle, &size)); // "file::size"
return size.QuadPart;
}
native_handle get_handle() override
{
return m_handle;
}
file_id get_id() override
{
file_id id{"windows_file"};
id.data.resize(sizeof(FILE_ID_INFO));
FILE_ID_INFO info;
if (!GetFileInformationByHandleEx(m_handle, FileIdInfo, &info, sizeof(info)))
{
// Try GetFileInformationByHandle as a fallback
BY_HANDLE_FILE_INFORMATION info2;
ensure(GetFileInformationByHandle(m_handle, &info2));
info = {};
info.VolumeSerialNumber = info2.dwVolumeSerialNumber;
std::memcpy(&info.FileId, &info2.nFileIndexHigh, 8);
}
std::memcpy(id.data.data(), &info, sizeof(info));
return id;
}
};
m_file = std::make_unique<windows_file>(handle);
#else
int flags = O_CLOEXEC; // Ensures all files are closed on execl for auto updater
@@ -1490,182 +1690,6 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
ensure(::ftruncate(fd, 0) == 0);
}
class unix_file final : public file_base
{
const int m_fd;
public:
unix_file(int fd)
: m_fd(fd)
{
}
~unix_file() override
{
::close(m_fd);
}
stat_t get_stat() override
{
struct ::stat file_info;
ensure(::fstat(m_fd, &file_info) == 0); // "file::stat"
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.atime = file_info.st_atime;
info.mtime = file_info.st_mtime;
info.ctime = info.mtime;
if (info.atime < info.mtime)
info.atime = info.mtime;
return info;
}
void sync() override
{
ensure(::fsync(m_fd) == 0); // "file::sync"
}
bool trunc(u64 length) override
{
if (::ftruncate(m_fd, length) != 0)
{
g_tls_error = to_error(errno);
return false;
}
return true;
}
u64 read(void* buffer, u64 count) override
{
u64 result = 0;
// Loop because (huge?) read can be processed partially
while (auto r = ::read(m_fd, buffer, count))
{
ensure(r > 0); // "file::read"
count -= r;
result += r;
buffer = static_cast<u8*>(buffer) + r;
if (!count)
break;
}
return result;
}
u64 read_at(u64 offset, void* buffer, u64 count) override
{
u64 result = 0;
// For safety; see read()
while (auto r = ::pread(m_fd, buffer, count, offset))
{
ensure(r > 0); // "file::read_at"
count -= r;
offset += r;
result += r;
buffer = static_cast<u8*>(buffer) + r;
if (!count)
break;
}
return result;
}
u64 write(const void* buffer, u64 count) override
{
u64 result = 0;
// For safety; see read()
while (auto r = ::write(m_fd, buffer, count))
{
ensure(r > 0); // "file::write"
count -= r;
result += r;
buffer = static_cast<const u8*>(buffer) + r;
if (!count)
break;
}
return result;
}
u64 seek(s64 offset, seek_mode whence) override
{
if (whence > seek_end)
{
fmt::throw_exception("Invalid whence (0x%x)", whence);
}
const int mode =
whence == seek_set ? SEEK_SET :
whence == seek_cur ? SEEK_CUR : SEEK_END;
const auto result = ::lseek(m_fd, offset, mode);
if (result == -1)
{
g_tls_error = to_error(errno);
return -1;
}
return result;
}
u64 size() override
{
struct ::stat file_info;
ensure(::fstat(m_fd, &file_info) == 0); // "file::size"
return file_info.st_size;
}
native_handle get_handle() override
{
return m_fd;
}
file_id get_id() override
{
struct ::stat file_info;
ensure(::fstat(m_fd, &file_info) == 0); // "file::get_id"
file_id id{"unix_file"};
id.data.resize(sizeof(file_info.st_dev) + sizeof(file_info.st_ino));
std::memcpy(id.data.data(), &file_info.st_dev, sizeof(file_info.st_dev));
std::memcpy(id.data.data() + sizeof(file_info.st_dev), &file_info.st_ino, sizeof(file_info.st_ino));
return id;
}
u64 write_gather(const iovec_clone* buffers, u64 buf_count) override
{
static_assert(sizeof(iovec) == sizeof(iovec_clone), "Weird iovec size");
static_assert(offsetof(iovec, iov_len) == offsetof(iovec_clone, iov_len), "Weird iovec::iov_len offset");
u64 result = 0;
while (buf_count)
{
iovec arg[256];
const auto count = std::min<u64>(buf_count, 256);
std::memcpy(&arg, buffers, sizeof(iovec) * count);
const auto added = ::writev(m_fd, arg, count);
ensure(added != -1); // "file::write_gather"
result += added;
buf_count -= count;
buffers += count;
}
return result;
}
};
m_file = std::make_unique<unix_file>(fd);
if (mode & fs::isfile && !(mode & fs::write) && get_stat().is_directory)
@@ -1676,6 +1700,21 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
#endif
}
fs::file fs::file::from_native_handle(native_handle handle)
{
fs::file result;
#ifdef _WIN32
result.m_file = std::make_unique<windows_file>((const HANDLE)handle);
#else
result.m_file = std::make_unique<unix_file>(handle);
#endif
return result;
}
fs::file::file(const void* ptr, usz size)
{
class memory_stream : public file_base
@@ -1957,6 +1996,9 @@ bool fs::file::strict_read_check(u64 offset, u64 _size, u64 type_size) const
std::string fs::get_executable_path()
{
#ifdef ANDROID
return g_android_executable_dir + "/dummy-rpcs3.apk";
#else
// Use magic static
static const std::string s_exe_path = []
{
@@ -2002,10 +2044,14 @@ std::string fs::get_executable_path()
}();
return s_exe_path;
#endif
}
std::string fs::get_executable_dir()
{
#ifdef ANDROID
return g_android_executable_dir;
#else
// Use magic static
static const std::string s_exe_dir = []
{
@@ -2019,10 +2065,14 @@ std::string fs::get_executable_dir()
}();
return s_exe_dir;
#endif
}
const std::string& fs::get_config_dir([[maybe_unused]] bool get_config_subdirectory)
{
#ifdef ANDROID
return g_android_config_dir;
#else
// Use magic static
static const std::string s_dir = []
{
@@ -2112,10 +2162,14 @@ const std::string& fs::get_config_dir([[maybe_unused]] bool get_config_subdirect
#endif
return s_dir;
#endif
}
const std::string& fs::get_cache_dir()
{
#ifdef ANDROID
return g_android_cache_dir;
#else
static const std::string s_dir = []
{
std::string dir;
@@ -2150,6 +2204,7 @@ const std::string& fs::get_cache_dir()
}();
return s_dir;
#endif
}
const std::string& fs::get_log_dir()
@@ -2527,7 +2582,7 @@ bool fs::pending_file::commit(bool overwrite)
BY_HANDLE_FILE_INFORMATION file_info;
if (!GetFileInformationByHandle(file_handle, &file_info) || file_info.nNumberOfLinks == 1)
{
{
CloseHandle(file_handle);
break;
}
+14 -1
View File
@@ -114,6 +114,9 @@ namespace fs
virtual native_handle get_handle();
virtual file_id get_id();
virtual u64 write_gather(const iovec_clone* buffers, u64 buf_count);
virtual void release()
{
}
};
// Directory entry (TODO)
@@ -251,6 +254,8 @@ namespace fs
// Open file with specified mode
explicit file(const std::string& path, bs_t<open_mode> mode = ::fs::read);
static file from_native_handle(native_handle handle);
// Open memory for read
explicit file(const void* ptr, usz size);
@@ -280,9 +285,17 @@ namespace fs
m_file = std::move(ptr);
}
void release_handle()
{
if (m_file)
{
release()->release();
}
}
std::unique_ptr<file_base> release()
{
return std::move(m_file);
return std::exchange(m_file, nullptr);
}
// Change file size (possibly appending zero bytes)
+1 -1
View File
@@ -569,6 +569,6 @@ public:
bool add_sub_disk_space(ssz space);
};
llvm::StringRef fallback_cpu_detection();
const char *fallback_cpu_detection();
#endif // LLVM_AVAILABLE
+41 -18
View File
@@ -46,6 +46,10 @@ LOG_CHANNEL(jit_log, "JIT");
#pragma GCC diagnostic pop
#endif
#ifdef ARCH_ARM64
#include "Emu/CPU/Backends/AArch64/AArch64Common.h"
#endif
const bool jit_initialize = []() -> bool
{
llvm::InitializeNativeTarget();
@@ -409,7 +413,7 @@ public:
{
std::string name = m_path;
name.append(_module->getName().data());
name.append(_module->getName());
//fs::file(name, fs::rewrite).write(obj.getBufferStart(), obj.getBufferSize());
name.append(".gz");
@@ -421,9 +425,9 @@ public:
ensure(m_compiler);
fs::file module_file(name, fs::rewrite);
fs::pending_file module_file;
if (!module_file)
if (!module_file.open((name)))
{
jit_log.error("LLVM: Failed to create module file: %s (%s)", name, fs::g_tls_error);
return;
@@ -438,18 +442,17 @@ public:
return;
}
if (!zip(obj.getBufferStart(), obj.getBufferSize(), module_file))
if (!zip(obj.getBufferStart(), obj.getBufferSize(), module_file.file))
{
jit_log.error("LLVM: Failed to compress module: %s", _module->getName().data());
module_file.close();
fs::remove_file(name);
jit_log.error("LLVM: Failed to compress module: %s", std::string(_module->getName()));
return;
}
jit_log.trace("LLVM: Created module: %s", _module->getName().data());
jit_log.trace("LLVM: Created module: %s", std::string(_module->getName()));
// Restore space that was overestimated
ensure(m_compiler->add_sub_disk_space(max_size - module_file.size()));
ensure(m_compiler->add_sub_disk_space(max_size - module_file.file.size()));
module_file.commit();
}
static std::unique_ptr<llvm::MemoryBuffer> load(const std::string& path)
@@ -590,8 +593,10 @@ std::string jit_compiler::triple1()
return llvm::Triple::normalize(llvm::sys::getProcessTriple());
#elif defined(__APPLE__) && defined(ARCH_X64)
return llvm::Triple::normalize("x86_64-unknown-linux-gnu");
#elif defined(__APPLE__) && defined(ARCH_ARM64)
#elif (defined(__ANDROID__) || defined(__APPLE__)) && defined(ARCH_ARM64)
return llvm::Triple::normalize("aarch64-unknown-linux-android"); // Set environment to android to reserve x18
#elif defined(__ANDROID__) && defined(ARCH_X64)
return llvm::Triple::normalize("x86_64-unknown-linux-android");
#else
return llvm::Triple::normalize(llvm::sys::getProcessTriple());
#endif
@@ -605,8 +610,10 @@ std::string jit_compiler::triple2()
return llvm::Triple::normalize("aarch64-unknown-linux-gnu");
#elif defined(__APPLE__) && defined(ARCH_X64)
return llvm::Triple::normalize("x86_64-unknown-linux-gnu");
#elif defined(__APPLE__) && defined(ARCH_ARM64)
#elif (defined(__ANDROID__) || defined(__APPLE__)) && defined(ARCH_ARM64)
return llvm::Triple::normalize("aarch64-unknown-linux-android"); // Set environment to android to reserve x18
#elif defined(__ANDROID__) && defined(ARCH_X64)
return llvm::Triple::normalize("x86_64-unknown-linux-android"); // Set environment to android to reserve x18
#else
return llvm::Triple::normalize(llvm::sys::getProcessTriple());
#endif
@@ -768,7 +775,7 @@ bool jit_compiler::add(const std::string& path)
if (!cache)
{
jit_log.error("ObjectCache: Failed to read file. (path='%s', error=%s)", path, fs::g_tls_error);
return false;
return false;
}
if (auto object_file = llvm::object::ObjectFile::createObjectFile(*cache))
@@ -817,9 +824,9 @@ u64 jit_compiler::get(const std::string& name)
return m_engine->getGlobalValueAddress(name);
}
llvm::StringRef fallback_cpu_detection()
const char * fallback_cpu_detection()
{
#if defined (ARCH_X64)
#if defined(ARCH_X64)
// If we got here we either have a very old and outdated CPU or a new CPU that has not been seen by LLVM yet.
const std::string brand = utils::get_cpu_brand();
const auto family = utils::get_cpu_family();
@@ -849,11 +856,11 @@ llvm::StringRef fallback_cpu_detection()
// Return zen4 as a workaround until the next LLVM upgrade.
return "znver4";
default:
// Safest guesses
// Safest guesses
return utils::has_avx512() ? "znver4" :
utils::has_avx2() ? "znver1" :
utils::has_avx() ? "bdver1" :
"nehalem";
utils::has_avx2() ? "znver1" :
utils::has_avx() ? "bdver1" :
"nehalem";
}
}
else if (brand.find("Intel") != std::string::npos)
@@ -883,10 +890,26 @@ llvm::StringRef fallback_cpu_detection()
}
#elif defined(ARCH_ARM64)
#ifdef ANDROID
static std::string s_result = []() -> std::string
{
std::string result = aarch64::get_cpu_name();
if (result.empty())
{
return "cortex-a78";
}
std::transform(result.begin(), result.end(), result.begin(), ::tolower);
return result;
}();
return s_result.c_str();
#else
// TODO: Read the data from /proc/cpuinfo. ARM CPU registers are not accessible from usermode.
// This will be a pain when supporting snapdragon on windows but we'll cross that bridge when we get there.
// Require at least armv8-2a. Older chips are going to be useless anyway.
return "cortex-a78";
#endif
#endif
// Failed to guess, use generic fallback
+1 -1
View File
@@ -159,7 +159,7 @@ namespace fmt
std::string result;
bool first = true;
for (auto& v : sources)
for (const auto& v : sources)
{
if (first)
{
+17 -4
View File
@@ -1997,7 +1997,7 @@ static void signal_handler(int /*sig*/, siginfo_t* info, void* uct) noexcept
#else
const u32 insn = is_executing ? 0 : *reinterpret_cast<u32*>(RIP(context));
const bool is_writing =
const bool is_writing =
(insn & 0xbfff0000) == 0x0c000000 || // STR <Wt>, [<Xn>, #<imm>] (store word with immediate offset)
(insn & 0xbfe00000) == 0x0c800000 || // STP <Wt1>, <Wt2>, [<Xn>, #<imm>] (store pair of registers with immediate offset)
(insn & 0xbfdf0000) == 0x0d000000 || // STR <Wt>, [<Xn>, <Xm>] (store word with register offset)
@@ -2172,7 +2172,11 @@ void thread_base::start()
void thread_base::initialize(void (*error_cb)())
{
#ifndef _WIN32
#ifdef ANDROID
m_thread.release(pthread_self());
#else
m_thread.release(reinterpret_cast<u64>(pthread_self()));
#endif
#endif
// Initialize TLS variables
@@ -2617,6 +2621,8 @@ thread_base::~thread_base() noexcept
const HANDLE handle0 = reinterpret_cast<HANDLE>(m_thread.load());
WaitForSingleObject(handle0, INFINITE);
CloseHandle(handle0);
#elif defined(ANDROID)
pthread_join(m_thread.load(), nullptr);
#else
pthread_join(reinterpret_cast<pthread_t>(m_thread.load()), nullptr);
#endif
@@ -2691,7 +2697,12 @@ u64 thread_base::get_cycles()
#else
clockid_t _clock;
struct timespec thread_time;
if (!pthread_getcpuclockid(reinterpret_cast<pthread_t>(handle), &_clock) && !clock_gettime(_clock, &thread_time))
#ifdef ANDROID
pthread_t thread_id = handle;
#else
pthread_t thread_id = reinterpret_cast<pthread_t>(handle);
#endif
if (!pthread_getcpuclockid(thread_id, &_clock) && !clock_gettime(_clock, &thread_time))
{
cycles = static_cast<u64>(thread_time.tv_sec) * 1'000'000'000 + thread_time.tv_nsec;
#endif
@@ -3194,7 +3205,7 @@ void thread_ctrl::set_thread_affinity_mask(u64 mask)
thread_affinity_policy_data_t policy = { static_cast<integer_t>(std::countr_zero(mask)) };
thread_port_t mach_thread = pthread_mach_thread_np(pthread_self());
thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY, reinterpret_cast<thread_policy_t>(&policy), !mask ? 0 : 1);
#elif defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__)
#elif !defined(ANDROID) && (defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__))
if (!mask)
{
// Reset affinity mask
@@ -3246,7 +3257,7 @@ u64 thread_ctrl::get_thread_affinity_mask()
sig_log.error("Failed to get thread affinity mask.");
return 0;
#elif defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__)
#elif !defined(ANDROID) && (defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__))
cpu_set_t cs;
CPU_ZERO(&cs);
@@ -3313,6 +3324,8 @@ u64 thread_ctrl::get_tid()
{
#ifdef _WIN32
return GetCurrentThreadId();
#elif defined(ANDROID)
return static_cast<u64>(pthread_self());
#elif defined(__linux__)
return syscall(SYS_gettid);
#else
+3 -3
View File
@@ -15,12 +15,12 @@ namespace utils
*/
static inline u32 page_start(u32 addr)
{
return addr & ~(c_page_size - 1);
return addr & ~(get_page_size() - 1);
}
static inline u32 next_page(u32 addr)
{
return page_start(addr) + c_page_size;
return page_start(addr) + get_page_size();
}
static inline u32 page_end(u32 addr)
@@ -30,7 +30,7 @@ namespace utils
static inline u32 is_page_aligned(u32 val)
{
return (val & (c_page_size - 1)) == 0;
return (val & (get_page_size() - 1)) == 0;
}
+14 -2
View File
@@ -737,7 +737,7 @@ bool patch_engine::add_patch_data(YAML::Node node, patch_info& info, u32 modifie
return false;
}
struct patch_data p_data{};
patch_data p_data{};
p_data.type = type;
p_data.offset = addr_node.as<u32>(0) + modifier;
p_data.original_offset = addr_node.Scalar();
@@ -789,8 +789,14 @@ bool patch_engine::add_patch_data(YAML::Node node, patch_info& info, u32 modifie
switch (p_data.type)
{
case patch_type::invalid:
case patch_type::load:
{
fmt::throw_exception("Unreachable patch type: %s", p_data.type);
}
case patch_type::bp_exec:
case patch_type::utf8:
case patch_type::c_utf8:
case patch_type::jump_func:
case patch_type::move_file:
case patch_type::hide_file:
@@ -827,7 +833,13 @@ bool patch_engine::add_patch_data(YAML::Node node, patch_info& info, u32 modifie
get_node_value(u32{}, s32{});
break;
}
default:
case patch_type::alloc:
case patch_type::code_alloc:
case patch_type::jump:
case patch_type::jump_link:
case patch_type::le64:
case patch_type::be64:
case patch_type::bd64:
{
get_node_value(u64{}, s64{});
break;
+4 -1
View File
@@ -126,15 +126,17 @@ namespace utils
std::vector<void*> get_backtrace(int max_depth)
{
std::vector<void*> result(max_depth);
#ifndef ANDROID
int depth = backtrace(result.data(), max_depth);
result.resize(depth);
#endif
return result;
}
std::vector<std::string> get_backtrace_symbols(const std::vector<void*>& stack)
{
std::vector<std::string> result;
#ifndef ANDROID
result.reserve(stack.size());
const auto symbols = backtrace_symbols(stack.data(), static_cast<int>(stack.size()));
@@ -144,6 +146,7 @@ namespace utils
}
free(symbols);
#endif
return result;
}
#endif
+116 -115
View File
@@ -10,131 +10,132 @@ pr:
include:
- master
jobs:
- job: Linux_Build
strategy:
matrix:
Clang:
COMPILER: clang
GCC:
COMPILER: gcc
variables:
CCACHE_DIR: $(Pipeline.Workspace)/ccache
CI_HAS_ARTIFACTS: true
UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-linux"
DEPLOY_APPIMAGE: true
APPDIR: "/rpcs3/build/appdir"
ARTDIR: "/root/artifacts"
RELEASE_MESSAGE: "/rpcs3/GitHubReleaseMessage.txt"
# - job: Linux_Build
# strategy:
# matrix:
# Clang:
# COMPILER: clang
# GCC:
# COMPILER: gcc
# variables:
# CCACHE_DIR: $(Pipeline.Workspace)/ccache
# CI_HAS_ARTIFACTS: true
# UPLOAD_COMMIT_HASH: d812f1254a1157c80fd402f94446310560f54e5f
# UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-linux"
# DEPLOY_APPIMAGE: true
# APPDIR: "/rpcs3/build/appdir"
# ARTDIR: "/root/artifacts"
# RELEASE_MESSAGE: "/rpcs3/GitHubReleaseMessage.txt"
pool:
vmImage: 'ubuntu-latest'
# pool:
# vmImage: 'ubuntu-latest'
steps:
- task: Cache@2
inputs:
key: ccache | $(Agent.OS) | $(COMPILER) | $(Build.SourceVersion)
restoreKeys: |
ccache | $(Agent.OS) | $(COMPILER)
path: $(CCACHE_DIR)
displayName: ccache
# steps:
# - task: Cache@2
# inputs:
# key: ccache | $(Agent.OS) | $(COMPILER) | $(Build.SourceVersion)
# restoreKeys: |
# ccache | $(Agent.OS) | $(COMPILER)
# path: $(CCACHE_DIR)
# displayName: ccache
- bash: |
docker pull --quiet rpcs3/rpcs3-ci-jammy:1.1
docker run \
-v $(pwd):/rpcs3 \
--env-file .ci/docker.env \
-v $CCACHE_DIR:/root/.ccache \
-v $BUILD_ARTIFACTSTAGINGDIRECTORY:/root/artifacts \
rpcs3/rpcs3-ci-jammy:1.1 \
/rpcs3/.ci/build-linux.sh
displayName: Docker setup and build
# - bash: |
# docker pull --quiet rpcs3/rpcs3-ci-jammy:1.3
# docker run \
# -v $(pwd):/rpcs3 \
# --env-file .ci/docker.env \
# -v $CCACHE_DIR:/root/.ccache \
# -v $BUILD_ARTIFACTSTAGINGDIRECTORY:/root/artifacts \
# rpcs3/rpcs3-ci-jammy:1.3 \
# /rpcs3/.ci/build-linux.sh
# displayName: Docker setup and build
- publish: $(Build.ArtifactStagingDirectory)
condition: succeeded()
artifact: RPCS3 for Linux ($(COMPILER))
# - publish: $(Build.ArtifactStagingDirectory)
# condition: succeeded()
# artifact: RPCS3 for Linux ($(COMPILER))
- bash: |
COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp)
COMM_COUNT=$(git rev-list --count HEAD)
COMM_HASH=$(git rev-parse --short=8 HEAD)
# - bash: |
# COMM_TAG=$(awk '/version{.*}/ { printf("%d.%d.%d", $5, $6, $7) }' ./rpcs3/rpcs3_version.cpp)
# COMM_COUNT=$(git rev-list --count HEAD)
# COMM_HASH=$(git rev-parse --short=8 HEAD)
export AVVER="${COMM_TAG}-${COMM_COUNT}"
# export AVVER="${COMM_TAG}-${COMM_COUNT}"
.ci/github-upload.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['COMPILER'], 'clang'))
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)
# .ci/github-upload.sh
# condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['COMPILER'], 'clang'))
# displayName: Push build to GitHub
# env:
# RPCS3_TOKEN: $(RPCS3-Token)
- job: Windows_Build
variables:
COMPILER: msvc
QT_VER_MAIN: '6'
QT_VER: '6.8.2'
QT_VER_MSVC: 'msvc2022'
QT_DATE: '202501260838'
QTDIR: C:\Qt\$(QT_VER)\$(QT_VER_MSVC)_64
VULKAN_VER: '1.3.268.0'
VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
VULKAN_SDK: C:\VulkanSDK\$(VULKAN_VER)
CCACHE_SHA: '6252f081876a9a9f700fae13a5aec5d0d486b28261d7f1f72ac11c7ad9df4da9'
CCACHE_BIN_DIR: 'C:\ccache_bin'
CCACHE_DIR: 'C:\ccache'
CCACHE_INODECACHE: 'true'
CCACHE_SLOPPINESS: 'time_macros'
DEPS_CACHE_DIR: ./dependency_cache
UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
# - job: Windows_Build
# variables:
# COMPILER: msvc
# QT_VER_MAIN: '6'
# QT_VER: '6.8.3'
# QT_VER_MSVC: 'msvc2022'
# QT_DATE: '202503201308'
# QTDIR: C:\Qt\$(QT_VER)\$(QT_VER_MSVC)_64
# LLVM_VER: '19.1.7'
# VULKAN_VER: '1.3.268.0'
# VULKAN_SDK_SHA: '8459ef49bd06b697115ddd3d97c9aec729e849cd775f5be70897718a9b3b9db5'
# VULKAN_SDK: C:\VulkanSDK\$(VULKAN_VER)
# CCACHE_SHA: '6252f081876a9a9f700fae13a5aec5d0d486b28261d7f1f72ac11c7ad9df4da9'
# CCACHE_BIN_DIR: 'C:\ccache_bin'
# CCACHE_DIR: 'C:\ccache'
# CCACHE_INODECACHE: 'true'
# CCACHE_SLOPPINESS: 'time_macros'
# DEPS_CACHE_DIR: ./dependency_cache
# UPLOAD_COMMIT_HASH: 7d09e3be30805911226241afbb14f8cdc2eb054e
# UPLOAD_REPO_FULL_NAME: "RPCS3/rpcs3-binaries-win"
pool:
vmImage: "windows-latest"
# pool:
# vmImage: "windows-latest"
steps:
- bash: .ci/get_keys-windows.sh
displayName: Get Cache Keys
# steps:
# - bash: .ci/get_keys-windows.sh
# displayName: Get Cache Keys
- task: Cache@2
inputs:
key: ccache | $(Agent.OS) | $(COMPILER) | "$(Build.SourceVersion)"
path: $(CCACHE_DIR)
restoreKeys:
ccache | $(Agent.OS) | $(COMPILER)
displayName: Build Ccache
- task: Cache@2
inputs:
key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | $(CCACHE_SHA) | llvm.lock | glslang.lock
path: $(DEPS_CACHE_DIR)
displayName: Dependencies Cache
# - task: Cache@2
# inputs:
# key: ccache | $(Agent.OS) | $(COMPILER) | "$(Build.SourceVersion)"
# path: $(CCACHE_DIR)
# restoreKeys:
# ccache | $(Agent.OS) | $(COMPILER)
# displayName: Build Ccache
- bash: .ci/setup-windows.sh
displayName: Download and unpack dependencies
# - task: Cache@2
# inputs:
# key: $(Agent.OS) | $(COMPILER) | "$(QT_VER)" | $(VULKAN_SDK_SHA) | $(CCACHE_SHA) | llvm.lock | glslang.lock
# path: $(DEPS_CACHE_DIR)
# displayName: Dependencies Cache
- bash: .ci/export-azure-vars.sh
displayName: Export Variables
# - bash: .ci/setup-windows.sh
# displayName: Download and unpack dependencies
- task: VSBuild@1
inputs:
solution: 'rpcs3.sln'
maximumCpuCount: true
platform: x64
configuration: 'Release'
msbuildArgs: /p:CLToolPath=$(CCACHE_BIN_DIR) /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="$(Build.SourcesDirectory)\buildfiles\msvc\ci_no_debug_info.targets"
displayName: Compile RPCS3
# - bash: .ci/export-azure-vars.sh
# displayName: Export Variables
- bash: .ci/deploy-windows.sh
displayName: Pack up build artifacts
# - task: VSBuild@1
# inputs:
# solution: 'rpcs3.sln'
# maximumCpuCount: true
# platform: x64
# configuration: 'Release'
# msbuildArgs: /p:CLToolPath=$(CCACHE_BIN_DIR) /p:UseMultiToolTask=true /p:CustomAfterMicrosoftCommonTargets="$(Build.SourcesDirectory)\buildfiles\msvc\ci_only.targets"
# displayName: Compile RPCS3
- publish: $(Build.ArtifactStagingDirectory)
condition: succeeded()
artifact: RPCS3 for Windows
# - bash: .ci/deploy-windows.sh
# displayName: Pack up build artifacts
- bash: .ci/github-upload.sh
condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)
# - publish: $(Build.ArtifactStagingDirectory)
# condition: succeeded()
# artifact: RPCS3 for Windows
# - bash: .ci/github-upload.sh
# condition: and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.Repository.Name'], 'RPCS3/rpcs3'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
# displayName: Push build to GitHub
# env:
# RPCS3_TOKEN: $(RPCS3-Token)
- job: Mac_Build_x86_64
timeoutInMinutes: 180
@@ -151,7 +152,7 @@ jobs:
LLVM_COMPILER_VER: '19'
pool:
vmImage: "macOS-13"
vmImage: "macOS-14"
steps:
- task: Cache@2
@@ -161,7 +162,7 @@ jobs:
restoreKeys: |
ccache | "$(Agent.OS)" | "$(Agent.OSArchitecture)"
displayName: Ccache cache
- task: Cache@2
inputs:
key: qt | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(QT_VER)"
@@ -169,7 +170,7 @@ jobs:
restoreKeys: |
qt | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(QT_VER)"
displayName: Qt cache
# - task: Cache@2
# inputs:
# key: brew | "$(Agent.OS)"
@@ -196,7 +197,7 @@ jobs:
displayName: Push build to GitHub
env:
RPCS3_TOKEN: $(RPCS3-Token)
- job: Mac_Build_arm64
timeoutInMinutes: 180
variables:
@@ -212,7 +213,7 @@ jobs:
LLVM_COMPILER_VER: '19'
pool:
vmImage: "macOS-13"
vmImage: "macOS-14"
steps:
- task: Cache@2
@@ -222,7 +223,7 @@ jobs:
restoreKeys: |
ccache | "$(Agent.OS)" | "$(Agent.OSArchitecture)"
displayName: Ccache cache
- task: Cache@2
inputs:
key: qt | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(QT_VER)"
@@ -230,7 +231,7 @@ jobs:
restoreKeys: |
qt | "$(Agent.OS)" | "$(Agent.OSArchitecture)" | "$(QT_VER)"
displayName: Qt cache
# - task: Cache@2
# inputs:
# key: brew | "$(Agent.OS)"
@@ -68,7 +68,8 @@ QCheckBox::indicator, QListWidget::indicator, QTreeWidget::indicator {
margin-top: 0.0625em;
}
QCheckBox::indicator:checked, QListWidget::indicator::checked, QTreeWidget::indicator::checked {
background-color: #FFF; /* White */
background-color: #000; /* Black */
image: url("GuiConfigs/check_mark_white.png");
}
QCheckBox::indicator:unchecked, QListWidget::indicator::unchecked, QTreeWidget::indicator::unchecked {
background-color: #000; /* Black */
@@ -86,13 +87,14 @@ QRadioButton::indicator {
border-radius: 0.270em;
}
QRadioButton::indicator:checked {
background-color: #FFF; /* Green */
background-color: #000; /* Black */
image: url("GuiConfigs/check_mark_white.png");
}
QRadioButton::indicator:unchecked {
background-color: #000; /* Red */
background-color: #000; /* Black */
}
QRadioButton::indicator::disabled {
background-color: #af4949; /* Gray */
background-color: #af4949; /* Red */
}
/* Combo Boxes */
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

@@ -3,6 +3,10 @@
<ItemDefinitionGroup>
<ClCompile>
<DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>true</WholeProgramOptimization>
</ClCompile>
<Link>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
</Project>
+1 -99
View File
@@ -15,105 +15,7 @@
</ClCompile>
<Link>
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Debug'">%(AdditionalLibraryDirectories);$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build\lib;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\$(Configuration)\lib;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\lib</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies);
LLVMAggressiveInstCombine.lib;
LLVMAnalysis.lib;
LLVMAsmParser.lib;
LLVMAsmPrinter.lib;
LLVMBinaryFormat.lib;
LLVMBitReader.lib;
LLVMBitstreamReader.lib;
LLVMBitWriter.lib;
LLVMCFGuard.lib;
LLVMCodeGen.lib;
LLVMCodeGenData.lib;
LLVMCodeGenTypes.lib;
LLVMCore.lib;
LLVMCoroutines.lib;
LLVMCoverage.lib;
LLVMDebugInfoBTF.lib;
LLVMDebugInfoCodeView.lib;
LLVMDebuginfod.lib;
LLVMDebugInfoDWARF.lib;
LLVMDebugInfoGSYM.lib;
LLVMDebugInfoLogicalView.lib;
LLVMDebugInfoMSF.lib;
LLVMDebugInfoPDB.lib;
LLVMDemangle.lib;
LLVMDlltoolDriver.lib;
LLVMDWARFLinker.lib;
LLVMDWARFLinkerClassic.lib;
LLVMDWARFLinkerParallel.lib;
LLVMDWP.lib;
LLVMExecutionEngine.lib;
LLVMExtensions.lib;
LLVMFileCheck.lib;
LLVMFrontendDriver.lib;
LLVMFrontendHLSL.lib;
LLVMFrontendOffloading.lib;
LLVMFrontendOpenACC.lib;
LLVMFrontendOpenMP.lib;
LLVMFuzzerCLI.lib;
LLVMFuzzMutate.lib;
LLVMGlobalISel.lib;
LLVMHipStdPar.lib;
LLVMInstCombine.lib;
LLVMInstrumentation.lib;
LLVMIntelJITEvents.lib;
LLVMIntelJITProfiling.lib;
LLVMInterfaceStub.lib;
LLVMInterpreter.lib;
LLVMipo.lib;
LLVMIRPrinter.lib;
LLVMIRReader.lib;
LLVMJITLink.lib;
LLVMLibDriver.lib;
LLVMLineEditor.lib;
LLVMLinker.lib;
LLVMLTO.lib;
LLVMMC.lib;
LLVMMCA.lib;
LLVMMCDisassembler.lib;
LLVMMCJIT.lib;
LLVMMCParser.lib;
LLVMMIRParser.lib;
LLVMObjCARCOpts.lib;
LLVMObjCopy.lib;
LLVMObject.lib;
LLVMObjectYAML.lib;
LLVMOption.lib;
LLVMOrcDebugging.lib;
LLVMOrcJIT.lib;
LLVMOrcShared.lib;
LLVMOrcTargetProcess.lib;
LLVMPasses.lib;
LLVMProfileData.lib;
LLVMRemarks.lib;
LLVMRuntimeDyld.lib;
LLVMSandboxIR.lib;
LLVMScalarOpts.lib;
LLVMSelectionDAG.lib;
LLVMSupport.lib;
LLVMSymbolize.lib;
LLVMTableGen.lib;
LLVMTableGenBasic.lib;
LLVMTableGenCommon.lib;
LLVMTarget.lib;
LLVMTargetParser.lib;
LLVMTextAPI.lib;
LLVMTextAPIBinaryReader.lib;
LLVMTransformUtils.lib;
LLVMVectorize.lib;
LLVMWindowsDriver.lib;
LLVMWindowsManifest.lib;
LLVMX86AsmParser.lib;
LLVMX86CodeGen.lib;
LLVMX86Desc.lib;
LLVMX86Disassembler.lib;
LLVMX86Info.lib;
LLVMX86TargetMCA.lib;
LLVMXRay.lib;
</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
+107 -1
View File
@@ -23,7 +23,113 @@
<AdditionalOptions>/utf-8 /Zc:throwingNew- /constexpr:steps16777216 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;Iphlpapi.lib;Bcrypt.lib;avcodec.lib;avformat.lib;avutil.lib;swresample.lib;swscale.lib</AdditionalDependencies>
<AdditionalDependencies>
ws2_32.lib;
Iphlpapi.lib;
Bcrypt.lib;
avcodec.lib;
avformat.lib;
avutil.lib;
swresample.lib;
swscale.lib;
LLVMAggressiveInstCombine.lib;
LLVMAnalysis.lib;
LLVMAsmParser.lib;
LLVMAsmPrinter.lib;
LLVMBinaryFormat.lib;
LLVMBitReader.lib;
LLVMBitstreamReader.lib;
LLVMBitWriter.lib;
LLVMCFGuard.lib;
LLVMCodeGen.lib;
LLVMCodeGenData.lib;
LLVMCodeGenTypes.lib;
LLVMCore.lib;
LLVMCoroutines.lib;
LLVMCoverage.lib;
LLVMDebugInfoBTF.lib;
LLVMDebugInfoCodeView.lib;
LLVMDebuginfod.lib;
LLVMDebugInfoDWARF.lib;
LLVMDebugInfoGSYM.lib;
LLVMDebugInfoLogicalView.lib;
LLVMDebugInfoMSF.lib;
LLVMDebugInfoPDB.lib;
LLVMDemangle.lib;
LLVMDlltoolDriver.lib;
LLVMDWARFLinker.lib;
LLVMDWARFLinkerClassic.lib;
LLVMDWARFLinkerParallel.lib;
LLVMDWP.lib;
LLVMExecutionEngine.lib;
LLVMExtensions.lib;
LLVMFileCheck.lib;
LLVMFrontendDriver.lib;
LLVMFrontendHLSL.lib;
LLVMFrontendOffloading.lib;
LLVMFrontendOpenACC.lib;
LLVMFrontendOpenMP.lib;
LLVMFuzzerCLI.lib;
LLVMFuzzMutate.lib;
LLVMGlobalISel.lib;
LLVMHipStdPar.lib;
LLVMInstCombine.lib;
LLVMInstrumentation.lib;
LLVMIntelJITEvents.lib;
LLVMIntelJITProfiling.lib;
LLVMInterfaceStub.lib;
LLVMInterpreter.lib;
LLVMipo.lib;
LLVMIRPrinter.lib;
LLVMIRReader.lib;
LLVMJITLink.lib;
LLVMLibDriver.lib;
LLVMLineEditor.lib;
LLVMLinker.lib;
LLVMLTO.lib;
LLVMMC.lib;
LLVMMCA.lib;
LLVMMCDisassembler.lib;
LLVMMCJIT.lib;
LLVMMCParser.lib;
LLVMMIRParser.lib;
LLVMObjCARCOpts.lib;
LLVMObjCopy.lib;
LLVMObject.lib;
LLVMObjectYAML.lib;
LLVMOption.lib;
LLVMOrcDebugging.lib;
LLVMOrcJIT.lib;
LLVMOrcShared.lib;
LLVMOrcTargetProcess.lib;
LLVMPasses.lib;
LLVMProfileData.lib;
LLVMRemarks.lib;
LLVMRuntimeDyld.lib;
LLVMSandboxIR.lib;
LLVMScalarOpts.lib;
LLVMSelectionDAG.lib;
LLVMSupport.lib;
LLVMSymbolize.lib;
LLVMTableGen.lib;
LLVMTableGenBasic.lib;
LLVMTableGenCommon.lib;
LLVMTarget.lib;
LLVMTargetParser.lib;
LLVMTextAPI.lib;
LLVMTextAPIBinaryReader.lib;
LLVMTransformUtils.lib;
LLVMVectorize.lib;
LLVMWindowsDriver.lib;
LLVMWindowsManifest.lib;
LLVMX86AsmParser.lib;
LLVMX86CodeGen.lib;
LLVMX86Desc.lib;
LLVMX86Disassembler.lib;
LLVMX86Info.lib;
LLVMX86TargetMCA.lib;
LLVMXRay.lib;
</AdditionalDependencies>
<AdditionalLibraryDirectories>..\3rdparty\ffmpeg\lib\windows\x86_64</AdditionalLibraryDirectories>
<StackReserveSize>8388608</StackReserveSize>
<StackCommitSize>1048576</StackCommitSize>
+1 -99
View File
@@ -16,105 +16,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories Condition="'$(Configuration)'=='Release'">%(AdditionalLibraryDirectories);$(SolutionDir)build\lib\$(Configuration)-$(Platform)\llvm_build\lib;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\$(Configuration)\lib;$(SolutionDir)build\lib_ext\$(Configuration)-$(Platform)\llvm_build\lib</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies);
LLVMAggressiveInstCombine.lib;
LLVMAnalysis.lib;
LLVMAsmParser.lib;
LLVMAsmPrinter.lib;
LLVMBinaryFormat.lib;
LLVMBitReader.lib;
LLVMBitstreamReader.lib;
LLVMBitWriter.lib;
LLVMCFGuard.lib;
LLVMCodeGen.lib;
LLVMCodeGenData.lib;
LLVMCodeGenTypes.lib;
LLVMCore.lib;
LLVMCoroutines.lib;
LLVMCoverage.lib;
LLVMDebugInfoBTF.lib;
LLVMDebugInfoCodeView.lib;
LLVMDebuginfod.lib;
LLVMDebugInfoDWARF.lib;
LLVMDebugInfoGSYM.lib;
LLVMDebugInfoLogicalView.lib;
LLVMDebugInfoMSF.lib;
LLVMDebugInfoPDB.lib;
LLVMDemangle.lib;
LLVMDlltoolDriver.lib;
LLVMDWARFLinker.lib;
LLVMDWARFLinkerClassic.lib;
LLVMDWARFLinkerParallel.lib;
LLVMDWP.lib;
LLVMExecutionEngine.lib;
LLVMExtensions.lib;
LLVMFileCheck.lib;
LLVMFrontendDriver.lib;
LLVMFrontendHLSL.lib;
LLVMFrontendOffloading.lib;
LLVMFrontendOpenACC.lib;
LLVMFrontendOpenMP.lib;
LLVMFuzzerCLI.lib;
LLVMFuzzMutate.lib;
LLVMGlobalISel.lib;
LLVMHipStdPar.lib;
LLVMInstCombine.lib;
LLVMInstrumentation.lib;
LLVMIntelJITEvents.lib;
LLVMIntelJITProfiling.lib;
LLVMInterfaceStub.lib;
LLVMInterpreter.lib;
LLVMipo.lib;
LLVMIRPrinter.lib;
LLVMIRReader.lib;
LLVMJITLink.lib;
LLVMLibDriver.lib;
LLVMLineEditor.lib;
LLVMLinker.lib;
LLVMLTO.lib;
LLVMMC.lib;
LLVMMCA.lib;
LLVMMCDisassembler.lib;
LLVMMCJIT.lib;
LLVMMCParser.lib;
LLVMMIRParser.lib;
LLVMObjCARCOpts.lib;
LLVMObjCopy.lib;
LLVMObject.lib;
LLVMObjectYAML.lib;
LLVMOption.lib;
LLVMOrcDebugging.lib;
LLVMOrcJIT.lib;
LLVMOrcShared.lib;
LLVMOrcTargetProcess.lib;
LLVMPasses.lib;
LLVMProfileData.lib;
LLVMRemarks.lib;
LLVMRuntimeDyld.lib;
LLVMSandboxIR.lib;
LLVMScalarOpts.lib;
LLVMSelectionDAG.lib;
LLVMSupport.lib;
LLVMSymbolize.lib;
LLVMTableGen.lib;
LLVMTableGenBasic.lib;
LLVMTableGenCommon.lib;
LLVMTarget.lib;
LLVMTargetParser.lib;
LLVMTextAPI.lib;
LLVMTextAPIBinaryReader.lib;
LLVMTransformUtils.lib;
LLVMVectorize.lib;
LLVMWindowsDriver.lib;
LLVMWindowsManifest.lib;
LLVMX86AsmParser.lib;
LLVMX86CodeGen.lib;
LLVMX86Desc.lib;
LLVMX86Disassembler.lib;
LLVMX86Info.lib;
LLVMX86TargetMCA.lib;
LLVMXRay.lib;
</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
+8
View File
@@ -52,6 +52,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxpro
{5B146DEA-9ACE-4D32-A7FD-3F42464DD69C} = {5B146DEA-9ACE-4D32-A7FD-3F42464DD69C}
{60F89955-91C6-3A36-8000-13C592FEC2DF} = {60F89955-91C6-3A36-8000-13C592FEC2DF}
{78CB2F39-B809-4A06-8329-8C0A19119D3D} = {78CB2F39-B809-4A06-8329-8C0A19119D3D}
{81B0D6D6-84E6-40C1-8DBD-47CBCB3051AD} = {81B0D6D6-84E6-40C1-8DBD-47CBCB3051AD}
{8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA} = {8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA}
{8F85B6CC-250F-4ACA-A617-E820A74E3E3C} = {8F85B6CC-250F-4ACA-A617-E820A74E3E3C}
{9610627D-20FE-4B07-8CE3-9FF68A5F1EC2} = {9610627D-20FE-4B07-8CE3-9FF68A5F1EC2}
@@ -85,6 +86,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcubeb", "3rdparty\cubeb\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soundtouch", "3rdparty\SoundTouch\soundtouch.vcxproj", "{508C291A-3D18-49F5-B25D-F7C8DB92CB21}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "discord-rpc", "3rdparty\discord-rpc\discord-rpc.vcxproj", "{81B0D6D6-84E6-40C1-8DBD-47CBCB3051AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "3rdparty\libsdl-org\SDL.vcxproj", "{8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pine", "pine", "{A55DA1B5-CC17-4525-BE7F-1659CE17BB56}"
@@ -184,6 +187,10 @@ Global
{508C291A-3D18-49F5-B25D-F7C8DB92CB21}.Debug|x64.Build.0 = Debug|x64
{508C291A-3D18-49F5-B25D-F7C8DB92CB21}.Release|x64.ActiveCfg = Release|x64
{508C291A-3D18-49F5-B25D-F7C8DB92CB21}.Release|x64.Build.0 = Release|x64
{81B0D6D6-84E6-40C1-8DBD-47CBCB3051AD}.Debug|x64.ActiveCfg = Debug|x64
{81B0D6D6-84E6-40C1-8DBD-47CBCB3051AD}.Debug|x64.Build.0 = Debug|x64
{81B0D6D6-84E6-40C1-8DBD-47CBCB3051AD}.Release|x64.ActiveCfg = Release|x64
{81B0D6D6-84E6-40C1-8DBD-47CBCB3051AD}.Release|x64.Build.0 = Release|x64
{8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA}.Debug|x64.ActiveCfg = Debug|x64
{8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA}.Debug|x64.Build.0 = Debug|x64
{8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA}.Release|x64.ActiveCfg = Release|x64
@@ -236,6 +243,7 @@ Global
{9610627D-20FE-4B07-8CE3-9FF68A5F1EC2} = {10FBF193-D532-4CCF-B875-4C7091A7F6C2}
{FDA7B080-03B0-48C8-B24F-88118981422A} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
{508C291A-3D18-49F5-B25D-F7C8DB92CB21} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
{81B0D6D6-84E6-40C1-8DBD-47CBCB3051AD} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
{8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
{A55DA1B5-CC17-4525-BE7F-1659CE17BB56} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
{5228F863-E0DD-4DE7-AA7B-5C52B14CD4D0} = {6C3B64A0-8F8A-4DC4-8C0B-D71EBEED7FA8}
+157 -148
View File
@@ -20,7 +20,7 @@ elseif(NOT WIN32 AND NOT CMAKE_CXX_FLAGS MATCHES "LIBICONV_PLUG")
set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} "iconv")
endif()
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT ANDROID)
add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}/rpcs3")
# Optionally enable X11 for window management
find_package(X11)
@@ -33,162 +33,171 @@ if(UNIX AND NOT APPLE)
endif()
endif()
# Qt
# finds Qt libraries and setups custom commands for MOC and UIC
# Must be done here because generated MOC and UIC targets cant
# be found otherwise
include(${CMAKE_SOURCE_DIR}/3rdparty/qt6.cmake)
if (NOT ANDROID)
# Qt
# finds Qt libraries and setups custom commands for MOC and UIC
# Must be done here because generated MOC and UIC targets cant
# be found otherwise
include(${CMAKE_SOURCE_DIR}/3rdparty/qt6.cmake)
endif()
# subdirectories
add_subdirectory(Emu)
add_subdirectory(rpcs3qt)
if(WIN32)
add_executable(rpcs3 WIN32)
target_sources(rpcs3 PRIVATE rpcs3.rc)
target_compile_definitions(rpcs3 PRIVATE UNICODE _UNICODE)
elseif(APPLE)
add_executable(rpcs3 MACOSX_BUNDLE)
target_sources(rpcs3 PRIVATE rpcs3.icns update_helper.sh)
set_source_files_properties(update_helper.sh PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set_target_properties(rpcs3
PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/rpcs3.plist.in")
else()
add_executable(rpcs3)
if (NOT ANDROID)
add_subdirectory(rpcs3qt)
endif()
target_sources(rpcs3
PRIVATE
display_sleep_control.cpp
headless_application.cpp
main.cpp
main_application.cpp
module_verifier.cpp
rpcs3_version.cpp
stb_image.cpp
stdafx.cpp
Input/basic_keyboard_handler.cpp
Input/basic_mouse_handler.cpp
Input/ds3_pad_handler.cpp
Input/ds4_pad_handler.cpp
Input/dualsense_pad_handler.cpp
Input/evdev_joystick_handler.cpp
Input/evdev_gun_handler.cpp
Input/gui_pad_thread.cpp
Input/hid_pad_handler.cpp
Input/keyboard_pad_handler.cpp
Input/mm_joystick_handler.cpp
Input/pad_thread.cpp
Input/product_info.cpp
Input/ps_move_calibration.cpp
Input/ps_move_config.cpp
Input/ps_move_handler.cpp
Input/ps_move_tracker.cpp
Input/raw_mouse_config.cpp
Input/raw_mouse_handler.cpp
Input/sdl_pad_handler.cpp
Input/skateboard_pad_handler.cpp
Input/xinput_pad_handler.cpp
)
gen_git_version(${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(rpcs3
PROPERTIES
AUTOMOC ON
AUTOUIC ON)
target_link_libraries(rpcs3
PRIVATE
rpcs3_emu
rpcs3_ui
3rdparty::discordRPC
3rdparty::qt6
3rdparty::hidapi
3rdparty::libusb
3rdparty::wolfssl
3rdparty::libcurl
3rdparty::zlib
3rdparty::opencv
3rdparty::fusion
${ADDITIONAL_LIBS})
# Unix display manager
if(X11_FOUND)
target_link_libraries(rpcs3 PRIVATE X11::X11)
elseif(USE_VULKAN AND UNIX AND NOT WAYLAND_FOUND AND NOT APPLE)
# Wayland has been checked in 3rdparty/CMakeLists.txt already.
message(FATAL_ERROR "RPCS3 requires either X11 or Wayland (or both) for Vulkan.")
endif()
if(UNIX)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
target_link_libraries(rpcs3 PRIVATE Threads::Threads)
endif()
if(WIN32)
target_link_libraries(rpcs3 PRIVATE bcrypt ws2_32 Iphlpapi Winmm Psapi gdi32 setupapi pdh)
else()
target_link_libraries(rpcs3 PRIVATE ${CMAKE_DL_LIBS})
endif()
if(USE_PRECOMPILED_HEADERS)
target_precompile_headers(rpcs3 PRIVATE stdafx.h)
endif()
# Copy icons to executable directory
if(APPLE)
if (CMAKE_BUILD_TYPE MATCHES "Debug" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
set(QT_DEPLOY_FLAGS "-no-strip")
if (NOT ANDROID)
if(WIN32)
add_executable(rpcs3 WIN32)
target_sources(rpcs3 PRIVATE rpcs3.rc)
target_compile_definitions(rpcs3 PRIVATE UNICODE _UNICODE)
elseif(APPLE)
add_executable(rpcs3 MACOSX_BUNDLE)
target_sources(rpcs3 PRIVATE rpcs3.icns update_helper.sh)
set_source_files_properties(update_helper.sh PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set_target_properties(rpcs3
PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/rpcs3.plist.in")
else()
set(QT_DEPLOY_FLAGS "")
add_executable(rpcs3)
endif()
qt_finalize_target(rpcs3)
add_custom_command(TARGET rpcs3 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rpcs3.icns $<TARGET_FILE_DIR:rpcs3>/../Resources/rpcs3.icns
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/Icons $<TARGET_FILE_DIR:rpcs3>/../Resources/Icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $<TARGET_FILE_DIR:rpcs3>/../Resources/GuiConfigs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/../Resources/git
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "${PROJECT_BINARY_DIR}/bin/rpcs3.app" "${QT_DEPLOY_FLAGS}")
elseif(UNIX)
add_custom_command(TARGET rpcs3 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/Icons $<TARGET_FILE_DIR:rpcs3>/Icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $<TARGET_FILE_DIR:rpcs3>/GuiConfigs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/git)
elseif(WIN32)
add_custom_command(TARGET rpcs3 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:OpenAL::OpenAL> $<TARGET_FILE_DIR:rpcs3>
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/Icons $<TARGET_FILE_DIR:rpcs3>/Icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $<TARGET_FILE_DIR:rpcs3>/GuiConfigs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/git
COMMAND "${WINDEPLOYQT_EXECUTABLE}" --no-compiler-runtime --no-opengl-sw --no-patchqt
--no-translations --no-system-d3d-compiler --no-quick-import
--plugindir "$<IF:$<CXX_COMPILER_ID:MSVC>,$<TARGET_FILE_DIR:rpcs3>/plugins,$<TARGET_FILE_DIR:rpcs3>/share/qt6/plugins>"
--verbose 0 "$<TARGET_FILE:rpcs3>")
endif()
# Unix installation
if(UNIX AND NOT APPLE)
# Install the binary
install(TARGETS rpcs3 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# Install the application icon and menu item
install(FILES rpcs3.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
install(FILES rpcs3.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps)
install(FILES rpcs3.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES rpcs3.metainfo.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
# Install other files
install(DIRECTORY ../bin/Icons
DESTINATION ${CMAKE_INSTALL_DATADIR}/rpcs3)
install(DIRECTORY ../bin/GuiConfigs
DESTINATION ${CMAKE_INSTALL_DATADIR}/rpcs3)
install(DIRECTORY ../bin/git
DESTINATION ${CMAKE_INSTALL_DATADIR}/rpcs3)
install(DIRECTORY ../bin/test
DESTINATION ${CMAKE_INSTALL_DATADIR}/rpcs3)
target_sources(rpcs3
PRIVATE
display_sleep_control.cpp
headless_application.cpp
main.cpp
main_application.cpp
module_verifier.cpp
rpcs3_version.cpp
stb_image.cpp
stdafx.cpp
Input/basic_keyboard_handler.cpp
Input/basic_mouse_handler.cpp
Input/ds3_pad_handler.cpp
Input/ds4_pad_handler.cpp
Input/dualsense_pad_handler.cpp
Input/evdev_joystick_handler.cpp
Input/evdev_gun_handler.cpp
Input/gui_pad_thread.cpp
Input/hid_pad_handler.cpp
Input/keyboard_pad_handler.cpp
Input/mm_joystick_handler.cpp
Input/pad_thread.cpp
Input/product_info.cpp
Input/ps_move_calibration.cpp
Input/ps_move_config.cpp
Input/ps_move_handler.cpp
Input/ps_move_tracker.cpp
Input/raw_mouse_config.cpp
Input/raw_mouse_handler.cpp
Input/sdl_pad_handler.cpp
Input/skateboard_pad_handler.cpp
Input/xinput_pad_handler.cpp
)
set_target_properties(rpcs3
PROPERTIES
AUTOMOC ON
AUTOUIC ON)
target_link_libraries(rpcs3
PRIVATE
rpcs3_emu
rpcs3_ui
3rdparty::discordRPC
3rdparty::qt6
3rdparty::hidapi
3rdparty::libusb
3rdparty::wolfssl
3rdparty::libcurl
3rdparty::zlib
3rdparty::opencv
3rdparty::fusion
${ADDITIONAL_LIBS})
# Unix display manager
if(X11_FOUND)
target_link_libraries(rpcs3 PRIVATE X11::X11)
elseif(USE_VULKAN AND UNIX AND NOT WAYLAND_FOUND AND NOT APPLE AND NOT ANDROID)
# Wayland has been checked in 3rdparty/CMakeLists.txt already.
message(FATAL_ERROR "RPCS3 requires either X11 or Wayland (or both) for Vulkan.")
endif()
if(UNIX)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads REQUIRED)
target_link_libraries(rpcs3 PRIVATE Threads::Threads)
endif()
if(WIN32)
target_link_libraries(rpcs3 PRIVATE bcrypt ws2_32 Iphlpapi Winmm Psapi gdi32 setupapi pdh)
else()
target_link_libraries(rpcs3 PRIVATE ${CMAKE_DL_LIBS})
endif()
if(USE_PRECOMPILED_HEADERS)
target_precompile_headers(rpcs3 PRIVATE stdafx.h)
endif()
# Copy icons to executable directory
if(APPLE)
if (CMAKE_BUILD_TYPE MATCHES "Debug" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
set(QT_DEPLOY_FLAGS "-no-strip")
else()
set(QT_DEPLOY_FLAGS "")
endif()
qt_finalize_target(rpcs3)
add_custom_command(TARGET rpcs3 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rpcs3.icns $<TARGET_FILE_DIR:rpcs3>/../Resources/rpcs3.icns
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/Icons $<TARGET_FILE_DIR:rpcs3>/../Resources/Icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $<TARGET_FILE_DIR:rpcs3>/../Resources/GuiConfigs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/../Resources/git
COMMAND "${MACDEPLOYQT_EXECUTABLE}" "${PROJECT_BINARY_DIR}/bin/rpcs3.app" "${QT_DEPLOY_FLAGS}")
elseif(UNIX)
add_custom_command(TARGET rpcs3 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/Icons $<TARGET_FILE_DIR:rpcs3>/Icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $<TARGET_FILE_DIR:rpcs3>/GuiConfigs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/git)
elseif(WIN32)
add_custom_command(TARGET rpcs3 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:OpenAL::OpenAL> $<TARGET_FILE_DIR:rpcs3>
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/Icons $<TARGET_FILE_DIR:rpcs3>/Icons
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/GuiConfigs $<TARGET_FILE_DIR:rpcs3>/GuiConfigs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/bin/git $<TARGET_FILE_DIR:rpcs3>/git
COMMAND "${WINDEPLOYQT_EXECUTABLE}" --no-compiler-runtime --no-opengl-sw --no-patchqt
--no-translations --no-system-d3d-compiler --no-system-dxc-compiler --no-ffmpeg --no-quick-import
--plugindir "$<IF:$<CXX_COMPILER_ID:MSVC>,$<TARGET_FILE_DIR:rpcs3>/plugins,$<TARGET_FILE_DIR:rpcs3>/share/qt6/plugins>"
--verbose 0 "$<TARGET_FILE:rpcs3>")
endif()
# Unix installation
if(UNIX AND NOT APPLE)
# Install the binary
install(TARGETS rpcs3 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# Install the application icon and menu item
install(FILES rpcs3.svg
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/scalable/apps)
install(FILES rpcs3.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps)
install(FILES rpcs3.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES rpcs3.metainfo.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
# Install other files
install(DIRECTORY ../bin/Icons
DESTINATION ${CMAKE_INSTALL_DATADIR}/rpcs3)
install(DIRECTORY ../bin/GuiConfigs
DESTINATION ${CMAKE_INSTALL_DATADIR}/rpcs3)
install(DIRECTORY ../bin/git
DESTINATION ${CMAKE_INSTALL_DATADIR}/rpcs3)
install(DIRECTORY ../bin/test
DESTINATION ${CMAKE_INSTALL_DATADIR}/rpcs3)
endif()
endif()
+3 -3
View File
@@ -897,7 +897,7 @@ unsigned char const_Zero[16] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
void leftshift_onebit(unsigned char *input, unsigned char *output)
void leftshift_onebit(const unsigned char *input, unsigned char *output)
{
int i;
unsigned char overflow = 0;
@@ -910,7 +910,7 @@ void leftshift_onebit(unsigned char *input, unsigned char *output)
}
}
void xor_128(unsigned char *a, unsigned char *b, unsigned char *out)
void xor_128(const unsigned char *a, const unsigned char *b, unsigned char *out)
{
int i;
for (i = 0; i < 16; i++)
@@ -945,7 +945,7 @@ void generate_subkey(aes_context *ctx, unsigned char *K1, unsigned char *K2)
}
}
void padding(unsigned char *lastb, unsigned char *pad, size_t length)
void padding(const unsigned char *lastb, unsigned char *pad, size_t length)
{
for (unsigned int i = 0; i < 16; i++)
{
+30 -30
View File
@@ -5,7 +5,7 @@
#include "util/types.hpp"
#include <cstring>
static inline int bn_compare(u8* a, u8* b, u32 n)
static inline int bn_compare(const u8* a, const u8* b, u32 n)
{
for (u32 i = 0; i < n; i++)
{
@@ -18,7 +18,7 @@ static inline int bn_compare(u8* a, u8* b, u32 n)
return 0;
}
static u8 bn_add_1(u8* d, u8* a, u8* b, u32 n)
static u8 bn_add_1(u8* d, const u8* a, const u8* b, u32 n)
{
u8 c = 0;
for (u32 i = n - 1; i != umax; i--)
@@ -31,7 +31,7 @@ static u8 bn_add_1(u8* d, u8* a, u8* b, u32 n)
return c;
}
static u8 bn_sub_1(u8* d, u8* a, u8* b, u32 n)
static u8 bn_sub_1(u8* d, const u8* a, const u8* b, u32 n)
{
u8 c = 1;
for (u32 i = n - 1; i != umax; i--)
@@ -44,13 +44,13 @@ static u8 bn_sub_1(u8* d, u8* a, u8* b, u32 n)
return 1 - c;
}
static void bn_reduce(u8* d, u8* N, u32 n)
static void bn_reduce(u8* d, const u8* N, u32 n)
{
if (bn_compare(d, N, n) >= 0)
bn_sub_1(d, d, N, n);
}
static void bn_add(u8* d, u8* a, u8* b, u8* N, u32 n)
static void bn_add(u8* d, const u8* a, const u8* b, const u8* N, u32 n)
{
if (bn_add_1(d, a, b, n))
bn_sub_1(d, d, N, n);
@@ -58,7 +58,7 @@ static void bn_add(u8* d, u8* a, u8* b, u8* N, u32 n)
bn_reduce(d, N, n);
}
static void bn_sub(u8* d, u8* a, u8* b, u8* N, u32 n)
static void bn_sub(u8* d, const u8* a, const u8* b, const u8* N, u32 n)
{
if (bn_sub_1(d, a, b, n))
bn_add_1(d, d, N, n);
@@ -83,7 +83,7 @@ static constexpr u8 inv256[0x80] = {
0x11, 0x3b, 0x5d, 0xc7, 0x49, 0x33, 0x55, 0xff,
};
static void bn_mon_muladd_dig(u8* d, u8* a, u8 b, u8* N, u32 n)
static void bn_mon_muladd_dig(u8* d, const u8* a, u8 b, const u8* N, u32 n)
{
const u8 z = -(d[n - 1] + a[n - 1] * b) * inv256[N[n - 1] / 2];
@@ -106,7 +106,7 @@ static void bn_mon_muladd_dig(u8* d, u8* a, u8 b, u8* N, u32 n)
bn_reduce(d, N, n);
}
static void bn_mon_mul(u8* d, u8* a, u8* b, u8* N, u32 n)
static void bn_mon_mul(u8* d, const u8* a, const u8* b, const u8* N, u32 n)
{
u8 t[512];
memset(t, 0, n);
@@ -117,13 +117,13 @@ static void bn_mon_mul(u8* d, u8* a, u8* b, u8* N, u32 n)
memcpy(d, t, n);
}
static void bn_to_mon(u8* d, u8* N, u32 n)
static void bn_to_mon(u8* d, const u8* N, u32 n)
{
for (u32 i = 0; i < 8 * n; i++)
bn_add(d, d, d, N, n);
}
static void bn_from_mon(u8* d, u8* N, u32 n)
static void bn_from_mon(u8* d, const u8* N, u32 n)
{
u8 t[512];
@@ -132,7 +132,7 @@ static void bn_from_mon(u8* d, u8* N, u32 n)
bn_mon_mul(d, d, t, N, n);
}
static void bn_mon_exp(u8* d, u8* a, u8* N, u32 n, u8* e, u32 en)
static void bn_mon_exp(u8* d, const u8* a, const u8* N, u32 n, const u8* e, u32 en)
{
u8 t[512];
@@ -153,7 +153,7 @@ static void bn_mon_exp(u8* d, u8* a, u8* N, u32 n, u8* e, u32 en)
}
}
static void bn_mon_inv(u8* d, u8* a, u8* N, u32 n)
static void bn_mon_inv(u8* d, const u8* a, const u8* N, u32 n)
{
u8 t[512], s[512];
@@ -179,7 +179,7 @@ static thread_local u8 ec_k[21]{};
static thread_local bool ec_curve_initialized{};
static thread_local bool ec_pub_initialized{};
static inline bool elt_is_zero(u8* d)
static inline bool elt_is_zero(const u8* d)
{
for (u32 i = 0; i < 20; i++)
if (d[i] != 0)
@@ -188,27 +188,27 @@ static inline bool elt_is_zero(u8* d)
return true;
}
static void elt_add(u8* d, u8* a, u8* b)
static void elt_add(u8* d, const u8* a, const u8* b)
{
bn_add(d, a, b, ec_p, 20);
}
static void elt_sub(u8* d, u8* a, u8* b)
static void elt_sub(u8* d, const u8* a, const u8* b)
{
bn_sub(d, a, b, ec_p, 20);
}
static void elt_mul(u8* d, u8* a, u8* b)
static void elt_mul(u8* d, const u8* a, const u8* b)
{
bn_mon_mul(d, a, b, ec_p, 20);
}
static void elt_square(u8* d, u8* a)
static void elt_square(u8* d, const u8* a)
{
elt_mul(d, a, a);
}
static void elt_inv(u8* d, u8* a)
static void elt_inv(u8* d, const u8* a)
{
u8 s[20];
memcpy(s, a, 20);
@@ -233,19 +233,19 @@ static inline void point_zero(point* p)
memset(p->y, 0, 20);
}
static inline bool point_is_zero(point* p)
static inline bool point_is_zero(const point* p)
{
return elt_is_zero(p->x) && elt_is_zero(p->y);
}
static void point_double(point* r, point* p)
static void point_double(point* r, const point* p)
{
u8 s[20], t[20];
point pp = *p;
u8* px = pp.x;
u8* py = pp.y;
const u8* px = pp.x;
const u8* py = pp.y;
u8* rx = r->x;
u8* ry = r->y;
@@ -272,17 +272,17 @@ static void point_double(point* r, point* p)
elt_sub(ry, ry, py); // ry = -s*(rx-px) - py
}
static void point_add(point* r, point* p, point* q)
static void point_add(point* r, const point* p, const point* q)
{
u8 s[20], t[20], u[20];
point pp = *p;
point qq = *q;
u8* px = pp.x;
u8* py = pp.y;
u8* qx = qq.x;
u8* qy = qq.y;
const u8* px = pp.x;
const u8* py = pp.y;
const u8* qx = qq.x;
const u8* qy = qq.y;
u8* rx = r->x;
u8* ry = r->y;
@@ -326,7 +326,7 @@ static void point_add(point* r, point* p, point* q)
elt_sub(ry, ry, py); // ry = -s*(rx-px) - py
}
static void point_mul(point* d, u8* a, point* b) // a is bignum
static void point_mul(point* d, const u8* a, const point* b) // a is bignum
{
point_zero(d);
@@ -341,7 +341,7 @@ static void point_mul(point* d, u8* a, point* b) // a is bignum
}
}
static bool check_ecdsa(struct point* Q, u8* R, u8* S, u8* hash)
static bool check_ecdsa(const struct point* Q, u8* R, u8* S, const u8* hash)
{
u8 Sinv[21];
u8 e[21];
@@ -417,7 +417,7 @@ void ecdsa_set_priv(const u8* k)
memcpy(ec_k, k, sizeof ec_k);
}
bool ecdsa_verify(u8* hash, u8* R, u8* S)
bool ecdsa_verify(const u8* hash, u8* R, u8* S)
{
return check_ecdsa(&ec_Q, R, S, hash);
}
+1 -1
View File
@@ -9,4 +9,4 @@
void ecdsa_set_curve(const u8* p, const u8* a, const u8* b, const u8* N, const u8* Gx, const u8* Gy);
void ecdsa_set_pub(const u8* Q);
void ecdsa_set_priv(const u8* k);
bool ecdsa_verify(u8* hash, u8* R, u8* S);
bool ecdsa_verify(const u8* hash, u8* R, u8* S);
+1 -1
View File
@@ -762,7 +762,7 @@ const u8* KeyVault::GetKlicenseeKey() const
return klicensee_key;
}
void rap_to_rif(unsigned char* rap, unsigned char* rif)
void rap_to_rif(const unsigned char* rap, unsigned char* rif)
{
int i;
int round;
+1 -1
View File
@@ -347,4 +347,4 @@ private:
};
// RAP to RIF function.
void rap_to_rif(unsigned char* rap, unsigned char* rif);
void rap_to_rif(const unsigned char* rap, unsigned char* rif);
+5 -7
View File
@@ -3,6 +3,7 @@
// http://www.gnu.org/licenses/gpl-2.0.txt
#include <string.h>
#include <vector>
#include "lz.h"
void decode_range(unsigned int *range, unsigned int *code, unsigned char **src)
@@ -123,19 +124,17 @@ int decompress(unsigned char *out, unsigned char *in, unsigned int size)
{
int result;
unsigned char *tmp = new unsigned char[0xCC8];
int offset = 0;
int bit_flag = 0;
int data_length = 0;
int data_offset = 0;
unsigned char *tmp_sect1, *tmp_sect2, *tmp_sect3;
unsigned char *buf_start, *buf_end;
const unsigned char *buf_start, *buf_end;
unsigned char prev = 0;
unsigned char *start = out;
unsigned char *end = (out + size);
const unsigned char *end = (out + size);
unsigned char head = in[0];
unsigned int range = 0xFFFFFFFF;
@@ -154,6 +153,8 @@ int decompress(unsigned char *out, unsigned char *in, unsigned int size)
else
{
// Set up a temporary buffer (sliding window).
std::vector<unsigned char> tmp_vec(0xCC8);
unsigned char* tmp = tmp_vec.data();
memset(tmp, 0x80, 0xCA8);
while (true)
{
@@ -254,14 +255,12 @@ int decompress(unsigned char *out, unsigned char *in, unsigned int size)
// Underflow.
if (buf_start < out)
{
delete[] tmp;
return -1;
}
// Overflow.
if (buf_end > end)
{
delete[] tmp;
return -1;
}
@@ -279,6 +278,5 @@ int decompress(unsigned char *out, unsigned char *in, unsigned int size)
}
result = static_cast<int>(start - out);
}
delete[] tmp;
return result;
}
+2 -5
View File
@@ -674,7 +674,7 @@ u128 GetEdatRifKeyFromRapFile(const fs::file& rap_file)
rap_file.read<u128>(rapkey);
rap_to_rif(reinterpret_cast<uchar*>(&rapkey), reinterpret_cast<uchar*>(&rifkey));
rap_to_rif(reinterpret_cast<const uchar*>(&rapkey), reinterpret_cast<uchar*>(&rifkey));
return rifkey;
}
@@ -709,12 +709,9 @@ bool VerifyEDATHeaderWithKLicense(const fs::file& input, const std::string& inpu
return false;
}
std::string_view sv{NPD.content_id, std::size(NPD.content_id)};
sv = sv.substr(0, sv.find_first_of('\0'));
if (npd_out)
{
memcpy(npd_out, &NPD, sizeof(NPD_HEADER));
*npd_out = NPD;
}
return true;
+6 -5
View File
@@ -16,10 +16,11 @@
LOG_CHANNEL(pkg_log, "PKG");
package_reader::package_reader(const std::string& path)
package_reader::package_reader(const std::string& path, fs::file file)
: m_path(path)
, m_file(std::move(file))
{
if (!m_file.open(path))
if (!m_file && !m_file.open(path))
{
pkg_log.error("PKG file not found!");
return;
@@ -119,7 +120,7 @@ bool package_reader::read_header()
return false;
}
if (u64{umax} / sizeof(PKGEntry) < m_header.file_count)
if (u64{umax} / sizeof(PKGEntry) < u64(m_header.file_count))
{
pkg_log.error("PKG file count is too large! (0x%x)", m_header.file_count);
return false;
@@ -505,7 +506,7 @@ bool package_reader::set_decryption_key()
}
std::memcpy(m_dec_key.data(), PKG_AES_KEY, m_dec_key.size());
if (std::vector<PKGEntry> entries; !read_entries(entries))
{
pkg_log.notice("PKG may be IDU, retrying with IDU key.");
@@ -527,7 +528,7 @@ bool package_reader::read_entries(std::vector<PKGEntry>& entries)
entries.clear();
entries.resize(m_header.file_count + BUF_PADDING / sizeof(PKGEntry) + 1);
const usz read_size = decrypt(0, m_header.file_count * sizeof(PKGEntry), m_dec_key.data(), entries.data());
const usz read_size = decrypt(0, m_header.file_count * sizeof(PKGEntry), m_header.pkg_platform == PKG_PLATFORM_TYPE_PSP_PSVITA ? PKG_AES_KEY2 : m_dec_key.data(), entries.data());
if (read_size < m_header.file_count * sizeof(PKGEntry))
{
+6 -1
View File
@@ -332,7 +332,7 @@ class package_reader
};
public:
package_reader(const std::string& path);
package_reader(const std::string& path, fs::file file = {});
~package_reader();
enum result
@@ -356,6 +356,11 @@ public:
void abort_extract();
fs::file &file()
{
return m_file;
}
private:
bool read_header();
bool read_metadata();
+1 -1
View File
@@ -104,7 +104,7 @@ std::vector<audio_device_enumerator::audio_device> cubeb_enumerator::get_output_
cubeb_dev_enum.error("cubeb_device_collection_destroy() failed: %i", err);
}
std::sort(device_list.begin(), device_list.end(), [](audio_device_enumerator::audio_device a, audio_device_enumerator::audio_device b)
std::sort(device_list.begin(), device_list.end(), [](const audio_device_enumerator::audio_device& a, const audio_device_enumerator::audio_device& b)
{
return a.name < b.name;
});
@@ -144,7 +144,7 @@ std::vector<audio_device_enumerator::audio_device> xaudio2_enumerator::get_outpu
device_list.emplace_back(dev);
}
std::sort(device_list.begin(), device_list.end(), [](audio_device_enumerator::audio_device a, audio_device_enumerator::audio_device b)
std::sort(device_list.begin(), device_list.end(), [](const audio_device_enumerator::audio_device& a, const audio_device_enumerator::audio_device& b)
{
return a.name < b.name;
});
+51 -33
View File
@@ -28,6 +28,10 @@ if(USE_ASAN)
set_source_files_properties(../../Utilities/Thread.cpp PROPERTIES COMPILE_DEFINITIONS USE_ASAN)
endif()
if(HAS_MEMORY_BREAKPOINTS)
target_compile_definitions(rpcs3_emu PRIVATE RPCS3_HAS_MEMORY_BREAKPOINTS)
endif()
target_link_libraries(rpcs3_emu
PRIVATE
3rdparty::zlib 3rdparty::yaml-cpp 3rdparty::zstd
@@ -42,7 +46,14 @@ target_link_libraries(rpcs3_emu
# For stdafx.h
target_include_directories(rpcs3_emu
PUBLIC
${PROJECT_SOURCE_DIR}/rpcs3)
${CMAKE_CURRENT_SOURCE_DIR}/../..
${CMAKE_CURRENT_SOURCE_DIR}/..
)
target_include_directories(rpcs3_emu
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty
)
# Utilities
target_sources(rpcs3_emu PRIVATE
@@ -139,8 +150,8 @@ target_sources(rpcs3_emu PRIVATE
)
if(USE_FAUDIO)
find_package(SDL2)
if(SDL2_FOUND AND SDL2_VERSION VERSION_GREATER_EQUAL 2.0.9)
find_package(SDL3)
if(SDL3_FOUND AND SDL3_VERSION VERSION_GREATER_EQUAL 3.2.0)
target_sources(rpcs3_emu PRIVATE
Audio/FAudio/FAudioBackend.cpp
Audio/FAudio/faudio_enumerator.cpp
@@ -490,34 +501,6 @@ target_sources(rpcs3_emu PRIVATE
RSX/Core/RSXDrawCommands.cpp
RSX/gcm_enums.cpp
RSX/gcm_printing.cpp
RSX/GL/GLCommonDecompiler.cpp
RSX/GL/GLCompute.cpp
RSX/GL/GLDMA.cpp
RSX/GL/GLDraw.cpp
RSX/GL/GLFragmentProgram.cpp
RSX/GL/GLGSRender.cpp
RSX/GL/GLHelpers.cpp
RSX/GL/GLOverlays.cpp
RSX/GL/GLPipelineCompiler.cpp
RSX/GL/GLPresent.cpp
RSX/GL/GLRenderTargets.cpp
RSX/GL/GLResolveHelper.cpp
RSX/GL/GLShaderInterpreter.cpp
RSX/GL/GLTexture.cpp
RSX/GL/GLTextureCache.cpp
RSX/GL/glutils/blitter.cpp
RSX/GL/glutils/buffer_object.cpp
RSX/GL/glutils/capabilities.cpp
RSX/GL/glutils/common.cpp
RSX/GL/glutils/fbo.cpp
RSX/GL/glutils/image.cpp
RSX/GL/glutils/program.cpp
RSX/GL/glutils/ring_buffer.cpp
RSX/GL/glutils/sampler.cpp
RSX/GL/GLVertexBuffers.cpp
RSX/GL/GLVertexProgram.cpp
RSX/GL/OpenGL.cpp
RSX/GL/upscalers/fsr1/fsr_pass.cpp
RSX/GSRender.cpp
RSX/Host/MM.cpp
RSX/Host/RSXDMAWriter.cpp
@@ -586,6 +569,39 @@ target_sources(rpcs3_emu PRIVATE
RSX/rsx_vertex_data.cpp
)
if(NOT ANDROID)
target_sources(rpcs3_emu PRIVATE
RSX/GL/GLCommonDecompiler.cpp
RSX/GL/GLCompute.cpp
RSX/GL/GLDMA.cpp
RSX/GL/GLDraw.cpp
RSX/GL/GLFragmentProgram.cpp
RSX/GL/GLGSRender.cpp
RSX/GL/GLHelpers.cpp
RSX/GL/GLOverlays.cpp
RSX/GL/GLPipelineCompiler.cpp
RSX/GL/GLPresent.cpp
RSX/GL/GLRenderTargets.cpp
RSX/GL/GLResolveHelper.cpp
RSX/GL/GLShaderInterpreter.cpp
RSX/GL/GLTexture.cpp
RSX/GL/GLTextureCache.cpp
RSX/GL/glutils/blitter.cpp
RSX/GL/glutils/buffer_object.cpp
RSX/GL/glutils/capabilities.cpp
RSX/GL/glutils/common.cpp
RSX/GL/glutils/fbo.cpp
RSX/GL/glutils/image.cpp
RSX/GL/glutils/program.cpp
RSX/GL/glutils/ring_buffer.cpp
RSX/GL/glutils/sampler.cpp
RSX/GL/GLVertexBuffers.cpp
RSX/GL/GLVertexProgram.cpp
RSX/GL/OpenGL.cpp
RSX/GL/upscalers/fsr1/fsr_pass.cpp
)
endif()
if(TARGET 3rdparty_vulkan)
target_sources(rpcs3_emu PRIVATE
RSX/VK/upscalers/fsr1/fsr_pass.cpp
@@ -597,8 +613,10 @@ if(TARGET 3rdparty_vulkan)
RSX/VK/vkutils/descriptors.cpp
RSX/VK/vkutils/image.cpp
RSX/VK/vkutils/image_helpers.cpp
RSX/VK/vkutils/instance.cpp
RSX/VK/vkutils/scratch.cpp
RSX/VK/vkutils/sync.cpp
RSX/VK/vkutils/swapchain.cpp
RSX/VK/vkutils/memory.cpp
RSX/VK/vkutils/device.cpp
RSX/VK/vkutils/sampler.cpp
@@ -635,7 +653,7 @@ endif()
target_link_libraries(rpcs3_emu
PUBLIC
3rdparty::ffmpeg 3rdparty::sdl2
3rdparty::ffmpeg 3rdparty::sdl3
3rdparty::opengl 3rdparty::stblib
3rdparty::vulkan 3rdparty::glew
3rdparty::libusb 3rdparty::wolfssl
@@ -652,7 +670,7 @@ endif()
if(USE_PRECOMPILED_HEADERS)
target_precompile_headers(rpcs3_emu PRIVATE "${PROJECT_SOURCE_DIR}/rpcs3/stdafx.h")
target_precompile_headers(rpcs3_emu PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../stdafx.h")
endif()
if(WAYLAND_FOUND)
@@ -136,6 +136,46 @@ namespace aarch64
#endif
}
std::string get_cpu_name()
{
std::map<u64, int> core_layout;
for (u32 i = 0; i < std::thread::hardware_concurrency(); ++i)
{
const auto midr = read_MIDR_EL1(i);
if (midr == umax)
{
break;
}
core_layout[midr]++;
}
if (core_layout.empty())
{
return {};
}
const cpu_entry_t* lowest_part_info = nullptr;
for (const auto& [midr, count] : core_layout)
{
const auto implementer_id = (midr >> 24) & 0xff;
const auto part_id = (midr >> 4) & 0xfff;
const auto part_info = find_cpu_part(implementer_id, part_id);
if (!part_info)
{
return {};
}
if (lowest_part_info == nullptr || lowest_part_info > part_info)
{
lowest_part_info = part_info;
}
}
return lowest_part_info ? lowest_part_info->name : "";
}
std::string get_cpu_brand()
{
// Fetch vendor and part numbers. ARM CPUs often have more than 1 architecture on the SoC, so we check all of them.
@@ -37,5 +37,6 @@ namespace aarch64
"xzr", ".", "sp"
};
std::string get_cpu_name();
std::string get_cpu_brand();
}
+41 -12
View File
@@ -10,11 +10,13 @@
#include <numeric>
#include <cmath>
#ifndef WITHOUT_OPENAL
#include "3rdparty/OpenAL/openal-soft/include/AL/alext.h"
#endif
LOG_CHANNEL(cellMic);
template<>
template <>
void fmt_class_string<CellMicInError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
@@ -43,7 +45,7 @@ void fmt_class_string<CellMicInError>::format(std::string& out, u64 arg)
});
}
template<>
template <>
void fmt_class_string<CellMicInErrorDsp>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
@@ -72,6 +74,22 @@ void fmt_class_string<CellMicInErrorDsp>::format(std::string& out, u64 arg)
});
}
namespace fmt
{
struct alc_error
{
ALCdevice* device{};
ALCenum error{};
};
}
template <>
void fmt_class_string<fmt::alc_error>::format(std::string& out, u64 arg)
{
const fmt::alc_error& obj = get_object(arg);
fmt::append(out, "0x%x='%s'", obj.error, alcGetString(obj.device, obj.error));
}
void mic_context::operator()()
{
// Timestep in microseconds
@@ -240,7 +258,6 @@ bool mic_context::check_device(u32 dev_num)
return device.is_registered();
}
// Static functions
template <u32 bytesize>
@@ -304,6 +321,7 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co
raw_samplingrate = raw_r;
num_channels = channels;
#ifndef WITHOUT_OPENAL
// Adjust number of channels depending on microphone type
switch (device_type)
{
@@ -446,7 +464,7 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co
if (ALCenum err = alcGetError(device); err != ALC_NO_ERROR || !device)
{
cellMic.error("Error opening capture device %s (error=0x%x, device=*0x%x)", devices[0].name, err, device);
cellMic.error("Error opening capture device %s (error=%s, device=*0x%x)", devices[0].name, fmt::alc_error{device, err}, device);
#ifdef _WIN32
cellMic.error("Make sure microphone use is authorized under \"Microphone privacy settings\" in windows configuration");
#endif
@@ -464,7 +482,7 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co
if (ALCenum err = alcGetError(device); err != ALC_NO_ERROR || !device)
{
// Ignore it and move on
cellMic.error("Error opening 2nd SingStar capture device %s (error=0x%x, device=*0x%x)", devices[1].name, err, device);
cellMic.error("Error opening 2nd SingStar capture device %s (error=%s, device=*0x%x)", devices[1].name, fmt::alc_error{device, err}, device);
}
else
{
@@ -482,10 +500,14 @@ error_code microphone_device::open_microphone(const u8 type, const u32 dsp_r, co
mic_opened = true;
return CELL_OK;
#else
return CELL_MICIN_ERROR_DEVICE_NOT_SUPPORT;
#endif
}
error_code microphone_device::close_microphone()
{
#ifndef WITHOUT_OPENAL
if (mic_started)
{
stop_microphone();
@@ -504,41 +526,44 @@ error_code microphone_device::close_microphone()
temp_buf.clear();
mic_opened = false;
#endif
return CELL_OK;
}
error_code microphone_device::start_microphone()
{
#ifndef WITHOUT_OPENAL
for (const mic_device& micdevice : devices)
{
alcCaptureStart(micdevice.device);
if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR)
{
cellMic.error("Error starting capture of device %s (error=0x%x)", micdevice.name, err);
cellMic.error("Error starting capture of device %s (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err});
stop_microphone();
return CELL_MICIN_ERROR_FATAL;
}
}
#endif
mic_started = true;
return CELL_OK;
}
error_code microphone_device::stop_microphone()
{
#ifndef WITHOUT_OPENAL
for (const mic_device& micdevice : devices)
{
alcCaptureStop(micdevice.device);
if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR)
{
cellMic.error("Error stopping capture of device %s (error=0x%x)", micdevice.name, err);
cellMic.error("Error stopping capture of device %s (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err});
}
}
#endif
mic_started = false;
return CELL_OK;
}
@@ -590,7 +615,7 @@ f32 microphone_device::calculate_energy_level()
sum_squares += normalized_sample * normalized_sample;
}
const f32 rms = num_samples > 0 ? std::sqrt(sum_squares / num_samples) : 0.0f;
const f32 rms = num_samples > 0 ? static_cast<f32>(std::sqrt(sum_squares / num_samples)) : 0.0f;
constexpr f32 decibels_max = 90.0f;
const f32 decibels_relative = 20.0f * std::log10(std::max(rms, 0.00001f));
const f32 decibels = decibels_max + (decibels_relative * 0.5f);
@@ -600,6 +625,7 @@ f32 microphone_device::calculate_energy_level()
u32 microphone_device::capture_audio()
{
#ifndef WITHOUT_OPENAL
ensure(sample_size > 0);
u32 num_samples = inbuf_size / sample_size;
@@ -611,7 +637,7 @@ u32 microphone_device::capture_audio()
if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR)
{
cellMic.error("Error getting number of captured samples of device %s (error=0x%x)", micdevice.name, err);
cellMic.error("Error getting number of captured samples of device %s (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err});
return CELL_MICIN_ERROR_FATAL;
}
@@ -629,11 +655,14 @@ u32 microphone_device::capture_audio()
if (ALCenum err = alcGetError(micdevice.device); err != ALC_NO_ERROR)
{
cellMic.error("Error capturing samples of device %s (error=0x%x)", micdevice.name, err);
cellMic.error("Error capturing samples of device %s (error=%s)", micdevice.name, fmt::alc_error{micdevice.device, err});
}
}
return num_samples;
#else
return 0;
#endif
}
// Private functions
+1 -1
View File
@@ -717,7 +717,7 @@ error_code cellPadGetData(u32 port_no, vm::ptr<CellPadData> data)
pad_get_data(port_no, data.get_ptr());
if (g_cfg.io.debug_overlay && !g_cfg.video.overlay && port_no == 0)
if (g_cfg.io.debug_overlay && !g_cfg.video.debug_overlay && port_no == 0)
{
show_debug_overlay(*data, *pad, config);
}
+4 -2
View File
@@ -1382,9 +1382,11 @@ error_code sceNpTrophyGetGameIcon(u32 context, u32 handle, vm::ptr<void> buffer,
return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT;
}
fs::file icon_file(vfs::get("/dev_hdd0/home/" + Emu.GetUsr() + "/trophy/" + ctxt->trp_name + "/ICON0.PNG"));
// Try to get icon in current language first
const std::string trophy_path = fmt::format("/dev_hdd0/home/%s/trophy/%s/", Emu.GetUsr(), ctxt->trp_name);
fs::file icon_file(vfs::get(fmt::format("%s/ICON0_%02d.PNG", trophy_path, static_cast<s32>(g_cfg.sys.language))));
if (!icon_file)
if (!icon_file && !icon_file.open(vfs::get(fmt::format("%s/ICON0.PNG", trophy_path))))
{
return SCE_NP_TROPHY_ERROR_UNKNOWN_FILE;
}
+58 -25
View File
@@ -26,6 +26,29 @@
#pragma GCC diagnostic ignored "-Wuninitialized"
#endif
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
void ppubreak(ppu_thread& ppu)
{
if (!g_breakpoint_handler.IsBreakOnBPM())
return;
if (!ppu.state.test_and_set(cpu_flag::dbg_pause))
{
ppu.check_state();
}
}
#define PPU_WRITE_8(addr, value) vm::write8(addr, value, &ppu);
#define PPU_WRITE_16(addr, value) vm::write16(addr, value, &ppu);
#define PPU_WRITE_32(addr, value) vm::write32(addr, value, &ppu);
#define PPU_WRITE_64(addr, value) vm::write64(addr, value, &ppu);
#else
#define PPU_WRITE_8(addr, value) vm::write8(addr, value);
#define PPU_WRITE_16(addr, value) vm::write16(addr, value);
#define PPU_WRITE_32(addr, value) vm::write32(addr, value);
#define PPU_WRITE_64(addr, value) vm::write64(addr, value);
#endif
extern bool is_debugger_present();
extern const ppu_decoder<ppu_itype> g_ppu_itype;
@@ -428,6 +451,14 @@ auto ppu_feed_data(ppu_thread& ppu, u64 addr)
auto value = vm::_ref<T>(vm::cast(addr));
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
if (g_breakpoint_handler.HasBreakpoint(addr, breakpoint_types::bp_read))
{
debugbp_log.success("BPMR: breakpoint reading 0x%x at 0x%x", value, addr);
ppubreak(ppu);
}
#endif
if constexpr (!((Flags == use_feed_data) || ...))
{
return value;
@@ -453,6 +484,7 @@ auto ppu_feed_data(ppu_thread& ppu, u64 addr)
{
// Reservation was lost
ppu.raddr = 0;
ppu.res_cached = 0;
}
}
else
@@ -472,6 +504,7 @@ auto ppu_feed_data(ppu_thread& ppu, u64 addr)
if (std::memcmp(buffer + offs, src, size))
{
ppu.raddr = 0;
ppu.res_cached = 0;
}
}
@@ -4274,7 +4307,7 @@ auto STVEBX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb];
const u8 eb = addr & 0xf;
vm::write8(vm::cast(addr), ppu.vr[op.vs]._u8[15 - eb]);
PPU_WRITE_8(vm::cast(addr), ppu.vr[op.vs]._u8[15 - eb]);
};
RETURN_(ppu, op);
}
@@ -4381,7 +4414,7 @@ auto STDX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb];
vm::write64(vm::cast(addr), ppu.gpr[op.rs]);
PPU_WRITE_64(vm::cast(addr), ppu.gpr[op.rs]);
};
RETURN_(ppu, op);
}
@@ -4407,7 +4440,7 @@ auto STWX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb];
vm::write32(vm::cast(addr), static_cast<u32>(ppu.gpr[op.rs]));
PPU_WRITE_32(vm::cast(addr), static_cast<u32>(ppu.gpr[op.rs]));
};
RETURN_(ppu, op);
}
@@ -4421,7 +4454,7 @@ auto STVEHX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = (op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb]) & ~1ULL;
const u8 eb = (addr & 0xf) >> 1;
vm::write16(vm::cast(addr), ppu.vr[op.vs]._u16[7 - eb]);
PPU_WRITE_16(vm::cast(addr), ppu.vr[op.vs]._u16[7 - eb]);
};
RETURN_(ppu, op);
}
@@ -4434,7 +4467,7 @@ auto STDUX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = ppu.gpr[op.ra] + ppu.gpr[op.rb];
vm::write64(vm::cast(addr), ppu.gpr[op.rs]);
PPU_WRITE_64(vm::cast(addr), ppu.gpr[op.rs]);
ppu.gpr[op.ra] = addr;
};
RETURN_(ppu, op);
@@ -4448,7 +4481,7 @@ auto STWUX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = ppu.gpr[op.ra] + ppu.gpr[op.rb];
vm::write32(vm::cast(addr), static_cast<u32>(ppu.gpr[op.rs]));
PPU_WRITE_32(vm::cast(addr), static_cast<u32>(ppu.gpr[op.rs]));
ppu.gpr[op.ra] = addr;
};
RETURN_(ppu, op);
@@ -4463,7 +4496,7 @@ auto STVEWX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = (op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb]) & ~3ULL;
const u8 eb = (addr & 0xf) >> 2;
vm::write32(vm::cast(addr), ppu.vr[op.vs]._u32[3 - eb]);
PPU_WRITE_32(vm::cast(addr), ppu.vr[op.vs]._u32[3 - eb]);
};
RETURN_(ppu, op);
}
@@ -4527,7 +4560,7 @@ auto STBX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb];
vm::write8(vm::cast(addr), static_cast<u8>(ppu.gpr[op.rs]));
PPU_WRITE_8(vm::cast(addr), static_cast<u8>(ppu.gpr[op.rs]));
};
RETURN_(ppu, op);
}
@@ -4639,7 +4672,7 @@ auto STBUX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = ppu.gpr[op.ra] + ppu.gpr[op.rb];
vm::write8(vm::cast(addr), static_cast<u8>(ppu.gpr[op.rs]));
PPU_WRITE_8(vm::cast(addr), static_cast<u8>(ppu.gpr[op.rs]));
ppu.gpr[op.ra] = addr;
};
RETURN_(ppu, op);
@@ -4883,7 +4916,7 @@ auto STHX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb];
vm::write16(vm::cast(addr), static_cast<u16>(ppu.gpr[op.rs]));
PPU_WRITE_16(vm::cast(addr), static_cast<u16>(ppu.gpr[op.rs]));
};
RETURN_(ppu, op);
}
@@ -4922,7 +4955,7 @@ auto STHUX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = ppu.gpr[op.ra] + ppu.gpr[op.rb];
vm::write16(vm::cast(addr), static_cast<u16>(ppu.gpr[op.rs]));
PPU_WRITE_16(vm::cast(addr), static_cast<u16>(ppu.gpr[op.rs]));
ppu.gpr[op.ra] = addr;
};
RETURN_(ppu, op);
@@ -5346,7 +5379,7 @@ auto STSWX()
u32 count = ppu.xer.cnt & 0x7F;
for (; count >= 4; count -= 4, addr += 4, op.rs = (op.rs + 1) & 31)
{
vm::write32(vm::cast(addr), static_cast<u32>(ppu.gpr[op.rs]));
PPU_WRITE_32(vm::cast(addr), static_cast<u32>(ppu.gpr[op.rs]));
}
if (count)
{
@@ -5354,7 +5387,7 @@ auto STSWX()
for (u32 byte = 0; byte < count; byte++)
{
u8 byte_value = static_cast<u8>(value >> ((3 ^ byte) * 8));
vm::write8(vm::cast(addr + byte), byte_value);
PPU_WRITE_8(vm::cast(addr + byte), byte_value);
}
}
};
@@ -5434,7 +5467,7 @@ auto STSWI()
{
if (N > 3)
{
vm::write32(vm::cast(addr), static_cast<u32>(ppu.gpr[reg]));
PPU_WRITE_32(vm::cast(addr), static_cast<u32>(ppu.gpr[reg]));
addr += 4;
N -= 4;
}
@@ -5444,7 +5477,7 @@ auto STSWI()
while (N > 0)
{
N = N - 1;
vm::write8(vm::cast(addr), (0xFF000000 & buf) >> 24);
PPU_WRITE_8(vm::cast(addr), (0xFF000000 & buf) >> 24);
buf <<= 8;
addr++;
}
@@ -5678,7 +5711,7 @@ auto STFIWX()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra ? ppu.gpr[op.ra] + ppu.gpr[op.rb] : ppu.gpr[op.rb];
vm::write32(vm::cast(addr), static_cast<u32>(std::bit_cast<u64>(ppu.fpr[op.frs])));
PPU_WRITE_32(vm::cast(addr), static_cast<u32>(std::bit_cast<u64>(ppu.fpr[op.frs])));
};
RETURN_(ppu, op);
}
@@ -5793,7 +5826,7 @@ auto STW()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra || 1 ? ppu.gpr[op.ra] + op.simm16 : op.simm16;
const u32 value = static_cast<u32>(ppu.gpr[op.rs]);
vm::write32(vm::cast(addr), value);
PPU_WRITE_32(vm::cast(addr), value);
//Insomniac engine v3 & v4 (newer R&C, Fuse, Resitance 3)
if (value == 0xAAAAAAAA) [[unlikely]]
@@ -5813,7 +5846,7 @@ auto STWU()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = ppu.gpr[op.ra] + op.simm16;
vm::write32(vm::cast(addr), static_cast<u32>(ppu.gpr[op.rs]));
PPU_WRITE_32(vm::cast(addr), static_cast<u32>(ppu.gpr[op.rs]));
ppu.gpr[op.ra] = addr;
};
RETURN_(ppu, op);
@@ -5827,7 +5860,7 @@ auto STB()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra || 1 ? ppu.gpr[op.ra] + op.simm16 : op.simm16;
vm::write8(vm::cast(addr), static_cast<u8>(ppu.gpr[op.rs]));
PPU_WRITE_8(vm::cast(addr), static_cast<u8>(ppu.gpr[op.rs]));
};
RETURN_(ppu, op);
}
@@ -5840,7 +5873,7 @@ auto STBU()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = ppu.gpr[op.ra] + op.simm16;
vm::write8(vm::cast(addr), static_cast<u8>(ppu.gpr[op.rs]));
PPU_WRITE_8(vm::cast(addr), static_cast<u8>(ppu.gpr[op.rs]));
ppu.gpr[op.ra] = addr;
};
RETURN_(ppu, op);
@@ -5908,7 +5941,7 @@ auto STH()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = op.ra || 1 ? ppu.gpr[op.ra] + op.simm16 : op.simm16;
vm::write16(vm::cast(addr), static_cast<u16>(ppu.gpr[op.rs]));
PPU_WRITE_16(vm::cast(addr), static_cast<u16>(ppu.gpr[op.rs]));
};
RETURN_(ppu, op);
}
@@ -5921,7 +5954,7 @@ auto STHU()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = ppu.gpr[op.ra] + op.simm16;
vm::write16(vm::cast(addr), static_cast<u16>(ppu.gpr[op.rs]));
PPU_WRITE_16(vm::cast(addr), static_cast<u16>(ppu.gpr[op.rs]));
ppu.gpr[op.ra] = addr;
};
RETURN_(ppu, op);
@@ -5953,7 +5986,7 @@ auto STMW()
u64 addr = op.ra ? ppu.gpr[op.ra] + op.simm16 : op.simm16;
for (u32 i = op.rs; i<32; ++i, addr += 4)
{
vm::write32(vm::cast(addr), static_cast<u32>(ppu.gpr[i]));
PPU_WRITE_32(vm::cast(addr), static_cast<u32>(ppu.gpr[i]));
}
};
RETURN_(ppu, op);
@@ -6115,7 +6148,7 @@ auto STD()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = (op.simm16 & ~3) + (op.ra ? ppu.gpr[op.ra] : 0);
vm::write64(vm::cast(addr), ppu.gpr[op.rs]);
PPU_WRITE_64(vm::cast(addr), ppu.gpr[op.rs]);
};
RETURN_(ppu, op);
}
@@ -6128,7 +6161,7 @@ auto STDU()
static const auto exec = [](ppu_thread& ppu, ppu_opcode_t op) {
const u64 addr = ppu.gpr[op.ra] + (op.simm16 & ~3);
vm::write64(vm::cast(addr), ppu.gpr[op.rs]);
PPU_WRITE_64(vm::cast(addr), ppu.gpr[op.rs]);
ppu.gpr[op.ra] = addr;
};
RETURN_(ppu, op);
+56 -2
View File
@@ -3103,7 +3103,18 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr)
ppu.last_faddr = 0;
}
ppu.rtime = vm::reservation_acquire(addr) & -128;
const u32 res_cached = ppu.res_cached;
if ((addr & -128) == (res_cached & -128))
{
// Reload "cached" reservation of previous succeeded conditional store
// This seems like a hardware feature according to cellSpursAddUrgentCommand function
ppu.rtime -= 128;
}
else
{
ppu.rtime = vm::reservation_acquire(addr) & -128;
}
be_t<u64> rdata;
@@ -3376,7 +3387,7 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
}
// Test if store address is on the same aligned 8-bytes memory as load
if (const u32 raddr = std::exchange(ppu.raddr, 0); raddr / 8 != addr / 8)
if (const u32 raddr = ppu.raddr; raddr / 8 != addr / 8)
{
// If not and it is on the same aligned 128-byte memory, proceed only if 128-byte reservations are enabled
// In realhw the store address can be at any address of the 128-byte cache line
@@ -3389,12 +3400,16 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
data += 0;
}
ppu.raddr = 0;
ppu.res_cached = 0;
return false;
}
}
if (old_data != data || rtime != (res & -128))
{
ppu.raddr = 0;
ppu.res_cached = 0;
return false;
}
@@ -3650,6 +3665,9 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
}
ppu.last_faddr = 0;
ppu.res_cached = ppu.raddr;
ppu.rtime += 128;
ppu.raddr = 0;
return true;
}
@@ -3669,6 +3687,8 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
ppu.res_notify = 0;
}
ppu.raddr = 0;
ppu.res_cached = 0;
return false;
}
@@ -4275,9 +4295,30 @@ extern void ppu_precompile(std::vector<std::string>& dir_queue, std::vector<ppu_
}
}
if (!src && !Emu.klic.empty() && src.open(path))
{
src = decrypt_self(src, reinterpret_cast<u8*>(&Emu.klic[0]));
if (src)
{
ppu_log.error("Possible missed KLIC for precompilation of '%s', please report to developers.", path);
// Ignore executables larger than 500KB to prevent a long pause on exitspawn
if (src.size() >= 500000)
{
g_progr_ftotal_bits -= file_size;
continue;
}
}
}
if (!src)
{
ppu_log.notice("Failed to decrypt '%s'", path);
g_progr_ftotal_bits -= file_size;
continue;
}
@@ -4459,9 +4500,22 @@ extern void ppu_precompile(std::vector<std::string>& dir_queue, std::vector<ppu_
}
}
if (!src && !Emu.klic.empty() && src.open(path))
{
src = decrypt_self(src, reinterpret_cast<u8*>(&Emu.klic[0]));
if (src)
{
ppu_log.error("Possible missed KLIC for precompilation of '%s', please report to developers.", path);
}
}
if (!src)
{
ppu_log.notice("Failed to decrypt '%s'", path);
g_progr_ftotal_bits -= file_size;
continue;
}
+1
View File
@@ -264,6 +264,7 @@ public:
u64 rtime{0};
alignas(64) std::byte rdata[128]{}; // Reservation data
bool use_full_rdata{};
u32 res_cached{0}; // Reservation "cached" addresss
u32 res_notify{0};
u64 res_notify_time{0};
+53 -44
View File
@@ -2915,7 +2915,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
// Result bounds
u32 lsa = entry_point;
u32 limit = 0x40000;
u32 limit = SPU_LS_SIZE;
if (g_cfg.core.spu_block_size == spu_block_size_type::giga)
{
@@ -3132,13 +3132,13 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
break;
}
if (target >= lsa && target < 0x40000)
if (target >= lsa && target < SPU_LS_SIZE)
{
// Possible jump table entry (absolute)
jt_abs.push_back(target);
}
if (target + start >= lsa && target + start < 0x40000)
if (target + start >= lsa && target + start < SPU_LS_SIZE)
{
// Possible jump table entry (relative)
jt_rel.push_back(target + start);
@@ -3607,7 +3607,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
}
}
while (lsa > 0 || limit < 0x40000)
while (lsa > 0 || limit < SPU_LS_SIZE)
{
const u32 initial_size = ::size32(result.data);
@@ -4001,7 +4001,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
bool need_repeat = false;
u32 start = 0;
u32 limit = 0x40000;
u32 limit = SPU_LS_SIZE;
// Walk block list in ascending order
for (auto& block : m_bbs)
@@ -4012,7 +4012,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
{
const auto upper = m_funcs.upper_bound(addr);
start = addr;
limit = upper == m_funcs.end() ? 0x40000 : upper->first;
limit = upper == m_funcs.end() ? SPU_LS_SIZE : upper->first;
}
// Find targets that exceed [start; limit) range and make new functions from them
@@ -4082,7 +4082,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
{
const u32 _old = ::at32(m_bbs, pred).chunk;
if (_old < 0x40000 && _old != _new)
if (_old < SPU_LS_SIZE && _old != _new)
{
// If block has multiple 'entry' points, it becomes an entry point itself
new_entries.push_back(addr);
@@ -4107,7 +4107,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
const u32 value = m_entry_info[target / 4] ? target : block.chunk;
if (u32& tval = tb.chunk; tval < 0x40000)
if (u32& tval = tb.chunk; tval < SPU_LS_SIZE)
{
// TODO: fix condition
if (tval != value && !m_entry_info[target / 4])
@@ -4139,7 +4139,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
for (auto& bb : m_bbs)
{
// Reset chunk info
bb.second.chunk = 0x40000;
bb.second.chunk = SPU_LS_SIZE;
}
}
@@ -4201,7 +4201,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
for (u32 i = 0; i < s_reg_max; i++)
{
if (block.reg_origin[i] == 0x80000000)
block.reg_origin[i] = 0x40000;
block.reg_origin[i] = SPU_LS_SIZE;
}
}
@@ -4210,7 +4210,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
for (u32 i = 0; i < s_reg_max; i++)
{
if (block.reg_origin_abs[i] == 0x80000000)
block.reg_origin_abs[i] = 0x40000;
block.reg_origin_abs[i] = SPU_LS_SIZE;
else if (block.reg_origin_abs[i] + 1 == 0)
block.reg_origin_abs[i] = -2;
}
@@ -4239,8 +4239,8 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
}
else if (tb.reg_origin[i] != expected)
{
// Set -1 if multiple origins merged (requires PHI node)
tb.reg_origin[i] = -1;
// Set umax if multiple origins merged (requires PHI node)
tb.reg_origin[i] = umax;
must_repeat |= !tb.targets.empty();
}
@@ -4256,9 +4256,9 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
}
else if (tb.reg_origin_abs[i] != expected)
{
if (tb.reg_origin_abs[i] == 0x40000 || expected + 2 == 0 || expected == 0x40000)
if (tb.reg_origin_abs[i] == SPU_LS_SIZE || expected + 2 == 0 || expected == SPU_LS_SIZE)
{
// Set -2: sticky value indicating possible external reg origin (0x40000)
// Set -2: sticky value indicating possible external reg origin (SPU_LS_SIZE)
tb.reg_origin_abs[i] = -2;
must_repeat |= !tb.targets.empty();
@@ -4288,9 +4288,9 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
// Reset values for the next attempt (keep negative values)
for (u32 i = 0; i < s_reg_max; i++)
{
if (block.reg_origin[i] <= 0x40000)
if (block.reg_origin[i] <= SPU_LS_SIZE)
block.reg_origin[i] = 0x80000000;
if (block.reg_origin_abs[i] <= 0x40000)
if (block.reg_origin_abs[i] <= SPU_LS_SIZE)
block.reg_origin_abs[i] = 0x80000000;
}
}
@@ -4323,21 +4323,21 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
bb.reg_val32[i] = src.reg_val32[i];
}
if (!bb.reg_save_dom[i] && bb.reg_use[i] && (orig == 0x40000 || orig + 2 == 0))
if (!bb.reg_save_dom[i] && bb.reg_use[i] && (orig == SPU_LS_SIZE || orig + 2 == 0))
{
// Destroy offset if external reg value is used
func.reg_save_off[i] = -1;
}
}
if (u32 orig = bb.reg_origin_abs[s_reg_sp]; orig < 0x40000)
if (u32 orig = bb.reg_origin_abs[s_reg_sp]; orig < SPU_LS_SIZE)
{
auto& prologue = ::at32(m_bbs, orig);
// Copy stack offset (from the assumed prologue)
bb.stack_sub = prologue.stack_sub;
}
else if (orig > 0x40000)
else if (orig > SPU_LS_SIZE)
{
// Unpredictable stack
bb.stack_sub = 0x80000000;
@@ -4510,7 +4510,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
}
// Check for funny values.
if (bb.stack_sub >= 0x40000 || bb.stack_sub % 16)
if (bb.stack_sub >= SPU_LS_SIZE || bb.stack_sub % 16)
{
bb.stack_sub = 0x80000000;
}
@@ -4603,7 +4603,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
{
bb.terminator = term_type::interrupt_call;
}
else if (last_inst != spu_itype::BISL && bb.targets[0] == tia + 4 && op.ra == s_reg_lr)
else if (last_inst != spu_itype::BISL && !bb.targets.empty() && bb.targets[0] == tia + 4 && op.ra == s_reg_lr)
{
// Conditional return (TODO)
bb.terminator = term_type::ret;
@@ -4659,7 +4659,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
if (is_ok && bb.terminator == term_type::ret)
{
// Check $LR (alternative return registers are currently not supported)
if (u32 lr_orig = bb.reg_mod[s_reg_lr] ? addr : bb.reg_origin_abs[s_reg_lr]; lr_orig < 0x40000)
if (u32 lr_orig = bb.reg_mod[s_reg_lr] ? addr : bb.reg_origin_abs[s_reg_lr]; lr_orig < SPU_LS_SIZE)
{
auto& src = ::at32(m_bbs, lr_orig);
@@ -4674,7 +4674,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
is_ok = false;
}
}
else if (lr_orig > 0x40000)
else if (lr_orig > SPU_LS_SIZE)
{
spu_log.todo("Function 0x%05x: [0x%05x] $LR unpredictable (src=0x%x)", f.first, addr, lr_orig);
is_ok = false;
@@ -4683,7 +4683,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
// Check $80..$127 (should be restored or unmodified)
for (u32 i = s_reg_80; is_ok && i <= s_reg_127; i++)
{
if (u32 orig = bb.reg_mod[i] ? addr : bb.reg_origin_abs[i]; orig < 0x40000)
if (u32 orig = bb.reg_mod[i] ? addr : bb.reg_origin_abs[i]; orig < SPU_LS_SIZE)
{
auto& src = ::at32(m_bbs, orig);
@@ -4693,7 +4693,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
is_ok = false;
}
}
else if (orig > 0x40000)
else if (orig > SPU_LS_SIZE)
{
spu_log.todo("Function 0x%05x: [0x%05x] $%u unpredictable (src=0x%x)", f.first, addr, i, orig);
is_ok = false;
@@ -4728,9 +4728,11 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
if (is_ok && bb.terminator == term_type::fallthrough)
{
// Can't just fall out of the function
if (bb.targets.size() != 1 || bb.targets[0] >= flim)
const auto bb_target_value = bb.targets.empty() ? 0 : bb.targets[0];
if (bb.targets.size() != 1 || bb_target_value >= flim)
{
spu_log.error("Function 0x%05x: [0x%05x] bad fallthrough to 0x%x", f.first, addr, bb.targets[0]);
spu_log.error("Function 0x%05x: [0x%05x] bad fallthrough to 0x%x", f.first, addr, bb_target_value);
is_ok = false;
}
}
@@ -5227,7 +5229,7 @@ spu_program spu_recompiler_base::analyse(const be_t<u32>* ls, u32 entry_point, s
auto& block = infos[bpc];
if (pos == entry_point || (g_cfg.core.spu_block_size != spu_block_size_type::safe && (m_ret_info[bpc / 4] || m_entry_info[bpc / 4])))
if (bpc == entry_point || (g_cfg.core.spu_block_size != spu_block_size_type::safe && (m_ret_info[bpc / 4] || m_entry_info[bpc / 4])))
{
// Do not allow value passthrough
for (reg_state_t& f : block->start_reg_state)
@@ -7267,6 +7269,24 @@ void spu_recompiler_base::dump(const spu_program& result, std::string& out)
for (auto& bb : m_bbs)
{
if (m_block_info[bb.first / 4])
{
fmt::append(out, "A: [0x%05x] %s\n", bb.first, m_entry_info[bb.first / 4] ? (m_ret_info[bb.first / 4] ? "Chunk" : "Entry") : "Block");
fmt::append(out, "\t F: 0x%05x\n", bb.second.func);
for (u32 pred : bb.second.preds)
{
fmt::append(out, "\t <- 0x%05x\n", pred);
}
}
else
{
fmt::append(out, "A: [0x%05x] ?\n", bb.first);
}
out += "\n";
for (u32 pos = bb.first, end = bb.first + bb.second.size * 4; pos < end; pos += 4)
{
dis_asm.disasm(pos);
@@ -7283,24 +7303,11 @@ void spu_recompiler_base::dump(const spu_program& result, std::string& out)
if (m_block_info[bb.first / 4])
{
fmt::append(out, "A: [0x%05x] %s\n", bb.first, m_entry_info[bb.first / 4] ? (m_ret_info[bb.first / 4] ? "Chunk" : "Entry") : "Block");
fmt::append(out, "\tF: 0x%05x\n", bb.second.func);
for (u32 pred : bb.second.preds)
{
fmt::append(out, "\t<- 0x%05x\n", pred);
}
for (u32 target : bb.second.targets)
{
fmt::append(out, "\t-> 0x%05x%s\n", target, m_bbs.count(target) ? "" : " (null)");
}
}
else
{
fmt::append(out, "A: [0x%05x] ?\n", bb.first);
}
out += '\n';
}
@@ -8149,7 +8156,7 @@ std::array<reg_state_t, s_reg_max>& block_reg_info::evaluate_start_state(const s
auto& res_state = is_all_resolved ? cur_node->start_reg_state : temp;
for (usz bi = 0; bi < it->state_prev.size(); bi++)
for (usz bi = 0, is_first = 1; bi < it->state_prev.size(); bi++)
{
if (it->state_prev[bi].disconnected)
{
@@ -8173,7 +8180,7 @@ std::array<reg_state_t, s_reg_max>& block_reg_info::evaluate_start_state(const s
ensure(it->state_prev[bi].state_written);
}
if (bi == 0)
if (is_first)
{
res_state = *arg_state;
}
@@ -8181,6 +8188,8 @@ std::array<reg_state_t, s_reg_max>& block_reg_info::evaluate_start_state(const s
{
merge(res_state, res_state, *arg_state, it->block_pc);
}
is_first = 0;
}
std::array<reg_state_t, s_reg_max>* result_storage{};
+53 -27
View File
@@ -5,6 +5,7 @@
#include "Emu/system_config.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/timers.hpp"
#include "Emu/Cell/lv2/sys_time.h"
#include "Emu/Memory/vm_reservation.h"
#include "Emu/RSX/Core/RSXReservationLock.hpp"
#include "Crypto/sha1.h"
@@ -1530,8 +1531,6 @@ public:
return add_loc->compiled;
}
std::string log;
bool add_to_file = false;
if (auto& cache = g_fxo->get<spu_cache>(); cache && g_cfg.core.spu_cache && !add_loc->cached.exchange(1))
@@ -1565,10 +1564,35 @@ public:
m_pp_id = 0;
std::string function_log;
this->dump(func, function_log);
bool to_log_func = false;
if (g_cfg.core.spu_debug && !add_loc->logged.exchange(1))
{
this->dump(func, log);
fs::write_file(m_spurt->get_cache_path() + "spu.log", fs::write + fs::append, log);
if (!fs::write_file(m_spurt->get_cache_path() + "spu.log", fs::write + fs::append, function_log))
{
// Fallback: write to main log
to_log_func = true;
}
}
for (u32 data : func.data)
{
const spu_opcode_t op{std::bit_cast<be_t<u32>>(data)};
const auto itype = g_spu_itype.decode(op.opcode);
if (itype == spu_itype::RDCH && op.ra == SPU_RdDec)
{
to_log_func = true;
}
}
if (to_log_func)
{
spu_log.notice("Function %s dump:\n%s", m_hash, function_log);
}
using namespace llvm;
@@ -2054,7 +2078,7 @@ public:
_phi->addIncoming(value, &m_function->getEntryBlock());
}
}
else if (src < 0x40000)
else if (src < SPU_LS_SIZE)
{
// Passthrough register value
const auto bfound = m_blocks.find(src);
@@ -2714,11 +2738,13 @@ public:
m_function_queue.clear();
m_function_table = nullptr;
raw_string_ostream out(log);
// Append for now
std::string& llvm_log = function_log;
raw_string_ostream out(llvm_log);
if (g_cfg.core.spu_debug)
{
fmt::append(log, "LLVM IR at 0x%x:\n", func.entry_point);
fmt::append(llvm_log, "LLVM IR at 0x%x:\n", func.entry_point);
out << *_module; // print IR
out << "\n\n";
}
@@ -2726,11 +2752,11 @@ public:
if (verifyModule(*_module, &out))
{
out.flush();
spu_log.error("LLVM: Verification failed at 0x%x:\n%s", func.entry_point, log);
spu_log.error("LLVM: Verification failed at 0x%x:\n%s", func.entry_point, llvm_log);
if (g_cfg.core.spu_debug)
{
fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::write + fs::append, log);
fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::write + fs::append, llvm_log);
}
if (auto& cache = g_fxo->get<spu_cache>())
@@ -2785,7 +2811,7 @@ public:
if (g_cfg.core.spu_debug)
{
out.flush();
fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::create + fs::write + fs::append, log);
fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::create + fs::write + fs::append, llvm_log);
}
#if defined(__APPLE__)
@@ -3181,13 +3207,12 @@ public:
run_transforms(f);
}
std::string log;
raw_string_ostream out(log);
std::string llvm_log;
raw_string_ostream out(llvm_log);
if (g_cfg.core.spu_debug)
{
fmt::append(log, "LLVM IR (interpreter):\n");
fmt::append(llvm_log, "LLVM IR (interpreter):\n");
out << *_module; // print IR
out << "\n\n";
}
@@ -3195,11 +3220,11 @@ public:
if (verifyModule(*_module, &out))
{
out.flush();
spu_log.error("LLVM: Verification failed:\n%s", log);
spu_log.error("LLVM: Verification failed:\n%s", llvm_log);
if (g_cfg.core.spu_debug)
{
fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::create + fs::write + fs::append, log);
fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::create + fs::write + fs::append, llvm_log);
}
fmt::throw_exception("Compilation failed");
@@ -3234,7 +3259,7 @@ public:
if (g_cfg.core.spu_debug)
{
out.flush();
fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::create + fs::write + fs::append, log);
fs::write_file(m_spurt->get_cache_path() + "spu-ir.log", fs::create + fs::write + fs::append, llvm_log);
}
return spu_runtime::g_interpreter;
@@ -3482,13 +3507,13 @@ public:
#if defined(ARCH_X64)
if (utils::get_tsc_freq() && !(g_cfg.core.spu_loop_detection) && (g_cfg.core.clocks_scale == 100))
{
const auto timebase_offs = m_ir->CreateLoad(get_type<u64>(), m_ir->CreateIntToPtr(m_ir->getInt64(reinterpret_cast<u64>(&g_timebase_offs)), get_type<u64*>()));
const auto timestamp = m_ir->CreateLoad(get_type<u64>(), spu_ptr<u64>(&spu_thread::ch_dec_start_timestamp));
const auto dec_value = m_ir->CreateLoad(get_type<u32>(), spu_ptr<u32>(&spu_thread::ch_dec_value));
const auto tsc = m_ir->CreateCall(get_intrinsic(llvm::Intrinsic::x86_rdtsc));
const auto tscx = m_ir->CreateMul(m_ir->CreateUDiv(tsc, m_ir->getInt64(utils::get_tsc_freq())), m_ir->getInt64(80000000));
const auto tscm = m_ir->CreateUDiv(m_ir->CreateMul(m_ir->CreateURem(tsc, m_ir->getInt64(utils::get_tsc_freq())), m_ir->getInt64(80000000)), m_ir->getInt64(utils::get_tsc_freq()));
const auto tsctb = m_ir->CreateAdd(tscx, tscm);
const auto tsctb = m_ir->CreateSub(m_ir->CreateAdd(tscx, tscm), timebase_offs);
const auto frz = m_ir->CreateLoad(get_type<u8>(), spu_ptr<u8>(&spu_thread::is_dec_frozen));
const auto frzev = m_ir->CreateICmpEQ(frz, m_ir->getInt8(0));
@@ -4305,10 +4330,11 @@ public:
#if defined(ARCH_X64)
if (utils::get_tsc_freq() && !(g_cfg.core.spu_loop_detection) && (g_cfg.core.clocks_scale == 100))
{
const auto timebase_offs = m_ir->CreateLoad(get_type<u64>(), m_ir->CreateIntToPtr(m_ir->getInt64(reinterpret_cast<u64>(&g_timebase_offs)), get_type<u64*>()));
const auto tsc = m_ir->CreateCall(get_intrinsic(llvm::Intrinsic::x86_rdtsc));
const auto tscx = m_ir->CreateMul(m_ir->CreateUDiv(tsc, m_ir->getInt64(utils::get_tsc_freq())), m_ir->getInt64(80000000));
const auto tscm = m_ir->CreateUDiv(m_ir->CreateMul(m_ir->CreateURem(tsc, m_ir->getInt64(utils::get_tsc_freq())), m_ir->getInt64(80000000)), m_ir->getInt64(utils::get_tsc_freq()));
const auto tsctb = m_ir->CreateAdd(tscx, tscm);
const auto tsctb = m_ir->CreateSub(m_ir->CreateAdd(tscx, tscm), timebase_offs);
m_ir->CreateStore(tsctb, spu_ptr<u64>(&spu_thread::ch_dec_start_timestamp));
}
else
@@ -5868,13 +5894,13 @@ public:
{
if (perm_only)
{
set_vr(op.rt4, vperm2b256to128(as, b, c));
set_vr(op.rt4, vperm2b(as, b, c));
return;
}
const auto m = gf2p8affineqb(c, build<u8[16]>(0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20), 0x7f);
const auto mm = select(noncast<s8[16]>(m) >= 0, splat<u8[16]>(0), m);
const auto ab = vperm2b256to128(as, b, c);
const auto ab = vperm2b(as, b, c);
set_vr(op.rt4, select(noncast<s8[16]>(c) >= 0, ab, mm));
return;
}
@@ -5918,13 +5944,13 @@ public:
{
if (perm_only)
{
set_vr(op.rt4, vperm2b256to128(a, b, eval(c ^ 0xf)));
set_vr(op.rt4, vperm2b(a, b, eval(c ^ 0xf)));
return;
}
const auto m = gf2p8affineqb(c, build<u8[16]>(0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20), 0x7f);
const auto mm = select(noncast<s8[16]>(m) >= 0, splat<u8[16]>(0), m);
const auto ab = vperm2b256to128(a, b, eval(c ^ 0xf));
const auto ab = vperm2b(a, b, eval(c ^ 0xf));
set_vr(op.rt4, select(noncast<s8[16]>(c) >= 0, ab, mm));
return;
}
@@ -5936,13 +5962,13 @@ public:
{
if (perm_only)
{
set_vr(op.rt4, vperm2b256to128(b, a, eval(c ^ 0x1f)));
set_vr(op.rt4, vperm2b(b, a, eval(c ^ 0x1f)));
return;
}
const auto m = gf2p8affineqb(c, build<u8[16]>(0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20), 0x7f);
const auto mm = select(noncast<s8[16]>(m) >= 0, splat<u8[16]>(0), m);
const auto ab = vperm2b256to128(b, a, eval(c ^ 0x1f));
const auto ab = vperm2b(b, a, eval(c ^ 0x1f));
set_vr(op.rt4, select(noncast<s8[16]>(c) >= 0, ab, mm));
return;
}
@@ -6833,7 +6859,7 @@ public:
const auto div_result = the_one / div;
return vfixupimmps(bitcast<f32[4]>(splat<u32[4]>(0xFFFFFFFFu)), div_result, splat<u32[4]>(0x11001188u), 0, 0xff);
return vfixupimmps(div_result, div_result, splat<u32[4]>(0x00220088u), 0, 0xff);
});
}
else
+28 -9
View File
@@ -1204,18 +1204,30 @@ void spu_thread::dump_regs(std::string& ret, std::any& /*custom_data*/) const
std::vector<v128> gpr_saved(128);
be_t<u32> rdata_saved[32]{};
be_t<u32> lsa_saved[32]{};
spu_mfc_cmd mfc_regs_saved{};
u32 saved_pc = umax;
const u8* lsa_state_ptr = nullptr;
const u8* lsa_ptr = _ptr<u8>(ch_mfc_cmd.lsa);
// Load PC, GPRs and reservation data atomically
// We may not load the entire context atomically, but there is importance their state being intact for debugging
do
{
saved_pc = pc;
// Account for list transfer: record EAL instead
mfc_regs_saved = ch_mfc_cmd;
lsa_state_ptr = _ptr<const u8>(mfc_regs_saved.eal < SPU_LS_SIZE && mfc_regs_saved.eal % 8 == 0 ? mfc_regs_saved.eal : mfc_regs_saved.lsa);
std::memcpy(gpr_saved.data(), gpr.data(), sizeof(v128) * gpr.size());
std::memcpy(rdata_saved, rdata, sizeof(rdata));
std::memcpy(lsa_saved, lsa_state_ptr, std::min<usz>(128, SPU_LS_SIZE - (lsa_state_ptr - _ptr<u8>(0))));
atomic_fence_acquire();
}
while (saved_pc != pc || std::memcmp(rdata_saved, rdata, sizeof(rdata)) != 0 || std::memcmp(gpr_saved.data(), gpr.data(), sizeof(v128) * gpr.size()) != 0);
while (saved_pc != pc || std::memcmp(rdata_saved, rdata, sizeof(rdata)) != 0 || std::memcmp(gpr_saved.data(), gpr.data(), sizeof(v128) * gpr.size()) != 0
|| std::memcmp(&mfc_regs_saved, &ch_mfc_cmd, sizeof(mfc_regs_saved)) != 0 || std::memcmp(lsa_saved, lsa_state_ptr, std::min<usz>(128, SPU_LS_SIZE - (lsa_state_ptr - _ptr<u8>(0)))) != 0);
for (u32 i = 0; i < 128; i++, ret += '\n')
{
@@ -1350,6 +1362,7 @@ void spu_thread::dump_regs(std::string& ret, std::any& /*custom_data*/) const
fmt::append(ret, "SNR config: 0x%llx\n", snr_config);
fmt::append(ret, "SNR1: %s\n", ch_snr1);
fmt::append(ret, "SNR2: %s\n", ch_snr2);
fmt::append(ret, "Last WrDec: %-9d (0x%08x) (%s)\n", ch_dec_value, ch_dec_value, is_dec_frozen ? "suspend" : "running");
if (get_type() != spu_type::threaded)
{
@@ -1388,6 +1401,14 @@ void spu_thread::dump_regs(std::string& ret, std::any& /*custom_data*/) const
fmt::append(ret, "[0x%02x] %08x %08x %08x %08x\n", i * sizeof(rdata_saved[0])
, rdata_saved[i + 0], rdata_saved[i + 1], rdata_saved[i + 2], rdata_saved[i + 3]);
}
fmt::append(ret, "\nLSA Data:\n");
for (usz i = 0; i < std::size(lsa_saved); i += 4)
{
fmt::append(ret, "[0x%02x] %08x %08x %08x %08x\n", i * sizeof(lsa_saved[0])
, lsa_saved[i + 0], lsa_saved[i + 1], lsa_saved[i + 2], lsa_saved[i + 3]);
}
}
std::string spu_thread::dump_callstack() const
@@ -4615,15 +4636,15 @@ bool spu_thread::process_mfc_cmd()
if (getllar_busy_waiting_switch == umax && getllar_spin_count == 4)
{
const u32 percent = g_cfg.core.spu_getllar_busy_waiting_percentage;
// Hidden value to force busy waiting (100 to 1 are dynamically adjusted, 0 is not)
if (percent != 101)
if (!g_cfg.core.spu_getllar_spin_optimization_disabled)
{
const u32 percent = g_cfg.core.spu_getllar_busy_waiting_percentage;
// Predict whether or not to use operating system sleep based on history
auto& stats = getllar_wait_time[(addr % SPU_LS_SIZE) / 128];
const auto old_stats = stats;
const std::array<u8, 4> old_stats = stats;
std::array<u8, 4> new_stats{};
// Rotate history (prepare newest entry)
@@ -4640,7 +4661,7 @@ bool spu_thread::process_mfc_cmd()
for (u8 val : old_stats)
{
total_wait += val;
zero_count += (val == 0 ? 1 : 0);
if (val == 0) ++zero_count;
}
// Add to chance if previous wait was long enough
@@ -4675,10 +4696,8 @@ bool spu_thread::process_mfc_cmd()
// Don't be stubborn, force operating sleep if too much time has passed
else if (getllar_busy_waiting_switch == 1 && perf0.get() > getllar_evaluate_time && perf0.get() - getllar_evaluate_time >= 400'000)
{
const u32 percent = g_cfg.core.spu_getllar_busy_waiting_percentage;
// Hidden value to force busy waiting
if (percent != 101)
if (!g_cfg.core.spu_getllar_spin_optimization_disabled)
{
spu_log.trace("SPU wait for 0x%x", addr);
getllar_wait_time[(addr % SPU_LS_SIZE) / 128].front() = 1;
@@ -141,7 +141,8 @@ s32 lv2_socket_p2p::bind(const sys_net_sockaddr& addr)
p2p_vport++;
}
}
else if (pport.bound_p2p_vports.contains(p2p_vport))
if (pport.bound_p2p_vports.contains(p2p_vport))
{
// Check that all other sockets are SO_REUSEADDR or SO_REUSEPORT
auto& bound_sockets = ::at32(pport.bound_p2p_vports, p2p_vport);
@@ -133,12 +133,12 @@ sys_net_sockaddr native_addr_to_sys_net_addr(const ::sockaddr_storage& native_ad
sys_net_sockaddr sn_addr;
sys_net_sockaddr_in* paddr = reinterpret_cast<sys_net_sockaddr_in*>(&sn_addr);
*paddr = {};
paddr->sin_len = sizeof(sys_net_sockaddr_in);
paddr->sin_family = SYS_NET_AF_INET;
paddr->sin_port = std::bit_cast<be_t<u16>, u16>(reinterpret_cast<const sockaddr_in*>(&native_addr)->sin_port);
paddr->sin_addr = std::bit_cast<be_t<u32>, u32>(reinterpret_cast<const sockaddr_in*>(&native_addr)->sin_addr.s_addr);
paddr->sin_zero = 0;
return sn_addr;
}
+7 -7
View File
@@ -9,7 +9,7 @@
#include "util/sysinfo.hpp"
static u64 timebase_offset;
u64 g_timebase_offs{};
static u64 systemtime_offset;
#ifndef __linux__
@@ -145,8 +145,8 @@ static constexpr u64 g_timebase_freq = /*79800000*/ 80000000ull; // 80 Mhz
u64 convert_to_timebased_time(u64 time)
{
const u64 result = time * (g_timebase_freq / 1000000ull) * g_cfg.core.clocks_scale / 100u;
ensure(result >= timebase_offset);
return result - timebase_offset;
ensure(result >= g_timebase_offs);
return result - g_timebase_offs;
}
u64 get_timebased_time()
@@ -160,7 +160,7 @@ u64 get_timebased_time()
#else
const u64 result = (tsc / freq * g_timebase_freq + tsc % freq * g_timebase_freq / freq) * g_cfg.core.clocks_scale / 100u;
#endif
return result - timebase_offset;
return result - g_timebase_offs;
}
while (true)
@@ -183,7 +183,7 @@ u64 get_timebased_time()
const u64 result = (static_cast<u64>(ts.tv_sec) * g_timebase_freq + static_cast<u64>(ts.tv_nsec) * g_timebase_freq / 1000000000ull) * g_cfg.core.clocks_scale / 100u;
#endif
if (result) return result - timebase_offset;
if (result) return result - g_timebase_offs;
}
}
@@ -192,7 +192,7 @@ u64 get_timebased_time()
// If none-zero arg is specified it will become the base time (for savestates)
void initialize_timebased_time(u64 timebased_init, bool reset)
{
timebase_offset = 0;
g_timebase_offs = 0;
if (reset)
{
@@ -204,7 +204,7 @@ void initialize_timebased_time(u64 timebased_init, bool reset)
const u64 current = get_timebased_time();
timebased_init = current - timebased_init;
timebase_offset = timebased_init;
g_timebase_offs = timebased_init;
systemtime_offset = timebased_init / (g_timebase_freq / 1000000);
}
+2
View File
@@ -11,3 +11,5 @@ error_code sys_time_get_current_time(vm::ptr<s64> sec, vm::ptr<s64> nsec);
error_code sys_time_set_current_time(s64 sec, s64 nsec);
u64 sys_time_get_timebase_frequency();
error_code sys_time_get_rtc(vm::ptr<u64> rtc);
extern u64 g_timebase_offs;
+2 -1
View File
@@ -591,7 +591,8 @@ usb_handler_thread::~usb_handler_thread()
}
#if LIBUSB_API_VERSION >= 0x01000102
libusb_hotplug_deregister_callback(ctx, callback_handle);
if (ctx && hotplug_supported)
libusb_hotplug_deregister_callback(ctx, callback_handle);
#endif
if (ctx)
+1 -1
View File
@@ -121,7 +121,7 @@ void gdb_thread::start_server()
// IPv4 address:port in format 127.0.0.1:2345
static const std::regex ipv4_regex("^([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})\\:([0-9]{1,5})$");
auto [sname, sshared] = g_cfg.misc.gdb_server.get();
auto sname = g_cfg.misc.gdb_server.to_string();
if (sname[0] == '\0')
{
+1 -1
View File
@@ -3,7 +3,7 @@
#include "Utilities/Thread.h"
#include "util/logs.hpp"
#include "Emu/Memory/vm.h"
#include "../pine/pine_server.h"
#include "3rdparty/pine/pine_server.h"
LOG_CHANNEL(IPC);
+1 -1
View File
@@ -217,7 +217,7 @@ u32 dimensions_toypad::scramble(const std::array<u8, 7>& uid, u8 count)
return read_from_ptr<be_t<u32>>(dimensions_randomize(to_scramble, count).data());
}
std::array<u8, 4> dimensions_toypad::dimensions_randomize(const std::vector<u8> key, u8 count)
std::array<u8, 4> dimensions_toypad::dimensions_randomize(const std::vector<u8>& key, u8 count)
{
u32 scrambled = 0;
for (u8 i = 0; i < count; i++)
+1 -1
View File
@@ -49,7 +49,7 @@ private:
static std::array<u8, 16> generate_figure_key(const std::array<u8, 0x2D * 0x04>& buf);
static u32 scramble(const std::array<u8, 7>& uid, u8 count);
static std::array<u8, 4> pwd_generate(const std::array<u8, 7>& uid);
static std::array<u8, 4> dimensions_randomize(const std::vector<u8> key, u8 count);
static std::array<u8, 4> dimensions_randomize(const std::vector<u8>& key, u8 count);
static u32 get_figure_id(const std::array<u8, 0x2D * 0x04>& buf);
u32 get_next();
dimensions_figure& get_figure_by_index(u8 index);
+4 -4
View File
@@ -43,10 +43,10 @@ private:
infinity_figure& get_figure_by_order(u8 order_added);
u8 derive_figure_position(u8 position);
u32 random_a;
u32 random_b;
u32 random_c;
u32 random_d;
u32 random_a = 0;
u32 random_b = 0;
u32 random_c = 0;
u32 random_d = 0;
u8 m_figure_order = 0;
std::queue<std::array<u8, 32>> m_figure_added_removed_responses;
-5
View File
@@ -10,11 +10,6 @@ public:
b_has_pressure_intensity_button = false;
}
bool Init() override
{
return true;
}
void init_config(cfg_pad* cfg) override
{
if (!cfg) return;
+16
View File
@@ -752,6 +752,22 @@ void PadHandlerBase::process()
pad->move_data.orientation_enabled = b_has_orientation && device->config && device->config->orientation_enabled.get();
// Disable pad vibration if no new data was sent for 3 seconds
if (pad->m_last_rumble_time_us > 0)
{
std::lock_guard lock(pad::g_pad_mutex);
if ((get_system_time() - pad->m_last_rumble_time_us) > 3'000'000)
{
for (VibrateMotor& motor : pad->m_vibrateMotors)
{
motor.m_value = 0;
}
pad->m_last_rumble_time_us = 0;
}
}
const connection status = update_connection(device);
switch (status)
+4 -1
View File
@@ -50,6 +50,9 @@ public:
color color_override{};
bool color_override_active{};
bool enable_player_leds{};
bool update_player_leds{true};
std::shared_ptr<FusionAhrs> ahrs; // Used to calculate quaternions from sensor data
u64 last_ahrs_update_time_us = 0; // Last ahrs update
@@ -307,7 +310,7 @@ public:
};
std::vector<pad_ensemble>& bindings() { return m_bindings; }
std::string name_string() const { return m_name_string; }
const std::string& name_string() const { return m_name_string; }
usz max_devices() const { return m_max_devices; }
bool has_config() const { return b_has_config; }
bool has_rumble() const { return b_has_rumble; }
+2 -2
View File
@@ -40,7 +40,7 @@ public:
{
std::lock_guard lock(m_mutex);
if (cfg_pad_btn<T>* item = get_button(id))
if (const cfg_pad_btn<T>* item = get_button(id))
{
return item->get();
}
@@ -52,7 +52,7 @@ public:
{
std::lock_guard lock(m_mutex);
if (cfg_pad_btn<T>* item = get_button(id))
if (const cfg_pad_btn<T>* item = get_button(id))
{
return item->get_default();
}
+1 -1
View File
@@ -19,7 +19,7 @@ void fmt_class_string<pad_handler>::format(std::string& out, u64 arg)
case pad_handler::xinput: return "XInput";
case pad_handler::mm: return "MMJoystick";
#endif
#ifdef HAVE_SDL2
#ifdef HAVE_SDL3
case pad_handler::sdl: return "SDL";
#endif
#ifdef HAVE_LIBEVDEV
+1 -1
View File
@@ -15,7 +15,7 @@ enum class pad_handler
xinput,
mm,
#endif
#ifdef HAVE_SDL2
#ifdef HAVE_SDL3
sdl,
#endif
#ifdef HAVE_LIBEVDEV
+2
View File
@@ -522,6 +522,8 @@ struct Pad
s32 m_orientation_reset_button_index{-1}; // Special button index. -1 if not set.
bool get_orientation_reset_button_active();
u64 m_last_rumble_time_us{0};
// Cable State: 0 - 1 plugged in ?
u8 m_cable_state{0};
+1 -1
View File
@@ -134,7 +134,7 @@ struct UsbDescriptorNode
{
memcpy(data, &_data, sizeof(T));
}
UsbDescriptorNode(u8 _bLength, u8 _bDescriptorType, u8* _data)
UsbDescriptorNode(u8 _bLength, u8 _bDescriptorType, const u8* _data)
: bLength(_bLength), bDescriptorType(_bDescriptorType)
{
memcpy(data, _data, _bLength - 2);
+4 -4
View File
@@ -746,7 +746,7 @@ namespace vm
}
// If native page size exceeds 4096, don't map native pages (expected to be always mapped in this case)
const bool is_noop = bflags & page_size_4k && utils::c_page_size > 4096;
const bool is_noop = bflags & page_size_4k && utils::get_page_size() > 4096;
// Lock range being mapped
auto range_lock = _lock_main_range_lock(range_allocation, addr, size);
@@ -958,7 +958,7 @@ namespace vm
}
// If native page size exceeds 4096, don't unmap native pages (always mapped)
const bool is_noop = bflags & page_size_4k && utils::c_page_size > 4096;
const bool is_noop = bflags & page_size_4k && utils::get_page_size() > 4096;
// Determine deallocation size
u32 size = 0;
@@ -1305,7 +1305,7 @@ namespace vm
// Special path for whole-allocated areas allowing 4k granularity
m_common = std::make_shared<utils::shm>(size, fmt::format("_block_x%08x", addr));
if (!map_critical(vm::_ptr<u8>(addr), this->flags & page_size_4k && utils::c_page_size > 4096 ? utils::protection::rw : utils::protection::no) || !map_critical(vm::get_super_ptr(addr), utils::protection::rw))
if (!map_critical(vm::_ptr<u8>(addr), this->flags & page_size_4k && utils::get_page_size() > 4096 ? utils::protection::rw : utils::protection::no) || !map_critical(vm::get_super_ptr(addr), utils::protection::rw))
{
fmt::throw_exception("Memory mapping failed (addr=0x%x, size=0x%x, flags=0x%x): %s", addr, size, flags, map_error);
}
@@ -1778,7 +1778,7 @@ namespace vm
if (flags & preallocated)
{
m_common = std::make_shared<utils::shm>(size, fmt::format("_block_x%08x", addr));
m_common->map_critical(vm::base(addr), this->flags & page_size_4k && utils::c_page_size > 4096 ? utils::protection::rw : utils::protection::no);
m_common->map_critical(vm::base(addr), this->flags & page_size_4k && utils::get_page_size() > 4096 ? utils::protection::rw : utils::protection::no);
m_common->map_critical(vm::get_super_ptr(addr));
}
+59
View File
@@ -8,6 +8,17 @@
#include "util/to_endian.hpp"
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
#include "rpcs3qt/breakpoint_handler.h"
#include "util/logs.hpp"
LOG_CHANNEL(debugbp_log, "DebugBP");
class ppu_thread;
void ppubreak(ppu_thread& ppu);
#endif
namespace utils
{
class shm;
@@ -242,9 +253,21 @@ namespace vm
return g_base_addr[addr];
}
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
inline void write8(u32 addr, u8 value, ppu_thread* ppu = nullptr)
#else
inline void write8(u32 addr, u8 value)
#endif
{
g_base_addr[addr] = value;
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
if (ppu && g_breakpoint_handler.HasBreakpoint(addr, breakpoint_types::bp_write))
{
debugbp_log.success("BPMW: breakpoint writing(8) 0x%x at 0x%x", value, addr);
ppubreak(*ppu);
}
#endif
}
// Read or write virtual memory in a safe manner, returns false on failure
@@ -276,9 +299,21 @@ namespace vm
return _ref<u16>(addr);
}
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
inline void write16(u32 addr, be_t<u16> value, ppu_thread* ppu = nullptr)
#else
inline void write16(u32 addr, be_t<u16> value)
#endif
{
_ref<u16>(addr) = value;
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
if (ppu && g_breakpoint_handler.HasBreakpoint(addr, breakpoint_types::bp_write))
{
debugbp_log.success("BPMW: breakpoint writing(16) 0x%x at 0x%x", value, addr);
ppubreak(*ppu);
}
#endif
}
inline const be_t<u32>& read32(u32 addr)
@@ -286,9 +321,21 @@ namespace vm
return _ref<u32>(addr);
}
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
inline void write32(u32 addr, be_t<u32> value, ppu_thread* ppu = nullptr)
#else
inline void write32(u32 addr, be_t<u32> value)
#endif
{
_ref<u32>(addr) = value;
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
if (ppu && g_breakpoint_handler.HasBreakpoint(addr, breakpoint_types::bp_write))
{
debugbp_log.success("BPMW: breakpoint writing(32) 0x%x at 0x%x", value, addr);
ppubreak(*ppu);
}
#endif
}
inline const be_t<u64>& read64(u32 addr)
@@ -296,9 +343,21 @@ namespace vm
return _ref<u64>(addr);
}
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
inline void write64(u32 addr, be_t<u64> value, ppu_thread* ppu = nullptr)
#else
inline void write64(u32 addr, be_t<u64> value)
#endif
{
_ref<u64>(addr) = value;
#ifdef RPCS3_HAS_MEMORY_BREAKPOINTS
if (ppu && g_breakpoint_handler.HasBreakpoint(addr, breakpoint_types::bp_write))
{
debugbp_log.success("BPMW: breakpoint writing(64) 0x%x at 0x%x", value, addr);
ppubreak(*ppu);
}
#endif
}
void init();
+1 -1
View File
@@ -858,7 +858,7 @@ namespace np
presence_self.pr_data = {};
presence_self.advertised = false;
if (g_cfg.net.psn_status == np_psn_status::psn_rpcn)
if (is_connected && is_psn_active && rpcn)
{
rpcn_log.notice("Setting RPCN state to disconnected!");
rpcn->reset_state();

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