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
Word Offset | Size (words) | Description |
---|---|---|
0 | 2 | Signature, "0x01162002" |
2 | 6 | Reserved (zero by default) |
8 | ... | Module #1 |
... | ... | ... |
... | ... | Module #N |
Word Offset | Size (words) | Description |
---|---|---|
0 | 1 | Size of this module in words (including this one). Note that the length of a PAI module must be multiple of 32 words. (M) |
1 | 1 |
16-bit flag describing the state of the module
|
2 | 1 | Total number of entries (N) |
3 | 3 | Reserved (0 by default) |
6 | 2 | Pointer 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) | 2 | Pointer to beginning of a MDB record. |
... | ... | Empty entries are marked with zeros |
M-2 | 2 | Zeros, to mark the end of the module |