PCMCIA CompactFlash driver and supporting tools for Amiga 600/1200. Fork of driver/media/CFD133.lha.
COMPONENTS IN THIS RELEASE
==========================
- compactflash.device 2.1 (30.09.2026) (new)
- compactflash.automount 2.0 (27.08.2026)
- ptable.library 2.1 (30.09.2026) (new)
- CFInfo 1.39 (30.09.2026) (new)
- pcmciaspeed 1.36 (02.01.2026)
- pcmciacheck 2.1 (30.09.2026) (new)
- lsptres 1.1 (30.09.2026) (new)
WHAT'S NEW (30.09.2026)
=======================
Driver 'compactflash.device 2.1':
* An empty ENV:cfd.prefs gives the built-in defaults; before, the saved
copy in ENVARC: was used instead.
* cfd.prefs is read up to the documented 511 bytes; one byte less was read
before.
Tool 'CFInfo 1.39':
* The -- more -- prompt is shown in italic, reversed.
Tool 'pcmciacheck 2.1':
* pcmciacheck -cis also lists the card's configuration entries, reads the
CIS at 720ns unless a timing is given, and pages a screenful at a time on
a console.
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 <flavor>/<cpu>/ 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 <flavor>/<cpu>/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 <names> 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_<fs>, CONTROL_<fs>)
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 20260930 - 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.1 (30.09.2026) (14684 bytes):
MD5: 20125fdd039c8b8db78628f9ff170d2c
SHA256: 8585b11e63cba39e241f7771e56a10cc3573b87a40e4744f401dbf9f9c4e5965
small/68020/devs/compactflash.device 2.1 (30.09.2026) (10860 bytes):
MD5: 03803800d5e48d7f3ad72a10cb709762
SHA256: d2d721759e4757f6513cbf097dc593aad5419d9f02fbe0245e8ed7dbeddc1ed5
full/68000/devs/compactflash.device 2.1 (30.09.2026) (14808 bytes):
MD5: 0b8a0832730f3bc6d808c190811e844d
SHA256: 6622f368ed63d0d8643969f90d8fa7a404c3e36226102e7ebc6882eaba1e1cd2
small/68000/devs/compactflash.device 2.1 (30.09.2026) (10976 bytes):
MD5: e969c73e9f59e46a0f623b1746f4937b
SHA256: b906a972d142baa0f445591c3aab3880ba4ab5bd80939d9d72464f4ce0126656
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.1 (30.09.2026) (11960 bytes):
MD5: 50afa361c192a6f44e5554b1843761a8
SHA256: ddcb16fe402b8ac9db1f99e1f63b946f480d0e7dba60e484615d7ebdeb07f0c3
small/68020/libs/ptable.library 2.1 (30.09.2026) (9884 bytes):
MD5: 6e6b09e90c7a14230ebd9861e3f837b8
SHA256: 83dd1a840b17c19f39da98cb5dd8a1449b047e18486d3ebd7592b321c0978742
full/68000/libs/ptable.library 2.1 (30.09.2026) (12028 bytes):
MD5: 2e0323850041183c6a428bc4c1c03b8f
SHA256: ab2217c77502ed9f043ecdfadda7ab724d58bf80ba2dcf07c557d0da599c3c20
small/68000/libs/ptable.library 2.1 (30.09.2026) (9952 bytes):
MD5: f3e706e009a694686fe5b089a7caebc9
SHA256: 8e0dc6eb01f4e22c069eacb8559f518e468c8edaaec4ce5170bb5e3110888384
CFInfo 1.39 (30.09.2026) (16392 bytes):
MD5: d344a1350dfc2c32b93ef5364b24f62f
SHA256: 45fc9a7df84144e37052e6ddc4ac7c4b981c6bcfb56a4f3b8c3a33b86643128b
pcmciaspeed 1.36 (02.01.2026) (9264 bytes):
MD5: 47212b103dd94ffa3116ef07b3a4cdef
SHA256: 32ea11e0f4d1587fbc85587a39bee21c66abc62a33e301651eed585535c88610
pcmciacheck 2.1 (30.09.2026) (32596 bytes):
MD5: 0a827245ccd8f34521b0ae9359ac5eda
SHA256: bb0f9bc1b434cd348d41703078490d193d4bcc1fd6f146581fa7fe0482f4c93a
lsptres 1.1 (30.09.2026) (12104 bytes):
MD5: 7cbeb598e37dcda7c9e0d552f7293300
SHA256: 51116760f645b6b8b2af553af54855dce6fedfa3b7cd94556adbed6b360bc87b
CONTENTS
========
cfd/full/<cpu>/ - per-CPU "full" sysroot (debug-capable device + library)
cfd/small/<cpu>/ - 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
|