PHEM Logo

 

Perpendox Logo

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

Emulating Card Storage

Many Palm PDAs supported external storage in the form of memory cards - usually SD or MMC cards. This allowed storing more, and larger, files than the Palm could support on its own, with its 8MB of storage. Also, many Palm apps were created to allow handling different file types, like archives or even plain text.

Of course, not all Palm models had the hardware to support memory cards, and not all ROMs supported external storage.

OS 4.x Required

The main thing you'll need is a Palm ROM with OS 4.0 or 4.1. This is when "VFS" (Virtual File System) support was added to the Palm OS, giving apps a standard way to talk to a file system. Earlier versions of the Palm OS just can't talk to memory cards. (Although, see the Handera support page for additional complications.)

HostFS

To emulate a memory card, the emulator cheats. From a technical standpoint, it adds some special 'traps' (system calls) that allow the emulated Palm to talk to the file system of the host - in this case, your Android device. But to access these traps, a special "HostFS" library must be installed into the emulated Palm. This library hooks up with the OS and makes a directory on the Android device look like a memory card to the Palm.

Initial Setup

If the ROM you're running supports VFS, the "Card Emulation" menu will be available. The first time you go to this menu, it will offer to install the HostFS library to the Palm. If you click on the "Install HostFS" button, it will install the library and reset (reboot) the Palm.

Mounting And Unmounting

Once the reset completes, the card directory - on most devices, this will be "/mnt/sdcard/phem/card" - will appear inside the Palm as a memory card. The name of the card will be "EmulatedSlot1". Any files that are placed in the card directory will be visible to the Palm, just as if they were on an expansion card.

You can go to the Card Emulation menu to see the exact directory for the files. From there you can also 'mount' and 'unmount' the virtual card - basically like inserting and removing the card. As you can imagine, it's probably not a good idea to unmount the card in the middle of a save operation...

Limitations

The emulation of memory cards is not quite complete. In particular, a few Palm applications that talk directly to the hardware - like the "Card Info" utility that appears on the Palm m505/m515 - will not detect that a card is present.

However, any Palm application that uses the Palm VFS API (in practice, every Palm app that uses storage, including Palm file managers like FileZ or GentleMan) will have no problem using the emulated storage.

The other key limitation comes from the Palm operating system itself. It's a 32-bit operating system from the late 1990s/early 2000s, and does not comprehend large storage capacities. It can't properly handle storage that's greater than 2GB in size. So PHEM lies to the emulated Palm about how much storage is available.

If your device has more than 2GB of storage free (as most Android devices do) it will show as having about 2GB free. However, if your device actually does have less than 2GB available, the Palm will detect an accurate count of how much free space is available. Note that the Palm will also not handle individual files larger than 2GB either, but it's hard to imagine something that big intended for an OS 4.x Palm.

In short: the Palm will never see more than 2GB available, but you can actually store as much as will fit on your device.


Copyright © 2013 Perpendox Software LLC