The Phone Losers Of England Presents: Last Updated 6th of January 2001
Back To Information Archive
PSIONICS FILE - AGENDA3A.FMT
============================
Format of Series 3a, 3c, and Siena Agenda files
Last modified 1997-08-04
===============================================

Series 3a Agenda files are a form of Database file (see the Psionics file
DBF.FMT). However, there are some differences:
* The file signature is the cstr "AgendaFileType*".
* The version number is that of the Agenda software.
* The value at offset 20 is not a version number (it is unused).
* The record types (other than types 0 and 15) are specific to Agenda; in
  particular, types 2 and 3 are not treated specially.

Series 3c and Siena Agenda files are mostly compatible with 3a files, but
contain some changes and extensions.

The record types are as follows:
  0 = deleted record
  1 = timed day entry
  2 = untimed day entry
  3 = anniversary
  4 = to-do entry
  5 = repeat information
  6 = anonymous data
  7 = reserved
  8 = entry code descriptive record (Series 3c and Siena only)
  9 = to-do list definition
Types 10 to 14 are descriptive records, and type 15 is an incomplete record.
There is exactly one record of each type 10 to 13, and at most one of type 14.
There is at most one record of type 8 on the Series 3c and Siena.

Note that all undescribed bits and bytes must be zero.

For convenience in formatting, the views of the agenda are abbreviated as
follows:
    DV = day view
    WV = week view
    YV = year view (Series 3a and Series 3c only)
    TV = to-do view
    LV = list view
    AV = anniversary view
    BV = busy view (Series 3c and Siena only)

The "entry code" is used on the Series 3a as the symbol to appear in the
year view (codes 0 to 31 mean that the entry should not be shown). On the
Series 3c and Siena they are used to select a subrecord from the type 8
record.


Types 1 to 4: entries
---------------------

Each record consists of a required part, described below, and optional alarm
and memo parts, in that order. The required part will indicate whether the
other two parts are present.

The required part has the following format.

Type 1 (timed day entry):
  Offset  0 (word): day number of the entry
  Offset  2 (word): time of entry, in minutes past midnight
  Offset  4 (byte): attributes (see below)
  Offset  5 (byte): entry code
  Offset  6 (word): length in minutes
  Offset  8 (byte): text style (see below)
  Offset  9 (qstr): text

Type 2 (untimed day entry):
  Offset  0 (word): day number of the entry
  Offset  2 (word): time where entry shown, in minutes past midnight, or $FFFF
                    for the default location
  Offset  4 (byte): attributes (see below)
  Offset  5 (byte): entry code
  Offset  6 (byte): text style (see below)
  Offset  7 (qstr): text

Type 3 (anniversary):
  Offset  0 (word): day number of the entry
  Offset  2 (word): time where entry shown, in minutes past midnight, or $FFFF
                    for the default location
  Offset  4 (byte): attributes (see below)
  Offset  5 (byte): entry code
  Offset  6 (word): start year (-30000 to 2049, 0 means none)
  Offset  8 (byte): bit 0: show base year, bit 1: show elapsed years
  Offset  9 (byte): text style (see below)
  Offset 10 (qstr): text

Type 4 (to-do entry):
  Offset  0 (word): day number to display from, or day number when crossed out,
                    or $FFFF if undated
  Offset  2 (word): time of entry, in minutes past midnight
  Offset  4 (byte): attributes (see below)
  Offset  5 (byte): entry code
  Offset  6 (word): day number to be done by, or $FFFF if undated
  Offset  8 (byte): internal code for to-do list holding the entry
  Offset  9 (byte):
    Bits 0 to 3: priority minus 1
    Bits 4 to 7: 0 = automatic, 1 = show date, 2 = show days to go,
                 3 = due date not shown
  Offset 10 (long): position in manual order
  Offset 14 (byte): text style (see below)
  Offset 15 (qstr): text

Note that positions in manual order (offset 10) are not necessarily
consecutive, and may have gaps in any individual list.

The attributes byte is used as follows:
    Bit 0: set for single entry, clear for repeating entry
    Bit 1: set if pending, clear if crossed out
    Bit 2: set if shown in year view, clear if not shown
    Bit 3: set if no alarm part, clear if alarm part follows
    Bit 4: set if no memo part, clear if memo part follows

If bit 3 is clear, the text is immediately followed by an alarm part:
  Offset  0 (word): alarm time in minutes before 23:59 of the day the event
                    occurs on (0 to 46079, meaning 00:00 31 days earlier)
  Offset  2 to  10: name of alarm sound (qstr, padded with zero bytes)
