Commit Graph

32995 Commits

Author SHA1 Message Date
Tillmann Karras
64b07891de FIFOAnalyzer: add simple state view 2025-12-05 00:21:50 +00:00
JosJuice
213dc1c9af
Merge pull request #14178 from Dentomologist/jit64_avoid_passing_immediate_to_non_immediate_parameter
Jit64: Avoid passing immediate to non-immediate parameter
2025-12-01 20:01:52 +01:00
JosJuice
efa8439b79
Merge pull request #14186 from JoshuaVandaele/dit-crash-fix
DITConfiguration: Prevent a crash if images fail to load
2025-12-01 20:00:19 +01:00
JosJuice
582d5cfe96
Merge pull request #14188 from JosJuice/jit64-flush-carry
Jit64: Flush carry flag in FallBackToInterpreter
2025-12-01 19:58:38 +01:00
JosJuice
f842af8b03
Merge pull request #14182 from jordan-woyak/ra-hardcore-warning-size
DolphinQt: Use QtUtils::CreateIconWarning to make the RetroAchievements warning size consistent with other warnings.
2025-11-30 23:25:12 +01:00
JosJuice
e27ec97b15
Merge pull request #14180 from jordan-woyak/mgba-link-fix
GBACore: Fix Pokemon GBA link.
2025-11-30 18:26:18 +01:00
Joshua Vandaële
5a6dc310c0
DITConfiguration: Prevent a crash if images fail to load
Recently came across a strange issue where Dolphin would hard crash in most games with this error:

```sh
/usr/include/c++/15.2.1/optional:1165: constexpr const _Tp* std::optional<_Tp>::operator->() const [with _Tp = InputCommon::ImagePixelData]: Assertion 'this->_M_is_engaged()' failed.
```

The culprit turned out to be accessing `host_key_image` which is an `std::optional` thay may return `std::nullopt`. I'm not sure why this issue started occuring for me since I've had no issue with my Dynamic Input Textures in the past? But this fixes a crash if the image fails to load.
2025-11-29 23:54:48 +01:00
Dentomologist
448d61f262 Windows/DirectIOFile: Don't request DELETE access for read-only Open
Aside from being unnecessary, on Windows the flag prevents two instances
of Dolphin (one instance from before 2509-371 when the flag was
introduced and the other after) from running the same ROM
simultaneously.

Attempting to do so generated the false error `"[Rom]" is an invalid
GCM/ISO file, or is not a GC/Wii ISO.` followed by `Failed to init core`
and emulation shutdown on the second instance to start the game. Fixing
the incorrect error message is a task I'm deferring to another PR.

The problem didn't happen when both instances were 2509-371 or later,
but I ran into it while bisecting an issue and it'd be nice to avoid
that problem in the future.
2025-11-29 14:02:24 -08:00
JosJuice
0c024de591 Jit64: Flush carry flag in FallBackToInterpreter
We have an optimization where the guest carry flag is kept in the host
carry flag between certain back-to-back pairs of integer instructions.
If the second instruction falls back to the interpreter, then
FallBackToInterpreter should flush the carry flag to m_ppc_state,
otherwise the interpreter reads a stale carry flag and at some later
point Jit64 trips the "Attempt to modify flags while flags locked!"
assertion.

An alternative solution would be to not store the guest carry flag in
the host carry flag to begin with if we know the next instruction is
going to fall back to the interpreter, but knowing that in advance is
non-trivial. Since interpreter fallbacks aren't exactly intended to be
super optimized, I went for the flushing solution instead, which is how
JitArm64 already works. In most cases, the emitted code shouldn't even
differ between these two solutions.

