PHEM Logo

 

Perpendox Logo

  PHEM: Palm Hardware Emulator M68k
Quick Start Using PHEM Card Storage FAQs
Palm Basics Skins Handera & TRG Source Code

Skin Files

PHEM supports the "skin files" used by the Palm OS Emulator. These allow PHEM to mimic the appearance of many different Palm devices in great detail. Here are a few examples:

Original Palm Skin Palm m515 Skin Handspring Visor Skin

The "Built In" Skin

Built-In Skin

Technically, the default appearance of the emulated Palms is a skin that's 'built in'. This 'skin' is based on the original default POSE skin, but it's been modified to maximize the usable screen area. On any screen smaller than about five inches, there's not a lot of point to using any POSE skins - it makes the touchscreen of the emulated Palm too small to be practical.

On a tablet-size screen, though, a skin might be amusing.

(The Handera 330 is a special case. Since it uses a non-standard screen size - 240x320 instead of the normal 160x160 pixels - the normal built-in skin won't work. When PHEM starts up for the first time and creates its directories, it loads a special, PHEM-specific Handera 330 skin automatically. You can replace this skin with a more traditional skin if you like, though. See the PHEM Handera page for details.)

Where To Get Skins

There's a Linux package available online, but it's kind of a pain to extract the files you need. For convenience, I've made a zip file available here.

Where To Put Skins

On startup, PHEM will search all directories in its 'skins' directory. (Usually, this will be /mnt/sdcard/phem/skins'.) You can create sub-directories there; for example, the skin files you could download from Palm had sub-directories for different manufacturers - Palm itself, as well as TRG and Symbol. So long as the three component files (two images and the .skin file) are in the same directory, PHEM will find them.

How To Use Skins

That's it. Once the skins are in place, PHEM will use them automatically. If it can find a skin file that works for a particular device, it will use that skin in preference to the built-in one. To disable a skin, remove it from the 'skins' directory.

The Components Of A Skin

A skin consists of three files - two images and text file. The two images are the skin images themselves; one is 'normal' scale, and the other is a 'doubled' version that allows a better-resolution image. The text file ends in a ".skin" extension, and describes the image files, what devices the skin is intended for, and where the buttons are in the image. If you like, you can make your own skins...

How To Make A Skin

Let's make a custom skin. The built-in skin is intended to look like a real Palm; for the older ones, it even emulates the green/olive tinge that their LCDs had. But there's no reason we have to emulate 1990's-era LCD technology on our new AMOLED displays. Let's create a skin with higher screen contrast. As noted above, we'll need two image files, and a text configuration file. POSE, and thus PHEM, expects the skin images to be in JPEG format. I took the "built-in" skin images (which are in XPM format for easy compiling) and converted them to JPEG format.

So long as you respect some image size limits, you can generate a wide variety of skins. Here's a guy who generated a Japanese skin for PHEM. The key limits are on the "Touchscreen" and the "LCD". The LCD is where the graphics are actually displayed, and that must be 160 pixels by 160 pixels. The "Touchscreen" includes both the LCD area and the Graffiti area, and it must be 160x220 pixels. You can put anything you like around that core screen, in any arrangement you want. (A port of POSE to the Nokia 770/800 included a special 'landscape' skin, for example.)

The text file named "[something].skin" describes the image files, and where the elements are in the image. Here's an example, for the Palm m505:

# This is a skin file for the Palm OS Emulator.  See the ReadMe.txt
# file in this directory for a description of its contents.

Name                    = Standard-English
File1x                  = Palm_m505_16.jpg
File2x                  = Palm_m505_32.jpg
BackgroundColor = 0x7B, 0x8C, 0x5A
HighlightColor  = 0x64, 0xF0, 0xDC
Devices                 = PalmM505

#                                                x    y    w    h
#                                              ---- ---- ---- ----
Element1                = PowerButton,          179,   0,  27,  12
Element2                = UpButton,             113, 292,  20,  15
Element3                = DownButton,           113, 312,  20,  15
Element4                = App1Button,            27, 293,  22,  18
Element5                = App2Button,            70, 299,  22,  18
Element6                = App3Button,           152, 299,  22,  18
Element7                = App4Button,           195, 293,  22,  18
Element11               = Touchscreen,           41,  43, 160, 220
Element12               = LCD,                   41,  43, 160, 160
The first lines decribe the name of the skin, then the 'small' and 'large' image files, the background color of the screen, the 'highlight' color (for emulating the old Palm backlight), and the Palm models the skin applies to.

The next lines list the user elements that the skin contains (mostly buttons, but alarm LEDs and a few other items are possible), and specifies, in pixels, where in the image they are. The skin file must list the "Touchscreen" and "LCD". Everything else is optional. PHEM already provides the App buttons, the Up and Down buttons in the "Button Bar", and the Power button in the Action Bar, so the built-in skin doesn't bother with them.

To increase the contrast, we need to change the "BackgroundColor" and "HighlightColor" entries. As noted, they describe the color of the screen in normal and 'backlight on' modes. The three numbers are in hexadecimal, and specify the red, green, and blue components of the color - pretty much like how colors are described in HTML.

We'll make the "BackgroundColor" to be almost white, and the "HighlightColor" to be pure white. Here's what the .skin file looks like:

# This is a demonstration skin file for PHEM.
# It provides higher contrast than the default skin.

Name                    = Standard-English
File1x                  = DemoSmall.jpg
File2x                  = DemoLarge.jpg
BackgroundColor = 0xF0, 0xF0, 0xF0
HighlightColor  = 0xFF, 0xFF, 0xFF
Devices                 = PalmIIIx

#                                       x    y    w    h
#                                       ---- ---- ---- ----
Element11               = Touchscreen,   3,  3,   160, 220
Element12               = LCD,           3,  3,   160, 160

We upload "DemoLarge.jpg", "DemoSmall.jpg", and "Demo.skin" to the "phem/skins" directory on the Android device, and create a new Palm IIIx session. And, instead of the old dull olive screen, instead we see:

Custom Skin

That's a little easier on the eyes. A ZIP archive of this demonstration skin is available here: demoskin.zip.


Copyright © 2014 Perpendox Software LLC