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_IsRunOnEmulator</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">OS_IsRunOnEmulator <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>BOOL OS_IsRunOnEmulator( void );</CODE> 15</DL> 16<H2>Arguments</H2> 17<P>None.</P> 18<H2>Return Values</H2> 19<P>If the program is running on the "ensata NITRO Software Emulator", <code>TRUE</code> is returned. Otherwise, <code>FALSE</code> is returned.</P> 20<H2>Description</H2> 21<P>Checks whether or not the program is running on the "ensata NITRO Software Emulator" (Ensata).</P> 22<P>This function is used to dynamically switch processing depending on whether the program is running on Ensata or some other environment. Use this function to create programs that will operate on Ensata and other environments.</P> 23<P>The <a href="../debug/OS_Printf.html"><code>OS_Printf</code></a> function uses this function to control the output destination.</P> 24<P>Because this is a debugging function, it always returns <code>FALSE</code> in the FINALROM version of the library.</P> 25<H3>Similar Functions</H3> 26<P>The <A href="OS_IsRunOnDebugger.html"><CODE>OS_IsRunOnDebugger</CODE></A> function is also used for finding out the operating environment. It checks whether the program is running on either IS-NITRO-DEBUGGER or IS-TWL-DEBUGGER.</P> 27<H3> Actual Values Due to the Environment or Build</H3> 28<P>The table below shows the differences in the values returned by the <A href="OS_IsRunOnDebugger.html"><CODE>OS_IsRunOnDebugger</CODE></A> and <CODE>OS_IsRunOnEmulator</CODE> functions due to the operating environment.<BR> 29</P> 30<TABLE border="1"> 31 <TBODY> 32 <TR> 33 <TH colspan="4" style="background-color:#304040;"><FONT color="#ffffff">For NITRO Mode</FONT></TH> 34 </TR> 35 <TR> 36 <TH>Operating Environment</TH> 37 <TH>Build</TH> 38 <TH>Value of <CODE>OS_IsRunOnDebugger</CODE></TH> 39 <TH><CODE>Value of <CODE>OS_IsRunOnEmulator</CODE></CODE></TH> 40 </TR> 41 <TR> 42 <TD>Actual DS unit</TD> 43 <TD>DEBUG<BR> RELEASE<BR> FINALROM</TD> 44 <TD><B>FALSE</B></TD> 45 <TD><B>FALSE</B></TD> 46 </TR> 47 <TR> 48 <TD>Actual TWL unit</TD> 49 <TD>DEBUG<BR> RELEASE<BR> FINALROM</TD> 50 <TD><B>FALSE</B></TD> 51 <TD><B>FALSE</B></TD> 52 </TR> 53 <TR> 54 <TD rowspan="2">IS-NITRO-DEBUGGER</TD> 55 <TD>DEBUG<BR> RELEASE</TD> 56 <TD><B><FONT color="#ff0000">TRUE</FONT></B></TD> 57 <TD><B>FALSE</B></TD> 58 </TR> 59 <TR> 60 <TD>FINALROM</TD> 61 <TD><B>FALSE</B></TD> 62 <TD><B>FALSE</B></TD> 63 </TR> 64 <TR> 65 <TD rowspan="2">ENSATA EMULATOR</TD> 66 <TD>DEBUG<BR> RELEASE</TD> 67 <TD><B>FALSE</B></TD> 68 <TD><B><FONT color="#ff0000">TRUE</FONT></B></TD> 69 </TR> 70 <TR> 71 <TD>FINALROM</TD> 72 <TD><B>FALSE</B></TD> 73 <TD><B>FALSE</B></TD> 74 </TR> 75 <TR> 76 <TD rowspan="2">IS-TWL-DEBUGGER<BR>(For standard development: ARM9)</TD> 77 <TD>DEBUG<BR> RELEASE</TD> 78 <TD><B><FONT color="#ff0000">TRUE</FONT></B></TD> 79 <TD><B>FALSE</B></TD> 80 </TR> 81 <TR> 82 <TD>FINALROM</TD> 83 <TD><B>FALSE</B></TD> 84 <TD><B>FALSE</B></TD> 85 </TR> 86 <TR> 87 <TD rowspan="2">IS-TWL-DEBUGGER<BR>(For component development<BR>ARM9 + ARM7)</TD> 88 <TD>DEBUG<BR> RELEASE</TD> 89 <TD><B><FONT color="#ff0000">TRUE</FONT></B></TD> 90 <TD><B>FALSE</B></TD> 91 </TR> 92 <TR> 93 <TD>FINALROM</TD> 94 <TD><B>FALSE</B></TD> 95 <TD><B>FALSE</B></TD> 96 </TR> 97 <TR> 98 <TH colspan="4" style="background-color:#304040;"><FONT color="#ffffff">For TWL Mode</FONT></TH> 99 </TR> 100 <TR> 101 <TH>Operating Environment</TH> 102 <TH>Build</TH> 103 <TH>Value of <CODE>OS_IsRunOnDebugger</CODE></TH> 104 <TH>Value of <CODE>OS_IsRunOnEmulator</CODE></TH> 105 </TR> 106 <TR> 107 <TD>Actual TWL unit</TD> 108 <TD>DEBUG<BR> RELEASE<BR> FINALROM</TD> 109 <TD><B>FALSE</B></TD> 110 <TD><B>FALSE</B></TD> 111 </TR> 112 <TR> 113 <TD rowspan="2">IS-TWL-DEBUGGER<BR>(For standard development: ARM9)</TD> 114 <TD>DEBUG<BR> RELEASE</TD> 115 <TD><B><FONT color="#ff0000">TRUE</FONT></B></TD> 116 <TD><B>FALSE</B></TD> 117 </TR> 118 <TR> 119 <TD>FINALROM</TD> 120 <TD><B>FALSE</B></TD> 121 <TD><B>FALSE</B></TD> 122 </TR> 123 <TR> 124 <TD rowspan="2">IS-TWL-DEBUGGER<BR>(For component development<BR>ARM9 + ARM7)</TD> 125 <TD>DEBUG<BR> RELEASE</TD> 126 <TD><B><FONT color="#ff0000">TRUE</FONT></B></TD> 127 <TD><B>FALSE</B></TD> 128 </TR> 129 <TR> 130 <TD>FINALROM</TD> 131 <TD><B>FALSE</B></TD> 132 <TD><B>FALSE</B></TD> 133 </TR> 134 </TBODY> 135</TABLE> 136<H2>Internal Operation</H2> 137<P>Makes a decision based on the the logical sum of the return value of the <A href="OS_GetConsoleType.html"><CODE>OS_GetConsoleType</CODE></A> function and the <CODE>OS_CONSOLE_ENSATA</CODE> bit.</P> 138<H2>See Also</H2> 139<P><A href="../debug/OS_Printf.html"><CODE>OS_Printf</CODE></A><BR> <A href="OS_IsRunOnDebugger.html"><CODE>OS_IsRunOnDebugger</CODE></A><BR> <A href="OS_GetConsoleType.html"><CODE>OS_GetConsoleType</CODE></A></P> 140<H2>Revision History</H2> 141<P>2008/04/15 Added a table.<br> 2007/11/05 Changed descriptions.<br> 2004/02/19 Initial version.</P> 142<hr><p>CONFIDENTIAL</p></body> 143</HTML>