Commit Graph

128 Commits

Author SHA1 Message Date
Twinaphex
bb499b70be Merge pull request #4104 from GregorR/natt
NAT traversal
2016-11-30 16:09:53 +01:00
Gregor Richards
b3ababce9a Fix Netplay IPv6 support 2016-11-30 00:25:16 -05:00
Gregor Richards
c342c103ae Always get numeric host/ports instead of names. 2016-11-29 23:08:26 -05:00
Gregor Richards
42da0a0184 NAT traversal in Netplay
For the time being, if NAT traversal is successful it simply announces
it as an OSD message. In the future it will be used to inform a
matchmaking server of the public port.

This patch also included minor fixes to the NAT traversal implementation
to make the select it demands actually doable.
2016-11-29 22:59:46 -05:00
twinaphex
d26a213971 CXX_BUILD fixes 2016-11-27 13:30:35 +01:00
Gregor Richards
225cbb387b Updating netplay to use trans_stream for compression 2016-11-26 16:06:52 -05:00
Gregor Richards
da0b958aeb Check HAVE_ZLIB and only do zlib compression if it's supported by both
sides.
2016-11-25 11:03:12 -05:00
Gregor Richards
db437047f8 Don't use z_const, which is apparently not always defined. 2016-11-25 10:40:25 -05:00
Gregor Richards
679ea058a4 Properly clean up zlib. 2016-11-25 10:40:24 -05:00
Gregor Richards
3ff22c9ed6 Fixes for C++ support. 2016-11-25 10:40:24 -05:00
Gregor Richards
9f03020af8 Change the netplay protocol version since compression isn't backwards
compatible.
2016-11-25 10:40:24 -05:00
Gregor Richards
53c6223dc6 Use zlib compression for savestates sent over netplay. 2016-11-25 10:40:24 -05:00
Diego Viola
cf0c60bb98 Fix Netplay fullscreen issue
Fixes #3936
2016-11-07 16:01:18 -02:00
twinaphex
0d3752e90f More translatable strings 2016-10-22 05:23:59 +02:00
twinaphex
3334060b03 Add another translatable string 2016-10-22 04:49:04 +02:00
twinaphex
9de0ebe859 Make some more strings translatable 2016-10-22 04:47:50 +02:00
twinaphex
42053a82e1 Prevent some implicit memsets 2016-10-21 19:39:51 +02:00
twinaphex
ddb4f85430 netplay_common.c - Buildfix for MSVC 2016-10-19 18:09:59 +02:00
Gregor Richards
2e432b005e Casts for C++ compatibility. 2016-10-10 11:56:43 -04:00
Gregor Richards
5c206c89f0 Add a netplay advertisement server for LAN netplay detection. 2016-10-10 11:52:54 -04:00
Gregor Richards
2c1cd0d06b Netplay should disable when it deinits, so it doesn't auto-reconnect
when loading a new game.
2016-10-09 09:42:06 -04:00
Gregor Richards
6c15c0de3d Support for architecture-dependence serialization quirks in Netplay
As well as the implementation magic, we now send a platform magic in our
connection header. If the core reports platform dependence and the
platform magic differs relevantly, the connection will be refused.

