The header consists of a record (tppuheader) containing several pieces of information for recompilation. This is shown in table (A.1). The header is always stored in little-endian format.
offset | size (bytes) | description |
00h | 3 | Magic : ’PPU’ in ASCII |
03h | 3 | PPU File format version (e.g : ’021’ in ASCII) |
06h | 2 | Compiler version used to compile this module (major,minor) |
08h | 2 | Code module target processor |
0Ah | 2 | Code module target operating system |
0Ch | 4 | Flags for PPU file |
10h | 4 | Size of PPU file (without header) |
14h | 4 | CRC-32 of the entire PPU file |
18h | 4 | CRC-32 of partial data of PPU file (public data mostly) |
1Ch | 8 | Reserved |
The header is already read by the ppufile.openfile command. You can access all fields using ppufile.header which holds the current header record.
value | description |
0 | unknown |
1 | Intel 80x86 or compatible |
2 | Motorola 680x0 or compatible |
3 | Alpha AXP or compatible |
4 | PowerPC or compatible |
Some of the possible flags in the header are described in table (A.3). Not all the flags are described, for more information, read the source code of ppu.pas.
Symbolic bit flag name | Description |
uf_init | Module has an initialization (either Delphi or TP style) section. |
uf_finalize | Module has a finalization section. |
uf_big_endian | All the data stored in the chunks is in big-endian format. |
uf_has_browser | Unit contains symbol browser information. |
uf_smart_linked | The code module has been smartlinked. |
uf_static_linked | The code is statically linked. |
uf_has_resources | Unit has resource section. |