March 1988 ----------------------------------------------------------------------------- Support Group Application Note Number: 076 Issue: 1 Author: AF ----------------------------------------------------------------------------- Acorn Econet Level 2 File Structure. ----------------------------------------------------------------------------- Applicable Hardware: Level 2 Fileserver Related Application Notes: ----------------------------------------------------------------------------- Copyright (C) Acorn Computers Limited 1992 Neither whole nor any part of the information contained in this note may be adapted or reproduced in any form except with the prior written approval of Acorn Computers Limited. Every effort has been made to ensure that the information in this leaflet is true and correct at the time of printing. However, the products described in this leaflet are subject to continuous development and improvements and Acorn Computers Limited reserves the right to change its specifications at any time. Acorn Computers Limited cannot accept liability for any loss or damage arising from the use of any information or particulars in this leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers Limited. ----------------------------------------------------------------------------- Support Group Acorn Computers Limited Fulbourn Road Cherry Hinton Cambridge CB1 4JN ----------------------------------------------------------------------------- LEVEL 2 FILESERVER FILE STRUCTURE Disc format is 10 sectors of 256 bytes per track, with 80 tracks per side of the disc. Sector IDs range from 0 to 9 on each track, but the file server works with sector numbers only. Therefore sector zero on track zero is sector 0 - sector 7 on track 25 is sector 257 - or hex &101. The disc also has two logical sides. These are formatted as drive 2 tracks 0-79, but are treated by the fileserver as contiguous with drive 0. Therefore sector 799 is sector 9 track 79 on drive zero - sector 800 is sector 0 track 0 on drive two. The initial sector of a file or directory is called the System Internal Name (or SIN) of the object. Sector 0 0-3 AFS0 - indicate a Fileserver disc 4-19 16 characters of disc name 20-21 No. of sectors on disc 22-24 Sector number of root directory LSB first. Sectors are not necessarily contiguous, subsequent sector must be found via the current MAP. 25-26 Date of disc creation. LSB is DAY, MSB is (No. of years since 1981)*16 + Month 27-29 Sector number of MAP A - 1st of 13 contiguous sectors 30-32 Sector number of MAP B - 1st of 13 contiguous sectors 33 Size of MAP area Sector 10 is a copy of Sector 0 Directory layout SIN 0-1 Pointer to earliest entry in this directory, LSB 1st. May span several sectors linked via current MAP. 2 Cycle number 3-12 10 characters of entry name (file or directory) 13-14 Pointer to next free entry space 15-16 No. of entries in this directory 17- Contents of this directory, 26 bytes per entry Each entry 0-1 Offset from start of Directory to next entry 2-11 10 characters of entry name 12-15 4 bytes of file LOAD address 16-19 4 bytes of file EXEC address 20 Attribute byte b7 Undefined b6 Undefined b5 1 = writable by others / dir b4 1 = readable by others b3 1 = locked b2 Undefined b1 1 = writable by owner b0 1 = readable by owner 21-22 Date of entry creation, same format as disc date 23-24 SIN of entry, LSB 1st. 1st sector of file of sub-directory, subsequent sectors linked via current MAP. MAP If the first byte of MAP A minus the 1st byte of MAP B = -1 or 255 then MAP B is the current MAP, else MAP A is the current MAP. MAP LAYOUT 0 Used to indicate current map 1-2 Number of entries 3-4 Pointer to first free chain 5-6 Entry for sector 0 7-8 Entry for sector 1 9-10 Entry for sector 2 11- Entry for subsequent sectors. The entry for sector n is MAP + (n*2)+5,(n*2)+6. For each entry LSB LSB of sector number of ”next• sector or number of bytes in this sector MSB b0-3 MSB or sector no. of next sector b4 1 if this chain (of dir) is empty b5 1 if this sector is start of a chain b6 1 if this sector is last in a chain b7 0 if this sector is unwritten. Password file layout Each entry 0-9 10 bytes of user name, terminated by 0D if less than 10 chars. 10-15 6 bytes of password terminated by 0D if less than 6 16 Status byte: b7 always 1 b6 1 if system user b2-5 undefined b1,0 !BOOT option