File systems

 DOS 2 File System

Boot Sector

Sectors from 1 to 3 contain boot record.

VTOC

Sector 360 contains Volume Table of Contens. Bytes $3 and $4 contain number of sectors available. At byte 10 there's Volume Bitmap. Each byte tells status of 8 sectors. When bit is on, sector is available.

Directory

Sectors 361 thru 368 contain the disk directory. Each sector holds eight file names. Offset Description
$00 Flags
bit 0 Opened for output
bit 5 File locked
bit 6 File in use
bit 7 File deleted
$01-$02 Number of sectors in file (little endian)
$03-$04 Starting sector of file (little endian)
$05-$0C Filename (padded by spaces)
$0D-$0F Extension (padded by spaces)

Sector 720 cannot be accessed with DOS 2.0

File sectors

First 125 bytes of sector contain data. Byte 126 contains file number in high six bits. Byte 127 and low two bits of byte 126 contain forward pointer. Byte 128 contains number of bytes in sector, highest bit flags end of file.

 DOS 3 File System

Boot sector

Sectors $01-$09 is boot sector.
$0A-$0F are empty.

Directory

$10-$17 are directory. I don't know what's first entry, containing $0E empty bytes and $7F $A5 at the end (for MD) and $57 $A5 for SD.

Offset Description
$00 Flags
bit 0 Unknown
bit 1 Unknown
bit 2 Unknown
bit 3 Unknown
bit 4 Unknown
bit 5 Unknown
bit 6 Unknown
bit 7 Unknown
$01-$08 Filename (padded by spaces)
$09-$0B Extension (padded by spaces)
$0C Number of blocks (8 sectors)
$0D Starting block
$0E-$0F Length of file in bytes

FAT

Sector $18 is FAT. Maximum number of blocks that could be allocated is $7F.

This format is just guessed.

(c) 1998-2004 Jindroush