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

From: <silverdr1wfmh.org.pl>
Date: 2012-08-15 21:20:44
On 2012-08-15, at 13:52, A. Fachat wrote:

>> long so now short and crisp: Is there on the CBM machines a reasonable
>> way to enumerate the devices suitable for mass storage?
> 
> Short and crisp answer: no.

? Why?

> Longer answer: you could of course scan the bus with the "usual" device 
> numbers, read the device type by sending a "UI" command and reading the status 
> channel (which gives something like 73,VC1541....,00,00) - from which you 
> could look up in a database how many drives are on the device.

Which is exactly what I do in my disk imager. Except the number of drives in one device, that is.

> So, no.

Why? You just wrote that it is possible. In fact it is.

> And then, scanning the bus at the beginning might not be enough - 
> drives can be switched on/off. So it would have to be done every time the list 
> of devices is requested.

Which - again - is not that much of a problem. But I'd even say that if a user turns off his drive (or disconnects it) while using a program that may have a need for it, then bets are off and returning error (which should be handled anyway) is even easier.

> My approach would be to just return the standard devices for the platform, not 
> showing drives at all. IIRC the CBM dual drives search both drives for a file 
> on open, and use the last used drive if none is given on a create - so no real 
> problem here.

With simple operations it is all fine. When we talk about file manager, it could benefit from having a list of available devices.
-- 
SD!

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Aug 15 21:20:57 2012

This archive was generated by hypermail 2.1.8 : 2012-08-15 21:21:00 CEST