Commit Graph

30 Commits

Author SHA1 Message Date
Patrick Mackinlay
f93a04010a
emu/debug/debugcmd.cpp: Add NUL-terminated string argument support to printf/logerror. (#12124)
* Use %s to read NUL-terminated strings from emulated memory.  Precision sets maximum length.
* Also added left-justification option for numeric and string formats.
* Made documentation more consistent and removed duplication.
2024-03-21 03:12:11 +11:00
Vas Crabb
0524b105c1 emu/debug/debugcmd.cpp: Added support for lowercase hex to printf/logerror. [Patrick Mackinlay]
Also simplified implementation by better leveraging util/strformat.h.

This is from pull request #12124, to get some testing for the
fundamental change before freeze.
2024-03-19 16:08:35 +11:00
Tom Cariello
30d92e397d
docs: Fixed many editing errors and spelling errors. (#11575)
Also fixed outdated link to contributing guidelines.
2023-09-29 00:41:31 +10:00
Tom Cariello
1d1ff1b5f8
Removed extra tick after gtime example in documentation (#11574) 2023-09-27 15:51:32 +02:00
Vas Crabb
a93d6c9fc7 emu/emumem.h: Allow emu::rw_delegate to work with device finders. 2023-04-15 19:44:30 +10:00
Vas Crabb
4b4c03bb17 docs: Fixed a markup error. 2022-11-26 03:53:48 +11:00
AJR
d8d588262d Debugger changes
- Added exception points as a new class of "points" triggering on specific exception numbers, with a similar set of commands to breakpoints and registerpoints.
- Removed the per-instruction callback hook from device_debug. Only one driver was using this (rmnimbus.cpp), and what it was doing with it could be done more cleanly with exception points.
- Change the type of the action string parameter for "points"-creating methods and make some parameters optional for those.
- Change trace file logging to use a std::ostream instead of FILE * to take better advantage of strformat.
2022-08-28 13:31:50 -04:00
Vas Crabb
f47f9c3db3
ui, docs: Added menus to fill a couple of gaps, improved consistency. (#9915)
Added menus for controlling toggle inputs, and showing recognised input
devices and control state.  Moved input menu options off main menu to a
submenu, as there are a lot of them now.

Moved menu heading drawing into base class, added headings to more
menus, and made headings more consistent with the menu items used to
reach them.  Also made terminology more consistent.

Changed the default names for buttons and hat switches/D-pads to use
1-based numbering.  DirectInput still returns 0-based button numbers for
some devices.

Removed local copy of MinGW xaudio2.h as it’s now included in the MSYS2
package.  Also fixed building the DirectSound sound output module with
the SDL OSD on Windows - the Windows headers are sensitive to include
order.

Started adding documentation for menus, to hopefully help people find
menus they remember seeing but can't recall how to access.

For translators, this makes terminology more consistent.  In particular:
* "Settings" is preferred over "configuration" in a number of places, as
  the latter can be construed as referring specifically to settings
  stored in .cfg files in the cfg_directory folder.  Also, references to
  saving machine configuration could be interpreted as relating to the
  settings on the "Machine Configuration" menu.
* The controls on host input devices (e.g. keys, buttons, joystick axes)
  are referred to as "controls", while emulated inputs are referred to
  as "inputs".
* The menus for assigning host controls to emulated inputs are called
  "input assignments" menus to distinguish them from other input
  settings menus.
* Combinations of controls that can be assigned to emulated inputs are
  referred to as "combinations" rather than "sequences".
* The potentially confusing term "ROM set" has been removed altogether.
  Use "short name" to refer to a device or system's identifier.
* "System" is used in almost places to refer to a complete, runnable
  system rather than "Machine".
* "Driver" is now only used to refer to source files where systems or
  devices are defined - it is no longer used to refer to individual
  systems.
* A few more menus have message context for the messages.  This makes it
  a bit easier to guess where the messages are used.  It also means you
  can use different translations in different places if necessary (e.g.
  if the same English text should be translated differently as an item
  in one menu and as a heading in another).
2022-06-11 21:47:19 +10:00
AJR
55f72a2a83 docs/source/debugger/execution.rst: Document gbf, gbt and gni commands 2022-05-28 18:01:17 -04:00
tedgreen99
352a505325
Add debugger time command to docs (#9735) 2022-05-10 16:45:26 -04:00
Vas Crabb
4684eaa4d6 Cleanup:
* bus/nes/multigame.cpp: Got rid of a device type comparison.
* Fixed a couple of errors in debugger documentation.
* Reduced redundancy in more slot machine layouts.
2022-02-13 07:18:36 +11:00
Vas Crabb
cb16512392 Clean up various loose ends:
frontend: Exposed debug symbol tables and parsed expressions to Lua
(these can be used when the debugger is not active).  Also made it
simpler to walk input types.

imagedev/bitbngr.cpp: Added software list loader support (used by
sitcom).

sitcom.cpp: Replaced bankdev with a memory view.  Also added a bar graph
for the timer DAC output, and made the DL1414 displays squarer in the
layout like they are in real life.  They still don't look right because
the internal segment drawing code doen't draw the segments the right
width.

docs: Fixed broken links and added missing links in command line options
index.  Also removed documentation for an option that no longer exists
and fixed some inconsistent terminology.

Separated includes by module in various drivers.
2022-02-03 09:00:23 +11:00
Vas Crabb
d29287e092 -emu/ioport.cpp: Made default behaviour better.
* If an input is configured to some combination of controls that are not
  present at all, ignore the setting altogether for the session.
* Fixed relative axes with PORT_RESET not responding to absolute
  controls (MT07685).
* Fixed relative axes not responding to an absolute control if the value
  doesn’t change every frame (eg. holding a stick against the stop).
* Changed the scaling for absolute controls assigned to relative axes to
  make defaults more sane (e.g. arkanoid or spdheat with a joystick).

-frontend: Fixed some localisation issues in Analog Controls menu.

-docs: Added documentation on assigning inputs.
2021-11-03 19:41:40 +11:00
Vas Crabb
5e07099f05 docs: Fix a copy/paste error. 2021-10-21 08:51:40 +11:00
Vas Crabb
0a9ea09a9a Tie up a few loose ends:
debugger: Octal cheats for octal address spaces.

frontend: Pass events for automatically generated menu items to the
plugin - they will have index zero.

frontend: Don't try calling the data plugin from the main menu if the
system isn't starting yet - doing so will prevent the data plugin from
loading at all.
2021-10-20 02:03:43 +11:00
Vas Crabb
7834d689bd -docs: Documented debugger's built-in functions for expressions.
-Fixed a couple of coverity warnings.
2021-10-19 10:01:02 +11:00
Vas Crabb
08ee39da70 -debugger: Finished updating commands and documentation.
* Updated cheat commands to work with arbitrary devices and address
  spaces.  You can still only search RAM areas in a single address space
  at a time, but any address space of any device can be used now.
* Made the cheatinit/cheatrange commands not affect current state if the
  arguments are invalid.  Also fixed some bugs in the cheat commands.
* Updated documentation for cheat commands, and added a simple worked
  example.  Also added single-sentence descriptions of what
  (break|watch|register)points are to the top of the relevant pages.

-frontend improvements:

* Added a bit more info to the about box, moved the VCS revision to the
  heading.
* Don't show "not" codes in prompts - they're not helpful.
2021-10-19 05:35:30 +11:00
Vas Crabb
40a30af10f Still more user experience improvements:
Changed the default mapping for UI select to not trigger on Alt+Enter
fullscreen toggle.  (Fullscreen toggle still doesn't work in menus -
actually fixing that is complicated.)

frontend: Made the about box wrap text properly, made the title and
backtrack menu item always visible, and added a footer with the VCS
revision.

frontend: Don't highlight the favourites and info toolbar buttons if
there's no selection (can happen if filters produce no results).  Also
made the info viewer appear even if no info is available - it's less
confusing to see an empty menu than wonder why clicking the button does
nothing.

debugger: Added a register points view to the GUI debuggers, to go with
the breakpoints and watchpoints views.

debugger: Extended [brw]p(clear|(en|dis)able) commands to accept
multiple arguments to perform the same action on multiple
(break|watch|register)points at once.  Also made rplist accept a CPU for
showing a single CPU's register points ([bw]plist already support this).

docs: Updated registerpoints debugger commands page, and updated other
pages for latest extensions to syntax.
2021-10-18 08:22:21 +11:00
Vas Crabb
22bc3486c3 More user experience improvements:
frontend: Made it possible to cancel a media audit while it's in
progress.  Also made the media audit multi-threaded so it's faster.

frontend: Made the DIP switches in the DIP switch preview clickable.

frontend: Made the system and software selection menus leave focus on
the same system when clearing the search rather than jumping to the
first item.  Also fixed a couple of bugs in the logic for keeping the
selected item visible.

frontend: Fixed a few places that weren't showing localised system
names.

frontend: Made UI Cancel clear a search in the file manager the same way
it does on the system and sofware selection menus.

frontend: Made it possible for plugin menus to handle UI Cancel more
naturally, backing up to the previous plugin menu rather than dropping
straight back to the list of plugins.  Updated the autofire, cheat and
cheatfind plugins, and fixed a few other issues in the cheatfind plugin.

debugger: Made the mount and unmount commands accept instance names as
well as brief instance names.  Also updated another page of debugger
documentation.
2021-10-15 10:12:56 +11:00
Vas Crabb
96ca1dbd96 More user experience improvements:
frontend: Allow clicking the adjuster arrows on menu items.  This allows
things like video options and DIP switches to be configured using a
mouse only.  Also fixed a bug preventing paging menus with a mouse if
the first item scrolled off the bottom is not selectable.

debugger: Allow wplist and bplist to accept a CPU argument to list
breakpoints/watchpoints for a single CPU only.

debugger: Fixed some corner cases in address space syntax in memory
accesses, and allowed memory region accesses to use tags relative to the
visible CPU.

emu/softlist.cpp: Ignore notes elements when loading software lists.
It's effectively a comment that isn't a comment syntactically, it's
being used for things that are not useful to display in the internal UI,
and it slows down startup.

docs: Updated three more pages of debugger documentation.  Also updated
more of the built-in debugger help.

minimaws: Fixed up schema for software list notes, made sofware list
notes display initially collapsed.
2021-10-14 08:00:04 +11:00
Vas Crabb
ca338f7372 Various improvements to the user experience:
Extended the memory access prefixes in debugger expressions to support
address space names.

Made the debugger history command aware of how much history it has
collected, and added a help topic for it to the built-in debugger help.

Started updating the documentation for the web site, and corrected some
of the more misleading built-in debugger help.

Made some corrections to Chinese localisation after discussion with
YuiFAN.

Darkened the UI red colour a little.

cpu/m6502/st2205u.h: Marked sound imperfect.
2021-10-13 10:59:38 +11:00
Scott Percival
5f4c4708ca
Add 'wpsize' variable to access the data size from a watchpoint (#7837) 2021-03-03 11:01:17 +01:00
R. Belmont
8cc243d562
Add a tip on how to enter the debugger. 2020-02-06 22:07:49 -05:00
Vas Crabb
6669489679 allow repeating elements and groups - useful if you need e.g. a lot of numbered labels, but it limits complay.py's ability to check for invalid references as it can't evaluate expressions (nw) 2018-07-22 09:52:50 +10:00
Erik Dominikus
34be272b36 Document debugger expression number syntax 2018-03-27 02:06:25 +11:00
Firehawke
b2e11d00e0 More docs work: escapes, debugger update (nw) (#3168)
* Missed a couple escape sequences. (nw)

* A little more escaping, acronym fixes, fix oddity in symlist (nw)

* Update debugger internal help to match docs (nw)

* Lowercasing for CPU in command parameters, fix casing on ASCII. (nw)
2018-02-05 20:27:02 +11:00
Firehawke
752cf3d073 Missed a couple escape sequences. (nw) 2018-02-03 19:26:25 +11:00
Firehawke
88c8b5b0c7 Add additional memory operators per request (NW) (#3067)
* Add additional memory operators per request and further cleanups to expressions (NW)

* Requested adjustments to expressions. (NW)
2018-01-15 15:25:23 +11:00
Firehawke
f2859d0db0 Correct command heading case and adjustments to expressions (NW) 2018-01-15 02:11:15 +11:00
Firehawke
18d3d5ac50 First pass of MAME Debugger help for documentation. (NW) 2018-01-13 21:56:18 -07:00