PRC (Palm OS)
Encyclopedia
PRC is a container format for code database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

s in Palm OS
Palm OS
Palm OS is a mobile operating system initially developed by Palm, Inc., for personal digital assistants in 1996. Palm OS is designed for ease of use with a touchscreen-based graphical user interface. It is provided with a suite of basic applications for personal information management...

, Garnet OS and Access Linux Platform
Access Linux Platform
The Access Linux Platform , once referred to as a "next-generation version of the Palm OS" is an open source-based operating system for mobile devices developed and marketed by Access Co., of Tokyo, Japan. The platform includes execution environments for Java, classic Palm OS, and GTK+-based native...

. Its structure is similar to PDB
PDB (Palm OS)
PDB is a container format for record databases in Palm OS, Garnet OS and Access Linux Platform. Its structure is similar to PRC resource databases...

 databases. Usually, a PRC file is a flat representation of a Palm OS application that is stored as forked database on the PDA.

PRC files are also used by the Mobipocket
Mobipocket
Mobipocket SA is a French company incorporated in March 2000 which produces Mobipocket Reader software, an E-Book reader for some PDAs, phones and desktop operating systems....

 e-book
E-book
An electronic book is a book-length publication in digital form, consisting of text, images, or both, and produced on, published through, and readable on computers or other electronic devices. Sometimes the equivalent of a conventional printed book, e-books can also be born digital...

-reader (here sometimes referred to as MOBI format). The AZW format of Amazon's Kindle
Amazon Kindle
The Amazon Kindle is an e-book reader developed by Amazon.com subsidiary Lab126 which uses wireless connectivity to enable users to shop for, download, browse, and read e-books, newspapers, magazines, blogs, and other digital media...

 reading device is in turn a DRM
Digital rights management
Digital rights management is a class of access control technologies that are used by hardware manufacturers, publishers, copyright holders and individuals with the intent to limit the use of digital content and devices after sale. DRM is any technology that inhibits uses of digital content that...

-restricted form of the Mobipocket format.

On Palm OS, PRC files are used for applications, localized resources (overlays) and shared libraries.

Structure of PRC file

In its essence, a PRC file is similar to a classical Mac OS
Mac OS
Mac OS is a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems. The Macintosh user experience is credited with popularizing the graphical user interface...

application. It contains a PRC header, PRC resource headers and PRC resources.
PRC Header
PRC Resource Header
PRC Resources

PRC Header

The PRC header is located at the beginning of the file and contains meta-information on the file:
Offset Name Type Size
0x00 name char 32 Bytes
0x20 flags integer 2 Bytes
0x22 version integer 2 Bytes
0x24 creation time Macintosh time 4 Bytes
0x28 modification time Macintosh time 4 Bytes
0x2c backup time Macintosh time 4 Bytes
0x30 mod_num integer 4 Bytes
0x34 app_info integer 4 Bytes
0x38 sort_info integer 4 Bytes
0x3c type integer 4 Bytes
0x40 creator integer 4 Bytes
0x44 unique_id_seed integer 4 Bytes
0x48 next_record_list integer 4 Bytes
0x4c num_records integer 2 Bytes

PRC Resource Header

For every resource (specified by num_records), there is a resource header containing:
name type notes size
name char Name of the resource 4 bytes
ID integer ID number of the resource 2 bytes
offset integer Pointer to resource data 4 bytes

PRC Resources

Every application contains al least a Code #0 resource with size information and jump tables, a Code #1 resource with executable code and data resources containing pre-initialized values of global variables in compressed form. Other resources that may be contained are forms, form objects, alerts and multimedia data, e. g. images and sounds.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK