> From: owner-cc65@musoftware.de [mailto:owner-cc65@musoftware.de] On Behalf > Of Oliver Schmidt <snip> > > I think is query the percom block, and if it's not present, just > > return 0. So, it's > > up to the calling application knowing the best method to access the > disk. > > How much code would be necessary to additionally detect DOS 2.5 720/1040 > disks? It can be done (it involves looking for the VTOC in the upper sectors and then the one in the lower sectors), but that ignores all the "raw" formatted disks that a programmer may want to query the sector size on. I don't think we should make assumptions that all DIO access is going to be on DOS formatted disks. What's wrong with the solution of querying for the percom block, and if that doesn't exist, fall back on the brute force binary read method? That will always return you a max sector size for any disk. I don't like the solution of returning zero personally... that's so counter-intuitive, more so than reading the disk to determine the max sector (imo). ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Tue Oct 23 03:47:43 2012
This archive was generated by hypermail 2.1.8 : 2012-10-23 03:47:46 CEST