Commit Graph

2052 Commits

Author SHA1 Message Date
Admiral H. Curtiss 4e6c89fbfd
Qt/CodeViewWidget: Don't read PC in Update() if we don't have a CPU thread guard. 2023-02-20 03:10:12 +01:00
Admiral H. Curtiss ef1520c2c6
Qt/CodeViewWidget: Don't try to pause emulator in Update() if we happen to be on a breakpoint. 2023-02-20 02:56:04 +01:00
Seeky 4e6e510003
Debugger: Add string comparison to conditional breakpoints. 2023-02-20 01:40:33 +01:00
Admiral H. Curtiss 8db35e6d04
Merge pull request #11578 from Pokechu22/memory-leaks-feb-2023
Fix various memory leaks
2023-02-18 13:56:34 +01:00
Pokechu22 c94aacc968 AudioPane: Fix inconsistent initial state of audio stretching labels
This resulted in the labels being solid black even when audio stretching is disabled the first time the settings are opened, but then properly being greyed out after changing a setting (even the audio backend or DSP emulation engine, not just whether audio stretching is enabled).
2023-02-17 18:51:41 -08:00
Pokechu22 b6d476241a CodeViewWidget: Fix memory leak
Per https://doc.qt.io/qt-6/qabstractitemview.html#setItemDelegateForColumn setItemDelegateForColumn does not take ownership of the parameter, so it was not being deleted. Specifying a parent to QObject (via QStyledItemDelegate's constructor) will allow it to automatically be deleted, per https://doc.qt.io/qt-6/objecttrees.html. The other instance of a QItemDelegate in IOWindow.cpp already used this.
2023-02-17 18:29:32 -08:00
Pokechu22 1c5e223532 MemoryViewWidget: Fix memory leaks
bp_item/row_item/item were never deleted, and the normal Qt ownership system wasn't applying to them because they were being cloned.
2023-02-17 18:17:01 -08:00
Yann Hodiesne 49e897422f
Use a success count instead of files count 2023-02-17 15:49:31 +01:00
Yann Hodiesne cb42a03299
Check the input and destination paths before converting a game file onto itself
Before these changes you could tell Dolphin to convert a game file into the same format it is already in, leading to the FileDialog using the input path as the default destination path
An unsuspecting user could then click Save and Dolphin would try to convert the input file by writing the destination file on top of it... leading to an I/O error and the input file being entirely removed
2023-02-17 14:26:50 +01:00
Pokechu22 8802f96b7e Fix uninitialized variable warnings (C26495) 2023-02-15 19:18:39 -08:00
JosJuice 5b6784432c Follow-up fixes for "Properly lock CPU before accessing emulated memory" 2023-02-14 18:44:16 +01:00
Scott Mansell a4729a026f
Merge pull request #11554 from JosJuice/host-lock-cpu
DolphinQt: Properly lock CPU before accessing emulated memory
2023-02-13 16:08:36 +13:00
Scott Mansell 2c24d07837
Merge pull request #11538 from t895/disc-speed-stuff
Rename "Speed up Disc Transfer Rate" to "Emulate Disc Speed"
2023-02-13 15:46:56 +13:00
Charles Lombardo 0ed64b080f Rename Fast Disc Speed to Emulate Disc Speed and invert option 2023-02-12 16:20:38 -05:00
JosJuice 6f0266e8de DolphinQt: Only update call stack if paused
This avoids a pseudo infinite loop where CodeWidget::UpdateCallstack
would lock the CPU in order to read the call stack, causing the CPU to
call Host_UpdateDisasmDialog because it's transitioning from running to
pausing, causing Host::UpdateDisasmDialog to be emitted, causing
CodeWidget::Update to be called, once again causing
CodeWidget::UpdateCallstack to be called, repeating the cycle.

Dolphin didn't go completely unresponsive during this, because
Host_UpdateDisasmDialog schedules the emitting of Host::UpdateDisasmDialog
to happen on another thread without blocking, but it was stopping certain
operations like exiting emulation from working.
2023-02-12 12:50:28 +01:00
JosJuice 7cecb28bdf DolphinQt: Properly lock CPU before accessing emulated memory
This fixes a problem I was having where using frame advance with the
debugger open would frequently cause panic alerts about invalid addresses
due to the CPU thread changing MSR.DR while the host thread was trying
to access memory.

