Section: User commands (1)
Updated: July 20, 2008
Index
Return to Main Contents
Disclaimer
NAME dsktool.rb - Manipulate Apple 2 DSK format files (as used by Apple 2 emulators)
SYNOPSIS
dsktool.rb
[switches OPTIONSfilename.dsk>
DESCRIPTION
dsktool.rb is a command line tool + libraries (all in ruby) for
manipulating DSK format images used by Apple 2 emulators.
OPTIONS
-
- -a | --add FILENAME
- (*) add file
- -A | --ascii
- force output to be ASCII (even if binary)
- -b | --base BASE
-
use BASE as address to load Binary File.
this will add 2 bytes to the start of file.
BASE should be a hex number
(can be prefixed with $, 0x, or nothing).
- -B | --bootcode FILENAME FILENAME
-
gets written to track 0, sector 0.
FILENAME should be compiled to run at $0801.
FILENAME can be up to 4Kb in size.
- -c | --catalog
- display catalog
- -d | --dump FILENAME
- hex dump
- -D | --diskdump
- hex dump of entire disk
- -L | --delete FILENAME
- (*) delete named file
- -e | --extract FILENAME
-
extract file by name (either to stdout, or file specified by --output)
- -h | --help
- display usage similar to this page
- -I | --init FILESYSTEM
-
initialise the disk with the specified filesytem.
DSK will be created if it doesn't exist.
FILESYSTEM can be : cpm,dos33,nadol,pascal,none.
- -l | --list FILENAME
-
monitor style listing (disassembles 65C02 opcodes)
- -o | --output FILENAME
-
specify name to save extracted file as.
- -r | --raw
-
don't convert files to ASCII
- -S | --showtrace
-
show full stack trace on any error
- -t | --filetype FILETYPE
-
file type for file being added.
Can be a single letter (A/I/B/T) or number.
Default for DOS 3.3 is 0x00 (Text)
- -T | --tokenise
- (*) tokenise input file before adding
- -v | --version
- show version number
- -x | --explode
- extract all files
(*) options marked with an asterisk above are only available for
file systems that have READ/WRITE support.
Currently supported filesystems:
Apple Pascal (read only)
CP/M (READ/WRITE)
DOS 3.3 (READ/WRITE)
NADOL (READ/WRITE)
ProDOS 8 (read only)
Supports 16 sector DSK images
files with extension .gz will be read & written using gzip
input files can be URLs
EXAMPLES
dsktool.rb -c http://jamtronix.com/dsks/apshai.dsk.gz
dsktool.rb --list fid -o fid.lst DOS3MASTR.dsk
dsktool.rb --extract "COLOR DEMOSOFT" DOS3MASTR.dsk
dsktool.rb -e HELLO -o HELLO.bas DOS3MASTR.dsk
dsktool.rb -x DOS3MASTR.dsk.gz -o /tmp/DOS3MASTR/
dsktool.rb --add STARTUP -T nadol.po
dsktool.rb --add c:\src\dosdemo\a.out -t B -b $2000 dosdemo.dsk
dsktool.rb --init dos33 new_dos_disk.dsk.gz
dsktool.rb -I none -B /tmp/a.out demo1.dsk
AUTHOR
This program is Copyright (c) 2007
Jonno Downes <jonno@jamtronix.com>.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index
- NAME dsktool.rb - Manipulate Apple 2 DSK format files.
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLES
-
- AUTHOR
-
Caveat Emptor
This document was created and formatted by hand
by Bill Buckels.
Its contents are either part of dsktool.rb or provide additional
information about using dsktool.rb.
Bill Buckels has no warranty
obligations or liability resulting from this document's use in any way
whatsoever. If you don't agree then don't read it.