Re: [cc65] dio density detection

From: Shawn Jefferson <jefferson_shawn_a8bit1yahoo.com>
Date: 2005-02-18 19:17:45
--- Christian Groessler <chris@groessler.org> wrote:

> It seems that the xf551 needs to have the disk been
> accessed before
> the $53 request gets issued in order for the return
> values of be correct.

Yes, this is what I've read.  You have to try and read
a sector 4-n before doing the status request.

> I once read somewhere that the first three sectors
> of a disk are
> always 128 bytes. Now if I read the first sector of
> a disk before
> doing the $53 request, I get a 128 bytes sector
> status even for a
> DD disk.

Yes, this is true, so the Atari can boot from the
drive properly.
 
> Unless someone has a better idea, I will implement
> this density
> detection in dio_open.

I think that is the best thing to do.  Supports all
drives.
 
> I don't know how to handle the first 3 sectors of a
> DD disk though.
> Probably the dio_read and dio_write functions should
> automatically
> DTRT (use 128 bytes length), but then an unillumined
> user might be
> unaware that he has read/written only half of his
> buffer.

I thought that you had implemented something like this
already?  In the past I had asked for the ability to
read/write 256 byte sectors and you made some changes.
 
> Also there is the question how other DD capable
> hardware handles the
> first 3 sectors. Maybe a xf551 detection needs to be
> implemented - ugh
> :-(

As far as I know, all DD drives use the same standard.
 At least all the DD images out there (ATR images) use
this standard (3 sectors of 128 bytes, all the rest
256 bytes.)  I don't think you need anything to detect
the XF551 in this case.  Reading sector 4 and then
doing a $53 should be sufficient I think.  Reading
only 128 bytes in sectors 1-3 and 256 bytes for all
others should be good I'd think.

Documenting this could go into the platform specific
documentation.

Thanks for your work on this so far!  Can I expect a
patched dio_open soon? :)

--
Shawn Jefferson


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Feb 18 19:17:49 2005

This archive was generated by hypermail 2.1.8 : 2005-02-18 19:18:00 CET