Commit Graph

217 Commits

Author SHA1 Message Date
b52a08d533 DolphinQt: A Ubiquitous Signal For When Symbols Change
There were three distinct mechanisms for signaling symbol changes in DolphinQt: `Host::NotifyMapLoaded`, `MenuBar::NotifySymbolsUpdated`, and `CodeViewWidget::SymbolsChanged`. The behavior of these signals has been consolidated into the new `Host::PPCSymbolsUpdated` signal, which can be emitted from anywhere in DolphinQt to properly update symbols everywhere in DolphinQt.
2024-03-28 09:57:22 -07:00
c24fa93965 PPCSymbolDB: Move instance to PowerPCManager 2024-03-13 22:58:14 -07:00
e6ee217a7c Core: Move Emulation IOS instance to System. 2024-02-07 22:07:30 +01:00
9a3e770c23 Migrate SConfig::bWii to System. 2024-01-31 12:54:07 +01:00
fc2ec826d4 FifoPlayer: Move instance to System. 2024-01-05 20:15:18 +01:00
ce19d6a35e Core/Boot: Avoid global system accessor when setting disc. 2024-01-04 21:30:24 +01:00
0d75d658b1 Core/IOS/IOS: Remove system parameters from BootstrapPPC() and BootIOS()
An EmulationKernel instance already houses a reference to the currently active system instance.
2023-12-18 11:54:03 -05:00
e55f9ed102 AchievementManager: Make GetInstance() return a reference
The internal static member will always have a valid lifetime. Makes this
consistent with other instance based objects in our code.
2023-12-11 13:36:39 -05:00
Mai
2ece642cf8 Merge pull request #12357 from AdmiralCurtiss/ipl-bounds
Core/Boot: Check bounds in Load_BS2().
2023-12-06 19:57:26 -05:00
fff538e563 Core/Boot: Check bounds in Load_BS2(). 2023-12-05 22:34:35 +01:00
2bf6ebcb90 Added achievement hash to non-disc boot paths. 2023-12-05 16:17:18 -05:00
ca7e05bbc4 Jit: Replace "msrBits" with "featureFlags"
Preparation for the next commit.
2023-11-30 22:40:32 +01:00
6a339cbdb3 IOS/ES: Split ESDevice into ESCore and ESDevice.
ESCore implements the core functionality that can also be used outside of emulation. ESDevice implements the IOS device and is only available during emulation.
2023-05-15 20:41:05 +02:00
069280ddc6 HW/VideoInterface: Refactor to class. 2023-03-11 12:50:35 +01:00
ee35103ed9 HW/DVD: Rename DVDInterface namespace to DVD. 2023-03-10 18:37:18 +01:00
eb25c46a91 HW/DVDInterface: Refactor to class. 2023-03-10 18:12:59 +01:00
7044cff011 Core/Boot: Pass around System. 2023-03-08 22:41:43 +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
8d71f542cb Boot: Fix shadowing warning 2023-02-09 16:23:02 -08:00
37859ec1da Cleanup: Remove CDUtils
This is a cleaning followup for #11456.
2023-01-28 03:50:57 -08:00
7fd552081f HLE function hooking: Avoid ppcState global. 2023-01-27 15:22:46 +01:00
94455ee9e1 Boot: Avoid ppcState global. 2023-01-27 15:22:45 +01:00
ba1b624e1b PowerPC: Remove MSR macro. 2023-01-27 15:22:42 +01:00
be8d0b76ca PowerPC: Remove PC macro. 2023-01-27 15:22:41 +01:00
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
d51e4e5236 get rid of HAS_STD_FILESYSTEM
just use std::filesystem
2023-01-10 05:17:43 -08:00
c20bb01b47 Merge pull request #11372 from JosJuice/m3u-backslash
Boot: Fix handling of M3U file paths containing backslashes
2022-12-29 17:09:38 +01:00
a164c47caf Core/Boot: Pass System instance to BootUp() and related. 2022-12-29 05:49:26 +01:00
71f1b1db34 Boot: Fix handling of M3U file paths containing backslashes
Previously, if a user on Windows launched Dolphin from the command line
and specified a path to an M3U file and included backslashes in this path,
Dolphin would fail to resolve relative paths in the M3U file.
2022-12-24 11:13:27 +01:00
839db591d9 HW/Memmap: Refactor Memory to class, move to Core::System. 2022-12-03 13:27:02 +01:00
fb916a4c33 Boot: Load DOL/ELF after memory setup
I recently talked to a homebrew developer who was trying to add exception
handlers at link time but found out that Dolphin was overwriting their
exception handlers. I figure that's not the usual way to do exception
handlers, but... making us load the executable after setting up memory
rather than before is easy, and matches what we do when booting discs,
so I suppose there's no reason not to do it. It also matches the intent
of why Dolphin is writing default exception handlers – we're writing
them because some homebrew relies on exception handlers being left
around from whatever program was running before it (see 3dd777be70).
2022-11-05 13:55:17 +01:00
1732071a10 Netplay: Pass netplay settings via BootSessionData. 2022-09-11 04:18:26 +02:00
3a6df63e9b DiscIO: Add support for the NFS format
For a few years now, I've been thinking it would be nice to make Dolphin
support reading Wii games in the format they come in when you download
them from the Wii U eShop. The Wii U eShop has some good deals on Wii
games (Metroid Prime Trilogy especially is rather expensive if you try
to buy it physically!), and it's the only place right now where you can
buy Wii games digitally.

