! Filestore configuration constants

! This file contains the main system configuration definitions.
! In general, the first few can be changed once the system
! is operationsl, provided (almost) everything is recompiled.
! The stuff relating to the disc layout MUST NOT BE CHANGED
! once the system is operational, for obvious reasons.

%constinteger facility code      = 2      { Magic number : connect code       }
%constinteger default allocation = 32     { Blocks       : file allocation    }
%constinteger default quota      = 2048   { Blocks       : when user created  }
%constinteger ether retry limit  = 1      { Retries      :                    }
%constinteger stack gap          = 16384  { Bytes        : for each process   }
%constinteger stamp interval     = 10     { Minutes      : console reports    }

%constinteger ether TX procs  = 2
%constinteger procs           = 4  { filestore server processes               }
%constinteger internal limit  = procs - 2 { limit on internal copy operations }
%constinteger buffs           = 16  { system buffers                          }
%constinteger dirs            = 16  { size of directory cache                 }
%constinteger unos            = 8   { size of Uno table                       }
%constinteger xnos            = 12  { size of Xno table                       }
%constinteger tbuffs          = 63  { trace buffers     ** must be 2^^? - 1 **}
%constinteger ports           = 31  { ether ports in station                  }
%constinteger ether buffers   = 31  { received packets  ** must be 2^^? - 1 **}
%constinteger specials        = 4   { "special file" buffers                  }

%constinteger clock factor = 1000   { 1000 for 8MHz, 1250 for 10MHz           }

%constinteger infinity  = 16_7FFFFFFF     { largest valid +ve integer         } 
%constinteger h         = 16_0000FFFF     { %short -> unsigned 16 bits        }

%constinteger ether packet size = 536


! Disc layout (in blocks)
! The following MUST NOT BE ALTERED once there
! are real users of the system.

%constinteger disc size = 2 * 256 * 4 * 16   { blocks on the disc             }
%constinteger u per p   = 64                 { users per disc partition       } 

%constinteger head size = 1024               { size of reserved disc areas    }
%constinteger dir  size = 4                  { blocks in a directory          }
%constinteger dp   size = dir size * u per p { directory partition size       } 
%constinteger fp   size = (disc size - 2 * head size) // 1 - dp size
                                             { user partition size            }


! Disc layout defined by the following.  The reserved areas are at the 
! extreme inside and outside of the disc.  The directories are in the
! middle of the disc, with the user partitions on either side.  NB all
! the information, particularly those constants defining the number of
! partitions on the disc (mostly below, but note there is one in the
! definition immediately above this comment) must be consistent.

%constinteger sy1 start = 0
%constinteger p0  start = sy1 start + head size
%constinteger p0d start = p0  start + fp size
%constinteger sy2 start = p0d start + dp size

%constintegerarray p  start(0 : 0) = p0  start

%constintegerarray pd start(0 : 0) = p0d start

%constinteger last partition = 0{7}    {*** NB: must agree with above ***}


! Locations of (duplicated) bad block lists in the second system
! reserved area (sy2).
%constintegerarray bad area(1 : 4) = 0, 4, head size - 8, head size - 4
%constintegerarray pass area(1 : 2) = 8, head size - 12


! Bitmap size, defined in terms of the size of the user partitions.
%constinteger bitmap size = fp size // 8

%end %of %file
