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>
15 # Define which archiver you are using with appropriate options
18 # There are no time stamps in the disk image, so a bogus timestamp is displayed
21 if [ x
"$UID" = x
]; then
22 UID
=`id -ru 2>/dev/null`
23 if [ "x$UID" = "x" ]; then
27 $C1541 "$1" -list | @AWK@
-v uid
=$UID '
30 /BLOCKS FREE/ { next }
33 printf "-rw-r--r-- 1 %-8d %-8d %8d Jan 01 1980 00:00 %s\n", uid, 0, $1 * 256, $2
37 # Command: copyout archivename storedfilename extractto
38 # -read image 1541name [fsname]
41 $C1541 "$1" -read "$2" 2> /dev
/null
45 # FIXME mc can't do chown of the file inside the archive
46 # Command: copyin archivename storedfilename sourcefile
47 # -write image fsname [1541name]
51 $C1541 "$1" -write "$2" 2> /dev
/null
54 # Command: rm archivename storedfilename
58 $C1541 "$1" -delete "$2" 2> /dev
/null
68 list
) mc_c1541_fs_list
"$@" ;;
69 copyout
) mc_c1541_fs_copyout
"$@" ;;
70 # copyin) mc_c1541_fs_copyin "$@" ;;
71 rm) mc_c1541_fs_rm
"$@" ;;