Re: [cc65] Atari DIO

Date view Thread view Subject view

From: Christian Groessler (cpg_at_aladdin.de)
Date: 2002-10-28 23:57:31


Hi,

On 10/28/2002 12:02:22 PM PST "Shawn Jefferson" wrote:
>
>>>> Christian Groessler <cpg_at_aladdin.de> 10/24/02 08:45AM >>>
>
>>>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.
>
>Hi Chris,
>
>Couldn't I just write into the sectsizetab * 4 * drive number?  That
>would be easy enough.  Is there some way to reference the sectsizetab
>from my source code?

This would be what my "small assembler function" would have done. You
cannot do it since the sectsizetab variable is invisible to C (no
starting '_').


>I still think it would be nice to not have to build a separate
>library for supporting system with more than 4 drives.  It would be
>nice if there was some way to assign the memory for this dynamically.
>Is there some reason that you couldn't alloc memory in dio_open for
>each handle, and then free it in dio_close?  I guess that would
>equate to less memory, but a little more overhead.

I think the code needed to access the sectsizetab indirectly would
increase (and complicate) the code quite a bit. So I like to stay with
the compile time define.
One year ago an empty Atari program was already the biggest of all
ports. (Maybe some other port catched up in the meantime?) So I set it
to 4 drives.

Is recompiling really such a problem?
If yes, what do you Atari users on the list think is a good default
value? I think 16 is the maximum possible SIO-wise, it would consume
64 bytes :-(

>
>>Btw, why do you think "Knowing the sector size in my application is
>>not a problem?" It depends on which disk the user inserted...
>
>I answered this previously, but thought I would mention it again in
>case you missed it.  I will always know the sector size in my
>application since it is contained in the partition table.

How is your hard disk connected? I don't have a hd on my Atari
(yet?).

regards,
chris

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de 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-28 23:58:08 CET