Re: [cc65] Atari DIO

Date view Thread view Subject view

From: Christian Groessler (
Date: 2002-10-24 17:45:20


On 10/23/2002 10:18:04 AM MST "Shawn Jefferson" wrote:
>I have some questions about the Atari dio routines:
>1. What is the syntax for calling dio_open?  The docs say that you
>use 0 for drive 1, and so on.  I want to open drive 6 for read and
>drive 7 for write.
>2. Trying to open these drives gives me _oserror = 130, nonexistant
>device.  Am I running into a problem of the library only being able
>to access 4 drives hard-coded into it?  This is using Sparta where I
>can have 8-9 drives available at once (16 if you use SpartaDos X

Yes, 4 drives are hardcoded, since memory is reserved statically for
each one.
It's easy to change if you recompile the library, adjust this line


in libsrc/atari/Makefile. NUMDRVS is the # of supported disk drives.
I can build you a version with higher NUMDRVS if you want...

>3. Christian, would you be willing to fix the code around sector
>size, so that it is not hardcoded at 128, but rather we could change
>it ourselves?  Knowing the sector size in my application is not a
>problem, so if I could set it manually that would be great!  I'm not
>worried about autodetecting it.

Such a function would be a hack only, since you anyway cannot change
the sector size. So I won't add it to the cc65 lib.
As workaround I can provide you a small assembler function which you
can call to set the sector size by hand, but for the official lib I'd
like to have a way to autodetect it.

I have a xf551 which supports 256 byte sectors. Does anyone of the
atarians on this list know how to detect the disk format of an
inserted disk? Preferably not with SpartaDOS calls but with SIO

Btw, why do you think "Knowing the sector size in my application is
not a problem?" It depends on which disk the user inserted...


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-10-24 17:45:35 CEST