LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


Making the Palm/Linux Connection
Pages: 1, 2, 3

The PalmOS Emulator (POSE)

Palm simulation screen shot

Using a downloaded ROM image, a fully simulated Palm OS environment is available.

It's possible to completely simulate a Palm Pilot under Linux, using a GPLed program called the PalmOS Emulator, or POSE for short. POSE, supplied and actively supported by Palm Computing, was forked from XCopilot, a community project which was itself forked from the Amiga emulator UAE. Available in binary forms for Windows or Mac, or source code form for Unix, POSE provides a complete emulation of the various Palm Pilot hardware versions.



POSE uses the "Fast Light Tool Kit (fltk)", which is not commonly distributed with Linux. It is available from the (URL:fltk home page) and is quite simple to build. Be sure to install this first (or make sure you have it) before trying to build POSE, or it simply won't work.

To use POSE, download the Unix version and unpack in a temporary directory on a partition with at least 30 megabytes of free space. It will create a subdirectory starting with "Emulator_Src_". Change into this directory, and you'll see there are several subdirectories. The most important is "Docs", within which it is advisable to spend some time reading the excellent documentation.

The actual building of POSE takes place from within the "BuildUnix" directory. The usual ./configure will create a Makefile appropriate for the host environment. Providing there are no missing libraries or other errors, running make will, after a rather long time, build POSE and several support programs. make install as root will place the "pose" executable in the /usr/local/bin directory for general use.

It's important to note that POSE only simulates the Palm Pilot hardware, but doesn't include any of the PalmOS code. For this, a ROM image is required. These can be downloaded from a real Palm device using a Palm application called "ROM Transfer," included in the POSE package. Don't use the ROM transfer programs included with pilot-link on newer Palms, as the programs don't understand the larger ROM sizes. Alternatively, if you sign up as a Palm developer (no cost), you can download ROM images from the Palm Computing web site. Details are available here.

To download an image from your own Palm, first upload the "ROM Transfer.prc" application from the ROMTransfer/Source directory to your Palm, and then launch POSE. Right-mouse-button brings up a menu; select "File -> Transfer ROM...", or press Alt-D. A window will pop up with instructions. Follow these, and a few minutes later you'll have a ROM image on your hard drive. Developers often have several different ROM images available to test with.

Once a ROM image is ready, select "File -> New" from the menu, or press Alt-N, and you'll be able to select the Device type, the Skin, how much RAM is on the machine, and the ROM file to use. Using unmatched ROM to Device types can be unpredictable, so try to only use appropriate settings. Using a IIIe's ROM under the IIIc hardware doesn't work, for example.

Once you press "OK," and providing you've given a legal ROM image, the emulated Palm should boot up as if a real Palm had just been turned on for the first time. You can upload applications and databases from the menu, but you need to reset the device after uploading before they're seen.

POSE is a very useful tool, for both Palm developers as well as end users. If an application breaks the rules while running under POSE, the emulation is halted and an informative message is posted as to what went wrong. The user then has the option of continuing with the applications, or exiting. POSE also has something called "Gremlins," 1000 of them to be exact, which abuses applications in reproducible ways to try to break them.

The use for developers is obvious, but for end users who can't figure out why their Palm is acting strange, often only a few minutes with their regular applications within POSE will show which if any are misbehaving. Of course, in an ideal world, the end user would never have to do this, but reality being what it is, it's sometimes very handy.

Like pilot-link, all the abilities of POSE are beyond the scope of this article. The documentation included with POSE is of extremely high quality, although the best is only included in .pdf format.

Time to play

We've discussed a number of fun things to do while making the Palm/Linux connection. Now it's time to try them out for yourself. If you discover additional tips and tricks, send them to me, and we might just include them in our next Palm article.

Chris Halsall is the Managing Director of Ideas 4 Lease (Barbados). Chris is a specialist... at automating information gathering and presentation systems.


Discuss this article in the O'Reilly Network Linux Forum.

Return to the Linux DevCenter.

 




Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!


Linux Resources
  • Linux Online
  • The Linux FAQ
  • linux.java.net
  • Linux Kernel Archives
  • Kernel Traffic
  • DistroWatch.com


  • Sponsored by: