Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!zaphod.mps.ohio-state.edu!wuarchive!udel!mmdf From: Peter_Van_Epp@cc.sfu.ca Newsgroups: comp.os.minix Subject: Re: 3.5" disks, PS/2 model 50Z (long!) Message-ID: <7546@nigel.udel.EDU> Date: 6 Jan 90 06:22:03 GMT Sender: mmdf@udel.EDU Lines: 34 GWR@LINUS.UUCP writes: >In article <18528@bcsaic.UUCP> paula@bcsaic.UUCP (Paul Allen) writes: > >A good way to handle this is to add another minor device type which is > >a "media sensitive" device useful for reading and writing formatted >diskettes. The other minor devices corresponding to particular >diskette formats would be useful with a diskette formatting program. > Another suggestion (and the rational behind it!): cause build bootblok.s actually) to put a media identifier byte ala DOS into the bootblok on a boot disk (for bootblok) and via mkfs (and/or the format program when one is written) into the currently unused boot block on all floppy media. Why do this? It makes life easy for both bootblok.s and floppy.c, I have modified bootblok.s to boot from 1.44m disks and as part of the clean up added a table for 720k 3.5in disks (rather than look in a prom location that may or may not be correct for any given machine!), however bootblok grinds my 360k floppy head into the stop trying to seek past track 40 to see if this is a 720k 3.5in drive. Floppy.c does a somewhat similar operation trying to figure out what size the floppy is (and is complicated by such things as a 360k disk in a 1.2m drive or a 720k disk in a 1.44m drive which the minor device numbers don't address!). Given that all floppy media have a type byte (lets use the same ones as DOS! I have some and can get (ie. have acces to disks) for the ones I don't (720k and 1.44m)), in the boot sector both floppy.c and bootblok.s can determine what type of diskette is in the drive by reading track 0 head 0 sector 1 (an operation valid on all disk types and we are on track 0 during a reset anyway!). I suspect that this will speed up floppy.c (the code suggests a speed improvment can be made by restricting the type of drive to 3.5 or 5.25) and yet it is still universal so you can boot and read with the same code from either 3.5 or 5.25 disks and as a bonus, I hope it will with the problems reading and writing 1.44m disks.