Ok, bit of a random idea I just had...
One of the major problems with emulators and NetPlay and swapping controller inputs is that if you are playing on two different platforms (e.g Mac + Windows), one could desync due to emulation differences (e.g. timing of opcodes)
But I just thought of a possible idea...
Even though the emulators desync, they could check for desync by sending back and forth checksum packets. If a desync happens they could pause for a moment, and try to resync, do a binary search to find the affected portions of memory. Possibly (i'm just speculating...) in an advanced pair of emulators there would only be a few bytes here and there that would be different (e.g. a number carried wrong somewhere in a register or memory) and so the Master emulator could correct the Slave emulator. Even if the Master emulator was 'wrong' (e.g. a more inaccurate assembler 68000 core) both emulators would still resync to the master emulator (because of course there is no way for a computer to know which one is 'wrong'!).
A massive drawback with this method, (other than obviously it's complexity !!), is that emulators for a system would have to agree on a common memory format for sending the memory from Master to Slave to correct it. (A similar problem to sharing save states such at Genecyst save states .GSn) Like I say I don't know if this would actually work in practice, tis just a random idea I just had and thought I'd share with people!!
But this could also be quite an elegant way to fix emulator bugs (make a known accurate emulator netplay with a faster assembler-based one, and then watch which opcodes it corrects)...
Obviously the ideal solution would be that all emulators play in the same correct way, but this method could provide a buffer zone for different rom revisions, emulators accidentally playing PAL versus NTSC etc etc, 6-button versus 3-button, undocumented opcodes being inplemented differently etc. In the worst case scenario (completely different rom image) the master emulator would be correcting the ENTIRE Ram each frame!! This of course would be bad, and the netplay would probably do well to disconnect after a few seconds to save the connection of the poor users! ;-)
Dave... imagining a beautiful day far in the future when DSs and Pocket PC and PSPs and PCs and Xbox 360s and Mobile phones all Netplay over Bluetooth, WiFi, GPRS and the internet ;-)
Newsdee's Love, Glory, and Discussion Boards