To aid in tracking down all the places where we weren't properly locking
the CPU, I've created a new type (in Core.h) that you have to pass as a
reference or pointer to functions that require running as the CPU thread.
2023-02-12 11:27:50 +01:00
MayImilae 508c79a66f Rename VI Skip to VBI Skip
VI Skip was very hard to explain on the blog, so this small changes
clarifies what VI Skip is to resolve that issue.
2023-02-11 20:28:41 -08:00
Pokechu22 3bd655463d MemoryViewWidget: Fix warning: enumeration value ‘Null’ not handled in switch [-Wswitch] 2023-02-09 16:23:02 -08:00
Pokechu22 5c8d8383e2 CodeWidget: Fix shadowing warning 2023-02-09 16:23:02 -08:00
Pokechu22 b316ce6fdd Fix warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 2023-02-09 16:23:01 -08:00
Scott Mansell aaad0cd39f
Merge pull request #11539 from phire/improve_workqueuethread
Various WorkQueueThread improvements
2023-02-09 20:00:04 +13:00
Scott Mansell ccf92a3e56
Merge pull request #11522 from phire/KillRendererWithFire
Kill Renderer (with phire)
2023-02-09 19:59:16 +13:00
Scott Mansell 9c1fe59cc9 Insert a more solid abstraction between Qt and Imgui 2023-02-09 18:36:20 +13:00
Scott Mansell 4422af1272 Cleanup headers 2023-02-09 18:36:20 +13:00
Scott Mansell 7c4fcc30a3 WorkQueueThread: provide name and function at same time 2023-02-04 15:56:27 +13:00
Scott Mansell 6594532f10 WorkQueueThread: rework Cancel/Shutdown workflow
- Cancel doesn't shut down anymore.
   Allowing it to be used multiple times thoughout the life of
   the WorkQueue
 - Remove Clear, so we only have Cancel semantics
 - Add IsCancelling so work items can abort early if cancelling
 - Replace m_cancelled and m_thread.joinable() guars with m_shutdown.
 - Rename Flush to WaitForCompletion (As it's ambiguous if a function
   called flush should be blocking or not)
 - Add documentation
2023-02-04 14:58:12 +13:00
Scott Mansell acdb0c5be1 WorkQueueThread: Implement thread name
Otherwise we will end up with a dozen threads named "WorkQueueThread"
2023-02-04 14:58:12 +13:00
Joshua de Reeper 680db55239 Android: Add Skylanders Portal
Co-Authored-By: Charles Lombardo <clombardo169@gmail.com>
2023-02-02 21:16:14 +13:00
Admiral H. Curtiss 69b178e95f
Merge pull request #11157 from h3xx/use-gnuinstalldirs
Use GNUInstallDirs for installation paths
2023-02-01 19:35:46 +01:00
Pierre Bourdon 2a2ee5d543
Merge pull request #11434 from momocaoo/graphics-mod-folder-button
DolphinQt: Add button to open graphics mod folder on settings
2023-01-31 14:35:21 +01:00
Scott Mansell 1956ce151f Cmake/MSVC: Fix Qt6 discover for IDEs other than Visual Studio
CMakeSettings.json is a Visual Studio only extention to cmake that isn't
supported anywhere else. Not even Visual Studio Code.

So we set CMAKE_PREFIX_PATH inside DolphinQt's CMakeLists.txt instead.
2023-01-31 23:19:46 +13:00
Scott Mansell abfc75f362 Cleanup headers 2023-01-31 19:41:24 +13:00
Scott Mansell 89d9ec0a84 Fix warning 2023-01-31 19:41:24 +13:00
Scott Mansell 8a23629345 Split AbstractGfx out of Renderer
Almost all the virtual functions in Renderer are part of dolphin's
"graphics api abstraction layer", which has slowly formed over the
last decade or two.

Most of the work was done previously with the introduction of the
various "AbstractX" classes, associated with texture cache cleanups
and implementation of newer graphics APIs (Direct3D 12, Vulkan, Metal).
We are simply taking the last step and yeeting these functions out
of Renderer.

This "AbstractGfx" class is now completely agnostic of any details
from the flipper/hollywood GPU we are emulating, though somewhat
specialized.

