PROJECT: SINGLIX Operating System   Issue: 2    Revision: 12    Date: 19/05/2009

OWNER: ERDOĐAN TAN / Istanbul / Turkiye

 

FILE DESCRIPTION TABLE Format of  SINGLIX FS1, FS2 file systems

 

Offset

Item

DATA

Type

Size

Description of Item

0

FDT Sign

‘FDT’

Char

3 byte

TR-SINGLIX File Description Table

3

FS FDT Version

XXh

Byte

1 byte

Must be 0 for Current/This FDT Version

4

Sector Size

XXXXh

Word

2 byte

Bytes per Sector (FS1=512, FS2=2048)

6

FDT Number

XXXXh

Word

2 byte

FDT (Sequence) Number of This File

8

File Number

XXXXXXXXh

Dword

4 byte

The 1st FDT Address of This File  (LBA)

12

Next FDT Number

XXXXXXXXh

Dword

4 byte

FDT address of the next section (LBA)

16

Sector Count

XXXXXXXXh

Dword

4 byte

Number of Sectors in this section

20

Parent Dir Number

XXXXXXXXh

Dword

4 byte

The Parent DDT Addr. of This File (LBA)

24

Parent Dir Serial

XXXXXXXXh

Dword

4 byte

The Parent Dir’s Serial No. (Tick Count)

28

File Size

XXXXXXXXh

Dword

4 byte

The lower 4 bytes of 6 byte file size.

32

File Size High

XXXXh

Word

2 byte

The higher 2 bytes of 6 byte file size.

34

File Type

XXXXh

Word

2 byte

Major, Minor Type Descriptor of This File

36

CheckSum

XXh

Byte

1 byte

FileName CheckSum

37

Attributes

XXh

Byte

1 byte

Permissions for Owner, Group, Others

38*

Owner Code

XXXXXXXXh

Dword

4 byte

Owner Description Table Address (LBA)

42*

Group Code

XXXXXXXXh

Dword

4 byte

Group Description Table Address (LBA)

46

Country

XXh

Byte

1 byte

Language, Date, Text Format (default = 0)

47

Time Zone

XXh

Byte

1 byte

-11 to +12  (GMT = 0, default = 0)

48

Creating Year

XXXXh (CCYY)

Word

2 byte

Year in Binary Coded Decimal (BCD)

50

Creating Month

XXh

Bute

1 byte

Month in Binary Coded Decimal (BCD)

51

Creating Day

XXh

Byte

1 byte

Day in Binary Coded Decimal (BCD)

52

Creating Hour

XXh

Byte

1 byte

Hour in Binary Coded Decimal (BCD)

53

Creating Minute

XXh

Byte

1 byte

Minute in Binary Coded Decimal (BCD)

54

Creating Second

XXh

Byte

1 byte

Second in Binary Coded Decimal (BCD)

55

C. Time Mode

XXh

Byte

1 byte

0 = Standard Time, 1 = Daylight Saving

56

Last Modif. Date

XXXXXXXXh

Dword

4 byte

The Last Modification/Write Date (BCD)

60

Last Modif. Time

XXXXXXh

Byte

3 byte

The Last Modification/Write Time (BCD)

63

L. M. Time Mode

XXh

Byte

1 byte

0 = Standard, 1 = Daylight Saving Time

64

File Name

<FileName>

Char

64 byte

64 byte full or zero terminated File Name

128

File Description

Text

Char

128 byte

File Description Text

256

Reserved

?

Byte

256 byte

256 byte Reserved/Optional Data Field

512**

Reserved

?

Byte

1536 byte

Optional/Reserved Area for FS2 Files

 

* Used by TR-MULTIX (Multi User, Multi Tasking) Operation System, only!

** 1536 byte extra description for 2048 bytes per sector File System (FS2), only ! Optional !

 

NOTE: Erased/Deleted File Sign: ‘FDE’, ‘E’ at offset 2 instead of ‘T’. (Parent Dir’s Entry: FFFFFFFFh is erased entry, 0 is.end of directory entries. Other 32 bit dir. entry numbers are the 1st FDT addresses.)

 

Parent Dir. Serial used for that purpose: When a dir or file is deleted, it will be removed from parent dir entries by replacing child directory or file number to FFFFFFFFh = deleted entry sign. And, it will be located in UNDELETE Directory as a new deleted file entry. When user want to undelete this file/dir, if parent dir serial number same with in the parent directory descriptor table (as number) declared in child dir decriptor table, the deleted directory or file will be restored in the parent directory. Directory serial number is just a tick count which always different by the computer’s timer ticks. (as like as volume serial number.)

 

For the First FDT (FDT0) of every file, this 1 sector FDT structure is completely valid and used. If a file has multiple FDTs (has more than one data section on the disk), except FDT 0, next and other FDTs use or carry the first 20 bytes of FDT structure as valid. Remain items are not used or not valid. So, the first FDT (FileNumber, Offset 8) is only reference to full FDT structure for file recovery or reverse/trace procedures. (Offset 8 points the FDT 0 address , Offset 6 has the current FDT seguence number.)

 

By using only FDT0 parameters (except the first 20 bytes of FDTs),  all of FDT contents after file create, move, update (file name, path and size changements etc.) procedures are kept true/correct for all FDTs.

FDT1 and other FDTs (>0) must have valid 20 bytes on to Offset 20, then, must have ZERO bytes.

(If a file is in a single data section, only FDT0 –the 1st FDT- is used and Offset 12 of FDT0 has ZERO.)

 

ATTRIBUTES byte:

Bit 0 = Owner’s Write Permission (1= Yes, 0= No)  [ 0 => Read only file ]

Bit 1 = Owner’s Execute Permission (1= Yes, 0= No)  [ 0 => Not an executable file ]

Bit 2 = Group User’s Read Permission (1=Yes, 0= No) [ 0 => This file is not visible except the owner ]

Bit 3 = Group User’s Write Permission (1=Yes, 0= No)  [ Can be YES if Bit 0 is YES ]

Bit 4 = Group User’s Execute Permission (1=Yes, 0= No)  [ Can be YES if Bit 1 is YES ]

Bit 5 = Other User’s Read Permission (1=Yes, 0= No) [ 0 => This file is not visible except the group ]

Bit 6 = Other User’s Write Permission (1=Yes, 0= No)  [ Can be YES if Bit 0 and Bit 3 are YES ]

Bit 7 = Other User’s Execute Permission (1=Yes, 0= No)  [ Can be YES if Bit 1 and Bit 4 are YES ]