The sound name may be one of the following:
- the name of a sound file; this is searched for in each of:
    A:\WVE\name.WVE
    B:\WVE\name.WVE
    M:\WVE\name.WVE
    ROM::name.WVE
  [This appears to be the search order, but it is not documented.]
  The Series 3a ROM contains the sounds:
    SYS$AL01   Fanfare
    SYS$AL02   Soft bells
    SYS$AL03   Church bell
- a single byte (thus offset 2 is set to 1) with the value 1 (for rings),
  2 (for chimes), or 16 (for silence).

If bit 4 of the attributes byte is clear, the text or alarm part is followed
by a memo part. This has the format:
  Offset  0 (word): length of memo information (L, from 0 to 3600)
  Offset  2 (word):
    Bits  0 to 11: total size of components A to C
    Bits 12 to 15:  4 = unencrypted memo
                   12 = encrypted memo
  Offset  4 (word): size of component D
  Offset  6 to L+1: components A to D, in that order
The memo information then consists of four components, each of which is the
data portion of a Word record (see WORD.FMT), excluding Word's type and
length header.

Component A is a Word type 1 record, except that the cursor position is
always stored as zero, and the status window setting as 2 (wide). It is
always 10 bytes and always occupies offsets 6 to 15 of the memo information.

Component B is empty if the memo has not been encrypted with a password,
and is 18 bytes if it has:
  Offset 16 to 24: encryption key check value
  Offset 25 to 31: copy of offset 16 to 22
  Offset 32 (word): unused

Component C is a Word type 8 record. It starts at offset 16 of the memo
information if not encrypted, and offset 34 if encrypted. Component D is a
Word type 9 record.


Type 5: repeat information
--------------------------

When an entry of type 1 to 4 repeats, a separate type 5 record will exist
elsewhere in the file. This has the format:
  Offset  0 (byte):
    Bits 0 to 2: 0 = daily, 1 = weekly, 2 = monthly by date,
                 3 = monthly by days, 4 = annually
    Bit 3:       set to show next occurrence only, clear to show all
  Offset  1 (byte): repeat interval minus 1 (0 to 254)
  Offset  2 (word): ending day number, or $FFFF if none
  Offset  4 (byte): type of associated entry
  Daily and annual repeats:
    Offset  5 (long): position of associated entry
  Weekly repeats:
    Offset  5 (byte): days to repeat (bit 0 = Monday, ... bit 6 = Sunday)
    Offset  6 (byte): first day of the week (0 = Monday, ... 6 = Sunday)
    Offset  7 (long): position of associated entry
  Monthly by date repeats:
    Offset  5 (long): dates to repeat (bit 0 = 1st, ... bit 30 = 31st)
    Offset  9 (long): position of associated entry
  Monthly by day repeats:
    Offset  5 (byte): "1st"  days to repeat (bit 0 = 1st Monday, etc)
    Offset  6 (byte): "2nd"  days to repeat (bit 0 = 2nd Monday, etc)
    Offset  7 (byte): "3rd"  days to repeat (bit 0 = 3rd Monday, etc)
    Offset  8 (byte): "4th"  days to repeat (bit 0 = 4th Monday, etc)
    Offset  9 (byte): "last" days to repeat (bit 0 = last Monday, etc)
    Offset 10 (long): position of associated entry

In each case the position of the associated entry is the offset in the file
of the type/length word at the start of that record. Thus compressing the file
can require all type 5 records to be altered.

The remainder of the record is a sequence of words, each of which is the
number of a day on which the entry should be suppressed. These entries are
unordered; illegal values should be ignored but preserved.


Type 6: anonymous data
----------------------

These records are ignored by Agenda (except to include them when merging
agendas). The intent is that applications converting between this and other
formats can use these records to hold information not used by Agenda.


Type 8: entry code descriptive record
-------------------------------------

This record is ignored by the Series 3a. It is used to describe entry codes
on the Series 3c and Siena. Offset 0 (byte) is a version number, and must
be zero. The remainder of the record is a sequence of subrecords. Each
subrecord has the format:

  Offset 0 (byte): entry code
  Offset 1 (byte):
    Bits 0 to 3: length of description (L)
    Bits 4 to 7: class of entry code
                 (0=default, 1=open, 2=restricted, 3=private)
  Offset 2 to L+1: (text) description of entry code


Type 9: to-do list definition
-----------------------------

