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 the BIOS specified in the configuration file,
44or a high\(hylevel emulated BIOS if none is specified.
45.It Fl c Ar cheatfile , Fl -cheats Ar cheatfile
46Apply cheat codes from
47.Ar cheatfile .
48.It Fl d
49Start emulating via the command\(hyline debugger.
50.It Fl f
51Start the emulator full\(hyscreen.
52.It Fl g
53Start a
54.Xr gdb 1
55session.
56By default the session starts on port 2345.
57.It Fl l Ar loglevel
58Log messages during emulation to
59.Dv stdout .
60.Ar loglevel
61is a bitmask defining which types of messages to log:
62.Bl -bullet -compact
63.It
641 \(en fatal errors
65.It
662 \(en errors
67.It
684 \(en warnings
69.It
708 \(en informative messages
71.It
7216 \(en debugging messages
73.It
7432 \(en stub messages for unimplemented features
75.It
76256 \(en in\(hygame errors
77.It
78512 \(en software interrupts
79.It
801024 \(en emulator status messages
81.It
822048 \(en serial I/O messages
83.El
84The default is to log warnings, errors, fatal errors, and status messages.
85.It Fl p Ar patchfile , Fl -patch Ar patchfile
86Specify a patch file in BPS, IPS, or UPS format.
87.It Fl s Ar n , Fl -frameskip Ar n
88Skip every
89.Ar n
90frames.
91.It Fl v Ar moviefile , Fl -movie Ar moviefile
92Play back a movie of recording input from
93.Ar moviefile .
94.El
95.Sh CONTROLS
96The default controls are as follows:
97.Bl -hang -width "Frame advance" -compact
98.It A
99.Cm x
100.It B
101.Cm z
102.It L
103.Cm a
104.It R
105.Cm s
106.It Start
107.Aq Cm Enter
108.It Select
109.Aq Cm Backspace
110.It Load state
111.Cm F1 Ns \(en Ns Cm F9
112.It Save state
113.Ao Cm Shift Ac Ns \(hy Ns Cm F1 Ns \(en Ns Cm F9
114.It Frame advance
115.Ao Cm Ctrl Ac Ns \(hy Ns Cm n
116.El
117.Sh DEBUGGER
118When
119.Nm
120is run with the
121.Fl d
122option, the command\(hyline debugger is enabled.
123It supports the following commands:
124.Pp
125.Bl -tag -compact -width 1
126.It Cm b Ns Oo Cm reak Oc Ar address
127.It Cm b Ns Oo Cm reak Oc Ns Cm /a Ar address
128.It Cm b Ns Oo Cm reak Oc Ns Cm /t Ar address
129Set a breakpoint \(en ARM
130.Pq Ql /a ,
131Thumb
132.Pq Ql /t ,
133or the current CPU mode \(en at
134.Ar address .
135.It Cm c Ns Op Cm ontinue
136Continue execution.
137.It Cm d Ns Oo Cm elete Oc Ar address
138Delete a breakpoint at
139.Ar address .
140.It Cm dis Ns Oo Cm asm Oc Ar address Op Ar count
141.It Cm dis Ns Oo Cm asm Oc Ns Cm /a Ar address Op Ar count
142.It Cm dis Ns Oo Cm asm Oc Ns Cm /t Ar address Op Ar count
143.It Cm dis Ns Oo Cm assemble Oc Ar address Op Ar count
144.It Cm dis Ns Oo Cm assemble Oc Ns Cm /a Ar address Op Ar count
145.It Cm dis Ns Oo Cm assemble Oc Ns Cm /t Ar address Op Ar count
146Disassemble
147.Ar count
148instructions starting at
149.Ar address ,
150as ARM
151.Pq Ql /a ,
152Thumb
153.Pq Ql /t ,
154or the current CPU mode.
155If
156.Ar count
157is not specified, only disassemble the instruction at
158.Ar address .
159.It Cm h Ns Op Cm elp
160Print help.
161.It Cm i Ns Op Cm nfo
162.It Cm status
163Print the current contents of general\(hypurpose registers.
164.It Cm n Ns Op Cm ext
165Execute the next instruction.
166.It Cm p Ns Oo Cm rint Oc Ar value ...
167.It Cm p Ns Oo Cm rint Oc Ns Cm /t Ar value ...
168.It Cm p Ns Oo Cm rint Oc Ns Cm /x Ar value ...
169Print one or more
170.Ar value Ns s
171as binary
172.Pq Ql /t ,
173hexadecimal
174.Pq Ql /x ,
175or decimal.
176.It Cm q Ns Op Cm uit
177Quit the emulator.
178.It Cm reset
179Reset the emulation.
180.It Cm r/1 Ar address
181.It Cm r/2 Ar address
182.It Cm r/4 Ar address
183Read a byte
184.Pq Ql /1 ,
185halfword
186.Pq Ql /2 ,
187or word
188.Pq Ql /4
189from
190.Ar address .
191.It Cm w Ns Oo Cm atch Oc Ar address
192Set a watchpoint at
193.Ar address .
194.It Cm w/1 Ar address
195.It Cm w/2 Ar address
196.It Cm w/4 Ar address
197Write a byte
198.Pq Ql /1 ,
199halfword
200.Pq Ql /2 ,
201or word
202.Pq Ql /4
203to
204.Ar address .
205.It Cm w/r Ar register
206Write a word to
207.Ar register .
208.It Cm x/1 Ar address
209.It Cm x/2 Ar address
210.It Cm x/4 Ar address
211Examine bytes
212.Pq Ql /1 ,
213halfwords
214.Pq Ql /2 ,
215or words
216.Pq Ql /4
217from
218.Ar address .
219.It Cm \&!\ \&
220Break into the attached debugger.
221.El
222.Sh FILES
223.Bl -tag -width ~/.config/mgba/config.ini -compact
224.It Pa ~/.config/mgba/config.ini
225Default
226.Nm
227configuration file.
228.It Pa portable.ini
229If this file exists in the current directory,
230.Nm
231will read
232.Pa config.ini
233from the current directory instead of
234.Pa ~/.config/mgba .
235.El
236.Sh AUTHORS
237.An Jeffrey Pfau Aq Mt jeffrey@endrift.com
238.Sh HOMEPAGE
239.Bl -bullet
240.It
241.Lk https://mgba.io/ "mGBA homepage"
242.It
243.Lk https://github.com/mgba-emu/mgba "Development repository"
244.It
245.Lk https://github.com/mgba-emu/mgba/issues "Bug tracker"
246.It
247.Lk https://forums.mgba.io/ "Message board"
248.El