NEWS.TXT Version History: Future Plans TO-DO Modify safe formatting such that it avoids overwriting data. (Create a mirror.fil before deleting the file system.) TO-DO Add the capability to utilize the non-standard floppy format features. (Add the appropriate switches to the command line.) TO-DO Debug FAT32 support. TO-DO Fix any other bugs. TO-DO When system files are written, the summary must subtract the amount of space they take up from the total disk space. TO-DO Clean up the source code. TO-DO Have the program check to see if there is already an existing format (and what type of format) before the media is formatted. TO-DO Add international language support. Version 0.90 Changes by Bart Oldeman: 1. Repaired the makefile 2. Removed the complete_fat32_ext_bpb() 3. Set first field of parameter block for int 0x21/0x440d 4. Converted fsinfor 512 byte struct to static in order to save stack space. 5. Initialized the fsinfo with actual total free number of clusters and cluster to start looking instead of setting to 0xffffffff. 6. Improved FAT12 detection (number of clusters < 4085) 7. Minor cleanups. Changes by Brian Reifsnyder: 1. Minor code clean-up. 2. Fixed a bug that resulted in an error when using the /t and /n switches. 3. Added code to retry int 0x25/0x26 drive access 3 times. 4. Changed error message that results from an invalid argument parameter that was entered. 5. The program now verifies that it can execute the sys command before attempting execution. If the sys command is not located, an error message is displayed and format continues without writing the system files. 6. Improved the critical error handler code such that more accurate error messages are displayed. 7. On returns of ax=0x0408, bit 7 is now set in the drive number as per a note in RBIL, int 0x25/0x26. 8. The serial number applied to the disk is now based upon the date and time. Version 0.90 Divided the source code up into smaller files. DEV Modified the code that creates the filesystem in order to support FAT32. Fixed a bug that resulted in an error when using the /f: switch. Finished adding FAT32 support. FAT32 support is considered to be alpha until it is mentioned otherwise in this file. Version 0.85 Removed all of the old command line support. Modified getopt.c so that it will support the use of the drive letter at any location in the command line. Added bad sector scanning and recording for floppy disks. Added bad sector scanning and recording for FAT12/FAT16 hard disk partitions. Started adding support for FAT32. FAT32 support is nowhere near usable or testable, at this time. Version 0.81 Jim Hall disabled the old command line support and added getopt via the getopt.c and getopt.h files. See 'CHANGES' for more details. This version was not released and was used as a base for version 0.85. Version 0.8 Version 0.8 Pre 2 DEV, after testing. Version 0.8 Removed pdiskio.c and replaced it with interrupt 0x25/0x26 Pre 2 DEV code in order to access the hard disks through the DOS kernel. Contains Patches and fixes, from Tom Ehlert, that improve portability. Contains interrupt 0x25/0x26 code written by Tom Ehlert. Thanks to James Clark, author of DiskMan, for sending me information on enabling interrupt 0x25/0x26 access on an unformatted logical drive. Any hard disk formatting is temporarily forced to the options of "/u /q". This is done to insure proper formatting of the hard drive. Since bad sector detection has yet to be added, any hard disk formats should be set to these options anyhow. Version 0.7 Fixed bug that caused the FAT tables to be off by 1 sector, under certain circumstances. Fixed the problem that caused the summary messages to have ascii characters, at the end of the numbers, when the format was finished. Version 0.6 Added an updated pdiskio.c library. Pre 3 DEV Converted format.cpp to format.c. Version 0.6 Fixed a bug in the BPB created for hard disks. Pre 2 Added a /y switch to the command line to prevent format from asking for a confirmation to format the disk. Added autodetect capability for 2.88MB floppy drives. Added interleave handling code for non-standard floppy formats. Added sector skew calculation code for non-standard floppy formats. Minor bug fixes. Added BPB information for non-standard floppy formats. Added safe formatting capability. The mirror image created is not compatible with MS's UNFORMAT command. The mirror image is only compatible with the FreeDOS UNFORMAT command. Added the capability to unconditionally format hard disks. This code is rather slow, in this version, and needs optimized. Added error handling code. Fixed a bug that allowed you to enter invalid drive letters. Version 0.6 Major re-write to enable the program to format all types of floppy Pre 1 disks. Added a module from the development version of Free FDISK 0.98 in order to easily add direct disk access and the possibility of future LBA support. Compressed the executable with APACK, by Joergen Ibsen. Version 0.5 Added code to specify exact number of sectors per FAT and number of root directory entries for the following floppy drives: 1.44MB 3.5", 1.2MB 5.25", 720K 3.5", & 360K 5.25" (The only drive that is known to be successfully formatted is 1.44MB 3.5".) Added information to the help screen. The help screen can be displayed by either typing "FORMAT" or "FORMAT /?" Adjusted equation for computing the total logical partition size which fixed a bug causing an unconditional format to format into the next partition. Added code to optimize the formatting process and unconditionally format a track at a time. Now marks bad sectors in the FAT table for FAT12 partitions. Increase speed of unconditionally formatting a hard disk by writing a track at a time instead of a sector at a time. Fixed a bug that prevented accurate boot sectors from being written in FAT12 partitions on hard disks. Changed the location of the bad sector map initialization code to prevent errors reading the disk when formatting with both /u and /q. Added code to terminate formatting if a bad sector is encountered in boot sector, FAT tables, or root directory. Discovered that the program would write to bad sectors and not save their locations in the bad sector map. Added code to verify that the sectors are good to rectify this problem. If the sectors fail verification then it is marked in the bad sector map to be later recorded in the FAT tables. Fixed a bug that where the program did not always pass a null terminated string to the "sys" command when writing system files while formatting a disk. Version 0.4 Now supports up to 8 physical drives. Added error trapping to avoid trying to save the file system of an unformatted drive. Added the "/s" switch to make the disk bootable. (Presently only works under MS-DOS.) Added code to force the volume label to all capital letters. Fixed a volume label creation bug where the volume label is not correctly added to the boot sector. Fixed the bug that prevented a mirror image being created on sectors that had a numbers exceeding 1677216. Fixed a bug that caused the wrong number of sectors to be entered in the boot sector and processed elsewhere in the program. Now marks bad sectors in the FAT table for FAT16 partitions when unconditionally formatting a hard disk. Version 0.3 Added code to save the file system into a "mirror" at the end of the disk. This "mirror" image is compatible with the unformat command I have written. Moved the logical drive location adjustment code to a centralized location under the Convert_Logical_To_Physical() function. This should make the program easier to modify in the future because the now the programmer only has to refer to the sector number on the logical drive. The programmer will not have to adjust for the beginning of a hard drive partition when entering what sector to access. Version 0.2 Added /v switch to create a volume label on a newly formatted disk. Modified the command line parsing code to eliminate the need for the string.h library. Changed the error-level codes to match those in my IBM DOS 5.0 User's Guide and Reference. Corrected the code for processing the /q /u switches so that the program formats as per my DOS manual. Added more code to process the various switches that can be entered. Adjusted sectors per cluster conversion table. Added functionality to support up to 4 hard drives with a maximum of 26 partitions per hard drive. The program will now resolve the drive letter into a physical location to format on a hard disk. Version 0.1 Replaced the sloppy code in the Convert_Logical_To_Physical function with equations. Thanks go to Jan Verhoeven for supplying the equations. Too many code changes to list here. Added a quick formatting routine, format drive: /q now will quick format a drive. Added more values to the boot sector that were missing in version 0.01. To unconditionally format a drive, format drive: /u must be entered. Unconditionally formatting a drive does not yet mark bad sectors or clusters in the FAT tables. The program will format 1.44 MB 3.5" floppy disks or the first partition of the first hard drive. The program considers any drive letter starting with c: to be the first partition on the first hard disk. This will be corrected in a future release. Version 0.01 Formats 3.5" 1.44MB floppy disks. Uses BIOS interrupts to allow it to work under FreeDOS. Has not been tested with other size floppy disks. The "This disk is not bootable" code was taken from the boot sector of a floppy disk formatted with the "mkfs -t msdos" command on a Linux PC. Most of the "infrastructure" is in place to enable this program to format disks without using DOS interrupts. Has sections of debugging code. Only formats the 1st partition on the 2nd hard disk. (It is harder to debug a program when you are always formatting your C: drive. :-) ) Has sections of "rough" code that need to be modified. (i.e. if statements that are always true)