aboutsummaryrefslogtreecommitdiff
path: root/mkcart.1
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-02-09 20:31:12 -0500
committerB. Watson <yalhcru@gmail.com>2016-02-09 20:31:12 -0500
commitce772f39231647cf7a5558d94f542f4ebcdc7025 (patch)
tree7b57875b1cf206f7d4230caa52c86f3e78944512 /mkcart.1
parentfdc8911c487236fe978e7f010b299ce98cc223aa (diff)
downloadtaipan-ce772f39231647cf7a5558d94f542f4ebcdc7025.tar.gz
cartridge version WIP. Not really usable yet.
Diffstat (limited to 'mkcart.1')
-rw-r--r--mkcart.1142
1 files changed, 142 insertions, 0 deletions
diff --git a/mkcart.1 b/mkcart.1
new file mode 100644
index 0000000..f957b33
--- /dev/null
+++ b/mkcart.1
@@ -0,0 +1,142 @@
+.\" Man page generated from reStructuredText.
+.
+.TH MKCART 1 "2015-04-22" "2.10.12" "DASM-Dillon"
+.SH NAME
+mkcart \- Convert between raw ROM images and atari800 CART format
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.SH SYNOPSIS
+.sp
+mkcart \-oCARTFILE \-tTYPE RAWFILE [RAWFILE ...]
+.sp
+mkcart \-cCARTFILE
+.sp
+mkcart \-xRAWFILE CARTFILE
+.sp
+mkcart \-l
+.SH DESCRIPTION
+.sp
+A companion tool to \fIdasm(1)\fP, mkcart can:
+.INDENT 0.0
+.IP \(bu 2
+convert one or more \fIdasm(1)\fP raw (\-f3) object files to a CART image
+format for use with emulators such as \fIatari800(1)\fP\&.
+.IP \(bu 2
+convert a CART image back to a raw image.
+.IP \(bu 2
+check the integrity and report information about a CART image.
+.UNINDENT
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.BI \-t\fB TYPE
+Cartridge type (1\-67, see \fI\-l\fP for list), default = guess (poorly!).
+Only used in \-o mode.
+.TP
+.BI \-o\fB CARTFILE
+Create CARTFILE from RAWFILE(s). \fI\-t\fP optional but highly
+recommended.
+.TP
+.BI \-c\fB CARTFILE
+Check integrity of file (header, checksum, and size).
+.TP
+.BI \-x\fB RAWFILE
+Create raw binary from CARTFILE (remove header).
+.TP
+.B \-l
+List all supported \-t types with their sizes in
+bytes and their human\-readable names, and exit.
+.UNINDENT
+.sp
+\-?, \-h Show built\-in help message.
+.SH EXAMPLES
+.nf
+# a standard 8KB cartridge:
+dasm example.asm \-f3 \-oexample.bin
+mkcart \-oexample.cart \-t1 example.bin
+.fi
+.sp
+.nf
+# a bankswitched OSS 16KB cartridge:
+dasm bank1.asm \-f3 \-obank1.bin
+dasm bank2.asm \-f3 \-obank2.bin
+mkcart \-oexample.cart \-t15 bank1.bin bank2.bin
+.fi
+.sp
+.SH EXIT CODES
+.sp
+With \-o and \-x, mkcart will exit with status \fI0\fP if it was able
+to complete the conversion, or \fI1\fP if something went wrong.
+.sp
+With \-c, mkcart will exit with status \fI0\fP if the image is OK (has a
+valid header, known type, good checksum, etc), or \fI1\fP if not.
+.SH BUGS
+.sp
+With \-o and \-x, the input files are opened, read, and closed twice:
+once to calculate the checksum and verify that there\(aqs enough data, then
+the header is written and the input files are re\-opened and reread. Bad
+Things will probably happen if any of the input files change in between
+the two passes.
+.sp
+The \-x option should split bankswitched cartridges into multiple raw
+images instead of one combined image. Workaround: use \fIsplit(1)\fP
+or \fIdd(1)\fP to split the raw image into bank\-sized chunks:
+.nf
+mkcart \-xmac65.bin mac65.cart
+.fi
+.sp
+.nf
+# split into mac65.bank00 and mac65.bank01
+split \-b8192 mac65.bin mac65.bank
+.fi
+.sp
+.nf
+# same thing, with dd
+dd if=mac65.bin of=mac65.bank00 bs=1024 count=8
+dd if=mac65.bin of=mac65.bank01 bs=1024 count=8 skip=8
+.fi
+.sp
+.sp
+Either way, you have to know the bank size (usually 8 or 16 KB), which
+is less than ideal.
+.SH SEE ALSO
+.INDENT 0.0
+.IP \(bu 2
+\fIdasm(1)\fP
+.IP \(bu 2
+\fIatari800(1)\fP
+.IP \(bu 2
+\fIcart.txt\fP
+.UNINDENT
+.SH AUTHOR
+B. Watson <yalhcru@gmail.com>
+.SH COPYRIGHT
+This document is licensed under the same terms as DASM
+itself, see the file COPYING for details.
+.\" Generated by docutils manpage writer.
+.