#!/bin/sh
# Dump an IBM formatted 5.25inch HD floppy disk using the Kryoflux
# Create a directory with the stream files and a sector image
RETRIES=20
if [ -n "$1" ]; then
if [ -n "$2" ]; then
mkdir -p $1/stream_$2
echo "Dumping floppy using command: dtc -f$1/stream_$2/track -i0 -f$1/$1_$2.img -v360 -i4 -t$RETRIES"
./dtc -f$1/stream_$2/track -i0 -f$1/$1_$2.img -v360 -i4 -t$RETRIES 2>&1 | tee $1/$2.log
else
mkdir -p $1/stream
echo "Dumping floppy using command: dtc -f$1/stream/track -i0 -f$1/$1.img -v360 -i4 -t$RETRIES"
./dtc -f$1/stream/track -i0 -f$1/$1.img -v360 -i4 -t$RETRIES 2>&1 | tee $1/$1.log
fi
else
echo "Usage: dump_ibm_12MB.sh <dump name> [disk label]"
fi