Function


nuContGBPakGetStatus


Syntax

s32 nuContGBPakGetStatus(NUContPakFile *handle, u8 *status)

Arguments

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

Return Value

Error

Description

Gets the status of the GB Pak

Gets the status of the GB Pak and stores it in "status". "status" contains the following data:

OS_GBPAK_GBCART_ON This bit indicates insertion of Game Boy Game Pak. 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 osGbpakGetStatus 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.
PFS_ERR_NEW_GBCART Game Boy Game Pak has been removed and reinserted.