CTRDG_GetAgbGameCode

C Specification

#include <nitro/ctrdg.h>
u32 CTRDG_GetAgbGameCode( void );

Arguments

None.

Return Values

If there is an AGB Game Pak and its game code (initial code) matches that obtained when CTRDG_Init was called, it returns the game code value. Otherwise returns FALSE. Also, always returns FALSE after the Game Pak has been removed once.

Description

Returns AGB Game Pak's game code (initial code). However, if there is no AGB Game Pak or the game code (initial code) does not match that obtained when CTRDG_Init was called, it returns FALSE. 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.)

Caution

If the game code obtained when CTRDG_Init was called matches that re-obtained in this function, it returns the value. Accordingly, note that Game Paks enabled after the CTRDG_Init function was called are not recognized.(For details, see the description of the CTRDG_Init function.)

See Also

CTRDG_Init, CTRDG_GetAgbMakerCode, CTRDG_IsAgbCartridge

Revision History

04/12/2005 Added description of cartridge bus lock and revised explanation about game code being re-obtained each time.
03/03/2005 Added explanation that the presence of a Game Pak is determined only at initialization
10/04/2004 Initial version