Blog - File2DSK CoCo utility
File2DSK CoCo utility
(To regular readers, please excuse this one, it probably won't be useful to many of you!)
I made this command line utility that takes Color Computer
.BAS and other files located on your PC, and puts them together in a newly created
.DSK virtual disk file that can be used in emulators such as M.E.S.S.
The reason I made this utility is that several
.BAS files can be found on the net, and I wanted a way to make
.DSK files from them simpler than using imgtool provided with M.E.S.S.
File2DSK - Command line CoCo DSK creation utility
Version 1.0.7 (May 26, 2006)
Freeware, copyright © 2006 by Patrick Benny
Inspired by DiskTape v1.1 copyright © 1998 by Jean-Francois Morin
Windows executable: Windows 9x+ (Tested on Windows 2000/Me/9x)
To compile under Linux (tested on x86 and PPC), unarchive and:
and then as root or superuser:
file2dsk <src_file1> [src_file2 .. [src_fileN]]
e.g. file2dsk program1.bin program2.bas (creates PROGRAM1.DSK)
file2dsk <dest_file.dsk> <src_file1> [src_file2 .. [src_fileN]]
e.g. file2dsk mydisk.dsk program1.bin program2.bas
In Windows, files can also be simply drag-and-dropped onto this program.
Running the program without any arguments will allow creating a DSK
containing only one file by inputing its filename.
- Automatically detects type and mode of BIN and binary BAS files
- Allows specifying type and mode for non-detected files
- Writes tracks in CoCo's standard order, from tracks 16-17 outwards
- Doesn't create disks of formats other than the following: 1 side, 35 track, 18 sectors/trk, 256 bytes/sct
- Cannot add files to existing disks. Writing to an existing DSK will overwrite (after confirmation).
- Filenames longer than XXXXXXXX.XXX are truncated, and non-alphanumeric characters other than -#$%&'()@ [space] are removed.
- It IS possible to put several files of the same name on a same DSK, so be careful.
- 1.0.7 (2006/5/26) - Now allows file type 3 (Text editor source file)
- 1.0.6 (2006/5/22) - Now allows characters -#$%&'()@ [space] in filenames
- 1.0.5 (2006/4/24) - Bug fix (created disks were always full)
- 1.0.4 (2006/4/21) - Now compiles on Linux (thanks to Mannequin)
- 1.0.3 (2006/4/20) - Bug fix
- 1.0.2 (2006/4/13) - First public release
Special thanks to Jean-François Morin for his utility DiskTape v1.1 that inspired me to create File2DSK. I used a few lines from DiskTape's code to get started, and borrowed logic to determine a file's type and mode.
Thanks also to Mannequin for helping to make the source compilable on Linux, and to Jason Law for bug reporting.
Also see companion utility DSKExtract.
Posted on April 14, 2006 at 00:36 | Tweet