Basic4PPC and Windows Mobile Emulator

IoSonoPiero

Active Member
Licensed User
Longtime User
During the development of your project, you can try directly from Basic4PPC IDE (hitting the F5 key or pressing the Run icon in toolbar) if your application is working good.
But at a certain stage, you need to try your code on a Device. To do this, you need a Device ;), then!

But... if you plan to develop your application for a VGA device and you have a QVGA one?
You can buy a new device or you can always compile your exe with "Device (Auto scale)" option, but sometimes it's better to try your creation on a VGA device.
Another example: if you need different type of Devices, with different screen resolution or different OS, and you can't efford them, what you have to do?

You must use an Emulator.

In this tutorial, I'll show you what to do.

To begin, simply open your Firefox (or Opera, or Safari, or Exploder), and in the address bar, go to Google (or to another search engine).

Then, search for "Windows Mobile 6.5 Developer Tool Kit" string.
One of the first results, will be this address located on Microsoft servers.

tutorial_01.jpg



On that page, you'll find localized versions of Windows Mobile 6.5 Professional Developer Tool Kit and Windows Mobile 6.5 Standard Developer Tool Kit.


tutorial_02.jpg


Yo can download a localized version of emulator.
Actually, these are the locale supported:

0804 CHS Chinese Simplified
0409 USA English
0407 GER German
040c FRA French
0410 ITA Italian
0c0a ESN Spanish
0411 JPN Japanese
I'll download, for example, the Windows Mobile 6.5 Professional Developer Tool Kit, USA version (225 MB).
Please consider to use a download manager to download faster the files.

Once downloaded the file, simply double-click on it and click Next

tutorial_03.jpg


and then Accept.

Note: If the install fails with "Setup Wizard ended prematurely" message, install the Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) and restart the Windows Mobile 6.5 Developer Tool Kit package install.

Click on Next, then on Next again, select the path where to install emulators (or leave the default one), click Next.

tutorial_03a.jpg


Click on Install and the installation will start.

tutorial_04.jpg


After few minutes, the installation will finish, with this screen:

tutorial_05.jpg


Click on Finish.

In your Programs, you'll find "Windows Mobile 6 SDK" group folder.
You can choose "Standalone Emulator Images" -> language of emulator (for me "US English") -> and then the emulator you want to run.
I'll choose "WM 6.5 Professional".

The first run is a bit slow, because the emulator ... emulates a first start of the device.

tutorial_05a.jpg


then, finally:

tutorial_06.jpg


While the device emulator starts, you can prepare the folder that will be the Storage Device for the emulator.

Somewhere on your disk, for example on Desktop, create a folder named "WM_Shared", then in the Emulator window choose "File" -> "Configure".

tutorial_07.jpg


In the first tab, "General", at the bottom click on the "..." button and browse to the folder you just created on Desktop.

tutorial_07a.jpg


Then click Ok.

Now, you can use the Emulator like a real device.

From Basic4PPC, simply compile the exe from your project (Alt+1) and choose as destination folder the "WM_Shared" created on the Desktop and click on Save.

tutorial_08.jpg


On the Emulator, go to File Explorer and browse to "Storage Card".

tutorial_09.jpg


Here you'll find your just compiled exe, as shown:

tutorial_09a.jpg


Click once on it and you'll execute your application:

tutorial_10.jpg



tutorial_11.jpg


Obviously you can create CAB files and test it on your new device!

You can connect and sync the emulator with ActiveSync (for Windows XP or earlier) or Windows Mobile Device Center (for Vista).
To accomplish this, simply run from your Programs -> "Windows Mobile 6 SDK" -> "Tools" -> "Device Emulator Manager"

tutorial_12.jpg


If you are running the emulator and you cannot find any running session, click on Refresh.

Then, right-click on the active connection and choose "Cradle" or from "Actions" menu, choose "Cradle".

tutorial_13.jpg


After few seconds, the ActiveSync or Windows Mobile Device Center, will connect with your emulator.

tutorial_14.jpg


Note:
If ActiveSync don't see the emulator, please assure that you choose DMA setting from "ActiveSync" -> "Connection Settings"
If Windows Mobile Device Center don't see the emulator, please assure that you choose DMA setting from "Mobile Device Settings" -> "Connection Settings"

Note:
It's a good choise to check "Allow data connections on device when connected to PC" in ActiveSync or Windows Mobile Device Center.

Now, let's connect Windows Mobile Emulator and Cellular Emulator!

Thanks to:
derez, Erel

TutorialsEnjoy, ghale
 
Last edited:

derez

Expert
Licensed User
Longtime User
Thank you ghale for this tutorial, although I use emulators for a while - I did learn something.

I want to add that you can connect the emulator to the desktop via Activesync just like a real device.
you do that by selecting: windows mobile SDK --> tools --> Device emulator manager. Do Refresh and when the device appears in the window - select : Action --> "Cradle" and wait for the connection.
 
Last edited:

IoSonoPiero

Active Member
Licensed User
Longtime User
Thank you ghale for this tutorial, although I use emulators for a while - I did learn something.

I want to add that you can connect the emulator to the desktop via Activesync just like a real device.
you do that by selecting: windows mobile SDK --> tools --> Device emulator manager. When the device appears in the window - select "Cradle" and wait for the connection.

Yes, derez, you anticipated me.
I was preparing the update for this thread.
I'll put online soon the actions to connect to Activesync (XP) or Syhcronization Center (Vista).

Thanks!
 

RiskFour

Member
Licensed User
Longtime User
Hi ghale,

thanks for the nice work...
 

IoSonoPiero

Active Member
Licensed User
Longtime User
:)

I'm preparing two other tutorials about emulators, I'll create two distinct thread for them, but I'll "link" all three thread togeter.
 

mjcoon

Well-Known Member
Licensed User
Hi ghale and thanks for a very useful tutorial. I have been using the WM5.0 emulator successfully for a while now.

But I would like to try with different screen sizes though the emulator comes with only the basic displayWidth="240" displayHeight="320".

I don't think that you have mentioned getting other screen sizes; could you extend the tutorial to cover this?

Cheers, Mike.
 

mjcoon

Well-Known Member
Licensed User
The device emulator manager should list several devices including a QVGA, Square and VGA devices.

But it most definitely does not! In fact it seems the only things it can list at start-up are the saved images that I have made myself when running the emulator. The "Available Emulators" window just shows "Others" and really seems to list the emulator instances that are running, not the configurations that I might choose.

But as I said I am running the WM5.0 emulator and the Emulator Manager says it is version 8.0.50727.42.

If I have to download WM6.n to get a choice of devices (per ghale's actual instructions) then I might do that, but it's not trivial! I didn't want to try without someone saying that's why I get the limitation.

Mike.
 

mjcoon

Well-Known Member
Licensed User
You should download a WM6.1 or 6.5 emulator. It will include several screen sizes.

Thanks Erel, I've done that and tried out my Music Player (autoscale compiled) with a VGA emulator screen successfully...

Cheers, Mike.
 
Top