SpartaDOS X Reference Manual |
Technical Information |
C h a p t e r 7 — Technical Information |
SpartaDOS Disk Format
There are four distinct types of sectors on a SpartaDOS format disk. These are boot, bit map, sector map, and data sectors. Data sectors may contain either directory data or file data. The following is a detailed discussion of each type of sector. |
||||||||||||||||||||||||||||||||||||||||||||
Boot Sectors |
As with most other DOS types for the 8-bit Atari computer, the first three sectors on the disk are boot sectors. These contain a program to load the file designated into the system when booted and other information needed to be able to store and retrieve data to and from the disk. The boot sectors are always single density, regardless of the density of the rest of the disk. Sector 1 from offset $30 to offset $7F and all of sectors 2 and 3 are the boot code that loads a file under SpartaDOS 2.x and 3.x if specified (with the BOOT command). This code is not used with SpartaDOS X. The first part of sector 1 is a data table containing the values listed below as offsets into the sector. A disk can be a floppy disk, a RAMDISK, or a hard drive partition unless otherwise specified. All two or three byte numbers are stored in standard low byte/high byte format. These are the sector 1 values, given as offsets into the sector:
|
|||||||||||||||||||||||||||||||||||||||||||
Bit Maps |
A bit map is used to determine the allocation status of each sector on the disk. Each bit in every byte in the bit map shows whether the corresponding sector is in use, so each byte represents the status of eight sectors. Bit 7 represents the first sector of each group and bit 0 represents the eighth sector of each group. The bytes are in sequential order. Byte 0 of the first bit map sector represents sectors 0 through 7 (although sector 0 does not exist), byte 1 represents 8 through 15, and so on. If the bit representing a sector is SET (1), the sector is not in use. If it is CLEAR (0), then the sector is allocated. If more than one bit map sector is needed, any additional bit maps will follow on consecutive sectors. |
|||||||||||||||||||||||||||||||||||||||||||
Sector Maps |
Sector maps are lists of the sectors that make up a file. The first two entries are the sector numbers of the next and previous sector maps of the file. The rest of the sector is a list of the sector numbers of the data sectors of the file or directory. The following are listed as offsets into the sector map:
|
Previous page |