summaryrefslogtreecommitdiff
path: root/system/pucrunch/cbmcombine.1
blob: f7f749d1d7be121ee564861632cb23c1aa7aa4ce (plain)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
.\" Man page generated from reStructuredText.
.
.TH CBMCOMBINE 1 "2017-09-06" "20081122" "SlackBuilds.org"
.SH NAME
cbmcombine \- combines Commodore 8-bit executables
.
.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
..
.\" RST source for cbmcombine(1) man page. Convert with:
.
.\" rst2man.py cbmcombine.rst > cbmcombine.1
.
.\" rst2man.py comes from the SBo development/docutils package.
.
.\" converting from pod:
.
.\" s/B<\([^>]*\)>/**\1**/g
.
.\" s/I<\([^>]*\)>/*\1*/g
.
.SH SYNOPSIS
.sp
cbmcombine [\fIinput\-file[,load\-address]\fP] [[[\fIinput\-file[,load\-address]\fP]] ...]
.SH DESCRIPTION
.sp
cbmcombine combines several Commodore executables into one. All Commodore
8\-bit machines (64, 128, VIC\-20, Plus4, 16, PET, etc) are supported,
since they all use the same executable file format.
.sp
Files are read in the order listed on the command line. The combined
executable is written to standard output. Each file\(aqs load address can
be forced by adding a comma and the new address (in decimal, or in hex
with 0x prefix), in which case the load address in the file will be read
and ignored.
.sp
If any of the input files overlap the same area of memory, the overlap
area will contain only data from the file(s) listed later in the command
line. The output file\(aqs load address will be that of the input file with
the lowest address, and it will extend to the highest address contained
in any of the files. If there are gaps in the address space (areas where
no file was loaded), the output will contain 0x00 bytes to fill the gap.
.sp
Load address overrides do NOT relocate code.
.sp
There are no switches (options) for cbmcombine.
.SH EXAMPLES
.sp
The examples use 1024 byte input files, named after their load addresses
in hex:
.sp
x1000.prg   Load address \fB$1000\fP, last address \fB$13FF\fP
.sp
x1400.prg   Load address \fB$1400\fP, last address \fB$17FF\fP
.sp
x1600.prg   Load address \fB$1600\fP, last address \fB$19FF\fP
.sp
cmbcombine x1000.prg x1400.prg > new.prg
.INDENT 0.0
.INDENT 3.5
new.prg will have a load address of 0x1000, and contain data from
0x1000 to 0x17ff.  Since x1000.prg ends at address 0x13ff, there is
no overlap. If the order of arguments were swapped, the result would
be the same.
.UNINDENT
.UNINDENT
.sp
cmbcombine x1000.prg x1600.prg > new.prg
.INDENT 0.0
.INDENT 3.5
new.prg\(aqs load address will be \fB$1000\fP, and its end address will be \fB$19FF\fP\&.
From \fB$1400\fP to \fB$15FF\fP, it will contain 512 bytes of zeroes, since none
of the input files had any data at these addresses. If the order were
swapped, the result would be the same.
.UNINDENT
.UNINDENT
.sp
cmbcombine x1400.prg x1600.prg > new.prg
.INDENT 0.0
.INDENT 3.5
new.prg\(aqs load address will be \fB$1400\fP and it will end at \fB$19FF\fP\&. The
data from \fB$1400\fP to \fB$15FF\fP comes from x1400.prg, and the rest from x1600.prg.
.UNINDENT
.UNINDENT
.sp
cmbcombine x1600.prg x1400.prg > new.prg
.INDENT 0.0
.INDENT 3.5
As above, but data at \fB$1400\fP to \fB$15FF\fP comes from x1400.prg.
.UNINDENT
.UNINDENT
.sp
cmbcombine x1400.prg x1600.prg,0x1800 > new.prg
.INDENT 0.0
.INDENT 3.5
new.prg loads at \fB$1400\fP and extends to \fB$1BFF\fP\&. Data at \fB$1400\fP to
\fB$17FF\fP comes from x1400.prg, data at \fB$1800\fP to \fB$1BFF\fP comes from
x1600.prg. If x1600.prg contains non\-relocatable code org\(aqed at \fB$1600\fP,
it will fail to run when loaded at \fB$1800\fP\&.
.UNINDENT
.UNINDENT
.SH EXIT STATUS
.sp
0 for success, non\-zero for failure. If any of the input files can\(aqt be
read, the process exits with failure status, without writing anything
to standard output.
.SH BUGS
.sp
There is very little error\-checking. It may be possible to crash
cbmcombine by feeding it bogus input.
.sp
There\(aqs no way to give cbmcombine a filename containing a comma.
.sp
Not exactly bugs, per se, but missing features:
.INDENT 0.0
.INDENT 3.5
The user should be notified if files overlap and/or there are gaps in
the output.
.sp
There should be warnings if a file wraps around the top of the 64K address
space, or loads into dangerous or invalid areas such as ROM or page zero.
Odds are, the file isn\(aqt really a valid CBM executable.
.sp
There should be a cbmsplit utility that does the opposite of cbmcombine.
.UNINDENT
.UNINDENT
.SH COPYRIGHT
.sp
As of 21.12.2005 Pucrunch is under GNU LGPL. See:
.INDENT 0.0
.INDENT 3.5
\fI\%http://creativecommons.org/licenses/LGPL/2.1/\fP
\fI\%http://www.gnu.org/copyleft/lesser.html\fP
.UNINDENT
.UNINDENT
.SH AUTHORS
.sp
cbmcombine was written by Pasi Ojala <\fI\%a1bert@iki.fi\fP>.
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
pucrunch(1), exomizer(1), vice(1)
.sp
The pucrunch homepage: \fI\%http://a1bert.kapsi.fi/Dev/pucrunch/\fP
.sp
The full documentation and sample decompressor code:
.INDENT 0.0
.INDENT 3.5
/usr/doc/pucrunch\-20081122/
.UNINDENT
.UNINDENT
.\" Generated by docutils manpage writer.
.