JosJuice
36f49d140f
Merge pull request #13905 from JosJuice/arm64emitter-shift-4
...
Arm64Emitter: Replace shifting size by 4 with IntLog2 minus 3
2025-09-16 20:08:59 +02:00
iwubcode
d403bc3985
Core: support inverting a 4x4 matrix
2025-09-07 11:41:09 -05:00
Martino Fontana
d1ba849876
Jit64: dcbz, use VMOVAPS with YMM registers on AVX CPUs
...
LLVM does this, so let's do it as well.
2025-09-02 23:15:27 +02:00
Martino Fontana
5e69da7eba
x64Emitter: Support YMM registers
...
This is accomplished by adding a 0x100 bit the the register.
Made sure that, on AVX instructions, that bit is trucated.
2025-09-02 22:15:16 +02:00
Tilka
b47a75fa2d
Merge pull request #13912 from jordan-woyak/simplify-saturating-cast
...
MathUtil: Simplify SaturatingCast implementation and fix edge case.
2025-08-30 03:00:15 +01:00
JMC47
e0c72cd963
Merge pull request #13825 from jordan-woyak/dont-count-playtime-while-suspended
...
Common/Timer: Add a SteadyAwakeClock class to make play time tracking ignore time while suspended.
2025-08-28 13:58:26 -04:00
Jordan Woyak
da546bebb8
MathUtil: Simplify SaturatingCast implementation with std::cmp_less/cmp_greater and fix a floating point edge case.
...
Thanks to Dentomologist for catching the edge case.
2025-08-27 21:24:46 -05:00
JosJuice
9716148203
Arm64Emitter: Replace shifting size by 4 with IntLog2 minus 3
...
The instruction implementations that were shifting the size by 4 would
emit an incorrect instruction when given a size of 64. The correct
implementation is to count the number of leading or trailing zeroes in
the size parameter, which is what IntLog2 does.
No callers are affected by this, as they all use sizes other than 64.
Actually, some of these instructions are even invalid with a size of 64,
but I'm changing them anyway for consistency with the others.
2025-08-24 10:48:21 +02:00
JosJuice
c553344282
JitArm64: Add early exit in MOVI2RImpl ORR loop
...
Just for performance.
2025-08-21 20:56:06 +02:00
JosJuice
596b290177
JitArm64: Add missing ORR pattern in MOVI2RImpl
...
We should attempt to use not only mirrored versions of the immediate as
an ORR base, but also the immediate itself. This lets us emit certain
64-bit constants using fewer instructions.
2025-08-21 20:56:06 +02:00
Sepalani
e9f58193a7
Common/BitUtils: Add operator[] to BitCastPtrType
2025-08-18 13:06:12 +04:00
OatmealDome
221d396b3a
FloatUtils: Replace quieting SNaNs via 0.0 + x with MakeQuiet
2025-08-17 11:24:38 -04:00
OatmealDome
cfb78dc816
FloatUtils: Move MakeQuiet function here from Interpreter_FPUtils
2025-08-17 11:23:12 -04:00
Tilka
a07974e2c3
Merge pull request #13846 from JoshuaVandaele/better-xcb
...
Qt: Better wayland detection to enforce xcb
2025-08-10 05:09:25 +01:00
JMC47
c6d55d1b50
Merge pull request #13791 from jordan-woyak/realtek-firmware-loader
...
BTReal: Implement Realtek firmware loading.
2025-08-04 19:42:59 -04:00
Joshua Vandaële
f8b85edd0c
Qt: Better wayland detection to enforce xcb
...
In certain cases, the platform can be "wayland-egl", "wayland-xcomposite", and other values for which I haven't found a full list yet. Instead of matching only "wayland", we now look for "wayland" anywhere in the `QT_QPA_PLATFORM` string in a case-insensitive manner.
Acknowledgements:
`CaseInsensitiveContains`' implementation was heavily inspired by GNU's non-standard glibc `strcasestr` function, which can be found here licensed under GPLv2 or later: https://ftp.gnu.org/gnu/libc/
2025-08-04 19:34:31 +02:00
Admiral H. Curtiss
06e05e0f90
Merge pull request #13794 from Sintendo/doouble-lookup
...
Avoid map/set double lookups
2025-08-01 21:43:12 +02:00
JosJuice
9f32562e36
PPCSymbolDB: Don't return non-const pointers
...
For thread safety, we shouldn't return any pointers or references that
can be used to mutate the state of the PPCSymbolDB. This should be the
final part of making PPCSymbolDB thread safe unless I've missed
something.
2025-07-27 17:03:57 +02:00
JosJuice
fef77a5f20
PPCSymbolDB: Add missing locking
...
9395238 added locking in some PPCSymbolDB functions that access member
variables, but far from all. To ensure thread safety, this commit adds
the missing locking.
2025-07-27 16:26:47 +02:00
JosJuice
803e6b017b
PPCSymbolDB: Reduce lock contention in LoadMap/LoadMapOnBoot
...
By building the map in a local variable and then swapping it with the
member variable, we avoid the need to hold a lock while building the
map.
2025-07-27 16:26:47 +02:00
Jordan Woyak
62c773ac75
Common/Timer: Add a SteadyAwakeClock class which counts non-suspended system running time.
2025-07-24 23:56:10 -05:00
Jordan Woyak
bfef65a9d1
BTReal: Implement Realtek Bluetooth firmware loading.
...
Logic and structures are largely taken from Linux source:
drivers/bluetooth/btusb.c
drivers/bluetooth/btrtl.c
drivers/bluetooth/btrtl.h
2025-07-23 19:58:25 -05:00
Jordan Woyak
2b541361c6
Common: Move AsU8Span utility function from BTReal to Common/BitUtils.
2025-07-23 19:58:25 -05:00
Admiral H. Curtiss
68713e08b4
Common: Move GetDeviceProperty() into its own header
...
Otherwise we include Windows headers in the entire codebase through CommonFuncs.h
2025-07-19 21:24:51 +02:00
JMC47
295ae819f5
Merge pull request #13792 from Tilka/wii_banners
...
WiiSaveBanner: fall back to $userdir/Load/WiiBanners
2025-07-16 20:29:46 -04:00
Dentomologist
8a28b95480
IOFile: Require trivially copyable types
...
Require ReadArray and WriteArray to be called with a trivially copyable
type.
ReadArray and WriteArray call std::fread and std::fwrite respectively.
These functions trigger undefined behavior when the objects are not
trivially copyable, so this adds that requirement to the callers.
2025-07-14 11:55:24 -07:00
Joshua Vandaële
06882bd2dc
Fix various warnings
2025-07-12 12:47:30 +02:00
Sintendo
f2392e4048
Avoid map/set double lookups
...
Fix some common anti-patterns with these data structures.
- You can dereference the iterator returned by `find` to access the
underlying value directly, without an extra `operator[]`/`at`.
- Rather than checking for an element before insertion/deletion, you can
just do the operation and if needed check the return value to
determine if the insertion/deletion succeeded.
2025-07-08 06:53:42 +02:00
Jordan Woyak
d55012f8d0
Merge pull request #13726 from hoogmin/cpp23_ranges_patch
...
Common: Replace Contains and ContainsSubrange with C++23 std::ranges equivalents
2025-07-07 21:05:28 -05:00
Tillmann Karras
fe6fd2279c
WiiSaveBanner: fall back to $userdir/Load/WiiBanners
...
Unlike custom banners which work as an override, this mechanism works as
a fallback. The use case is if you have games you don't really play but
want to keep around for testing purposes without filling up your NAND
with lots of saves. For ease of use, the directory structure is the same
but only title/$title_hi/$title_lo/data/banner.bin files are
relevant.
2025-07-04 23:15:50 +01:00
TryTwo
fe121e4c6e
PPCSymbolDB: Move loading map on boot logic from boot.cpp into PPCSymbolDB, as it will be needing a mutex.
...
Cleanup loading code and reduce amount of signals.
On boot. allow previously loaded map to be kept, if its filename matches. Useful for restarting a game with a large symbol map.
2025-06-25 12:01:16 -07:00
JMC47
19f3b7e61f
Merge pull request #13691 from TryTwo/PR_Notes
...
Debugger Add note-type symbols .
2025-06-22 01:05:42 -04:00
TryTwo
040d9a4336
Debugger symbols: Add new symbol type: Notes.. Notes are for naming single instructions, or small groups of instructions.
...
Notes are separate from function symbols, and can be searched separately.
Unlike functions, notes of different length can overlap each other.
In the instruction window, a note will always display over the function symbol.
2025-06-19 17:55:35 -07:00
Jordan Woyak
3a94289ad6
Merge pull request #13744 from JoshuaVandaele/windows-specific-getdevicename
...
Host: Implement a Windows-only implementation of `GetDeviceNameFromVIDPID`
2025-06-15 15:44:31 -05:00
Dr. Dystopia
ca8f9b672b
Source: Remove redundant lambda parameter lists
2025-06-14 10:19:31 +02:00
Joshua Vandaële
d93245cc7a
Host: Implement a Windows-only implementation of GetDeviceNameFromVIDPID
2025-06-13 17:46:53 +02:00
Tilka
19fbbf0dba
Merge pull request #13727 from JoshuaVandaele/fmt-11.2.0-localtime-deprec
...
fmt: Replace deprecated `fmt::localtime` usage with `Common::LocalTime`
2025-06-08 04:04:37 +01:00
Jordan Woyak
65f3ba70f5
Merge pull request #13522 from tygyh/Enforce-overriding-destructor-style-Core&UnitTests
...
Core & UnitTests: Make overriding explicit and remove redundant virtual specifiers on overriding destructors
2025-06-07 17:55:14 -05:00
iwubcode
7d59c2743d
Common: Add class 'FilesystemWatcher' that is used to watch paths and receive callbacks about filesystem level events for anything under that path
2025-06-06 23:03:02 -05:00
Javier Martinez
d766c527c7
Common: Replace Contains and ContainsSubrange with C++23 std::ranges equivalents
...
Common: Use feature macros for better compatibility
Common/Contains.h: fix linting issue
Common/Contains.h: Add C++23 TODO
Common/Contains.h: Fix comment lint issue.
2025-06-05 19:18:08 -04:00
JMC47
8def02072b
Merge pull request #13379 from JoshuaVandaele/system-ng
...
Use minizip-ng in non-compatibility mode
2025-06-04 15:21:05 -04:00
Joshua Vandaële
4b65cc9a4c
fmt: Replace deprecated fmt::localtime usage with Common::LocalTime
2025-06-04 13:32:12 +02:00
Jordan Woyak
31d0756808
Config: Make s_callbacks_lock recursive to fix hardcore mode deadlock.
2025-05-30 17:33:01 -05:00
JosJuice
18a78a9bab
Merge pull request #13647 from jordan-woyak/sha1-avoid-memcpy
...
Crypto/SHA1: Re-add memcpy avoiding optimization to BlockContext::Update.
2025-05-25 12:40:43 +02:00
Joshua Vandaële
2ed5f16600
minizip-ng: Stop using compatibility mode
2025-05-22 12:51:55 +02:00
Jordan Woyak
9ba71448cc
WorkQueueThread: Fix Cancel() race with internal command queue.
2025-05-20 21:51:25 -05:00
Jordan Woyak
bb77d61967
Crypto/SHA1: Re-add memcpy avoiding optimization to BlockContext::Update.
2025-05-09 20:59:17 -05:00
JMC47
463bd86145
Merge pull request #13641 from jordan-woyak/sha1-fix
...
Crypto/SHA1: Fix past-the-last-element std::array access and modernize code.
2025-05-09 18:56:20 -04:00
JMC47
7113bafd94
Merge pull request #13586 from Tilka/spr_disasm
...
GekkoDisassembler: standardize SPR names and add missing ones
2025-05-09 18:55:53 -04:00
Jordan Woyak
a9ab0e979e
Crypto/SHA1: Fix past-the-last-element std::array access and modernize code.
2025-05-08 03:03:59 -05:00
Jordan Woyak
845fecff22
Common/BitField: Make deleted functions public.
2025-05-05 19:34:35 -05:00
Jordan Woyak
2dc975fa92
Common: Replace enable_if with concepts and other minor modernizations.
2025-05-05 19:34:24 -05:00
Admiral H. Curtiss
d2db9d9590
Merge pull request #13608 from jordan-woyak/async-work-thread
...
Common: Add AsyncWorkThread.
2025-05-04 18:45:14 +02:00
Admiral H. Curtiss
2a3580fda5
Merge pull request #13482 from jordan-woyak/string-util-concepts
...
StringUtil: Use concepts instead of enable_if.
2025-05-04 17:47:37 +02:00
Admiral H. Curtiss
380a9291ad
Merge pull request #13602 from jordan-woyak/move-only-function
...
Common: Add MoveOnlyFunction.
2025-05-04 17:28:06 +02:00
Jordan Woyak
5a80105555
Common and VideoCommon: Change texture data from std::vector to Common::UniqueBuffer.
2025-05-03 18:32:30 -05:00
JosJuice
c8be819711
LogManager: Stop using manual memory management
...
This fixes a memory leak that would occur when the Android frontend
calls LogManager::Init more than once in order to reload settings.
Note that the log window listener is now owned by LogManager instead of
by the frontend, making it consistent with the other log listeners.
2025-05-02 21:14:32 +02:00
JosJuice
b566e81644
Merge pull request #13596 from JosJuice/config-callback-locking
...
Config: Add locking for config changed callbacks
2025-05-02 08:49:22 +02:00
Jordan Woyak
be4b0af971
Common: Add AsyncWorkThread.
2025-05-01 22:54:40 -05:00
Jordan Woyak
20874124c2
StringUtil: Use concepts instead of enable_if.
2025-05-01 16:30:37 -05:00
Dr. Dystopia
f240e20e3f
Make overriding explicit and remove redundant virtual specifiers on overriding destructors - Core & UnitTests
2025-05-01 15:00:37 +02:00
Admiral H. Curtiss
2e20e24136
Merge pull request #13587 from jordan-woyak/manual-value
...
Common: Move some duplicate container element construction logic into a ManuallyConstructedValue template.
2025-04-30 23:45:33 +02:00
Jordan Woyak
4899913446
Common: Move some duplicate container element construction logic into a ManuallyConstructedValue template.
2025-04-30 14:56:07 -05:00
Jordan Woyak
a149b9d62d
WorkQueueThread: Cleanups. Implement in terms of WaitableSPSCQueue. Add single producer WorkQueueThreadSP.
2025-04-30 14:31:51 -05:00
OatmealDome
0b0151770a
Merge pull request #13436 from JoshuaVandaele/clang-format-19
...
Update clang-format to version 19
2025-04-30 01:17:31 -04:00
Jordan Woyak
e403dee3da
Common: Add MoveOnlyFunction.
2025-04-27 20:07:13 -05:00
JosJuice
f060baa257
Config: Add locking for config changed callbacks
...
Different threads are adding and calling callbacks, so this should have
some locking. This is both to ensure thread safety when accessing
`s_callbacks` and to ensure that there won't be situations where a
callback gets called after it's removed.
`s_callback_guards` is also accessed from multiple threads and has
therefore been made atomic.
2025-04-26 12:56:37 +02:00
Dentomologist
3a883f28d6
Config: Add [[nodiscard]] to AddConfigChangedCallback
...
Require callers of Config::AddConfigChangedCallback and
CPUThreadConfigCallback::AddConfigChangedCallback to handle the returned
ConfigChangedCallbackIDs to hopefully prevent future issues with
callbacks getting called after their associated objects have been
destroyed.
2025-04-25 16:04:12 -07:00
Tilka
805307f432
Merge pull request #13451 from vyuuui/numeric_labels
...
Add numeric label support to assembler
2025-04-25 01:56:43 +01:00
Tilka
50026ab795
Merge pull request #13497 from hoogmin/modernize_fs_path
...
Core/Common/FileUtil.cpp: Use std path utility for automatic path separator handling.
2025-04-25 01:38:35 +01:00
Tillmann Karras
4d9dc1e1cd
GekkoDisassembler: standardize SPR names and add missing ones
2025-04-25 00:24:12 +01:00
Joshua Vandaële
bf554edfe0
linter: Add and apply new formatting rules
...
New rules:
`InsertNewlineAtEOF: true`
`RemoveSemicolon: true`
`RequiresClausePosition: WithPreceding`
2025-04-23 11:19:57 +02:00
Joshua Vandaële
2c54ee94c1
linter: Apply clang-format 19.1 formatting
...
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
2025-04-23 11:19:20 +02:00
Jordan Woyak
af960651e8
Common: SPSCQueue cleanups and improvements.
2025-04-22 23:49:32 -05:00
Jordan Woyak
ac76deaef0
Merge pull request #13529 from jordan-woyak/StateBuffer
...
Core/State: Avoid unnecessarily value-initializing large buffers.
2025-04-22 16:30:51 -05:00
OatmealDome
da84a9f605
Merge pull request #13477 from OatmealDome/macos-11
...
CMakeLists: Bump minimum macOS to 11.0
2025-04-22 17:27:12 -04:00
JosJuice
e468e2359a
IOS: Only have one USBScanner
...
Some games open two USB interfaces, e.g. /dev/usb/oh0 and /dev/usb/hid.
This was causing us to run two scanning threads at once, using up more
CPU time for scanning than we need to.
2025-04-21 21:57:49 +02:00
JosJuice
c0c180bdc2
Merge pull request #13467 from JosJuice/profiler-thread-safety
...
Common: Make Profiler thread safe
2025-04-21 20:19:47 +02:00
OatmealDome
7213cdd439
MemoryUtil: Remove availability checks for macOS 11
2025-04-21 00:24:58 -04:00
Tilka
0a52140145
Merge pull request #13549 from shuffle2/ucrtpatch
...
remove ucrt compat patches
2025-04-20 22:24:57 +01:00
Shawn Hoffman
2d1161150b
remove ucrt compat patches
...
Dolphin has not supported a version of windows where
these binaries exist for a while.
2025-04-20 12:50:10 -07:00
Shawn Hoffman
5dd896a7d9
HttpRequest: remove some legacy code for windows < 8.1
2025-04-20 11:46:09 -07:00
Jordan Woyak
12dcd6c285
Common: Add UniqueBuffer and SharedBuffer templates.
2025-04-19 17:13:40 -05:00
Jordan Woyak
f78fa2e9f1
LinearDiskCache: Use make_unique_for_overwrite.
2025-04-19 17:13:40 -05:00
Jordan Woyak
cb20959679
Common/Timer: Change HANDLE to void* to avoid including Windows.h to fix cmake build.
2025-04-18 21:50:15 -05:00
OatmealDome
2af276d27e
MemArenaDarwin: Initialize all address variables passed to vm_map
2025-04-16 00:50:54 -04:00
Javier Martinez
7ca8dc3767
Use std path utility for automatic path seperator handling.
...
It was being done manually, which a TODO comment advised against.
Using generic_string() from std::filesystem::path solves this.
Fix encoding issue using generic_wstring instead.
2025-04-08 16:54:11 -04:00
Jordan Woyak
e0e53f3235
Common/Timer: Use YieldProcessor on Windows.
2025-04-03 15:48:51 -05:00
Jordan Woyak
e5c8935acc
Common: Create a PrecisionTimer class.
2025-04-03 15:48:51 -05:00
JosJuice
957265ba52
Common: Make Profiler thread safe
2025-03-29 15:05:02 +01:00
JMC47
1981f22228
Merge pull request #13433 from iwubcode/update_min_win10
...
Update our minimum windows 10 version to 1903 and reinstate code that depends on it
2025-03-25 18:30:15 -04:00
vyuuui
e34907025d
Add numeric label support to assembler
2025-03-24 18:59:32 -07:00
JMC47
ad3650abfc
Merge pull request #13093 from mitaclaw/ranges-modernization-4-projection
...
Ranges Algorithms Modernization - Projection
2025-03-23 15:56:13 -04:00
Jordan Woyak
ba1bf6959e
Config: Allow passing a DefaultState object to Set functions to delete keys.
2025-03-17 20:46:24 -05:00
OatmealDome
07cec796f4
Merge pull request #13417 from luzpaz/typo-source-core-common
...
Core/Common: Fix typos
2025-03-16 14:53:02 -04:00
iwubcode
c1dea828ab
Common: use std::chrono for GetLocalTimeSinceJan1970 on Windows
...
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
2025-03-16 00:59:45 -05:00
iwubcode
373a1a5dc0
Update min win10 version from 1703/15063 to 1903/18362
...
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
2025-03-16 00:59:45 -05:00
JMC47
1bd3e79fda
Merge pull request #13378 from jordan-woyak/desired-ext-state
...
WiimoteEmu: Clean up variant handling in DesiredExtensionState.
2025-03-15 17:26:49 -04:00
JosJuice
e637a05707
Merge pull request #12866 from JosJuice/android-log-types-sorting
...
Android: Replace log type names map with array
2025-03-15 16:01:33 +01:00
JosJuice
8c7ab286f5
Merge pull request #13181 from tygyh/Replace-'reinterpret_cast'
...
Replace 'reinterpret_cast' with 'static_cast'
2025-03-15 15:31:38 +01:00