CTRDG_IsBitID

C Specification

#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 or not 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, when the bus is locked, the ARM7 will not perform automatic release detection processing, and thus you should periodically call CTRDG_IsExisting each game frame or other interval when the player cannot reinsert. (This function internally calls CTRDG_IsExisting.)

See Also

CTRDG_Init, CTRDG_IsNumberID, CTRDG_IsOptionCartridge, CTRDG_IsAgbCartridge, CTRDG_IsExisting

Revision History

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