Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mg_notes:cpm:softcard_cpm_ref [2019/09/30 18:04]
M.G. [The Apple CP/M Disk Parameter Tables]
mg_notes:cpm:softcard_cpm_ref [2019/09/30 18:29]
M.G. [The Apple CP/M Disk Parameter Tables]
Line 1313: Line 1313:
  
 ^ Offset ​ ^ Contents ^ Use ^ ^ Offset ​ ^ Contents ^ Use ^
-| 00H     | SPT 16b  | Total number of sectors per track | +| 00H     | SPT 16b  | Total number of 128-byte ​sectors per track | 
-| 02H     | BSH  8b  | Data allocation block shift factor, determined by the data block allocation size | +| 02H     | BSH  8b  | Data allocation block shift factor, determined by the data block allocation size \\ 3 -> 1K, 4 -> 2K, 5 -> 4K, ... 
-| 03H     | BLM  8b  | Data allocation block mask (2[BSH-1]) |+| 03H     | BLM  8b  | Data allocation block mask (2[BSH-1]) ​\\ 7 -> 1K, 0FH -> 2K, 01FH -> 4K, ... |
 | 04H     | EXM  8b  | Extent mask, determined by data block allocation size and number of disk blocks | | 04H     | EXM  8b  | Extent mask, determined by data block allocation size and number of disk blocks |
-| 05H     | DSM 16b  | Total storage capacity of disk drive |+| 05H     | DSM 16b  | Total storage capacity of disk drive, blocks minus one |
 | 07H     | DRM 16b  | Total number of directory entries minus one | | 07H     | DRM 16b  | Total number of directory entries minus one |
-| 09H     | AL0  8b  | Determines reserved directory blocks ​+| 09H     | AL0  8b  | Directory allocation bitmap, byte 0. 
-| 0AH     | AL1  8b  | Determines reserved directory blocks ​|+| 0AH     | AL1  8b  | Directory allocation bitmap, byte 1. |
 | 0BH     | CKS 16b  | Size of directory check vector | | 0BH     | CKS 16b  | Size of directory check vector |
 | 0DH     | OFF 16b  | No of reserved tracks at beginning of logical disk | | 0DH     | OFF 16b  | No of reserved tracks at beginning of logical disk |
Line 1351: Line 1351:
 bit of AL1, 15=lo bit of AL1.  Bits are assigned starting at bit 0 up bit of AL1, 15=lo bit of AL1.  Bits are assigned starting at bit 0 up
 until bit 15.  Suppose nbits is the number of bits set to 1: until bit 15.  Suppose nbits is the number of bits set to 1:
 +
 +
  
 ^   ​BLS ​ ^  Directory entries ​ ^ ^   ​BLS ​ ^  Directory entries ​ ^
Line 1359: Line 1361:
 |  16384 |        512  * nbits | |  16384 |        512  * nbits |
  
-Example: ​if DRM=127 (128 directory entries) and BLS=1024 bytes, there+Example: 
 + 
 +^       ​^ ​           AL0            ^^^^^^^^ ​        ​AL1 ​        ​^^^^^^^^ 
 +^  Bit  ^ 7 ^ 6 ^ 5 ^ 4 ^ 3 ^ 2 ^ 1 ^ 0 ^ 7 ^ 6 ^ 5 ^ 4 ^ 3 ^ 2 ^ 1 ^ 0 ^ 
 +^ Value | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 
 +  
 +If DRM=127 (128 directory entries) and BLS=1024 bytes, there
 are 32 directory entries per block, requiring 4 reserved blocks. ​ Thus are 32 directory entries per block, requiring 4 reserved blocks. ​ Thus
 the 4 hi bits if AL0 are set, and AL0=0FH, AL1=00H the 4 hi bits if AL0 are set, and AL0=0FH, AL1=00H