There is one record of this type for each to-do list, always 42 bytes long:
  Offset  0 (byte): must be $FF
  Offset  1 (byte): internal code for to-do list
  Offset  2 (cstr): list name
  Offset 19 (byte): same as offset 1
  Offset 20 (byte):
    Bits 0 to 3: maximum priority shown in other views
    Bits 4 to 5: sort order (0=date first, 1=priority first, 2=manual)
    Bit 6:       display crossed out entries in TV
    Bit 7:       display crossed out entries in other views
  Offset 21 (byte):
    Bit 0: set to bullet with numbers, clear to bullet with priorities
    Bit 1: set to display entries in other views
    Bit 2: set if entries dated by default
    Bit 3: @always set so far
  Offset 22 (word): default position in DV, in minutes past midnight
  Offset 24 (byte): default days warning
  Offset 25 (byte): default entry code
  Offset 26 (byte): 0=alarm off by default, 1=alarm on by default
  Offset 27 (byte): default alarm days ahead
  Offset 28 (word): default alarm time, in minutes past midnight
  Offset 30 to  39: default alarm sound name (qstr, padded with zero bytes)
  Offset 40 (byte): default style (bit 0=bold, bit 1=underline, bit 5=italic)
  Offset 41 (byte): unused, must be zero

On the Series 3c and Siena, offset @@ is the default class for entry codes
on to-do entries (@=open, @=restricted, @=private)

See above for the details of alarm sound names.


Type 10: descriptive record (memos)
-----------------------------------

@The format is not yet available.


Type 11: descriptive record (to-dos)
------------------------------------

This has the format:
  Offset  0 (byte): must be $6C
  Offset  1 (byte): number of to-do lists (L, from 1 to 99)
  Offset  2 to L+1: internal codes of the to-do lists, in display order


Type 12: descriptive record (views)
-----------------------------------

This record is divided into one or more subrecords. Each subrecord consists
of a type/length word followed by data, just as for the main records of the
file. The following subrecord type exists:

* Subrecord type 0 - view settings

This has the format:
  Offset  0 (byte): DV: status window
  Offset  1 (byte): DV: wrap mode
  Offset  2 (byte): DV: font size
  Offset  3 (byte): WV: status window
  Offset  4 (byte): WV: wrap mode
  Offset  5 (byte): WV: font size
  Offset  6 (byte): YV: status window
  Offset  7 (byte): YV: month shown at top (0 = Jan, ... 11 = Dec)
  Offset  8 (byte): unused, must be zero
  Offset  9 (byte): TV: status window
  Offset 10 (byte): TV: wrap mode
  Offset 11 (byte): TV: font size
  Offset 12 (byte): AV: status window
  Offset 13 (byte): AV: wrap mode
  Offset 14 (byte): AV: font size
  Offset 15 (byte): LV: status window
  Offset 16 (byte): LV: wrap mode
  Offset 17 (byte): LV: font size
  Offset 18 (byte): BV: status window
  Offset 19 (byte): BV: @=show work hour marker lines, @=hide lines
  Offset 20 (byte): @@@ unknown
  Offset 21 (byte):
    bits 0 to 3: view to use on opening ) 0=DV, 1=WV, 2=YV, 3=TV,
    bits 4 to 7: previous view          ) 4=AV, 5=LV, 6=BV

Offsets 18 to 21 do not apply to the Series 3a.

Valid status window settings are 0 (none), 1 (small), and 2 (full). The wrap
mode is 0 if wrapping is off and 1 if it is on. The font size ranges from 0
(the smallest) to 3 (the largest).


Type 13: descriptive record (preferences)
-----------------------------------------

This record is divided into one or more subrecords. Each subrecord consists
of a type/length word followed by data, just as for the main records of the
file. The following subrecord types exist:

* Subrecord type 4 - diamond list
  Offset  0 (byte): 1 = include DV in diamond list, 0 = don't
  Offset  1 (byte): 1 = include WV in diamond list, 0 = don't
  Offset  2 (byte): 1 = include YV in diamond list, 0 = don't
  Offset  3 (byte): 1 = include TV in diamond list, 0 = don't
  Offset  4 (byte): 1 = include AV in diamond list, 0 = don't
  Offset  5 (byte): 1 = include LV in diamond list, 0 = don't
  Offset  6 (byte): 1 = include BV in diamond list, 0 = don't

Offset 6 does not apply to the Series 3a.

* Subrecord type 5 - day entry defaults
  Offset  0 (word): display time for untimed events (minutes past midnight)
  Offset  2 (word): display time for timed   events (minutes past midnight)
  Offset  4 (word): length of timed events in minutes
  Offset  6 (byte): 0 = new events are untimed, 1 = new events are timed
  Offset  7 (byte): entry code
  Offset  8 (byte): 1 = untimed events have an alarm, 0 = no alarm
  Offset  9 (byte): number of days between alarm and untimed events
  Offset 10 (word): untimed event alarm time in minutes past midnight
  Offset 12 to  21: untimed event alarm sound name
                    (qstr, padded with zero bytes)
  Offset 22 (byte): 1 = timed events have an alarm, 0 = no alarm
  Offset 23 (byte): unused, must be zero
  Offset 24 (word): timed event alarm advance time in minutes
  Offset 26 to  35: timed event alarm sound name (qstr, padded with zero bytes)
  Offset 36 (byte): style of entries: bit 0 = bold, bit 1 = underline,
                    bit 5 = italic
  Offset 37 (byte): unused, must be zero

