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.
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.
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.
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)
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.
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.
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.
Some cores can only determine the true size of sram after fully loading
the content, and so will report different values when the sram size is
queried. As a result, netplay cannot count on sram size as a reliable
verification technique. sram is still sent for the savestateless core
case.