1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
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.
.
|