All sectors are uniquely numbered from the start of the disc. Sectors are 256 bytes long.
Under Level 3 the disc is partitioned, part of the disc is an ADFS area, the remaining part is
set aside for network use.
LEVEL 3 SECTOR ZERO AND SECTOR ONE NOTE : THIS IS NOT AFS0! Sector zero: 246-248 Pointer to 1st sector of NFS partition Sector one: 246-248 Pointer to copy of 1st sector of NFS partition
Sector bit maps:
The first sector in every NFS cylinder contains a bit-map of that cylinder's sectors. If, for
example, a harddisc has 132 sectors per cylinder, the first sector of each cylinder has a bit
map containing 132 bits. There are 8 bits to a byte, and therefore the bit relating to sector
'n' of a cylinder is bit (n MOD 8) in byte (n DIV 8). If a sector is occupied, that bit is set
to zero, otherwise the bit is set to one. Bit zero of byte zero of a map�is always set to
zero - even an empty cylinder has its first sector occupied, by the bit map.
Floppy discs use a packed version of the map, for which there is currently no information
available.
NFS Sector 1: 0 - 3 "AFS0" - indicates a Fileserver disc 4 - 19 16 characters of disc name 20 - 21 Number of cylinders on the disc (LSB first) 22 - 24 Number of sectors on the disc (LSB first) 25 Number of physical discs in logical fileserver (generally unused) 26 - 27 Number of sectors per cylinder (LSB first) 28 Number of sectors per bit map 29 Increment to drive number to start next drive (generally unused) 30 Unused 31 - 33 SIN of root directory (LSB first) 34 - 35 Date of initialisation: LSB = day in month, MSB = month + 16*(year-1981) 36 - 37 1st free cylinder - LSB first 38 If non-zero, the disc is a floppy discAll objects are referred to by SIN (System internal name). The SIN points to a map which gives the location of the object on store.
MAP Sector: 0 - 5 "JesMap" indicates that this is a MAP sector. 6 Map chain sequence number. A map can extend over several sectors, the last entry in a particular sector pointing to the next part of the map. The sequence number is a copy of the last byte of the current MAP sector. 7 Unused 8 LSB of object length 9 Unused 10 - xx A list of occupied sectors, each entry consisting of five bytes: 0 - 2 lowest numbered sector in contiguous group LSB first 3 - 4 number of contiguous sectors in group LSB firstThe object's length is determined by byte 8, and the total�number of sectors occupied.
Directory structure:
Directories contain two linked lists. One list contains the objects in the directory, and is
maintained in alphabetical order. The other contains a linked list of free entries in the
directory. The entries in the linked lists are measured relative to the start of the directory,
so 50B would refer to an entry beginning at byte 0B in sector 05 of the directory. The last
entry in either linked list is 00.
0 - 1 Pointer to first entry in object linked list (LSB first) 2 Cycle number of directory 3 - 12 10 characters of directory name 13 - 14 Pointer to first entry in free entries linked list (LSB first) 15 - 16 Number of entries in the directory (LSB first). In practice a directory will not be more than 255 entries long. 17 - xx Contents of directory, 26 bytes per entry. 0 - 1 Pointer to next entry in linked list 2 - 11 10 characters of object name 12 - 15 Load address (4 bytes) 16 - 19 Exec address (4 bytes) 20 attribute byte b7 undefined b6 undefined b5 1 = writeable by others b4 1 = readable by others b3 1 = locked b2 undefined b1 1 = writeable by owner b0 1 = readable by owner 21 - 22 Date of most recent update to entry (as per date of initialisation) 23 - 25 SIN of object LSB firstThe last byte of the directory is a copy of the sequence number. This is used to check for broken directories.
Finally...
The passwords file is stored as "$.Passwords". It must be an integral number of sectors long (i.e. byte 8 of its JesMap must be zero.