hdfmonkey: A Swiss Army Knife for manipulating HDF disk images

version: 0.5.6 jjjs

which is a jjjs fork on top of the chwe-dev-v05x branch

https://codeberg.org/chwe/hdfmonkey/src/branch/dev-v05x

(as of 2025-02-23)


With the following additional features:

- binary executables for all major operating systems:

  -- Windows (all 64-bit versions)
  -- Linux (all 64-bit versions)
  -- macOS Intel
  -- macOS Apple Silicon (M1,M2,M3,M4...)

- Patch of the FatFS to access wrongly (by other tools)
  created almost-FAT32 images (incompatble with the standard: 
  those in the wild with a number of clusers which would fit
  in 16-bit but still spending 4 bytes for each number
  in the image). Don't create such images!

- Consistent return of EXIT_FAILURE on all errors

- Windows version always creating sparse images

- The new putdir command for simple creation of the whole image
with the content from the source directory with all the files and
the directories copied to the destination in a simple command.

This example creates a disk image of 1 GB, copies all the content
of the sn-complete-24-11 directory and then lists the root
directory of the image:

C:\tmp> hdfmonkey.exe create sn.mmc 1GB

C:\tmp> hdfmonkey.exe putdir sn.mmc sn-complete-24-11 /

C:\tmp> hdfmonkey.exe ls sn.mmc
[DIR]   apps
9662    CONTRIBUTING.md
[DIR]   demos
[DIR]   docs
[DIR]   dot
[DIR]   extras
[DIR]   games
[DIR]   home
5186    LICENSE.md
[DIR]   machines
[DIR]   nextzxos
31457280        QXL.WIN
1483    README.md
[DIR]   src
[DIR]   sys
304640  TBBLUE.FW
2687488 TBBLUE.TBU
[DIR]   TBUS
[DIR]   tmp





ABOUT
-----
hdfmonkey provides a suite of tools for working with FAT filesystems contained
in HDF disk images. HDF is the standard format used for virtual hard disks in
ZX Spectrum emulators such as Fuse <http://fuse-emulator.sourceforge.net/>, so
hdfmonkey allows these disk images to be prepared without having to go through
a physical disk as an intermediate step - particularly useful when developing
software for FAT-supporting systems like ESXDOS and ResiDOS.

Commands provided include:
clone, create, format, get, ls, mkdir, put, rebuild, rm

These commands are passed as a parameter to hdfmonkey along with any other
required arguments:

    hdfmonkey <command> <disk-image> [other params]

For further information on command formats, type 'hdfmonkey help'.

INSTALLING
----------
From a tarball (see http://files.zxdemo.org/gasman/speccy/hdfmonkey/):

    tar xzf hdfmonkey-0.4.tar.gz
    cd hdfmonkey-0.4
    ./configure
    make
    sudo make install

From git:

    git clone https://github.com/gasman/hdfmonkey.git
    cd hdfmonkey
    autoheader
    aclocal
    autoconf
    automake -a
    ./configure
    make
    sudo make install

From git into a Debian source package:

    git clone https://github.com/gasman/hdfmonkey.git
    dpkg-source -b hdfmonkey

From git into Debian binary package:

    git clone https://github.com/gasman/hdfmonkey.git hdfmonkey-0.4.1
    cd hdfmonkey-0.4.1
    fakeroot debian/rules binary

TODO
----
Implement a FUSE / MacFUSE filesystem driver, so that the disk image can be
mounted and accessed by standard OS file operations.

COPYRIGHT
---------
This program is free software: you can redistribute it and/or modify it under
the terms of version 3 of the GNU General Public License as published by the
Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

AUTHORS
-------
Matt Westcott <matt@west.co.tt>

All of the clever FAT handling is handled by FatFs by ChaN:
http://elm-chan.org/fsw/ff/00index_e.html

Additional contributions by Miguel Guerreiro, Philip Kendall and Sergio Baldovi.

FURTHER READING
---------------
HDF file format: http://faqwiki.zxnet.co.uk/wiki/HDF_format
ESXDOS: http://www.esxdos.org/
ResiDOS: http://www.worldofspectrum.org/residos/
