Commit Graph

254 Commits

Author SHA1 Message Date
1732071a10 Netplay: Pass netplay settings via BootSessionData. 2022-09-11 04:18:26 +02:00
1845a13cbe Merge pull request #10905 from shuffle2/netplay-hash
netplay: use sha1 instead of md5
2022-08-22 15:57:49 +02:00
477c20e28d Updated comment explaining enet_peer_timeout's use in NetPlayClient.cpp and NetPlayServer.cpp; Corrected syntax related to PEER_TIMEOUT in NetplayClient.cpp 2022-08-09 16:26:52 -06:00
403f3693da NetPlay: use sha1 instead of md5 2022-08-02 22:25:05 -07:00
c7ce035a7f NetPlay: rename md5 -> game digest 2022-08-02 22:25:05 -07:00
09089eeee0 Common::Timer: use chrono::steady_clock internally 2022-08-02 22:24:06 -07:00
96751c4457 Treewide: Rename references to SD Card image path to clarify they mean the image file, not the folder. 2022-07-11 23:11:40 +02:00
ea9b0bff08 NetPlay: Delete NetPlayClient::GetPlayerList
It's been unused since DolphinWX was removed in 44b22c90df.  Prior to that, it was used in Source/Core/DolphinWX/NetPlay/NetWindow.cpp.  But the new equivalent in Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp uses NetPlayClient::GetPlayers instead.  Stringifying (or creating a table, as is done now) should be done by the UI in any case.
2022-05-24 14:44:28 -07:00
302dedbd24 NetPlay: Introduce constant for peer timeout 2022-03-15 01:26:55 -04:00
b1122ec94f NetPlay: Add timeout to traversal code path
Amendment to 600c816 as I missed the traversal case.
2022-03-14 00:19:54 -04:00
0c78167404 Merge pull request #10443 from JosJuice/port-wiimote-source
Port Wiimote source settings to the new config system
2022-02-18 21:38:02 +01:00
aff45c91fc Port Wiimote source settings to the new config system
This lets us finally get rid of BootManager's ConfigCache!
2022-02-18 21:27:10 +01:00
a6d516dc94 Fix shadowing variables in labmdas
GCC generates warnings about these, although the variable being shadowed is not captured by the lambda.
2022-02-13 14:38:59 -08:00
407aefb6b9 Netplay: Get memory card size override setting from config system instead of manually parsing INI. 2022-01-26 00:57:44 +01:00
7b8e846d0a Merge pull request #10367 from Pokechu22/fmt-8.1.1
Update to fmt 8.1.1
2022-01-20 21:14:41 +01:00
3f0b23ed2b Create Slot enum class for EXI slots 2022-01-14 20:24:53 -08:00
83c5446d85 Fix static initialisation order fiasco issue for Version variables
Fixes a crash that could occur if the static constructor function for
the MainSettings.cpp TU happened to run before the variables in
Common/Version.cpp are initialised. (This is known as the static
initialisation order fiasco.)

By using wrapper functions, those variables are now guaranteed to be
constructed on first use.
2022-01-14 00:04:22 +01:00
1a92699455 Cast to int for enums that are not formattable 2022-01-13 11:11:08 -08:00
5c325eef38 Config: Port SI device settings to new config system. 2022-01-08 20:08:21 +01:00
fb47035f97 Config: Port emulation speed setting to new config system. 2022-01-06 16:13:54 +01:00
600c8169d5 Core/NetPlay: Extend enet peer timeout
This extends the timeout to 30 seconds, so users who have brief
connection issues won't be so swiftly disconnected, allowing the
NetPlay session to continue.
2022-01-06 02:13:19 -05:00
3d5b46615c NetPlayClient: Use fmt::join for MD5Sum 2022-01-01 11:52:53 -08:00
301bc49efe Common: Remove MD5.h
It uses DiscIO, and Common shouldn't depend on DiscIO.  Instead, put this code in NetPlayClient.cpp.
2022-01-01 11:52:53 -08:00
b928900f6e Core/WiiRoot: Handle the combination of NetPlay and savegame redirects. 2021-12-14 06:15:37 +01:00
6350c93ae1 NetPlay: Pass Wii FS sync data directly to game boot logic instead of indirectly through globals. 2021-11-22 01:33:46 +01:00
7b776f3769 NetPlay: Refactor game boot code path to allow passing BootSessionData through it. 2021-11-22 00:52:15 +01:00
9f525d69c8 Jit: Raise program exception on floating point exceptions
This is done entirely through interpreter fallbacks. It would
probably be possible to implement this using host exception
handlers instead, but I think it would be a lot of complexity
for a rarely used feature, so let's not do it for now.

