Checks Game Boy Game Pak connector
#include <ultra64.h> /* ultra64.h */ s32 osGbpakCheckConnector(OSPfs *pfs, u8 *status);
The osGbpakCheckConnector function confirms that the N64 Transfer Pak and the Game Boy Game Pak are firmly connected together. It checks whether each Game Boy Game Pak address line is properly connected.
If you call osGbpakReadWrite function without first calling this function, data could be read or written to the wrong address because of a poor connection. Therefore, please be sure to call the osGbpakCheckConnector function before calling the osGbpakReadWrite function.
Before this function is called, the functions osGbpakInit and osGbpakReadId must always be called. osGbpakCheckConnector internally performs a status check with osGbpakGetStatus and turns the power on with osGbpakPower. Thus, these functions do not need to be called.
osGbpakCheckConnector supports only the following Game Boy Game Paks. Note that its operation is not guaranteed with other Game Paks.
The OSpfs structure pfs is used for N64 Transfer Pak control. Before being used, it must initialized by the function osGbpakInit. The status of the N64 Transfer Pak is returned as *status. For information on status, see the osGbpakGetStatus function.
The internal operations performed by the osGbpakCheckConnector function are as follows.
Since osGbpakCheckConnector performs the processing above, it does not support all Game Boy Game Paks. It may not operate properly in some Game Boy Game Paks. Examples are as follows.
When using osGbpakCheckConnector, be careful to note whether the above conditions occur. If they are unavoidable, osGbpakCheckConnector should not be used, and the connector-check function supported by the application should be used instead.
Return value is an error code. If the function terminates normally, a value of 0 is returned. If an error occurs, one of the following error codes is returned:
Nothing is inserted in the specified Controller.
A device other than the N64 Transfer Pak is inserted in the Controller.
The Controller may not be connected correctly, or there may be some problem with the N64 Transfer Pak or the Controller connector.
If this error is issued, display a message such as the following to the screen: The Game Boy Game Pak connection is abnormal. Please turn off power to the N64 Control Deck and refer to the N64 Transfer Pak User's Manual.
No Game Boy Game Pak is inserted in the N64 Transfer Pak.
osGbpakInit, osGbpakGetStatus, osGbpakPower, osGbpakReadWrite, and osGbpakReadId
1999/04/30 Changed Format