Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is mGBA link cable emulation deterministic?
#1
Hi,
I'm new to mGBA, currently just playing around with code and experimenting ways to implement netplay feature.
What I noticed is that sometimes 2 local gba emulations when connected through link cable will result in different states (even when they started from same states and received same input sequences).

What I tried:
- open 2 gbas on PC A, then open 2 gbas on PC B. 
- 2 gbas on the same machine were executed on the same thread (to avoid randomness of multithreading). 2 gbas in 2 machines started from same save states.
- Apply the same input sequences to the 2 gbas in 2 machines, at first the states keep being identical for a while. However at some point, they started behave differently.
- For example: on PC A, lockstep.useCycles(1, 499) was called, while on the other one, useCycles(1, 495) was called. 

I'm not sure why the cycles value were called differently at that time. After that point, obviously the states of 2 gbas on 2 PCs were diverse.
Reply

#2
Currently, no. It's buggy at the moment. I have a redesign in early progress that will hopefully fix that though.
Reply

#3
(12-15-2018, 12:22 AM)endrift Wrote: Currently, no. It's buggy at the moment. I have a redesign in early progress that will hopefully fix that though.

Thanks for the reply. Do you have any documents on how GBA link cable work? I would love to understand it better. 
Haven't managed to find anything useful on the net.

I experimented some multiplayer scenarios lately and found out the timing & sync (fps target for example) affected the stability of link cable, some fps targets caused too many communication errors. Why does fps target affect the link cable?
I understand that you are rewriting the link cable module. However, would really appreciate to understand what are the problems currently.

Thanks,
Reply

#4
Ok, I saw your gbatek repo. It's quite useful. I have made a pull request for link cable fix for pokemon/kirby games here: https://github.com/mgba-emu/mgba/pull/1263
Hopefully, it could be useful.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 Melroy van den Berg.