Re: [cc65] Uniform mass storage device discovery and file locations

From: Oliver Schmidt <ol.sc1web.de>
Date: 2012-09-11 13:40:47
Hi,

>> My finding so far is that it would be appropriate to open the cmd
>> channel and and send an "I" (for Initialize) to the device. Does that
>> make sense?
>
> It does. But - of course - the status has to be read back and parsed. 00 returned after "I" command denotes a working volume being "mounted".

Now that the new functions getfirstdevice()/getnextdevice() are in
place (see new file 'device.h' in the current snapshot) I was trying
to implement the above - checking if a device is actually operational.
It does (or at least it seems to do) correctly determine, if a disk is
in a drive or not. However when calling my code for a non-present
device it hangs. I could of course re-do the same stuff I do in
getnextdevice() before sending the 'I'. But I'm pretty sure there's a
shorter, more elegant way to perform this task.

I'd love to paste here my current code but because I'm trying hard to
reuse existing C libary code it consists only of calls to internal C
library functions - which I presume wouldn't tell you much. Instead
I'm asking for the general sequence of Kernal calls to perform - and
especially after which to check for errors in which way (return value,
ST value, read error "out of channnel").

Hopefully this approach makes sense...

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 Sep 11 13:41:08 2012

This archive was generated by hypermail 2.1.8 : 2012-09-11 13:41:12 CEST