home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / fmtfix62.zip / FMTFIX.DOC < prev   
Text File  |  1994-01-26  |  7KB  |  131 lines

  1.                         January 26, 1994
  2.  
  3. Format Fix for MS-DOS version 6.2
  4. by Bill Thompson, Rochester, NY
  5.  
  6.      In the never-ending race to win the features war, Microsoft 
  7. let a bad bug creep into the MS-DOS 6.2 FORMAT command.  The 
  8. problem is related to the new Doublespace feature called 
  9. "automount".  When a disk is first inserted, DOS tries to 
  10. determine if is contains a Doublespace volume and automatically 
  11. mounts it if so.  This happens on ANY initial disk access, 
  12. including one preceding a format.  To make the determination, 
  13. DOS obviously must try to read the disk and, if the disk is a 
  14. magnetic blank, (has never been formatted) there is nothing to 
  15. read.  DOS tries over twenty times to read the disk even if the 
  16. "/U" parameter is specified for an unconditional format.
  17.  
  18.      The repeated attempts to read a blank disk take a lot of 
  19. time.  The actual amount of time spent on these useless read 
  20. attempts varies with systems and conditions.  I have looked at 
  21. the situation on machines with AMI, Award, and Phoenix BIOS's and 
  22. found that the problem is worst by far with the AMI BIOS, 
  23. probably because this BIOS does many read retries on its own.  To 
  24. complicate matters, using Microsoft's SMARTDRIVE with the AMI 
  25. BIOS almost doubles the time spent trying to read sectors on a 
  26. blank disk.  I have found that on any machine with an AMI BIOS, 
  27. MS-DOS 6.2, and SMARTDRIVE that there is over a one minute delay 
  28. when requesting an unconditional format before the format 
  29. actually starts.  If you are trying to initially format a big box 
  30. of new disks, this nearly doubles the time you need to spend.  
  31. Note that the problem only occurs on a magnetic blank (brand new 
  32. disk) and will never happen on a disk that has been previously 
  33. formatted.
  34.  
  35.      I know that there are millions of MS-DOS machines with AMI 
  36. BIOS's and clearly this undesirable situation qualifies as a 
  37. major "bug".  Actually, I find it hard to understand how 
  38. Microsoft missed this one.  An unconditional format should do 
  39. just that.  It should not try to read the disk at all, but assume 
  40. it is blank and just immediately format it.
  41.  
  42.      There are several solutions to this problem.  One is to just 
  43. buy pre-formatted disks and never format blank ones yourself.  
  44. Another solution is to make a boot floppy with an older version 
  45. of DOS and its associated format command on it.  You can boot 
  46. with this disk, do your formatting, and then re-boot with DOS 
  47. 6.2.  You might also be able to use a third party format program 
  48. but it is possible it could collide with Doublespace's 
  49. "automount" feature.  These are all somewhat ugly solutions to a 
  50. problem that shouldn't happen in the first place.
  51.  
  52.      I came up with a solution that I like.  I wrote a little 
  53. resident program called FMTFIX.COM that works around the bug by 
  54. trapping floppy disk read commands to the BIOS.  Any normal read 
  55. operation proceeds as usual.  However, when a floppy disk read 
  56. results in an "address mark not found" error (ie a blank disk), 
  57. any read retries within 1/2 second of the first one force an 
  58. immediate error without actually trying the read operation again.  
  59. The format command then zips by the read retries, properly 
  60. concluding that the disk is blank, and formats it.  A delay of
  61. greater than one minute is reduced to a few seconds.  The program 
  62. only takes up about 100 bytes of memory, can be loaded high, and 
  63. will not interfere with any normal activity on your machine.  You 
  64. can load it in your Autoexec file and forget it.  If you are 
  65. running Smartdrive, you will get best results if you run FMTFIX 
  66. after loading Smartdrive, in fact load it last if possible.
  67.  
  68.      I have some opinions on Doublespace floppy disks.  Probably 
  69. some people will disagree with me, but here goes:
  70.  
  71.      First, let me say that I like the Doublespace feature in
  72. MS-DOS 6.0 and 6.2.  It makes a lot of sense for a hard drive and 
  73. I have been using it for months with absolutely no problems.  
  74. Microsoft says they have added some safety features in version 
  75. 6.2 and it now uses a little less conventional RAM.  Although 
  76. products like Stacker were around before Doublespace and I 
  77. understand they may be somewhat more sophisticated, I find that 
  78. Doublespace works fine and I like the idea that it is integrated 
  79. with DOS and supported by Microsoft.
  80.  
  81.      While I think Doublespace is a good idea for hard drives, I 
  82. feel that it makes little sense for floppies and here's why:
  83.  
  84. 1.   It takes a lot of time to make a Doublespace floppy.  First 
  85.      you have to format it, then run Doublespace which spends 
  86.      lots of time testing the system, testing the disk and 
  87.      eventually compressing it.  To save time, I guess you could 
  88.      make one Doublespace floppy and then use Diskcopy to make 
  89.      more but I haven't had a reason to do this.
  90.  
  91. 2.   A more serious problem is that you really have no way of 
  92.      knowing how compressible the files you are putting on the 
  93.      disk are until you try it.  For example, if you make a 2.8 
  94.      meg Doublespace floppy and try to copy a single 1.6 meg 
  95.      "ZIP" file to it, you will get a "disk full" error because, 
  96.      of course, a "ZIP" file is not compressible at all!  On a 
  97.      hard drive, there are typically thousands of files of 
  98.      different types so there tends to be a somewhat predictable 
  99.      compression ratio.  If one file does not compress very well, 
  100.      it doesn't make much difference in the overall scheme of 
  101.      things.  On a floppy drive with limited capacity this 
  102.      principle doesn't hold true.  I find it easier to just use a 
  103.      utility like PKZIP to compress a file, check its size, and 
  104.      then put it onto a regular floppy.
  105.  
  106.      One more note - this may be documented somewhere, but I 
  107. couldn't find any reference to it.  Once you have "Doublespaced" 
  108. a floppy, if you try to reformat it, you get a message telling 
  109. you to use "DOUBLESPACE /FORMAT" instead.  I could not find a way 
  110. to just do an unconditional conventional format to get rid of 
  111. Doublespace on a floppy.  Uncompressing it took a long time and 
  112. seemed a poor option.  Bulk-erasing it worked, but I suspect that 
  113. most people don't have a bulk-eraser.  I found that if you go to 
  114. the "host" drive for the Doublespace floppy (typically letter L: 
  115. or M: - Doublespace will provide this information) and do a 
  116. FORMAT /U on that drive, you get a warning that you are deleting 
  117. a Doublespace volume but you CAN do the format.  Then you will 
  118. once again have a regular disk.
  119.  
  120.      I hope this is of some help to people having problems 
  121. formatting disks under MS-DOS 6.2.  Feel free to pass this 
  122. program around.  I have included the source code so you can see 
  123. how it works, modify it if you like, and be amused by my ugly 
  124. assembler techniques.  Send any comments to:
  125.  
  126. EXEC-PC BBS, Mikwaukee     Compuserve              Internet
  127. -------------------------------------------------------------------
  128. Bill Thompson              73631,1367       billthompson@delphi.com
  129. Rochester, NY
  130.  
  131.