Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!darwin.sura.net!Sirius.dfn.de!math.fu-berlin.de!hrz.tu-chemnitz.de!wutcd From: wutcd@chemnitz.guug.de (Joerg Wunsch) Subject: Re: How to format UNIX floppies under 386BSD Message-ID: <wutcd.718471907@hadrian> Sender: bin@hrz.tu-chemnitz.de (Owner of all binaries) Organization: tu-chemnitz 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> <1992Oct7.022247.26696@ninja.zso.dec.com> Date: Wed, 7 Oct 1992 15:31:47 GMT Lines: 44 alan@ulka.zso.dec.com (F. Alan Jones) writes: >Thanks for the reply Brian. So, what make/model is the floppy controller >chip on a stock PC? When I have that, I can write the manufacturer. My >PC is a "street" machine with no docs. I assume the IBM PC Tech Ref is >off the shelf and still in print. It's easy. You can assume that any dos box is kept compatible to ancient NEC 765 / Intel 8272 chip (nearly the same). For a command description (very, very short) see the file /sys/i386/isa/ic/nec765.h (the name says everything). But unlike the one who remarked that formatting will take heavy i/o access: some years ago i've written a bios for a home-made CP/M computer. As far as i remember, formatting will take only the sec#, cyl#, and head# to write into id field, and _one byte_ which the controller fills into all newly formatted sectors. Usually, the mentioned numbers are the same as physical head/cylinder number (but they do not need to be so - e.g. you're formatting a 360K disk within 1.2M drive), and sectors are numbered 1 thru 15 (or 18). They _really_ start at one, not zero! Of course, you'll have to look at the current driver stuff for doing it (track positioning, sleep until controller told ``seek complete''...). Btw., i guess the driver should _not_ deal with bad sectors after for- matting. This is not a problem of low-level format rather than the high-level formatter (newfs) will have to check it, or you decide to use any sector-remapping strategy the driver deals with (as done in bad144) - but as far as i know, 386BSD diskettes won't use this. If you're really interested, i could email you something more about the controller. But that'll take me more time (since my info is in German:-((). For example, you can get the relevant parts of my older (CP/M) formatter if you'd like it (and if you're familiar with Z80 code). Enjoy, J"org ps: A last hint: after making any driver function work, there must be of course, a simple user interface program to the driver;-) -- J"org Wunsch, TCD GmbH Dresden, R"ahnitzgasse 18, D-O-8060 Dresden \ ~.~. joerg_wunsch%bonnie@hadrian.hrz.tu-chemnitz.de \ ~ | ~ voice: +49-351-5965 137 \ ===