steve@mickey.imsd.contel.com (Steve Childress) (11/16/89)
Need help with Amiga DOS Disk Driver .... In 1986, I wrote a driver for a Western Digital controller for the ST506 style disk drives using CBM's "mydevice.asm" as a model. Mucho hours getting my driver to work. It has worked fine for all this time, until... Along comes 1.3. When I user 1.3's FORMAT for FFS, I note that it calls the driver to format each track, then reads that track. The 1.1 and 1.2 formatters did that too. However, when that "verify" CMD_READ yields an error due to a flawed sector, my driver returns an error, as usual. The formatter then aborts, saying "BAD DISK, TRY ANOTHER"!!! Am I missing something? Isn't the formatter supposed to recover from these read errors by marking that block as USED in the sector allocation map, or some such strategy? (It doesn't seem to matter WHICH sector is bad.) Do I *HAVE* to have a DISK PREP program which does a low level format prior to running CBM's FORMAT program? I didn't in 1.1 and 1.2. I I have to write a prep program, how is it supposed to work? I cannot find any info on this in the 1.3 autodocs or includes. thanks. steve childress 818/706-5247 steve@mickey.imsd.contel.com
andy@cbmvax.UUCP (Andy Finkel) (11/17/89)
In article <40676@wlbr.IMSD.CONTEL.COM> steve@mickey.imsd.contel.com (Steve Childress) writes: >Need help with Amiga DOS Disk Driver .... >Along comes 1.3. > >When I user 1.3's FORMAT for FFS, I note that it calls the driver to >format each track, then reads that track. The 1.1 and 1.2 formatters >did that too. However, when that "verify" CMD_READ yields an error >due to a flawed sector, my driver returns an error, as usual. The >formatter then aborts, saying "BAD DISK, TRY ANOTHER"!!! > >Am I missing something? Isn't the formatter supposed to recover from >these read errors by marking that block as USED in the sector allocation >map, or some such strategy? (It doesn't seem to matter WHICH sector is bad.) Nope; our model has been that the driver hides the details of bad blocks from the filesystem. The filesystem has no bad block remapping logic. In 2090 and A590/A2091 drivers, the bad block logic is in the drivers. (Note that in a SCSI only driver, the bad block logic can become fairly simple, since many SCSI drives support a 'Remap Block' command). The Format program is an AmigaDOS filesystem format program; it expects the driver to hide bad blocks from it; Until 1.3 you could format a pizza and not have it notice errors. >Do I *HAVE* to have a DISK PREP program which does a low level format >prior to running CBM's FORMAT program? I didn't in 1.1 and 1.2. No; but your driver has to handle the low level bad block mapping. If your driver doesn't support bad block mapping, and its a preformatted drive, you might as well just format QUICK. Only if the root block and the boot block are bad will format complain. But you are playing a game of chance. Sooner or later you'll get a grown defect on the drive. -- andy finkel {uunet|rutgers|amiga}!cbmvax!andy Commodore-Amiga, Inc. "It's impossible to multitask in less than 4 meg." Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors.