Documentation for Bformat ---------------------------------------------------------- Purpose ------- Normally, AmigaDos only allows the formatting of 'perfect' diskettes. If you have a formatting error anywhere on the diskette (it may only be a single track that appears to be bad) AmigaDos will kindly inform you that the disk is totally un-useable. I never felt comfortable with that limitation. I had hoped that Dos 1.2 would address this problem (well..maybe 1.3,1.4,1.5?). In any case, I became tired of waiting. I drew upon some experience that I had about a year ago when I wrote a custom hard-disk driver for my A1000, and came up with Bformat. Bformat allows for the formatting of otherwise un-useable 3.5" diskettes. Limitations ----------- Bformat does require the ability to sucessfully format tracks 0 and 80. Disks with formatting errors on tracks other than 0 and 80 should pose no problems. Bformat only works on drive DF0:. This self imposed limitation insures that Bformat cannot be used to screw up hard-disks and the like. At this time Bformat is only executable from the CLI environment. How it Works (overview) ------------ Bformat uses the standard 'trackdisk.device' calls for disk formatting. After a diskette is formatted 3 important blocks are written to the disk. The first block written is what I will call the 'ID' block (block 0). In order for AmigaDos to recognize the disk as useable for file storage, the first three bytes must contain the ascii codes for 'DOS'. The second block required by Dos is the 'root' block (block 880). This block contains information on the disk file structure, as defined in the AmigaDos Manual. The third block required is the 'Block Allocation Map' (bam). The physical block number for this map can vary and is obtained as a pointer from the 'root block'. The bam is a bit-mapped structure which defines all of the available blocks on the disk. When files are created by AmigaDos, it adjusts the content of this map to reflect which blocks are used by the file system. (More info on the bitmap is present in the source code). Bformat works by dynamically creating this bitmap structure. When Bformat comes accross a block that cannot be correctly formatted, it marks this block as 'in use'. Since the blocks marked by Bformat are not attached to any AmigaDos file, the AmigaDos file system will not attempt to use these 'bad' blocks. Bformat effectively hides any bad blocks from AmigaDos. Usage ------ Bformat will only work on 3.5" floppy disks located in drive df0:. Bformat accepts two command options. This can take two possible forms: 1) bformat volname volname = the volume name for your disk. (required) Format & verify diskette, marking any bad blocks as 'in use'. 2) bformat volname -c -c option will erase all files on the disk and verify disk integrity. Any bad blocks found will be marked as 'in use'. The disk will not be re-formatted when using this option. You can abort the program at any time via ctrl-c or ctrl-d. Concerns -------- Wouldn't recommend the use of AmigaDos 'diskcopy' command in association with a disk formatted by Bformat. Use standard 'copy' instead. On occasion you may find a diskette that will format correctly, but, after a period of time, fails. This type of latent problem cannot be detected by Bformat (or the AmigDos format, for that matter) and is an area of concern. The only reliable approach to this problem is to use the Bformat '-c' option after you have copied any recoverable files from the disk that has developed this type of error. Status ------ I originally planned to release this as ShareWare but decided to leave it as public domain. I would actually like Bformat to be somewhere in between. Shall I call it pd-shareware?? In other words, I'll leave the status up to you.. If you find Bformat to be a useful addition to your amiga, I have no objection to monetary contributions mailed to the following address: Bob Bush 1015 Hayfield Rochester Hills Mich. 48064 Enough of that.. Any comments/questions accepted via Compuserve Email (73105,1332). NOTE: 4 July 1988 I recently hacked together a 880K 5.25" IBM diskdrive as my Amiga df2. I had quite a number of disks that would not format and I remembered this Bformat. So I added to and changed the program and a bit to allow formatting of drives other than df0! I don't have a Compuserve account so I would appreciate it if some kind soul would send Bob a copy of this hacked version. Tony Solomon PLink ID: Tony*S P.S. I can also be reached on Magnolia/CAUG/BBS JC/Amiga Advocate and many other BBS's if you would care to comment! ***** end of file *****