Hi, >> > 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), I see. > 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. The approach only makes sense if it can detect with a let's say 99% confidence that it doesn't mistake a "raw" formatted disk for a DOS 2.5 disk. > 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). Thanks for bringing this up. There is probably a misunderstanding: My question above regarding DOS 2.5 disk detection is only relevant for the scenario of looking at percom and returning 0 in case of failure. In that scenario I'd ask for an additional DOS 2.5 disk detection. I personally don't argue against the approach of looking at percom and do a binary size search in case of failure. And in that case an additional DOS 2.5 disk detection is most likely not reasonable because of - code size overhead - risk of mistaking a "raw" formatted disk as DOS 2.5 disk If I understood things right than especially hard disk drives are supposed to support percom so a binary size search is supposed to only be necessary on comparably small floppy disks (?) Maybe one could invest a little code into specific support for "classic" floppy drives by checking sector 1040 and 720 for failure first before starting the actual binary search (?) Regards, Oliver ---------------------------------------------------------------------- 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 12:47:24 2012
This archive was generated by hypermail 2.1.8 : 2012-10-23 12:47:28 CEST