|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Tuesday, 19 June 2001||Author: Jeff Alami|
|Published to: develop_articles/Development Articles||Page: 1/1 - [Std View]|
OSDN Handheld Months: The PalmOS Emulator
Linux.com Develop section Editor Jeff Alami takes a look at the POSE PalmOS emulator on Linux.
There's something geeky about learning Linux just for the fun of it. There's something very geeky about getting on IRC and electronically chatting with a friend who happens to be in the same room at the time. But relatively few things fare so high on the "geekiness scale" as running POSE, the PalmOS Emulator, to emulate a PDA on your desktop computer, for no good reason.
To be honest, there are a few good reasons for using POSE, but in my case, I don't care what those reasons are. I just happen to be fascinated by the whole concept of emulation. POSE fits the bill, so here I am trying it out.
The Palm OS Emulator is just that, an emulator for the Palm Pilot. Basically, it emulates the hardware of the Palm handhelds on your desktop, and you can load the Palm OS and its applications on POSE. Palm, Inc. provides the software, which is available for Windows, MacOS, and Unix systems. It's actually based on Copilot -- if you've ever heard of xcopilot, that was one of the ports of POSE's predecessor.
Now, on to why one would use POSE, other than the geeky endeavours I tend to enjoy. Like all emulators, POSE is useful primarily for testing applications. A developer could work on their Palm SDK, develop and compile an application for the Palm OS, and test-drive it on POSE before sending it to a handheld. Why test-drive an application on an emulator? First, if the application calls specific hardware and addresses, testing it live on the handheld could possibly end up in disaster. Second, an emulator tends to provide the ability to send out debugging information as the applications run on it, which is true for POSE.
First off, you need a recent Linux install with glibc2 and the 2.x kernel, which has been provided by all distributions for more than a couple of years now. POSE depends on an X Window toolkit called FLTK, which you'll need to get too. By the way, for you free software types, you'll be happy to know that POSE is distributed under the GPL, and the underlying FLTK toolkit is distributed under the LGPL.
If you're using Debian, the easiest way to install it is to get on a root shell and type in:
# apt-get install pose
This will check the dependencies for POSE, install FLTK if you don't have it, then install POSE. Otherwise, if you're using Red Hat or another RPM-based distribution, you can find RPMs of both FLTK and POSE at the RPMFind network. There's always the option of having fun with the source and compiling it yourself -- download the FLTK sources and the POSE sources.
Once you're done the software installation phase, you'll need to get POSE to run a ROM image of a working Palm Pilot. At the POSE page on the Palm OS developer Web site, you can follow the instructions to join the Alliance Program and download from a selection of ROMs. Or, if you have a working Palm Pilot connected to your PC, then you can also extract the ROM from that.
Extracting a ROM from your Palm Pilot is trivial if you have pilot-link already installed and set up. The pilot-link package includes the pi-getrom command, which will automatically extract the ROM for you. All you need to do is type:
# pi-getrom /dev/pilot
Substitute /dev/pilot for the appropriate port (if you don't have the symbolic link for /dev/pilot set, you can use /dev/ttyS0, /dev/ttyS1, and so on). This will create a file that looks like "pilot.romX.X.X in your current directory. Now you have a ROM file and you're ready to go.
Now it's time to see what this emulator is all about. Start up POSE by typing "pose" in an xterm. You'll see a blank window that says "Right click on this window." Go ahead and click on File, then New. Put your newly-extracted ROM file under "ROM File" in the New Session window, choose the RAM size, and click OK. With that done, POSE does its magic and provides a virtual Palm Pilot for you to play with.
One thing you'll notice is that by default, the PalmOS Emulator screen looks like a Palm III. Of course, someone who probably uses Themes.org more than he should inserted themeability to the PalmOS Emulator. Just grab the skins package from the POSE Web site, and put all of it under a "Skins" directory in "/usr/share/pose" or "/usr/local/share/pose." Then choose the skin when you start a new POSE session.
If you're using POSE at work, chances are it's because you're a Palm OS developer. Quite a few Palm OS developers use CodeWarrior from Metrowerks. Otherwise, you can obtain cross-compilers and software development kits from the PalmOS Developer site. Check out the Resources below for links to more software and documentation to get started with PalmOS development.
Jeff Alami (email@example.com) is the section editor of the Develop section of Linux.com.