Message-ID: <000601c17097$7b500960$027efea9@atlantis> From: "Matthias Paul" To: References: <3BF1743E DOT 32E475BE AT 2net DOT co DOT uk> Subject: Re: Removable compact flash Date: Fri, 16 Nov 2001 22:09:23 +0100 Organization: University of Technology, RWTH Aachen, Germany MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id fAJ1Dte01643 Reply-To: opendos AT delorie DOT com On 2001-11-13, Chris Simmonds wrote: > I have a system with compact flash as my d: drive. From time to time I > need to take the CF card out and replace it with another one. The > problem is that DR-DOS thinks it is a hard disk and gives me a disk > error when I try to access d: after the change. Chris, unfortunately I have no first-hand experience with compact flash cards myself and therefore only limited info about them, but from your description that DR-DOS sees these flash disks as harddisks I take it that, while most flash cards need a huge stack of drivers to function, you can use the card without any dedicated drivers as a normal ATA device, that is, DOS sees the drive through INT 13h with DL>=80h. If this would be the case, doesn´t the same happen under, say, MS-DOS 6.22/7 or PC DOS 2000 as well (just to make sure it´s not a problem with DR-DOS as is)? Or do you have a so called Enabler loaded to make use of the card? INT 13h drives with unit numbers DL>=80h (that is partitioned media) are logged into the system during the boot phase, and this code is discarded later, as harddisk are assumed to be non-removeable. I strongly assume the same occurs with MS-DOS and PC DOS (but DOS 5.0+ adds three mostly undocumented device driver functions (47h, 67h, 68h) which are not supported by DR-DOS up to 7.03, I doubt this will make a difference). DOS keeps only the code to log in unpartitioned media, that is floppy disks, at runtime. These are accessed with unit numbers DL < 80h, and the log-in occurs after a disk change event. If you would reformat your disk to look as a super-large floppy, so called "super-floppies" without a MBR, it might be possible to write a small TSR that sits on top of INT 13h and lets your flash card look like, for example, floppy drive B:. Another - dirty - attempt might be flush buffers, patch the internal drive tables in DOS´ data area to match the geometry values of the newly inserted card, and then reset the disk system, so that it works with the new geometry data. (However, there may be some problems with applications like Windows, which don´t like harddisks to be changed without a reboot...) If the flash card is linked into the system not as a harddisk but as a DOS block device driver (similar to a RAM disk driver), things should be a bit easier. (If you would have the sources for that driver it would be almost trivial.) > I imagine that there is a device driver or other utility that will > present the CF as a removable media like a floppy disk or zip drive > and so dr-dos will be happy. Any ideas? I´m not up to date in regard to latest achievements in flash technology, so please correct me if I´m wrong. Such drivers are called Socket Services & Card Services (SS&CS), in contrast to simply Enablers or no drivers at all. CS are needed if you want to hot-plug PC Cards or PCMCIA cards, and Stack Services are needed for CS to run. You will also need a Flash File System (FFS) driver. These are/were available from various vendors, including Award´s DPMS using Cardware (I have some configuration info about 1.01, 2.0, 2.5, and 5.0, but my personal experience is limited to 2.5 from 1995), SystemSoft´s CardWizard, Phoenix Card Manager, or similar software from Madge, CSM, IBM (have a look at PC DOS 7 or 2000), etc. Various FFSs are available from vendors like Award, Microsoft, SCM, CSM, Datalight, and others. Such drivers are often shipped with the corresponding laptops or PCMCIA/PC Card interfaces, but sometimes they only ship with Enablers which (usually) allow to drive a single card, which must not be re-plugged at runtime. Hope it helps and greets, Matthias PS. It´s good to know you´re still around here! :-) -- ; http://www.uni-bonn.de/~uzs180/mpdokeng.html; http://mpaul.drdos.org