Disk Formats Explained

Disk Formats Explained


 

 

Don’t
attempt to contact the author. Unfortunately Ken Siders passed away
in August 2017…

Atari 8-bit Disk Formats

By Ken Siders, Last
Update: July 27, 1998

Disclaimer: This document is a work in
progress. Please mail any corrections to [DELETED]. Most of
this information has been derived from my work on AtrUtil, a windows
95 Disk Image Utility. Information comes from a variety of documents
and Usenet.

Atari
Dos 2.x – Single Density

Atari
Dos 2.5 – Enhanced Density

Mydos
4.5x

KBoot
Image

 Sparta
Dos

Other Dos’s

 


Atari Dos 2.x – Single Density

Sector Ranges

SectorsFunction
1 to 3Boot Sectors
4 to 359Data Sectors
360VTOC
361 to 368Directory Sectors
369 to 719Data Sectors
720Unused

Boot Sectors

On start up the first three sectors are
read and they contain information on how to boot the disk. For Atari
Dos Disks sector 1 has the following special bytes (The remaining
bytes are just the code to load DOS.SYS) :

Byte OffsetFunction
0Unused. Usually 0 for Atari Dos
1Number of sectors to boot. For Atari Dos this is 3. The first
three sectors are enough to get as loaded into memory to load the
DOS.SYS.
2 to 3Boot Load Address. For Atari Dos it is 1792 ($700)
4 to 5Initialization Address. Called after booting requested number
of sectors.
6 to 8JMP to Boot Continuation Address. This should be a 6502 jump
instruction (76/$4C) followed by the address to jump to after
booting the requested number of sectors.
9Maximim number of files that can be open at once. This value
can be set by POKEing location 1801 and writing DOS. Default is 3.
10Drive Bits. There is one bit for each drive. Bit 0 is drive
D1:, Bit 1 is Drive D2:, etc. This can be set by poking location
1803 and writing DOS. The Default is 3 to include only drives 1
and 2.

Data Sectors

Each data sector holds up to 125 bytes
of data and the remaining three bytes hold a link to the next sector,
which file the sector belongs to and how many bytes of data in the
sector. The number of bytes in the sector may be less than 125 if it
is the last sector in the file or it was the last sector in the file
before an append operation.

Byte OffsetFunction
0 to 124File Data
125 (left 6 bits)File #0 to 63 (which corresponding directory this sector
belongs to.) Incorrect values will give Error #164 (File #
Mismatch)
125 (right two bits) and 126Link to next sector. 10 bits allow for 1024 sectors. The two
bits at offset are the most significant byte.
127Number of bytes in sector. Can be up to 125 bytes.

VTOC (Volume table of
Contents)

This consists of 10 special purpose
bytes and 90 bytes used to hold a sector bit map to track used
sectors. 720 sectors / 8 bits per byte requires 90 bytes. The bytes
in the VTOC are as follows:

Byte OffsetFunction
0Dos code. This seems to be 2 for Atari Dos (Mapping the Atari
Revised Edition claims it is 0)
1 to 2Total number of available sectors on the disk (used and
unused). This should be 707 on a freshly formatted Atari Dos disk.
3 to 4Number of currently unused sectors. This can range from 0 to
707.
5 to 9Unused
10 to 99Bitmap for sectors 0 to 719. A bit value of 0 means in use, a
value of 1 means the sector is free. Sector 0 doesn’t exist.
Sectors 1 to 3 are reserved for booting the disk, sector 360 is
the VTOC, and sectors 361 to 368 are the directory sectors. Sector
720 is unused because sector 0 is used in the map, with 90 bytes
there is only enough bits to map sectors 0 through 719. The number
of available sectors can be calcualted 721-1-3-1-8-1=707 bytes.
(721 bits are used since we started counting at 0.)
100-127Unused. These should all be set to 0 so the sectors are marked
as used and therefore unavailable. Note: Mydos uses the first bit
of byte 100 to allow sector 720 to used for a total of 708 free
sectors.

Directory Sectors

Each entry is 16 bytes so there can be
8 entries per sector. There are 8 sectors, so 8 sectors times 8
entries = a maximum of 64 files.

Byte OffsetFunction
0Flag Byte
1 to 2Total number of sectors in file. Can be up to 65535 although
obviously there can only be up to 707 on the disk
3 to 4Starting sector number. Can be 1 to 65535 although obviously
the hightest usable sector is sector 719.
5 to 128 character filename padded with spaces at end
13 to 153 character filename extension padded with spaces at end

Directory Sectors Flag Byte

Five bits are used to keep various file
attributes. The normal value for an unused entry is $0. The normal
value for a non-locked properly closed file is $42. If the “Deleted”
bit is set or the “Open for Output” bit is set the file
will not appear in the directory. $43 is the normal value for a file
that was open for output but not closed. This file will not appear in
the directory and will in fact waste some sectors.

Bit/ValueFunction
0/$01File Opened for Output.
1/$02File Created by Dos 2.
5/$20File Locked (appears with ‘*’ in directory).
6/$40File In use (normal)
7/$80File Deleted

Unused Sector

Sector 720 is usused because only 90 sectors will allocated for a
bitmap and sector 0 doesn’t actually exist but wastes one of those
bytes. Mydos uses one more byte in the VTOC and can make use of
sector 720. It is the only major difference between Mydos single
density disk format and Atari single density disk format.


Atari Dos 2.5 – 1050 Double (Enhanced) Density

Sector Ranges

SectorsFunction
1 to 3Boot Sectors
4 to 359Data Sectors
360VTOC
361 to 368Directory Sectors
369 to 1023Data Sectors
1024VTOC2
1025-1040Unused

Boot Sectors

There is no difference in the special
boot bytes on a single density Atari Dos Disk and an Enhanced Density
formated disk. On start up the first three sectors are read and they
contain information on how to boot the disk. For Atari Dos Disks
sector 1 has the following special bytes (The remaining bytes are
just the code to load DOS.SYS) :

Byte OffsetFunction
0Unused. Usually 0 for Atari Dos
1Number of sectors to boot. For Atari Dos this is 3. The first
three sectors are enough to get as loaded into memory to load the
DOS.SYS.
2 to 3Boot Load Address. For Atari Dos it is 1792 ($700)
4 to 5Initialization Address. Called after booting requested number
of sectors.
6 to 8JMP to Boot Continuation Address. This should be a 6502 jump
instruction (76/$4C) followed by the address to jump to after
booting the requested number of sectors.
9Maximim number of files that can be open at once. This value
can be set by POKEing location 1801 and writing DOS. Default is 3.
10Drive Bits. There is one bit for each drive. Bit 0 is drive
D1:, Bit 1 is Drive D2:, etc. This can be set by poking location
1803 and writing DOS. The Default is 3 to include only drives 1
and 2.