Note that the problematic situation only happens if the first integer
instruction doesn't fall back to the interpreter but the second one
does. This used to be impossible because there's no "JIT disable"
setting that's granular enough to disable some integer instructions but
not all, but with the constant propagation PR, it's possible if constant
propagation is able to entirely evaluate the first instruction but not
the second.
2025-11-29 11:45:43 +01:00
Jordan Woyak
e8c512dfb5
Merge pull request #14183 from LillyJadeKatrin/retroachievements-eternal-darkness-testing-my-sanity
RetroAchievements - Remove Hardcore Check from ApplyMemoryPatch
2025-11-27 14:30:39 -06:00
LillyJadeKatrin
fd0b875ab5 RetroAchievements - Remove Hardcore Check from ApplyMemoryPatch
This was blocking all memory patches from executing properly in hardcore mode even when contained in the Allowlist.
2025-11-27 11:52:56 -05:00
Jordan Woyak
70d4bb970c DolphinQt: Use QtUtils::CreateIconWarning to make the RetroAchievements "hardcore mode" warning size consistent with the other warnings. 2025-11-27 01:43:50 -06:00
Jordan Woyak
19a1ee3064 GBACore: Fix Pokemon GBA link. 2025-11-26 23:12:20 -06:00
Dentomologist
c2d277c5d1 Jit64: Avoid passing immediate to non-immediate parameter
Call `UseNoImm` instead of `Use` on parameter `a` of `MultiplyImmediate`
since `Ra` gets passed to `IMUL` which asserts that parameter is not an
immediate.
2025-11-26 16:27:26 -08:00
Tillmann Karras
07ef12eecc AX: fix signedness of second low-pass filter coefficient
This fixes NFL Blitz Pro.
2025-11-27 00:08:11 +00:00
Jordan Woyak
63372b8dea
Merge pull request #14169 from JosJuice/i18n-2025-11-25
DolphinQt: Adjust capitalization of "Select A Bluetooth Device"
2025-11-25 16:47:48 -06:00
JosJuice
807488caf9
Merge pull request #14066 from Biendeo/master
IOS: Logitech USB Microphone Basic Support
2025-11-25 23:12:39 +01:00
JosJuice
ab0601b06a DolphinQt: Adjust capitalization of "Select A Bluetooth Device" 2025-11-25 21:17:35 +01:00
Biendeo
07324ca067
USB: Add emulated Logitech USB Microphone
Co-authored by: supermilkdude67 <w.f.s.jazzfyre@gmail.com>
2025-11-25 10:40:30 +11:00
Jason E. Hale
6b3d24b481
Fix build for non-Linux with Qt 6.10+
There was a LINUX check added in b3bdad4, but this should be removed as this change applies to all Qt supported platforms. Simply put, GuiPrivate CMake files were introduced in Qt 6.9 and are now enforced in Qt 6.10 and are not platform-dependent.
2025-11-24 06:53:51 -05:00
Jordan Woyak
e195d3bb6e
Merge pull request #14125 from JosJuice/local-cpu-thread-job-finished
Core: Make s_cpu_thread_job_finished a local variable
2025-11-23 15:55:28 -06:00
JosJuice
2d9f317f04 Core: Make s_cpu_thread_job_finished a local variable
Having it be static leads to a race condition if two different threads
call RunOnCPUThread with wait_for_completion set to true. (There's
currently nobody calling RunOnCPUThread from anything other than the
host thread, so this hasn't led to any consequences yet.)
2025-11-23 15:17:20 +01:00
JosJuice
aeac5f1a58
Merge pull request #14107 from jordan-woyak/mGBA-version-bump
Externals: Update mGBA to latest master.
2025-11-23 14:38:39 +01:00
JosJuice
5769fc7372
Merge pull request #14134 from jordan-woyak/mercusys-rtl-firmware
Bluetooth/RealtekFirmwareLoader: Add Mercusys MA530 to list.
2025-11-23 14:29:08 +01:00
JMC47
65f39c076e
Merge pull request #14149 from iwubcode/shader_asset_vector_properties
VideoCommon: update ShaderAsset to use a vector of properties
2025-11-23 06:34:45 -05:00
JosJuice
490615c72a
Merge pull request #14142 from JosJuice/directiofile-cant-create-saf
Common: Treat DirectIOFile as unable to create SAF files
2025-11-23 09:50:44 +01:00
Jordan Woyak
151d295b2c
Merge pull request #14148 from jordan-woyak/hookable-event-add-remove-inside-trigger
HookableEvent: Allow hooks to be added and removed from within a Trigger callback.
2025-11-23 02:20:47 -06:00
JosJuice
30dbcb2f80
Merge pull request #14128 from jordan-woyak/fix-run-on-object-race
DolphinQt/QtUtils: Simplify RunOnObject and eliminate Common::Event race. Introduce Common::OneShotEvent class.
2025-11-22 21:52:17 +01:00
Jordan Woyak
6464ed9e6b
Merge pull request #14157 from jordan-woyak/fix-rush-speed-display
CoreTiming: Fix percent speed display when "Rush Frame Presentation" is enabled.
2025-11-22 14:46:00 -06:00
JosJuice
f4f7424a9f
Merge pull request #13583 from LillyJadeKatrin/retroachievements-android
Android Support for RetroAchievements
2025-11-22 17:00:03 +01:00
Jordan Woyak
cab8d7ca01 CoreTiming: Fix percent speed display when "Rush Frame Presentation" is enabled. 2025-11-22 05:04:09 -06:00
JMC47
3fd8d072bf
Merge pull request #14037 from jordan-woyak/presentation-timing
Add "Rush Frame Presentation" and "Smooth Early Presentation" settings.
2025-11-22 04:49:03 -05:00
JMC47
ccc19aafe0
Merge pull request #14119 from jordan-woyak/si-status-response-length
HW/SI: Fix CMD_STATUS response lengths.
2025-11-22 04:38:12 -05:00
Jordan Woyak
11318e0be5 HookableEvent: Allow hooks to be added and removed from within a Trigger callback. This fixes a deadlock in FIFOFifoRecorder. 2025-11-21 16:58:20 -06:00
iwubcode
2c646cec40 VideoCommon: update ShaderAsset to use a vector of properties, this way we ensure the order of these properties match the order of the material 2025-11-21 14:31:10 -06:00
iwubcode
1f083a60c9 VideoCommon: update ShaderAsset to remove requirement of the code name being in the shader source, this just makes it more difficult to iteratively test changes, assume shader devs know what they are doing 2025-11-21 14:29:24 -06:00
Jordan Woyak
c9b0e4928a DolphinQt/OnScreenDisplayPane: Swap the positions of "Show Performance Graphs" and "Show Speed Colors". 2025-11-21 01:35:28 -06:00
Jordan Woyak
8efc4086f0 DolphinQt/OnScreenDisplayPane: Rename "Graph Update Rate" back to "Performance Sample Window" and don't disable it based on "Show Performance Graphs". 2025-11-21 01:35:22 -06:00
Jordan Woyak
4f30aaf1ca
Merge pull request #13152 from Naim2000/sdlock
SDIO: report write lock status
2025-11-20 15:04:39 -06:00
Jordan Woyak
2719a5673e
Merge pull request #14121 from jordan-woyak/warn-silence
Common and VideoCommon: Silence a few warnings.
2025-11-19 22:09:19 -06:00
Jordan Woyak
1a71f0fa2e SDIO: Remove file "good" checks so errors are properly produced. 2025-11-19 21:05:57 -06:00
Naim2000
f1f8b0a825 SDIO: the CID/CSD are sent a bit differently 2025-11-19 21:05:54 -06:00
Naim2000
227c4e0515 SDIO: report actual error if writes are disabled 2025-11-19 20:11:05 -06:00
Naim2000
2e340ab160 SDIO: report write lock status 2025-11-19 18:58:13 -06:00
Jordan Woyak
2acb49544c
Merge pull request #13539 from tygyh/DiscIO-Remove-redundant-casts
DiscIO: Remove redundant casts
2025-11-19 17:40:42 -06:00
Jordan Woyak
41b6ab40e1
Merge pull request #13619 from y21/usbv5_getversion_size
Check buffer out/size in HID_USBv5/USB_VEN GetVersion Ioctl
2025-11-19 17:32:33 -06:00
Jordan Woyak
d0341b3bfc
Merge pull request #14127 from jordan-woyak/movie-cpu-thread-guard
Movie: Replace a blocking RunOnCPUThread call with a CPUThreadGuard.
2025-11-19 13:43:05 -06:00
LillyJadeKatrin
ddced1a070 RetroAchievements - Android login callback
Modify the RetroAchievements login code in Android to pass in a callback, pop a message if login fails, close the login box if it succeeds.
2025-11-18 20:40:15 -05:00
JosJuice
9883235c0c Common: Treat DirectIOFile as unable to create SAF files
In 405baed805, we made the assumption that whether OpenAndroidContent
is able to create a new file depends on the open mode, the document
provider, and the positions of the celestial bodies. However, I'm
fairly sure that it can't create files at all as currently implemented.

First, ContentResolver.openFileDescriptor is documented as throwing
FileNotFoundException if the file doesn't exist. Now, the SAF
documentation is notoriously unreliable on matters like these, and
document providers can do whatever they want anyway, so we can't
actually trust this to mean that FileNotFoundException will always
be thrown if the file doesn't exist. But second, the Dolphin function
ContentHandler.unmangle is also unable to handle files that don't
already exist (unless the passed-in URI isn't mangled to begin with,
but to the best of my knowledge, there's no way to get a non-mangled URI
for a file that doesn't exist (unless you make assumptions about how the
document provider's URI scheme works, which we don't do in Dolphin)).
Summed up, it looks a lot like OpenAndroidContent can't create files,
or at the very least can't do so reliably.

Therefore I'm making DirectIOFile throw an assertion and return false
in situations where it's being asked to create a file under SAF. For
reference, there's no code in Dolphin that actually tries to create a
file under SAF. In all instances where we use SAF to write to files, the
file is created by the system file picker before it returns the URI of
the file to us.

What does this change gain us? First, if someone in the future tries to
use DirectIOFile to create a file under SAF, they'll be immediately
informed that this isn't supported rather than discovering it doesn't
work and chalking it up to SAF being bad for unpredictable reasons.
Second, we get rid of a call to File::Exists, which is a notable
performance improvement for game list scanning due to SAF and Dolphin's
"unmangling" being bad for reasons that unfortunately are entirely
predictable to those of us who have stared into the SAF void.

I've tested that game list scanning and game conversion still works.
2025-11-18 23:17:03 +01:00
Jordan Woyak
5a6fce31b2 DolphinQt/QtUtils: Simplify RunOnObject and eliminate Common::Event race. 2025-11-18 14:19:21 -06:00