Hi, > I can only think of one way that would work across all DOSes, and all types > of disks (after all, you may want to have a disk copy routine that copies a > boot disk, or oddly sized ATR file). The only way I can think of is to just > try and read sectors until you find the last one-not the greatest method. I'd strongly suggest to not implementit that way it's absolutely not conformant to expectations. Imagine the disc copy scenario basically reading the whole disk twice. If there should be no way to do it with a reasonable amount of overhead then it should rather not be implemented at all. Then a disck copy program can still just call dio_read() until that returns with an errror... In my opinion even better would be to implement it and always return an error. The DIO interface currently isn't that strictly defined but it seems reasonable to interpret a sector count of zero as error condition and use _oserror to hold an error code. At least that's what my Apple II implementation does in case of a disk read error. > Perhaps you could try to request the percom block, but I don't think every > device will provide that, so you can't rely on it necessarily. Does it probably make sense to define a "> 80% of the drives" and/or a "> 80% of the DOSes" case in which a simple solution works and just live with the fact that the 20% left will return an error (aka zero sectors)? Just my two cents, 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 Thu Oct 18 11:07:46 2012
This archive was generated by hypermail 2.1.8 : 2012-10-18 11:07:50 CEST