Hack47.Extend Your Palm

Hack 47. Extend Your Palm

HackMaster isn't just the name of an RPG, but is a collection of system extensions (hacks) for your Palm device.

HackMaster (and its later replacements) manages third-party extensions (hacks) to the Palm OS. Over time, some of the more popular hacks have been incorporated into the operating system itself. For example, new Palm devices support tapping in the title area of an application to bring up the menu. Older Palm devices didn't support this, so someone wrote MenuHack. MenuHack provided this functionality before it was available in the OS itself.

Other hacks include superFindHack [Hack #7] for improving the built-in Find and various hacks related to entering text, such as CapsHack and MidCapsHack.

There are some limitations to hacks and HackMaster, however. Starting with Palm OS v5.0, HackMaster no longer works. Hacks and HackMaster itself have been so popular that they have spawned several other extension managers or replacement tool sets, such as Teal Master (http://www.tealpoint.com) and pToolSet (http://www.paulcomputing.com).

To find out what version of Palm OS you are running, go to the launcher and select Info from the Application menu. From the Info form, tap the Version button and you will see the Palm OS version number at the top of the form.

An extension manager handles extensions (hacks) that conform to a common interface. The most common interface for Palm OS extensions is the HackMaster interface. Extension managers allow you to install, delete, enable, and disable hacks. Some extension managers provide additional features.

7.7.1. HackMaster

HackMaster (http://www.daggerware.com), seen in Figure 7-12, was the original extension manager. HackMaster defined the interface that subsequent hacks and extension managers have followed. HackMaster works well on Palm devices through Palm OS 4.x. However, PalmSource chose to disable hacks in Palm OS v5.0.

How Do Extensions Work?

Motorola 68K chips provide for custom opcodes (instructions used by the microprocessor). Any opcode of the form $Axxx (hexadecimal) is a custom opcode. Some versions of the 68K chips also have custom opcodes in the $Fxxx range.

These opcodes are frequently used for system calls in operating systems early Macs, Atari STs, and Palm OS versions through 4.x all made use of these opcodes. The opcodes trigger custom (operating system-specific) handlers. An extension patches into this process.

The proper way for an extension (in general, not specific to HackMaster) to patch one of these opcodes is to store the address of the existing handler when the extension is first installed and to restore the previous handler if the extension is removed. Also, the extension should call the original handler as well, after it has finished handling the event. Thus, you can build up a chain of extensions which all patch the same opcode. Extension A can call Extension B which calls Extension C which calls the original function.

There is a problem with this approach, though. What happens if Extension B is removed? How does Extension A get notified to point to C instead of B? The HackMaster extension API addresses this. Conforming extensions can be added and deleted in any order, and the links will be properly updated.

When the Palm OS switched to the ARM processors, these opcodes were not available. Thus, they decided to drop support for HackMaster-style extensions. Palm OS 5.0 and later do support a limited form of extensions. Newstyle extensions can register to receive notification on certain system events.

Figure 7-12. HackMaster

7.7.2. X-Master

X-Master (http://linkesoft.com) is a free replacement for HackMaster. In addition to the standard enable and disable functions, X-Master allows you to see which functions each hack patches, as you can see in Figure 7-13. In some cases, this may allow you to find conflicts or resolve strange behavior. To find this information, select a hack from X-Master and press the Details button. X-Master also supports having sets of hacks and easily switching between them. You can also get information on all applications (not just hacks) that are patching system functions.

Figure 7-13. X-Master showing Details view

7.7.3. TealMaster

TealMaster (http://www.tealpoint.com), seen in Figure 7-14, is a HackMaster replacement that emulates some hacks under Palm OS 5.0. When you run TealMaster under Palm OS 5.0, hacks are listed with icons indicating whether or not they are likely to run under Palm OS 5. Some known compatible hacks are TealMagnify (zooms in to make the screen easier to read), TealGlance (gives a Today view on powering on your Palm devicedisplays date, time, today's appointments, To Do items), and TealEcho (lets you see what you write in the Graffiti area). TealMaster supports sets of hacks so you can easily switch between different system configurations. The set support is sophisticatedyou can configure TealMaster to switch sets when you change applications. TealMaster also allows you to configure the order in which hacks are invoked when more than one hack patches the same system trap.

7.7.4. pToolSet

pToolSet (http://www.paulcomputing.com) is not a direct HackMaster replacement. Instead of managing HackMaster extensions, pToolSet provides a set of its own tools (see Figure 7-15) which work on Palm OS versions 3.0-5.x. These tools do not patch the system traps, so they work despite the changes in Palm OS 5. pToolSet provides some of the same sorts of tools that are available as hacks. pToolSet includes a tool for improving access to checkboxes and other controls, a tool for creating Date Book, MemoPad, and To Do items without leaving the current application, an info tool, a launcher tool, and several text tools.

Figure 7-14. TealMaster

Figure 7-15. pToolSet listing some of the tools

There are also standalone tools and utilities of various sorts, such as battery and uptime meters. You can search for other tools at the various Palm software sites.

Palm and Treo Hacks
Palm and Treo Hacks: Tips & Tools for Mastering Your Handheld
ISBN: 059610054X
EAN: 2147483647
Year: 2006
Pages: 115

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net