From 717e5b5b89bdf505df35fbe702df22270beca594 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Wed, 29 Jul 2015 00:41:00 -0600 Subject: [PATCH 01/22] SDL: Add a manpage --- doc/mgba.6 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 doc/mgba.6 diff --git a/doc/mgba.6 b/doc/mgba.6 new file mode 100644 index 000000000..88452e933 --- /dev/null +++ b/doc/mgba.6 @@ -0,0 +1,99 @@ +.\" Copyright (c) 2015 Anthony J. Bentley +.\" +.\" 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 +.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 +will use a high\(hylevel emulated BIOS. +.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. +.It Fl p Ar patchfile , Fl -patch Ar patchfile +Specify a patch file in IPS or UPS format. +.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: +.Bl -hang -width Select -compact +.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 +.Sh AUTHORS +.An Jeffrey Pfau Aq Mt jeffrey@endrift.com +.Sh HOMEPAGE +.Bl -bullet +.It +.Lk https://endrift.com/mgba/ "mGBA homepage" +.It +.Lk https://github.com/mgba-emu/mgba "Development repository" +.It +.Lk https://endrift.com/mgba/bugs/ "Bug tracker" +.It +.Lk https://forums.mgba.io/ "Message board" +.El From 5a66261d1d7b83df7ba056cc86eb9e1c4824a566 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Wed, 29 Jul 2015 01:22:36 -0600 Subject: [PATCH 02/22] SDL: Update URLs in documentation --- doc/mgba.6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index 88452e933..39590d4a6 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -89,11 +89,11 @@ The default controls are as follows: .Sh HOMEPAGE .Bl -bullet .It -.Lk https://endrift.com/mgba/ "mGBA homepage" +.Lk https://mgba.io/ "mGBA homepage" .It .Lk https://github.com/mgba-emu/mgba "Development repository" .It -.Lk https://endrift.com/mgba/bugs/ "Bug tracker" +.Lk https://github.com/mgba-emu/mgba/issues "Bug tracker" .It .Lk https://forums.mgba.io/ "Message board" .El From 341ab1ea75d5b8ee58ecf6cb724d697e1ea93626 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Wed, 29 Jul 2015 02:03:35 -0600 Subject: [PATCH 03/22] SDL: Document debugger commands --- doc/mgba.6 | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index 39590d4a6..3d12ea685 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -64,7 +64,7 @@ Play back a movie of recording input from .El .Sh CONTROLS The default controls are as follows: -.Bl -hang -width Select -compact +.Bl -hang -width "Frame advance" -compact .It A .Cm x .It B @@ -84,6 +84,79 @@ The default controls are as follows: .It Frame advance .Ao Cm Ctrl Ac Ns \(hy Ns Cm n .El +.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 +Set a breakpoint at +.Ar address . +.It Cm c Ns Op Cm ontinue +Continue execution. +.It Cm d Ns Oo elete Oc Ar address +Delete a breakpoint at +.Ar address . +.It Cm dis Ns Oo Cm asm Oc Ar address Op Ar count +.It Cm dis Ns Oo Cm asm Oc Ns Cm /a Ar address Op Ar count +.It Cm dis Ns Oo Cm asm Oc Ns Cm /t Ar address Op Ar count +.It Cm dis Ns Oo Cm assemble Oc Ar address Op Ar count +.It Cm dis Ns Oo Cm assemble Oc Ns Cm /a Ar address Op Ar count +.It Cm dis Ns Oo Cm assemble Oc Ns Cm /t Ar address Op Ar count +Disassemble +.Ar count +instructions starting at address +.Ar address . +If +.Ar count +is not specified, only disassemble the instruction at +.Ar address . +.It Cm h Ns Op Cm elp +Print help. +.It Cm i Ns Op Cm nfo +.It Cm status +Print the current contents of general\(hypurpose registers. +.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 ... +Print +.Ar value . +.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 +Read a byte, halfword, or word from +.Ar address . +.It Cm w Ns Oo Cm atch Oc Ar address +Set a watchpoint at +.Ar address . +.It Cm w/1 Ar address +.It Cm w/2 Ar address +.It Cm w/4 Ar address +Write a byte, halfword, or word to +.Ar address . +.It Cm w/r Ar register +Write a word to +.Ar register . +.It Cm x/1 Ar address +.It Cm x/2 Ar address +.It Cm x/4 Ar address +Examine bytes, halfwords, or words from +.Ar address . +.It Cm \&!\ \& +Break into the attached debugger. +.El .Sh AUTHORS .An Jeffrey Pfau Aq Mt jeffrey@endrift.com .Sh HOMEPAGE From 541191648f463e1e3813bead8e5b18070e253ae8 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 30 Jul 2015 03:03:16 -0600 Subject: [PATCH 04/22] Qt: Add barebones manpage (no command line options yet) --- doc/mgba-qt.6 | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 doc/mgba-qt.6 diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 new file mode 100644 index 000000000..1687e7f32 --- /dev/null +++ b/doc/mgba-qt.6 @@ -0,0 +1,52 @@ +.\" Copyright (c) 2015 Anthony J. Bentley +.\" +.\" 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-QT 6 +.Os +.Sh NAME +.Nm mgba-qt +.Nd Game Boy Advance emulator +.Sh SYNOPSIS +.Nm mgba-qt +.Ar file +.Sh DESCRIPTION +.Nm +is a Game Boy Advance emulator. +.Sh CONTROLS +The default controls are as follows: +.Bl -hang -width "Frame advance" -compact +.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 +.Sh AUTHORS +.An Jeffrey Pfau Aq Mt jeffrey@endrift.com +.Sh HOMEPAGE +.Bl -bullet +.It +.Lk https://mgba.io/ "mGBA homepage" +.It +.Lk https://github.com/mgba-emu/mgba "Development repository" +.It +.Lk https://github.com/mgba-emu/mgba/issues "Bug tracker" +.It +.Lk https://forums.mgba.io/ "Message board" +.El From f9110a9432b84e5cd43183bbc3b8e18c9177e9f0 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 01:34:45 -0600 Subject: [PATCH 05/22] Qt: Document -b, -s, -p in the manual --- doc/mgba-qt.6 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index 1687e7f32..1c79de2c9 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -11,10 +11,27 @@ .Nd Game Boy Advance emulator .Sh SYNOPSIS .Nm mgba-qt +.Op Fl b Ar biosfile +.Op Fl p Ar patchfile +.Op Fl s Ar n .Ar file .Sh DESCRIPTION .Nm is a Game Boy Advance emulator. +The options are as follows: +.Bl -tag -width Ds +.It Fl b Ar biosfile , Fl -bios Ar biosfile +Specify a BIOS file to use during boot. +If this flag is omitted, +.Nm +will use a high\(hylevel emulated BIOS. +.It Fl p Ar patchfile , Fl -patch Ar patchfile +Specify a patch file in IPS or UPS format. +.It Fl s Ar n , Fl -frameskip Ar n +Skip every +.Ar n +frames. +.El .Sh CONTROLS The default controls are as follows: .Bl -hang -width "Frame advance" -compact From d6ccfe003a25bafdc9a6de93c25785fc4e42fcf4 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 01:50:52 -0600 Subject: [PATCH 06/22] SDL: Document -l in the manual --- doc/mgba.6 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/doc/mgba.6 b/doc/mgba.6 index 3d12ea685..b29ecf010 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -14,6 +14,7 @@ .Op Fl 123456dfg .Op Fl b Ar biosfile .Op Fl c Ar cheatfile +.Op Fl l Ar loglevel .Op Fl p Ar patchfile .Op Fl s Ar n .Op Fl v Ar moviefile @@ -52,6 +53,34 @@ Start a .Xr gdb 1 session. By default the session starts on port 2345. +.It Fl l Ar loglevel +Log messages during emulation to +.Dv stdout . +.Ar loglevel +is a bitmask defining which types of messages to log: +.Bl -inset +.It 0x01 +fatal errors +.It 0x02 +errors +.It 0x04 +warnings +.It 0x08 +informative messages +.It 0x10 +debugging messages +.It 0x20 +stub messages +.It 0x100 +in\(hygame errors +.It 0x200 +software interrupts +.It 0x400 +emulator status messages +.It 0x800 +serial I/O messages +.El +The default is to log warnings, errors, fatal errors, and status messages. .It Fl p Ar patchfile , Fl -patch Ar patchfile Specify a patch file in IPS or UPS format. .It Fl s Ar n , Fl -frameskip Ar n From 4951ab974c8d582a63d5133be57ac0efe2415f08 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 01:51:08 -0600 Subject: [PATCH 07/22] Qt: Document -l in the manual --- doc/mgba-qt.6 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index 1c79de2c9..1b32d3527 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -12,6 +12,7 @@ .Sh SYNOPSIS .Nm mgba-qt .Op Fl b Ar biosfile +.Op Fl l Ar loglevel .Op Fl p Ar patchfile .Op Fl s Ar n .Ar file @@ -25,6 +26,33 @@ Specify a BIOS file to use during boot. If this flag is omitted, .Nm will use a high\(hylevel emulated BIOS. +.It Fl l Ar loglevel +Log messages during emulation. +.Ar loglevel +is a bitmask defining which types of messages to log: +.Bl -inset +.It 0x01 +fatal errors +.It 0x02 +errors +.It 0x04 +warnings +.It 0x08 +informative messages +.It 0x10 +debugging messages +.It 0x20 +stub messages +.It 0x100 +in\(hygame errors +.It 0x200 +software interrupts +.It 0x400 +emulator status messages +.It 0x800 +serial I/O messages +.El +The default is to log warnings, errors, fatal errors, and status messages. .It Fl p Ar patchfile , Fl -patch Ar patchfile Specify a patch file in IPS or UPS format. .It Fl s Ar n , Fl -frameskip Ar n From 35d3313c069f13003856538449e314d2419358bc Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 02:02:07 -0600 Subject: [PATCH 08/22] SDL: Document debugger command suffixes --- doc/mgba.6 | 48 ++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index b29ecf010..5727c7848 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -125,7 +125,11 @@ It supports the following commands: .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 -Set a breakpoint at +Set a breakpoint \(en ARM +.Pq Ql /a , +Thumb +.Pq Ql /t , +or the current CPU mode \(en at .Ar address . .It Cm c Ns Op Cm ontinue Continue execution. @@ -140,8 +144,13 @@ Delete a breakpoint at .It Cm dis Ns Oo Cm assemble Oc Ns Cm /t Ar address Op Ar count Disassemble .Ar count -instructions starting at address -.Ar address . +instructions starting at +.Ar address , +as ARM +.Pq Ql /a , +Thumb +.Pq Ql /t , +or the current CPU mode. If .Ar count is not specified, only disassemble the instruction at @@ -156,8 +165,13 @@ 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 ... -Print -.Ar value . +Print one or more +.Ar value Ns s +as binary +.Pq Ql /t , +hexadecimal +.Pq Ql /x , +or decimal. .It Cm q Ns Op Cm uit Quit the emulator. .It Cm reset @@ -165,7 +179,13 @@ Reset the emulation. .It Cm r/1 Ar address .It Cm r/2 Ar address .It Cm r/4 Ar address -Read a byte, halfword, or word from +Read a byte +.Pq Ql /1 , +halfword +.Pq Ql /2 , +or word +.Pq Ql /4 +from .Ar address . .It Cm w Ns Oo Cm atch Oc Ar address Set a watchpoint at @@ -173,7 +193,13 @@ Set a watchpoint at .It Cm w/1 Ar address .It Cm w/2 Ar address .It Cm w/4 Ar address -Write a byte, halfword, or word to +Write a byte +.Pq Ql /1 , +halfword +.Pq Ql /2 , +or word +.Pq Ql /4 +to .Ar address . .It Cm w/r Ar register Write a word to @@ -181,7 +207,13 @@ Write a word to .It Cm x/1 Ar address .It Cm x/2 Ar address .It Cm x/4 Ar address -Examine bytes, halfwords, or words from +Examine bytes +.Pq Ql /1 , +halfwords +.Pq Ql /2 , +or words +.Pq Ql /4 +from .Ar address . .It Cm \&!\ \& Break into the attached debugger. From 6612adc05c63eeaebc4b4d8129580219a6010f6e Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 10:31:05 -0600 Subject: [PATCH 09/22] Qt, SDL: Mention BPS in relation to -p --- doc/mgba-qt.6 | 2 +- doc/mgba.6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index 1b32d3527..85c16a2d2 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -54,7 +54,7 @@ serial I/O messages .El The default is to log warnings, errors, fatal errors, and status messages. .It Fl p Ar patchfile , Fl -patch Ar patchfile -Specify a patch file in IPS or UPS format. +Specify a patch file in BPS, IPS, or UPS format. .It Fl s Ar n , Fl -frameskip Ar n Skip every .Ar n diff --git a/doc/mgba.6 b/doc/mgba.6 index 5727c7848..d6f514104 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -82,7 +82,7 @@ serial I/O messages .El The default is to log warnings, errors, fatal errors, and status messages. .It Fl p Ar patchfile , Fl -patch Ar patchfile -Specify a patch file in IPS or UPS format. +Specify a patch file in BPS, IPS, or UPS format. .It Fl s Ar n , Fl -frameskip Ar n Skip every .Ar n From 099b6f20c57424da8b9a6dcedbfcc363cbd29e37 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 10:33:14 -0600 Subject: [PATCH 10/22] Qt, SDL: Refer to decimal values in the documentation for -l --- doc/mgba-qt.6 | 20 ++++++++++---------- doc/mgba.6 | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index 85c16a2d2..e9130f2fe 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -31,25 +31,25 @@ Log messages during emulation. .Ar loglevel is a bitmask defining which types of messages to log: .Bl -inset -.It 0x01 +.It 1 fatal errors -.It 0x02 +.It 2 errors -.It 0x04 +.It 4 warnings -.It 0x08 +.It 8 informative messages -.It 0x10 +.It 16 debugging messages -.It 0x20 +.It 32 stub messages -.It 0x100 +.It 256 in\(hygame errors -.It 0x200 +.It 512 software interrupts -.It 0x400 +.It 1024 emulator status messages -.It 0x800 +.It 2048 serial I/O messages .El The default is to log warnings, errors, fatal errors, and status messages. diff --git a/doc/mgba.6 b/doc/mgba.6 index d6f514104..132e4ba9d 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -59,25 +59,25 @@ Log messages during emulation to .Ar loglevel is a bitmask defining which types of messages to log: .Bl -inset -.It 0x01 +.It 1 fatal errors -.It 0x02 +.It 2 errors -.It 0x04 +.It 4 warnings -.It 0x08 +.It 8 informative messages -.It 0x10 +.It 16 debugging messages -.It 0x20 +.It 32 stub messages -.It 0x100 +.It 256 in\(hygame errors -.It 0x200 +.It 512 software interrupts -.It 0x400 +.It 1024 emulator status messages -.It 0x800 +.It 2048 serial I/O messages .El The default is to log warnings, errors, fatal errors, and status messages. From 0cfdb19df4642262d893670b868312eee287fe45 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 10:39:50 -0600 Subject: [PATCH 11/22] Qt, SDL: Point out that without -b the default is set in config --- doc/mgba-qt.6 | 3 ++- doc/mgba.6 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index e9130f2fe..cd3ac99d4 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -25,7 +25,8 @@ The options are as follows: Specify a BIOS file to use during boot. If this flag is omitted, .Nm -will use a high\(hylevel emulated BIOS. +will use the BIOS specified in the configuration file, +or a high\(hylevel emulated BIOS if none is specified. .It Fl l Ar loglevel Log messages during emulation. .Ar loglevel diff --git a/doc/mgba.6 b/doc/mgba.6 index 132e4ba9d..c1db2f2b2 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -40,7 +40,8 @@ Scale the window 6\(mu. Specify a BIOS file to use during boot. If this flag is omitted, .Nm -will use a high\(hylevel emulated BIOS. +will use the BIOS specified in the configuration file, +or a high\(hylevel emulated BIOS if none is specified. .It Fl c Ar cheatfile , Fl -cheats Ar cheatfile Apply cheat codes from .Ar cheatfile . From bc12a28bf61d96b174bd04dcddf3bd146342c2ff Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 10:46:44 -0600 Subject: [PATCH 12/22] Qt, SDL: Add a FILES section to the manuals --- doc/mgba-qt.6 | 11 +++++++++++ doc/mgba.6 | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index cd3ac99d4..dfda7a7aa 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -83,6 +83,17 @@ The default controls are as follows: .It Frame advance .Ao Cm Ctrl Ac Ns \(hy Ns Cm n .El +.Sh FILES +.Bl -tag -width ~/.config/mgba/config.ini -compact +.It Pa ~/.config/mgba/config.ini +Default +.Xr mgba 6 +configuration file. +.It Pa ~/.config/mgba/qt.ini +Default +.Nm mgba-qt +configuration file. +.El .Sh AUTHORS .An Jeffrey Pfau Aq Mt jeffrey@endrift.com .Sh HOMEPAGE diff --git a/doc/mgba.6 b/doc/mgba.6 index c1db2f2b2..c05a87166 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -219,6 +219,13 @@ from .It Cm \&!\ \& Break into the attached debugger. .El +.Sh FILES +.Bl -tag -width ~/.config/mgba/config.ini -compact +.It Pa ~/.config/mgba/config.ini +Default +.Nm +configuration file. +.El .Sh AUTHORS .An Jeffrey Pfau Aq Mt jeffrey@endrift.com .Sh HOMEPAGE From 542f25ca5d8bca553e228adce2bc13cb898f2c3e Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Thu, 6 Aug 2015 10:49:19 -0600 Subject: [PATCH 13/22] Qt, SDL: Tweak wording for stub loglevels --- doc/mgba-qt.6 | 2 +- doc/mgba.6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index dfda7a7aa..5cbf2a3cf 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -43,7 +43,7 @@ informative messages .It 16 debugging messages .It 32 -stub messages +stub messages for unimplemented features .It 256 in\(hygame errors .It 512 diff --git a/doc/mgba.6 b/doc/mgba.6 index c05a87166..ab5f77779 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -71,7 +71,7 @@ informative messages .It 16 debugging messages .It 32 -stub messages +stub messages for unimplemented features .It 256 in\(hygame errors .It 512 From b7a875a486eb38cda9d1e0074a72b6a3f1fcce35 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sat, 8 Aug 2015 01:13:08 -0600 Subject: [PATCH 14/22] SDL: Add missed markup in manual --- doc/mgba.6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index ab5f77779..442196557 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -134,7 +134,7 @@ or the current CPU mode \(en at .Ar address . .It Cm c Ns Op Cm ontinue Continue execution. -.It Cm d Ns Oo elete Oc Ar address +.It Cm d Ns Oo Cm elete Oc Ar address Delete a breakpoint at .Ar address . .It Cm dis Ns Oo Cm asm Oc Ar address Op Ar count From 623185bb4331868e4b0e2f96e89455927c5f4e2e Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sat, 8 Aug 2015 01:17:07 -0600 Subject: [PATCH 15/22] Qt, SDL: Use a bulleted list for loglevels in the manual --- doc/mgba-qt.6 | 42 +++++++++++++++++++++--------------------- doc/mgba.6 | 42 +++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index 5cbf2a3cf..5346ddb47 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -31,27 +31,27 @@ or a high\(hylevel emulated BIOS if none is specified. Log messages during emulation. .Ar loglevel is a bitmask defining which types of messages to log: -.Bl -inset -.It 1 -fatal errors -.It 2 -errors -.It 4 -warnings -.It 8 -informative messages -.It 16 -debugging messages -.It 32 -stub messages for unimplemented features -.It 256 -in\(hygame errors -.It 512 -software interrupts -.It 1024 -emulator status messages -.It 2048 -serial I/O messages +.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 .El The default is to log warnings, errors, fatal errors, and status messages. .It Fl p Ar patchfile , Fl -patch Ar patchfile diff --git a/doc/mgba.6 b/doc/mgba.6 index 442196557..452b2282b 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -59,27 +59,27 @@ Log messages during emulation to .Dv stdout . .Ar loglevel is a bitmask defining which types of messages to log: -.Bl -inset -.It 1 -fatal errors -.It 2 -errors -.It 4 -warnings -.It 8 -informative messages -.It 16 -debugging messages -.It 32 -stub messages for unimplemented features -.It 256 -in\(hygame errors -.It 512 -software interrupts -.It 1024 -emulator status messages -.It 2048 -serial I/O messages +.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 .El The default is to log warnings, errors, fatal errors, and status messages. .It Fl p Ar patchfile , Fl -patch Ar patchfile From 2c1f5c48a64b31e296e8fae321a5e8582d556d18 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sat, 8 Aug 2015 01:20:56 -0600 Subject: [PATCH 16/22] Qt, SDL: Document portable.ini and its effects --- doc/mgba-qt.6 | 9 +++++++++ doc/mgba.6 | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/doc/mgba-qt.6 b/doc/mgba-qt.6 index 5346ddb47..256384721 100644 --- a/doc/mgba-qt.6 +++ b/doc/mgba-qt.6 @@ -93,6 +93,15 @@ configuration file. Default .Nm mgba-qt configuration file. +.It Pa portable.ini +If this file exists in the current directory, +.Nm +will read +.Pa config.ini +and +.Pa qt.ini +from the current directory instead of +.Pa ~/.config/mgba . .El .Sh AUTHORS .An Jeffrey Pfau Aq Mt jeffrey@endrift.com diff --git a/doc/mgba.6 b/doc/mgba.6 index 452b2282b..1cd69d202 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -225,6 +225,13 @@ Break into the attached debugger. Default .Nm configuration file. +.It Pa portable.ini +If this file exists in the current directory, +.Nm +will read +.Pa config.ini +from the current directory instead of +.Pa ~/.config/mgba . .El .Sh AUTHORS .An Jeffrey Pfau Aq Mt jeffrey@endrift.com From ad8e030fbb7618f4356df74c31811ba3259b4f04 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sat, 8 Aug 2015 01:23:34 -0600 Subject: [PATCH 17/22] SDL: Document disasm's address argument as optional --- doc/mgba.6 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index 1cd69d202..7855986cc 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -137,12 +137,12 @@ Continue execution. .It Cm d Ns Oo Cm elete Oc Ar address Delete a breakpoint at .Ar address . -.It Cm dis Ns Oo Cm asm Oc Ar address Op Ar count -.It Cm dis Ns Oo Cm asm Oc Ns Cm /a Ar address Op Ar count -.It Cm dis Ns Oo Cm asm Oc Ns Cm /t Ar address Op Ar count -.It Cm dis Ns Oo Cm assemble Oc Ar address Op Ar count -.It Cm dis Ns Oo Cm assemble Oc Ns Cm /a Ar address Op Ar count -.It Cm dis Ns Oo Cm assemble Oc Ns Cm /t Ar address Op Ar count +.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 Disassemble .Ar count instructions starting at @@ -156,6 +156,9 @@ If .Ar count is not specified, only disassemble the instruction at .Ar address . +If +.Ar address +is not specified, only disassemble the current address. .It Cm h Ns Op Cm elp Print help. .It Cm i Ns Op Cm nfo From aca5c742cb14b80626e4b1b0b8069a1f2491c6d8 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sat, 8 Aug 2015 01:24:39 -0600 Subject: [PATCH 18/22] SDL: Correct the documentation of the info/status commands --- doc/mgba.6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index 7855986cc..e7098bfed 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -163,7 +163,8 @@ is not specified, only disassemble the current address. Print help. .It Cm i Ns Op Cm nfo .It Cm status -Print the current contents of general\(hypurpose registers. +Print the current contents of general\(hypurpose registers and the current +program state register, and disassemble the current instruction. .It Cm n Ns Op Cm ext Execute the next instruction. .It Cm p Ns Oo Cm rint Oc Ar value ... From 791b678021e91d05c26688fba16593875914158d Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sat, 8 Aug 2015 01:26:14 -0600 Subject: [PATCH 19/22] SDL: Document the missing data argument to w/1, w/2, w/4 --- doc/mgba.6 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index e7098bfed..512ea638d 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -195,10 +195,12 @@ from .It Cm w Ns Oo Cm atch Oc Ar address Set a watchpoint at .Ar address . -.It Cm w/1 Ar address -.It Cm w/2 Ar address -.It Cm w/4 Ar address -Write a byte +.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 .Pq Ql /1 , halfword .Pq Ql /2 , From a65015fcbd2143c57c814a1023f6d8ce691aa9e3 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sat, 8 Aug 2015 01:29:42 -0600 Subject: [PATCH 20/22] SDL: Document the optional count argument for x --- doc/mgba.6 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index 512ea638d..db1ccd035 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -211,10 +211,12 @@ to .It Cm w/r Ar register Write a word to .Ar register . -.It Cm x/1 Ar address -.It Cm x/2 Ar address -.It Cm x/4 Ar address -Examine bytes +.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 .Pq Ql /1 , halfwords .Pq Ql /2 , @@ -222,6 +224,9 @@ or words .Pq Ql /4 from .Ar address . +If +.Ar count +is not specified, examine 16 bytes, 8 halfwords, or 4 words. .It Cm \&!\ \& Break into the attached debugger. .El From 273a2b0afd42afe6dccc8dbf6a9178f64173fe54 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sun, 9 Aug 2015 02:23:40 -0600 Subject: [PATCH 21/22] SDL: Don't document ! in debugger, since it's disabled in releases --- doc/mgba.6 | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index db1ccd035..6a23a356e 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -227,8 +227,6 @@ from If .Ar count is not specified, examine 16 bytes, 8 halfwords, or 4 words. -.It Cm \&!\ \& -Break into the attached debugger. .El .Sh FILES .Bl -tag -width ~/.config/mgba/config.ini -compact From 60b121a6153f48ab85529adbd4adc5f107134f31 Mon Sep 17 00:00:00 2001 From: "Anthony J. Bentley" Date: Sun, 9 Aug 2015 02:24:52 -0600 Subject: [PATCH 22/22] SDL: Document required argument to w/r --- doc/mgba.6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/mgba.6 b/doc/mgba.6 index 6a23a356e..d2a4cb05b 100644 --- a/doc/mgba.6 +++ b/doc/mgba.6 @@ -208,8 +208,10 @@ or word .Pq Ql /4 to .Ar address . -.It Cm w/r Ar register -Write a word to +.It Cm w/r Ar register data +Write +.Ar data +as a word to .Ar register . .It Cm x/1 Ar address Op Ar count .It Cm x/2 Ar address Op Ar count