Data Sectors

Each data sector holds up to 125 bytes
of data and the remaining three bytes hold a link to the next sector,
which file the sector belongs to and how many bytes of data in the
sector. The number of bytes in the sector may be less than 125 if it
is the last sector in the file or it was the last sector in the file
before an append operation.

Byte OffsetFunction
0 to 124File Data
125 (left 6 bits)File #0 to 63 (which corresponding directory this sector
belongs to.) Incorrect values will give Error #164 (File #
Mismatch)
125 (right two bits) and 126Link to next sector. 10 bits allow for 1024 sectors (Thats why
only all 1040 sectors are not available). The two bits at offset
are the most significant byte.
127Number of bytes in sector. Can be up to 125 bytes.

VTOC (Volume table of
Contents)

This consists of 10 special purpose
bytes and 90 bytes used to hold a sector bit map to track used
sectors for sectors 0 through 719 on the disk (for compability
reasons with Dos 2.0) Sector 1024 is used to track the remaining
sectors. The bytes in the VTOC are as follows:

Byte OffsetFunction
0Dos code. This is 2 for Atari Dos.
1 to 2Total number of available sectors on the disk below sector
720(used and unused). This should be 707 on a freshly formatted
Atari Dos disk.
3 to 4Number of currently unused sectors below sector 720. This can
range from 0 to 707.
5 to 9Unused
10 to 99Bitmap for sectors 0 to 719. A bit value of 0 means in use, a
value of 1 means the sector is free. Sector 0 doesn’t exist.
Sectors 1 to 3 are reserved for booting the disk, sector 360 is
the VTOC, and sectors 361 to 368 are the directory sectors. Sector
720 through 1023 are tracked in sector 1023.
100-127Unused. These should all be set to 0 so the sectors are marked
as used and therefore unavailable.

VTOC2 (Volume table of
Contents – Part II)

This is a continuation of the VTOC
since the VTOC at sector 360 would only be able to handle 944
sectors.

Byte OffsetFunction
0 to 83Repeat of sectors 48 to 719. I would only use the values in
sector 360 for these since Dos 2.0 will not update this sector if
the disk is written to.
84 to 121Bitmap of sectors 720 to 1023. Bit set equals available.
122 to 123Number of free sectors above sector 719. This should be 304 on
a freshly formatted disk.
124 to 127Unused. These should all be set to 0.

Directory Sectors

Each entry is 16 bytes so there can be
8 entries per sector. There are 8 sectors, so 8 sectors times 8
entries = a maximum of 64 files.

Byte OffsetFunction
0Flag Byte
1 to 2Total number of sectors in file. Can be up to 65535 although
obviously it can’t be anywhere near that big.
3 to 4Starting sector number. Can be 1 to 65535 although obviously
the hightest usable sector is much less.
5 to 128 character filename padded with spaces at end
13 to 153 character filename extension padded with spaces at end

Directory Sectors Flag Byte

Five bits are used to keep various file
attributes. The normal value for an unused entry is $0. The normal
value for a non-locked properly closed file is $42 if the file is
accessible from Dos 2.0. If it is not the normal value is $03. This
will keep the file from showing up under Dos 2.0. Dos 2.5 will
display this file within the “<” and “>”
symbols if the appropriate directory function is used. $43 I believe
still always indicates a file that was open for ouput and not closed
which will not show up in the directory. If the “Deleted”
bit is set or the “Open for Output” bit is set the file
will not appear in the directory.

Bit/ValueFunction
0/$01File Opened for Output. (Also will be set for Files using
sectors above sector 719 but bit 6 will not be set. This is to
make a Dos 2.5 file using extended sectors invisible to Dos 2.0)
1/$02File Created by Dos 2.
5/$20File Locked (appears with ‘*’ in directory).
6/$40File In use (normal). This will not be set if the file is
usable only by Dos 2.5 and not Dos 2.0 (It is located above the
sector 719 threshold)
7/$80File Deleted

 

Unused Sectors

Sectors 1025 to 1040 are unused because sector links are only 10
bits and can only hold a value up to 1023.


MyDos 4.5x

Sector Ranges

SectorsFunction
1 to 3Boot Sectors
4 to (360-#vtoc_sectors)Data Sectors
(360-#vtoc_sectors+1) to 360VTOC
361 to 368Directory Sectors
369 to total # sectorsData Sectors

Boot Sectors

There is no real important difference
in the special boot bytes on a MyDos disk and an Atari Dos Disk. On
start up the first three sectors are read and they contain
information on how to boot the disk. For MyDos Disks sector 1 has the
following special bytes (The remaining bytes are just the code to
load DOS.SYS) :

Byte OffsetFunction
0Unused. Usually 0.
1Number of sectors to boot. For Atari Dos this is 3. The first
three sectors are enough to get as loaded into memory to load the
DOS.SYS.
2 to 3Boot Load Address. Same as Atari Dos: 1792 ($700)
4 to 5Initialization Address. Called after booting requested number
of sectors.
6 to 8JMP to Boot Continuation Address. This should be a 6502 jump
instruction (76/$4C) followed by the address to jump to after
booting the requested number of sectors.
9Maximim number of files that can be open at once. This value
can be set by POKEing location 1801 and writing DOS. Default is 3.

Data Sectors

Each data sector holds up to
125(SD)/253(DD) bytes of data and the remaining three bytes hold a
link to the next sector, and the number of bytes in the sector. For
small images that are Atari Dos compatable, the file# is also stored
within the last three bytes. Slashes seperate single density and true
double density (256 bytes sector) values. A flag byte in the
directory indicates if the file is Atari Dos compatable or not.

Atari Dos Compatable (less than 1024 sectors)
Byte OffsetFunction
0 to 124/252File Data
125/253 (left 6 bits)File #0 to 63 (which corresponding directory this sector
belongs to.) Incorrect values will give Error #164 (File #
Mismatch)
125/253 (right two bits) and 126/254Link to next sector. 10 bits allow for 1024 sectors. The two
bits at offset are the most significant byte.
127/255Number of bytes in sector. Can be up to 125/253 bytes.
MyDos Compatable (1024 or more sectors)
Byte OffsetFunction
0 to 124/252File Data
(125 to 126)/(253 to 254)Link to next sector. All 16 bits are available allowing for up
to 65536 sectors.
127/255Number of bytes in sector. Can be up to 125/253 bytes.

