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

OWNER: ERDOĐAN TAN / Istanbul / Turkiye

 

DIRECTORY DESCRIPTION TABLE Format of  SINGLIX FS1, FS2 file systems

 

Offset

Item

DATA

Type

Size

Description of Item

0

DDT Sign

‘DDT’

Char

3 byte

TR-SINGLIX Directory Description Table

3

FS DDT Version

XXh

Byte

1 byte

Must be 0 for Current/This DDT Version

4

Sector Size

XXXXh

Word

2 byte

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

6

DDT Number

XXXXh

Word

2 byte

DDT (Sequence) Number of This Dir.

8

Directory Number

XXXXXXXXh

Dword

4 byte

The 1st DDT Address of This Dir.  (LBA)

12

Next DDT Number

XXXXXXXXh

Dword

4 byte

DDT 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 Dir. (LBA)

24

Parent Dir Serial

XXXXXXXXh

Dword

4 byte

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

28

Directory Serial

XXXXXXXXh

Dword

4 byte

Directory Serial Number (Tick Count)

32

Entry Size

04h

Byte

1 byte

Directory Entry Size (= 4 bytes)

33

Reserved

XXh

Byte

1 byte

Reserved (Sub Directory Level)

34

Directory Type

XXXXh

Word

2 byte

Major, Minor Type Descriptor of This Dir.

36

CheckSum

XXh

Byte

1 byte

DirectoryName 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

XXXXXXXXh

Word

2 byte

Year in Binary Coded Decimal (BCD)

50

Creating Month

XXh

Byte

1 byte

Month in Binary Coded Decimal (BCD)

51

Creating Day

XXh

Byte

1 byte

Day in Binary Coded Decimal (BCD)

52

Creating Hour

XXXXh (CCYY)

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

Directory Name

<FileName>

Char

64 byte

64 byte full or zero terminated Dir. Name

128

Dir. Description

Text

Char

128 byte

Directory 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) Operating System, only!

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

 

NOTE: Erased/Deleted Dir. Sign: ‘DDE’, ‘E’ at offset 2 instead of ‘T’. (Parent Dir’s Entry: FFFFFFFFh is erased entry, 0 is end of directory entries.) Directory entries are the 1st FDT or DDT addresses of files or child/sub directories. (32 bit sector offset number which is > 0 and < FFFFFFFFh)

 

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

 

By using only DDT0 parameters (except the first 20 bytes of DDTs),  all of DDT contents after directory create, move, update (directory name, path and size changements etc.) procedures are kept true/correct for all DDTs. DDT1 and others must have valid 20 bytes on to Offset 20, then, must have ZERO bytes.(If all directory entries are in a single data section, only DDT0 is used and Offset 12 of DDT0 has ZERO.)

 

ATTRIBUTES byte:

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

Bit 1 = Owner’s Execute Permission (Always 0)

Bit 2 = Group User’s Read Permission (1=Yes, 0= No) [ 0 => This dir. 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 (Always 0)

Bit 5 = Other User’s Read Permission (1=Yes, 0= No) [ 0 => This dir. 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 (Always 0)