CTRDG_IsNumberID

Syntax

#include <nitro/ctrdg.h>
BOOL CTRDG_IsNumberID( u8 numberID );
  

Arguments

numberID The Number ID

Return Values

Returns TRUE if the peripheral corresponding to the Number ID exists in the Game Pak; otherwise, returns FALSE.
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 Number ID actually exists in the Game Pak. A bit ID and a number ID are assigned to every peripheral built into the Game Pak. 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.

If there is an ID stored in the AGB Game Pak, it is possible to identify the peripheral.

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_IsBitID, CTRDG_IsOptionCartridge, CTRDG_IsAgbCartridge, CTRDG_IsExisting

Revision History

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


CONFIDENTIAL