depeche@quiche.cs.mcgill.ca (Sam Alan EZUST) (05/08/90)
I use Pcommand and gulam frequently, and hate having to leave the shells to go to the desktop whenever I want to format. So I decided to start writing a program which works like the pc formatter, i.e. format a: /s2 will format a: for double-sided disks. I am using the example from Laser C which formats disks (pg451 of the manual) Here is my problem: I also want to be able to format 10 sectors/track. Unfortunately, the procedure which writes boot sectors, Protobt, has 4 possible disk types, none of which are 10sectors/track. Also, how come the procedure which writes bootsectors to the disk first writes 0'd buffer to track 0, if presumably, the procedure is being called right after a format?? And for double-sided disks, isn't it necessary to zero the second side of track 0 as well [if it is necessary to do the first side]. Oh well. Also, if I am re-inventing the wheel, and you happen to have done it already, could you send it to me? -- |S. Alan Ezust | depeche@calvin.cs.mcgill.ca| |McGill University School of Computer Science | Montreal, Quebec, Canada | |---------------------------------------------------------------------------| | "The mind is a terrible thing...." |
csbrod@medusa.informatik.uni-erlangen.de (Claus Brod ) (05/08/90)
depeche@quiche.cs.mcgill.ca (Sam Alan EZUST) writes: >I also want to be able to format 10 sectors/track. Unfortunately, the >procedure which writes boot sectors, Protobt, has 4 possible disk >types, none of which are 10sectors/track. Right, Protobt can give you four different standard disk parameter sets only. If you want to have your own non-standard format (and 10 sectors are non-standard though perfectly safe) you'll have to patch your bootsector yourself. No big deal, really, because you can call Protobt first to create a standard BPB block in your bootsector and then change some values like sectors per track, sectors per disk and so on. >And for double-sided disks, isn't it necessary to zero the second >side of track 0 as well [if it is necessary to do the first side]. You should zero all FAT sectors and all sectors of the root directory. Some early formatters wrote a $E5 pattern to the root directory, but this leads to very long search times in the root dir. ($E5 means "hey, GEMDOS, this dir entry has been deleted, but there might be some valid entry after me"). Claus Brod