Function


nuContGBPakCheckConnector


Syntax

s32 nuContGBPakCheckConnector(NUContPakFile *handle, u8 *status)

Arguments

handle      GB Pak control structure (shared with Controller Pak structure)
status detected status

Return Value

Error

Description

Detects poorly connected Game Boy Game Pak connector

By accessing special areas in ROM and RAM and checking the behavior of all address lines, this function can determine whether the GB Pak and the Game Boy Game Pak are properly connected.

"status" contains the following information:

OS_GBPAK_GBCART_ON This bit indicates that a Game Boy Game Pak is inserted. The bit = 1 if Game Pak is inserted in GB Pak.
OS_GBPAK_GBCART_PULL This bit indicates detection of removal of Game Boy Game Pak. The bit = 1 if Pak was once removed. It becomes 0 when a Pak is inserted and osGbpakGetStatus()or osGbpakReadId() is called.
OS_GBPAK_POWER Indicates power supply to the GB Pak. 1 when power is ON; 0 when power if OFF

The return value is the value returned by the osGbpakCheckConnector function.

Errors

PFS_ERR_NOPACK Nothing is inserted in the specified Controller.
PFS_ERR_DEVICE Some device other than a GB Pak is inserted in the Controller.
PFS_ERR_CONTRFAIL Data transfer with Controller has failed. Either the Controller is not connected properly, or there may be some problem with the GB Pak or the Controller connector.
PFS_ERR_NO_GBCART Game Boy Game Pak is not inserted in the GB Pak.