Commit Graph

365 Commits

Author SHA1 Message Date
4131dffae9 Jit: Allow BLR optimization without fastmem
While both fastmem and the BLR optimization depend on fault handling,
the BLR optimization doesn't depend on fastmem, and there are cases
where you might want the BLR optimization but not fastmem. For me
personally, it's useful when I try to use a debugger on Android and have
to disable fastmem so I don't get SIGSEGVs all the time, but it would be
especially useful for iOS users.
2023-08-29 22:55:29 +02:00
2502e412b3 Merge pull request #12117 from JosJuice/config-callback-cpu
Don't call RunAsCPUThread in config callbacks
2023-08-26 16:34:46 +02:00
b6bfa10ace Merge pull request #11996 from Dentomologist/remove_pointless_pauseandlock_functions
EXI: Remove pointless PauseAndLock functions
2023-08-18 21:35:56 +02:00
71ce8bb6f0 Don't call RunAsCPUThread in config callbacks
In theory, our config system supports calling Set from any thread. But
because we have config callbacks that call RunAsCPUThread, it's a lot
more restricted in practice. Calling Set from any thread other than the
host thread or the CPU thread is formally thread unsafe, and calling Set
on the host thread while the CPU thread is showing a panic alert causes
a deadlock. This is especially a problem because 04072f0 made the
"Ignore for this session" button in panic alerts call Set.

Because so many of our config callbacks want their code to run on the
CPU thread, I thought it would make sense to have a centralized way to
move execution to the CPU thread for config callbacks. To solve the
deadlock problem, this new way is non-blocking. This means that threads
other than the CPU thread might continue executing before the CPU thread
is informed of the new config, but I don't think there's any problem
with that.

Intends to fix https://bugs.dolphin-emu.org/issues/13108.
2023-08-17 19:19:25 +02:00
ec5d2a4f41 [Core] Prevent SD data loss from silent resync failure 2023-07-26 13:58:01 -06:00
ee684b0798 DSPEmulator: Remove unused PauseAndLock parameter 2023-06-25 20:29:23 -07:00
f151ae3c2a EXI: Remove pointless PauseAndLock functions
The ExpansionInterfaceManager::PauseAndLock function does nothing but
call other functions that have no effect.

ExpansionInterfaceManager::PauseAndLock calls CEXIChannel::PauseAndLock,
which in turn calls IEXIDevice::PauseAndLock. None of the classes
deriving from IEXIDevice override PauseAndLock, and the implementation
in IEXIDevice does nothing.
2023-06-25 20:08:08 -07:00
b5ba51c60a Core: Remove host thread assert in PauseAndLock().
Fixing all the places it's used turned out to be a more complicated task than anticipated. So let's remove this for now so we don't confuse users with cryptic error messages...
2023-06-23 01:18:56 +02:00
f11175d117 Revert "Android: Temporarily disable host thread check"
This reverts commit 361171fce0.
2023-06-12 23:39:42 +02:00
c63f0f37cd VideoCommon: Pass WindowSystemInfo to InitBackendInfo 2023-06-08 22:07:39 -07:00
7845fb00ee Merge pull request #11681 from iwubcode/asset_management
VideoCommon: migrate texture packs to use the asset loader system
2023-06-08 22:21:12 +02:00
afc97ec20f Merge pull request #11895 from JosJuice/android-no-host-check
Android: Temporarily disable host thread check
2023-06-06 18:56:41 +02:00
361171fce0 Android: Temporarily disable host thread check
Very broken. Will investigate, but let's revert it for the time being.
2023-06-06 18:39:32 +02:00
6bd5473d56 Core: Declare emu thread as CPU thread while shutting down
Fixes https://bugs.dolphin-emu.org/issues/13274.
2023-06-06 18:04:21 +02:00
2d56daf1bb Merge pull request #11873 from AdmiralCurtiss/pause-and-lock-host
Core: Assert that only the Host thread may call PauseAndLock().
2023-06-06 13:50:20 +02:00
f1f1ecc9d1 Core / VideoCommon: update HiresTexture to use CustomAssetLoader 2023-06-05 16:33:19 -05:00
e2d0ff718c Fixed Missing DoFrame Call
Somewhere in the process of getting the memory peeking right for achievements, the AchievementManager call to DoFrame went missing. This restores it properly.
2023-06-03 09:15:41 -04:00
b3c9f49cbe Core: Assert that only the Host thread may call PauseAndLock(). 2023-06-02 18:51:43 +02:00
21df3ca572 StringUtil: Move IsPrintableCharacter() into Common namespace 2023-05-16 14:17:54 -04:00
8b57c4b239 Added LoadGameByFilenameAsync and CloseGame to AchievementManager
LoadGameByFilenameAsync sets up a volume reader and hashes the volume, then uses that hash to make the three consecutive API requests to resolve hash, start session and load game data.