Of course, Nintendo being Nintendo, next year they're going to shut down
this only place where you can buy Wii games digitally. I kind of wish I
had implemented this feature earlier so that people would've had ample
time to buy the games they want, but... better late than never, right?

I used MIT-licensed code from the NOD library as a reference when
implementing this. None of the code has been directly copied, but
you may notice that the names of the struct members are very similar.
c1635245b8/lib/DiscIONFS.cpp
2022-08-04 22:00:58 +02:00
ec3cfc01c1 DiscIO/DirectoryBlob: Add callback to modify sys files before they're added to the disc. 2022-07-19 00:55:04 +02:00
cc315cb7af DiscIO/Riivolution: Add dolphin-specific extensions "dolphin_sys_file" and "dolphin_sys_folder" to patch sys files like you would patch regular files. 2022-07-19 00:55:04 +02:00
b2ddffeeb1 BS2Emu: Set HID0/1/2/4 and MSR with correct default values
These values were obtained by setting a breakpoint at a game's entry point, and then observing the register values with Dolphin's register widget.

There are other registers that aren't handled by this PR, including CR, XER, SRR0, SRR1, and "Int Mask" (as well as most of the GPRs). They could be added in a later PR if it turns out that their values matter, but probably most of them don't.

This fixes Datel titles booting with the IPL skipped (see https://bugs.dolphin-emu.org/issues/8223), though when booted this way they are currently missing textures. Due to somewhat janky code, Datel overwrites the syscall interrupt handler and then immediately triggers it (with the `sc` instruction) before they restore the correct one. This works on real hardware due to icache, and also works in Dolphin when the IPL runs due to icache, but prior to this change `HID0.ICE` defaulted to 0 so icache was not enabled when the IPL was skipped.
2022-06-25 14:27:29 -07:00
2081e2f2a1 Config: Move ToGameCubeRegion(), GetDirectoryForRegion(), and GetBootROMPath() to new config system namespace. 2022-06-05 21:24:45 +02:00
5e4d1f732d Remove the Maps folder from the Sys directory
It only had two out of date and game-specific maps from decades ago
2022-02-16 12:32:25 +11:00
36cfcb530f IOFile: Make origin parameter to Seek() an enum class. 2022-01-29 06:49:21 +01:00
6e5f4125e3 Use Common::ToLower and Common::ToUpper 2022-01-16 17:00:12 -08:00
2652aed85c Common: Merge CRC32.h into Hash.h
This makes it easier to find the relevant functions.
2022-01-01 10:36:38 -08:00
b928900f6e Core/WiiRoot: Handle the combination of NetPlay and savegame redirects. 2021-12-14 06:15:37 +01:00
894773f607 Core/Boot: Add Wii FS sync data (for temp NAND/netplay) to BootSessionData and handle it in the boot and shutdown logic. 2021-11-22 01:33:45 +01:00
83ad84061e Core/Boot: Refactor storage of boot-to-savestate data into a separate class. 2021-11-22 00:35:35 +01:00
3d662e746b Core: Fix a -Wshadow warning in gcc 11
This moves the only direct call to zlib’s crc32() into its own
translation unit, but that operation is cold enough that this won’t
matter in the slightest.  crc32_z() would be more appropriate, but
Android has an older zlib version…
2021-11-02 13:50:21 +01:00
ba3373b476 RiivolutionPatcher: Modify memory patching logic to be more accurate to actual Riivolution. 2021-10-24 00:09:09 +02:00
dd64c0e423 Core: Deduplicate Riivolution Patch to BootParameters apply logic. 2021-10-24 00:09:08 +02:00
6394960f54 Core: Add ability to specify and launch a riivolution-modded game via a .json file. 2021-10-24 00:09:07 +02:00
175f225ac1 DolphinQt: Add ability to start a game with Riivolution patches from the GUI. 2021-10-24 00:09:06 +02:00
e149ad4f0a treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00