/[public]/psiconv/trunk/formats/psion/Basic_Structures.psi
ViewVC logotype

Contents of /psiconv/trunk/formats/psion/Basic_Structures.psi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 113 - (show annotations)
Sun Mar 11 19:39:54 2001 UTC (23 years, 1 month ago) by frodo
File MIME type: application/octet-stream
File size: 4260 byte(s)
(Frodo) Update to version 2.7 of datafiles

1 7mþŸUs‘ ”
2 dÈ"Times New RomanN123O*Koptekst 1L ð
3 < *Koptekst 2Lð ð
4 < *Koptekst 3L *OpsomtekenO³•Swissÿÿÿÿh3r h3r ÐР \cefd\cDefLdý‚.ÆAI&[Basic Structures]Basic Structures[Strings] [String]StringsA string is encoded as a «SListB». This means it can be upto 3F characters long. Strings use «ASCII Codes»..[Offsets] [Offset]OffsetsAt many places, other locations in the file are referenced. These locations are given as Offsets: the number of bytes from the start of the file. Offsets are always encoded in Longs.[Lengths] [Length]LengthsLengths are encoded within longs. The unit is a twip, or 1/5A0 inch (1/1440 decimal). This means 237 (567 decimal) units correspond to 1 cm.[Sizes][Size]SizesFont sizes are expressed within longs. The unit is a 1/14 point (1/20 decimal). As a point equals 1/48 point (1/72 decimal), this is actually the same unit as used for «Lengths».[Colors][Color]ColorsColors are encoded within three bytes. Each byte ranges from 00 (black) to FF (white). This is clearly intended to be a RGB encoding, but the Psion 5 only has a greytone display. All three bytes should be equal to express a greytone, and in practice, only values 00 00 00, 55 55 55, AA AA AA and FF FF FF are seen.Signed Integers[SInt][SInts][Signed Integer][Signed Integers]Signed integers are encoded in longs. The most significant bit is used as sign (0 for positive, 1 for negative). So +1 is encoded as 01 00 00 00, and -1 as 01 00 00 80.Floating Point Numbers[Float][Floats][Floating Point Numbers]Floating point numbers are encoded in 8 bytes. The most significant bit is used as sign (0 for positive, 1 for negative). The next B(11 decimal) bits are used as a two-complement exponent, and the remaining 34 (52 decimal) bits are used as the mantissa.The complete number can be found through this C formula (>> means shift right, ** means to the power of, Float is the 8 byte unsigned integer representation): (Float & 0x8000000000000000 ? -1 : 1) * (1 + (Float & 0x000FFFFFFFFFFFFF) / 0x0010000000000000) * (2 ** (((Float & 0x7FF0000000000000) >> 52) - 0x3FF)Some example representations:Number (decimal) Sign bit Exponent Mantissa Complete 1.0 0 3FF 0000000000000 00 00 00 00 00 00 F0 3F 2.0 0 400 0000000000000 00 00 00 00 00 00 00 40 3.0 0 400 8000000000000 00 00 00 00 00 00 08 40 3.5 0 400 C000000000000 00 00 00 00 00 00 0C 40-3.5 1 400 C000000000000 00 00 00 00 00 00 0C C0 0.5 0 3FE 0000000000000 00 00 00 00 00 00 E0 3F 0.0 0 000 0000000000000 00 00 00 00 00 00 00 00
5  ð"Times New Roman ðð"Times New Roman ð " Courier New ð"Times New Romanð  " Courier New  ð"Times New Roman
6 -m·³;/©(ÿŸ);67::::::: 
7  @"Arial ð"Times New Roman ð"Times New Roman ð"Times New Roman ð ð ð ð ð"Times New Romanð"Times New Roman ð"Times New Romanð"Times New Roman ðð ððBð ð ð
8 ððð0ðð6  " Courier New  " Courier New"Word.app C"yC” ‰f

Properties

Name Value
svn:mime-type application/octet-stream

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26