587 Commits

Author SHA1 Message Date
Martino Fontana
14d5fe714d BitSet: Some small additions
Also add requirements for using range functions.
And micro-optimize testing if a bit is set (GCC and MSVC struggle to emit `bt` or `tbz`/`tbnz` with `bs & (1 << n)` compared to `(bs >> n) & 1`).
2026-11-15 22:31:04 +01:00
Jordan Woyak
f9cb5f1c08 Merge pull request #13704 from unexploredtest/cmake_source
CMake: Fix relative pathing when project is imported
2026-11-14 13:49:30 -06:00
Jordan Woyak
52d5313eb3 UnitTests/Core/PageFaultTest: Use a guaranteed monotonic clock instead of high_resolution_clock. 2026-11-04 23:32:37 -06:00
JMC47
833d8c0596 Merge pull request #14704 from JoshuaVandaele/mathutils-23
MathUtil: C++20/23 modernisations
2026-11-01 14:59:45 -05:00
unexploredtest
4617fda478 CMake: Fix relative pathing when project is imported 2026-10-31 21:23:34 +03:30
JosJuice
97b33a2527 Merge pull request #14928 from JosJuice/neon-texture-decoder
VideoCommon: Add TextureDecoder_ARM64.cpp
2026-10-31 16:12:31 +01:00
Jordan Woyak
22b581c670 Merge pull request #14940 from jordan-woyak/CoreTimingTest-fix
UnitTests: Fix CoreTiming.SharedSlot test so it can run independently.
2026-10-24 15:04:25 -05:00
Jordan Woyak
3c72f4d542 UnitTests: Fix CoreTiming.SharedSlot test so it can run independently. 2026-10-19 12:37:07 -05:00
JosJuice
d57e268691 UnitTests: Add test for TextureDecoder
This compares TexDecoder_Decode, which has different implementations
depending on the CPU ISA, against TexDecoder_DecodeTexel.
2026-10-10 22:54:21 +02:00
JosJuice
9407047330 Jit: Use LazyMemoryRegion-backed bit sets
JitCache has been using a class called ValidBlockBitSet. This commit
replaces it with a new class called LazyMemoryRegionBitSet, which works
similarly but is backed by a LazyMemoryRegion, letting us skip
allocating memory for parts of the bit set that correspond to emulated
memory regions where the game isn't storing any code. I have also added
optimized functions for setting or clearing long runs of bits.

Additionally, this commit replaces JitBase's three std::unordered_sets
that are keeping track of instructions with LazyMemoryRegionBitSets.
Here the benefit is more speed than memory usage. This improves NBA Live
2005's menu performance by 1% or so in SuperSamus's testing.
2026-08-22 11:51:48 +02:00
JosJuice
cd3ea81462 Merge pull request #14767 from JosJuice/state-nand-open-file
IOS/FS: Fix loading savestate when files are open
2026-08-08 13:02:54 +02:00
Joshua Vandaële
55c015e6ac AchievementApprovedHash: Automatically generate hash using CMake 2026-07-27 07:09:11 +02:00
JosJuice
8a90cbf638 IOS/FS: Fix loading savestate when files are open
We already had code to close open host files when reading or writing a
savestate, but due to d35fe1b we also need to close open guest files
when reading a savestate, otherwise DoStateRead fails to delete them.

I was considering an alternative solution where instead of copying and
clearing m_handles, we just set `handle.opened = false;` for each handle
before reading a savestate (but not before writing a savestate).
However, this wouldn't solve the problem of DoStateWriteOrMeasure's
calls to OpenFile failing due to all handles being open. I'm not aware
of any games that have that many handles open, though.
2026-07-26 11:01:01 +02:00
Joshua Vandaële
f1a639b12b CWDemangler: Resolve missing-declarations warnings 2026-07-25 05:19:26 +02:00
Joshua Vandaële
d2833fb788 Remove Visual Studio Projects and Solutions in favor of CMake 2026-07-24 03:45:13 +02:00
Joshua Vandaële
6dcb0817a2 MathUtil: C++20/23 modernisations
I've also created DegreesToRadians/RadiansToDegrees utility functions since there was a lot of repeated code
2026-07-13 02:32:33 +02:00
cristian64
0cab1731d6 Core: Adjust emulated memory size automatically.
Dolphin now uses the simulated memory size defined in `bi2.bin` to
adjust the memory size in the emulated console automatically.

