PDB(4)

πŸ“¦ version 1.4.4, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’Ύ PDB(4) β€” bestie's guide to the Pilot Database file format

okay so this is the manual page for PDB(4) β€” yes that's the section-4 one, the file format one, not a command you can just run πŸ’…. It's giving "archaeology of your old Palm Pilot" and honestly? iconic.


✨ NAME ✨

PDB β€” the (Pilot Database) file format. that's it, that's the name, no notes 🫢


🌸 SYNOPSIS 🌸

here's the whole shape of it, bestie. copy it exactly, don't freestyle:

#define dmDBNameLength    32/* 31 chars + 1 null terminator */

struct pdb_header {       /* 78 bytes total */
     char   name[ dmDBNameLength ];
     Word   attributes;
     Word   version;
     DWord  create_time;
     DWord  modify_time;
     DWord  backup_time;
     DWord  modificationNumber;
     DWord  appInfoID;
     DWord  sortInfoID;
     char   type[4];
     char   creator[4];
     DWord  id_seed;
     DWord  nextRecordList;
     Word   numRecords;
};

struct pdb_rec_header {   /* 8 bytes total */
     DWord  offset;
     struct {
            int delete    : 1;
            int dirty     : 1;
            int busy      : 1;
            int secret    : 1;
            int category  : 4;
     }      attributes;
     char   uniqueID[3];
}

look at all those fields. she's structured. she's organized. she knows exactly what she is. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

So the PDB (Pilot Database) file format is what literally every model of the Palm Pilot and the IBM Workpad uses. no exceptions, bestie, it's the whole vibe.

The format is a little sandwich, and here's the layering:

  1. a header
  2. a set of record headers
  3. the records themselves

in that order. periodt. πŸ’…

πŸ”€ Word Sizes πŸ”€

In the SYNOPSIS up there, the types `Byte`, `Word`, and `DWord` get used exactly the way they are in the Pilot headers. so let's break it down:

  • `Byte` is 8 bits
  • `Word` is 16 bits
  • `DWord` is 32 bits

and the last two? big-endian format. yes, big-endian. the way that endianness matters here… iykyk 😭


πŸ’€ CAVEATS πŸ’€

not me having to deliver the bad news, but bestie you NEED to know these:

  1. The C structures given in the SYNOPSIS above are illustrative and most likely will not work in actual C code, because compilers align data members on word boundaries. so like… they're a vibe, not a compile target. πŸ™ˆ
  2. The PDB file format presented here is not official β€” it was written back when the PDB file format wasn't public. It is possibly outdated. The official standard is available on the Palm web page. (check SEE ALSO πŸ‘‡)
fr fr, if you're building something real, go find the official spec. this page is the girlies' best-effort reconstruction, not the law. πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘

go read these, bestie, they're the whole friend group:

also, on the reference shelf:


🫢 AUTHOR 🫢

Paul J. Lucas <pauljlucas@mac.com> Updated by Erik Schanze <eriks@debian.org>

two authors, one legendary file format. we love a collab. πŸ’œ


and that's the page, bestie!! this one came from the txt2pdbdoc crew and it's dated August 20, 2005 β€” an absolute vintage moment. mwah, go read the official spec, stay big-endian, and slay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from