bartop

palmoswerks ARCHIVE
Palm OS programming tips from a (former) CodeWarrior insider

header

Navigation

Search
Home
About
Stories
Stuff I Like
Articles
PilRC
CodeWarrior
palmos.techwood.org
DevTools List
Palm OS Dev FAQ

The 'a68k' Database Mystery

On palm-dev-forum, one of the developers was wondering about a special database type he saw on the Palm OS 5 Simulator. He kept seeing databases that had the type 'a68k' and names like "Clock_PcLK_appl_a68k"? What are these, and why are they important?

The 'a68k' database is a special RAM-based database that PACE creates for each 68K application on the device. This database is created the first time the application is run, and stays on the device until the application is deleted.

Normally, these databases are empty. However, when your program is running, these databases are used to store the ARM-native versions of the resources your application is using. For example, rather than act on the 68K-formatted form you bundled with your app, PACE does a one-time conversion of the form to little endian and ARM structure alignment and stores it in the 'a68k' database for use.

While your application is running in the Palm OS 5 Simulator, take a moment to use the View/Databases commmand and find the a68k DB that goes with your application. If you look at its contents, it will have the currently active set of resources, all in their ARM-native formats. This DB will keep the cached structures until the application closes, when they'll be removed.

Normally, you don't need to know or care about these special databases. However, the fact that PACE uses them as a speed optimization explains a lot of the changes that applications need for Palm OS 5. For example, you don't access the internals of a control in OS 5 because the internals are now in a different format, and the 68K code could mess up the ARM version of the structures, since it doesn't take the layout changes into consideration.

Update: Deleting 'a68k' DBs (7 Nov 2002)

Paul Nevai (http://www.paulcomputing.com), author of pedit and LapTopHack, provides some useful information. If you need to delete an 'a68k' database from the device, you need to first unprotect the database using the DmDatabaseProtect API. It looks like the OS protects all of these databases so they won't be accidentally removed while the linked application is in use.

brought to you by weblogger.com


Send feedback to combee@techwood.org
Copyright © 2004 Benjamin L. Combee
Palm OS is a registered trademark of PalmSource, Inc.
Metrowerks and CodeWarrior are registered trademarks of Metrowerks Inc.

The views expressed on this website/weblog are those of mine alone and do not necessarily reflect the views of PalmSource or Metrowerks.

This is a Manila Site

qwertYAK / frobnovich