Join Date: Jan 2012
Re: CF/SD research and troubleshooting
Hdtoolbox says 'Unit is not a disk (Type 7)'
Your card is mistaken for an optical removable media (CDR, etc) by hdtoolbox.
Reasons for incompatibility
As far as I know this occurs with all cards that report as removable media (848A), and only when you go to 'change drive type' and select 'read configuration'.
If the important values (Cylinders, Heads, Blocks, etc) are filled out, you may ignore the message, fill out your own manufacturer and model info and proceed to partition the card.
(Unpatched hdtoolbox will show negative capacity for large drives (>4gb?). Ignore it, don't worry unless the partition page shows the wrong size.)
Failing that, there are patches for hdtoolbox available to fix this, and HDInstTool will also work. (Read the notes above about HDInstTool first).
Also, if you use WinUAE to prepare the cards you should not have this issue (even if you mount the CF using IDE0).
The ATA standard supports lots of different types of media, both fixed and removable types.
The problem with certain amiga IDE drivers and 'removable' media
IDE drivers communicate with devices using the ATA protocol, and require devices to identify as removable media or not.
For the CF card itself this type info does not change anything, but it has to give an answer.
Many CF cards are set to report as removable media, but not all, and it's hard to know in advance. ('Industrial' level cards are usually fixed type)
The information is stored on CF card's CIS (Central information structure) and communicated by the ATA controller inside the card when replying to the ATA IDENTIFY DEVICE command.
As mentioned above, original scsi.device IDE drivers have no problem with removable type CF cards or SD cards.
Regarding PCMCIA operation and incompatibility
However, drivers by Elaborate Bytes - idefix97 and individual computers product drivers - do not work with removable type devices.
The drivers do not comply with the ATA-4 (or newer) specification.
IDE drivers use the ATA command IDENTIFY DEVICE to get all kinds of information from the device.
The first word of the device reply (word 0, 'General configuration') is 848Ah for removable type CF cards, and 044Ah or 0040h for fixed type CF cards.
First, bit 15 set in the reply (cards reporting 848A) can cause drivers to fail.
Drivers not written in accordance to ATA-4 (or newer) do not expect bit 15 set for ATA devices.
Second, bit 7 set indicates that a device is removable media. This did not change since the original ATA-1 specification.
- ATA-4 standard ( 1998 ) says that bit 15 in word 0 shall be 0 for ATA devices (page 95), but can be 1 (848Ah) for CF compatible cards (page 52).
It also says that ATAPI devices shall not respond to IDENTIFY DEVICE, but reply to IDENTIFY PACKET DEVICE instead (page 41)
- ATA-3 standard ( 1997 ) says it must be 0 for ATA devices and 1 for ATAPI devices (page 49)
- ATA-2 standard ( 1996 ) says it is 'reserved for non-magnetic devices' (page 37)
- ATA-1 standard ( 1994 ) says it is 'reserved for non-magnetic devices' (page 44)
- CF specification v3.0 ( 2004 ) says word 0 standard is 848Ah, but can alternatively be 044Ah or 0040h to "turn off removable media". ( page 130 )
(Additionally bit 6 could be set to specifically mark a disk as fixed, but this was removed in ATA-6 standard (2002) so I guess modern drivers use bit 7.)
See attachments below
Attached are ATA specifications 1-5, CF spec 3, and the entire IDENTIFY DEVICE replies from my four CF cards and one SD card.
Amiga IDE drivers that fail with removable type CF cards probably expect bit 15 to be 0 for ATA devices, and therefore either give up on the device, or regard it as an ATAPI device and fail.
It's confirmed by Doobrey that Elaborate Bytes drivers simply stop processing the device if bit 15 is set in the reply.
It's possible that other drivers might accept bit 15 set but still fail with removable type CF cards because bit 7 is set.
A CF card's reply can not be changed manually except on a few old cards where the manufacturer (Sandisk, Lexar) provided tools to ‘flip the removable bit’.
However, I've read that some modern CF cards sense if they are connected to a proper IDE bus, and change their type to fixed.
My Transcend 4GB 133x, Kingston 4GB (flower img) and Kingston 16GB 266x cards report as fixed (word 0 = 044A)
The ATA Identify Device replies can be read with the BusTrace program.
J.Schönfeld made the TrueIDE dual CF-IDE adapter to work around the driver problem.
This adapter modifies the CF cards IDENTIFY DEVICE reply to allow removable type cards on drivers that only work with fixed CF cards.
Compact Flash storage devices operate in three modes:
Regarding SD cards
Compact Flash devices must support operation in all three modes, but operate only in a single mode at any given time.
- PC Card Memory Mode
- PC Card I/O Mode
- True IDE Mode
The CF card senses (using pin #9) if it's connected to IDE or PCMCIA, and switches modes accordingly.
Connected to IDE, it uses True IDE mode, and becomes a hardware-level PATA IDE device.
Connected to PCMCIA, things are getting more complex, as it takes the role of both IDE controller and IDE device, using PC Card I/O mode.
CF cards needs to support several different PCMCIA access modes, different register locations, etc.
Some CF cards (Kingston 4Gb etc) work with IDE/scsi.device but not with pcmcia/compactflash.device.
This can theoretically be due to the card, the driver or the amiga pcmcia implementation.
It is confirmed (by T.Wilen) that some cards do not support all mandatory register locations, causing problems with amiga pcmcia operation.
Let me know if you have more information
SD cards are not ATA devices and do not have integrated controllers like CF cards.
Relevance of PCMCIA / CF card voltage ratings?
Therefore there are far less differences between SD cards than between CF cards.
For the same reason SD-IDE adapters need to be active adapters, not just passive like most CF-IDE or CF-PCMCIA adapters.
As far as I know SD-IDE adapter manufacturers face the same options for ATA identification as a CF manufacturer, so compatibility might vary between SD-IDE adapters in a similar way as it does between CF cards.
As I wanted to experiment with SD cards, I have successfully tested 12 different 8GB SDHC cards on my a600 (PFS3 direct-scsi and ROM resident scsi.device) with a £6 SD-IDE adapter.
The test went like this
- Put three partitions on each card (300mb | 4gb | The rest)
- Copy 35mb file to dh1 in winuae
- Copy file from dh1 to dh2 on a600
- Copy file from dh2 to PC in winuae
- Confirm that files are binary identical (Using 'Beyond Compare')
All cards work perfectly on the a600 and the the files were binary identical.
Notes about IDE-SD adapters
When connected to a PC (over IDE), the adapters reports like a removable type CF card (word 0 = 848Ah).
Therefore drivers having problems with removable type CF cards will also have problems with such adapters.
I have not tested many SD adapters, but it is possible that adapters reporting as fixed devices exist.
After all this is not more complex, as the SD adapter needs to come up with the ATA response anyway.
The PCMCIA specification allows 3,3 or 5 volt devices, and the amiga pcmcia implementation only works with 5v devices.
The ‘low voltage key’ (physical incompatibility) on 3.3v pcmcia devices prevent using a 3.3v device in an amiga.
But if a 3.3v only CF card existed, and was used in a generic PCMCIA adapter, this could be a problem…
However: According to this document on the Compact Flash Association, all CF cards are able to operate on both 3.3v and 5v operation.
So voltage rating is not relevant.
I started this table with compatibility information for the different IDE drivers.
There are lots of holes, but I will not have time to finish it myself, so please let me know if you have something to add!
That’s it for now, well done if you are still reading!
There certainly are incompatible cards, but I hope some will find their card is compatible after all with this little guide.
Only tiny attachments allowed here. Have a look at amibay
for ATA and CF specifications etc..
Topics to be revisited
- Drive and partition size limitations and solutions
- Using two devices (master/slave) on Gayle IDE
Additions and suggestions are welcome! Thanks
Last edited by fgh; 06-29-2012 at 08:07 AM..
Reason: Link to attachments