The header consists of a record containing 24 bytes:
tppuheader=packed record
id : array[1..3] of char; { = 'PPU' }
ver : array[1..3] of char;
compiler : word;
cpu : word;
target : word;
flags : longint;
size : longint; { size of the ppufile without header }
checksum : longint; { checksum for this ppufile }
end;
The header is already read by the ppufile.open command. You can access all fields using ppufile.header which holds the current header record.
|
field | description | ||||||||||||||||||
| id | this is allways 'PPU', can be checked with function ppufile.CheckPPUId:boolean; | ||||||||||||||||||
| ver | ppu version, currently '015', can be checked with function ppufile.GetPPUVersion:longint; (returns 15) | ||||||||||||||||||
| compiler | compiler version used to create the unit. Doesn't contain the patchlevel. Currently 0.99 where 0 is the high byte and 99 the low byte | ||||||||||||||||||
| cpu | cpu for which this unit is created. 0 = i386 1 = m68k | ||||||||||||||||||
| target | target for which this unit is created, this depends also on the
cpu!
For i386:
| ||||||||||||||||||
| flag | the unit flags, contains a combination of the uf_ constants which are definied in ppu.pas | ||||||||||||||||||
| size | size of this unit without this header | ||||||||||||||||||
| checksum | checksum of the interface parts of this unit, which determine if a unit is changed or not, so other units can see if they need to be recompiled |