Positron Developer's Guide: PAI File Format

This document explains the format of the PAI files. PAI files are used in child databases to index the parent database. Each child database has a PAI file containing one module for each record, deleted or not. The module contains an entry for each record in the parent database that has an access key corresponding to the record in the child database. For example, the "Rock" record in the Genre child database has an associated PAI module, which contains entries for each song in the parent database in the "Rock" genre. This allows the Neuros to quickly display all of the tracks in a particular category quickly.

A record in a SAI file consists of a pointer to a MDB record, and to its associated PAI module (if applicable). The pointer to the PAI module does not point to the start of the module, however, but to the location of the first entry within the module. See the PAI file format for more information.

Word OffsetSize (words)Description
02Signature, "0x01162002"
26Reserved (zero by default)
8...Module #1
.........
......Module #N

PAI Module

Word OffsetSize (words)Description
01Size of this module in words (including this one). Note that the length of a PAI module must be multiple of 32 words. (M)
11 16-bit flag describing the state of the module
  • Bit 0 = 0 if module contains at least one valid entry, 1 if module is empty
  • Bits 1-15 = Reserved (0 by default)
21Total number of entries (N)
33Reserved (0 by default)
62Pointer to beginning of a MDB record. (Note: the PAI pointer in the SAI record associated with this whole module points to this word.)
.........
6+2*(N-1)2Pointer to beginning of a MDB record.
......Empty entries are marked with zeros
M-22Zeros, to mark the end of the module