1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines
EricGiguere.com > Books > Palm Database Programming > Chapter 3
Printer-friendly version Set your preferences
Read my blogs on AdSense and affiliate marketing
 
 
  
Learn about these ads

Palm Database Programming — The Electronic Version

Chapter 3: Development Tools and Software Development Kits

This material was published in 1999. See the free Palm OS Programming online course I developed for CodeWarriorU for some updated material.

Prev Chapter | Prev Section | Next Section | Contents

The Palm Operating System Emulator

Apart from your compiler, the Palm OS Emulator (usually referred to as POSE) is arguably the most useful tool in your programming arsenal. It lets you test and debug your applications on your desktop computer without having to install them on a Palm device, which is very useful when you only have one device on which you'd rather not install alpha-quality software. It's also faster than continually downloading applications to the device.

A version of POSE ships with CodeWarrior and is also included separately on the CD-ROM that accompanies this book, but check the Palm Computing Web site for the most recent version. At the time this book was written, version 2.0b3 is the latest official release, and version 2.1d26 is the latest stable release. Both versions are on the CD-ROM. You should use version 2.1d26 if possible, as it supports more features and has a number of fixes for bugs in 2.0b3.

History

Before the Emulator arrived, the only way to test a Palm application on a desktop computer was to link the source with the Simulator, a set of Macintosh-based libraries that simulated a Palm OS programming environment. The Simulator was far from perfect and only ran on the Macintosh.

Greg Hewgill wrote a Palm emulator called Copilot. Copilot was based on an existing emulator, the Unix Amiga Emulator (UAE), which allowed you to run Amiga software in a Unix environment. Both the Amiga and the Palm use the Motorola 68000 series chip as their central processing units, so the core of UAE could be used with some modifications to emulate a Palm device.

Copilot was so successful and useful that Palm Computing contacted the principal developers involved in its creation and took over development of the emulator for the Windows and Macintosh platforms. The renamed emulator is downloadable from the Palm Computing Web site. The original Copilot still exists and has been ported to other platforms such as Linux and OS/2.

Using the Emulator

POSE emulates a complete Palm Computing platform device. To do this it requires the Palm OS ROM image. The ROM image does not ship with POSE, nor is it found on the CD-ROM that accompanies this book. Instead, you must use a ROM transfer application to transfer the image from a Palm device onto your desktop computer. You can in fact download multiple images from different devices, so that you can use POSE to test your applications against different versions of the operating system. If you're serious about using POSE, you should also obtain the debug versions of the ROM images from Palm Computing. The debug versions perform extra sanity checking and inform you of potential problems that might cause you grief with future versions of the operating system. Information on how to obtain these images can be found on the Palm Computing Web site at www.palm.com/devzone/pose/pose.html.

Once you've transferred the ROM image, POSE looks and behaves like a real Palm device, as shown in Figure 3.21. You use the mouse to simulate pen strokes. This is more cumbersome than using a pen, so the desktop computer's keyboard can be used to enter characters directly instead of using Graffiti.

Figure 3.21 The Palm OS Emulator in action.

POSE has its own set of menus (under Windows, POSE does not have a menubar, so the menus are invoked with a right click on the POSE window) that allow you to reset the operating system, configure POSE (to locate the ROM image file and control how much RAM is installed on the "device"), load applications into the Emulator, perform HotSyncs (you'll need a null modem cable; see the POSE instructions), download ROM images, and run some random user interface tests. The user interface tests are referred to as Gremlins and are a good way to ensure your applications don't crash upon encountering unexpected user input.

To load an application, make sure that the Launcher application (the one that lists all installed applications) isn't active by launching one of the standard applications such as the Memo Pad. This avoids a bug where the Launcher doesn't refresh itself properly when an application is installed or updated. Then select the "Load app" menu item to load the desired application. Return to the Launcher and tap on the application's icon to start it, just like you would on a real device.

If at some point your application crashes, POSE will offer you the opportunity to debug it or reset the device. With version 2.0b3, if the application crashes immediately when POSE is reset, you'll need to terminate POSE as you would any other misbehaving application (for example, by using the Task Manager under Windows NT). Before restarting POSE, delete any .RAM files from the POSE installation directory. This performs the equivalent of a hard reset. Version 2.1d26 users do not have to deal with this problem.

Prev Chapter | Prev Section | Next Section | Contents

Copyright ©1999 by Eric Giguere. All rights reserved. From Palm Database Programming: The Complete Developer's Guide. Reprinted here with permission from the publisher. Please see the copyright and disclaimer notices for more details.

If you find the material useful, consider buying one of my books, linking to this site from your own site or in your weblog, or sending me a note.

Google Web www.ericgiguere.com   
1-by-1 black pixel for creating lines
 
Copyright ©2003-2012 Eric Giguere | Send mail about this page | About this site | Privacy policy
Site design and programming by Eric Giguere | Hosting by KGB Internet Solutions
This site is Java-powered
Other sites: The Unofficial AdSense Blog | Google Suggest Explorer | Invisible Fence Guide | Synclastic
This page was last modified on November 23, 2003
1-by-1 black pixel for creating lines
1-by-1 black pixel for creating lines