fstools - manipulate old disk formats Copyright (C) 2008 Ciaran Anscomb Some simple tools to manipulate filesystems on disk images. At the moment only old-style ADFS (BBC Micro, BBC Master) images are supported. The tools consist of a core binary written in C that can perform some basic operations like put, get, rm and mkdir, then some shell scripts to add interface to that (like recursive copy, parsing of INF files). The tools automatically detect an ADFS image in 16-bits-per-byte format, as generated by the IDE/CompactFlash image sold by http://www.retroclinic.com/. ACKNOWLEDGEMENTS All details of the 8-bit ADFS structure were obtained from this file: http://mdfs.net/Docs/Comp/Disk/Format/ADFS COMPILING To build, run 'configure', then type 'make' if everything looks ok. Run 'configure --help' for available options. 'configure' will attempt to determine which flags to pass to the compiler, and which libraries to link against, including any optional libraries. Use the '--host' switch to cross-compile. For example: ./configure --host=i586-mingw32 If 'configure' is run from outside the source directory, object files will be built in the current directory, keeping the source tree clean. QUICKSTART To recursively copy all files from an ADFS disk image called "image.adl" to a directory called "image-files", generating .INF files: $ fstool_get -d image.adl -ri / image-files To recursively copy a directory called "games" to the root of an ADFS disk image called "games.adl": $ fstool_put -d games.adl -ri games / USAGE: general All tools including the core binary support the following options: -t TYPE specify fs type [adfs] -d FILE open FILE as disk image [scsi0.dat] -C DIR chdir to DIR before doing anything -h show this help and exit USAGE: fstool The general form for using 'fstool' is: fstool [OPTION]... cmd [CMD-OPTION]... Where the first OPTIONs are from the above list and cmd is one of: fstool ls [OPTION] [path], fstool dir -a list all files -l long listing -x fs-specific long listing fstool cat, fstool type dump file contents to stdout fstool mkdir path create directory fstool attr path print file attributes, one per line fstool put [OPTION] file [dest] copy file to device -a ATTR=VALUE set attribute on file fstool get file [dest] copy file from device fstool rm path, fstool del remove file or empty directory fstool mv old-name new-name, fstool rename rename file USAGE: fstool_put Copy files from local storage to a disk image. fstool_put [OPTION] file... dest -r recursive copy -i use [A]DFS .inf files for metadata USAGE: fstool_get Copy files from a disk image to local storage. fstool_get [OPTION] file... dest -r recursive copy -i use [A]DFS .inf files for metadata COPYING This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 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. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA See the file 'COPYING.GPL' for the full terms.