SO
I DIAGNOSED THE SNES9X NETPLAY CRASH BUG
THE ROOT CAUSE IS FUCKING DUMB
so, when writing your own layer 7 network protocol, the procedure is:
1) take three shots of whiskey
2) finish writing your will
3) get out the binary calculator
because you gotta get everything perfect
- the host window would disappear
- all four other windows would report "Bad magic number in server heart beat"
![](https://pbs.twimg.com/media/DcT6WE4V0AAjj4o.jpg)
establish TCP connection
server sends one packet instructing client to load a ROM
server sends one packet containing the SRAM dump for the game
server sends one packet telling the client to reset the game
server begins sending joypad updates
![](https://pbs.twimg.com/media/DcT8QVNUQAAsWZQ.jpg)
is the top two bit
the top
TWO
BITS
WHICH STORES A MAXIMUM
OF FOUR VALUES
MEANING AT FIVE PLAYERS IT FUCKING OVERFLOWS AND WRAPS AROUND
![](https://pbs.twimg.com/media/DcUPge_VMAYdAUp.jpg)
![](https://pbs.twimg.com/media/DcUPs5MVMAA7fLu.jpg)
![](https://pbs.twimg.com/media/DcUQGCmVAAEIx12.jpg)
You probably already see it.
![](https://pbs.twimg.com/media/DcUQNBsU8AEGOmh.jpg)
![](https://pbs.twimg.com/media/DcUQkMKVwAEXJWl.jpg)
![](https://pbs.twimg.com/media/DcUQnGiV4AA8Z9p.jpg)
![](https://pbs.twimg.com/media/DcUzSYLUwAAZ8xS.jpg)