Commit Graph

38448 Commits

Author SHA1 Message Date
Jordan Woyak
5f6cd84ad7 AMMediaboard: Emulate AMMBCommandSelect using poll/WSAPoll. 2026-02-15 20:14:15 -06:00
Jordan Woyak
f25c467154 Common/UnixUtil: Only define CreateEventFD on Linux. 2026-02-15 20:14:15 -06:00
Jordan Woyak
0713045d4f AMMediaboard: Deduplicate code into AMMBCommandModifyMyIPaddr. 2026-02-15 20:14:15 -06:00
Jordan Woyak
ce85c4d81d AMMediaboard: Deduplicate code into AMMBCommandRecv. 2026-02-15 20:14:15 -06:00
Jordan Woyak
f7ff93bea6 AMMediaboard: Deduplicate code into AMMBCommandSend. 2026-02-15 20:14:15 -06:00
Jordan Woyak
69c143d8f0 AMMediaboard: Deduplicate code into AMMBCommandSocket. 2026-02-15 20:14:15 -06:00
Jordan Woyak
65def4e235 AMMediaboard: Deduplicate code into AMMBCommandSetSockOpt. 2026-02-15 20:14:15 -06:00
Jordan Woyak
6940309c2d AMMediaboard: Translate between guest and host FDs to fix AMMBCommand::Select behavior. 2026-02-15 20:14:15 -06:00
Jordan Woyak
cda344329a Common/BitUtils: Make SetBit constexpr. 2026-02-15 20:14:15 -06:00
Jordan Woyak
12df15eded AMMediaboard: Fix value in s_mediaboard_ranges array. 2026-02-15 20:14:15 -06:00
Jordan Woyak
f4b3f3cf0f AMMediaboard: Use SetPlatformSocketOptions and SEND_FLAGS. 2026-02-15 20:14:15 -06:00
Jordan Woyak
5d2e93fa3e Common: Add SetPlatformSocketOptions function and SEND_FLAGS constant to Network.h to deal with OS-specific SIGPIPE behavior. 2026-02-15 20:14:15 -06:00
Sepalani
2ffa7cec07 SI_DeviceAMBaseboard: Fix log issues related to GeneralDriverOutput 2026-02-15 20:14:15 -06:00
Sepalani
cbc7c2d385 SI_DeviceAMBaseboard: Add missing bounds checks
VolumeDisc: Fix Triforce's GetGameID memcpy by checking MakerID's size
2026-02-15 20:14:15 -06:00
Sepalani
0acb6145f7 Triforce: Fix remaining issues 2026-02-15 20:14:15 -06:00
Sepalani
355a4d8188 AMMediaboard: Fix several warnings 2026-02-15 20:14:15 -06:00
Sepalani
f3321b2893 SI_DeviceAMBaseboard: Improve bounds checking 2026-02-15 20:14:15 -06:00
Sepalani
bfd83f3a77 SI_DeviceAMBaseboard: Add validate_jvs_io helper 2026-02-15 20:14:15 -06:00
Sepalani
1c54e41a60 SI_DeviceAMBaseboard: Improve logging and validation edge cases 2026-02-15 20:14:15 -06:00
Sepalani
77cb65313d SI_DeviceAMBaseboard: Add validate_data_in_out helper 2026-02-15 20:14:15 -06:00
Sepalani
fcb4d27f1a AMBaseboard: Convert union ICCommand into struct 2026-02-15 20:14:14 -06:00
Sepalani
85707891cf Triforce: Address some logging and error checks 2026-02-15 20:14:14 -06:00
Sepalani
71ef512516 Triforce: Minor cleanups related to coding style and documentation 2026-02-15 20:14:14 -06:00
Jordan Woyak
2d9d7e4d89 AMMediaboard: Replace magic number 15 with a MAX_IPV4_STRING_LENGTH constant. 2026-02-15 20:14:14 -06:00
Jordan Woyak
a5eca09967 AMMediaboard: Add NetworkCMDBufferCheck calls for reading of timeout in Select commands. 2026-02-15 20:14:14 -06:00
Jordan Woyak
95442a2b6a Triforce: Warning silencing and other minor cleanups. 2026-02-15 20:14:14 -06:00
crediar
56ed7817de Triforce: Code fixes.
Fixed a bug caused by static usage of Core::System::GetInstance()
Removed unused headers
Removed unneeded code
Optimised code
Added sanity checks
Added SafeCopyFromEmu/SafeCopyToEmu
Set Triforce buttons to be translatable
2026-02-15 20:14:14 -06:00
crediar
ce802f1e62 Triforce: Optimized code
Removed unneeded code
Removed unused code
Added EINPROGRESS to fix networking on Linux systems
Added function NetworkBufferCheck and NetworkCMDBufferCheck  to verify buffer sizes
Added NetworkCMDBufferRead/NetworkCMDBufferWrite/NetworkBufferRead/NetworkBufferWrite
Added multiply buffer size checks
Rewrote GetGameType()
Moved AMMediaboard::Shutdown to DVDInterface::Shutdown()
Changed JVSIOMessage overrun check
Changed SwapBuffers function to be a member function
Added sanity checks for buffer sizes
Added translation prefix for Triforce buttons
Updated text for misconfigurations when trying to boot normal games with Triforce hardware connected
Fixed NAMCAM for Mario Kart GP
2026-02-15 20:14:14 -06:00
Jordan Woyak
be2da8dc7b Triforce: Code cleanups. 2026-02-15 20:14:14 -06:00
Jordan Woyak
083faa8b21 DiscIO: Make Volume::DecodeString take a std::span so it can work with std::array. 2026-02-15 20:14:14 -06:00
crediar
2c62214875 Added Triforce support 2026-02-15 20:14:14 -06:00
spaceage64
c08db74e6b Add classic controller support code for RUUE01 - Animal Crossing: City Folk (NTSC-U)
Added control scheme to codes.

Split .ini files based on Rev 0/1.

Added controller mapping instructions.

Added other regions and removed redundant lines.

Added Grass Deterioration cheats.

Changed wording regarding Right Stick variant.

Removed credits from RA Verified list.

Update ApprovedInis.json from PatchAllowlist test.

