03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Each Symbian OS .exe built for the emulator includes a stub file, eexe.obj. This file<br />

includes code to start up the emulated Symbian OS kernel and file server, and then call your<br />

E32Main() function. So, in fact Windows starts by calling eexe.obj, and your code is<br />

called by eexe.obj.<br />

As part of kernel startup, the emulator reads an initialization file and a fascia bitmap from its<br />

configuration directory. By default, the configuration directory is \epoc32\data\, the<br />

initialization file is epoc.ini, and the fascia bitmap is epoc.bmp.<br />

epoc.exe uses exactly the same eexe.obj as any .exe you build yourself. In fact, the<br />

source code for epoc.exe contains only a single line in its E32Main(), which starts the<br />

Symbian OS window server. The window server in turn starts the servers it needs (such as<br />

the font and bitmap server) and then reads its initialization data from the emulated<br />

z:\system\data\wsini.ini. In the case of UIQ, this.ini file contains instructions to the<br />

window server to start Qstart (\system\programs\qstart.dll). Amongst the things that<br />

QStart launches are the application picker (which shows the application icons at the top of<br />

the screen) and the application launcher.<br />

That startup sequence begs two questions:<br />

� What are the contents of the emulator's .ini file?<br />

� What command-line arguments can I specify to override this?<br />

Emulator Startup Parameter<br />

You can control the emulator startup by parameters in epoc.ini (in \epoc32\data\).<br />

Here's an excerpt of the epoc.ini as supplied on the UIQ C++ SDK:<br />

ScreenWidth 208<br />

ScreenHeight 320<br />

PhysicalScreenWidth 3328<br />

PhysicalScreenHeight 5120<br />

ScreenOffsetX 38<br />

ScreenOffsetY 92<br />

LedOffsetX 0<br />

LedOffsetY 0<br />

LedSize 7<br />

LedGap 5<br />

LedArrangeHorizontally<br />

# could be decreased to reflect the amount of memory available<br />

# on actual hardware<br />

MegabytesOfFreeMemory 16<br />

This specifies the screen size, the offset of the screen area from the top left of the fascia<br />

bitmap, and its position. It also specifies the position and size of the two emulated LEDs. The<br />

amount of memory available on the real phone is set in megabytes. The supplied epoc.ini<br />

then goes on to define names and positions for the clickable virtual keys on the fascia<br />

bitmap and keyboard mappings (not shown here). If you want to emulate a different size of

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!