Block availability map
In
In terms of Commodore DOS (CBM DOS) compatible disk drives, the BAM was a data structure stored in a reserved area of the disk (its size and location varied based on the physical characteristics of the disk). For each track, the BAM consisted of a bitmap of available blocks and (usually) a count of the available blocks. The count was held in a single byte, as all formats had 256 or fewer blocks per track. The count byte was simply the sum of all 1-bits in the bitmap of bytes for the current track.
The following table illustrates the layout of Commodore 1541 BAM. The table would be larger for higher-capacity disks (described below).
Total byte | Bitmap byte 1 | Bitmap byte 2 | Bitmap byte 3 | |
---|---|---|---|---|
Track 1 | blocks available | Blocks 0-7 | Blocks 8-15 | Blocks 16-23 |
Track 2 | blocks available | Blocks 0-7 | Blocks 8-15 | Blocks 16-23 |
... | ... | ... | ... | ... |
Track 35 | blocks available | Blocks 0-7 | Blocks 8-15 | Blocks 16-23 |
The bitmap was contained in 3 bytes for Commodore 1541 format (
In the bitmap of any format, a 1
Storage devices by Creative Micro Designs, intended for use with CBM computers, also used a Block Availability Map which served the same purpose. However, these devices (FD-2000, FD-4000, and CMD-HD) did not include a count byte, and the bits in each byte were reversed (high-bit first). Although the bits were reversed (compared to CBM formats), the bytes were still stored in the same order (low-byte first).[9]
Bitmap byte 1 | Bitmap byte 2 | ... | Bitmap byte 32 | |
---|---|---|---|---|
Track 1 | Blocks 0-7 | Blocks 8-15 | ... | Blocks 248-255 |
Track 2 | Blocks 0-7 | Blocks 8-15 | ... | Blocks 248-255 |
... | ... | ... | ... | ... |
See also
- File Allocation Table (FAT)
- Design of the FAT file system
- Free space bitmap
References
- ISBN 0-916439-01-1.
- ^ 1541 User's Guide. Commodore Business Machines. 1982. p. 9.
- ^ 1571 User's Guide. Commodore Business Machines. 1985. p. 23.
- ^ 1581 User's Guide. Commodore Business Machines. 1987. p. 34.
- ^ FD Series User's Manual. Creative Micro Designs. 1992. p. 108.
- ^ 1541 User's Guide. Commodore Business Machines. 1982. p. 65.
- ^ 1571 User's Guide. Commodore Business Machines. 1985. pp. 108–109.
- ^ 1581 User's Guide. Commodore Business Machines. 1987. pp. 119–120.
- ^ FD Series User's Manual. Creative Micro Designs. 1992. pp. 112–114.