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.1.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>OS_GetConsoleType</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_GetConsoleType <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14<DD><CODE>#include <nitro/os.h></CODE><BR> <BR> <CODE>u32 OS_GetConsoleType( void );</CODE> 15</DL> 16<H2>Arguments</H2> 17<P>None.</P> 18<H2>Return Values</H2> 19<P>A <code>u32</code>-type value that depends on the program's execution environment. Details are provided in <B>Description</B>.</P> 20<H2>Description</H2> 21<P>Returns a <CODE>u32</CODE>-type value that represents the program's execution environment.</P> 22<P>This function is an effective way to automatically switch processes depending on the operating environment. It allows you to create a common program for multiple operating environments.</P> 23<P><CODE>OS_GetConsoleType</CODE> is a function for <FONT color="#ff0000">getting the <I>operating environment</I>,</FONT> not a function for <FONT color="#ff0000">finding out the <I>operating mode</I></FONT>. Use the <A href="OS_IsRunOnTwl.html"><CODE>OS_IsRunOnTwl</CODE></A> function to find out the operating mode. For example, games for NTR can be played on the NTR as well as the TWL. The program is running in NTR mode in either case, but the hardware it is running on is different (NTR or TWL).</P> 24<BLOCKQUOTE> 25<P>�The <A href="OS_IsRunOnTwl.html"><CODE>OS_IsRunOnTwl</CODE></A> function tells you whether the application is running in <B>NTR mode</B> or <B>TWL mode</B>. However, it will not tell you which hardware the application is running on.<BR>With the <CODE>OS_GetConsoleType</CODE> function, you can find out whether the application is running on NTR or TWL. However, it will not tell you what the operating mode is.<BR> (Note, however, that if the FINALROM build of a NITRO-only ROM is run on TWL, it returns a value indicating that the software is running on NTR.)</P> 26</BLOCKQUOTE> 27<P>The first time it is called, the <CODE>OS_GetConsoleType</CODE> function will survey the devices, memory, and other information to determine its return value, but in subsequent calls, it will just return the same value it returned earlier. As a result, there is hardly any overhead in calling this function.</P> 28<P><FONT color="#ff0000">This function's return values are limited in the FINALROM libraries. When running these builds on something other than the production hardware (such as the debugger), values may be returned that represent environments other than the one being used.</FONT></P> 29<H3><BR> <BR> <B>Similar Functions</B></H3> 30<P>There is a similar function called <A href="OS_GetRunningConsoleType.html"><CODE>OS_GetRunningConsoleType</CODE></A>. This function is different in that it will survey the actual hardware and return the appropriate value, even for FINALROM builds.</P> 31<P>For example, this difference can be seen by running a TWL FINALROM build on IS-TWL-DEBUGGER. The IS-TWL-DEBUGGER hardware has 32 MB of built-in memory, so the value returned by the <CODE>OS_GetRunningConsoleType</CODE> function and <CODE>OS_CONSOLE_SIZE_MASK</CODE> is <CODE>OS_CONSOLE_SIZE_32MB</CODE>, whereas the value returned by the <CODE>OS_GetConsoleType</CODE> function and <CODE>OS_CONSOLE_SIZE_MASK</CODE> is <CODE>OS_CONSOLE_SIZE_16MB</CODE>.</P> 32<P>If either of these functions for getting the operating environment are being left in a FINALROM build, it would be safer to use the <CODE>OS_GetConsoleType</CODE> function instead of the <A href="OS_GetRunningConsoleType.html"><CODE>OS_GetRunningConsoleType</CODE></A> function. The reason is this: Thinking ahead to when this platform is a retail product, the final ROM should only be running on the production hardware, so we want to eliminate the chances of a value that should never occur in the retail product (such as "operating environment is the debugger") being returned. With that in mind, it would probably be best to limit your use of the <A href="OS_GetRunningConsoleType.html"><CODE>OS_GetRunningConsoleType</CODE></A> function to debugging purposes.</P> 33<H3><BR> <BR> <B>Values That Can Be Obtained</B></H3> 34<BLOCKQUOTE><B>Operating environment:</B><BR> The logical product (bitwise AND) of the return value and <CODE>OS_CONSOLE_MASK</CODE> will take the following values depending on the operating environment.<BR> 35<TABLE border="1"> 36 <TBODY> 37 <TR> 38<TH>Value</TH> 39<TH>Operating Environment</TH> 40 </TR> 41 <TR> 42<TD width="240"><CODE>OS_CONSOLE_TWL</CODE></TD> 43<TD>Running on an actual TWL console (<FONT color="#ff0000"><B>*1</B></FONT>)</TD> 44 </TR> 45 <TR> 46<TD><CODE>OS_CONSOLE_NITRO</CODE></TD> 47<TD>Running on an actual NITRO system</TD> 48 </TR> 49 <TR> 50<TD><CODE>OS_CONSOLE_TWLDEBUGGER</CODE></TD> 51<TD>Running on IS-TWL-DEBUGGER (<FONT color="#ff0000"><B>*2</B></FONT>)</TD> 52 </TR> 53 <TR> 54<TD><CODE>OS_CONSOLE_ISDEBUGGER</CODE></TD> 55<TD>Running on IS-NITRO-DEBUGGER</TD> 56 </TR> 57 <TR> 58<TD><CODE>OS_CONSOLE_ENSATA</CODE></TD> 59<TD>Running on Ensata NITRO Software Emulator</TD> 60 </TR> 61 </TBODY> 62</TABLE> 63For <FONT color="#ff0000"><B>*1</B></FONT>, where the function has determined that the application is running on an actual TWL console, the values will be further broken down based on the logical product with <CODE>OS_CONSOLE_TWLTYPE_MASK</CODE>.<BR>That said, you do not normally have to give consideration to <CODE>OS_CONSOLE_TWLTYPE_DEV</CODE>. There is no problem with assuming the environment to be an actual TWL console based solely on a return value of <CODE>OS_CONSOLE_TWL</CODE>. 64<TABLE border="1"> 65 <TBODY> 66 <TR> 67<TH>Value</TH> 68<TH>TWL Hardware Types</TH> 69 </TR> 70 <TR> 71<TD width="240"><CODE>OS_CONSOLE_TWLTYPE_RETAIL</CODE></TD> 72<TD>TWL retail hardware</TD> 73 </TR> 74 <TR> 75<TD><CODE>OS_CONSOLE_TWLTYPE_DEV</CODE></TD> 76<TD>TWL hardware with a different security key, for development purposes</TD> 77 </TR> 78 </TBODY> 79</TABLE> 80<BR> For <B><FONT color="#ff0000">*2</FONT></B>, where the function has determined that the application is running on IS-TWL-DEBUGGER, the values will be further broken down based on the logical product with <CODE>OS_CONSOLE_BOARD_MASK</CODE>. 81<TABLE border="1"> 82 <TBODY> 83 <TR> 84<TH>Value</TH> 85<TH>IS-TWL-DEBUGGER Types</TH> 86 </TR> 87 <TR> 88<TD width="240"><CODE>OS_CONSOLE_BOARD_A9_A7</CODE></TD> 89<TD>Debugger that supports both the ARM9 and ARM7, for component development</TD> 90 </TR> 91 <TR> 92<TD><CODE>OS_CONSOLE_BOARD_A9</CODE></TD> 93<TD>ARM9-only debugger, for application development</TD> 94 </TR> 95 </TBODY> 96</TABLE> 97<BR> 98</BLOCKQUOTE> 99<BLOCKQUOTE><B>Devices for Loading Programs:</B><BR> <BR> The logical product (bitwise AND) of the return value and <CODE>OS_CONSOLE_DEV_MASK</CODE> will take the following values depending on the device loading the program data. 100<TABLE border="1"> 101 <TBODY> 102 <TR> 103<TH>Value</TH> 104<TH>Load Device</TH> 105 </TR> 106 <TR> 107<TD width="240"><CODE>OS_CONSOLE_DEV_CARD</CODE></TD> 108<TD>Load from a Game Card device</TD> 109 </TR> 110 <TR> 111<TD><CODE>OS_CONSOLE_DEV_CARTRIDGE</CODE></TD> 112<TD>Load from a Game Pak (<FONT color="#ff0000"><B>*3</B></FONT>)</TD> 113 </TR> 114 <TR> 115<TD><CODE>OS_CONSOLE_DEV_NAND</CODE></TD> 116<TD>Load from NAND</TD> 117 </TR> 118 <TR> 119<TD><CODE>OS_CONSOLE_DEV_SDCARD</CODE></TD> 120<TD>Load from an SD Card</TD> 121 </TR> 122 <TR> 123<TD><CODE>OS_CONSOLE_DEV_MEMORY</CODE></TD> 124<TD>Load from memory</TD> 125 </TR> 126 <TR> 127<TD><CODE>OS_CONSOLE_DEV_DOWNLOAD</CODE></TD> 128<TD>Load from a download</TD> 129 </TR> 130 </TBODY> 131</TABLE> 132<BR> <FONT color="#ff0000"><B>*3</B></FONT> The TWL console does not include a Game Pak slot, so this value cannot be obtained on the TWL platform.<BR> 133</BLOCKQUOTE> 134<BLOCKQUOTE><B>Memory Size:</B><BR> <BR>The logical product (bitwise AND) of the return value and <CODE>OS_CONSOLE_SIZE_MASK</CODE> will take the following values depending on the size of the implemented memory. 135<TABLE border="1"> 136 <TBODY> 137 <TR> 138<TH>Value</TH> 139<TH>Main Memory Size</TH> 140 </TR> 141 <TR> 142<TD width="240"><CODE>OS_CONSOLE_SIZE_4MB</CODE></TD> 143<TD>4 MB</TD> 144 </TR> 145 <TR> 146<TD><CODE>OS_CONSOLE_SIZE_8MB</CODE></TD> 147<TD>8 MB</TD> 148 </TR> 149 <TR> 150<TD><CODE>OS_CONSOLE_SIZE_16MB</CODE></TD> 151<TD>16 MB</TD> 152 </TR> 153 <TR> 154<TD><CODE>OS_CONSOLE_SIZE_32MB</CODE></TD> 155<TD>32 MB</TD> 156 </TR> 157 </TBODY> 158</TABLE> 159<BR> If a NITRO-only ROM is run on an actual TWL system, the memory size will be 4 MB, regardless of the build type.</BLOCKQUOTE> 160<H3><B><BR> <BR> Actual Values Due to the Environment or Build</B></H3> 161<P>The table below indicates the values that can be obtained with the <CODE>OS_GetConsoleType</CODE> and <A href="OS_GetRunningConsoleType.html"><CODE>OS_GetRunningConsoleType</CODE></A> functions. The logical sum (bitwise OR) of the items in the table is the value obtained. <CODE>OS_CONSOLE_DEV_xxx</CODE> will be the value of the device that actually loaded the ROM data.<BR> <BR> 162</P> 163<TABLE border="1"> 164 <TBODY> 165 <TR> 166<TH colspan="5" style="background-color:#304040;"><FONT color="#ffffff">For NITRO Mode</FONT></TH> 167 </TR> 168 <TR> 169<TH>Operating Environment</TH> 170<TH>Build</TH> 171<TH>Value of the <CODE>OS_GetConsoleType</CODE> Function</TH> 172<TH>Value of the <CODE>OS_GetRunningConsoleType</CODE> Function</TH> 173<TH>Comments</TH> 174 </TR> 175 <TR> 176<TD rowspan="2">Actual NTR console</TD> 177<TD>DEBUG<BR> RELEASE</TD> 178<TD><B><FONT color="#990099">OS_CONSOLE_NITRO</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 179<TD><B><FONT color="#990099">OS_CONSOLE_NITRO</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 180<TD rowspan="2">All 4 are<BR>the same.</TD> 181 </TR> 182 <TR> 183<TD>FINALROM</TD> 184<TD><B><FONT color="#990099">OS_CONSOLE_NITRO</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 185<TD><B><FONT color="#990099">OS_CONSOLE_NITRO</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 186 </TR> 187 <TR> 188<TD rowspan="2">Actual TWL unit</TD> 189<TD>DEBUG<BR>RELEASE</TD> 190<TD><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 191<TD><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 192<TD rowspan="2">The only difference is <BR>the <CODE>OS_GetConsoleType</CODE> function<BR> for FINALROM builds.<BR>The amount of built-in memory will be <BR>4 MB, regardless of the build.</TD> 193 </TR> 194 <TR> 195<TD>FINALROM</TD> 196<TD style="background-color:#e0e0f0;"><B><FONT color="#990099"><FONT color="#990099">OS_CONSOLE_NITRO</FONT><BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></FONT></B></TD> 197<TD><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 198 </TR> 199 <TR> 200<TD rowspan="2">IS-NITRO-DEBUGGER</TD> 201<TD>DEBUG<BR>RELEASE</TD> 202<TD><FONT color="#990099"><B>OS_CONSOLE_ISDEBUGGER</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900"><B>OS_CONSOLE_SIZE_8MB</B></FONT></TD> 203<TD><FONT color="#990099"><B>OS_CONSOLE_ISDEBUGGER</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900"><B>OS_CONSOLE_SIZE_8MB</B></FONT></TD> 204<TD rowspan="2">The only difference is <BR>the <CODE>OS_GetConsoleType</CODE> function<BR>for FINALROM builds.<BR></TD> 205 </TR> 206 <TR> 207<TD>FINALROM</TD> 208<TD style="background-color:#e0e0f0;"><FONT color="#990099"><B>OS_CONSOLE_NITRO</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 209<TD><FONT color="#990099"><B>OS_CONSOLE_ISDEBUGGER</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900"><B>OS_CONSOLE_SIZE_8MB</B></FONT></TD> 210 </TR> 211 <TR> 212<TD rowspan="2">ENSATA EMULATOR</TD> 213<TD>DEBUG<BR>RELEASE</TD> 214<TD><FONT color="#990099"><B>OS_CONSOLE_ISDEBUGGER</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900"><B>OS_CONSOLE_SIZE_8MB</B></FONT></TD> 215<TD><FONT color="#990099"><B>OS_CONSOLE_ISDEBUGGER</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900"><B>OS_CONSOLE_SIZE_8MB</B></FONT></TD> 216<TD rowspan="2">The only difference is <BR>the <CODE>OS_GetConsoleType</CODE> function<BR>for FINALROM builds.<BR></TD> 217 </TR> 218 <TR> 219<TD>FINALROM</TD> 220<TD style="background-color:#e0e0f0;"><FONT color="#990099"><B>OS_CONSOLE_NITRO</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></B></TD> 221<TD><FONT color="#990099"><B>OS_CONSOLE_ISDEBUGGER</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900"><B>OS_CONSOLE_SIZE_8MB</B></FONT></TD> 222 </TR> 223 <TR> 224<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For general-purpose development: ARM9)</TD> 225<TD>DEBUG<BR>RELEASE</TD> 226<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 227<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 228<TD rowspan="2">The only difference is <BR>the <CODE>OS_GetConsoleType</CODE> function<BR>for FINALROM builds.<BR></TD> 229 </TR> 230 <TR> 231<TD>FINALROM</TD> 232<TD style="background-color:#e0e0f0;"><B><FONT color="#990099">OS_CONSOLE_NITRO<BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></FONT></B></TD> 233<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 234 </TR> 235 <TR> 236<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For component development<BR>ARM9 + ARM7)</TD> 237<TD>DEBUG<BR>RELEASE</TD> 238<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9_A7</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 239<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9_A7</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 240<TD rowspan="2">The only difference is <BR>the <CODE>OS_GetConsoleType</CODE> function<BR>for FINALROM builds.<BR></TD> 241 </TR> 242 <TR> 243<TD>FINALROM</TD> 244<TD style="background-color:#e0e0f0;"><B><FONT color="#990099">OS_CONSOLE_NITRO<BR> OS_CONSOLE_DEV_xxx<BR> <FONT color="#339900">OS_CONSOLE_SIZE_4MB</FONT></FONT></B></TD> 245<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9_A7</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 246 </TR> 247 <TR> 248<TH colspan="5" style="background-color:#304040;"><FONT color="#ffffff">For TWL Mode</FONT></TH> 249 </TR> 250 <TR> 251<TH>Operating Environment</TH> 252<TH>Build</TH> 253<TH>Value of the <CODE>OS_GetConsoleType</CODE> Function</TH> 254<TH>Value of the <CODE>OS_GetRunningConsoleType</CODE> Function</TH> 255<TH>Comments</TH> 256 </TR> 257 <TR> 258<TD rowspan="2">Actual TWL unit</TD> 259<TD>DEBUG<BR>RELEASE</TD> 260<TD><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_16MB</FONT></B></TD> 261<TD><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_16MB</FONT></B></TD> 262<TD rowspan="2">All 4 are<BR>the same.</TD> 263 </TR> 264 <TR> 265<TD>FINALROM</TD> 266<TD><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_16MB</FONT></B></TD> 267<TD><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_16MB</FONT></B></TD> 268 </TR> 269 <TR> 270<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For general-purpose development: ARM9)</TD> 271<TD>DEBUG<BR>RELEASE</TD> 272<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 273<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 274<TD rowspan="2">The only difference is <BR>the <CODE>OS_GetConsoleType</CODE> function<BR>for FINALROM builds.<BR></TD> 275 </TR> 276 <TR> 277<TD>FINALROM</TD> 278<TD style="background-color:#e0e0f0;"><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_16MB</FONT></B></TD> 279<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 280 </TR> 281 <TR> 282<TD rowspan="2">IS-TWL-DEBUGGER<BR>(For component development:<BR>ARM9 + ARM7)</TD> 283<TD>DEBUG<BR>RELEASE</TD> 284<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9_A7</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 285<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9_A7</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 286<TD rowspan="2">The only difference is <BR>the <CODE>OS_GetConsoleType</CODE> function<BR>for FINALROM builds.<BR></TD> 287 </TR> 288 <TR> 289<TD>FINALROM</TD> 290<TD style="background-color:#e0e0f0;"><B><FONT color="#990099">OS_CONSOLE_TWL<BR> OS_CONSOLE_TWLTYPE_RETAIL</FONT></B><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_16MB</FONT></B></TD> 291<TD><FONT color="#990099"><B>OS_CONSOLE_TWLDEBUGGER<BR> OS_CONSOLE_BOARD_A9_A7</B></FONT><BR> OS_CONSOLE_DEV_xxx<BR> <B><FONT color="#339900">OS_CONSOLE_SIZE_32MB</FONT></B></TD> 292 </TR> 293 </TBODY> 294</TABLE> 295<P><BR> 296</P> 297<P><BR> <BR> <B>Identifying the Operating Environment in NITRO Mode</B></P> 298<P>When run in NITRO mode, the <CODE>OS_GetConsoleType</CODE> function alone cannot determine whether the application is running on a NTR console or a TWL console. This is because not all developers creating NITRO-exclusive ROMs know about TWL. Because NITRO developers who do not know about TWL assume that their NITRO-exclusive ROMs will ultimately only be run on NTR consoles, it would be undesirable for the return value of the <CODE>OS_GetConsoleType</CODE> function to be set to a value that indicates their software is running on TWL. 299</P> 300<P>However, there may be times when you absolutely need to distinguish the two. The <CODE>OSi_IsNitroModeOnTwl</CODE> function has been created to serve that purpose. If this function returns <CODE>TRUE</CODE>, it will indicate that a NITRO-mode ROM is running on TWL. The name of the TWL appears in this function, so it will be handled as a private (undisclosed) function, and an "i" was added to the function name (<CODE>OSi_</CODE>).</P> 301<H2>See Also</H2> 302<P><A href="OS_IsRunOnDebugger.html"><CODE>OS_IsRunOnDebugger</CODE></A><BR> <A href="OS_IsRunOnEmulator.html"><CODE>OS_IsRunOnEmulator</CODE></A><BR> <A href="OS_GetRunningConsoleType.html"><CODE>OS_GetRunningConsoleType</CODE></A></P> 303<H2>Revision History</H2> 304<P>2008/04/15 Divided the table according to mode.<BR> 2008/03/27 Added actual values based on the environment or build.<BR> 2007/11/16 Added descriptions.<BR> 2007/11/05 Migrated to the <CODE>OS_GetRunningConsoleType</CODE> function.</P> 305<P></P> 306<hr><p>CONFIDENTIAL</p></body> 307</HTML>