Since netplay_send_info (client handshake) and netplay_get_info (server
handshake) were practically identical, they've also been merged into a
single netplay_handshake.
2016-10-05 21:12:42 -04:00
Gregor Richards
307ba5951e A bit more care about frame=0 input, which is always 0 2016-10-05 20:45:30 -04:00
Alcaro
46ab267f40 Merge pull request #3700 from GregorR/netplay-serialization-quirks
Serialization quirks
2016-10-06 00:59:14 +02:00
Gregor Richards
e65a63e5d5 Add support for debugging core nondeterminism
This adds a debug flag to netplay_net (DEBUG_NONDETERMINISTIC_CORES)
which helps determine if a core has nondeterminism.
2016-10-05 07:58:01 -04:00
Gregor Richards
60153e7035 Ignore check_frames if CRCs are utterly inconsistent
This effectively disables check_frames if frame 1's CRC differs between
host and client. This is necessary because some important cores have
nondeterminism in core_run, thus mandating check_frames, while some
important cores have nondeterminism in core_serialize, thus mandating no
check_frames.
2016-10-05 07:55:30 -04:00
Gregor Richards
49b4143687 Reviving netplay_log_connection, i.e. connection messages on the host 2016-10-05 07:52:14 -04:00
Gregor Richards
701cc5a18c Splitting endian and other platform savestate quirks. 2016-10-04 23:07:36 -04:00
Gregor Richards
a636bac428 Style and clarity nits. 2016-10-04 23:07:36 -04:00
Gregor Richards
51683661e5 Changes to Netplay for the recent changes to quirks. 2016-10-04 23:07:36 -04:00
Gregor Richards
90bd741786 Switching serialization quirks to uint64_t for consistency with other
bitfields
2016-10-04 23:07:35 -04:00
Gregor Richards
3fa3fe0fcd Fixes for the other few Netplay initialization points 2016-10-04 23:07:35 -04:00
Gregor Richards
0d661ef6a2 Fix some backwards implementation in reporting serialization quirks 2016-10-04 23:07:35 -04:00
Gregor Richards
07a4ad791d Implemented Netplay initialization quirk 2016-10-04 23:07:35 -04:00
Gregor Richards
5676d0b848 Adding Netplay quirk for untransmittable savestates 2016-10-04 23:06:50 -04:00
Gregor Richards
44931586b7 Removing Netplay workarounds which will soon be replaced by quirks 2016-10-04 23:06:50 -04:00
Gregor Richards
68cee3b409 Being more careful with serialization 2016-10-04 22:24:33 -04:00
Gregor Richards
71873e8c97 Moving Netplay pre- and post-frame behavior into core_run
This (mostly) prevents other paths from accidentally side-stepping
Netplay. Netplay itself now sets an in_netplay variable to avoid
self-recursion in its own core_run calls.
2016-10-04 13:40:07 -04:00
twinaphex
19863e4174 autosave_lock/autosave_unlock - no longer require HAVE_THREADS ifdefs 2016-10-04 09:56:58 +02:00
Gregor Richards
3953018547 Clarifications to Netplay menu and removing obsolete setting
This commit:
 * Reorders the Netplay settings menu to put more useful options at the
   top.
 * Renames the swap_input setting from "Swap Netplay Input", which is
   meaningless and confusing, to "Netplay P2 Uses C1", which is oddly
   truncated but at least true.
 * Removes the is_client setting altogether, as that's no longer how
   client vs. server mode is determined (each are separate options when
   enabling Netplay)
2016-10-03 17:28:20 -04:00
Gregor Richards
e41ac34561 Get rid of global->netplay
Moved settings values into settings->netplay, and global->netplay.enable
is moved into netplay itself, and is no longer a configuration value
whatsoever, as that conflicts with the behavior of the netplay menu.
2016-10-02 22:13:34 -04:00
twinaphex
243dc139d2 Revert "Create path server and add to paths.c"
This reverts commit 00a1e3716a.
2016-10-01 08:17:44 +02:00
Gregor Richards
01d379066e Removing Netplay workarounds in anticipation of quirks API 2016-09-30 16:00:49 -04:00
twinaphex
13cf804a70 Fix signed/unsigned mismatch warnings 2016-09-30 08:23:24 +02:00
twinaphex
00a1e3716a Create path server and add to paths.c 2016-09-30 06:22:56 +02:00
Gregor Richards
f710303a40 Somewhat fixing support for savestateless cores
Without early saves we couldn't properly detect savestateless cores. We
still can't, really, but we can at least EVENTUALLY detect this
condition. netplay_net has been fixed to do so.
2016-09-29 20:48:39 -04:00
Gregor Richards
5b62fbb355 Fix spectator mode to work with the late-serialization workaround 2016-09-29 17:28:01 -04:00
twinaphex
da5d43974a netplay_data is a void pointer no more 2016-09-29 20:11:46 +02:00
Gregor Richards
567da56048 Adding remaining netplay menu options
A couple fixes are still necessary for the client, in particular to
recover a "lost" hostname, but now it is possible to start server or
client mid-stream, and to disconnect intentionally.
2016-09-29 13:04:38 -04:00
Twinaphex
9b17e4f01e Merge pull request #3680 from GregorR/netplay-sram-leniency
Make netplay lenient to differing sram sizes
2016-09-28 23:12:10 +02:00