VOGONS


First post, by boggit

User metadata
Rank Newbie
Rank
Newbie

Is there a good utility for modern windows (10 preferably) that can be used with a USB compact flash drive to determine the geometry (sectors, heads and cylinders) of a CF card?

I have tried using biosdrvs and ideinfo on my vintage 386 system (using a cf->ide adapter attached to the i/o card) but I can only get that to work if I first enter the correct geometry info in CMOS setup, creating something of a catch-22 for me.

For now, I have to unpack and set up my XT system and run biosdrvs with the CF card attached to the XT-CF Lite card to find out the correct info. It would be way more convenient to determine it on my modern system.

Reply 1 of 7, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

Don't know of a utility that can do it off the top of my head, but it would need to use an ATA passthrough command to wrap an ATA identify request (which would return the cylinders/heads/sectors values reported by the card)... and the USB adapter would need to actually know how to handle the passthrough command instead of just returning an error (most do but not all).

Reply 2 of 7, by Ryccardo

User metadata
Rank Member
Rank
Member

Victoria (hdd.by) probably?
There's a port of hdparm but never tried it (as in: support the original not the imitation 😜)

And yup, you'd need an USB-IDE converter that supports UAS or the leading proprietary passthrough methods - which I suspect you won't find in any modern-ish multi card reader nor in a golden age of CF one…

Reply 4 of 7, by doshea

User metadata
Rank Member
Rank
Member
boggit wrote on 2024-03-11, 19:55:

I'm not sure what a passthrough is, I'm afraid. What I am using for CF reader is [this device]

USB-to-storage adapters don't always let the host send any command it wants to the target device, because that's more work, so they just support the basic read/write/etc. stuff. Commands required for SMART are an example of something that often won't work with USB adapters - the documentation for smartmontools describes all the hoops you sometimes have to jump through to tell it how to use some device-specific way to pass through the ATA commands via the USB adapter to the device - and the ATA "IDENTIFY" command that you can use to get a device's geometry probably have similar issues, I would imagine. I assume that part of the issue is that the standard for USB mass storage devices would have standard commands defined for reading and writing, but probably not for getting C/H/S 😁

I think CF readers are much less likely to support those sorts of commands, and my Lexar one certainly doesn't. I got a "professional" one in the hope that it would, but I guess people like photographers probably don't care much about drive geometry or checking SMART monitoring!

USB-to-ATA adapters like this tend to be more of a power user thing, so I think they're more likely to support those commands.

I think the one I linked is the one I have (at least it's the same brand), and when I use that with a passive adapter that lets me attach a CF card to a 44-pin ATA + power connector, I can use the Linux hdparm command, which shows the geometry:

$ lsscsi
[...]
[6:0:0:0] disk CF Card /dev/sdd
$ sudo hdparm -I /dev/sdd

/dev/sdd:

CompactFlash ATA device
Model Number: CF Card
Serial Number: 13[................]
Firmware Revision: Ver6.04L
Standards:
Supported: 5 4
Likely used: 6
Configuration:
Logical max current
cylinders 3872 3872
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 3902976
LBA user addressable sectors: 3902976
LBA48 user addressable sectors: 3902976
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 1905 MBytes
device size with M = 1000*1000: 1998 MBytes (1 GB)
cache/buffer size = 1 KBytes (type=DualPort)
Nominal Media Rotation Rate: Solid State Device
Capabilities:
LBA, IORDY(cannot be disabled)
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 1 Current = 1
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
SMART feature set
Security Mode feature set
Power Management feature set
Write cache
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* CFA feature set
* 48-bit Address feature set
* Mandatory FLUSH_CACHE
CFA max advanced io_udma cycle time: 80ns
CFA max advanced mem_udma cycle time: 80ns
* CFA advanced modes: pio5 pio6 mdma3 mdma4 io_udma4 io_udma5 io_udma6 io_udma7 io_udma8 io_udma9 *io_udma10 mem_udma4 mem_udma5 mem_udma6 mem_udma7 mem_udma8 mem_udma9 *mem_udma10
* CFA Power Level 1 (max 750mA)
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
supported: enhanced erase
Show last 3 lines
	60min for SECURITY ERASE UNIT. 60min for ENHANCED SECURITY ERASE UNIT. 
Checksum: correct

As already mentioned, there's a port of hdparm to Windows, but I can't vouch for it either.

Reply 6 of 7, by doshea

User metadata
Rank Member
Rank
Member

OP said they were hoping to use their modern system. I assume that since IDEINFO is from 1991 or so, it might be a challenge.

I know that you can generally boot DOS from a USB device (maybe some firmware is making this difficult now though?) but I assume the BIOS just installs an interrupt 13h handler allowing access to the drive, rather than emulating an IDE/ATA controller, so that might be an issue?

I guess sometimes the onboard SATA controller can be configured to operate in a legacy mode, will it appear as an IDE/ATA controller then? If so maybe using a SATA-to-ATA adapter would help, so long as that adapter passes through the necessary commands. I imagine it should pass through the IDENTIFY command at least since that's how the BIOS figures out the disk capacity, and not passing it through would break disk auto-detection?

Then I wonder if one could make this more convenient by using eSATA?

The thing that I would find less convenient about this setup is the need to supply power to the ATA-to-CF adapter, and possibly the SATA-to-ATA adapter. Using a 44-pin adapter like I suggested above means everything is powered by USB.

Reply 7 of 7, by kingcake

User metadata
Rank Oldbie
Rank
Oldbie
doshea wrote on 2024-03-23, 10:14:
OP said they were hoping to use their modern system. I assume that since IDEINFO is from 1991 or so, it might be a challenge. […]
Show full quote

OP said they were hoping to use their modern system. I assume that since IDEINFO is from 1991 or so, it might be a challenge.

I know that you can generally boot DOS from a USB device (maybe some firmware is making this difficult now though?) but I assume the BIOS just installs an interrupt 13h handler allowing access to the drive, rather than emulating an IDE/ATA controller, so that might be an issue?

I guess sometimes the onboard SATA controller can be configured to operate in a legacy mode, will it appear as an IDE/ATA controller then? If so maybe using a SATA-to-ATA adapter would help, so long as that adapter passes through the necessary commands. I imagine it should pass through the IDENTIFY command at least since that's how the BIOS figures out the disk capacity, and not passing it through would break disk auto-detection?

Then I wonder if one could make this more convenient by using eSATA?

The thing that I would find less convenient about this setup is the need to supply power to the ATA-to-CF adapter, and possibly the SATA-to-ATA adapter. Using a 44-pin adapter like I suggested above means everything is powered by USB.

Make a bootdisk and put ideinfo on it