mirror of
https://github.com/callapple/LLUCE.git
synced 2024-12-28 18:30:13 +00:00
102 lines
3.3 KiB
Plaintext
102 lines
3.3 KiB
Plaintext
L&L Productions
|
|
File Type Notes
|
|
______________________________________________________________________________
|
|
|
|
File Type: $2D
|
|
Auxtype: $8004
|
|
|
|
Name: L&L Universal Communications Environment Message File Format
|
|
|
|
Written By: Andy Wells January, 1990
|
|
|
|
Format Of Files Used To Store Messages By LLUCE.
|
|
______________________________________________________________________________
|
|
|
|
This file is used to store text used for messages and mail.
|
|
There are four parts to the file.
|
|
|
|
The first part is a header, containing information about the file itself as
|
|
well as a copy of the data for the highest used message number.
|
|
The header is always 32 bytes long.
|
|
|
|
The second part is a bitmap containing bits that refer to individual blocks
|
|
within the actual text storage area of the file.
|
|
|
|
The third part is the directory containing information relating to each message
|
|
in the file as well as the first block used by the message.
|
|
|
|
The fourth part is used for actual text storage.
|
|
|
|
HEADER FORMAT
|
|
-------------
|
|
|
|
$00 BITSIZE Byte Size of bitmap in blocks
|
|
|
|
$01 DIRSIZE Byte Size of directory in blocks
|
|
|
|
$02 USEDBLKS Word Number of blocks in use
|
|
|
|
$04 NUMFILES Word Actual number of messages in file
|
|
|
|
$06 Word Reserved
|
|
|
|
$08 HIMSGNUM Long word First number of last message in file
|
|
$0C Long word Second number of last message in file
|
|
$10 Long word Third number of last message in file
|
|
$14 Long word Fourth number of last message in file
|
|
|
|
$18 8 Bytes Reserved
|
|
|
|
4 byte numbers are stored low byte first. High order bit of the third byte is
|
|
used as a negative flag.
|
|
|
|
BITMAP FORMAT
|
|
-------------
|
|
|
|
Each bitmap block is 128 bytes long. Each byte contains 8 bits corresponding
|
|
to available blocks in the text storage area of the file. The bit pattern is
|
|
from least significant bit to most significant bit. Eg: Bit 0 of byte 0
|
|
corresponds to block 0.
|
|
|
|
There are 16 bytes for each message allowed in the file. this allows for
|
|
messages up to a total of 8K each. If some messages are shorter, then others
|
|
can be longer.
|
|
|
|
DIRECTORY FORMAT
|
|
----------------
|
|
|
|
$00 BLKPTR Word Pointer to first block used by this message
|
|
If zero, this message has been deleted.
|
|
|
|
$02 MSGx 3 Bytes First number of message
|
|
3 Bytes Second number of message
|
|
3 Bytes Third number of message
|
|
3 Bytes Fourth number of message
|
|
|
|
$0E Word Reserved
|
|
|
|
Message numbers are referred to by the command MSG(X) or MSG(X,Y).
|
|
|
|
MSG(X) is equivalent to MSG(X,0). Y is in the range 0..3.
|
|
|
|
TEXT AREA FORMAT
|
|
----------------
|
|
|
|
$00 TEXT 126 Bytes This is standard text, no formatting is done.
|
|
$7D
|
|
|
|
$7E NXTBLK Word Pointer to next block of message.
|
|
If zero, there are no more blocks.
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
The header starts at byte 0 of the file.
|
|
The bitmap starts at byte 32.
|
|
To calculate the start of the directory, use the following formula:
|
|
|
|
Dir Start = 32 + (BITSIZE * 128)
|
|
|
|
To calculate the start of the text area, use the following formula:
|
|
|
|
Text Start = 32 + (BITSIZE * 128) + (DIRSIZE * 128)
|