VTOC (Volume table of
Contents)

The first vtoc sector consists of 10
special purpose bytes and 118 bytes used to hold a sector bit map to
track used sectors for sectors 0 through 943(max) on the disk.
Sectors 359 and down are used to store additional sectors. For
sectors 359 or less, all 256 bytes in each sector may be used on
double density disks and sectors are always allocated in pairs on
single density disks (excluding the first sector which is for Atari
Dos compatability). The bytes in the first VTOC sector are as
follows:

Byte OffsetFunction
0code indicating #of vtoc sectors code. For single density the #
of vtoc sectors is (code * 2)-3. Note: this is always an odd
number( sectors after the first vtoc sector are always allocated
in pairs).  For double density #vtoc_sectors = code-1.
1 to 2Total number of available sectors on the disk.
3 to 4Number of currently unused sectors.
5 to 9Unused
10 to 127Bitmap for sectors 0 to 943. A bit value of 0 means in use, a
value of 1 means the sector is free. Sector 0 doesn’t exist.
Sectors 1 to 3 are reserved for booting the disk, sector 360 and
possibly some below it are used to hold the VTOC, and sectors 361
to 368 are the directory sectors. Sectors above 943 are tracked in
sector 359, 358, etc.

Directory Sectors

Each entry is 16 bytes so there can be
8 entries per sector. There are 8 sectors, so 8 sectors times 8
entries = a maximum of 64 files.

Byte OffsetFunction
0Flag Byte
1 to 2Total number of sectors in file. Can be up to 65535.
3 to 4Starting sector number. Can be 1 to 65535.
5 to 128 character filename padded with spaces at end
13 to 153 character filename extension padded with spaces at end

Directory Sectors Flag Byte