If **Enable Emulated Memory Size Override** has been enabled by the
user, the fixed memory size specified for **MEM1** and **MEM2** are
still used as they were before.

Most retail games do not define the simulated memory size (Wii or
Triforce games), or define it to a value that matches the default 24 MiB
(GameCube games), so, in the general case, there is no behavior change.
One game that sets the simulated memory to a non-default value is the
debug build of _Mario Kart: Double Dash!!_, where the value is set to
48 MiB.

This enhancement is focused mainly to the modding community. Prior to
these changes, modded games with extended memory requirements would
fail to launch in Dolphin [with no indication of what the problem is] if
the user failed to set the emulated memory override to the correct
value. Now, modding tools can specify the simulated memory size in the
`bi2.bin` file to produce extended games that _just work_ in Dolphin,
without cumbersome instructions that can be overlooked by the user.
2026-07-11 23:02:54 +01:00
Amber Brault
3f5460a5ff Core: Implement automatic symbol demangling 2026-05-07 09:25:28 +02:00
JMC47
6409c5beb3 Merge pull request #13931 from SuperSamus/pikmin-squared-60fps
GameINI: Add 60 FPS code for Pikmin Squared
2026-04-27 13:09:00 -04:00
Jordan Woyak
5588fe0022 Merge pull request #14308 from jordan-woyak/character-encoding
StringUtil: Make UTF16ToUTF8 and UTF8ToUTF16 use custom encoding/decoding implementation.
2026-04-25 14:59:27 -05:00
Martino Fontana
c96d1b7b4a GameINI: Add 60 FPS code for Pikmin Squared 2026-04-25 10:45:25 +02:00
Jordan Woyak
ff57599e67 StringUtil: Make UTF16ToUTF8 and UTF8ToUTF16 use custom encoding/decoding implementation to eliminate usage of deprecated std::wstring_convert. 2026-04-18 13:06:17 -05:00
Martino Fontana
95dec13203 Improve usage of std::move and const references parameters
Accomplished using `run-clang-tidy` with `performance-move-const-arg,performance-unnecessary-value-param,modernize-pass-by-value`.

Changed arguments to const references, removed them where inappropriate (e.g. sink parameters). Same with std::move.

Manually reviewed each change to make sure that it makes sense, and do something more appropriate if possible.
2026-04-17 12:39:46 +02:00
Jordan Woyak
33f62b0f9f Merge pull request #14500 from Sintendo/span2
Replace `const std::vector&` arguments with `std::span`
2026-04-11 14:55:41 -05:00
JosJuice
4f0219d08c PageTableHostMappingTest: Fix copypaste error in misaligned+hole test
Because of this mistake, HoleInMaskMisalignedPageTable was testing the
same thing as MisalignedPageTable, which wasn't the intent.
2026-04-04 22:56:00 +02:00
JosJuice
3fe5df474b PageTableHostMappingTest: Fix alignment for misaligned+hole test
Mistakenly, MISALIGNED_HOLE_MASK_PAGE_TABLE_BASE was aligned and
MISALIGNED_HOLE_MASK_PAGE_TABLE_BASE_ALIGNED was misaligned. It should
be the other way around.