Updated approved list hash to match AchievementManager.

Attempted to fix the approved hash list again.

Update approved INI list and PatchAllowlist verification data
2026-02-15 19:41:40 +01:00
Martino Fontana
c9457cf906 Jit: Emit Branch Watch code only if it's enabled
JIT code related to Branch Watch was emitted if the debugging UI was active: the emitted code would dynamically check whether Branch Watch is active.
However, this causes two problems:
1. It decreases performance by just having the debugging UI enabled
2. It clutters the host assembly in the JIT tab, making it harder to read (unaware readers will wonder what these instructions are for)

With this PR, code related to Branch Watch is emitted only if Branch Watch itself is active, fixing the issues above.
The JIT cache will now be wiped whenever the feature is toggled, causing a slight stutter. However, this isn't the kind of feature that is toggled over and over, so IMO it is an acceptable trade-off.
2026-02-15 11:03:02 +01:00
JMC47
e387fa3732
Merge pull request #14385 from dreamsyntax/cpu-clock-max
Qt/Android: CPU Clock Override max to 500%
2026-02-15 03:38:23 -05:00
Dentomologist
0fbe38118e CheatsManager: Update code tabs on creation
Call `OnStateChanged` when creating CheatsManager to update the AR and
Gecko code tabs with codes for the currently running game (if any).

Previously, creating CheatsManager while a game was running wouldn't
show any codes until the next time the core state changed (excluding
Starting or Stopping which had no effect).

Fixes https://bugs.dolphin-emu.org/issues/13977.
2026-02-14 20:32:07 -08:00
Dentomologist
b398dc38e0
Merge pull request #12917 from JosJuice/transfer-sysconf-control
Explicitly transfer control of SYSCONF to emulated system
2026-02-14 11:35:59 -08:00
JosJuice
1cc9e8352f
Merge pull request #14329 from JosJuice/android-hotplug
Android: Rework input device hotplug
2026-02-14 17:43:38 +01:00
JosJuice
5440c7737f Explicitly transfer control of SYSCONF to emulated system
The functions SaveToSYSCONF and LoadFromSYSCONF contain checks for
whether emulation is running. The intent of this is that when we're
emulating a Wii, the emulated system may write to SYSCONF whenever it
likes and does not expect anything else to write to SYSCONF, so the
host code shouldn't access SYSCONF while emulation is ongoing. However,
Core::IsRunning is an imperfect proxy for whether we've handed over
control of SYSCONF to the emulated system yet, as the actual handover
happens at a slightly different point in time than when the emulation
state is changed. This usually isn't a problem, but in theory it could
be a determinism problem if a setting is changed right as emulation is
starting, or it could cause the emulated software to briefly misbehave
if a setting is changed right as emulation is stopping.

Things got worse in 72cf2bdb87 when I
replaced the Core::IsRunning calls with !Core::IsUninitialized. With
IsRunning, there was be a period of time where SYSCONF should have been
protected but wasn't. With !IsUninitialized, there was a period of time
where SYSCONF shouldn't have been protected but was, and crucially, this
period of time included the moments where we do setup and teardown of
the emulated NAND, which broke transferring SYSCONF settings between the
host and the guest. 72cf2bdb87 was
reverted because of this.

This commit adds a flag that we explicitly flip when control is handed
over to or from the emulated system. This protects the SYSCONF file
for exactly as long as is needed.
2026-02-14 10:05:27 +01:00
TryTwo
954219f781 Cheat Search: Add ability to delete items and fix duplicate commands when multiple row items are selected.
Changes it to select rows then extracts one item from each row to operate on. The behavior and data across each item in a row was already identical, so using rows doesn't change anything.
2026-02-13 16:45:00 -07:00
dreamsyntax
e1e1485582 Qt/Android: CPU Clock Override max to 500% 2026-02-12 18:39:05 -07:00
JosJuice
ea80945912
Merge pull request #14342 from sepalani/hdr-mic
IOS/USB: Add missing vector header in Emulated/Microphone.h
2026-02-11 20:25:34 +01:00
Sepalani
6f3282e073 IOS/USB: Add missing vector header in Emulated/Microphone.h 2026-02-11 18:25:15 +04:00
Sepalani
ddcf0413c1 EXI_Device: Add missing include for PanicAlertFmtT 2026-02-11 18:08:41 +04:00
Jordan Woyak
2ba9af9e60 ChunkFile: Prevent PointerWrap::Do(T&) from compiling with pointers. 2026-02-10 06:44:36 -06:00
JosJuice
bd92388d2f Android: Rework input device hotplug
Previously, when an input device was connected or disconnected, we would
recreate all devices. This commit makes it so we only touch the relevant
device instead. This matters because recreating a device causes us to
drop all held buttons for that device. Due to Android only delivering
inputs as events, we're unable to poll for currently held buttons when
recreating a device.

This recently became a problem for users of Ayn devices due to a
firmware update. Every now and then, something about the display
viewports changes, triggering an update to an input device that I assume
is a touch input device. This input device isn't something users
normally map in Dolphin's controller settings, but it changing was
causing Dolphin to drop all held buttons for the device's built-in
gamepad as well as any other connected gamepads.
2026-02-08 10:38:43 +01:00
oltolm
60351c19cc Misc: fix compiler warning: implicit declaration of function 2026-02-08 00:37:29 +01:00
Dentomologist
a8fbe8f28f
Merge pull request #14311 from LillyJadeKatrin/retroachievements-aliases
RetroAchievements - Fix Aliases
2026-02-06 15:44:36 -08:00
Dentomologist
0bf34a73b3 PerformanceMetrics: Clamp graph minimum auto size
Add a minimum value for the automatic size of the performance metrics
graph. The graph can still be manually resized smaller than this limit.

This prevents the graph from automatically resizing itself to be too
small to contain the full graph and legend, which happened when using
native resolution with `Auto-Adjust Window Size` enabled.
2026-02-06 13:30:48 -08:00
Dentomologist
f7b7267993 PerformanceMetrics: Fix automatic graph resizing
Fix a bug causing the performance graph to not resize when the render
window changed size:
* When changing the render window size during emulation the performance
  graph wouldn't update its size until the next emulation session.