Bit/ValueFunction
0/$01File Opened for Output.
1/$02File Created by Dos 2.
2/$04File doesn’t use file# in sector links (not Atari Dos
compatible)
4/$10File is actually a directory (all other bits clear except
possible bit 5.
5/$20File Locked (appears with ‘*’ in directory).
6/$40File In use (normal).
7/$80File Deleted

KBoot Disk

KBoot disks are created with my AtrUtil win 95 utility or MakeAtr
Dos utility.  They contain a minimally sized ATR image that
contains three boot sectors and the original file.  Note:
Only single density disks (128 byte sectors) are supported.
This allows each executable to be stored in an ATR file to itself
without wasting much space.  No menu disks or H: drives are
necessary, just install the KBoot ATR in drive 1 and boot.

Sector Ranges

SectorsFunction
1 to 3Boot Sectors
4 to ???Data Sectors

Boot Sectors

Sectors 1 to 3 contain necessary
information to boot the disk and load the executable file located at
sector 4 and above.
The function of the first 13 bytes of
sector one is indicated in the table, the remaining bytes of sector
one, as well as sectors two and three contain the code to load the
file.

Byte OffsetFunction
0Unused. Usually 0.
1Number of sectors to initially boot.  This is set to three
which is enough to get the loader into memory
2 to 3Boot Load Address. 1792 ($700)
4 to 5Initialization Address. Called after booting requested number
of sectors.
6 to 8JMP to Boot Continuation Address. This is a 6502 jump
instruction (76/$4C) followed by the address to jump to after
booting the requested number of sectors. This routine will then
load the actual file which is located at sectors 4 and above
9 to 11Number of bytes to load (number of bytes in original
executable)  This is a three byte value.  The least
significant byte is stored first.
12Unused.  Set to 0

Data Sectors

Each sector holds a full 128 bytes of
data — there is no sector link information stored in a sector. The
file contains all of the bytes verbatim from the original file
including the $FF $FF header, multiple load segments, initialization,
and run addresses.  The file should be processed exactly as it
would be by Dos.  The last sector may only be partially filled
and may be padded with random data.  The length to load is
determined from sector 1, bytes 9 to 11.  Extracting the
original file is easy.  If processing from an ATR file read and
verify the 16 byte ATR header.  Read the first three sectors
(384 bytes).  Get the length from bytes 9 to 11.  Read that
many bytes from the KBoot file and write to the output file.
Done.


SpartaDos

Sector Ranges

SectorsFunction
1 to 3Boot Sectors
4-?Bitmap Sectors  Does not
necessarily have to start at sector 4, the sector number is at
offset 16/17 in sector 1
variesMain Directory Sector Map
variesMain Directory
variesData Sectors

Boot Sectors

On start up the first three sectors are
read and they contain information on how to boot the disk. For
SpartaDos Disks sector 1 has the following special bytes:

Byte OffsetFunction
0Unused. Usually 0.
1Number of sectors to boot. For Atari Dos this is 3. The first
three sectors are enough to get as loaded into memory to load the
DOS.SYS.
2 to 3Boot Load Address. Same as Atari Dos: 1792 ($700)
4 to 5Initialization Address. Called after booting requested number
of sectors.
6 to 8JMP to Boot Continuation Address. This should be a 6502 jump
instruction (76/$4C) followed by the address to jump to after
booting the requested number of sectors.
7$80 for Sparta Dos.  (note: this is also the low byte of
the boot continuation adress)
9/10First sector of sector map for main directory.
11/12Total number of sectors on disk
13/14Number of free sectors on disk
15#of bitmap sectors (used to track free sectors)  One byte
is needed for every 8 sectors.
16/17Sector for first bitmap (usually 4?)
18/19First available sector (to save time from having to search
though bitmap)
20/21First available directory sector.  This is the sector the
next new directory entry will need to be added to.
22-29Volume Name (8 characters – padded with spaces)
30bits 0-6: Number of Tracks.  bit 7:Set for double sided.
31Size of sectors.  128 for 128 bytes/ 0 for 256 bytes.
32Dos major version $11 for sparta 1.1.  $20 for sparta 3.2.
38Sequence Number.  Incremented whenever a file is opened
for write?
39Random Number – filled in at format.
40/41First sector map for file being booted.
42Write Lock Flag?
43-47Reserved.

Data Sectors

The entire sector can be used for data unlike Atari Dos.
There is no link information necessary like with Atari Dos.  The
link information is maintained in the sector map for the file.

Bitmap

This is a simple map of every sector on the disk.  One bit is
used per sector so 8 bytes are available per byte.  There are as
many bytes allocated for the bitmap is as necessary to track every
sector on the disk.

Directory Sectors (root
and subdirectories)

Each entry is 23 bytes and entries can
span sector boundries.  Sectors are not necessarily contigous.
The sectors are determine from the sector map for the directory which
is simply a sector list.  The first directory entry is a special
entry that holds information about the directory itself.  It’s
format is as follows:

Byte OffsetFunction
0?
1 to 2Sector of first map of parent directory.  For the Root
directory this is 0.
3,4,5Length of directory in bytes.
6-13Directory Name (8 characters padded with spaces).  This
will be MAIN for the root directory
14-22Unused

The format of each 23 byte directory
entry is.

Byte OffsetFunction
0Flag Byte
1 to 2First sector of file’s sector map.
3,4,5Length of file in bytes.
6-13File Name (8 characters padded with spaces)
14-16File Extension (8 characters padded with spaces.)
17-22Time and Date Stamp.  Format????

Directory Sectors Flag
Byte

Bit/ValueFunction
0/$01File is Write Protecter.
3/$08Directory entry is in use.  (contains a file or directory
entry)
4/$10File has been deleted.
5/$20Subdirectory flag.

 Sector Maps

Sector maps are used for directories
and files to hold a list of sectors used for directories or files.
The sector maps sectors themselves are not necessary located in
contigous sectors.  The first four sector bytes of each map has
a pointer to the previous and next sector map.  Sector maps
allow files to be deleted or written over much faster than in Atari
Dos since the entire file does not have to be traced through.
It also allows directories to grow in size (although a limit is set I
believe which varies between the disk versions and SpartaDos X.

Byte OffsetFunction
0 to 1Pointer to next sector map.
2 to 3Pointer to previous sector map.
4 to 127/255Every 2 bytes holds a sector number for the file or directory.

ABOUT THE DISK FORMAT

by nir darey

A diskette is composed of a thin magnetic disk covered by thin plastic usually black. The cover has an open area on both sides exposing the magnetic disk surface to the drive for reading or writing. As the diskette spins in the drive, the read/write head is actually over the opening, reading/writing the disk surface like a cassette recorder would.

The diskette is divided into tracks. A track is a ring about the center of the diskette. The drive head can be positioned over any one of the tracks, and data can be readed from the surface.

A disk can be formated in different formats. Single Density format is dividing the disk into 40 tracks of 18 sectors each with 128 bytes per sector, total of 720 sectors on the disk, that give us 90 kilobytes on the disk.
Dual Density or as most known as 1050 Density, the disk is divided to 40 tracks of 26 sectors with 128 byte each, that give us 130 kb. on a disk. Double Density format is dividing the disk to 40 tracks of 18 sectors each with 256 bytes per sector for a total of 720 sector, which give us 180 kb.

Now we will talk about how data is transferred from the diskette into the computer.
A sector data is a magnetic fields that being converted into electric pulses which are fed to the floppy disk controller. The floppy disk controller is the interface between the read and write head and the drive microprocessor. The floppy disk controller performs all sector searches and uses to transfer data between the microprocessor and the physical disk.

The disk drives processor receives a full sector of data every 1/18 of a disk spin. This is about 0.0555 seconds.

About the Disk Operating System format.
DOS 2.0 format the disk at Single Density total of 720 sectors. DOS 2.5 can format the disk in Dual Density total of 1040 sectors. both formats uses sectors which contains 128 bytes of data. In DOS 2.0 there are 707 sectors free for files, and in DOS 2.5 there are 1011 free sectors. You probably ask what happened to the missing sectors ? Well the DOS uses most of those sectors as information about the disk and the files that are on the disk.

The disk sector map for DOS 2.0:

sectors : contents :
—————————-
1-3 boot information
4-369 free for files
360 VTOC
361-368 directory information
369-719 free for files
720 not used

The disk sector map for DOS 2.5 is the same as DOS 2.0 with the additions of the following:

sectors : contents :
—————————–
721-1023 free for files
1024 extended VTOC
1025-1040 not used

Now time we will examine how the DOS uses sectors to store and keep track of programs or data files.

Lets look at a DOS disk.
The first three sectors contains the boot information. Sectors 4 – 359 are free for files. Sector 360 is the VTOC. Sectors 361 – 368 are the directory information. Sectors 369 – 719 are free for files. Sectors 720 is not used. Sectors 712 – 1023 are free for files in enhanced density only. Sector 1024 is the extended VTOC for enhanced density only. Sectors 1025 – 1040 are not used.

There are three different kinds of sectors that stores information about the whole disk.
First the BOOT SECTORS. first we must understand what is a boot sector. Well, a boot sector is the first sector on a disk. the boot sector
is actually the header of the whole disk. The most important at the boot sector are it’s first six bytes. Byte zero is the boot flag, it is usually unused.
Byte 1 contains the number of sectors to be read as part of the boot process. the number can be upto 256.
Bytes 2-3 contains the start address to load the boot data.
Bytes 4-5 are the initialization address.
As for the boot sectors in the DOS disk, the boot flag is always zero, the number of boot sector are three, the address to load the boot sectors is 1792 and the initialization address is 5440.
Bytes 6-7 are the address that the computer will jump to continue load.
Byte eight is unused.
Byte nine is the number of sectors buffer ( =3).
Byte ten is the drive enable bits,
bits 0-7 equal to drives 1-8.
Byte ten is usualy 131 in decimal, in binary it’s equal to 10000011. As you can see drives 1,2 and 8 are is use.
Byte eleven is unused.
Bytes 12 and 13 are the start address for the buffers, equal to 6604.
The 14 byte indicates if there is DOS on the disk or not. If the byte is equal to zero means that there is no Dos on the disk, if the byte is 1 then DOS.SYS is on the disk.
Bytes 15 – 16 is the first sector of DOS.SYS file usualy it’s 4.
The 17 byte is the offset to sector link data, the byte is equal to 125.
Bytes 18 – 19 indicates the start of main DOS.SYS file, it’s equal to 1995
The 20 byte is the first byte of the boot data. Those values can be changed with the right tool.

Secondly the Volume Table Of Contents or as known the VTOC. The VTOC data is located in sector 360, and in this sector you can find how many sectors are free, what sector is used or unused and more. The first 10 bytes contains general information about the disk.
Byte zero is used to indicate the DOS type normally it’s equal to 2 for DOS 2.0/2.5.
Bytes one and two contains the total or sectors on the disk. For DOS 2.0 it’s 707 and for DOS 2.5 it’s 1010.
Bytes three and four contains the number or currently free sectors.
Bytes 10 to 99 contains the values representing the first 719 sector of the disk. Let me explain how it’s done: divide bytes 10 to 99 into bits. Byte 10, bit 7 is sector 0.
Byte 10, bit 6 is sector 1.
and so on…
Byte 10, bit 0 is sector 7.
Byte 11, bit 7 is sector 8.
and so on…
Byte 99, bit 0 is sector 719.
Now check if the bit is equal to one then the sector is free. If the bit is equal to zero then the sector is in use.
The rest of the bytes, bytes 100 to 127 are unused.
DOS 2.5 have an extended VTOC that located is sector 1024.
Bytes 0 to 121 represent sectors:
48-1023 the same way as before.
Byte 0, bit 7 is sector 48.
and so on…
Byte 121, bit 0 is sector 1023.
Bytes 122 – 123 contain the number or free sectors on enhanced area only.
And last the directory sectors.
There are eight sectors that are reserved for a diskette directory. Each sector able to contain up to eight files. Means the maximum number of files that can be placed on single diskette is 64.
There are 16 bytes available for each file entry.
The first byte is the flag byte. The flag byte contains the information about the condition of the file. Divide the flag byte into bits and check: If bit 0 = 1 then the file is open for output. If bit 1 = 1 the file was created by DOS 2.0/2.5.
Bits 2,3,4 are not used.
If bit 5 = 1 then the file is locked.
If bit 6 = 1 then the file is normal.
And if bit 7 = 1 then the file has been deleted.
The second and third bytes contain the total sectors of the file.
Byte 3-4 contains the starting sector number of the file.
Bytes 5-12 contains the file name,
and bytes 13-15 contains the file name extension.

And last let’s look at the files sectors. In one sector there are 128 bytes. Each file sector contains 125 bytes of file data followed by three bytes of dos information.
Bytes 0 to 124 contains the file itself, which can be data,text,basic program or anything else.
Byte 125 contains the total number of bytes that are actually used, which is normally 125.
The next two bytes (126-127) contains two pieces of information.
The first six bits of byte 126 holds the file number, the number can be from 0 to 63. for example, the first file in the directory would have the value of zero here and the second file would give the value of one.
The final two bits of byte 126 and the whole byte 127 when put together to give a 10 bit number which point the next sector of the file. This
value will be set to zero of this sector is the end of the file.

That’s all, if you have any question please contact me and i will be happy to reply.


THE BASICS OF A SECTOR

by nir darey

A disk can be formatted in different formats. Single Density, Dual density (enhanced density) and Double Density.
A sector is one of 18 sectors in a track at Single Density, and one of 26 sectors in Enhanced Density.
Because the track is a ring of magnetic disk, (means that the track is circular) there is no way to distinguish between the beginning of a track from the middle. Therefore a sector needs to be able to identify itself to the drive controller. A sector has two parts to it: the header and the data.
The purpose of the sector header is to identify itself to the drive controller. The headers are written only when the diskette is being formated, when reading or writing the drive is automatically reading the headers to know what sector it is. The sector data is the content that being reading or writing to the sector.

THE FIGURE OF THE SECTOR LAYOUT SHOULD BE PRINTED HERE

The floppy disk controller requests each byte in a turn and places it directly into the surface of the diskette. The bytes sequence is shown in the figure.
As you see in the sector there are several spaces to protect the different contents.
SPACE 1: this space should be at least 1 byte long.
SPACE 2: this space must be 17 bytes long.
SPACE 3: this space should be over nine bytes long, this is to protect the next sector header from being overwritten.
When a sector is being read the floppy disk controller is searching for the sector header. When the sector header is founded it compares the sector number and the track number to those given by the computer. If the comparison fails, the search continues. If all is correct, the floppy disk controller begins searching for the data AM. If the data AM is found within 28 bytes, the sector is been read and transferred to the computer. Now the CRC status is checked for validity.
If the sector is never found the processor will reposition the drive head in hope that the head had been on the wrong track.
The write process is identically to the read command except that when the sector is founded, a write occurs.

There are different kinds of sectors that being used in protecting the disk from being copied.

BAD or MISSING SECTOR: this error is occurred when junk data is written into the sector header.

CRC ERROR SECTOR: this error is occurred when the CRC status at the end of a sector is checked, when these bytes do not match with the data that being read from the sector a CRC error will occur.

DOUBLE SECTOR: this is occurred when two or more sectors have the same id number, if you will read the sector you will get different sets of data.

SHORT SECTOR: short sector is a sector with less then 128 bytes.

FUZZY OR PHANTOM SECTOR: when reading this sector you will get a CRC error and random data set.

DELETED DATA MARK SECTOR: this sector is a good sector but the data type flag had been changed to reflect a bad data mark.

It is almost impossible to control and change the sector header with an unmodified disk drive.

Well that’s all what i can say about the sector, please forgive me if i missed something.


FLOPPY DISK TECHNICAL INFO
————————–

By Frankenstein

There are quite some FD’s available for our Atari 8-bit. They all support several different disk formats:

Name | FDC | Formats
—————————————
Atari 810 | WD1771 | SD
Atari 1050 | WD2793/2797 | SD/ED
Atari XF551 | WD1772 | SD/ED/DD/QD

SD = Single density
ED = Enhanced density
DD = Double density
QD = Quad density

Notes:
1) FDC = Floppy Drive Controller
2) The WD1772 is also used in the Atari ST computers
3) ED is also called MD (Medium density) or ‘1050 Double
density’ (SpartaDos). Confusing….

