home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
f
/
fmt-1722.zip
/
FMT.DOC
next >
Wrap
Text File
|
1992-03-13
|
35KB
|
762 lines
┌────────────────────────────────┐
│ ┌────────────┐ │
│ │FMT Ver 1.00│ │
│ │ MANUAL │ ┌┘
│ └────────────┘ └┐
│ │
│ ▄████▄ │
│ ██████ │
│ ▀▀▀▀ ▀ │
│ ▐▌ │
│ ██ │
│ ██ │
│ ██ │
│ ▐▌ │
└───────▀────────────────▀───────┘
─── A high-capacity floppy formatter ───
██████████████
▐▌ Features ▐▌
██████████████
■ Maximum formats : 360K diskette = 820K ∙ 720K diskette = 1066K (NEW!)
1.2M diskette = 1476K ∙ 1.44M diskette = 1722K
■ Most extended formats can be made bootable
■ An extended boot sector will boot C: if you leave floppy in A:
■ Options to change logical disk organization:cluster size & root dir capacity
■ Allows to create new named formats to save typing
■ Fast and quite format : drive doesn't play music when marking bad clusters
■ A lot of low-level options for programmers
███████████████████████████████
▐▌ Requirements and limitations▐▌
███████████████████████████████
FMT needs at least an AT to run. Moreover, it was tested only with high-density
drives. It *should* work with DD drives, but you might need to play with
options. 2.88M drives are not supported.
The reason for the mess is that I had to figure out how diskette BIOS work by
experiment. Obviously, experiments were limited by my computer & those of my
several friends. I couldn't find a good book covering diskette operations...
I'll work on compatibility of the next versions of FMT. In the meanwhile, I'll
be very grateful if you let me know about the bugs/compatibility problems of
this program. I am sure that version 1.00 has a plenty! Also, this file is not
debugged for grammer errors.
████████████████████
▐▌ Distributing FMT ▐▌
████████████████████
You can distribute FMT freely as far as it's copied in original form or you
clearly document all changes you have made. No fee should be charged for the
program, but you can charge a small fee for distribution.
FMT is released as shareware: you can try it for free; if you decide to use
it, you are encouraged to register for $15 or whatever you think this program is
worth. This is my first shareware program. It will be interesting to see what
happens.
██████████████
▐▌ Finding me ▐▌
██████████████
This is an interesting question. Now I am studying in Boston University and live
on campus, so my current address is valid only to the end of semester (Approx.
middle of May 1992). I give it anyway:
e-mail : kibirev@CSA.BU.EDU
phone : (617)352-5563
mail : Oleg Kibirev, 277 Babcock street Box 1869, Boston MA 02215, USA
Please, don't send anything to this address unless you have checked that I am
still here by phone or e-mail.
Now my home address:
Oleg Kibirev ĽÑú è¿í¿αÑó
Ilycha 7 Flat 42 π½. ê½∞¿τá 7-42
Novosibirsk 630090 ú. ì«ó«ß¿í¿α߬,630090
Russia
██████████████
▐▌ ─ Thanks ─ ▐▌
██████████████
It would be impossible for me to write this program without studying 2 other
products.
The first is FDFORMAT, the floppy formatter written by Christoph H. Hochstätter.
I have used a lot of good ideas from this program in FMT. The important ones
are:
Idea to use interleave = 2 to fit more sectors on a track
Extended boot sector that boots C: instead of A:
Sector spinning to improve disk performance
Loading BIOS extender to HMA with DOS 5.00
Another one is 800.COM, a tiny TSR by Pasquale Alberto. This program extends
diskette BIOS, so that most extended formats can be handled by DOS standard
FORMAT, DISKCOPY & DISKCOMP. Studying it's code helped me to understand how
to implement high-capacity formats and write a TSR to make them readable by DOS.
██████████████
▐▌ INT13X.COM ▐▌
██████████████
You need to load this TSR to make full use of FMT. The simplest way is to run
it from AUTOEXEC.BAT, or, with DOS 4+, INSTALL it from CONFIG.SYS. Memory
requirements of INT13X shouldn't cause a problem. If you have DOS 5 running in
HMA, INT13X will load to the end of the DOS segment, keeping no memory. DOS
will even bother to toggle A20 line for me! Otherwise, it will keep 160 bytes.
The only option of INT13X is LOW, that will prevent it from loading to HMA. Use
if you have any problems without it. You can end up with a strange combination
LOADHIGH INT13X LOW
If you make a diskette with extended format bootable, make sure that it runs
INT13X during startup. Otherwise, the floppy may become unreadable after the
first disk change.
Note that other disk BIOS extenders will not support a 3½" DD diskette with
11-13 tracks.
█████████████
▐▌─── FMT ───▐▌
█████████████
Running the program with empty command line will display the summary of options.
The only mandatory parameter is drive letter - A: or B:.
You can stop FMT at any time by two ways. The first is pressing ESC. This is
an option for brave - the program will stop even in the middle of DOS or BIOS
call. FMT will perform cleanup needed to avoid trouble in this case. However,
there are some popup TSRs that refuse to popup if INT 13H never returns. You
can defeat the problem by running I13S.COM before & I13R.COM after TSR.
Alternatively you can just open drive door.
Here is the summary of FMT options. Logical options (like /V or /W) can be
disabled by adding '-'. With all options that takes a number, you can specify a
hex by omitting ':'. For example : /DF9 == /D:249.
It's Ok to specify the option several times - the last occurrence will determine
the result. This can be useful with "named formats" (see CONFIG.FMT section) or
batch files.
╔═══════════════════════════════════════════════╤════════════════════════════╗
║ /T:xx - Number of tracks │ /G:xx - Gap length ║
║ /N:xx - Sectors per track │ /I:xx - Interleave ║
║ /F:name - Use named format │ /M:xx - BIOS media byte ║
║ /V"label" - Set volume label │ /L:xx - Format fill char ║
║ /S<:boot> - Copy system to floppy │ /Z:xx - Retry count ║
║ /Q - Quick format (Fast DEL *.*) │ /W - Write verify ║
║ /E - Test (do everything but format) │ /R:xx - Root directory size║
║ /B - Batch mode (no output/prompts) │ /C:xx - Sectors per cluster║
║ /X:xx - Sector spinning between heads │ /D:xx - FAT ID byte ║
║ /Y:xx - Sector spinning between tracks │ /A - Verbose output ║
╚═══════════════════════════════════════════════╧════════════════════════════╝
/T:xx /N:xx - specifies the number of sectors and tracks. The capacity of the
diskette in K is simply equal to tracks∙sectors. For example /T:82 /N:18 formats
a floppy to 1476K. The maximal number of sectors that will work depends on the
media:
5¼" DD disk : 1-10 sectors (9 = DOS standard)
5¼" HD disk : 11-18 sectors (15 is standard)
3½" DD disk : 1-10 sectors in DD drive (DOS puts 9)
1-13 sectors in HD drive
1-12 sectors on some HD drives (Sony ?)°
3½" HD disk : 14-21 sectors (18 = DOS standard)
°I have seen only one computer that couldn't format 13 sectors. Interestingly
enough, it had no problem reading & writing such diskettes. 12 sectors were
fine.
As you can see, DOS doesn't get the most from a diskette! For a 720K diskette,
it gets 320K less than possible even with the same number of tracks.
Of course, in normal life you are only interested in the highest number of
sectors or DOS compatible number (See the next option for some useful
combinations). You may want to set fewer sectors do that your program keeps all
the space of the distribution diskette (this makes virus infection harder).
Note that DOS can handle such floppies without INT13X.
Number of tracks supported doesn't depend on the diskette. 5¼" DD disk drive has
rated capacity of 40 tracks, all the others get 80. When you format a 360K
diskette in HD drive, it will just format every second track. Because those
tracks are still about twice narrower than those of original DD drive, the later
can't reliably read such diskette. Try reformatting the diskette several times
(with /W-) to reduce the problem.
Surprisingly, DOS FORMAT will refuse to format 5¼" disk to 80 tracks even with
HD drive. FMT won't. This way you can get 800K (/T:80 /N:10) on a 360K disk.
A real drive will support more than 40 or 80 tracks. Diskette has much more than
80, so the actual number supported depends on how far the drive head can move.
/T:41 or /T:82 seems to be always safe. Your drive may get more. To figure out
how much more, start with formatting to an unrealistic number (like /T:90) and
listen carefully. Eventually you'll here the head bumping against the stop -
this gives an approximate margin. Now, retry the format decreasing the number of
tracks by one each time until you here nothing suspicious and the floppy verifies
without errors. My drives get 85 tracks! (or 42 for DD drive-compatible formats)
It's best to limit number of tracks to 41/82 when transferring files to another
computer.
You can specify default number of sectors and tracks for each drive in
CONFIG.FMT. If you don't, defaults are /T:82 /N:18 for a 5¼" drive & /T:82 /N:21
for a 3½" drive.
───────────────────────────────────────────────────────────────────────────────
/F:<format> - an alternative way to specify drive format. Some formats are
predefined for you. They are actually shortcuts for /T:xx /N:xx combination.
You can define your own formats - their names doesn't have to be numbers and you
may specify any other options.
╔═════════╤═══════════╤═══════╤═════════════╤═════════════════════════════════╗
║ Format │ Drive │ Media │ Stands for │ Comment ║
╠═════════╪═══════════╪═══════╪═════════════╪═════════════════════════════════╣
║ /F:360 │ 5¼" HD/DD │ DD │ /T:40 /N:9 │ DOS standard ║
║ /F:410 │ 5¼" HD/DD │ DD │ /T:41 /N:10 │ The highest readable by DD drive║
╟─────────┼───────────┼───────┼─────────────┼─────────────────────────────────╢
║ /F:720 │ 5¼" HD │ DD │ /T:80 /N:9 │ Fast format, also DOS standard ║
║ │ 3½" HD/DD │ │ │ ║
╟─────────┼───────────┼───────┼─────────────┼─────────────────────────────────╢
║ /F:820 │ 5¼" HD │ DD │ /T:82 /N:10 │ The most you can get for 5¼" DD ║
║ │ 3½" HD/DD │ │ │ diskette ║
╟─────────┼───────────┼───────┼─────────────┼─────────────────────────────────╢
║ /F:1.2 │ 5¼" HD │ HD │ /T:80 /N:15 │ DOS standard high-density, you ║
║ /F:1200 │ │ │ │ could define this for 3½" ║
╟─────────┼───────────┼───────┼─────────────┼─────────────────────────────────╢
║ /F:1.48 │ 5¼" HD │ HD │ /T:82 /N:18 │ ║
║ /F:1476 │ │ │ │ ║
╟─────────┼───────────┼───────┼─────────────┼─────────────────────────────────╢
║ /F:1.07 │ 3½" HD │ DD │ /T:82 /N:13 │ Try /F:984 if your drive don't ║
║ /F:1066 │ DD=??? │ │ │ get it. Can't be made bootable ║
╟─────────┼───────────┼───────┼─────────────┼─────────────────────────────────╢
║ /F:984 │ 3½" HD/DD?│ DD │ /T:82 /N:12 │ Can't be made bootable ║
╟─────────┼───────────┼───────┼─────────────┼─────────────────────────────────╢
║ /F:1.44 │ 3½" HD │ HD │ /T:80 /N:18 │ DOS standard; can be defined for║
║ /F:1440 │ │ │ │ 5¼" drive ║
╟─────────┼───────────┼───────┼─────────────┼─────────────────────────────────╢
║ /F:1.72 │ 3½" HD │ HD │ /T:82 /N:21 │ A lot of space for one floppy! ║
║ /F:1722 │ │ │ │ ║
╚═════════╧═══════════╧═══════╧═════════════╧═════════════════════════════════╝
If you suddenly run out of disk space, try formatting a 360K diskette to /T:50
/N:18 - some can hold it without errors. I won't use it for important data,
though. (Once you have at least 11 sectors, reliability doesn't depend on the
number). They say, with some drives it's possible to format a 720K diskette to
high density. This doesn't work with mine. You can't format a high density
floppy to double density.
───────────────────────────────────────────────────────────────────────────────
/V<"label"> - specify a volume label for the diskette. FMT will allow labels
with both upper & lowercase letters, blanks, or anything else you want. You
can use this option with the label enclosed in quotes (/V"Test of FMT"). If you
just specify /V, FMT will ask you to enter the label. The only editing key you
can use is backspace, but it's possible to enter any character from 1 to 255 by
Alt-XXX sequence. Volume label can be disabled by /V-.
Note that FMT sets volume serial numbers in a way different from DOS. It will
be in the format MMDD-HHmm and show the date and time when the diskette was
formatted (So that you can figure it out just by typing DIR).
───────────────────────────────────────────────────────────────────────────────
/S<:bootfile> - make a diskette bootable. To use this option, you must build
what I call a boot image file. Make a diskette with standard format (like 360K)
bootable by FORMAT /S or SYS. Copy any additional files you want: HIMEM.SYS,
INT13X.COM, CONFIG.SYS, AUTOEXEC.BAT etc. You may want to check that things work
as they are supposed to by actually booting from the diskette.
Run FMTBOOT.EXE to save results to one file. The options of this program are
described in a separate section. For now, let's just use FMTBOOT A: /R to
create a file called BOOT.FMT in the same directory with FMT.EXE.
Now when you use /S, a diskette (of any format) will be made bootable and all
files you wanted will be present in it's root directory (bthw, FMTBOOT
completely ignores subdirs).
The reason for doing all this is that, unlike DOS FORMAT, FMT can't assume that
you are using any particular DOS version. So you must tell it which boot sector
and files to use. As an added bonus, now you are not limited to copying only
system files: create CONFIG.SYS/AUTOEXEC.BAT to load DOS high, set a lot of
buffers and files, run INT13X - whatever you want every bootable diskette to do.
In particular, 4DOS users no longer need to rename 4DOS to COMMAND.COM. Also,
it's faster to include programs to a boot image file than to copy them to
diskette after format - FMT /S is roughly as efficient as DISKCOPY on almost
full disk.
The shadow side is that boot images tend to be rather large - 100K is typical
for DOS 5.00. It would be nice to store these files in compressed form in future
versions of FMT.
You can have more than one boot file. To specify which one you need, use
/S:bootfile format of the switch. The path where FMT will look for the file is
determined by the following rules:
■ If the filespec contains '\' or ':', FMT assumes that you have specified the
exact path of the file.
■ Otherwise, if FMTFILES environment variable is set, it's value will be used
as the path of the file (make sure that it ends with \). No other locations are
searched.
■ If neither of above is true, the file will be searched first in the directory
where FMT.EXE resides, then in current directory.
■ /S == /S:BOOT.FMT
Note that .FMT extension is not assumed - BOOT.FMT was just my random choice.
/S function will fail on some disks with bad sectors in the beginning. If boot
sector belongs to DOS 4+, there should be only 3 error-free sectors in the start
of the disk. Earlier versions require enough space for the first system file -
IO.SYS or IBMBIO.COM. Although FMT doesn't complain, it's impossible to make
bootable 3½" disk with 11-13 sectors per track - BIOS is unable to read a boot
sector.
DOS 5.0 version of SYS can also make most formats bootable. It doesn't work with
5¼" DD diskettes that are formatted to 80+ tracks - boot sector of these
diskettes have to be patched. For programmers: this is not terribly complicated
- just turning double-stepping off:
jmp $+3 ; DOS likes EB XX 90 at the start
nop
and byte ptr cs:[490H],0DFH ; Turn double-stepping off for drive A:
jmp short <whatever location it jumped to before>
SYS command of earlier versions works only with standard formats. If you try it
with an extended one, it will seriously damage the disk. Also, it fails if the
disk is not empty (even without a volume label).
/S- turns the option off
───────────────────────────────────────────────────────────────────────────────
/Q - perform a quick format. Simply rewrites system areas. This is a very fast
way to delete all files on the diskette. Obviously, you can't change physical
disk format with this switch set. But changing logical organization is Ok: /R /C
/D & /S work fine.
Don't use this option is a diskette has bad sectors - FAT is ignored. Also, this
option doesn't work if the boot sector is damaged.
───────────────────────────────────────────────────────────────────────────────
/E - test mode. FMT will do everything except actually formatting/writing the
diskette. Use with /A to see how your CONFIG.FMT works, check integrity of boot
image etc. I use it for debugging.
───────────────────────────────────────────────────────────────────────────────
/B - batch mode (mute). Displays no screen output & doesn't prompt you to press
Enter. ESC key still works. The result of formatting can be determined by
examining exit code.
───────────────────────────────────────────────────────────────────────────────
/A - display additional technical information about the diskette. Useful when
you are playing with more advanced FMT options. Make it default in CONFIG.FMT if
you don't mind a lot of output.
───────────────────────────────────────────────────────────────────────────────
/Z:xx - retry count. Specifies the number of times FMT will repeat
format/verify/reset cycle before assuming that the track has a bad sector. Disk
read and write operations also use this value.
The retry count specified by /Z is used only for data errors. Other errors,
like timeout, will cause operation to be repeated up to 4 times without changing
retry counter - such conditions are often caused by a drive motor which is not
yet accelerated to the full speed after the start of operation. If operation
fails 4 times, FMT assumes that something is seriously wrong (i.e. drive door is
open), prints an error message and dies.
If retry count is exceeded for data errors, FMT will scan the track to see which
clusters are actually bad. It won't reset disk controller or retry anything
during this operation. This keeps noise during the format to minimum (remember
DOS format playing music on you drive?) and allows marking any cluster that is
even slightly suspicious. Bthw, DOS FORMAT will mark bad the whole track, not
just unreadable clusters.
To give you more information about the diskette, FMT displays "???" after each
track for which the format was retried. If you see this signs after format,
it's a good idea to check if the track can be read without problems.
Default number of retries is 4. Reduce this to 2 if you want to make sure that
all doubtful clusters are marked. Large values (like /Z:16) are useful for old
diskettes - those often have bad sectors that disappear after a few retries. May
be the surfice of the floppy simply gets cleaned?
───────────────────────────────────────────────────────────────────────────────
/R:xx - root directory size. If you don't specify this option, FMT will allocate
space for 112 files if diskette space if less than 1M & 224 entries otherwise.
This matches DOS FORMAT for all standard formats.
Each directory entry keeps 32 bytes of disk space. Because 112 additional
entries keep only 3.5K of disk space, it's rarely useful to reduce default
values.
You can specify from 1 to 240 files. The value will be rounded up to the nearest
multiply of 16 (because the space for directory is allocated in sectors).
───────────────────────────────────────────────────────────────────────────────
/C:xx - cluster size. Again, FMT follows DOS defaults by setting this to 1 if
media is > 1M and 2 is it's less. You can specify any value from 1 to
128 (brrr...); DOS requires cluster size to be a power of 2.
Empty diskettes with larger cluster size always have more free space. However,
each file of moderate size wastes on average a half the cluster size. For
example, a diskette with 85 tracks and 18 sectors has 4K more disk space when
formatted with 2-sector clusters, but each file wastes on average 512 bytes
(compared to 256 bytes for 1-sector clusters).
If the usage of the diskette is not known in advance, /C:1 is a good choice.
───────────────────────────────────────────────────────────────────────────────
/W - write verify. This option is active by default - turn it off by /W-.
Formatting w/o verify is roughly twice faster than usual, but doesn't mark bad
sectors. This is not as terrible as it looks like, because some errors are
discovered when writing to diskette. Don't use /W- with floppies that are known
to have bad sectors anyway.
To see a shocking prove of the fact that BIOS format function completely ignores
data errors, try formatting a cleaning diskette with /W-. Actually, this may be
an efficient way to clean the drive, because the whole surface of the diskette
is used, not just track 0.
───────────────────────────────────────────────────────────────────────────────
/X:xx /Y:yy - enable sector spinning. Normally, the sectors with the same
numbers are stored one under another on the disk. As the result, when a head is
finished with reading a track, it has very little time to move to the next track
and start reading it's first sector. If the drive/computer are slow, it's
likely that the head will miss a sector and will have to wait until the disk
turns around to start reading.
Sector spinning attempts to eliminate the problem by rearranging sectors. For
example, suppose that the sectors on the first track are written in the order 1
2 3 4 5 6 7 8, on the second 8 1 2 3 4 5 6 7 etc. Now disk head has some
additional time to find the first sector. In some cases, this may speed up disk
operations twice!
/X specifies the number of positions sector map will shift when the head
changes. /Y is the shift between tracks.
Optimal values are different from each computer and for each format. You'll
have to figure this out by experiment. /X should be probably left zero except
for very slow disk drives. Best values of /Y will be usually in the range 0..3.
After finding /X & /Y that give the best result for the particular format, add
it to your CONFIG.FMT to save typing. If you have no time for experiments, /X:0
/Y:2 is usually a good guess.
Because there is no better solution,I have set defaults to the best values on my
computer: no spinning except for /N:21 (/Y:2) and /N:13 (/Y:1) with 3½" drive.
Note that some non-optimal values of sector spinning can cause pathological
slowdown.
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒ The last several options of FMT control low-level settings of the diskette ▒
▒ format. Normally, FMT will preset these options to the values based on the ▒
▒ number of sectors & tracks specified. You'll rarely need to change this ▒
▒ if FMT IS working normally on your computer. By playing with these switches ▒
▒ you may be able to make the program work with non - standard drives or ▒
▒ strange BIOS. In this case, you'll probably want to define named formats in ▒
▒ CONFIG.FMT. ▒
▒ ▒
▒ Of course, another good use of these options is just playing with diskette ▒
▒ BIOS. ▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
/Gxx - gap length. This option specifies a distance (in bytes?) FMT will leave
between sectors. Disk controller can't read a track if this distance is too
small. From the other hand, if the distance is too large, operation will take
longer than necessary.
For standard formats, FMT will use the same values as DOS FORMAT - about twice
larger than minimal possible. To squeeze more sectors on a track, it's necessary
to reduce distance between them. Finally, for the highest capacity formats - 18
sectors per track for 5¼" HD diskette, 21 sectors per track for 3½" HD and
11..13 for 3½ DD, there is enough space on the track for sectors themselves but
not for gaps between them. In these cases, the diskette is formatted with
interleave 2, so that another sector will play the role of the "gap". The real
gap is set to 2.
If some format doesn't work with your drive, try varying /G before giving up.
The smallest value that works is about /G18 (/G:24).
───────────────────────────────────────────────────────────────────────────────
/I:xx - interleave. Usually sectors with adjacent numbers will be also adjacent
on the track. When this option is !=1, they will be separated by interleave-1
sectors (sometimes one more). For example, a track with 8 sectors will look
like:
/I:1 12 /I:2 15 /I:3 14 etc.
8 3 8 2 6 7
7 4 4 6 3 2
65 73 85
Reading the entire track will take <interleave> rotations of the drive. This
means that usually /I:1 is the best choice. However, at least /I:2 is needed for
some high-capacity formats to provide enough distance between adjacent sectors
(See the description of /G).
───────────────────────────────────────────────────────────────────────────────
/Mxx - specify BIOS media byte. This byte, found at 0:(490H+drive_letter), has
dramatic influence on format operation. Here is it's layout:
Bits 7-6: Data transfer rate : 00=500kbps 01=300kbps 10=250kbps
11=??? (May be used by 2.88M drive?)
Bit 5: 1=Double stepping (40 track format)
Bit 4: 1=Media established. 0 after read error or disk change. Always set
this to 1 for FMT
Bit 3: Ignored. BIOS leaves this 0.
Bits 2-0: BIOS sets this to:
000 Trying 360K in 360K 100 360K in 1.2M Ok
001 Trying 360K in 1.2M 101 1.2M in 1.2M Ok
010 Trying 1.2M in 1.2M 110 not used
011 360K in 360K Ok 111 All other formats (i.e. 3½" drive)
Data transfer rate: This determines the density of the format. 500kbps is high
density for both 5¼" and 3½" drives. Double density is 300kbps for 5¼" and
250kbps for 3½". An interesting trick that allows FMT to squeeze more to a 720K
diskette is using 300kbps with 3½" drive. Diskette BIOS by itself won't
recognize such density. INT13X will try all 3 data transfer rates until it can
verify the first sector of the diskette successfully.
By default, FMT will set these bits depending on the number of sectors in the
format. It will always use the lowest possible density.
Value of 11 in this field is mystery. On my computer, this seems to produce some
data transfer rate between 300 & 250 kbps. On another one it just fails.
Double stepping: This bit is used to provide compatibility with 360K drive. When
it's set, the disk head moves 2 positions for each track. Clearing this bit for
5¼ DD diskette creates 720K & 800K formats.
It's impossible to distinguish 360K & 720K diskettes by checking only track 0.
INT13X will try to read track 2 head 0 sector 1 with this bit clear. If the
diskette was formatted with double stepping, this track will be actually track 1
and the read will fail.
I could never find an AT+ computer with double density drive & don't know what
should be in this bit for a true 360K drive. FMT will still use double
stepping. If this results in horrible sounds in the middle of formatting, try
/m57 for single stepping.
By default FMT sets this bit if you specify less than 44 tracks.
Bits 2-0: It's a great secret for me how exactly BIOS interprets this value.
Looks like values 0..2 (Trying...) mean that BIOS shouldn't try to sense
diskette type. By default FMT will use value 7 that seems to work with all
formats. If your BIOS gets upset, try values from 0 to 6. One should work.
───────────────────────────────────────────────────────────────────────────────
/Lxx - format fill character. By default FMT will use 0AAH == 10101010B == '¬'
Alternating 1s & 0s should provide a good test for bad sectors. DOS FORMAT uses
0F6H == '÷'.
───────────────────────────────────────────────────────────────────────────────
/Dxx - FAT ID byte. This byte appears in the boot sector & in the beginning of
FAT and is *supposed* to be useful to identify diskette type. In reality it's
not very informative: for example 0F0H can be used for 1.2, 1.44 or 2.88M.
Microsoft MSDOS Programmer's Reference says that "it can be also used for other
formats". There is an obvious problem with extended formats.
FMT will try to mimic DOS as much as it can. It will set correct values for all
standard formats. To give poor program using FAT ID byte another chance to
work, it will set the same value for formats that differ from standard only by
the number of tracks. All other high density formats (15-21 tracks) are assigned
value F0, DD formats - value F9. This makes any version of DOS happy. Note that
MSDOS 5.00 completely ignores FAT ID.
By setting this option, you may be able to full around a program that refuses to
work with an extended format otherwise.
███████████
▐▌ FMTBOOT ▐▌
███████████
This is a program to build boot images for FMT. See the description of /S option
for some information about boot images. The usage of FMTBOOT is:
FMTBOOT D: [bootfile] [/X] [/S] [/R] [/B]
D: - drive letter from which to read boot sector and files. Should specify a
diskette with a standard format made bootable by SYS or FORMAT /S. Doesn't have
to be A: or B:
bootfile - the file to write boot image to. The default filename is BOOT.FMT
that will be created in the directory where FMT was found unless the environment
value FMTFILES is set. In the later case, the value of FMTFILES will be used as
the full path of the file (must end with \).
/X - assume extended (DOS 4+) boot sector. FMT will set more information (like
volume serial number) and will not check if the first file can be written
continuously (except for the first 3 sectors). If you don't use /X or /S,
FMTBOOT will recognize sector as extended if it contains signature 29H at offset
26H and "FAT12 " at offset 36H.
/S - the opposite of /X. Assume DOS 3.x boot sector.
/R - replace existing boot file. By default FMTBOOT will only create new files.
With /R it overwrites even read-only ones.
/B - batch mode: no screen output. The status of the program can be determined
by examining exit code.
Like FMT, FMTBOOT can be stopped at any time by ESC. But it may not react to it
immediately. Opening drive door also works.
The format of boot image file:
boot db 512 dup(?) ; Boot sector. FMT will briefly check it to see if this is
; really a boot image.
xboot db ? ; 0 = standard boot sector, 1 = extended
; For each file (it's Ok to have no files)
direntry db 32 dup (?) ; garbage in the "start cluster" field
<the exact image of the file>
██████████████
▐▌ CONFIG.FMT ▐▌
██████████████
FMT will accept an optional configuration file that can be used to:
■ Define your own formats that can be used with /F
■ Set default options for each drive type
■ explicitly specify types of your drives is FMT can't guess this properly
If FMTFILES environment variable is set, it's value is assumed to be the path of
CONFIG.FMT (remember to add \). No other location will be searched. Setting
FMTFILES to an invalid directory (like SET FMTFILES=$) will prevent FMT from
using configuration file. Otherwise, FMT will search for CONFIG.FMT in the
directory where FMT.EXE resides and in the current directory.
Each non-empty line in CONFIG.FMT should start from '3' or '5' - the type of
disk drive (5¼" or 3½") this line applies to. The rest of the line can be:
A: or B: - specify the type of disk drive. Without this, FMT will read the
type from CMOS. Example:
3 A: ; A: is a 3½" drive
DEFAULT - specify default switches for this drive type. For example:
5 DEFAULT /T:85 /N:18 /V /A ; format 5¼" diskettes to 85 tracks & 18 sectors
; by default. Also, display tech info & ask for volume label
"default defaults" are 5 DEFAULT /T:82 /N:18 & 3 DEFAULT /T:82 /N:21 - the
highest capacity formats for each drive.
Any other word - create a named format. When you specify /F:word, it will have
the same effect as if you have typed all the options found on this line. Named
formats are drive specific, so the same name can specify different options for
different drives. The name of the option doesn't have to be a number. If there
are several lines defining the format with the same name and drive type, only
the first will be considered. Because default formats are added to the end of
the file, they can be redefined. Examples:
5 1530 /T:85 /N:18
3 DDSYS /T:85 /N:10 /S:BOOT.850
5 DDSYS /T:85 /N:10 /S:BOOT.850 ; You want this to be the same for both drives
5 360 /T:40 /N:9 /M57 /Y:2 ; Redefine existing format to work with DD drive
; I wonder if the above line is needed
5 360HD /T:40 /N:9 ; This is for HD drive
3 1.11 /F:1.07 /T:85 ; Ok to have nested formats. Just don't make them
; recursive!
As you could guess from the examples, you can add comments to CONFIG.FMT using
';'.
██████████████
▐▌ Exit codes ▐▌
██████████████
FMT:
0 = Success
1 = No drive letter specified
2 = Unknown named format
3 = Invalid option
4 = Syntax error in CONFIG.FMT
5 = Quick Format failed
6 = Error writing to the diskette
7 = Drive is not ready or diskette is write protected
8 = Boot image file doesn't exist or has an error
9 = No room for system (bad sector to early or just out of disk space)
10 = Out of memory (shouldn't happen very often)
255 = Interrupted by ESC
FMTBOOT:
0 = Ok
1 = No drive specified
2 = Invalid option
3 = Can't create output file
4 = Out of memory
5 = Error reading diskette
6 = Out of disk space
7 = Error writing boot image
255 = Interrupted by ESC
Both FMT & FMTBOOT have /B option that make them to run in the absolute silence.
A program or batch file can call them & use exit code to report the result.
┌─┐ ┬ ┬
│ ││ │┌┘.│ .
│ ││ ┌┐┌┐ ┼┤ ┬│┐┬┌┐┌┐┐┌
│ ││ │┘│_ │└┐│││││ │┘││
└─┘└┘└┘└┘ ┴ ┴└└┘└└ └┘└┘