These variables are unused due to a separate mistake which is corrected
in the next commit.
2026-04-04 22:55:23 +02:00
Sintendo
f6a67aa6e7 Use more std::span arguments 2026-03-23 23:55:09 +01:00
Martino Fontana
a108fb849f AchievementManager: APPROVED_LIST_HASH quality of life improvements
APPROVED_LIST_HASH is moved to a separate file, making tests compilation faster after changing it.
The error message prints the hash in a way that it can be directly copy-pasted (though it still needs clang-format).
2026-02-22 00:22:46 +01:00
Jordan Woyak
cbd43914a5 Network: Improve IPv4PortRange::ToString to support CIDR notation and only last octet difference. 2026-02-15 23:13:18 -06:00
Jordan Woyak
5545798e00 Common/Network: Add structs: IPv4Port, IPv4PortRange and functions: IPAddressToString, ParseIPv4PortRange. 2026-02-15 20:14:15 -06:00
Jordan Woyak
97ad5ad1a1 StringUtil: Add SplitStringIntoArray function template. 2026-02-15 20:14:15 -06:00
JMC47
c4b913d9da Merge pull request #13768 from JosJuice/page-table-fastmem-2
Core: Create fastmem mappings for page address translation
2026-02-04 16:20:35 -05:00
JosJuice
35ce08fb88 UnitTests: Add PageTableHostMappingTest 2026-02-04 21:35:22 +01:00
Jordan Woyak
dd2b94cd4a Merge pull request #13594 from jordan-woyak/state-cleanups
State: Simplify interthread communication and general cleanups.
2026-02-03 16:50:52 -06:00
Martino Fontana
a14c88ba67 Remove unused imports
Yellow squiggly lines begone!
Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes.
If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed.
The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports.
Not everything is removed, but the cleanup should be substantial enough.
Because this done on Linux, code that isn't used on it is mostly untouched.
(Hopefully no open PR is depending on these imports...)
2026-01-25 16:12:15 +01:00
Jordan Woyak
1d9e475123 Common: Add TransferableSharedMutex class and unit tests. 2026-01-19 21:56:59 -06:00
JosJuice
75666604a2 Jit64: Add fres unit test 2026-01-18 11:21:35 +01:00
iwubcode
373e35ed5b Merge pull request #14267 from jordan-woyak/std-expected
Common: Replace Result with std::expected.
2026-01-17 22:33:15 -06:00
Jordan Woyak
dffc7a650d Common: Replace Result with C++23's std::expected. 2026-01-17 16:58:45 -06:00
Sintendo
1e0473e44f Fix various typos and spelling mistakes 2026-01-17 20:11:38 +01:00
Joshua Vandaële
deeb6f160c Disable PatchAllowlistTest if USE_RETRO_ACHIEVEMENTS is OFF
This fixes a build error when `-DENABLE_TESTS=ON` and `-DUSE_RETRO_ACHIEVEMENTS=OFF` are both set together, since AchievementManager is also behind an ifdef.
2025-11-27 01:26:51 +01:00
JosJuice
b6e062f2e3 Merge pull request #13689 from JosJuice/lock-core-any-thread
Core: Let any thread call previously host-thread-only functions
2025-11-16 18:35:17 +01:00
JosJuice
068947e2b6 Core: Remove IsHostThread
The core no longer cares which thread is the host thread.

Cleaning up Android's HostThreadLock is left for another PR, in part
because the HostThreadLock in NativeConfig.cpp still serves a purpose,
and in part to make any issues easier to bisect.
2025-11-10 21:14:56 +01:00
Jordan Woyak
405baed805 Common: Add a DirectIOFile class that allows for copies which are entirely thread safe. 2025-11-09 03:08:14 -06:00
JosJuice
958db7c78c Merge pull request #14020 from jordan-woyak/string-util-cleanups
StringUtil: Cleanups and add some character encoding conversion unit tests.
2025-11-08 17:36:54 +01:00
Jordan Woyak
46369ef1b1 Common: Add AtomicMutex and SpinMutex classes as faster alternatives to std::mutex. 2025-11-02 20:45:55 -06:00
Jordan Woyak
0ebc54a0fa UnitTests: Add some StringUtil character encoding conversion tests. 2025-11-02 00:36:04 -05:00
Martino Fontana
f6e5448b43 Jit64: Dynamic length of regular jump instruction (for known addresses)
Conditional jumps already do that, so let's be consistent.
2025-10-08 00:15:57 +02:00
JMC47
f96837a321 Merge pull request #13940 from iwubcode/glslang_update
Externals / VideoCommon: update glslang to latest, turn into submodule
2025-09-26 17:13:54 -04:00
iwubcode
491e3390be Externals / VideoCommon: update glslang to latest, turn into submodule 2025-09-23 23:45:38 -05:00