During the years people made exotic expansion boards for the 1050 drive. Some of these make it possible to program the FDC.
Known FD expansions are: Duplicator 1050, Turbo 1050, Speedy 1050, Happy 1050, I.S. Plate 1050, Supermax 1050. They’re all able to at least read/write SD, ED and DD disks.
Let’s now take a look at the mentioned disk formats:

Density SD ED DD QD
—————————————
FDC mode FM MFM MFM MFM
Disk sides 1 1 1 2
Number of tracks 40 40 40 40
Sectors per track 18 26 18 18
Bytes per sector 128 128 256 256
—————————————
Disk space (kB) 90 130 180 360

Most drives (including all Atari 8-bit drives) use the so called soft sectored disks. This means that a track can be seen as just one long data stream. With help of markers the FDC knows where to find the right sector data in this stream. In general a track looks like this:

General track structure:
Marker | Index mark \ Start of
Gap #1 | Post index mark / track

Gap #2 | Pre address mark \
Marker | Address mark | First
Data | Sector header | Sector
Gap #3 | Post address mark |
Marker | Data address mark |
Data | Sector data |
Gap #4 | Post data mark /

The first sector is followed by the rest of the sectors which all have the same structure as the first sector. Note that the first sector doesn’t have to be numbered as sector #1. To find the right sector on a track, the FDC looks at the sector header….

