doc/mgba.6 (view raw)
1.\" Copyright (c) 2015 Anthony J. Bentley <anthony@anjbe.name>
2.\"
3.\" This Source Code Form is subject to the terms of the Mozilla Public
4.\" License, v. 2.0. If a copy of the MPL was not distributed with this
5.\" file, you can obtain one at https://mozilla.org/MPL/2.0/.
6.Dd July 29, 2015
7.Dt MGBA 6
8.Os
9.Sh NAME
10.Nm mgba
11.Nd Game Boy Advance emulator
12.Sh SYNOPSIS
13.Nm mgba
14.Op Fl 123456dfg
15.Op Fl b Ar biosfile
16.Op Fl c Ar cheatfile
17.Op Fl l Ar loglevel
18.Op Fl p Ar patchfile
19.Op Fl s Ar n
20.Op Fl v Ar moviefile
21.Ar file
22.Sh DESCRIPTION
23.Nm
24is a Game Boy Advance emulator.
25The options are as follows:
26.Bl -tag -width Ds
27.It Fl 1
28Scale the window 1\(mu.
29.It Fl 2
30Scale the window 2\(mu.
31.It Fl 3
32Scale the window 3\(mu.
33.It Fl 4
34Scale the window 4\(mu.
35.It Fl 5
36Scale the window 5\(mu.
37.It Fl 6
38Scale the window 6\(mu.
39.It Fl b Ar biosfile , Fl -bios Ar biosfile
40Specify a BIOS file to use during boot.
41If this flag is omitted,
42.Nm
43will use a high\(hylevel emulated BIOS.
44.It Fl c Ar cheatfile , Fl -cheats Ar cheatfile
45Apply cheat codes from
46.Ar cheatfile .
47.It Fl d
48Start emulating via the command\(hyline debugger.
49.It Fl f
50Start the emulator full\(hyscreen.
51.It Fl g
52Start a
53.Xr gdb 1
54session.
55By default the session starts on port 2345.
56.It Fl l Ar loglevel
57Log messages during emulation to
58.Dv stdout .
59.Ar loglevel
60is a bitmask defining which types of messages to log:
61.Bl -inset
62.It 0x01
63fatal errors
64.It 0x02
65errors
66.It 0x04
67warnings
68.It 0x08
69informative messages
70.It 0x10
71debugging messages
72.It 0x20
73stub messages
74.It 0x100
75in\(hygame errors
76.It 0x200
77software interrupts
78.It 0x400
79emulator status messages
80.It 0x800
81serial I/O messages
82.El
83The default is to log warnings, errors, fatal errors, and status messages.
84.It Fl p Ar patchfile , Fl -patch Ar patchfile
85Specify a patch file in IPS or UPS format.
86.It Fl s Ar n , Fl -frameskip Ar n
87Skip every
88.Ar n
89frames.
90.It Fl v Ar moviefile , Fl -movie Ar moviefile
91Play back a movie of recording input from
92.Ar moviefile .
93.El
94.Sh CONTROLS
95The default controls are as follows:
96.Bl -hang -width "Frame advance" -compact
97.It A
98.Cm x
99.It B
100.Cm z
101.It L
102.Cm a
103.It R
104.Cm s
105.It Start
106.Aq Cm Enter
107.It Select
108.Aq Cm Backspace
109.It Load state
110.Cm F1 Ns \(en Ns Cm F9
111.It Save state
112.Ao Cm Shift Ac Ns \(hy Ns Cm F1 Ns \(en Ns Cm F9
113.It Frame advance
114.Ao Cm Ctrl Ac Ns \(hy Ns Cm n
115.El
116.Sh DEBUGGER
117When
118.Nm
119is run with the
120.Fl d
121option, the command\(hyline debugger is enabled.
122It supports the following commands:
123.Pp
124.Bl -tag -compact -width 1
125.It Cm b Ns Oo Cm reak Oc Ar address
126.It Cm b Ns Oo Cm reak Oc Ns Cm /a Ar address
127.It Cm b Ns Oo Cm reak Oc Ns Cm /t Ar address
128Set a breakpoint at
129.Ar address .
130.It Cm c Ns Op Cm ontinue
131Continue execution.
132.It Cm d Ns Oo elete Oc Ar address
133Delete a breakpoint at
134.Ar address .
135.It Cm dis Ns Oo Cm asm Oc Ar address Op Ar count
136.It Cm dis Ns Oo Cm asm Oc Ns Cm /a Ar address Op Ar count
137.It Cm dis Ns Oo Cm asm Oc Ns Cm /t Ar address Op Ar count
138.It Cm dis Ns Oo Cm assemble Oc Ar address Op Ar count
139.It Cm dis Ns Oo Cm assemble Oc Ns Cm /a Ar address Op Ar count
140.It Cm dis Ns Oo Cm assemble Oc Ns Cm /t Ar address Op Ar count
141Disassemble
142.Ar count
143instructions starting at address
144.Ar address .
145If
146.Ar count
147is not specified, only disassemble the instruction at
148.Ar address .
149.It Cm h Ns Op Cm elp
150Print help.
151.It Cm i Ns Op Cm nfo
152.It Cm status
153Print the current contents of general\(hypurpose registers.
154.It Cm n Ns Op Cm ext
155Execute the next instruction.
156.It Cm p Ns Oo Cm rint Oc Ar value ...
157.It Cm p Ns Oo Cm rint Oc Ns Cm /t Ar value ...
158.It Cm p Ns Oo Cm rint Oc Ns Cm /x Ar value ...
159Print
160.Ar value .
161.It Cm q Ns Op Cm uit
162Quit the emulator.
163.It Cm reset
164Reset the emulation.
165.It Cm r/1 Ar address
166.It Cm r/2 Ar address
167.It Cm r/4 Ar address
168Read a byte, halfword, or word from
169.Ar address .
170.It Cm w Ns Oo Cm atch Oc Ar address
171Set a watchpoint at
172.Ar address .
173.It Cm w/1 Ar address
174.It Cm w/2 Ar address
175.It Cm w/4 Ar address
176Write a byte, halfword, or word to
177.Ar address .
178.It Cm w/r Ar register
179Write a word to
180.Ar register .
181.It Cm x/1 Ar address
182.It Cm x/2 Ar address
183.It Cm x/4 Ar address
184Examine bytes, halfwords, or words from
185.Ar address .
186.It Cm \&!\ \&
187Break into the attached debugger.
188.El
189.Sh AUTHORS
190.An Jeffrey Pfau Aq Mt jeffrey@endrift.com
191.Sh HOMEPAGE
192.Bl -bullet
193.It
194.Lk https://mgba.io/ "mGBA homepage"
195.It
196.Lk https://github.com/mgba-emu/mgba "Development repository"
197.It
198.Lk https://github.com/mgba-emu/mgba/issues "Bug tracker"
199.It
200.Lk https://forums.mgba.io/ "Message board"
201.El