* When changing the render window size with no emulation active (by
  changing the Internal Resolution with Auto-Adjust Window Size enabled)
  the performance graph wouldn't update its size until the second
  emulation session after the change.

Before explaining why the bug happened, here are some details about Dear
ImGui (henceforth ImGui) for context:
* In order to allow programs to specify initial ImGui window sizes while
  also allowing the user to resize them, `SetNextWindowSize` takes a
  flag from the `ImGuiCond_` enum specifying under what circumstances
  that function should actually have any effect.
* ImGuiCond_FirstUseEver causes ImGui to only apply the command when the
  window doesn't have any saved size information for that session or in
  the ini file specified by `ImGui::GetIO().IniFilename`. Since we set
  that filename to `nullptr`, in practice the resize command is applied
  on the first frame of each ImGui/emulation session.
* Qt saves the most recent size of the render window across emulation
  (and even Dolphin) sessions, which is then used to set the initial
  value of `ImGui::GetIO().DisplaySize` in the next emulation session.
* It takes multiple frames for the size of the render window to update
  when changed by setting the internal resolution. This means that
  `ImGui::GetIO().DisplaySize` will have a stale value in the
  intervening frames, and specifically for the first few frames of
  emulation if the resolution was changed beforehand.

When changing the resolution during emulation the call to
`SetNextWindowSize` had no effect because of the
`ImGuiCond_FirstUseEver` flag. `DisplaySize` would be updated several
frames later, and then the next emulation session would update the graph
size on its first frame.

When changing the resolution outside emulation and then starting a game,
the call to SetNextWindowSize on the first frame took effect but used
the stale value of `DisplaySize`. `DisplaySize` would be updated a few
frames later, but the graph wouldn't be resized until the first frame of
the second emulation session.