Sector Header
————————–
1 byte : Track number
1 byte : Side number
1 byte : Sector number
1 byte : Sector length ID
2 bytes : CRC value

The track number ranges from 0 to 39 for all Atari 5.25 inch drives. A disk has two sides, so the side number can only be 0 or 1. The sector number ranges from 1 to 18 for SD, DD and QD, while ED sector numbers go from 1 to 26.
With help of the sector length ID you can determine the sector length in bytes, by looking at the following table:

ID | Length
—————-
$00 | 128 bytes
$01 | 256 bytes
$02 | 512 bytes
$03 | 1024 bytes

The CRC value is a checksum for the previous four bytes. The actual sector data is also followed by such a CRC value.

I’ve been able to examine all standard Atari 8-bit disk formats. The following tables are not taken from technical documents. They were found with help of a track analyser program.

Atari 1050/XF551 – Single density
=====================================
1 x $FC Index mark
16 x $00 Post index mark
————————————-
18 times
———————————–
| 6 x $00 Pre address mark
| 1 x $FE Address mark
| 1 x $xx Track number (0-39)
| 1 x $00 Side number
| 1 x $xx Sector number (1-18)
| 1 x $00 Sector length
| 2 x $xx CRC value
| 17 x $00 Post address mark
| 1 x $FB Data address mark
| 128 x $xx –sector data–
| 2 x $xx CRC value
| 14 x $00 Post data mark
=====================================

Atari 1050/XF551 – Enhanced density
=====================================
1 x $FC Index mark
50 x $4E Post index mark
————————————-
26 times
———————————–
| 12 x $00 Pre address mark
| 3 x $A1 Sync.
| 1 x $FE Address mark
| 1 x $xx Track number (0-39)
| 1 x $00 Side number
| 1 x $xx Sector number (1-18)
| 1 x $00 Sector length
| 2 x $xx CRC value
| 22 x $4E Post address mark
| 12 x $00
| 3 x $A1 Sync.
| 1 x $FB Data address mark
| 128 x $xx –sector data–
| 2 x $xx CRC value
| 18 x $00 Post data mark
| 32 x $4E
=====================================

Atari 1050/XF551 – Double density
=====================================
1 x $FC Index mark
50 x $4E Post index mark
————————————-
18 times
———————————–
| 12 x $00 Pre address mark
| 3 x $A1 Sync.
| 1 x $FE Address mark
| 1 x $xx Track number (0-39)
| 1 x $00 Side number
| 1 x $xx Sector number (1-18)
| 1 x $01 Sector length
| 2 x $xx CRC value
| 22 x $4E Post address mark
| 12 x $00
| 3 x $A1 Sync.
| 1 x $FB Data address mark
| 256 x $xx –sector data–
| 2 x $xx CRC value
| 18 x $00 Post data mark
| 32 x $4E
=====================================

I guess that the specific XF551 QD format is DD on both sides. I don’t understand why I could only look at side one of the QD disk. Side two just seem to be garbage on my 1050 FD, while the XF551 FD could use both sides without problems.

IBM – 40 tracks
=====================================
1 x $FC Index mark
50 x $4E Post index mark
————————————-
9 times
———————————–
| 12 x $00 Pre address mark
| 3 x $A1 Sync.
| 1 x $FE Address mark
| 1 x $xx Track number (0-39)
| 1 x $xx Side number (0/1)
| 1 x $xx Sector number (1-9)
| 1 x $02 Sector length
| 2 x $xx CRC value
| 22 x $4E Post address mark
| 12 x $00
| 3 x $A1 Sync.
| 1 x $FB Data address mark
| 512 x $xx –sector data–
| 2 x $xx CRC value
| 80 x $4E Post data mark
=====================================

Some FDC commands
—————–
FDC Command $F5: This puts three bytes $A1 on disk and starts CRC (Checksum) generator (MFM mode only).
FDC Command $F6: Just writes one byte $C1 (MFM mode only).
FDC Command $F7: Writes the two CRC bytes on disk (FM and MFM mode).

Sector data
———–
On all Atari disk formats the sector data is stored inverted. The software in the floppy O.S. takes care of this by using ‘EOR #%11111111’.
This is only true for sector data! Gap bytes, marks etc. are normally stored, so you don’t have to invert those. Sector data on IBM disks is not inverted at all.

Sector interleave
—————–
An FDC needs a little time to send sectordata to a buffer. During this time the disk keeps spinning at about 300 rpm. So, when a sector is recieved, the FDC has to wait for the next sector to pass by. To avoid the waiting the disk has to be interleaved. By sector interleaving sectors are placed on the disk in the most efficient order. E.g. if it takes less than half a rotation to send data to the buffer, it’s wise to use an interleave factor which is equal to the total sectors on the track divided by two. When the sectors are positioned in a normal sequence (0, 1, 2 etc) the interleave factor is 1. The interleave factor can be defined as the amount of sectors between two successive sector numbers plus one.

For SD and ED the interleave factor is in fact half of the total amount of sectors on the track:

SD – 1050/XF551:
18 sectors per track
Interleave factor: 9
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25,
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26.

ED – 1050/XF551:
26 sectors per track
Interleave factor 13
1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25,
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26.

I discovered two different interleave factors for DD (the interleave factor is sometimes revered to as ‘sector skew’). The first one is ‘fast’ for 1050 read/write operations and the second makes things faster for the XF551 FD.

DD – 1050:
18 sectors per track
Interleave factor 15
6, 12, 18, 5, 11, 17, 4, 10, 16,
3, 9, 15, 2, 8, 14, 1, 7, 13.

DD – XF551:
18 sectors per track
Interleave factor 9
1, 3, 5, 7, 9, 11, 13, 15, 17,
2, 4, 6, 8, 10, 12, 14, 16, 18.

IBM disks doesn’t need sector interleaving on FD’s. Eh well, in such case the interleave factor is just 1.
1, 2, 3, 4, 5, 6, 7, 8, 9.

Custom sector interleaving
————————–
There are two ways to increase the disk load speed with help of custom sector interleaving;

1) Hardware interleaving:
With special hardware (like happy or speedy) we can format a disk, using the most efficient sector interleave.

2) Software interleaving:
By loading the sectors in the order which corresponds to the most efficient sector interleave.

Since we’re dealing with lots of different floppy drives, there’s no such thing as ‘the ideal sector interleave’. Therefore it’s not recommended to use hardware interleaving. A disk with a fast-load interleave for the XF-551 drive will load extremely slow on a 1050 drive. However, software interleaving can be useful. When we’re going to use this we have to keep in mind that a normal formatted disk already has a certain sector interleave.