(Will not build, this commit only contains changes outside VideoBackends)
2023-01-31 18:46:02 +13:00
Scott Mansell 0d4537d60f Move Presenting, Dumping and ImGui out of Renderer 2023-01-31 18:45:21 +13:00
Dan Church 81388eedaa
Use GNUInstallDirs for installation paths 2023-01-30 09:44:44 -06:00
Mandar1jn c8a91abadc Improve the data in the first data block of the skylanders figures
* Added NUID
* Added BCC
* Added ATQA
* Added SAK
2023-01-30 16:29:20 +01:00
MayImilae 37859ec1da Cleanup: Remove CDUtils
This is a cleaning followup for #11456.
2023-01-28 03:50:57 -08:00
Admiral H. Curtiss 7fd552081f
HLE function hooking: Avoid ppcState global. 2023-01-27 15:22:46 +01:00
Admiral H. Curtiss 8adabb86cf
Debugger: Avoid ppcState global. 2023-01-27 15:22:45 +01:00
Admiral H. Curtiss 61ba516570
PowerPC: Move a few functions to PowerPCState. 2023-01-27 15:22:44 +01:00
Admiral H. Curtiss c13ca271d8
PowerPC: Parametrize CTR macro. 2023-01-27 15:22:43 +01:00
Admiral H. Curtiss 0f301829d2
PowerPC: Remove rPS macro. 2023-01-27 15:22:42 +01:00
Admiral H. Curtiss 8fccefa3aa
PowerPC: Remove GPR macro. 2023-01-27 15:22:42 +01:00
Admiral H. Curtiss be8d0b76ca
PowerPC: Remove PC macro. 2023-01-27 15:22:41 +01:00
Pierre Bourdon 9c9310bf44
Merge pull request #11208 from TellowKrinkle/CPUCull
Cull vertices on the CPU
2023-01-26 23:15:23 +01:00
TellowKrinkle 7413be1487 VideoCommon: Add configuration option for CPUCull 2023-01-25 02:21:56 -06:00
Lioncash e5b91f00b0 Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions
added in C++20.
2023-01-24 14:58:20 -05:00
Admiral H. Curtiss d4d6f3db63
Merge pull request #11331 from deReeperJosh/skylandersportal
Emulate Skylanders Portals within Dolphin
2023-01-24 06:56:00 +01:00
Admiral H. Curtiss 7002831c55
Merge pull request #11465 from OatmealDome/qt6-xinput-bug
DolphinQt: Add workaround for Qt 6.3+ bug on Linux
2023-01-24 06:21:19 +01:00
Joshua de Reeper c76d2c16eb Valid block/num checks, rename variables, remove translatable strings
Capitalize Skylander in tr strings

Lint and validation method fixes

Proper Attach and Change Interface method

Re-jig code to exit early and read easier
2023-01-24 18:12:24 +13:00
JosJuice d0da689eeb DolphinQt: Add i18n comments for strings containing the word "watches"
These new strings could use the same clarification as we have for
the existing string "&Delete Watch".
2023-01-23 20:49:22 +01:00
Joshua de Reeper 18fd0d7dcd Use Core timing instead of thread
Skylander code tidy ups

Convert c array to std::array and fix comments

Formatting fixes/review changes

Variable comment

Migrate portal to System Impl and code tidy ups

Use struct

Restore review changes

Minor fix to schedule transfer method

Change descriptors to hex and fix comments
2023-01-22 14:50:30 +13:00
Joshua de Reeper f76a6789a0 Emulate Skylanders within Dolphin
Ported the code from RPCS3, with improvements made to the handling of control messages and audio transfers, Co-Authored with @mandar1jn

Missing new line chars

Co-Authored-By: mandar1jn <49076509+mandar1jn@users.noreply.github.com>
2023-01-22 14:50:30 +13:00
Pierre Bourdon 9fe1d80920
Merge pull request #11457 from delroth/remove-stable-track
DolphinQt/Settings: remove 'stable' track from auto-updater options
2023-01-21 06:48:04 +01:00
OatmealDome d40dbe4670 DolphinQt: Add workaround for Qt 6.3+ bug on Linux
See https://bugs.dolphin-emu.org/issues/12913 for more information.
2023-01-20 03:06:04 -05:00
Pierre Bourdon 8d5edb13a9
Merge pull request #11367 from Sam-Belliveau/lagbegone
VideoCommon: VI Skip
2023-01-19 01:20:01 +01:00
Pierre Bourdon 686ac363ba
Merge pull request #11456 from MayImilae/remove-boot-from-dvd
Remove Boot from DVD Backup
2023-01-17 23:27:59 +01:00
Pierre Bourdon 3342947446
DolphinQt/Settings: remove 'stable' track from auto-updater options
We've decided this track will never be used in the future. Releases will
continue using the "beta" branch internally, though we'll have the
user-visible strings use a different name instead.

(Note: Dolphin provided builds have always defaulted to 'beta' as the
auto-update track, so anyone who set 'stable' did so manually.)
2023-01-17 08:34:55 +01:00
MayImilae dcc10cff11 Remove Boot from DVD Backup
This should be a fairly easy merge, assuming I didn’t mess anything up. TL:DR no one uses it and it’s not great.

