|
PROJECT:
SINGLIX Operating System Issue:
4 Revision: 12 Date: 19/05/2009 OWNER:
ERDOĐAN TAN / Istanbul / Turkiye |
|||||
|
|
|||||
|
ROOT DIRECTORY DESCRIPTION TABLE format of SINGLIX FS1,FS2 file systems |
|||||
|
|
|||||
|
Offset |
Item |
DATA |
Type |
Size |
Description of Item |
|
0 |
RDT Sign |
‘RDT’ |
Char |
3 byte |
TR-SINGLIX Root Directory Descriptor |
|
3 |
FS RDT Version |
XXh |
Byte |
1 byte |
Must be 0 for Current/This RDT Version |
|
4 |
Sector Size |
XXXXh |
Word |
2 byte |
Bytes per Sector (FS1=512, FS2=2048) |
|
6 |
RDT Number |
XXXXh |
Word |
2 byte |
RDT (Sequence) Number of Root Dir. |
|
8 |
Directory Number |
XXXXXXXXh |
Dword |
4 byte |
The 1st RDT Address of Root Dir. (LBA) |
|
12 |
Next RDT Number |
XXXXXXXXh |
Dword |
4 byte |
RDT address of the next section (LBA) |
|
16 |
Sector Count |
XXXXXXXXh |
Dword |
4 byte |
Number of Sectors in this section |
|
20 |
Beginning Sector |
XXXXXXXXh |
Dword |
4 byte |
Volume Beginning Sector (LBA) Addr. |
|
24* |
Reserved |
XXXXXXXXh |
Dword |
4 byte |
Reserved for TR-MULTIX (must be 0) |
|
28 |
Volume Serial No. |
XXXXXXXXh |
Dword |
4 byte |
Volume (Root Dir.) Serial No. (Tick Count) |
|
32 |
Entry Size |
04h |
Byte |
1 byte |
Directory Entry Size ( = 4 bytes) |
|
33 |
Reserved |
00h |
Byte |
1 byte |
Reserved (Must be ZERO) |
|
34* |
Reserved |
12 bytes |
Byte |
12 byte |
Reserved for TR-MULTIX (must be 0) |
|
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 |
Volume Name |
64 Chars |
Char |
64 byte |
FS Volume Name String (Zero Padded) |
|
128 |
Reserved |
? |
Byte |
128 byte |
128 byte Reserved/Optional Data Field |
|
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: Root Dir. Entry: FFFFFFFFh is erased
entry, 0 is end of root dir. entries. Root dir. entries are the 1st FDT or DDT
addresses of files or sub dirs. (32 bit sector offset number which is > 0
and < FFFFFFFFh) Root directory is the parent directory of all
sub directory level 1 signed directories (of course if they are recorded in
root directory entries.) Directory Description Table Offset 33 is for Sub
Directory Level. The ZERO value at RDT Offset 33 shows it is ROOT directory
(also ‘RDT’ identifier shows that). The Operating System Software/Kernel or a
program which uses this SINGLIX FS, must check the letter “R” and “DT”
letters at the beginning of directory descriptor table. (At Offset 0, “D” for
sub directories, “F” for files. “DE” shows that directory/files is actually
deleted, can not be undeleted because of it is removed from UNDELETE
directory. And Disk Allocation Table shows the sectors of that directory/file
as DELETED/FreeForUse. When the file/directory is in UNDELETE/restore
directory, Disk Allocation Table pointers point that directory/file sectors
as normal dir/file allocated sectors as decription table or dir/file data.)
When SINGLIX FS freesectors will be calculated, only Disk Allocation Table
pointers will be used for calculation. For example: the DAT pointer bytes
with ZERO value (absolute free/unused sector) or a “Free For Use” or
“Deleted” value shows free sectors. Root/Parent Dir. Serial used for that purpose:
When a dir or file is deleted, it will be removed from root/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, if parent dir serial number
same with in the parent directory descriptor table (as number) declared in
child dir/file decriptor table, the deleted directory or file will be restored
in the root directory. Directory serial number is just a tick count which
always different by the computer’s timer ticks. (as like as volume serial
number.) That checkup is performed for preventing
accidental/wrong restore operations. Because, a directory can be deleted,
then, a new directory description table can be created on same disk sector,
only serial number check (because of serial number is the timer tick count)
will provide determining of that DDT is actually the parent directory’s
description table or a new directory description table. Also, Root Directory
Serial Number is (same with) Volume (File System) Serial Number. Root
Directory Serial Number is not neeed for undelete procedure. (There is only
one root directory in a FS and it can not be deleted.) |
|||||