Serial Data Transfer clock internal vs. external
Page 1 of 1

Author:  zeroone [ Thu Dec 07, 2017 7:36 am ]
Post subject:  Serial Data Transfer clock internal vs. external

When you link 2 Game Boys together, how do they coordinate which of them clocks the channel? Is it based off of menu selections (e.g. Connect as player 1 vs connect as player 2)?

Author:  Shonumi [ Thu Dec 07, 2017 3:44 pm ]
Post subject:  Re: Serial Data Transfer clock internal vs. external

Typically, both Game Boys will set themselves up to receive data on an external clock, meaning they can't initiate a transfer. One Game Boy will switch to an internal clock when prompted by user input (pressing A or START on a given menu), then it will send a byte and wait for a response from the other GB. The one using the external clock would be the "slave" and the one using an internal clock is "master", since "master" will be the one driving communications.

It's possible for two GBs to switch to internal clocks at the same time during the user input phase for selecting multiplayer. In that case, some games have "master" and "slave" bytes they exchange. By default, the slave byte is put into register SB. Only when they switch to internal clocks do they setup the master code. If one GB tries to become master, but it receives a master byte, something went wrong, and the game will prompt users to try again.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group