Boot from DVD Backup is an ancient feature with origins in the Megacommit. Back then, GameCube and Wii games were quite large relative to drives of the time. For example, in 2008, the most common hard drive sizes were 320GB and 512GB. On the 320GB drive I personally had at the time, as little as 42 Wii ISOs could have filled it entirely! And that’s ignoring any other files one might want to put onto a drive. Backup DVDs allowed users to burn relatively cheap DVD media and store their GameCube and Wii dumps in a Dolphin accessible way that didn’t eat into their precious HDD space. It had compromises, even then, but in 2008… I mean honestly users probably wouldn’t even notice those compromises with how Dolphin barely even worked at all back then.

Obviously, today the storage space concerns are not as big of an issue. According to seagate the average hard drive it sells today is 8TB. For typical laptops purchased now, the -minimum- selection for storage is usually 1TB. You can even buy a name brand 4TB external hard drive for $100. GC and Wii ISOs are not as big as they once were, relatively anyway. Plus flash drives and SD cards are super cheap and way faster than disc drives ever were. For anyone that has limited drive space, removable flash media can fulfill this offloading role far better than backup DVD media ever could.

Also no one has DVD drives anymore. That’s kind of an important detail.

But to see if Booting from DVD Backup even still worked, I decided to give it a try. I have an ASUS BW-16D1HT, a badass Bluray XL reading and burning drive, connected to my Windows 11 Threadripper 5975WX machine. A super fast drive on a super fast machine is as good as it possibly can get for this feature. So I bought a spindle of DVD-Rs, burned a couple of discs and gave it a try. Surprisingly, it does still work. However, as expected, it introduces a lot of stuttering. Testing Prime 1 and Prime 3, in both games stuttering was introduced whenever the DVD Drive had to suddenly seek. Spikes of 50ms occurred constantly, but I observed 150ms and even over 1000ms stutters! The worst was a three second stutter, when loading Elysia in Prime 3. I could even hear the stutters - any time the drive suddenly made a harsh seeking noise, the game would have a hard stutter. It worked but, it has some serious compromises.

Boot from DVD Backup isn’t great, using removable flash media or external hard drives is a FAR better option for anyone with limited storage space today, and no one can even use this feature anymore because their computers don’t even have disc drives. It’s time for Boot from DVD Backup to go!

So I did my best on the cleanup but I’m bound to have left some bits. Especially in translation - I didn’t get any warnings or anything there that could help point me to where to clean that up. Please review!
2023-01-16 18:32:43 -08:00
JosJuice 8f88297122 Revert "MenuBar: Tweak string for open user folder option"
This reverts commit 6788bda6c9.

The user folder can be either global or local. If it is local,
we shouldn't call it global.

