home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 12
/
CD_ASCQ_12_0294.iso
/
vrac
/
fmtfix62.zip
/
FMTFIX.DOC
< prev
Wrap
Text File
|
1994-01-26
|
7KB
|
131 lines
January 26, 1994
Format Fix for MS-DOS version 6.2
by Bill Thompson, Rochester, NY
In the never-ending race to win the features war, Microsoft
let a bad bug creep into the MS-DOS 6.2 FORMAT command. The
problem is related to the new Doublespace feature called
"automount". When a disk is first inserted, DOS tries to
determine if is contains a Doublespace volume and automatically
mounts it if so. This happens on ANY initial disk access,
including one preceding a format. To make the determination,
DOS obviously must try to read the disk and, if the disk is a
magnetic blank, (has never been formatted) there is nothing to
read. DOS tries over twenty times to read the disk even if the
"/U" parameter is specified for an unconditional format.
The repeated attempts to read a blank disk take a lot of
time. The actual amount of time spent on these useless read
attempts varies with systems and conditions. I have looked at
the situation on machines with AMI, Award, and Phoenix BIOS's and
found that the problem is worst by far with the AMI BIOS,
probably because this BIOS does many read retries on its own. To
complicate matters, using Microsoft's SMARTDRIVE with the AMI
BIOS almost doubles the time spent trying to read sectors on a
blank disk. I have found that on any machine with an AMI BIOS,
MS-DOS 6.2, and SMARTDRIVE that there is over a one minute delay
when requesting an unconditional format before the format
actually starts. If you are trying to initially format a big box
of new disks, this nearly doubles the time you need to spend.
Note that the problem only occurs on a magnetic blank (brand new
disk) and will never happen on a disk that has been previously
formatted.
I know that there are millions of MS-DOS machines with AMI
BIOS's and clearly this undesirable situation qualifies as a
major "bug". Actually, I find it hard to understand how
Microsoft missed this one. An unconditional format should do
just that. It should not try to read the disk at all, but assume
it is blank and just immediately format it.
There are several solutions to this problem. One is to just
buy pre-formatted disks and never format blank ones yourself.
Another solution is to make a boot floppy with an older version
of DOS and its associated format command on it. You can boot
with this disk, do your formatting, and then re-boot with DOS
6.2. You might also be able to use a third party format program
but it is possible it could collide with Doublespace's
"automount" feature. These are all somewhat ugly solutions to a
problem that shouldn't happen in the first place.
I came up with a solution that I like. I wrote a little
resident program called FMTFIX.COM that works around the bug by
trapping floppy disk read commands to the BIOS. Any normal read
operation proceeds as usual. However, when a floppy disk read
results in an "address mark not found" error (ie a blank disk),
any read retries within 1/2 second of the first one force an
immediate error without actually trying the read operation again.
The format command then zips by the read retries, properly
concluding that the disk is blank, and formats it. A delay of
greater than one minute is reduced to a few seconds. The program
only takes up about 100 bytes of memory, can be loaded high, and
will not interfere with any normal activity on your machine. You
can load it in your Autoexec file and forget it. If you are
running Smartdrive, you will get best results if you run FMTFIX
after loading Smartdrive, in fact load it last if possible.
I have some opinions on Doublespace floppy disks. Probably
some people will disagree with me, but here goes:
First, let me say that I like the Doublespace feature in
MS-DOS 6.0 and 6.2. It makes a lot of sense for a hard drive and
I have been using it for months with absolutely no problems.
Microsoft says they have added some safety features in version
6.2 and it now uses a little less conventional RAM. Although
products like Stacker were around before Doublespace and I
understand they may be somewhat more sophisticated, I find that
Doublespace works fine and I like the idea that it is integrated
with DOS and supported by Microsoft.
While I think Doublespace is a good idea for hard drives, I
feel that it makes little sense for floppies and here's why:
1. It takes a lot of time to make a Doublespace floppy. First
you have to format it, then run Doublespace which spends
lots of time testing the system, testing the disk and
eventually compressing it. To save time, I guess you could
make one Doublespace floppy and then use Diskcopy to make
more but I haven't had a reason to do this.
2. A more serious problem is that you really have no way of
knowing how compressible the files you are putting on the
disk are until you try it. For example, if you make a 2.8
meg Doublespace floppy and try to copy a single 1.6 meg
"ZIP" file to it, you will get a "disk full" error because,
of course, a "ZIP" file is not compressible at all! On a
hard drive, there are typically thousands of files of
different types so there tends to be a somewhat predictable
compression ratio. If one file does not compress very well,
it doesn't make much difference in the overall scheme of
things. On a floppy drive with limited capacity this
principle doesn't hold true. I find it easier to just use a
utility like PKZIP to compress a file, check its size, and
then put it onto a regular floppy.
One more note - this may be documented somewhere, but I
couldn't find any reference to it. Once you have "Doublespaced"
a floppy, if you try to reformat it, you get a message telling
you to use "DOUBLESPACE /FORMAT" instead. I could not find a way
to just do an unconditional conventional format to get rid of
Doublespace on a floppy. Uncompressing it took a long time and
seemed a poor option. Bulk-erasing it worked, but I suspect that
most people don't have a bulk-eraser. I found that if you go to
the "host" drive for the Doublespace floppy (typically letter L:
or M: - Doublespace will provide this information) and do a
FORMAT /U on that drive, you get a warning that you are deleting
a Doublespace volume but you CAN do the format. Then you will
once again have a regular disk.
I hope this is of some help to people having problems
formatting disks under MS-DOS 6.2. Feel free to pass this
program around. I have included the source code so you can see
how it works, modify it if you like, and be amused by my ugly
assembler techniques. Send any comments to:
EXEC-PC BBS, Mikwaukee Compuserve Internet
-------------------------------------------------------------------
Bill Thompson 73631,1367 billthompson@delphi.com
Rochester, NY