4 # UC1541 Virtual filesystem executive v0.1
6 # This is for accessing disk image files for the Commodore VIC20/C64/C128
7 # It requires the utility c1541 that comes bundled with Vice, the emulator
8 # for the VIC20, C64, C128 and other computers made by Commodore.
10 # Copyright (C) 2008 Jacques Pelletier
11 # May be distributed under the terms of the GNU Public License
12 # <jpelletier@ieee.org>
17 # Define which archiver you are using with appropriate options
20 # There are no time stamps in the disk image, so a bogus timestamp is displayed
23 $C1541 "$1" -list | gawk
-v uid
=${UID-0} '
26 /BLOCKS FREE/ { next }
29 printf "-rw-r--r-- 1 %-8d %-8d %8d Jan 01 1980 00:00 %s\n", uid, 0, $1 * 256, $2
33 # Command: copyout archivename storedfilename extractto
34 # -read image 1541name [fsname]
37 $C1541 "$1" -read "$2" 2> /dev
/null
41 # FIXME mc can't do chown of the file inside the archive
42 # Command: copyin archivename storedfilename sourcefile
43 # -write image fsname [1541name]
47 $C1541 "$1" -write "$2" 2> /dev
/null
50 # Command: rm archivename storedfilename
54 $C1541 "$1" -delete "$2" 2> /dev
/null
64 list
) mc_c1541_fs_list
"$@" ;;
65 copyout
) mc_c1541_fs_copyout
"$@" ;;
66 # copyin) mc_c1541_fs_copyin "$@" ;;
67 rm) mc_c1541_fs_rm
"$@" ;;