Over a million developers have joined DZone.

Emulator configuration for Windows Phone - DECFG and parameters

DZone's Guide to

Emulator configuration for Windows Phone - DECFG and parameters

Free Resource

It is a common misconception to believe that the default Windows Phone emulator is not configurable. There might not be a single configuration interface, but the configuration itself is still there. The problem is - it is hidden in two different locations.

1. Emulator parameters

2. Board configuration files

The emulator parameters might seem quite obvious, but since a lot of developers launch the emulator itself from Visual Studio, they have no idea what's going on. With the NoDo and pre-NoDo, the number of parameters was quite high (you could configure the CPU). With Mango, we saw a dramatic drop in the number of parameters XDE supports:

If you've read my previous post about general emulator parameters, then you should already be familiar with the way those operates. In the image above, notice two important parameters - /language and /decfg. The language parameter defines the UI language and accepts a Locale ID (LCID) as a value for supported languages. You can read more about those here.

/decfg is where it gets interesting, because none of the WP7 developers I know used those. Board configuration files (*.decfg) are specific to the XDE itself. These files are nothing but XML configuration files with a different extension (not like you see this for the first time). These files are located here:

C:\Program Files (x86)\Microsoft XDE\1.0 (for 64-bit systems)

C:\Program Files\Microsoft XDE\1.0 (for 32-bit systems)

If you would open those files, you would see that there is a number of settings that can be customized for the emulator behavior:

<?xml version="1.0" encoding="utf-8"?>
<WindowsPhoneEmulator xmlns="http://schemas.microsoft.com/WindowsPhoneEmulator/2009/08/Configuration">
    <ConsoleWindow Reconfigurable="static" Type="bool">false</ConsoleWindow>
    <ZoomFactor Reconfigurable="dynamic" Type="dword">66</ZoomFactor>
      <X Reconfigurable="dynamic" Type="int">0</X>
      <Y Reconfigurable="dynamic" Type="int">0</Y>
        <EnableHWAssist Reconfigurable="static" Type="bool">true</EnableHWAssist>
            <GuestQPF Reconfigurable="static" Type="dword">10000000</GuestQPF>
          <GPUEnabled Type="bool">true</GPUEnabled>
          <Enabled Type="bool">true</Enabled>
        <VMNetEnabled Reconfigurable="static" Type="bool">false</VMNetEnabled>

The console window mentioned here is the debug tracker console that can be set to be always visible through the registry. If that is too much for you, it is easy to enable it for specific boards only.

The zoom factor setting is the default zoom that is set when the emulator launches. 66% has been the default value since the SDK release.

The displacement shows the relative position of the XDE windows on the PC screen. It is centered by default.

There are a couple more settings where you can set the FPS (no more 30 for me in the emulator - going 60 all the way). But this is not going to help much since the devics themselves are pretty restrictive.

As you probably have noticed by this point, there are two configured boards present - 0 and 1. Those are the boards IDs used by default and can also be passed as a parameter to XDE.


Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}