Skip to content

Conversation

@Wit-MKW
Copy link

@Wit-MKW Wit-MKW commented Jun 24, 2025

the P2P features of Zero Tours only work in one direction at a time, so it won't do to only receive as many packets as are sent; in fact, it seems that this was never the issue with Pokémon. rather, the issue with Pokémon was that it was receiving a low-level error on remote disconnect, which isn't even a detectable state when the connection is over a phone line. rather, we simply stop sending the game data, allowing it to detect the remote disconnect through a timeout or other method which, to reiterate, was necessary in '01/'02 when these games were connecting over a phone line.

Wit-MKW added 2 commits June 24, 2025 19:21
the P2P features of Zero Tours only work in one direction at a time, so it won't do to only receive as many packets as are sent; in fact, it seems that this was never the issue with Pokémon. rather, the issue with Pokémon was that it was receiving a low-level error on remote disconnect, which isn't even a detectable state when the connection is over a phone line. rather, we simply stop sending the game data, allowing it to detect the remote disconnect through a timeout or other method which, to reiterate, was necessary in '01/'02 when these games were connecting over a phone line.
this allows for games not to notice a remote disconnect right away, at the expense of calling `sock_recv` one or more times after a remote disconnect.
@zenaror
Copy link

zenaror commented Jun 27, 2025

Tested with PicoAdapterGB using p2p connection (no relay server).
Also tested Pokemon Crystal trade (p2p, no relay server here).

@mid-kid
Copy link
Member

mid-kid commented Jun 27, 2025

Thanks! I didn't realize Zero Tours was a p2p game. I'll have to test these changes myself, and I'll backport them to the stable branch, but they otherwise look very clean.

The problem I had with pokemon is that on remote/non-local p2p connections, where a reply isn't received at the right moment, the game would get an empty reply and fire off an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants