|
||
While the H4 development board now provides support for MultiMediaCard development and testing, the emulator can be set up so that it behaves as if a MultiMediaCard (MMC) is present. This can be used to do some basic tests to see how an application behaves when reading data from the card and writing data to the card, or when the card is removed and/or swapped. Specifically, it allows you to check that data stored on a card is not lost or corrupted during MMC drive events and that card locking and password notification work correctly.
It is possible to emulate a user opening and closing the MMC drive door, replacing and removing the MMC card.
MMC emulation does not involve access to any kind of MultiMediaCard
hardware interface. Instead, the memory area of each emulated card is
represented by a file, a .bin
type file in the Windows system temp
directory.
Emulated MultiMediaCard drives are defined by the emulator-specific
(Wins) versions of estart.exe
and estart.txt
.
By default, the generic Symbian emulator is set up so that an MMC drive
1 is mapped to drive letter X:
. While the emulator is running, key
stroke combinations using F5
and F4
will trigger MMC drive events, and emulate MMC card swapping/removing.
This emulates a single stack containing two separate cards, the first
in slot 0, and the second in slot 1. Each emulated card has an associated
.bin
file on the host machine. As the emulator only supports the
swapping of cards in slot 0, there are two .bin
files, one for
each of the two emulated MMC cards in slot 0. There is no support for card
swapping on slot 1 and this has only one .bin
file.
For the purpose of testing, we are interested in drive 1, the emulated MMC drive. See how to control the emulated MMC cards on drive 1.
The drive mappings for an MMC drive are defined by the
emulator-specific (Wins) versions of estart.exe
and
estart.txt
. However, the following keywords, which can be defined
in epoc.ini
affect the emulated MMC drive.
For more information on ESTART, see Background information: ESTART.
Item |
Brief description |
Required? |
To set a password for the MMC drive, set this environment variable with the password for the specified slot number <SocketNum> and the card number <cardNum>. For example, to set password for the slot number 0 and the card number 0, follow the steps outlined below:
After creating the environment variable, open a command prompt window, type set and press the ENTER key to view all the environment variables. If you can't find the environment variable you created, follow the steps outlined above and create it again. You may also create this variable using the set command. For example, the following command sets the password for slot number 1 and card number 1:
Note: It is recommended not to use this approach to create the environment variables, as the variables are valid only for that particular command prompt session. |
No |
|
Maps a real key on the PC keyboard to a Symbian OS key code.
The For example:
Sets "LEFT ALT" + "N" to "F4" and "LEFT ALT" + "M" to "F5" respectively. Therefore "LEFT ALT" + "M" will emulate a media change event (normally F5). |
No |
|
Defines the size of the emulated MultiMediaCard drive. The default value is 1Mb, if no value is explicitly specified. |
|
Note that these items are case-insensitive.
MMC drive 1 events are triggered in the emulator by pressing the
F5
key in conjunction with the F4
key. The following table shows the various combinations of keystrokes and the
associated MMC events.
Key press |
Effect on cards emulated on socket 0 (drive 1) |
Press and Hold |
This emulates the opening of the MMC card door and the removal of
the MMC card. The door stays open while the |
Release |
This emulates the closing of the MMC card door, with the original
MMC card returned (unless |
Press and Hold |
This toggles between the two emulated MMC cards and no card.
Hitting
Note that |
There are some limitations to emulating the MMC controller:
When you configure ...\epoc32\data\epoc.ini
for the
first time for an emulator (WINS) build, the emulated cards are initially
unformatted. They must be formatted (within the emulator, possibly using the
file manager application) before writing files to them.
Each emulated card is stored in a file with the name
mmccrdXX.bin
. The files are stored in
...\epoc\data\media\...
.