See also da0be24b2f.
2023-01-16 18:31:16 +01:00
OatmealDome 6788bda6c9 MenuBar: Tweak string for open user folder option 2023-01-16 04:31:12 -05:00
OatmealDome 869aa9eb55 MenuBar: Add action which opens the user folder 2023-01-16 04:08:19 -05:00
Sam Belliveau 23ad07b368 Add VISkip 2023-01-14 01:56:37 -05:00
Momo Cao 05ed25d482 DolphinQt: Add button to open graphics mod folder on settings 2023-01-12 21:47:18 -05:00
Pokechu22 7abee1a97b DolphinQt: Fix typo in GBA TAS input window
This generated a warning on GCC about the operation being potentially undefined (-Wsequence-point). I'm not sure if that was actually the case, but either way it is a mistake.
2023-01-12 14:33:58 -08:00
OatmealDome 5c80a9fd87 CMakeLists: Copy LICENSE files when building for Steam Runtime 2023-01-10 23:21:24 -05:00
OatmealDome fff13c385f CMakeLists: Copy entire plugins folder on Steam Runtime build 2023-01-10 23:21:24 -05:00
UltraHDR 18454906cf
Set LSApplicationCategoryType to games
https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype
This makes it show up in the Launchpad Games folder
2023-01-10 11:34:42 +00:00
Admiral H. Curtiss 653e0ccf28
Merge pull request #11365 from iwubcode/cheat_manager_freeze_value
DolphinQt: add ability to lock / freeze values in the watches window
2023-01-09 18:41:28 +01:00
Admiral H. Curtiss eeeab3c3be
Merge pull request #11183 from TheLordScruffy/write-back-cache
Implement PowerPC data cache
2023-01-09 17:09:32 +01:00
Admiral H. Curtiss 74e1577a2c
HW/ProcessorInterface: Refactor to class, move to Core::System. 2023-01-04 03:00:10 +01:00
Pokechu22 4e05c569d4 AdvancedWidget: Fix typo in performance sample window tooltip 2022-12-26 14:28:48 -08:00
Pokechu22 b675e49c0e AdvancedWidget: Add title for performance sample window tooltip 2022-12-26 14:20:06 -08:00
JosJuice 494b041b34 DolphinQt: Add settings to GBA TAS input window
We should expose Enable Controller Input and the turbo settings for
GBA just like we do for GameCube controllers and Wii Remotes.
I just forgot about it when implementing the GBA TAS input window.
2022-12-24 11:30:25 +01:00
JosJuice 3611045a6c DolphinQt: Add more i18n comments 2022-12-24 08:32:49 +01:00
Sam Belliveau 673f81c18a New FrameTime/VBlank Analyzer + Graph 2022-12-23 19:52:53 -05:00
iwubcode 190cf5af30 DolphinQt: add multiselection to WatchWidget 2022-12-23 12:31:33 -06:00
iwubcode c8a6ff6309 DolphinQt: add a 'add to watch' context menu item that allows you to add a memory location found in a cheat search to be added to the watch list 2022-12-23 12:31:33 -06:00
iwubcode 7d7fcdddd3 DolphinQt: add lock state to WatchWidget 2022-12-23 12:31:33 -06:00
iwubcode 41c9d706cb DolphinQt: cleanup WatchWidget 2022-12-23 11:59:23 -06:00
Sam Belliveau 5ca438dd97 Add Dear ImPlot Library 2022-12-22 14:32:42 -05:00
Sketch b56411b84b
Fix MemoryViewWidget background colour 2022-12-17 10:37:37 +01:00
Admiral H. Curtiss ceae4242fc
VideoCommon/Fifo: Pass Core::System to methods. 2022-12-10 17:16:26 +01:00
Admiral H. Curtiss 5624dd6d39
VideoCommon/Fifo: Refactor to class, move to Core::System. 2022-12-10 17:16:19 +01:00
Admiral H. Curtiss 1d199f4664
Qt/EnhancementsWidget: Combine texture filtering and anisotropic filtering. 2022-12-09 02:02:17 +01:00
Admiral H. Curtiss ff2cc4d02b
Qt/EnhancementsWidget: Convert texture filtering option to a ComboBox. 2022-12-09 02:02:16 +01:00
Admiral H. Curtiss 8a3b8a925e
Core: Add option to force linear texture filtering. 2022-12-09 02:02:16 +01:00
TheLordScruffy e97d380437 Implement PPC write-back data cache 2022-12-08 18:18:32 -05:00
Admiral H. Curtiss b207611c33
Merge pull request #11274 from TryTwo/PR_Conditional_BP_Add_Memory
Debugger: Add conditional breakpoints to memory BPs
2022-12-07 19:55:04 +01:00
Mai 94faad0d37
Merge pull request #11320 from AdmiralCurtiss/globals-memory
HW/Memmap: Refactor Memory to class, move to Core::System.
2022-12-07 00:52:31 +00:00
Mai a9a603b8cb
Merge pull request #11268 from jordan-woyak/ascii-controller
Rename "Keyboard" to "Keyboard Controller"
2022-12-04 21:05:52 +00:00
TryTwo a17fbe7c65 Expand conditional breakpoints to memory breakpoints 2022-12-04 11:25:33 -07:00
Admiral H. Curtiss 2b93d5e0d7
Merge pull request #11273 from TryTwo/PR_Conditional_BP_Callstack
Debugger: add callstack to conditional breakpoints
2022-12-04 14:16:12 +01:00
Admiral H. Curtiss 2bd47d1435
Merge pull request #11232 from TryTwo/PR_MemoryView_highlighting
Debugger MemoryViewWidget: always highlight target address
2022-12-04 14:07:19 +01:00
TryTwo 76bf1b5f7d Add callstack to conditional breakpoints. Checks entire stack for value.
Use: callstack(0x80000000).
  !callstack(value) works as a 'does not contain'.
Add strings to expr.h conditionals.
  Use quotations: callstack("anim") to check symbols/name.
2022-12-03 20:52:17 -07:00
Admiral H. Curtiss 839db591d9
HW/Memmap: Refactor Memory to class, move to Core::System. 2022-12-03 13:27:02 +01:00
Pokechu22 3d6bfcd236 JITWidget: Convert to fmt 2022-12-01 17:44:41 -08:00
Pokechu22 6a6d24550e Clean up DisassembleBlock and JitInterface::GetHostCode 2022-12-01 17:43:35 -08:00
Pokechu22 5842b90bee Show JIT blocks widget when selecting 'PPC vs Host' in code widget
Before, I just assumed this feature was broken since I didn't know what widget it used. Now, it behaves like show memory and show code elsewhere.
2022-12-01 17:43:35 -08:00