On the Series 3c and Siena, offset @@ is the default class for entry codes
on day entries (@=open, @=restricted, @=private)

See above for the details of alarm sound names.

* Subrecord type 6 - anniversary entry defaults
  Offset  0 (word): display time for anniversaries (minutes past midnight)
  Offset  2 (byte): 0 = entry code disabled, 1 = entry code enabled
  Offset  3 (byte): entry code
  Offset  4 (byte): 1 = anniversaries have an alarm, 0 = no alarm
  Offset  5 (byte): number of days between alarm and anniversary
  Offset  6 (word): anniversary alarm time in minutes past midnight
  Offset  8 (qstr): anniversary alarm sound name (qstr, padded with zero bytes)
  Offset 18 (byte): style of entries: bit 0 = bold, bit 1 = underline,
                    bit 5 = italic
  Offset 19 (byte): unused, must be zero

On the Series 3c and Siena, offset @@ is the default class for entry codes
on anniversary entries (@=open, @=restricted, @=private)

See above for the details of alarm sound names.

* Subrecord type 7 - general defaults
  Offset  0 (byte): 0 = PSION+ENTER disabled, 1 = PSION+ENTER enabled
  Offset  1 (byte): time separator character
  Offset  2 (byte): starting view (0=DV, 1=WV, 2=YV, 3=TV, 4=AV, 5=LV,
                    6=BV, 7=last view used)
  Offset  3 (byte): 0=hide entry codes, 1=show entry codes

Offsets 2 to 3 do not apply to the Series 3a.

* Subrecord type  8 - Siena day view
* Subrecord type  9 - Series 3a and Series 3c day view
* Subrecord type 10 - week view
* Subrecord type 11 - year view
* Subrecord type 14 - list view
Offsets 2 to 13 apply only to subrecords type 8 and 9. Offsets 14 to 25
apply only to subrecord type 9.
  Offset  0 (word):
    bit  0: set to show timed event durations
    bit  1: set to show timed event end times
    bit  2: title position: clear=left, set=right (DV and WV only);
            show repeats: clear=all, set=next only (LV only)
    bit  3: slot compression: clear=on, set=off (DV only)
    bit  4: clear to show duration arrows (DV only)
    bit  5: clear to show overlap bars (DV only)
    bit  8: set to show untimed events (DV, WV, and LV only)
    bit  9: set to show anniversaries  (DV, WV, and LV only)
    bit 10: set to show to-do entries  (DV, WV, and LV only)
    bit 11: set to show timed events   (DV, WV, and LV only)
  Offset  2 (word): left  side shows: 0=neither, 1=lines, 2=times, 3=both
  Offset  4 (word): must be 0
  Offset  6 (word): left  side "from" time in minutes past midnight
  Offset  8 (word): left  side "to"   time in minutes past midnight
  Offset 10 (word): right side "from" time in minutes past midnight
  Offset 12 (word): left  side slot duration in minutes
  Offset 14 (word): right side shows: 0=neither, 1=lines, 2=times, 3=both
  Offset 16 (word): must equal offset 10
  Offset 18 (word): must equal offset 10
  Offset 20 (word): right side "to"   time in minutes past midnight
  Offset 22 (word): must be 1440 ($05A0)
  Offset 24 (word): right side slot duration in minutes

* Subrecord type 12 - to-do view
* Subrecord type 13 - anniversary view
  Offset  0 (word): number of columns shown (limit 4 in AV)

* Subrecord type 15 - busy view (does not apply on the Series 3a)
  Offset  0 (word): view start time in minutes past midnight
  Offset  2 (word): view end time   in minutes past midnight
  Offset  4 (word):
    bit 0: set to show appointment duration
    bit 1: set to show appointment end time
    bit 2: unused, must be zero
    bit 3: set for "show in Series 3c"
    bit 4: set to show vertical grid
    bit 5: set to show horizontal grid
    bit 6: set to show overlap bars
    bit 7: set to show crossed out entries
  Offset  6 (word): work hours start time in minutes past midnight
  Offset  8 (word): work hours end time   in minutes past midnight


Type 14: descriptive record (printing)
--------------------------------------

This record is divided into one or more subrecords. Each subrecord consists
of a type/length word followed by data, just as for the main records of the
file. Subrecord types 0 to 3 apply to printing the agenda, and correspond to
record types 2 to 5 respectively of Word format (see Psionics file WORD.FMT).
Subrecord types 6 to 9 apply to printing memos, and correspond to the same
Word record types.
This Site Is © Copyright Project Atlantis, 2000-2001