aboutsummaryrefslogtreecommitdiff
path: root/xexamine.1
blob: b7bbb615a10681c5fab47f63b1c1ff7663cd41b0 (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
.\" Man page generated from reStructuredText.
.
.
.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
..
.TH "XEXAMINE" 1 "2024-06-18" "0.2.1" "Urchlay's Atari 8-bit Tools"
.SH NAME
xexamine \- Show information on Atari 8-bit executables (XEX)
.\" RST source for xexamine(1) man page. Convert with:
.
.\" rst2man.py xexamine.rst > xexamine.1
.
.SH SYNOPSIS
.sp
xexamine [ [\fB\-h\fP] | [ [\fB\-v\fP] [\fB\-d\fP] [\fB\-s\fP \fIsegment\fP]  \fIxexfile\fP ... ]
.SH DESCRIPTION
.sp
\fBxexamine\fP reads Atari 8\-bit executables (.xex files) and prints
the following information on each segment in each file:
.sp
Segment number within the file (in decimal, first segment is #1).
.sp
Offset in bytes from the start of the file (in decimal).
.sp
Start and end addresses (in hex by default).
.sp
Length in bytes (in decimal).
.sp
CRC32 checksum of the segment\(aqs data (in hex).
.sp
Segment type:
.INDENT 0.0
.INDENT 3.5
If the segment is a run address (loads at RUNAD) or an init address (loads at INITAD), the
type is "Run" or "Init", with the actual run or init address, in hex by default.
.sp
Otherwise, the percentage of the segment that contains valid 6502 object
code is printed. This is an estimate based on static analysis and some
heuristics, and as such, isn\(aqt 100% accurate.
.UNINDENT
.UNINDENT
.SH OPTIONS
.\" TODO:
.
.\" -l
.
.\" List code. Disassemble with da65?
.
.\" ...or maybe just this:
.
.\" -i
.
.\" Create da65 .info files for each segment.
.
.INDENT 0.0
.TP
.B  \-d
Show addresses in decimal.
.UNINDENT
.INDENT 0.0
.TP
.B \-s \fIsegment\-number\fP
Only show information on one segment. Segments are numbered starting
at one.
.UNINDENT
.INDENT 0.0
.TP
.B  \-h
Print a short help message and exit.
.TP
.B  \-v
Verbose operation.
.UNINDENT
.SH NOTES
.sp
Currently, \fBxexamine\fP only works with .xex files. If you have a
cartridge image as a .car file, you can use \fBxex2cart\fP to make a
\&.xex from it (if it\(aqs a non\-bankswitched cart, anyway). If you have
a raw chunk of object code, you can use \fBblob2xex\fP to make a .xex file
from it.
.sp
The code\-detection could be smarter, and probably will be pretty soon.
Static analysis will never be 100% perfect, but the heuristics could
be improved (e.g. by using something like Markov chain or Bayesian
analysis).
.sp
The CRC32 sum is handy for comparing different releases of the same
program. Example would be a game that was cracked more than once
by different cracking groups, and each crack has a different title
screen. Often, the 2nd or some further segment contains the actual
code/data, and is identical.
.SH EXIT STATUS
.sp
Exit status is zero if all \fIxexfile\fPs are valid Atari .xex files, non\-zero otherwise.
.sp
When processing multiple files, \fBxexamine\fP exits if there\(aqs an error
reading one of the files; any files after that on the command line are
not processed.
.SH COPYRIGHT
.sp
WTFPL. See \fI\%http://www.wtfpl.net/txt/copying/\fP for details.
.SH AUTHOR
.INDENT 0.0
.IP B. 3
Watson <\fI\%urchlay@slackware.uk\fP>; Urchlay on irc.libera.chat \fI##atari\fP\&.
.UNINDENT
.SH SEE ALSO
.sp
\fBa8eol\fP(1),
\fBa8utf8\fP(1),
\fBatr2xfd\fP(1),
\fBatrsize\fP(1),
\fBaxe\fP(1),
\fBblob2c\fP(1),
\fBblob2xex\fP(1),
\fBcart2xex\fP(1),
\fBcxrefbas\fP(1),
\fBdasm2atasm\fP(1),
\fBdumpbas\fP(1),
\fBf2toxex\fP(1),
\fBfenders\fP(1),
\fBprotbas\fP(1),
\fBrenumbas\fP(1),
\fBrom2cart\fP(1),
\fBunmac65\fP(1),
\fBunprotbas\fP(1),
\fBvxrefbas\fP(1),
\fBxexamine\fP(1),
\fBxexcat\fP(1),
\fBxexsplit\fP(1),
\fBxfd2atr\fP(1),
\fBxex\fP(5),
\fBatascii\fP(7).
.sp
Any good Atari 8\-bit book: \fIDe Re Atari\fP, \fIThe Atari BASIC  Reference
Manual\fP,  the  \fIOS Users\(aq Guide\fP, \fIMapping the Atari\fP, etc.
.\" Generated by docutils manpage writer.
.