This commit fixes the issue by using the `ImGuiCond_Always` flag in the
performance graph's call to `SetNextWindowSize` when the render window
size changes.
2026-02-06 13:30:48 -08:00
Dentomologist
4b5b2ebd2f PerformanceMetrics: Add padding below graph
Add vertical padding between the performance graph (when it's enabled)
and the FPS/VPS/Speed overlays.
2026-02-06 13:30:48 -08:00
JMC47
c792454f79
Merge pull request #14326 from sepalani/ico-wii-speak
WiiSpeakWindow: Add missing Dolphin icon
2026-02-06 12:16:43 -05:00
Admiral H. Curtiss
b4cc818fad
Merge pull request #14315 from Gabriela-Orzechowska/fix_riivo_params
RiivolutionParser: Fix XML Param Parsing
2026-02-06 17:58:54 +01:00
Gabriela Orzechowska
b4a67351c0 RiivolutionParser: Fix XML Param Parsing 2026-02-06 18:06:27 +01:00
Sepalani
998de8ad8b WiiSpeakWindow: Add missing Dolphin icon 2026-02-06 16:31:09 +04: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
JosJuice
94283c9639 Core: Don't call InitMMIO from MemoryManager::Init
In the unit test I'm adding in the next commit, I want to call
MemoryManager::Init, but initializing all the hardware that
MemoryManager::InitMMIO calls into would be cumbersome.

Calling MemoryManager::InitMMIO from MemoryManager::Init was a bit
strange anyway. Because MemoryManager::Init is called about halfway
through HW::Init, some of the hardware that MemoryManager::InitMMIO
calls into isn't initialized yet.
2026-02-04 21:35:22 +01:00
JosJuice
b0e2a28e14 Core: Combine guest pages into host pages larger than 4K
Most systems that Dolphin runs on have a page size of 4 KiB, which
conveniently matches the page size of the GameCube and Wii. But there
are also systems that use larger page sizes, notably Apple CPUs with
16 KiB page sizes. To let us create host mappings on such systems, this
commit implements combining guest mappings into host page sized mappings
wherever possible.

For this to work for a given mapping, not only do four (in the case of
16 KiB) guest mappings have to exist adjacent to each other, but the
corresponding translated addresses also have to be adjacent, and the
lowest bits of the addresses have to match. When I tested a few games,
the following percentages of guest mappings met these criteria:

Spider-Man 2: 0%-12%
Rogue Squadron 2: 39%-42%
Rogue Squadron 3: 28%-41%

So while 16 KiB systems don't get as much of a performance improvement
as 4 KiB systems, they do still get some improvement.
2026-02-04 21:35:22 +01:00
JosJuice
0ce95299f6 Core: Don't create page table mappings before R/C bits are set
This gets rid of the hack of setting the R and C bits pessimistically,
reversing the performance regression in Rogue Squadron 3.
2026-02-04 21:35:22 +01:00
JosJuice
9462e9d890 Core: Update page table mappings incrementally
Removing and readding every page table mapping every time something
changes in the page table is very slow. Instead, let's generate a diff
and ask Memmap to update only the diff.
2026-02-04 21:35:20 +01:00
JosJuice
7b885b857e Core: Postpone page table updates when DR is unset
Page table mappings are only used when DR is set, so if page tables are
updated when DR isn't set, we can wait with updating page table mappings
until DR gets set. This lets us batch page table updates in the Disney
Trio of Destruction, improving performance when the games are loading
data. It doesn't help much for GameCube games, because those run tlbie
with DR set.

The PowerPCState struct has had its members slightly reordered. I had to
put pagetable_update_pending less than 4 KiB from the start so AArch64's
LDRB (immediate) can access it, and I also took the opportunity to move
some other members around to cut down on padding.
2026-02-04 21:34:07 +01:00
JosJuice
083f3a7e0e Core: Create fastmem mappings for page address translation
Previously we've only been setting up fastmem mappings for block address
translation, but now we also do it for page address translation. This
increases performance when games access memory using page tables, but
decreases performance when games set up page tables.

The tlbie instruction is used as an indication that the mappings need to
be updated.

There are some accuracy downsides:

* The TLB is now effectively infinitely large, which matters if games
  don't use tlbie when modifying page tables.
* The R and C bits for page table entries get set pessimistically rather
  than when the page is actually accessed.

No games are known to be broken by these inaccuracies, but unfortunately
the second inaccuracy causes a large performance regression in Rogue
Squadron 3. You still get the old, more accurate behavior if Enable
Write-Back Cache is on.
2026-02-04 21:33:56 +01:00
Jordan Woyak
201aa65906 Core: Make RunOnCPUThread always non-blocking. 2026-02-03 17:29:17 -06: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
Joshua Vandaële
d87e8ab7ff
ResourcePack: Fix loading resource packs
This is something I missed when updating minizip, this mistake made it so resource packs didn't find any textures
2026-02-02 20:01:58 +01:00
JosJuice
d3ec630904 Core: Pre-shift pagetable_hashmask left by 6
This will make the upcoming commits just a little bit neater to
implement.
2026-02-01 12:39:33 +01:00
JosJuice
08884746ed Core: Detect SR updates 2026-02-01 12:39:33 +01:00
JosJuice
183e12b055 Common/MemArena: Add function for getting page size 2026-02-01 12:39:32 +01:00
Dentomologist
6711d77b99
Merge pull request #14204 from Geotale/update-comment
Update Comments Based On Hardware Test
2026-01-31 15:02:09 -08:00
Joshua Vandaële
e6bc8fb342
WGL: Correctly load wglDestroyPbufferARB extension 2026-01-31 10:36:55 +01:00
Lilly Jade Katrin
18f8ed6588 RetroAchievements - Fix Aliases
It turns out that it is possible to create a login alias in RetroAchievements
such that you can log in with a username that doesn't match your display name.
AchievementManager was treating this as a synchronization error, but this is
desired behavior, so this removes the check.
2026-01-30 18:48:56 -05:00
Sam Belliveau
51c8f18b73 feat: Add an option to preserve audio pitch when emulation speed changes, integrating it into core configuration and both Qt and Android UIs. 2026-01-27 18:48:22 -05:00
Dentomologist
8f662f7be3 InputConfig: Remove unused local variables
Remove unused vector `controller_names` from `LoadConfig` and
`SaveConfig`. The vector has names added to it but they're never used.

Prior to d03f9032c1 these vectors were
passed to `DynamicInputTextureManager::GenerateTextures`, but that
commit removed those calls.
2026-01-26 11:36:42 -08:00
OatmealDome
c4c2aa8afd
Merge pull request #14253 from JosJuice/dsp-hle-memory
DSP: Remove HLEMemory functions
2026-01-25 22:07:59 -05:00
OatmealDome
164110d370
Merge pull request #14036 from TellowKrinkle/SkipPostprocess
CMake: Default SKIP_POSTPROCESS_BUNDLE to ON
2026-01-25 22:01:29 -05:00
Dentomologist
1b6a45df69
Merge pull request #14214 from JoshuaVandaele/cmake-nonbreaking-improvements
CMake: Various improvements
2026-01-25 18:33:46 -08:00
OatmealDome
168dbb0ab8
Merge pull request #14302 from oltolm/opengl_assert
DX, OGL: fix assert
2026-01-25 21:06:57 -05: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
JMC47
533fd18d8a
Merge pull request #14303 from Sintendo/game-ini
Core: Pass game ID as string_view
2026-01-24 15:36:29 -05:00
JosJuice
388b1e861c
Merge pull request #14230 from Sintendo/file-search
Common/FileSearch: Refactor DoFileSearch
2026-01-24 20:42:31 +01:00
oltolm
169f99c14d DX, OGL: fix assert 2026-01-24 20:38:05 +01:00
JMC47
1ef75021b6
Merge pull request #14216 from iwubcode/gameid_fifo_log
Core: add game id to fifo log header
2026-01-24 14:28:23 -05:00
Sintendo
b135537d65 Core/NetPlayServer: Pass game ID as string_view 2026-01-24 18:03:03 +01:00
Sintendo
8e6d95adb1 Core/ConfigManager: Refactor LoadGameIni and friends 2026-01-24 18:03:03 +01:00
Sintendo
bc4b977e9d Core/AchievementManager: Refactor IsApprovedCode and users 2026-01-24 18:02:57 +01:00
Sintendo
c0e75f2821 Core/ConfigLoaders: Refactor GetGameIniFilenames 2026-01-24 17:52:46 +01:00
Sintendo
60ca0626df Remove VectorToJStringArray 2026-01-24 16:50:10 +01:00
Sintendo
972ec95cb3 Clean includes 2026-01-24 16:50:10 +01:00
Sintendo
f2e1c71803 Common/FileSearch: Refactor DoFileSearch 2026-01-24 16:50:10 +01:00
JosJuice
3221e982d3
Merge pull request #13900 from JosJuice/jit-fma-double-rounding
Jit: Implement error-free transformation for single-precision FMA
2026-01-23 21:43:18 +01:00
iwubcode
4dae6bf97a
Merge pull request #14173 from JoshuaVandaele/WIL-submodule
Make WIL a submodule and update it
2026-01-21 18:04:49 -06:00
Dentomologist
009c53ab89
Merge pull request #14146 from jordan-woyak/cached-interp-fix-function-cast-warning
CachedInterpreter: Replace reinterpret_cast with std::bit_cast to resolve -Wcast-function-type-mismatch warnings.
2026-01-21 13:29:44 -08:00
Joshua Vandaële
67f27cb0ef
Make WIL a submodule and update it 2026-01-21 19:51:45 +01:00
Jordan Woyak
2322437f96 State: Simplify interthread communication and cleanups. Save/Load calls are now always non-blocking for the caller, but appropriately block the CPU thread as needed. 2026-01-19 21:56:59 -06:00
Jordan Woyak
1d9e475123 Common: Add TransferableSharedMutex class and unit tests. 2026-01-19 21:56:59 -06:00
Jordan Woyak
b0652925fa Core: Add a HookableEvent for UICommon::FlushUnsavedData. 2026-01-19 21:56:09 -06:00
JosJuice
0ba32f7add Android: Detect when native code should flush unsaved data 2026-01-19 21:56:09 -06:00
iwubcode
9656332356 Core: add game id to fifo logs, this makes it easier to test graphical enhancements which use the game id to load 2026-01-19 16:03:19 -06:00
Jordan Woyak
2a771937cf
Merge pull request #14294 from JosJuice/textureinfo-getters-header
VideoCommon: Move TextureInfo getters to header
2026-01-19 14:42:20 -06:00
JosJuice
b07c78aabe VideoCommon: Move TextureInfo getters to header
This improves my PC's performance on RS2 Hoth by... 0.1% or so, which I
think is within the margin of error. But this change also cuts down on
boilerplate.
2026-01-19 19:46:21 +01:00
Dentomologist
f4b88af71e JitRegister: Check Open return code
If the call to `Open` a perf map fails don't set `s_is_enabled` (though
it could already be true if you're also using VTUNE) and don't call
`std::setvbuf` with a null stream.

Also fix a typo in a comment (`if` -> `in`)
2026-01-18 17:26:26 -08:00
Dentomologist
7490dea278 JitRegister: Verify IOFile IsGood
Use IOFile's bool operator to check that it's not just open but good.
2026-01-18 17:26:26 -08:00
Dentomologist
935f537a80 JitRegister: Fix IsEnabled when using VTune without perf
Set `s_is_enabled` to `true` in `Init` when `USE_VTUNE` is defined so
that `IsEnabled` returns true even if perf isn't being used.
2026-01-18 17:26:26 -08:00
Admiral H. Curtiss
710905138c
Merge pull request #14290 from Dentomologist/jitregister_remove_redundant_open_file_check
JitRegister: Remove redundant check for open file
2026-01-19 02:06:57 +01:00
JosJuice
3b1a4739bc JitArm64: Special-case fmadds with single-precision inputs
If all inputs to an fmadds instruction (including cousins like fmsubs,
fnmadd...) are single-precision, then the result is identical between a
double-precision calculation with an error-free transform (whether the
calculation is fused or not) and a single-precision FMA instruction
(must be fused). So as a performance optimization in JitArm64, if we
were going to use double precision with EFT but the inputs are singles,
instead we'll use a normal single-precision FMA instruction without
anything extra. This lets us skip both the EFT and double-to-single
conversions.

Also renaming `inaccurate_fma` to `nonfused` because it's confusing that
`inaccurate_fma` and `m_accurate_fmadds` have such similar names
despite controlling separate things.
2026-01-18 20:03:54 +01:00
JosJuice
58487f1633 Jit: Implement error-free transformation for single-precision FMA
This implements the equivalent of 07443e2d41 in Jit64 and JitArm64.
Aims to fix https://bugs.dolphin-emu.org/issues/13865.
2026-01-18 20:02:49 +01:00
JosJuice
6ac7ffcdd7 Jit64: Return FixupBranch from HandleNaNs
This will be used in the next commit to skip running code that's
unnecessary when the result is NaN.
2026-01-18 20:02:49 +01:00
JosJuice
d5067b6276 Jit64: Replace MOVSD with MOVAPD in software FMA
Should be a little faster by avoiding false dependencies. Note that
there is one remaining MOVSD that really needs to be a MOVSD.
2026-01-18 20:02:49 +01:00
JosJuice
caad84c636 JitArm64: Reduce register pressure for inaccurate FMA with accurate NaNs
If result_reg is set to a temporary register instead of VD because of
accurate NaNs, there's no need to allocate a secondary temporary
register because of inaccurate FMA.
2026-01-18 20:02:49 +01:00
JosJuice
84261cfc23 Arm64Emitter: Fix Q bit of vector SHL/URSHR encoding
This doesn't affect any existing callers, because all existing callers
use quad registers.
2026-01-18 20:02:49 +01:00
JMC47
ff82ae3b5c
Merge pull request #14064 from JosJuice/jit64-fres-unit-test
Jit64: Add fres unit test
2026-01-18 13:52:31 -05:00
JMC47
fe668ebc89
Merge pull request #14033 from JosJuice/jitarm64-inaccurate-fma-double
JitArm64: Always use double precision for inaccurate FMA
2026-01-18 13:52:06 -05:00
JMC47
f8b47c031f
Merge pull request #14291 from JosJuice/defer-textureinfo
VideoCommon: Defer creating TextureInfo
2026-01-18 13:33:14 -05:00
JosJuice
fb07406f10 VideoCommon: Defer creating TextureInfo
TextureCacheBase::LoadImpl has a hot path where the passed-in
TextureInfo never gets used. Instead of passing in a TextureInfo, let's
pass in the stage and create the TextureInfo from the stage if needed.

This unlocks somewhere above an additional 4% performance boost in the
Hoth level of Rogue Squadron 2 on my PC. Performance varies, making it
difficult for me to measure, so treat this as a very approximate number.
2026-01-18 13:04:06 +01:00
JosJuice
75666604a2 Jit64: Add fres unit test 2026-01-18 11:21:35 +01:00
JosJuice
addededecf JitArm64: Always use double precision for inaccurate FMA
When we're emulating single-precision FMA using an FMA instruction,
there's no precision benefit from using a double-precision instruction,
assuming all inputs are single-precision. But when we're emulating
single-precision FMA using separate multiplication and addition
instructions, there is.

This change increases the precision of inaccurate FMA to the same level
as Jit64, which matters since the only reason we have the inaccurate
FMA mode is for sync compatibility with Jit64.
2026-01-18 10:36:00 +01:00
Jordan Woyak
362d359787 ARDecrypt: Code modernization. 2026-01-18 01:22:10 -06: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
iwubcode
6d40f4e897
Merge pull request #14265 from JoshuaVandaele/std-unreachable
c++23: Replace Common::Unreachable with std::unreachable
2026-01-17 22:32:53 -06:00
Dentomologist
3424983a65 JitRegister: Remove redundant check for open file
The check only happened if `USE_VTUNE` wasn't defined, and in that case
it was immediately followed by the same check again.

The check used to avoid an unnecessary call to `StringFromFormatV` in
certain circumstances, but that call was removed in
be81fe86e1.
2026-01-17 16:39:04 -08:00
JMC47
035bcffc63
Merge pull request #14289 from Sintendo/typos
Fix various typos and spelling mistakes
2026-01-17 19:10:50 -05:00
JMC47
d098f2bba9
Merge pull request #14274 from JosJuice/jitregister-check-enabled
JitRegister: Check IsEnabled before constructing string
2026-01-17 18:23:43 -05:00
JMC47
cffa4422c9
Merge pull request #14258 from JoshuaVandaele/dinput-unconditional-mousebuttons
DInputKeyboardMouse: Always report all possible buttons
2026-01-17 18:23:26 -05:00
JMC47
a5b34d43fc
Merge pull request #14215 from Tilka/disasm
GekkoDisassembler: fix multiple issues
2026-01-17 18:21:09 -05:00
JMC47
9e8e644fbf
Merge pull request #14193 from jordan-woyak/budokaiprogressive
GameSettings: Dragon Ball Z: Budokai 1 and 2 adjustments.
2026-01-17 18:20:37 -05:00
JMC47
581bef63be
Merge pull request #14250 from jordan-woyak/wmreal-bb-no-pool
WiimoteReal: Immediately disconnect balance boards when disabled.
2026-01-17 18:16:04 -05:00
Jordan Woyak
dffc7a650d Common: Replace Result with C++23's std::expected. 2026-01-17 16:58:45 -06:00
Joshua Vandaële
e822cc3715
c++23: Replace Common::Unreachable with std::unreachable
Requires at least GCC 12, Clang 15, MSVC 19.32, or AppleClang 14.0.3.
2026-01-17 23:53:21 +01:00
iwubcode
b556bd99d7
Merge pull request #14268 from JoshuaVandaele/std-tounderlying
c++23: Replace Common::ToUnderlying with std::to_underlying
2026-01-17 16:49:57 -06:00
JMC47
8a606fca88
Merge pull request #14286 from JosJuice/textureinfo-vector
VideoCommon: Don't create mipmap vector in TextureInfo
2026-01-17 16:03:26 -05:00
OatmealDome
7ec5b06ab9
Merge pull request #14287 from Sintendo/mac-cmake-fix
Fix MacUpdater build on CMake 3.31+
2026-01-17 14:51:23 -05:00
Dentomologist
3042918952
Merge pull request #14213 from cscd98/readvalue
mingw: move ReadValue definitions into cpp to fix visibility
2026-01-17 11:37:27 -08:00
Sintendo
1e0473e44f Fix various typos and spelling mistakes 2026-01-17 20:11:38 +01:00
Sintendo
eedee51b93 Fix MacUpdater build on CMake 3.31+
Building on macOS with a recent CMake version would result in the
following error:

CMake Error at Source/Core/MacUpdater/CMakeLists.txt:48 (add_custom_command):
  The following keywords are not supported when using
  add_custom_command(TARGET): DEPENDS

As it turns out, this form of `add_custom_command` does not accept
DEPENDS, but versions of CMake prior to 3.31 silently dropped it.
2026-01-17 18:25:49 +01:00
JosJuice
f7b4d2738b VideoCommon: Don't create mipmap vector in TextureInfo
The TextureInfo constructor creates a vector of MipLevels. This could be
good for performance if MipLevels are accessed very often for each
TextureInfo, but that's not the case. Dolphin creates thousands of
TextureInfos per second that it never accesses the mipmap levels of
because there's a hit in the texture cache, and in the uncommon case of
a texture cache miss, the mipmap levels only get looped through once.

To make the common case of texture cache hits as fast as possible, let's
not create a vector in the TextureInfo constructor. This commit
implements a custom iterator for MipLevels instead.

In my testing on the Death Star level of Rogue Squadron 2, this speeds
up TextureInfo::FromStage by 200%, giving an overall emulation speedup
of a bit over 1%. Results on the Hoth level are even better, with
TextureInfo::FromStage being close to 300% faster and overall emulation
being over 4% faster. (Single core, no GPU texture decoding.)
2026-01-17 17:57:07 +01:00
Sepalani
faa977f5ee LogitechMicWindow: Fix compilation when cubeb is disabled 2026-01-17 01:51:38 +04:00
Joshua Vandaële
0e348ee159
MenuBar: Add entries to open the config and cache folders 2026-01-15 20:40:48 +01:00
JosJuice
4c7cb2622f
Merge pull request #14246 from LeddaZ/android-gitignore
Android: Add build output folders to gitignore
2026-01-14 18:54:16 +01:00
JosJuice
01b4f8bcf7
Merge pull request #14245 from LeddaZ/android-materialyou-fix
Android: Switch to Theme.Material3.DynamicColors
2026-01-14 18:54:05 +01:00
JosJuice
a80734138e
Merge pull request #14244 from LeddaZ/kotlin-compilerdsl
Android: Use compilerOptions block to specify JVM version
2026-01-14 18:53:37 +01:00
JMC47
2aee998a8e
Merge pull request #14199 from JosJuice/jit64-rcoparg-isimm
Jit64: Return current value from RCOpArg::IsImm
2026-01-12 13:06:09 -05:00
Jordan Woyak
5162608df9 Revert "Externals: Update zlib-ng to v2.3.2"
This reverts commit 34b402b631.
2026-01-11 20:29:05 -06:00
Jordan Woyak
dc8f2995ef
Merge pull request #14273 from JosJuice/x64-oparg-padding
Jit64: Make OpArg and TrampolineInfo smaller
2026-01-11 16:14:50 -06:00
JMC47
79a4034aa0
Merge pull request #14251 from JoshuaVandaele/cmake-editorconfig
.editorconfig: Update CMake style
2026-01-11 16:28:03 -05:00
JMC47
823d111922
Merge pull request #14255 from JoshuaVandaele/bsd-fix
cpp-ipc: Fix builds on non-FreeBSD BSDs
2026-01-11 16:27:29 -05:00
JMC47
28a8fa5de6
Merge pull request #14229 from JoshuaVandaele/zlib-ng
Externals: Update zlib-ng to v2.3.2
2026-01-11 16:03:18 -05:00
JMC47
79255f550d
Merge pull request #14275 from JosJuice/hotkey-vector
HotkeyManager: Don't allocate heap memory in GetInput
2026-01-11 15:41:03 -05:00
JosJuice
3c771ade4b HotkeyManager: Don't allocate heap memory in GetInput
Profiling Dolphin using Heaptrack, this turns out to be the cause of
more than half of all temporary allocations. Though since it's in a
separate thread, I suppose it wasn't affecting performance very much.
2026-01-11 21:14:34 +01:00
JosJuice
c54dc9db60 JitRegister: Check IsEnabled before constructing string
Without this, every time we finalize a JIT block, we have to allocate
memory for a string and format the string.
2026-01-11 21:01:49 +01:00
JosJuice
3ea366119f Jit64: Make TrampolineInfo smaller
Combined with the previous commit, this brings the TrampolineInfo struct
down to 48 bytes. This matters, because Jit64 has a big
std::unordered_map where it stores many megabytes of TrampolineInfo
entries.

The key saving comes from shrinking the len member from u32 to u16. It
should be safe to even turn it into a u8, but going that far brings no
additional savings due to how the padding works out.
2026-01-11 19:12:26 +01:00
JosJuice
283218bc29 x64Emitter: Reduce padding in OpArg
By moving members of the OpArg struct around, we can cut down on how
much padding the struct needs. Now it has a size of 16 bytes, small
enough for function calls to pass it in two registers instead of on the
stack.
2026-01-11 19:07:08 +01:00
OatmealDome
e065b34a64
Merge pull request #14272 from OatmealDome/liquid-glass-begone
DolphinQt: Disable Liquid Glass on macOS when built with Xcode 26
2026-01-09 22:28:16 -05:00
Joshua Vandaële
55f0715ad4
c++23: Replace Common::ToUnderlying with std::to_underlying
Requires at least GCC 11, Clang 13, MSVC 19.30 (VS2022 17.0), or AppleClang 13.1.6 (XCode 13.3).
2026-01-09 23:49:10 +01:00
OatmealDome
6be6e7734b
DolphinQt: Disable Liquid Glass on macOS when built with Xcode 26 2026-01-09 08:27:12 -05:00
LillyJadeKatrin
dfba2802ad Fix RetroAchievements dev search freezes
Re-added a line of code from a cancelled PR (that I thought was in
main already) that RetroAchievements uses to properly synchronize
memory reads and writes with the emulator frames. This appears to
fix some pretty major freezing and deadlocks in the RA dev tools.
2026-01-09 08:20:21 -05:00
iwubcode
cc0ce62e7f
Merge pull request #14252 from Dentomologist/set_standard_to_c++23
Set standard to c++23 for non-MSVC compilers
2026-01-08 14:35:17 -06:00
Joshua Vandaële
6cc121aceb
DInputKeyboardMouse: Always report all possible buttons 2026-01-07 01:08:34 +01:00
Dentomologist
cc2db2ce15 Set standard to c++23 for non-MSVC compilers 2026-01-06 14:49:40 -08:00
Dentomologist
ba32260c29 Set CMake version range to 3.20...4.2.1
CMake support for c++23 was added in 3.20.

Remove statements explicitly setting the following policies to NEW.
These policies were introduced in or before 3.20, and now that 3.20 is
the minimum version they will automatically have the NEW behavior.

Policy:  Introduced in
CMP0079: 3.13
CMP0084: 3.14
CMP0091: 3.15
CMP0092: 3.15
CMP0099: 3.17
CMP0117: 3.20

Disable scanning c++ source files for module imports (introduced as
CMP0155 in 3.28) since we don't use modules and that policy triggers
build errors with Clang if the clang-scan-deps tool isn't installed.
2026-01-06 14:44:20 -08:00
Joshua Vandaële
2005b0365e
cpp-ipc: Fix builds on non-FreeBSD BSDs
cpp-ipc is explicitely only available on Windows, Linux, QNX, and FreeBSD. Trying to build dolphin on any another BSD such as OpenBSD or Haiku currently leads to failure because of this.
2026-01-06 21:46:33 +01:00
JosJuice
2098b4b1ca DSP: Remove HLEMemory functions
During my quest to rid Dolphin of the memory-unsafe GetPointer function,
I didn't realize that DSPHLE had its own set of memory access functions
that were essentially duplicating the standard ones. This commit gets
rid of them and replaces calls to them with calls to MemoryManager.
2026-01-05 16:15:17 +01:00
Dentomologist
af585e0bd0 Metal: Move ObjectCache constructor and destructor
Move the constructor and destructor after the definition of the class
`Internal`.

This fixes an error generated by Clang from the destructor of
`std::unique_ptr<Internal>` when setting the standard version to c++23:

`invalid application of 'sizeof' to an incomplete type 'Metal::ObjectCache::Internal'`.
2026-01-04 17:56:25 -08:00
Dentomologist
b1c9c13ca3 VolumeFileBlobReader: Define default destructor in source file
Fix an error generated by Clang from the destructor of
`std::unique_ptr<FileInfo> m_file_info` when setting the standard
version to c++23:

`invalid application of 'sizeof' to an incomplete type 'DiscIO::FileInfo'`
2026-01-04 17:56:08 -08:00
Craig Carnell
e4f6d9bad4 mingw: move ReadValue instantiations in cpp for compatibility 2026-01-04 21:16:30 +00:00
Joshua Vandaële
7f6bf67182
CMake: Apply editorconfig formatting 2026-01-04 12:59:56 +01:00
Jordan Woyak
cb07f9608c WiimoteReal/IOWin: Determine the Bluetooth name of HID interfaces to differentiate between Wii Remotes and Balance Boards. 2026-01-03 16:50:39 -06:00
Jordan Woyak
fb2a46c4cf
Merge pull request #14248 from jordan-woyak/windows-balance-board-fix
WiimoteReal/IOWin: Fix Real Balance Board connections.
2026-01-03 16:48:39 -06:00
Jordan Woyak
918a419131 WiimoteReal: Immediately disconnect balance boards when disabled rather than placing them in the temporary pool. 2026-01-03 04:59:55 -06:00
Jordan Woyak
17a518ef30 WiimoteReal/IOWin: Fix Real Balance Board connections. 2026-01-02 15:56:32 -06:00
Jordan Woyak
93e5f58460 DiscIO/Volume: Fix CreateVolume for WiiWare. 2026-01-02 14:55:20 -06:00
Leonardo Ledda
87345d5eda
Android: Add build output folders to gitignore
Signed-off-by: Leonardo Ledda <leonardoledda@gmail.com>
2026-01-01 14:23:40 +01:00
Leonardo Ledda
593c9f3836
Android: Switch to Theme.Material3.DynamicColors
* This fixes some UI elements (3-dot menu background, status bar when scrolling down in settings) not following Material You colors.
* It doesn't cause any issues on Android versions without dynamic colors (tested on Android 9, 11, 16)

Signed-off-by: Leonardo Ledda <leonardoledda@gmail.com>
2026-01-01 14:11:37 +01:00
Leonardo Ledda
af0d03b399
Android: Use compilerOptions block to specify JVM version
* Fixes deprecation warning

Signed-off-by: Leonardo Ledda <leonardoledda@gmail.com>
2026-01-01 13:43:38 +01:00
Sepalani
b05a7e2059 IOS/USB: Add helper to set return values of IsoMessage's packets 2026-01-01 15:44:18 +04:00
Jordan Woyak
329ab1f518
Merge pull request #14232 from iwubcode/const_flags
Common: update Flags to allow const object usage
2025-12-30 18:12:12 -06:00
Jordan Woyak
d84dd20991
Merge pull request #14208 from cristian64/broadband_adapter_ipc_freebsd
Core/HW: Enable BBA (IPC) in FreeBSD.
2025-12-30 17:59:59 -06:00
Joshua Vandaële
74b1930da4
JitArm64_RegCache: Fix is always true warnings 2025-12-29 11:12:07 +01:00
Joshua Vandaële
f9fe82f19e
ShaderAsset: Fix shadowed variable
`samplers` is a member defined in ShaderAsset.h
2025-12-29 11:12:07 +01:00
LillyJadeKatrin
9fae55e098 RetroAchievements - Corrected MEM2 Alignment
rcheevos expects Wii MEM2 to be aligned to 0x10000000 in recent updates;
this corrects AchievementManager to do so.
2025-12-28 14:47:27 -05:00
iwubcode
aa1605e95a
Merge pull request #14228 from iwubcode/clear_compiler_work_resource_mgr
VideoCommon: clear all compiler work when resource manager shuts down
2025-12-27 13:09:21 -06:00
JosJuice
db6c3b783c
Merge pull request #14234 from JoshuaVandaele/wunused-cpipeline
CustomPipeline: Remove unused functions
2025-12-27 11:17:27 +01:00
JosJuice
73f2ac6eb0
Merge pull request #14233 from Sintendo/fix-shader-resource-warning
VideoCommon: Fix ShaderResource init order warning
2025-12-27 11:16:21 +01:00
Joshua Vandaële
35c6a6e612
CustomPipeline: Remove unused functions 2025-12-27 09:07:42 +01:00
Sintendo
1b3485b6fd VideoCommon: Fix ShaderResource init order warning 2025-12-26 23:15:17 +01:00
iwubcode
c9ef05c4b3 Common: update Flags to allow const object usage
Co-authored-by: Jordan Woyak <jordan.woyak@gmail.com>
2025-12-25 21:07:45 -06:00
iwubcode
66c392f729 VideoCommon: initialize stored viewport to 0, fixes a crash in debug mode for d3d 2025-12-24 15:23:25 -06:00
Joshua Vandaële
34b402b631
Externals: Update zlib-ng to v2.3.2 2025-12-24 11:44:37 +01:00
iwubcode
f846fc0d02 VideoCommon: clear all compiler work when resource manager shuts down 2025-12-24 01:51:55 -06:00
JMC47
4b086b1256
Merge pull request #14223 from jordan-woyak/wmreal-windows-device-enumeration
HW/WiimoteReal: Cache the enumerated Wii remote HID interface list between calls to FindWiimoteHIDDevices.
2025-12-23 17:01:44 -05:00
Jordan Woyak
fc4cbf9c6f HW/WiimoteReal: Cache the enumerated Wii remote HID interface list between calls to FindWiimoteHIDDevices. 2025-12-23 00:16:10 -06:00
Jordan Woyak
c55218200a WindowsDevice: Add DeviceChangeNotification class. 2025-12-23 00:02:36 -06:00
JMC47
0a3aac6d85
Merge pull request #14043 from iwubcode/custom_resource
VideoCommon: separate the concept of a 'resource' from an 'asset', add Material/Shader loading
2025-12-22 17:08:02 -05:00
JMC47
d458d6d92a
Merge pull request #14206 from cscd98/send-message
mingw: replace usages of SendMessage due to clash with existing function
2025-12-22 13:41:03 -05:00
JMC47
6d9978519a
Merge pull request #14205 from cscd98/interface-replace
mingw: replace usages of Interface as clashes with existing struct
2025-12-22 13:40:41 -05:00
JMC47
0aaa29d047
Merge pull request #14185 from mbc07/osd-tooltip-fix
DolphinQt: minor fixes for the OnScreenDisplayPane
2025-12-22 13:39:22 -05:00
JMC47
561428b80d
Merge pull request #14184 from jordan-woyak/es-setuid-faster
IOS/ES: Make the Wii menu "Data Management" "Save Data" screen not nearly as hard to emulate at full speed.
2025-12-22 13:38:55 -05:00
JMC47
b1f0d883cf
Merge pull request #14174 from JoshuaVandaele/minizips-cmake
Use minizip-ng's CMakeLists instead of relying on our own implementation
2025-12-22 13:36:52 -05:00
JMC47
f76a2ec004
Merge pull request #14166 from jordan-woyak/immediate-xfb-limit
VideoCommon: Add setting to limit immediate swaps to one per VI.
2025-12-22 13:35:52 -05:00
JMC47
07d071a0b8
Merge pull request #14158 from jordan-woyak/gcadapter-poll-rate-display
GCAdapter: Calculate poll rate for display in UI.
2025-12-22 13:35:24 -05:00
JMC47
8aabaf8b63
Merge pull request #14155 from Simonx22/android/remove-completable-future
Android: Remove CompletableFuture
2025-12-22 13:34:58 -05:00