

#include <nitro/os.h>BOOL OS_IsRunOnEmulator( void );
None.
If the program is running on the ensata NITRO Software Emulator, TRUE is returned. Otherwise, FALSE is returned.
Checks whether the program is running on the ensata NITRO Software Emulator (Ensata).
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.
The OS_Printf function uses this function to control the output destination.
Because this is a debugging function, it always returns FALSE in the FINALROM version of the library.
The OS_IsRunOnDebugger 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.
The table below shows the differences in the values returned by the OS_IsRunOnDebugger and OS_IsRunOnEmulator functions due to the operating environment.
| For NITRO Mode | |||
|---|---|---|---|
| Operating Environment | Build | Value of OS_IsRunOnDebugger |
Value of |
| NTR system | DEBUG RELEASE FINALROM |
FALSE | FALSE |
| Actual TWL unit | DEBUG RELEASE FINALROM |
FALSE | FALSE |
| IS-NITRO-DEBUGGER (debugger software even if not connected) |
DEBUG RELEASE |
TRUE | FALSE |
| FINALROM | FALSE | FALSE | |
| ENSATA EMULATOR | DEBUG RELEASE |
FALSE | TRUE |
| FINALROM | FALSE | FALSE | |
| IS-TWL-DEBUGGER (For general-purpose development: ARM9) |
DEBUG RELEASE |
TRUE | FALSE |
| FINALROM | FALSE | FALSE | |
| IS-TWL-DEBUGGER (For component development: ARM9 + ARM7) |
DEBUG RELEASE |
TRUE | FALSE |
| FINALROM | FALSE | FALSE | |
| IS-TWL-DEBUGGER (For general-purpose development: ARM9) Debugger software When not connected |
DEBUG RELEASE |
FALSE |
FALSE |
| FINALROM | FALSE |
FALSE |
|
| IS-TWL-DEBUGGER (For component development: ARM9 + ARM7) Debugger software When not connected |
DEBUG RELEASE |
FALSE |
FALSE |
| FINALROM | FALSE |
FALSE |
|
| For TWL Mode | |||
| Operating Environment | Build | Value of the OS_IsRunOnDebugger function |
Value of OS_IsRunOnEmulator |
| Actual TWL unit | DEBUG RELEASE FINALROM |
FALSE | FALSE |
| IS-TWL-DEBUGGER (For general-purpose development: ARM9) |
DEBUG RELEASE |
TRUE | FALSE |
| FINALROM | FALSE | FALSE | |
| IS-TWL-DEBUGGER (For component development: ARM9 + ARM7) |
DEBUG RELEASE |
TRUE | FALSE |
| FINALROM | FALSE | FALSE | |
| IS-TWL-DEBUGGER (For general-purpose development: ARM9) Debugger software When not connected |
DEBUG RELEASE |
FALSE |
FALSE |
| FINALROM | FALSE |
FALSE |
|
| IS-TWL-DEBUGGER (For component development: ARM9 + ARM7) Debugger software When not connected |
DEBUG RELEASE |
FALSE |
FALSE |
| FINALROM | FALSE |
FALSE |
|
Makes a decision based on the the logical sum of the return value of the OS_GetConsoleType function and the OS_CONSOLE_ENSATA bit.
OS_Printf
OS_IsRunOnDebugger
OS_GetConsoleType
2009/10/30 Added information about operations when a debugger is not connected.
2008/04/15 Added a table.
2007/11/05 Changed descriptions.
2004/02/19 Initial version.
CONFIDENTIAL