*BSD News Article 6179


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!caen!uwm.edu!ogicse!news.u.washington.edu!serval!hlu
From: hlu@eecs.wsu.edu (H.J. Lu)
Newsgroups: comp.unix.bsd
Subject: Re: How to format UNIX floppies under 386BSD
Message-ID: <1992Oct6.235811.29951@serval.net.wsu.edu>
Date: 6 Oct 92 23:58:11 GMT
References: <1992Oct5.153315.22272@ninja.zso.dec.com> <1992Oct6.145844.669@rucs2.sunlab.cs.runet.edu> <1992Oct6.173648.13606@ninja.zso.dec.com> <1asvcfINN7qu@network.ucsd.edu>
Sender: news@serval.net.wsu.edu (USENET News System)
Organization: School of EECS, Washington State University
Lines: 28

In article <1asvcfINN7qu@network.ucsd.edu>, brian@ucsd.edu (Brian Kantor) writes:
|> alan@ulka.zso.dec.com (F. Alan Jones) writes:
|> >source for isa/ide lower level floppy formatting?  Does there exist
|> >a good reference on the subject?
|> 
|> The manual for the floppy controller chip shows you precisely what
|> you need to do to format a floppy.  If you want to see example code that
|> implements that flowchart, look at the IBM PC Technical Reference
|> Manual in the BIOS listing, or at any of the older CP/M BIOSs.
|> 
|> In short, what you have to do is fill up a buffer or set up a series of
|> loops that will feed the image of a formatted floppy track to the floppy
|> controller chip one byte at a time fast enough.  DMA can help this.
|> 
|> The usual procedure is to write a track, read it back, mark and remember
|> it if it's bad, and then when you're all done writing the disk, go back
|> and fill in the FAT.
|> 
|> Note that this requires pretty heavy I/O access to the floppy controller
|> chip, which isn't buffered in the PC architecture.  Many systems have
|> rather poor multiuser performance whilst they are formatting a floppy.
|> 	- Brian


You may try to port format stuffs from Linux. Linux can format a floppy.


H.J.