home *** CD-ROM | disk | FTP | other *** search
- Introduction
- ▓▓▓▓▓▓▓▓▓▓▓▓
- The following information is useful if the CP/M public domain disc sector
- editor DU87 is used to examine the contents of an MSDOS Oddball disc. See
- "Sector editors" in MSODBALL.DOC.
-
- DU87 terminology
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- A DU87 sector corresponds to a CP/M 128-byte logical record, not to the
- 512-byte sector which physically is written to and read from disc. Numbering
- within DU87 is hexadecimal and starts from zero (mostly):
-
- Disc, 180k type = 40 Tracks, numbered 00 to 27
- 720k type = 160 Tracks, numbered 00 to 9F
- Track = 36 Sectors, numbered 01 to 24
- Sector = 128 bytes, numbered 00 to 7F.
-
- CP/M and Locoscript
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- Disc space is allocated to files in units known as Allocation Groups (not to
- be confused with LocoScript's Groups).
-
- Formatting produces:
- 173k CP/M format: 175 1k Groups numbered 00 to AE, starting at track 01
- Data-only format: 180 1k Groups numbered 00 to B3, starting at track 00
- 706k CP/M format: 357 2k Groups numbered 000 to 164, starting at track 01.
-
- The disc directory occupies Groups 00 and 01 (173k or 178k formats), or 00 01
- 02 and 03 (706k and large-directory format).
-
- The Groups allocated to a file are listed in the file's directory entry (or
- entries).
-
- MSDOS, PCDOS, DRDOS
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- Under DOS Allocation Groups are known as clusters. A DOS Oddball disc
- contains 353 2k clusters, numbered 000 to 160.
-
- DOS Oddball disc usage in terms of DU87 track/sector numbers:
- Boot sectors 00/01 to 00/10
- File alloc table 1 00/11 to 00/1C
- File alloc table 2 00/1D to 01/04 (duplicate of FAT 1)
- Directory 01/05 to 02/1C
- File Clusters 02/1D to 9F/23 (same place as for CP/M).
-
- The first cluster in a file is indicated in the file's directory entry.
- Subsequent clusters are traced through the file allocation table. Within the
- table each cluster is allotted 1 whole + 1 half byte to indicate the next
- cluster. For an odd-numbered cluster the whole byte is suffixed with the high
- nibble from the preceding byte. For an even-numbered cluster the whole byte is
- prefixed with the low nibble from the following byte. FFF indicates the last
- cluster of a file. 000 indicates an unused cluster.
-
- A DOS sub-directory occupies clusters in the file storage area, with the
- first cluster indicated in the sub-directory entry in the parent directory. The
- first cluster of a sub-directory starts with entries '.' and '..'.
-
- The DU87 commands that deal with CP/M files, such as F (ind file) and M (ap
- disc) will be of no use with DOS discs.
-
- Conversion formulae in decimal notation.
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
- C = cluster number G = DU87 Allocation Group number
- D = DOS absolute sector number
- N = position of whole byte within FAT T,S = DU87 track,sector numbers.
-
- C = G - 2 G = C + 2
- D = 4 * C + 17 T = D div 9 S = (D mod 9) * 4 + 1
- N = (3 * C + 1) div 2 C = (9 * T + (S-1) / 4 - 17) div 4.
-
-
- Decimal (n) / Hexadecimal (xyz) conversions using pocket-calculator
- arithmetic (taking A = 10, B = 11, C = 12, D = 13, E = 14, F = 15):
- x * 16 + y * 16 + z = n / 256 - x * 16 - y * 16 =
- l l l l
- n x=int() y=int() z