Device Emulator Configuration XML Schema Reference

Device Emulator Configuration (.decfg) files are XML files that contain settings that determine how the device emulator starts. You can configure settings such as operating system image, skins, LCD screen resolution, and networking in a .decfg file. For general information, see Device Emulator Configuration Files. Use the following example as a reference for authoring .decfg files.

Code

<?xml version="1.0"?>
<DeviceEmulator xmlns="http://schemas.microsoft.com/DeviceEmulator/2006/01/DeCfg">
  <Platform>My Plaform</Platform>
  <Emulator>
    <Language Reconfigurable="false">1033</Language>
    <AlwaysOnTop Reconfigurable="true">true</AlwaysOnTop>
    <ConsoleWindow Reconfigurable="false">true</ConsoleWindow>
    <HostKey Reconfigurable="true">Left-Alt</HostKey>
    <Rotation Reconfigurable="true">270</Rotation>
    <VMID Reconfigurable="false">{B89C49AD-197F-4CB4-A525-D81D0944EEAF}</VMID>
    <VMName Reconfigurable="true">My Custom Emulator</VMName>
    <!--<SaveState Reconfigurable="false">c:\1.dess</SaveState>-->
    <DefaultSave Reconfigurable="false">true</DefaultSave>
    <Zoom Reconfigurable="true">true</Zoom>
    <Video Reconfigurable="false" Width="640" Height="480" BitsPerPixel="16"/>
    <FuncKey Reconfigurable="true">193</FuncKey>
    <!--<Skin Reconfigurable="true" EnableSkin="true" ToolTips="on">c:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\Deviceemulation\Pocket_pc\Pocket_PC.xml</Skin>-->
  </Emulator>
  <Board>
    <OSImage Reconfigurable="false" Address="0">d:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\Deviceemulation\0409\PPC_USA.BIN</OSImage>
    <Flash Reconfigurable="false" Enabled="true">c:\Flashfile</Flash>
    <MemSize Reconfigurable="false">256</MemSize>
    <CpuCore Reconfigurable="false">ARMv5</CpuCore>
    <CpuOptions Reconfigurable="false">TDI</CpuOptions>
    <VFP Reconfigurable="false">true</VFP>
  </Board>
  <Peripherals>
    <Battery Reconfigurable="true" IsOnAcPower="false" Charge="40"/>
    <SharedFolder Reconfigurable="true">c:\</SharedFolder>
    <CS8900_Networking Reconfigurable="false" Enabled="true">00001A1A190B</CS8900_Networking>
    <NE2000_Networking Reconfigurable="true" Enable="true">00001A1A190B</NE2000_Networking>
    <HostOnly Reconfigurable="true">true</HostOnly>
    <Speakerphone Reconfigurable="true" CarKit="true" Headset="true" Speakerphone="true"/>
    <SerialPort Reconfigurable="true" UARTNumber="0">COM3</SerialPort>
    <SerialPort Reconfigurable="true" UARTNumber="1">none</SerialPort>
    <SerialPort Reconfigurable="true" UARTNumber="2">none</SerialPort>
  </Peripherals>
</DeviceEmulator>

Remarks

The following table describes each element in the previous code example.

Item

Description

<DeviceEmulator> tag

Encapsulates the schema for a device emulator configuration. Use only one tag in each .decfg file. Contains the following tags:

  • Platform

  • Emulator

  • Board

  • Peripherals

<Platform>My Plaform</Platform>

Contains the name of the platform. Use only one <Platform> tag per <DeviceEmulator> tag. Emulators that are visible from the Device Emulator Manager are organized by value in the platform tag.

<Emulator> tag

Contains the following tags:

  • Language

  • AlwaysOnTop

  • ConsoleWindow

  • HostKey

  • Rotation

  • VMID

  • VMName

  • SaveState

  • DefaultSave

  • Zoom

  • Video

  • FuncKey

  • Skin

<Language Reconfigurable="false">1033</Language>

