The ADFlib
is a free, portable and open implementation of the Amiga filesystem.
The initial release was in 1999.
It supports:
Untested and/or exprerimental support exists for:
It is written in portable C.
The current version was built and tested in the CI system (GitHub Actions) on Linux (Debian 11 and 12, Ubuntu), Windows (native build with MSVC and CygWin) and MacOs.
It should be possible to build on (or cross-compile for) other systems.
The examples/
directory contains few useful command-line utilities
(as well as examples of the library usage).
Usage info is shown when they are executed without any parameters (see also man pages).
unADF
is a unzip like utility for .ADF files:
unadf [-lrcsp -v n] dumpname.adf [files-with-path] [-d extractdir]
-l : lists root directory contents
-r : lists directory tree contents
-c : use dircache data (must be used with -l)
-s : display entries logical block pointer (must be used with -l)
-m : display file comments, if exists (must be used with -l)
-v n : mount volume #n instead of default #0 volume
-p : send extracted files to pipe (unadf -p dump.adf Pics/pic1.gif | xv -)
-d dir : extract to 'dir' directory
Creates an image of a floppy disk (empty, not formatted). It can create standard DD (double density) 880K floppy image, HD (high density) 1760K, or special formats extended number of tracks (like DD with 81-83 tracks).
Formats the specified floppy disk image file (an ADF, ie. one created with
adf_floppy_create
), creating on it the Amiga filesystem of the specified
type (in particular: OFS/"Old File System" or FFS/"Fast File System").
A low-level utility / diagnostic tool, showing metadata about a device / device image or a file/directory inside the Amiga filesystem. In particular, it shows contents of Amiga filesystem metadata blocks, it can help understand structure of Amiga filesystems (for anyone curious...).
New versions and contact e-mail can be found at : https://github.com/lclevy/ADFlib
Please note that several security issues/bugs has been found in the older (0.7.x) versions of the ADFlib:
CVE-2016-1243
and CVE-2016-1244
, fixed in
8e973d7),
(found in Debian version unadf/0.7.11a-3
, fixed in versions unadf/0.7.11a-4
,
unadf/0.7.11a-3+deb8u1
). See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838248Please update to the latest released version where these, as well as many other things, are fixed.
See INSTALL file.
AUTHORS
: ContributorsREADME.md
: The file you are readingChangeLog
: updates in subsequent versionsINSTALL
: compilation, testing and installation informationTODO
: possible future changes/improvementssrc/
: main library filessrc/win32/
: WinNT native driver (untested!)src/linux/
: Linux native driver (experimental!)src/generic/
: native files templates ("dummy" device)regtests/Boot/
: Bootblocks that might by used to put on floppy disksdoc/
: The library developer's documentation, man pages for utilitiesdoc/FAQ/
: The Amiga Filesystem explainedexamples/
: utilities: unadf
, adf_floppy_create/format
, adf_show_metadata
regtests/
: regression teststests/
: unit testsMost of the code has certain age (the lib was designed and in large part implemented before the year 2000). Some subsystems have improved, but many remain untouched for a long time and may not have dedicated tests (meaning: are not tested).
The library is mostly tested with ADF disk (ie. floppy) images, not with
any native devices. If you do not need them - do not compile them (build
the library with the generic
(dummy) native device, see INSTALL for details).
If you want really to use and/or tests them, remember that: the native device
support means accessing physical devices(!), please know what you are doing
(eg. do not open your C:\
on windows or /dev/sda
on Linux and call
a function for creating an Amiga filesystem on it... unless you really want
to reinstall your system and restore your data from a backup...).
Since native devices are not much tested - consider them as testing/experimental and treat as such (ie. use in a safe environment like a VM).
YOU HAVE BEEN WARNED
The (fixed) file read support and the (new) file write support are rather well tested, but still, writing is a new feature so do not experiment on a unique copy of an ADF image with your precious data. Please do it on a copy and report if any issues are encountered.
(See also TODO).
... in major part is outdated. The lib underwent many changes and, possibly, many are to come, no enough time to fully deal with this, too...
Please use it as a reference for the concepts and general ways of use (as those
have not changed) while for the details regarding functions check the header
files, sources in tests/
and examples/
to see in details how the current
API can be used.
Have fun anyway !
If you encountered a problem, please review the existing issues, and, if the problem you have is not already there, open a new one.
For bugfixes and/or new things - please open a Pull Request to the devel
branch (not the master
).
Using the code from the repository will be easier understanding that the project has adapted a new branching model and so far use the following:
master
branch contains the latest tagged and released codedevel
branch contains development code that was tested and accepted
for future releasesOther things of the scheme may be used/adapted as needed (hotfixes for released code and such, very likely release branch(es) will also appear).
fuseadf
- FUSE-based Linux filesystem allowing
to mount and access ADF images in read/write mode.