CloseGame resets the m_is_game_loaded flag, wipes the queue, and destroys all the game data responses.
2023-04-12 03:08:47 -04:00
23843583bf PowerPC: Refactor to class, move to System. 2023-04-09 21:48:37 +02:00
9217a9eba4 JitInterface: Refactor to class, move to System. 2023-03-26 14:38:07 +02:00
0888c93d48 Common: Move FPU-related helpers into Common namespace
Makes these utilities' namespace consistent with the majority of the
Common library.
2023-03-21 10:58:13 -04:00
026b6a3e0f HW: Pass System to functions. 2023-03-13 18:13:20 +01:00
bf95d4012f HW/EXI: Refactor ExpansionInterface to class. 2023-03-11 00:56:37 +01:00
929222ffbd HW/DSP: Refactor to class. 2023-03-09 22:35:29 +01:00
912cd456fb Core: Add System parameter to CPUThreadGuard. 2023-03-08 22:41:42 +01:00
3b364c5c16 HW/CPU: Refactor to class, move to System. 2023-03-08 12:23:37 +01:00
70cfb46f8e Fix duplicated FPS
This is a small regression from KillRenderer, which caused duplicated
frames to be counted on the FPS counter when the "Skip Presenting
Duplicated Frames" option was disabled.
2023-03-05 23:31:12 +13:00
435d8c39ee Common/FatFsUtil: Add callback for cancelling SD card conversion. 2023-02-28 20:31:51 +01:00
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
60f2b5af7b Apply suggestions from code review
Co-authored-by: Mai <mathew1800@gmail.com>
Co-authored-by: BhaaL <bhaalsen@gmail.com>
Co-authored-by: iwubcode <iwubcode@users.noreply.github.com>
2023-02-09 18:36:20 +13:00
31cfe8250d Lint fixes 2023-02-09 18:36:20 +13:00
abfc75f362 Cleanup headers 2023-01-31 19:41:24 +13:00
0da69055d9 Split out everying remaining from Swap 2023-01-31 19:41:24 +13:00
b007b8e104 Replace BeginUI/EndUI 2023-01-31 19:41:24 +13:00
0d4537d60f Move Presenting, Dumping and ImGui out of Renderer 2023-01-31 18:45:21 +13:00
df6f070a55 Core: Remove FPS, VPS and speed percentage from window title 2023-01-23 21:32:50 +01:00
9df1f0276d Don't Write OSD Messages to the titlebar
Turns out all OSD messages, every single one, are written to the titlebar. We've just never seen them because the FPS is in the title bar and it replaces it in a fraction of a second. This was only visible when saving savestates because it halts emulation for a moment while writing.

This is dumb, let's not do that anymore.
2023-01-22 00:19:51 -08:00
bc1cc9eeb4 CoreTiming: Throttle Before Every Event Using Chrono 2023-01-06 17:21:17 -05:00
a164c47caf Core/Boot: Pass System instance to BootUp() and related. 2022-12-29 05:49:26 +01:00
673f81c18a New FrameTime/VBlank Analyzer + Graph 2022-12-23 19:52:53 -05:00
ceae4242fc VideoCommon/Fifo: Pass Core::System to methods. 2022-12-10 17:16:26 +01:00
5624dd6d39 VideoCommon/Fifo: Refactor to class, move to Core::System. 2022-12-10 17:16:19 +01:00
c9558ecb4c CoreTiming: Refactor to class. 2022-11-27 03:47:12 +01:00
1c63349984 AudioCommon: Pass Core::System to AudioCommon functions. 2022-11-06 02:13:58 +01:00
aade584180 Netplay: Completely rewrite Wiimote syncing logic to be similar to the GameCube controller one. 2022-10-02 23:22:02 +02:00
0a517ebdbd Core: Pass Netplay SRAM through boot process.
This removes the Netplay classes touching emulated hardware structures before emulation even starts.
2022-09-19 21:47:12 +02:00
c310e504cb AudioCommon: Move sound stream variables to Core::System. 2022-08-31 21:44:21 +02:00
09089eeee0 Common::Timer: use chrono::steady_clock internally 2022-08-02 22:24:06 -07:00