Skip to content

Palm Resource File Format

Rebecca G. Bettencourt edited this page Aug 27, 2014 · 1 revision

Introduction

This page describes the format of PRC (Palm resource) files used by the Palm OS.

PRC File Format

A PRC (Palm resource) file is very simple, starting immediately with the PRC header.

Type Description Notes
byte[32] name the name of the application, in MacRoman encoding, padded with nulls
int16be attributes Bit 0 (0x0001) is set, indicating this is a PRC file. Bit 1 (0x0002) indicates that the file is read-only. Bit 2 (0x0004) indicates that the appInfo field is dirty. Bit 3 (0x0008) indicates that the file needs to be backed up. Bit 4 (0x0010) indicates that it is OK to install a newer version of this file over an older one. Bit 5 (0x0020) indicates that the device should be reset after installing this application. Bit 6 (0x0040) indicates that the file cannot be copied to another device. Bit 7 (0x0080) is clear, indicating this is not a file stream database. Bit 8 (0x0100) indicates this file is hidden. Bit 9 (0x0200) is set, indicating this file is launchable. Bit 15 (0x8000) indicates the file is open and should be cleared. Other bits are reserved and should be cleared.
int16be version usually 1
int32be creationDate seconds since midnight, January 1, 1904
int32be modificationDate seconds since midnight, January 1, 1904
int32be backupDate seconds since midnight, January 1, 1904
int32be modificationNumber usually 0
int32be appInfoOffset offset from start of file to start of appInfo field; usually 0
int32be sortInfoOffset offset from start of file to start of sortInfo field; usually 0
int32be type for a PRC file, the four-character constant (fcc) appl
int32be creator a four-character constant (fcc) unique to this application
int32be uniqueIDSeed usually 0

Immediately following the header is an array of record lists. Usually there is only one record list, containing an array of resource records (or 4 zero bytes if there are no resources).

Type Description Notes
recordList[] recordLists an array of record lists
    int32be     nextRecordListOffset offset from this record list to the next record list; usually zero, indicating no further record lists
    int16be     resourceCount the number of resources
    resource[]     resources an array of resource records; 4 zero bytes if there are no resources
        int32be         type the resource type, a four-character constant (fcc)
        int16be         id the resource id
        int32be         dataOffset offset from start of file to start of resource data; end of resource data is indicated by next record or end of file

Following the record lists is the appInfo, which is usually empty; the sortInfo, which is usually empty; and finally the resource data.

Clone this wiki locally