Specifies the user interface (UI) language, where the value is a four-digit decimal. For example, 1033 represents English, United States.

<AlwaysOnTop Reconfigurable="true">true</AlwaysOnTop>

Keeps the emulator window always on top, even when it does not have focus. Can be either true or false. Defaults to false.

<ConsoleWindow Reconfigurable="false">true</ConsoleWindow>

Creates and displays a console window to show output from the Windows CE debug serial port, where keystrokes typed by the user are transmitted. This technique is useful for watching debug output and downloading kernel images from Platform Builder. Can be either true or false. Defaults to false.

<HostKey Reconfigurable="true">Left-Alt</HostKey>

Specifies the host key, where case-insensitive value can be None, Left-Alt, or Right-Alt.

<Rotation Reconfigurable="true">270</Rotation>

Rotates the display clockwise by degrees, where angle value can be 0, 90, 180, or 270. Other integer values are acceptable but are rounded down to the nearest 90.

<VMID Reconfigurable="false">{B89C49AD-197F-4CB4-A525-D81D0944EEAF}</VMID>

Specifies the VMID GUID to associate with the current instance of the emulator.

<VMName Reconfigurable="true">My Custom Emulator</VMName>

Specifies the window title. If this tag is not present, the window is either named by the skin tag or given the default name, Device Emulator.

<!--<SaveState Reconfigurable="false">c:\1.dess</SaveState>-->

Enables save-state support, where value is the name of the save-state file. A .decfg file must specify either the SaveState or OSImage tag. Note the following idiosyncrasies of the SaveState tag:

  • If the SaveState tag is not present and the OSImage tag is present, the emulator cold-boots from the value of the OSimage and save-state is disabled.

  • If the SaveState tag and OSImage tag are present, the emulator cold-boots from the value of the OSimage tag, enables save-state when it exits, and saves state to the specified file name.

  • If the SaveState tag is present but the OSImage tag is not present, the emulator restores from the specified save-state file. When the emulator exits, it overwrites the saved-state file by saving the new state.

    Note

    In this example, the SaveState tag is commented out because a .decfg file cannot specify both the SaveStateand the defaultsavetags.

<DefaultSave Reconfigurable="false">true</DefaultSave>

When the value is true, device emulator uses the VMID as the name of the saved-state file and puts the saved state file in the per user directory. Can be either true or false.

Note

You cannot specify both the SaveStatetag and the defaultsavetag in the same .decfg file.

<Zoom Reconfigurable="true">true</Zoom>

Zooms the display (both skin and LCD window) to 2x normal size. Can be either true or false.

<Video Reconfigurable="false" Width="640" Height="480" BitsPerPixel="16"/>

Specifies screen size and bit-depth of the LCD window, where the width, height, and BitsPerPixel attributes are integers.

Note

You cannot specify both Skin and Video tags in the same .decfg file.

<FuncKey Reconfigurable="true">193</FuncKey>

This is a special tag that usually has a value of 193. A value of 193 maps the keyboard function keys (F1, F2, and so on) to the soft keys of a device emulator).

<!--<Skin Reconfigurable="true" EnableSkin="true" ToolTips="on">c:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\Deviceemulation\Pocket_pc\Pocket_PC.xml</Skin>-->

Loads the specified skin file.

Note

In this example, the Skin tag is commented out because a .decfg file cannot specify both the Skin and the Video tags.

<Board> tag

Contains the following tags:

  • OSImage

  • Flash

  • MemSize

  • CpuCore

  • CpuOptions

  • VFP

<OSImage Reconfigurable="false" Address="0">d:\Program Files\Windows Mobile 5.0 SDK R2\PocketPC\Deviceemulation\0409\PPC_USA.BIN</OSImage>

Specifies the path and file name (*.bin or *.nb0) of the OSimage that the emulator uses. This tag is required unless the SaveState tag is present.

<Flash Reconfigurable="false" Enabled="true">c:\flash.txt</Flash>

Enables flash-memory emulation, where the value specifies the name of the file to use as flash memory storage.

<MemSize Reconfigurable="false">256</MemSize>

Sets emulated RAM size, where the value is in megabytes. Valid values are 64 through 256 inclusive. If a valid value is not specified, RAM size defaults to 64.

<CpuCore Reconfigurable="false">ARMv5</CpuCore>

Specifies the CPU architecture to emulate. Can be ARMv4 or ARMv5. Defaults to ARMv4.

<CpuOptions Reconfigurable="false">TDI</CpuOptions>

Specifies a combination of (T)humb, (D)ebug, (I)nternetworking, (M)Long Multiply, (e)DSP. Of these, T, D, and I will always be set.

<VFP Reconfigurable="false">true</VFP>

Specifies the presence of the Vector Floating Point coprocessor. Can be either true or false. Defaults to false.

<Peripherals> tag

Contains the following tags:

  • Battery

  • SharedFolder

  • CS8900_Networking

  • NE2000_Networking

  • HostOnly

  • Speakerphone

  • SerialPort

<Battery Reconfigurable="true" IsOnAcPower="false" Charge="40"/>

Specifies battery power and charge. The IsOnAcPower attribute specifies whether the emulator is running on battery or AC power. If on battery power, the charge attribute specifies the charge as a percentage. Defaults to AC power.

<SharedFolder Reconfigurable="true">c:\</SharedFolder>

Mounts a directory as a shared folder, where the value is a Windows directory. The directory is mounted as if it were a storage card.

<CS8900_Networking Reconfigurable="false" Enabled="true">00001A1A190B</CS8900_Networking>

Enables CS8900 network adapter, where the optional value is a twelve-digit hexadecimal MAC address specifying a host adapter on the desktop computer to bind to.

<NE2000_Networking Reconfigurable="true" Enable="true">00001A1A190B</NE2000_Networking>

Enables NE2000 PCMCIA network adapter, where the optional is a twelve-digit hexadecimal MAC address specifying a host adapter on the desktop computer to bind to.

<HostOnly Reconfigurable="true">true</HostOnly>

Sets host-only routing for network packets. Affects both CS8900 and NE2000 cards. Can be either true or false. Defaults to false.

<Speakerphone Reconfigurable="true" CarKit="true" Headset="true" Speakerphone="true"/>

  • Specifies the presence of speakerphone, headset, and/or car kit.

<SerialPort Reconfigurable="true" UARTNumber="0">COM3</SerialPort>

<SerialPort Reconfigurable="true" UARTNumber="1">COM2</SerialPort>

<SerialPort Reconfigurable="true" UARTNumber="2">none</SerialPort>

Maps the emulator serial port to Windows COM port. The UARTNumber attribute indicates the port number 0-2 on the emulator. The value specifies the COM port on the desktop computer. This tag can be used up to three times in a .decfg file; one for each of the three serial ports on the emulator.

Reconfigurable="true"

Indicates that the feature associated with this tag is reconfigurable as long as the device emulator is running. The feature can be reconfigured without exiting and restarting the emulator. The following tags are reconfigurable:

  • AlwaysOnTop

  • HostKey

  • Rotation

  • VMName

  • Zoom

  • FuncKey

  • Skin

  • Battery

  • SharedFolder

  • NE2000_Networking

  • HostOnly

  • Speakerphone

  • Serialport

Reconfigurable="false"

Indicates that the feature associated with this tag cannot be reconfigured as long as the device emulator is running. The feature must be specified during emulator start. The following tags are not reconfigurable:

  • Language

  • ConsoleWindow

  • VMID

  • SaveState

  • DefaultSave

  • Video

  • OSImage

  • Flash

  • MemSize

  • CpuCore

  • CpuOptions

  • VFP

  • CS8900_Networking

See Also

Concepts

Device Emulator Configuration Files

Device Emulator Manager

Reference

Device Emulator Command-Line Reference