For performance reasons, there are two settings for this feature:
One setting which does enables just what True Crime: New York City
needs and one setting which enables it all. The latter makes
almost all float instructions fall back to the interpreter.
2021-10-13 17:42:56 +02:00
3840b55292 NetPlayClient/NetPlayServer: Remove now-unnecessary static_casts
Now that we have the enum helpers in place, quite a few casts on their
own can be removed.
2021-09-22 15:59:43 -04:00
a034f378a0 NetPlayProto: Turn connection error enum into an enum class
Continues the migration off the MessageId type alias
2021-09-22 15:42:04 -04:00
dedd0b7ba1 NetPlayProto: Turn Sync-related enums into enum classes 2021-09-22 15:42:04 -04:00
af4aaf4609 NetPlayProto: Turn MessageID enum into an enum class
Now we can leverage our helper to insert enum values without the need to
cast.
2021-09-22 15:42:04 -04:00
2b9c65967e NetPlayClient: Change return value of OnData() to void
In all usage cases, the return value isn't utilized.
2021-09-15 11:31:32 -04:00
ae714b25ba NetPlayClient: Split out OnData()
Over time OnData() has become a huge function-long case statement that
attempts to manage numerous packet-related behaviors, which makes it a
little difficult to reliably ensure certain handling doesn't interfere
with another case's. It's also mildly annoying to navigate due to its
size.

To make it a little easier to read and find the specific behavior, we
can break the relevant pieces of code out into their own functions.
2021-09-15 11:31:28 -04:00
a3c8fb06c5 NetPlayClient: Remove a designated initializer
release-ubu-x64 currently fails with "sorry, unimplemented: non-trivial
designated initializers not supported". pr-ubu-x64 doesn't for some
reason, but we might as well remove the designated initializer.
2021-07-21 09:36:52 +02:00
b8f0e97c02 Movie: GBA Support 2021-07-13 16:44:04 +02:00
45f2461a53 NetPlay: GBA Support 2021-07-13 16:43:59 +02:00
3d5cf5286b NetPlay: Refactor some functions into a common header 2021-07-06 06:41:23 -04: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
d536a50878 Merge pull request #9756 from Techjar/memcard-size-config
Replace MemoryCard251 setting with generic MemoryCardSize
2021-06-13 16:09:54 +02:00
ac28b89fa5 NetPlay/Jit64: Avoid using software FMA
When I added the software FMA path in 2c38d64 and made us use
it when determinism is enabled, I was assuming that either the
performance impact of software FMA wouldn't be too large or CPUs
that were too old to have FMA instructions were too slow to run
Dolphin well anyway. This was wrong. To give an example, the
netplay performance went from 60 FPS to 30 FPS in one case.

This change makes netplay clients negotiate whether FMA should
be used. If all clients use an x64 CPU that supports FMA, or
AArch64, then FMA is enabled, and otherwise FMA is disabled.
In other words, we sacrifice accuracy if needed to avoid massive
slowdown, but not otherwise. When not using netplay, whether to
enable FMA is simply based on whether the host CPU supports it.

The only remaining case where the software FMA path gets used
under normal circumstances is when an input recording is created
on a CPU with FMA support and then played back on a CPU without.
This is not an especially common scenario (though it can happen),
and TASers are generally less picky about performance and more
picky about accuracy than other users anyway.

With this change, FMA desyncs are avoided between AArch64 and
modern x64 CPUs (unlike before 2c38d64), but we do get FMA
desyncs between AArch64 and old x64 CPUs (like before 2c38d64).
This desync can be avoided by adding a non-FMA path to JitArm64 as
an option, which I will wait with for another pull request so that
we can get the performance regression fixed as quickly as possible.

https://bugs.dolphin-emu.org/issues/12542
2021-06-09 22:56:26 +02:00
1377f31cf8 NetPlay: Check file names when receiving GCI folder 2021-05-29 17:52:49 -04:00
33a6701e56 Replace MemoryCard251 setting with generic MemoryCardSize
This allows for a broader range of game-specific memory card sizes to
be configured.
2021-05-27 03:50:57 -04:00
ba7ad73e92 NetPlay: Check that memory card region is valid 2021-05-27 00:00:06 +02:00
a47fcdcbec NetPlay: Add some missing synced settings 2021-05-20 15:13:41 -04:00
dad309d365 Disable ICache emulation for some games
Specifically, 'Scooby-Doo! Mystery Mayhem', 'Scooby-Doo! Unmasked', 'Ed, Edd n Eddy: The Mis-Edventures', and the Wii version of 'Happy Feet'.

The JIT cache causes problems with emulated icache invalidation in these games, resulting in areas failing to load.
2021-04-06 12:44:10 -07:00
004dfd1586 Replace uses of cassert with Common/Assert.h 2021-04-02 10:18:18 -07:00
a9862b5395 NetPlay: Sync more settings 2021-03-07 14:22:53 +01:00
84128d9532 rename Common/File to Common/IOFile 2021-01-27 14:29:48 -08:00
2f0fb2056e TraversalProto: Convert TraversalConnectFailedReason into an enum class 2021-01-20 12:24:05 -05:00
2021175809 TraversalClient: Convert state enum into an enum class
Prevents implicit conversions and prevents identifiers from polluting
the class scope.
2021-01-20 12:24:03 -05:00