Format:HFE image (HxC)
| Platforms | Platform:Amiga, Platform:Atari ST, Platform:Amstrad CPC, Platform:Commodore 64 |
|---|---|
| Magic | 48 58 43 50 49 43 46 45 |
| Extensions | .hfe |
| On this wiki | Facts · Code · Notes · Topics |
HxC Floppy Emulator image: a 512-byte header starting "HXCPICFE" (v3: "HXCHFEV3"), a track lookup table at block 1 and bit-cell data with the two sides interleaved every 256 bytes; it stores MFM, FM, Amiga MFM, GCR and other encodings for many 8/16-bit computers.
Header (512 bytes, little endian)
0x00 signature "HXCPICFE" (HFE v3 uses "HXCHFEV3" in Greaseweazle); 0x08 format revision (0); 0x09 number of tracks (cylinders); 0x0A number of sides; 0x0B track encoding; 0x0C u16 bit rate in kbit/s (250 typical; MAME accepts 125-500); 0x0E u16 RPM (unused); 0x10 floppy interface mode; 0x11 unused; 0x12 u16 track list offset in 512-byte blocks (normally 1, i.e. 0x200); 0x14 write allowed (0xFF); 0x15 single step (0xFF); 0x16-0x19 alternative encodings for track 0 side 0/1 (flag 0x00 = used, 0xFF = not used, then the encoding); the rest is 0xFF.
Track list and data
Table of per-cylinder entries {u16 offset in 512-byte blocks, u16 length in bytes of both sides}. Track data is in blocks of 0x200: 0x100 bytes of side 0 then 0x100 bytes of side 1; the last block may be partly filled but side 1 still starts at +0x100. Bits are stored LSB first, one bit per half cell, so a cell is 2 bits (MFM for 0x4E is 10 01 00 10 01 01 01 00).
Track encodings (Greaseweazle table)
0 ISOIBM_MFM, 1 AMIGA_MFM, 2 ISOIBM_FM, 3 EMU_FM, 4 TYCOM_FM, 5 MEMBRAIN_MFM, 6-7 APPLEII GCR, 8-9 Apple II HDDD GCR, 0x10 APPLEMAC_GCR, 0x12 C64_GCR, 0x13 VICTOR9K_GCR, 0xFF unknown.
Interface modes
0 IBMPC_DD, 1 IBMPC_HD, 2 ATARIST_DD, 3 ATARIST_HD, 4 AMIGA_DD, 5 AMIGA_HD, 6 CPC_DD, 7 GENERIC_SHUGART_DD (default), 8 IBMPC_ED, 9 MSX2_DD, 0x0A C64_DD, 0x0B EMU_SHUGART, 0x10 QUICKDISK, 0xFF unknown.
Sources
MAME src/lib/formats/hxchfe_dsk.cpp lines 20-130, 223-302, commit 1d7a454ed79e97d35d2a9f127ac029ead94711d6; keirf/greaseweazle (Unlicense) src/greaseweazle/image/hfe.py lines 24-66, 177-182, 317-318, 720-721, commit 26690f89967d519e0106ab9566019a026b920bb4. Related: Format:SCP flux image.
Code & repositories
- https://github.com/mamedev/mame @
1d7a454ed79e97d35d2a9f127ac029ead94711d6· license: BSD-3-Clause (declared by the contributor; GitHub's detector did not recognize COPYING)
MAME src/lib/formats/*_dsk.cpp and tzx_cas.cpp: floppy and tape image loaders
Tested on: source read, not run: source reading only · checked 2026-10-18; last activity 2026-10-18; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/keirf/greaseweazle @
26690f89967d519e0106ab9566019a026b920bb4· license: Unlicense
Greaseweazle host tools: src/greaseweazle/image/scp.py, hfe.py, adf.py (Unlicense)
Tested on: source read, not run: source reading only · checked 2026-10-18; last activity 2026-06-16; Note: the latest release ships binaries; the wiki links only the source, never the binaries