CTRDG_IsBitID

Syntax

#include <nitro/ctrdg.h>
BOOL CTRDG_IsBitID( u8 bitID );
  

Arguments

bitID The bit ID

Return Values

Returns TRUE if the peripheral corresponding to the bit ID exists in the Game Pak. FALSE otherwise. The function always returns FALSE when the check is made after the Game Pak has been removed.

Description

Checks whether the peripheral corresponding to the Bit ID actually exists in the Game Pak. A bit ID and a number ID are assigned to every peripheral built into the Game Pak. The bit ID is 0 when a peripheral is present, and 1 when it is not. More than one peripheral can be built into the Game Pak, in which case multiple IDs are also stored. If there is an ID stored in the AGB Game Pak, it is possible to identify the peripheral.

This function checks whether peripherals that correspond to bit IDs are present.

This function is normally used by the peripheral library to implement functions and to check whether peripherals are present. You should have your application call this function via the peripheral library. Calling this function directly is not recommended.
This function can be called when the cartridge bus is locked with the OS_LockCartridge function. However, while the bus is locked, the ARM7 does not detect removal automatically, so call the CTRDG_IsExisting function at regular intervals, such as each game frame, during which the player cannot perform a re-insert operation. (This function internally calls the CTRDG_IsExisting function.)

See Also

CTRDG_Init, CTRDG_IsNumberID, CTRDG_IsOptionCartridge, CTRDG_IsAgbCartridge, CTRDG_IsExisting

Revision History

2005/04/12 Added description of cartridge bus lock.
2004/10/19 Initial version.


CONFIDENTIAL