# OS_IsRunOnEmulator

## Syntax

  `#include <nitro/os.h>`
  `BOOL OS_IsRunOnEmulator( void );`

## Arguments

None.

## Return Values

If the program is running on the "ensata NITRO Software Emulator", `TRUE` is returned. Otherwise, `FALSE` is returned.

## Description

Checks whether or not 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.

### Similar Functions

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.

### Actual Values Due to the Environment or Build

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 `OS_IsRunOnEmulator``
--- | --- | --- | ---
Actual DS unit | DEBUG RELEASE FINALROM | FALSE | FALSE
Actual TWL unit | DEBUG RELEASE FINALROM | FALSE | FALSE
IS-NITRO-DEBUGGER | DEBUG RELEASE | TRUE | FALSE
FINALROM | FALSE | FALSE
ENSATA EMULATOR | DEBUG RELEASE | FALSE | TRUE
FINALROM | FALSE | FALSE
IS-TWL-DEBUGGER (For standard development: ARM9) | DEBUG RELEASE | TRUE | FALSE
FINALROM | FALSE | FALSE
IS-TWL-DEBUGGER (For component development ARM9 + ARM7) | DEBUG RELEASE | TRUE | FALSE
FINALROM | FALSE | FALSE
For TWL Mode
Operating Environment | Build | Value of `OS_IsRunOnDebugger` | Value of `OS_IsRunOnEmulator`
Actual TWL unit | DEBUG RELEASE FINALROM | FALSE | FALSE
IS-TWL-DEBUGGER (For standard development: ARM9) | DEBUG RELEASE | TRUE | FALSE
FINALROM | FALSE | FALSE
IS-TWL-DEBUGGER (For component development ARM9 + ARM7) | DEBUG RELEASE | TRUE | FALSE
FINALROM | FALSE | FALSE

## Internal Operation

Makes a decision based on the the logical sum of the return value of the `OS_GetConsoleType` function and the `OS_CONSOLE_ENSATA` bit.

## See Also

`OS_Printf`
`OS_IsRunOnDebugger`
`OS_GetConsoleType`

## Revision History

2008/04/15 Added a table.
2007/11/05 Changed descriptions.
2004/02/19 Initial version.

CONFIDENTIAL