# Files and locations

## Contents

- Overview
- Emulator in C++ SDK
- Alternative Emulator location
- Location of executable programs
- Application files

## Overview

The Emulator maps the EPOC file system onto the PC’s file system. This drive mapping is performed at run-time. It enables applications to use EPOC file system drives without interfering with PC’s drives in unpredictable ways. EPOC always requires at least two drives: `z:`, which in target machines maps to the ROM, and `c:`, a RAM drive.

To allow for the differing requirements of different products containing the Emulator, the default locations for the virtual drives vary depending on where the Emulator itself is installed. This section describes the different cases.

You can also add further virtual drives, and reconfigure the standard drives to map to alternative locations. This is described in Virtual drives .

## Emulator in C++ SDK

When the Emulator is used with the C++ SDK, it must be located in the following directories:

- release build: `\epoc32\release\wins\rel\`
- debug build: `\epoc32\release\wins\deb\`

When this is the case, the EPOC drives `z:` and `c:` are mapped by default to sub-directories of the `\epoc32\` tree, as follows:

`c:` | `\epoc32\wins\c\`
`z:` | `\epoc32\release\wins\`build`\z\`

Therefore, an EIKON application program such as `z:\system\apps\ikhello\ikhello.app` is mapped by the narrow debug build to `\epoc32\release\wins\deb\z\system\apps\ikhello\ikhello.app`.

Configuration files for the Emulator are located in `\epoc32\data\`.

## Alternative Emulator location

In some products, the Emulator can be run in another location than `\epoc32\release\wins\`build`\`. In this case, the Emulator looks by default for the following sub-directories below its own location:

Name | Description
`c` | virtual `c:` drive
`z` | virtual `z:` drive
`data` | Emulator configuration files

## Location of executable programs

An exception is made to the standard drive name mapping for non-EIKON executables (`exe` and `dll` files):

- `exe` files can be anywhere on the PC file system: for example, you could even run an `exe` from a shared drive on another user’s PC
- `dll` files required by other executables are usually build to the parent directory of the virtual `z: drive` (e.g. `\epoc32\release\wins\deb`\ if `z:` is `\epoc32\release\wins\deb`\`z\`)

The usual approach is to build both `exe` and `dll` files to the `z:` parent directory.

Note that EIKON application programs, however, must be in their standard locations in the `z:\system\apps\` directory tree, in order to appear on the Extras bar.

This usual configuration is determined by the way that the Emulator locates a library file that is to be loaded. In detail, this is as follows:

- if the filename includes a drive, the filename is mapped using the appropriate virtual drive mapping
- if the filename is specified without a drive letter, then the virtual `z:` parent directory is searched
- if the library is not found, an attempt is made to find the library in the same way as on a target machine: i.e. virtual drives `y:` to `a:`, then `z:\system\libs\`, are searched.

## Application files

Application data files can be copied from an EPOC machine, using EPOC Connect, onto an Emulator virtual drive, and opened from within the Emulator.