Short: CompactFlash PCMCIA driver for A600/1200 Author: jaroslav.pulchart@gmail.com (Jaroslav Pulchart), based on work by Torsten Jager and Paul Carter Uploader: jaroslav pulchart gmail com (Jaroslav Pulchart) Type: driver/media Version: 20260911 Replaces: driver/media/cfd.v20260614.lha Requires: AmigaOS 2.0+, PCMCIA slot, CF-to-PCMCIA or SD-to-CF adapter Architecture: m68k-amigaos Kurz: CompactFlash PCMCIA Treiber fuer A600/1200 PCMCIA CompactFlash driver and supporting tools for Amiga 600/1200. Fork of driver/media/CFD133.lha. COMPONENTS IN THIS RELEASE ========================== - compactflash.device 2.0 (11.09.2026) (new) - compactflash.automount 2.0 (27.08.2026) (new) - ptable.library 2.0 (11.09.2026) (new) - CFInfo 1.38 (11.09.2026) (new) - pcmciaspeed 1.36 (02.01.2026) - pcmciacheck 2.0 (06.08.2026) (new) - lsptres 1.0 (11.09.2026) (new) WHAT'S NEW (11.09.2026) ======================= New major version of compactflash.device 2.0 driver: * Automount: hotplugged cards mount automatically at DOS time, on by default. Can be disabled with AUTOMOUNT 0 in the new ENV:cfd.prefs config file. Removing a card fully unmounts all supported filesystems by default (UNMOUNT restricts it, UNMOUNT NONE keeps the handlers). Boot and automount bringup is split into a separate compactflash.automount module. Cold boot registers the RDB partitions (the autoboot chain); MBR, GPT and flat partitions are mounted by the automount agent once DOS is up, so cfd.prefs applies to them on a ROM-resident system too. See automount.guide for the full reference; automount-review.guide walks the feature scenario by scenario with the expected result of each. New major version of ptable.library 2.0 (bundled): * Unified partition scanning: a shared partition-table library the driver now uses instead of its own parser. It scans RDB, MBR, GPT and flat (whole-disk) partition tables and publishes every partition into a shared partition.resource. The new lsptres tool lists the resource (https://github.com/pulchart/amigaos-ptable). Tools 'CFInfo 1.38': * The report prints one screenful at a time; any key continues, Q stops. * Output lines end in LF alone. Tools 'pcmciacheck 2.0': * New "-identify" read-stability test: reads the same sector several times per mode and reports STABLE, UNSTABLE or STUCK. A card that returns different bytes on each read, or the same word over and over, corrupts files, and that is why the driver refuses it with "Getting IDE ID ... FAILED (data mismatch)" or "FAILED (repeated pattern)". * A Gayle PCMCIA timing can be given (100, 150, 250, 720): -s for the normal run, "pcmciacheck -identify " for the stability test. Both accept "all": "-identify all" prints a verdict matrix so you can see whether a card only misbehaves at the faster timings, and "-s all" repeats the capture at every timing and logs all of them, so the raw data behind such a fault can be attached to a bug report. Restored on exit, and a diagnostic only: the driver programs that register itself. * The read and write mode tests follow the driver more accurately, and -cis now reports the real access speed of cards that use the extended encoding. FEATURES ======== * Supports CompactFlash, MicroDrive, and various adapters (SD, MemoryStick, SmartMedia) * TD64 and SCSI emulation support * Works with fat95 filesystem for FAT32 support, not excluding Amiga native (ffs, sfs, pfs) filesystems * Scans and automounts RDB, MBR, GPT, and flat (whole-disk FAT) partition tables via ptable.library * Serial debug output for troubleshooting (Flags = 8) * Transfer speeds up to 2.2 MB/s read, 1.9 MB/s write (in multi-sector mode if firmware supports it or with Flags = 16 override) REQUIREMENTS ============ * Amiga 600 or 1200 with PCMCIA slot (A1200 tested) * AmigaOS 2.0 or higher (3.2.3 tested) * "CompactFlash to PCMCIA/ATA" adapter card (see images/cf-type-1.jpg, images/cf-type-2.jpg) or SD-to-CF adapter (see images/sd-cf-adapter.jpg) * fat95 filesystem (disk/misc/fat95.lha) recommended INSTALLATION ============ The archive ships two flavours (full / small) and two CPU tiers, each as a sysroot ready to drop onto SYS:. 68020+ (A1200 stock, 68020+): full/68020/devs/compactflash.device debug-capable small/68020/devs/compactflash.device no debug code full/68020/libs/ptable.library debug-capable small/68020/libs/ptable.library no debug code full/68020/libs/compactflash.automount optional, debug-capable small/68020/libs/compactflash.automount optional, no debug code 68000 (stock A600, 68000+): full/68000/devs/compactflash.device debug-capable small/68000/devs/compactflash.device no debug code full/68000/libs/ptable.library debug-capable small/68000/libs/ptable.library no debug code full/68000/libs/compactflash.automount optional, debug-capable small/68000/libs/compactflash.automount optional, no debug code compactflash.automount is the optional boot/automount bringup module; install it only if you want autoboot or automount (see AUTOBOOT/AUTOMOUNT). Choose based on your needs: - Use the full flavour if you need serial debug output (Flags = 8) - Use small for minimal memory footprint (no debug strings/code) Steps for normal mount-only use (no autoboot): 1. Drag the contents of // onto SYS: the inner devs/ and libs/ drawers map onto SYS:Devs/ and SYS:Libs/ directly. - A1200 (68020+): full/68020/ (or small/68020/) - A600 (68000+): full/68000/ (or small/68000/) 2. Copy c/CFInfo to C: (optional, card info utility) 3. Have fat95 installed on your system 4. Mount the drive by double-clicking Storage/DOSDrivers/CF0 Inserted cards automount by default. To tune it, or disable it with AUTOMOUNT 0, copy the example config: Copy ENVARC/cfd.prefs to ENVARC:cfd.prefs Copy ENVARC/cfd.prefs to ENV:cfd.prefs The resident driver re-reads cfd.prefs on every card insert and removal. See automount.guide for all keys. For autoboot, see the AUTOBOOT section below. For OS 3.5+: Copy def_CF0.info to sys:prefs/env-archive/sys and env:sys AUTOBOOT/AUTOMOUNT ================== Boot/automount is provided by ptable.library plus the optional compactflash.automount module (both shipped under //libs/). The plain compactflash.device on its own is a normal mount-only device. compactflash.automount carries two parts: - cold-boot autoboot: at Kickstart cold start it walks the RDB on the card, loads filesystem handlers into FileSystem.resource, and publishes each partition via AddBootNode (bootable) / AddDosNode. This needs compactflash.device + compactflash.automount + ptable.library ROM-resident; a disk-only install is silently ignored. - after-DOS bringup: it opens the device once DOS is up so the card-detect interrupt and the automount agent start. Automount is ON by default everywhere. Disable it with AUTOMOUNT 0 in ENV:cfd.prefs (copy ENVARC/cfd.prefs as shown in INSTALLATION). On removal all supported filesystems are fully unmounted by default; UNMOUNT restricts this, UNMOUNT NONE keeps the handlers. The resident driver re-reads cfd.prefs on every card insert and removal. On disk (no ROM), you get the same run-time automount (hot-swap) by adding to your user-startup-sequence: LoadModule LIBS:compactflash.automount LIBS:ptable.library DEVS:compactflash.device (plus L:fat95). LoadModule cannot provide cold-boot autoboot; that needs a real ROM. The per-filesystem config keys (UNMOUNT, FLAGS_, CONTROL_) recognise exactly five filesystem names and no others: DOS, FFS, SFS, PFS, FAT. Any other name is silently ignored. FAT partitions still need fat95 loaded so its filesystem code is registered. At cold boot an empty slot is detected by a single Gayle read and costs nothing; with a card present the boot stub polls up to 5 s for a slow one. More details are in automount.guide. MOUNT FLAGS =========== Set in CF0 mountlist (can be combined, e.g. Flags = 24 for debug + enforce): Flags = 0 /* default */ Flags = 1 /* "cfd first" hack for PCMCIA conflicts with other drivers */ Flags = 2 /* unused - was "skip invalid PCMCIA signature" (v1.37+) */ Flags = 4 /* use CardResource API instead of direct chipset access */ Flags = 8 /* output init messages to serial port at 9600 baud (v1.35+ full build) */ Flags = 16 /* force 256 sector transfers regardless of card capability (v1.35+) */ Flags = 32 /* skip multi-sector override auto-detection, use firmware value (v1.37+) */ SERIAL DEBUG EXAMPLE ==================== With Flags = 8, connect serial cable and monitor at 9600 baud. The first line is a version banner that identifies the driver version and CPU tier ([68020] or [68000]): [CFD] compactflash.device 2.0 (11.09.2026) [68020] [CFD] Card inserted [CFD] Identifying card... [CFD] Reset [CFD] Configuring HBA [CFD] ..done [CFD] Setting voltage [CFD] Voltage: 5V [CFD] CIS gate [CFD] ..DEVICE: type=0x0D speed=720ns size=0x00000000 [CFD] ..FUNCEXT: link=0x02, type=0x01, ifc=0x01 [CFD] ..RESULT: accept [CFD] ..CONFIG: addr=0x00000200 (or: [CFD] ..CONFIG: default (0x200)) [CFD] RW test [CFD] ..done, transfer mode: WORD [CFD] Getting IDE ID ... done (ATA) Model: TS4GCF133............................... Serial: G68120052383AC0700C7 FW: 20110407 Max Multi (W47): 8001 Capabilities (W49): 0200 Multi Setting (W59): 0100 LBA Sectors (W60-61): 00777E70 DMA Modes (W63): 0000 PIO Modes (W64): 0003 UDMA Modes (W88): 0000 [CFD] IDENTIFY (raw): W0: 848A 1E59 0000 0010 0000 0240 003F 0077 W8: 7E70 0000 4736 3831 3230 3035 3233 3833 W16: 4143 3037 3030 4337 0002 0002 0004 3230 W24: 3131 3034 3037 5453 3447 4346 3133 3320 W32: 2020 2020 2020 2020 2020 2020 2020 2020 W40: 2020 2020 2020 2020 2020 2020 2020 8001 ... W248: 0000 0000 0000 0000 0000 0000 0000 0000 [CFD] Init multi mode [CFD] ..max multi: 1 [CFD] ..set multi: 1, OK [CFD] ..override test: OK [CFD] ..done, multi RW: 256 [CFD] Card identified OK [CFD] Notify clients [CFD] Card removed Serial debug output at cold boot comes from a full build only and is unconditional, not gated by the mountlist Flags=8 setting. Two components emit output: compactflash.automount uses the [CFD] boot: prefix, and ptable.library uses [PT]. Note that ptable.library opens the device with Flags=0, so the per-card identify log ([CFD] Reset, [CFD] CIS gate, etc.) is not printed during autoboot. [CFD] boot: open ptable.library ... [CFD] boot: ptable.library not preloaded, InitResident()... [CFD] boot: BootScanPartitions(compactflash.device,0) [PT] cold boot: scanning for partitions [PT] no partition table (not RDB/MBR/GPT/FAT) [PT] cold boot done, partitions registered: 0 ENFORCE MULTI MODE (FLAG 16) ============================ Forces 256 sector reads/writes per IO regardless of card firmware support to improve IO performance. Same behaviour as v1.33 and earlier versions. WARNING: Verify your card is capable before using for real data! Set the flag and read any text file from CF card. The content should not contain repeating 32-byte pattern after first 512 bytes. See images/multimode-issue.jpg for example of broken output. NOTE: Since v1.37, the driver auto-detects multi-sector override capability and enables 256 sector mode when safe. This flag is now only needed as a manual override if auto-detection fails. Can be combined with MaxTransfer to limit sectors per IO: Flags = 16 MaxTransfer = 0x10000 /* 128 sectors per IO (64 KB) */ Tested configurations (author's experience - your results may vary): SD-to-CF adapter (SanDisk) 32GB - Works SD-to-CF adapter (Samsung) 32GB, 64GB - Works CF cards <=4GB - Works CF cards >4GB - Not working CFINFO UTILITY ============== CFInfo displays detailed information about the inserted CF card. Requires compactflash.device v1.36+ for IDENTIFY data, v1.37+ for driver config. CFInfo ; Show info for compactflash.device unit 0 CFInfo 1 ; Show info for unit 1 Example output: CFInfo 20260911 - CompactFlash Card Information Device: compactflash.device unit 0 === CompactFlash Card Information === Model: TS16GCF133 Serial: G64126022013C4120210 Firmware: 20180926 === Capacity === Size: 15.2 GB (31522736 sectors) Geometry: 30401 cyl, 16 heads, 63 sectors/track === Capabilities === LBA: Yes DMA: No PIO Modes: 0, 1, 2, 3, 4 Multi-sect: Max 1 sectors/interrupt === Card Type === Removable: Yes Type: CompactFlash === Driver Configuration === Driver Ver: 1.37 Mount Flags: 0 (none) Multi-sect: FW=1, Used=256 R/W Mode: WORD/WORD R/W Mode indicates how the driver accesses the PCMCIA: WORD 16-bit word access (standard) BYTE (...) 8-bit byte access variants (fallback) MMAP Memory mapped word access SOURCE CODE =========== Source code available at: https://github.com/pulchart/cfd Licensed under GNU LGPL v2.1 SUPPORT ======= The improvements to this driver are developed in my free time. If you'd like to support ongoing maintenance and experimentation, you can do so on Ko-fi: https://ko-fi.com/jaroslavpulchart HISTORY ======= See docs/changes.guide for release notes and original CFD history. Online version: https://github.com/pulchart/cfd/blob/master/docs/changes.md CHECKSUMS ========= full/68020/devs/compactflash.device 2.0 (11.09.2026) (14684 bytes): MD5: daa3eddb0c72f9a0b9ad262ebffebf58 SHA256: 6540d644a8f2bab93c7bc74f43c2aef92bf00fe9b7b8d9770073fc89616c20a5 small/68020/devs/compactflash.device 2.0 (11.09.2026) (10856 bytes): MD5: c59541d57090aaa7d3c18cd90721cd03 SHA256: f8299c81e8dcfa507dcc3842d3ec3903a45c08f7fc2c05fdd9e9ff362e7ab92c full/68000/devs/compactflash.device 2.0 (11.09.2026) (14808 bytes): MD5: 699f7b62c3f17d2b15af0c313b2348f4 SHA256: cff364d1dc6edeaf735c3fdefbdf08f627d65c8b17628c0bef7e4300b7654fab small/68000/devs/compactflash.device 2.0 (11.09.2026) (10976 bytes): MD5: 1f2056a7d33f141f9f6f52f34f134af6 SHA256: 8c1b5cbb0184afe2f753e16d6f77428dbd30969865f6b5a404d2af45dcb33221 full/68020/libs/compactflash.automount 2.0 (27.08.2026) (1064 bytes): MD5: 6524f0ccbd6de6932975e7b9ff2524ca SHA256: 1be8b95356803908324dc3fb90bd5ab346577db1001630ea1af9686288cf028b small/68020/libs/compactflash.automount 2.0 (27.08.2026) (628 bytes): MD5: 15de2c4626035a099fc8b05545e2777a SHA256: 14d9558cacec110cb79092b02c2ff5b1d929d356054dcd96569b1f92f1b61493 full/68000/libs/compactflash.automount 2.0 (27.08.2026) (1064 bytes): MD5: 6524f0ccbd6de6932975e7b9ff2524ca SHA256: 1be8b95356803908324dc3fb90bd5ab346577db1001630ea1af9686288cf028b small/68000/libs/compactflash.automount 2.0 (27.08.2026) (628 bytes): MD5: 15de2c4626035a099fc8b05545e2777a SHA256: 14d9558cacec110cb79092b02c2ff5b1d929d356054dcd96569b1f92f1b61493 full/68020/libs/ptable.library 2.0 (11.09.2026) (11820 bytes): MD5: 0c82efab11f88985ef211856d028caf0 SHA256: c8f23cb9d3f4e292aa253ee30999451989ed98fc384664177a6f8e49b4e12ed3 small/68020/libs/ptable.library 2.0 (11.09.2026) (9744 bytes): MD5: c576b35a6aa32f34a184f4055b3dc5dc SHA256: 8c44dd74dc7944895f9e7064e3b687c57b9be4e34d27dd3c06e8f48e6bb871c1 full/68000/libs/ptable.library 2.0 (11.09.2026) (11868 bytes): MD5: 985eeca0924f1fb63740dd93b12061a8 SHA256: 307190fd22a84bfccf2f92fccdb511dc0adf2a627ce10b226473c5bb03b54d0c small/68000/libs/ptable.library 2.0 (11.09.2026) (9792 bytes): MD5: 6b5ec22e5f2980ecac1d85048a90bd1f SHA256: 71cf9ec276b3cb391fcad317de7181d9da655f448be61cedaae188f9b7333d49 CFInfo 1.38 (11.09.2026) (15992 bytes): MD5: 90ff81e9d994784a7dbacac673454ffa SHA256: 27d007dee6f275d3d45d7d4c691a3a3adfc78d8e99ba66ca086c8966ad2dcc3e pcmciaspeed 1.36 (02.01.2026) (9264 bytes): MD5: 47212b103dd94ffa3116ef07b3a4cdef SHA256: 32ea11e0f4d1587fbc85587a39bee21c66abc62a33e301651eed585535c88610 pcmciacheck 2.0 (06.08.2026) (28660 bytes): MD5: 1e2b5fa1877a91a53d440b80b89965cd SHA256: 0ea807b79d267e880a1d61c7c7884f3fde7e1a5e255ab4982f6f1a0644723e09 lsptres 1.0 (11.09.2026) (11200 bytes): MD5: ced1cae1ecfdcf00fa906230abe7402f SHA256: 6d3269ebc28e1ea5648aa8c65fdcaf347c0b1d05d14c93d546a3c50a6e1a4f00 CONTENTS ======== cfd/full// - per-CPU "full" sysroot (debug-capable device + library) cfd/small// - per-CPU "small" sysroot (no debug code/strings) compactflash.device block device driver for PCMCIA CF cards: cfd/full/68020/devs/compactflash.device - 68020+, debug-capable (serial output with Flags=8) cfd/small/68020/devs/compactflash.device - 68020+, no debug code cfd/full/68000/devs/compactflash.device - 68000+, debug-capable (serial output with Flags=8) cfd/small/68000/devs/compactflash.device - 68000+, no debug code ptable.library (required) - partition scanner/automounter (RDB/MBR/GPT/FAT): cfd/full/68020/libs/ptable.library - 68020+, debug-capable (serial output always on at boot) cfd/small/68020/libs/ptable.library - 68020+, no debug code cfd/full/68000/libs/ptable.library - 68000+, debug-capable (serial output always on at boot) cfd/small/68000/libs/ptable.library - 68000+, no debug code compactflash.automount (optional) - boot/automount bringup; install for autoboot (ROM) or DOS-time automount (ROM, or on disk via LoadModule): cfd/full/68020/libs/compactflash.automount - debug-capable (serial output always on at boot) cfd/small/68020/libs/compactflash.automount - no debug code cfd/full/68000/libs/compactflash.automount - debug-capable (serial output always on at boot) cfd/small/68000/libs/compactflash.automount - no debug code cfd/c/CFInfo - Card information utility (displays model, size, capabilities) cfd/c/pcmciacheck - PCMCIA check utility cfd/c/pcmciaspeed - Speed test utility cfd/c/lsptres - partition.resource entry lister (from ptable.library) cfd/Storage/DOSDrivers/CF0 - Mountlist entry (with flags documentation) cfd/Storage/DOSDrivers/CF0.info - Mountlist Workbench icon cfd/ENVARC/cfd.prefs - Example config (copy to ENVARC:cfd.prefs to automount) cfd/docs/cfd.guide - Main documentation cfd/docs/automount.guide - Autoboot, automount, and ENV:cfd.prefs configuration cfd/docs/automount-review.guide - Automount feature review (expected behaviour) cfd/docs/changes.guide - Release notes and original CFD history cfd/docs/CFInfo.guide - CFInfo utility documentation cfd/docs/lsptres.guide - lsptres utility documentation cfd/docs/pcmciacheck.guide - pcmciacheck utility documentation cfd/docs/pcmciaspeed.guide - pcmciaspeed utility documentation cfd/src/ - Full source code cfd/images/cf-type-1.jpg - CF Type 1 adapter photo cfd/images/cf-type-2.jpg - CF Type 2 adapter photo (also MicroDrive) cfd/images/sd-cf-adapter.jpg - SD-to-CF adapter photo cfd/images/multimode-issue.jpg - Example of broken output with unsupported enforce multi mode cfd/LICENSE - GNU LGPL v2.1 "CompactFlash" is (TM) by CompactFlash Association