Debian Codegraph @

format_docs/pdb/pdb_format.txt

raw
1 Format
2 ------
3
4 A PDB file can be broken into multiple parts. The header, record 0 and data.
5 values stored within the various parts are big-endian byte order. The data
6 part is broken down into multiple sections. The section count and offsets
7 are referenced in the PDB header. Sections can be no more than 65505 bytes in
8 length.
9
10
11 Layout
12 ------
13
14 PDB files take the format: DB header followed by the record 0 which has
15 contained format specific iformation followed by data.
16
17 DB Header
18 0 Record 0
19 .
20 . Data (broken down into sections)
21 .
22
23
24 Palm Database Header Format
25
26 bytes content comments
27
28 32 name database name. This name is 0 terminated in the
29 field and will be used as the file name on a
30 computer. For eBooks this usually contains the
31 title and may have the author depending on the
32 length available.
33
34 2 attributes bit field.
35 0x0002 Read-Only
36 0x0004 Dirty AppInfoArea
37 0x0008 Backup this database (i.e. no conduit exists)
38 0x0010 (16 decimal) Okay to install newer over
39 existing copy, if present on PalmPilot
40 0x0020 (32 decimal) Force the PalmPilot to reset
41 after this database is installed
42 0x0040 (64 decimal) Don't allow copy of file to be
43 beamed to other Pilot.
44
45 2 version file version
46
47 4 creation date No. of seconds since start of January 1, 1904.
48
49 4 modification date No. of seconds since start of January 1, 1904.
50
51 4 last backup date No. of seconds since start of January 1, 1904.
52
53 4 modificationNumber
54
55 4 appInfoID offset to start of Application Info (if present)
56 or null
57
58 4 sortInfoID offset to start of Sort Info (if present) or null
59
60 4 type See above table. (For Applications this data will
61 be 'appl')
62
63 4 creator See above table. This program will be launched if
64 the file is tapped
65
66 4 uniqueIDseed used internally to identify record
67
68 4 nextRecordListID Only used when in-memory on Palm OS. Always set to
69 zero in stored files.
70
71 2 number of Records number of records in the file - N
72
73 8N record Info List
74
75 start of record
76 info entry Repeat N times to end of record info entry
77
78 4 record Data Offset the offset from the start of the PDB of this record
79
80 1 record Attributes bit field. The least significant four bits are used
81 to represent the category values. These are the
82 categories used to split the databases for viewing
83 on the screen. A few of the 16 categories are
84 pre-defined but the user can add their own. There
85 is an undefined category for use if the user or
86 programmer hasn't set this.
87 0x10 (16 decimal) Secret record bit.
88 0x20 (32 decimal) Record in use (busy bit).
89 0x40 (64 decimal) Dirty record bit.
90 0x80 (128, unsigned decimal) Delete record on
91 next HotSync.
92
93 3 UniqueID The unique ID for this record. Often just a
94 sequential count from 0
95
96 end of record
97 info entry
98
99 2? Gap to data traditionally 2 zero bytes to Info or raw data
100
101 ? Records The actual data in the file. AppInfoArea (if
102 present), SortInfoArea (if present) and then
103 records sequentially
104