It would be possible to make a program which can determine the best read/write interleave by measuring the time between the reading or writing of two sectors on the same track. We also have to keep in mind that the sio (serial I/O) routines in the operating system are too slow for small interleave factors. E.g. the XF-551 drive is able to load using a sector interleave of 7, but this is only possible if the baud rate is adjusted

Sector shifting
—————
Moving the read/write-head to the logical following track takes a small amount of time. Sector shifting can be helpful to make the ‘change track’ a little faster. For example, if the last sector from a track is read, the head moves to the next track. While the head moves, the disk keeps rotating and skips, let’s say 25% of the total sectors. Wouldn’t it be nice if the first sector of the next track was positioned right on the place where the head is after moving? An example explains a lot:

track 0:
1, 2, 3, 4, 5, 6, 7, 8, 9
track 1:
4, 5, 6, 7, 8, 9, 1, 2, 3
track 2:
7, 8, 9, 1, 2, 3, 4, 5, 6
etc….

After a little experimenting I discovered that the XF-551 moves faster from track to track compared to a 1050 drive. Try to measure the time between sector 26 (the last sector on track 0) and a sector from the next track (track 1) of a normal ED disk.

Finally….
———–
This article is finished. I hope there aren’t too much mistakes. If there’s anything which make you scratch your forehead, let me know.

I’m very interested in knowing more about different FD’s. I’ve heard a lot about the INDUS GT, but I never got my hands on one. Someone out there who can tell us something about this drive? If there are any Polish Atarians reading this, I would like to know more about all those fantastic FD’s you have in Poland (like TOMS Multi drive, CA-2001 and LDW 2000). Just write something about it.

Freddy


FLOPPYTYPE IDENTIFICATION
————————-

by Karsten Schmidt (Chip Special)

So many various types of floppydrives like for our hot loved XL/XE doesn’t exist for every homecomputer. But ATARI was busy in the “good old time” and also other firms and persons have developed more or less well enhancements and absolute new types of floppies. So the most common drives are:

* ATARI 1050
* ATARI 1050 + SPEEDY/HAPPY
* ATARI 1050 + Turbo 1050
* ATARI 1050 + US Doubler
* ATARI XF551
* F2000 (II) and
* HDI (High Density Interface for 3.5″ floppies by Erhard Puetz)

During coding my diskeditor I had this stupid idea to show the name of the current diskdrive. Of course there’re also more important things like that, where it’s pretty nice to know the type of the connected floppy. But now the question was: How to realize it?

1. XF 551
———
Well, fortunately the OS supports us with a very powerful SIO-command: GET STATUS ($53) Many of you probably don’t know, how flexible this nice command is. Beside the current density of the disk, you can identify e.g. the XF551 too. After receiving the STATUS-command every floppy sends 4 Bytes back to the XL. But only the third byte is significiant for our purposes, it contains the timeout value for formatting a disk. If this value is $FE, then it’s sure, that this drive is a ATARI XF551. A very positive effect would be, if we now activate the intern “speeder” of this drive by setting a higher datatransfer rate:

INIT_HS LDA #IRQ
STA $20A
STX $20B
RTS
IRQ LDA #$10
STA $D204
JMP $EB2C

2. SPEEDY/HAPPY enhancement
—————————
To realize a SPEEDY or HAPPY (it’s nearly the same in this case) we use the commands GET SIO-LENGTH and SEND SIO ($68/$69). If there occurs an error, we know that there’s no SPEEDY. Else we can load the High-Speed-SIO and work with this routine instead of $E459 (use this highspeed-sio only when transfering
sector datas!):

LDX #11
COPY LDA SIOTAB,X
STA $0300,X
DEX
BPL COPY
JSR $E459
BMI NOSPEEDY
INC $0302
LDA #$40
STA $0303
LDA #HSSIO
STA $0304
STX $0305
JSR $E459
BMI NOSPEEDY
RTS
SIOTAB DFB $31 FLOPPY ID.
DFB 1 DRIVE #
DFB $68 GET SIOLENGTH
DFB $40 READ STATUS
DFW $0308 BUFFERADDRESS
DFB 7 TIMEOUT
DFB 0 DUMMYBYTE
DFW 2 DATALENGTH (1 WORD)
DFW HSSIO NEW SIO ADDRESS
;
HSSIO . FROM HERE THE
. NEW SIO-ROUTINE
.

3. Floppy 2000 II
—————–
Surely you think, this floppy is also a speedy drive, but we can specify it more exactly with the SIO-command GET SIOSPEED ($3F). A common SPEEDY drive uses the value $09 as timer for data transfers. However the F2000 works with the value $0A. But it doesn’t mean, that the F2000 is slower than a normal SPEEDY, because the F2000 works with an higher system tactrate, namely exact 1.04 MHz. The value for a normal 1050 is $28 (in some literature it’s said, this value is $10. But that’s false!!!).

4. HDI 3.5″
———–
This floppy controller is very popular in Germany. It allows to connect up to 4 HD drives and furthermore it’s compatible with the legendary HAPPY enhancement. To realize this type, we have to use the command GET DRIVECONFIGURATION ($4E). In that configuration table the 2nd byte (of 12) is interesting for us. It stands for the STEP RATE of the drive and is $02 if an HDI is connected (else $01).

LDX #11
COPY LDA PERCOM,X
STA $0300,X
DEX
BPL COPY
JSR $E459
BMI NORM1050
LDA BUFFER+1
CMP #2
BNE NO_HDI
.
.
.
SIOTAB DFB $31 FLOPPY ID.
DFB 1 DRIVE #
DFB $4E GET PERCOM
DFB $40 READ STATUS
DFW BUFFER BUFFERADDRESS
DFB 7 TIMEOUT
DFB 0 DUMMYBYTE
DFW 12 BLOCKLENGTH
DFW 0 THING OF NO
INTEREST
BUFFER DFW 0,0,0,0,0,0

How you can realize the US Doubler and the Turbo 1050 I don’t know, but if YOU know it, please write me a small letter (address at the end of this article)!!!

Before I finish this text, I also want to add some info about the density inquiry with the command $53 (see also XF551). In the highest three bits of the first statusbyte we can read the density of the current disk in drive. Therefor we have to mask all other bits at first (AND #$E0). Now there’re following possible combinations:

value density

$20 double
$40 single
$60 quad
$80 medium

(Some people say that bit 6 isn’t used, but that’s not true how
I found out…)
As you perhaps know the XF has big problems with realizing the density. It sends also $60 to the ATARI if the disk is only in double density. So you have to try to read a sector (e.g. $5A0) from the backside, to find out if it’s double or quad! ATTENTION! You have to wait at least 5/50 seconds between executing GET STATUS and try to read this sector!!!

So. All clearnesses removed? I hope so… :-)

