Commit Graph

45368 Commits

Author SHA1 Message Date
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
Dentomologist
fe517e2287
Merge pull request #14339 from jordan-woyak/pointer-wrap-no-do-pointer
ChunkFile: Prevent PointerWrap::Do(T&) from compiling with pointers.
2026-02-10 19:20:13 -08:00
Jordan Woyak
2ba9af9e60 ChunkFile: Prevent PointerWrap::Do(T&) from compiling with pointers. 2026-02-10 06:44:36 -06:00
JMC47
7e60de1cfa
Merge pull request #14337 from SuperSamus/revert-7694-MKWDeferred
Revert "Disable Deferred EFB Copies on Mario kart Wii"
2026-02-09 18:38:04 -05:00
Martino Fontana
f84cb40e2c
Revert "Disable Deferred EFB Copies on Mario kart Wii" 2026-02-09 22:59:03 +01:00
JosJuice
ebc8c9d857
Merge pull request #14330 from oltolm/static
Misc: fix compiler warning: implicit declaration of function
2026-02-08 20:58:39 +01:00
ElTioRata
0bc5a8acb8 Gecko/AR - Widescreen Fix for Mega Man X - Command Mission 2026-02-08 16:09:14 -03:00
JosJuice
2891bc9495 GameSettings: Update Rogue Squadron II and III
I've gone through all relevant settings for Rogue Squadron II and III
and overhauled their game INI files. Each setting is explained with a
comment.

Some settings I chose not to include:

* EFB to RAM only seems to affect certain fadeouts in Rogue Squadron II.
  Without it, the affected fadeouts are replaced by a pure black screen.
  I don't think this is important enough to warrant the performance hit.
* As I was unable to find anything Rogue Squadron III needs EFB to RAM
  for, I also didn't find anything it needs DeferEFBCopies disabled for.
* I didn't find anything EFBEmulateFormatChanges was needed for in
  either game.
* Enabling EFB access makes the ship engine glow visible in Rogue
  Squadron III, but this effect is minor enough that you probably won't
  notice it's missing unless you know it's supposed to be there. Since
  this is Dolphin's heaviest game, let's give users the choice.
* I was considering forcing XFB to RAM for Rogue Squadron III to make
  fadeouts render properly instead of going from magenta to black, since
  enabling XFB to RAM doesn't really hurt performance when you're
  already enabling EFB to RAM. But then I was unable to find a reason
  why we should enable EFB to RAM for this game.

Tested in RS2 and RS3. The RS3 demo disc settings are copied from the
RS3 settings and haven't been tested by me.
2026-02-08 12:14:53 +01: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
64d40316d0
Merge pull request #14318 from jordan-woyak/RunOnCPUThread-always-non-blocking
Core: Make RunOnCPUThread always non-blocking.
2026-02-03 20:46:43 -06: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
Jordan Woyak
eac7b29042
Merge pull request #14314 from JMC47/shodown
GameINI: Force Safe Texture Cache to Samurai Shodown Anthology
2026-02-02 22:26:13 -06:00
JMC47
c7de916276
Merge pull request #14316 from JoshuaVandaele/resourcefix
ResourcePack: Fix loading resource packs
2026-02-02 15:05:51 -05: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
JMC47
ac19ef5452 GameINI: Force Safe Texture Cache to Samurai Shodown Anthology 2026-02-01 00:42:27 -05: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
Jordan Woyak
16276928cc
Merge pull request #14312 from JoshuaVandaele/wglDestroyPbufferARB
WGL: Correctly load wglDestroyPbufferARB extension
2026-01-31 16:45:19 -06: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
JMC47
b102018651
Merge pull request #14307 from Sam-Belliveau/granular-audio-stretching
Add an option to preserve audio pitch when emulation speed changes
2026-01-30 14:51:08 -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
Jordan Woyak
bb7e011673
Merge pull request #14254 from droidpeti/master
GMSE01: Added credits to Gecko codes for Super Mario Sunshine (USA)
2026-01-27 17:32:25 -06:00
JMC47
10b9da8cd4
Merge pull request #14301 from jordan-woyak/speedhack-dark-summit
GameSettings: Add patches to limit framerate in Dark Summit.
2026-01-27 01:38:36 -05:00
Jordan Woyak
8541dfa419 GameSettings: Add patches to limit framerate in Dark Summit and mention reason for ImmediateXFBEnable=false. 2026-01-26 20:54:06 -06:00
OatmealDome
4d2917d302
Merge pull request #14305 from JoshuaVandaele/implot-ninja-win
CMake: Apply implot fix on Windows with non-VS generators
2026-01-26 21:53:37 -05:00
JMC47
d474ae99f9
Merge pull request #14295 from JMC47/evoframerate
GameINI: Add patch to limit internal framerate of 4x4 Evo 2 to VPS
2026-01-26 21:28:01 -05:00
OatmealDome
01cbed6fc4
Merge pull request #14306 from Dentomologist/inputconfig_remove_unused_local_variables
InputConfig: Remove unused local variables
2026-01-26 17:31:34 -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