This project provides a collection of cross-platform command-line utilities for working with ImageDisk (.IMD) floppy disk image files. These tools are a modern C-based port of the original MS-DOS ImageDisk utilities created by Dave Dunfield, designed for portability across Linux, macOS, and Windows.
The original MS-DOS version is available from Dave's Old Computers.
This suite includes the following command-line tools:
imdu: The main ImageDisk Utility. It can display image information, convert.IMDfiles to raw binary (.BIN), merge tracks, manage comments, apply compression, and modify track properties like data rates and interleaving.imda: Analyzes an.IMDfile to recommend suitable physical floppy drive types andimduoptions for recreating the disk.imdchk: Checks the format consistency of an.IMDfile. It reports errors in headers, comments, sector maps, and track sequences.imdcmp: Compares two.IMDfiles track by track and sector by sector, reporting any differences found.imdv: An interactive, terminal-based viewer and editor for.IMDfiles. It allows navigation through tracks and sectors, and supports editing data in both hex and ASCII/EBCDIC modes.bin2imd: Converts a raw binary image file (sector dump) into the.IMDformat, requiring track and sector format definitions to be provided.
These utilities are written in C (C11) and use CMake as the build system.
- A C compiler (GCC, Clang, MSVC, etc.)
- CMake (version 3.25 or later recommended)
- For
imdv:- Linux/macOS: ncurses development library (e.g.,
libncurses-dev) - Windows: PDCursesMod (fetched automatically by CMake)
- Linux/macOS: ncurses development library (e.g.,
-
Configure: Create a build directory and run CMake from the project root.
cmake -S . -B buildFor Visual Studio on Windows, you might use:
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
-
Build: Compile the project using CMake's build command.
cmake --build build --config Release
The compiled executables will be located in the build directory (or a subdirectory within it, depending on your generator).
Run any command with --help for a full list of options.
# Display information about an IMD file
./imdu <image.imd>
# Convert IMD to raw binary sector dump
./imdu <image.imd> <output.bin> -B
# Compare two IMD files, ignoring compression differences
./imdcmp -C <file1.imd> <file2.imd>
# Analyze an IMD file for suitable drive types/options
./imda <image.imd>
# View an IMD file interactively
./imdv <image.imd>
# View and enable editing for an IMD file (use with caution!)
./imdv -W <image.imd>
# Convert a raw binary file to IMD (e.g., 80 cyl, 2 heads, 512b, 18 sectors)
./bin2imd <input.bin> <output.imd> -N=80 -2 -DM=5 -SS=512 -SM=1-18If configured, CMake can install the libraries, headers, and executables:
# From the build directory
cmake --install . --prefix /path/to/install/location
# Or (for single-configuration generators like Makefiles):
# make install
# Or (for multi-configuration generators like Visual Studio):
# cmake --build . --target install --config Release
This typically installs:
- Executables (
imdu,imda,imdchk,imdcmp,imdv,bin2imd) to<prefix>/bin. - Static libraries (
libimd.a,libimdf.aor.lib) to<prefix>/lib. - Header files (
libimd.h,libimdf.h) to<prefix>/include. - Documentation files (
README.md,LICENSE) to<prefix>.
This project is licensed under the MIT License. See the LICENSE file for details.
- Dave Dunfield: Creator of the original ImageDisk software for MS-DOS.
- PDCursesMod: Used for the
imdvterminal interface on Windows.