If questions or anything else,write to:

Chip Special Software
Karsten Schmidt
Paul-Bertz-Str.107
O-9044 Chemnitz


From:
st 11:04
Subject: SpartaDOS disk layout

Hi!
According to the knowledge and documentation I’ve got,
the SpartaDOS disk layout looks roughly like this:

———————————————————————
— —
— G e n e r a l D i s k I m a g e L a y o u t —
— —
———————————————————————

+—————————————————————+
| 1 Boot sector (always 128 bytes/sector)
| . . . . . . . . . . . . . . .
| pos. thru description
| 7 hex 80, indentifies SpartaDos
| 9 10 sector link sector of “main” directory
| “0500” means sector 5
| 11 12 nr of sectors on disk
| 13 14 nr of free sectors
| 15 nr of bitmap sectors
| 16 17 sector nr of 1st bitmap sector
| 18 19 1st free data sector nr
| 20 21 1st free directory sector nr
| 22 29 volume name
| 31 disk sector size
| 128 bytes/sector = hex 80 = decimal 128
| 256 bytes/sector = hex 00 = decimal 0
| 32 disk format version
| SpartaDOS version 1.x = hex 11 = decimal 17
| SpartaDOS version 2.x = hex 20 = decimal 32
| BeWe-DOS can only access disks formatted with
| SpartaDOS 2.x and up
| 33 37 Reserved for different SpartaDOS versions
| 38 Sequential number of the disk, which is
| incremented when making changes to the disk
| when you’re using BeWe-DOS
| 39 Random number of the disk. This number is
| created while formatting the disk
| 40 41 DOS boot start at sector nr
| 42 47 Reserved for different SpartaDOS versions
|………………………………………………………
| 2 remaining Boot sectors (always 128 bytes/sector)
+—————————————————————
| 1 thru 3 Bitmap sectors
| . . . . . . . . . . . . . . .
| disk sector sector bitmap disk
| type count size sectors size
| single 720 128 1 92 KB
| medium 1,040 128 1 133 KB
| double 720 256 1 184 KB
| quad 1,440 256 1 368 KB
| 720 KB 2,880 256 1 720 KB
| 1.44 MB 5,760 256 2 1.44 MB
| harddisk 65,535 256 3 16 MB
+—————————————————————
| n number of VTOC sectors
| . . . . . . . . . . . . . . .
| VTOC sector
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| . contains n VTOC entries .
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| . sector link sector .
| . contains 62 sectors pointers .
| . for single density .
| . or 126 sectors pointers .
| . for double density .
| ./////////////////////////////////////////////////////.
| . pos. description .
| . 1 sector nr of next link sector .
| . 3 sector nr of prev link sector .
| . 5 vtoc link sector nr 1 .
| . 7 vtoc link sector nr 2 .
| . nnn vtoc link sector nr … .
| . 126 vtoc link sector nr 62 .
| . or 254 vtoc link sector nr 126 .
| ……………………………………………….
| . VTOC data sector(s) .
| ……………………………………………….
| . sector link sector .
| ./////////////////////////////////////////////////////.
| . pos. description .
| . 1 sector nr of next link sector .
| . 3 sector nr of prev link sector .
| . 5 vtoc link sector nr 1 .
| . 7 vtoc link sector nr 2 .
| . nnn vtoc link sector nr … .
| . 126 vtoc link sector nr 62 .
| . or 254 vtoc link sector nr 126 .
| ……………………………………………….
| . VTOC data sector(s), etc. .
| . . . . . . . . . . . . . . . . . . .
| . SpartaDOS supports a maximum of 126 entries.
| . . per directory .
| . SpartaDOS/X supports a maximum of 1024 entries.
| . . per directory .
| . BeWe-DOS supports a maximum of 1424 entries.
| . . per directory .
| ./////////////////////////////////////////////////////.
| . . VTOC very first entry .
| . ……………………………………….
| . . pos. description .
| . . 1 Status byte .
| . . hex 28 indicates dir entry .
| . . bit settings: “00101000” .
| . . ||| | .
| . . Directory entry–+|| | .
| . . Deleted entry —+| | .
| . . Active entry —-+ | .
| . . File protected ——-+ .
| . . “0”=False, “1”=True .
| . . 2 sector nr of previous dir .
| . . 4 VTOC directory size in bytes .
| . . 7 directory name .
| . . 18 hex 00 00 00 00 00 00 .
| . .////////////////////////////////////////////.
| . . VTOC entry directory .
| . ……………………………………….
| . . pos. description .
| . . 1 Status byte .
| . . hex 28 indicates dir entry .
| . . bit settings: “00101000” .
| . . 2 sector nr of dir VTOC sector .
| . . 4 hex 00 00 00 .
| . . 7 directory name .
| . . 18 date/time stamp .
| . .////////////////////////////////////////////.
| . . VTOC entry file .
| . ……………………………………….
| . . pos. description .
| . . 1 Status byte .
| . . hex 08 indicates file entry .
| . . bit settings: “00001000” .
| . . 2 sector nr where data starts .
| . . 4 file size .
| . . 7 file name .
| . . 18 date/time stamp .
+—————————————————————
| n number of File sectors
| . . . . . . . . . . . . . . .
| File sector
| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| . sector link sector .
| . contains 62 sectors pointers .
| . for single density .
| . or 126 sectors pointers .
| . for double density .
| ./////////////////////////////////////////////////////.
| . pos. description .
| . 1 sector nr of next link sector .
| . 3 sector nr of prev link sector .
| . 5 data link sector nr 1 .
| . 7 data link sector nr 2 .
| . nnn data link sector nr … .
| . 126 data link sector nr 62 .
| . or 254 data link sector nr 126 .
| ……………………………………………….
| . data sector(s) .
| ……………………………………………….
| . sector link sector .
| ./////////////////////////////////////////////////////.
| . pos. description .
| . 1 sector nr of next link sector .
| . 3 sector nr of prev link sector .
| . 5 data link sector nr 63 or 127 .
| . 7 data link sector nr 64 or 128 .
| . nnn data link sector nr … or … .
| . 126 data link sector nr 124 or 188 .
| . or 254 data link sector nr 252 .
| ……………………………………………….
| . data sector(s), etc. .
+—————————————————————

If you for one reason or the other disagree, please let me (and others)
know why that is, and post a reply.
Thank you.
___ Blue Wave/386 v2.30