2016-09-11 03:47:36 +00:00
|
|
|
.\" Copyright (c) 2015-2016 Anthony J. Bentley <anthony@anjbe.name>
|
2015-07-29 06:41:00 +00:00
|
|
|
.\"
|
|
|
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
.\" file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
.Dd July 29, 2015
|
|
|
|
.Dt MGBA 6
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mgba
|
|
|
|
.Nd Game Boy Advance emulator
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm mgba
|
|
|
|
.Op Fl 123456dfg
|
|
|
|
.Op Fl b Ar biosfile
|
|
|
|
.Op Fl c Ar cheatfile
|
2015-08-06 07:50:52 +00:00
|
|
|
.Op Fl l Ar loglevel
|
2015-07-29 06:41:00 +00:00
|
|
|
.Op Fl p Ar patchfile
|
|
|
|
.Op Fl s Ar n
|
|
|
|
.Op Fl v Ar moviefile
|
|
|
|
.Ar file
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
is a Game Boy Advance emulator.
|
|
|
|
The options are as follows:
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl 1
|
|
|
|
Scale the window 1\(mu.
|
|
|
|
.It Fl 2
|
|
|
|
Scale the window 2\(mu.
|
|
|
|
.It Fl 3
|
|
|
|
Scale the window 3\(mu.
|
|
|
|
.It Fl 4
|
|
|
|
Scale the window 4\(mu.
|
|
|
|
.It Fl 5
|
|
|
|
Scale the window 5\(mu.
|
|
|
|
.It Fl 6
|
|
|
|
Scale the window 6\(mu.
|
|
|
|
.It Fl b Ar biosfile , Fl -bios Ar biosfile
|
|
|
|
Specify a BIOS file to use during boot.
|
|
|
|
If this flag is omitted,
|
|
|
|
.Nm
|
2015-08-06 16:39:50 +00:00
|
|
|
will use the BIOS specified in the configuration file,
|
|
|
|
or a high\(hylevel emulated BIOS if none is specified.
|
2015-07-29 06:41:00 +00:00
|
|
|
.It Fl c Ar cheatfile , Fl -cheats Ar cheatfile
|
|
|
|
Apply cheat codes from
|
|
|
|
.Ar cheatfile .
|
|
|
|
.It Fl d
|
|
|
|
Start emulating via the command\(hyline debugger.
|
|
|
|
.It Fl f
|
|
|
|
Start the emulator full\(hyscreen.
|
|
|
|
.It Fl g
|
|
|
|
Start a
|
|
|
|
.Xr gdb 1
|
|
|
|
session.
|
|
|
|
By default the session starts on port 2345.
|
2015-08-06 07:50:52 +00:00
|
|
|
.It Fl l Ar loglevel
|
|
|
|
Log messages during emulation to
|
|
|
|
.Dv stdout .
|
|
|
|
.Ar loglevel
|
|
|
|
is a bitmask defining which types of messages to log:
|
2015-08-08 07:17:07 +00:00
|
|
|
.Bl -bullet -compact
|
|
|
|
.It
|
|
|
|
1 \(en fatal errors
|
|
|
|
.It
|
|
|
|
2 \(en errors
|
|
|
|
.It
|
|
|
|
4 \(en warnings
|
|
|
|
.It
|
|
|
|
8 \(en informative messages
|
|
|
|
.It
|
|
|
|
16 \(en debugging messages
|
|
|
|
.It
|
|
|
|
32 \(en stub messages for unimplemented features
|
|
|
|
.It
|
|
|
|
256 \(en in\(hygame errors
|
|
|
|
.It
|
|
|
|
512 \(en software interrupts
|
|
|
|
.It
|
|
|
|
1024 \(en emulator status messages
|
|
|
|
.It
|
|
|
|
2048 \(en serial I/O messages
|
2015-08-06 07:50:52 +00:00
|
|
|
.El
|
|
|
|
The default is to log warnings, errors, fatal errors, and status messages.
|
2015-07-29 06:41:00 +00:00
|
|
|
.It Fl p Ar patchfile , Fl -patch Ar patchfile
|
2015-08-06 16:31:05 +00:00
|
|
|
Specify a patch file in BPS, IPS, or UPS format.
|
2015-07-29 06:41:00 +00:00
|
|
|
.It Fl s Ar n , Fl -frameskip Ar n
|
|
|
|
Skip every
|
|
|
|
.Ar n
|
|
|
|
frames.
|
|
|
|
.It Fl v Ar moviefile , Fl -movie Ar moviefile
|
|
|
|
Play back a movie of recording input from
|
|
|
|
.Ar moviefile .
|
|
|
|
.El
|
|
|
|
.Sh CONTROLS
|
|
|
|
The default controls are as follows:
|
2015-07-29 08:03:35 +00:00
|
|
|
.Bl -hang -width "Frame advance" -compact
|
2015-07-29 06:41:00 +00:00
|
|
|
.It A
|
|
|
|
.Cm x
|
|
|
|
.It B
|
|
|
|
.Cm z
|
|
|
|
.It L
|
|
|
|
.Cm a
|
|
|
|
.It R
|
|
|
|
.Cm s
|
|
|
|
.It Start
|
|
|
|
.Aq Cm Enter
|
|
|
|
.It Select
|
|
|
|
.Aq Cm Backspace
|
|
|
|
.It Load state
|
|
|
|
.Cm F1 Ns \(en Ns Cm F9
|
|
|
|
.It Save state
|
|
|
|
.Ao Cm Shift Ac Ns \(hy Ns Cm F1 Ns \(en Ns Cm F9
|
|
|
|
.It Frame advance
|
|
|
|
.Ao Cm Ctrl Ac Ns \(hy Ns Cm n
|
|
|
|
.El
|
2015-07-29 08:03:35 +00:00
|
|
|
.Sh DEBUGGER
|
|
|
|
When
|
|
|
|
.Nm
|
|
|
|
is run with the
|
|
|
|
.Fl d
|
|
|
|
option, the command\(hyline debugger is enabled.
|
|
|
|
It supports the following commands:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -compact -width 1
|
|
|
|
.It Cm b Ns Oo Cm reak Oc Ar address
|
|
|
|
.It Cm b Ns Oo Cm reak Oc Ns Cm /a Ar address
|
|
|
|
.It Cm b Ns Oo Cm reak Oc Ns Cm /t Ar address
|
2015-08-06 08:02:07 +00:00
|
|
|
Set a breakpoint \(en ARM
|
|
|
|
.Pq Ql /a ,
|
|
|
|
Thumb
|
|
|
|
.Pq Ql /t ,
|
|
|
|
or the current CPU mode \(en at
|
2015-07-29 08:03:35 +00:00
|
|
|
.Ar address .
|
|
|
|
.It Cm c Ns Op Cm ontinue
|
|
|
|
Continue execution.
|
2015-08-08 07:13:08 +00:00
|
|
|
.It Cm d Ns Oo Cm elete Oc Ar address
|
2015-07-29 08:03:35 +00:00
|
|
|
Delete a breakpoint at
|
|
|
|
.Ar address .
|
2015-08-08 07:23:34 +00:00
|
|
|
.It Cm dis Ns Oo Cm asm Oc Op Ar address Op Ar count
|
|
|
|
.It Cm dis Ns Oo Cm asm Oc Ns Cm /a Op Ar address Op Ar count
|
|
|
|
.It Cm dis Ns Oo Cm asm Oc Ns Cm /t Op Ar address Op Ar count
|
|
|
|
.It Cm dis Ns Oo Cm assemble Oc Op Ar address Op Ar count
|
|
|
|
.It Cm dis Ns Oo Cm assemble Oc Ns Cm /a Op Ar address Op Ar count
|
|
|
|
.It Cm dis Ns Oo Cm assemble Oc Ns Cm /t Op Ar address Op Ar count
|
2015-07-29 08:03:35 +00:00
|
|
|
Disassemble
|
|
|
|
.Ar count
|
2015-08-06 08:02:07 +00:00
|
|
|
instructions starting at
|
|
|
|
.Ar address ,
|
|
|
|
as ARM
|
|
|
|
.Pq Ql /a ,
|
|
|
|
Thumb
|
|
|
|
.Pq Ql /t ,
|
|
|
|
or the current CPU mode.
|
2015-07-29 08:03:35 +00:00
|
|
|
If
|
|
|
|
.Ar count
|
|
|
|
is not specified, only disassemble the instruction at
|
|
|
|
.Ar address .
|
2015-08-08 07:23:34 +00:00
|
|
|
If
|
|
|
|
.Ar address
|
|
|
|
is not specified, only disassemble the current address.
|
2015-07-29 08:03:35 +00:00
|
|
|
.It Cm h Ns Op Cm elp
|
|
|
|
Print help.
|
|
|
|
.It Cm i Ns Op Cm nfo
|
|
|
|
.It Cm status
|
2015-08-08 07:24:39 +00:00
|
|
|
Print the current contents of general\(hypurpose registers and the current
|
|
|
|
program state register, and disassemble the current instruction.
|
2015-07-29 08:03:35 +00:00
|
|
|
.It Cm n Ns Op Cm ext
|
|
|
|
Execute the next instruction.
|
|
|
|
.It Cm p Ns Oo Cm rint Oc Ar value ...
|
|
|
|
.It Cm p Ns Oo Cm rint Oc Ns Cm /t Ar value ...
|
|
|
|
.It Cm p Ns Oo Cm rint Oc Ns Cm /x Ar value ...
|
2015-08-06 08:02:07 +00:00
|
|
|
Print one or more
|
|
|
|
.Ar value Ns s
|
|
|
|
as binary
|
|
|
|
.Pq Ql /t ,
|
|
|
|
hexadecimal
|
|
|
|
.Pq Ql /x ,
|
|
|
|
or decimal.
|
2015-07-29 08:03:35 +00:00
|
|
|
.It Cm q Ns Op Cm uit
|
|
|
|
Quit the emulator.
|
|
|
|
.It Cm reset
|
|
|
|
Reset the emulation.
|
|
|
|
.It Cm r/1 Ar address
|
|
|
|
.It Cm r/2 Ar address
|
|
|
|
.It Cm r/4 Ar address
|
2015-08-06 08:02:07 +00:00
|
|
|
Read a byte
|
|
|
|
.Pq Ql /1 ,
|
|
|
|
halfword
|
|
|
|
.Pq Ql /2 ,
|
|
|
|
or word
|
|
|
|
.Pq Ql /4
|
|
|
|
from
|
2015-07-29 08:03:35 +00:00
|
|
|
.Ar address .
|
|
|
|
.It Cm w Ns Oo Cm atch Oc Ar address
|
|
|
|
Set a watchpoint at
|
|
|
|
.Ar address .
|
2015-08-08 07:26:14 +00:00
|
|
|
.It Cm w/1 Ar address data
|
|
|
|
.It Cm w/2 Ar address data
|
|
|
|
.It Cm w/4 Ar address data
|
|
|
|
Write
|
|
|
|
.Ar data
|
|
|
|
as a byte
|
2015-08-06 08:02:07 +00:00
|
|
|
.Pq Ql /1 ,
|
|
|
|
halfword
|
|
|
|
.Pq Ql /2 ,
|
|
|
|
or word
|
|
|
|
.Pq Ql /4
|
|
|
|
to
|
2015-07-29 08:03:35 +00:00
|
|
|
.Ar address .
|
2015-08-09 08:24:52 +00:00
|
|
|
.It Cm w/r Ar register data
|
|
|
|
Write
|
|
|
|
.Ar data
|
|
|
|
as a word to
|
2015-07-29 08:03:35 +00:00
|
|
|
.Ar register .
|
2015-08-08 07:29:42 +00:00
|
|
|
.It Cm x/1 Ar address Op Ar count
|
|
|
|
.It Cm x/2 Ar address Op Ar count
|
|
|
|
.It Cm x/4 Ar address Op Ar count
|
|
|
|
Examine
|
|
|
|
.Ar count
|
|
|
|
bytes
|
2015-08-06 08:02:07 +00:00
|
|
|
.Pq Ql /1 ,
|
|
|
|
halfwords
|
|
|
|
.Pq Ql /2 ,
|
|
|
|
or words
|
|
|
|
.Pq Ql /4
|
|
|
|
from
|
2015-07-29 08:03:35 +00:00
|
|
|
.Ar address .
|
2015-08-08 07:29:42 +00:00
|
|
|
If
|
|
|
|
.Ar count
|
|
|
|
is not specified, examine 16 bytes, 8 halfwords, or 4 words.
|
2015-07-29 08:03:35 +00:00
|
|
|
.El
|
2016-09-11 03:47:36 +00:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width Ds -compact
|
|
|
|
.It Ev XDG_CONFIG_HOME
|
|
|
|
The location where
|
|
|
|
.Nm
|
|
|
|
will look for the configuration directory.
|
|
|
|
If not set,
|
|
|
|
.Pa ~/.config
|
|
|
|
is used.
|
|
|
|
.El
|
2015-08-06 16:46:44 +00:00
|
|
|
.Sh FILES
|
2016-09-11 03:47:36 +00:00
|
|
|
.Bl -tag -width Ds -compact
|
|
|
|
.It Pa $XDG_CONFIG_HOME/mgba/config.ini
|
2015-08-06 16:46:44 +00:00
|
|
|
Default
|
2016-09-11 03:47:36 +00:00
|
|
|
.Xr mgba 6
|
2015-08-06 16:46:44 +00:00
|
|
|
configuration file.
|
2015-08-08 07:20:56 +00:00
|
|
|
.It Pa portable.ini
|
|
|
|
If this file exists in the current directory,
|
|
|
|
.Nm
|
|
|
|
will read
|
|
|
|
.Pa config.ini
|
|
|
|
from the current directory instead of
|
2016-09-11 03:47:36 +00:00
|
|
|
.Pa $XDG_CONFIG_HOME/mgba .
|
2015-08-06 16:46:44 +00:00
|
|
|
.El
|
2015-07-29 06:41:00 +00:00
|
|
|
.Sh AUTHORS
|
|
|
|
.An Jeffrey Pfau Aq Mt jeffrey@endrift.com
|
|
|
|
.Sh HOMEPAGE
|
|
|
|
.Bl -bullet
|
|
|
|
.It
|
2015-07-29 07:22:36 +00:00
|
|
|
.Lk https://mgba.io/ "mGBA homepage"
|
2015-07-29 06:41:00 +00:00
|
|
|
.It
|
|
|
|
.Lk https://github.com/mgba-emu/mgba "Development repository"
|
|
|
|
.It
|
2015-07-29 07:22:36 +00:00
|
|
|
.Lk https://github.com/mgba-emu/mgba/issues "Bug tracker"
|
2015-07-29 06:41:00 +00:00
|
|
|
.It
|
|
|
|
.Lk https://forums.mgba.io/ "Message board"
|
|
|
|
.El
|