1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>CTRDG_GetAgbGameCode</TITLE>
8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">CTRDG_GetAgbGameCode <IMG src="../image/NTR.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/ctrdg.h&gt;</CODE></PRE>
16  <PRE><CODE>u32 CTRDG_GetAgbGameCode( void );</CODE></PRE>
17</DL>
18<H2>Arguments</H2>
19<P>None.</P>
20<H2>Return Values</H2>
21<P>If there is an AGB Game Pak and its game code (initial code) matches the one obtained when the <a href="CTRDG_Init.html"><CODE>CTRDG_Init</CODE></a> function was called, that value will be returned.<br>Otherwise returns <code>FALSE</code>. Also, always returns <code>FALSE</code> after the Game Pak has been removed once.</P>
22<H2>Description</H2>
23<P>Returns AGB Game Pak's game code (initial code). However, if there is no AGB Game Pak or the initial code does not match the code retrieved by the <a href="CTRDG_Init.html"><CODE>CTRDG_Init</CODE></a> function, <CODE>FALSE</CODE> is returned.<br><br> <br> This function can be called when the cartridge bus is locked by the <a href="../os/spinLock/OS_LockCartridge.html"><CODE>OS_LockCartridge</CODE></a> function. However, while the bus is locked, the ARM7 does not detect removal automatically, so call the <A href="CTRDG_IsExisting.html"><CODE>CTRDG_IsExisting</CODE></A> function at regular intervals, such as each game frame, during which the player cannot perform a re-insert operation. (This function internally calls the <A href="CTRDG_IsExisting.html"><CODE>CTRDG_IsExisting</CODE></A> function.)
24</P>
25<H2>Note</H2>
26<P><font color="#800000">If the game code obtained when the <a href="CTRDG_Init.html"><CODE>CTRDG_Init</CODE></a> function was called matches the one obtained again in this function, that value will be returned.<br>Accordingly, note that Game Paks enabled after the <a href="CTRDG_Init.html"><CODE>CTRDG_Init</CODE></a> function is called will not be recognized.</font><br>(For details, see the description of the <a href="CTRDG_Init.html"><CODE>CTRDG_Init</CODE></a> function.)
27</P>
28
29<H2>See Also</H2>
30<P><code><a href="CTRDG_Init.html">CTRDG_Init</a></code><BR> <code><a href="CTRDG_GetAgbMakerCode.html">CTRDG_GetAgbMakerCode</a></code><BR> <code><a href="CTRDG_IsAgbCartridge.html">CTRDG_IsAgbCartridge</a></code></P>
31<H2>Revision History</H2>
32<P>
332005/04/12 Added description of cartridge bus lock and revised explanation about game code being re-obtained each time.<br /> 2005/03/03 Added explanation that the presence of a Game Pak is determined only at initialization.<br /> 2004/10/04 Initial version.
34</P>
35<hr><p>CONFIDENTIAL</p></body>
36</HTML>
37