summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger
Commit message (Collapse)AuthorAgeFilesLines
...
* Restored ability of for image devices to report specific error messages. Vas Crabb2023-04-082-5/+5
| | | | | | | | | | | | | | Restores ability to give specific/detailed messages removed in 6f7e4141ea14acaaf9cb973c66788fabb3457023 while pandering to obsession with single return value. Moved responsibility for displaying the error message in the UI to the caller rather than device_image_interface, and made device_image_interface always log the error along with the full path and error condition content. Gave several image devices more detailed error messages. Added some FIXME comments for apparent bugs.
* API change for device_image_interface AJR2023-03-302-5/+6
| | | | | | | | | - Remove the seterror method for recording error messages and conditions. Condition codes have been made return values for call_load, call_create and various related callbacks. Error messages (which many devices weren't generating) are now displayed through osd_printf_error. - Eliminate the image_init_result and image_verify_result pass/fail enumeration types. Update many functions that were returning these enumerations or simply bools to return std::error_condition instead. In some cases, this type is now passed down from internal parsing/loading functions which were already returning it. In various other cases, the former default UNSPECIFIED has been used as a catchall for I/O errors; anticipated future refactorings should make these error returns more specific. - Expand the image_error categories to include INVALIDLENGTH, NOSOFTWARE and BADSOFTWARE. The first is largely self-explanatory. The second is generated by the core to indicate failure to find software items in lists. The third is provided for devices to indicate semantic errors in software list entries. - Change the return type of floppy_image_device::identify to a pair so the potential error condition can be passed along to the UI without storing it in a member variable. - Move device_image_interface::message down into snapshot_image_device and change its implementation to use string_format instead of printf. - Correct a typo in the shortname of the generic snapshot device.
* windows: blind fix for the debugger Olivier Galibert2023-03-181-10/+11
|
* dimemory: Add the target address space to translate, wrap the constants Olivier Galibert2023-03-182-16/+21
| | | | divtlb: Wrap the constants
* Update accumulating relative inputs exactly once per frame. Vas Crabb2023-02-241-1/+1
| | | | | | | | | | | | | This fixes "amplification" effects that would happen if the frame rate rose above 100 Hz (whether by unthrottling or otherwise). Synchronise with wall clock any time inputs are read. Not doing this has weird effects on relative inputs with frame skipping and contributes to unresponsiveness of menus. Reduce visual latency for mouse movement on menus when paused or skipping frames. The rest of the code changes to menus won't provide benefits until draw can happen after event handling.
* osd: Don't pump events when reading inputs. Vas Crabb2023-02-231-1/+1
| | | | | | This was a drain on performance. If anything is trying to poll inputs in a loop, it needs to call input_update() to ensure it gets up-to-date state.
* srcclean and bump copyright date on language files to 2023 Vas Crabb2023-02-191-1/+1
|
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-012-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't ignore the return status of OSD module initialisation. Attempt to fall back to an alternate module if the selected module fails to initialise. Log more useful diagnostic information at verbose level. Fixed BGFX crash on exit after toggling fullscreen. Also persist more settings than just the selected chains across toggling fullscreen. Turned video modules into OSD modules in the same sense as all the other OSD modules. They now use the same selection/fallback mechanism as all the other modules without special extra code in the OSD implementations. Untangled some object ownership mess. Windows own renderers, OSD objects own windows. Fixed a refrence loop that caused the first window object to always leak. Don't create renderer object until after underlying window has been created. Fixed issues with order of creation/destruction when toggling fullscreen or changing prescale in fullscreen with -switchres in SDL builds. Use more smart pointers in BGFX and Direct3D render modules. Most of the code now reutrns a smart pointer when handing over ownership or a naked pointer when retaining ownership. Fixed a few leaks and simplified cleanup code. Encapsulated various OSD modules better.
* Various input and OSD refactoring: Vas Crabb2023-01-297-96/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd: Supply OSD object to modules on initialisation. Encapsulated some event handling in the OSD objects rather than leaving it in free functions. Put various stuff in namespaces. osd/modules/input: Enabled dinput, xinput and winhybrid modules for Windows SDL builds, and enabled background input for dinput and xinput (and by extension winhybrid) modules. Also fixed some COM and X11 resource leaks. osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match Windows, and exposed vertical and horizontal scroll as Z and rZ axes. Moved SDL UI event handling out of input devices into OSD object. osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's correctly identified as a relative axis (it maps to the scroll wheel equivalent). osd: Added an option to choose the network provider module. Mostly useful if you build with both TUN/TAP and pcap support included, or if you want to disable emulated networking completely. emu/input.cpp: Use a better strategy for assembling input code names that uses fewer temporary strings and doesn't require use of the non-Unicode-aware space trimming function (fixes MT08552). osd/modules/input_dinput.cpp: Improved polling logic. osd: Made various parts of the input code less dependent on concrete emu objects, and reduced inappropriately passing around the machine object. Made input modules less dependent on OSD implementation. Encapsulated some stuff and got rid of some vestigial newui and SDL1 support code. Cleaned up some interfaces. Moved OSD options classes to their own files. Prepare to remove main.h from emu.h - it's mostly used to get the application name, which the vast majority of emulated devices don't need to do.
* -debugger/win: Cascade positions of new debugger windows. Vas Crabb2023-01-157-19/+93
| | | | | -osd: Better button names for NVIDIA Shield and Xbox One controllers with SDL game controller module.
* Update BGFX, BX and BIMG (#10789) Miodrag Milanović2023-01-051-51/+68
| | | | * Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433 Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Revert "Update BGFX, BX and BIMG (#10750)" (#10787) R. Belmont2023-01-041-68/+51
| | | This reverts commit 5581eaa50a42256242f32569f59ce10d70ddd8c2 due to link failure on macOS.
* Update BGFX, BX and BIMG (#10750) Miodrag Milanović2023-01-041-51/+68
| | | | * Update to bgfx a93a714632b79b5ddbf5c86ac323fa9b76ed3433 Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Win32 debugger: don't skip a history item when initially pressing down. Vas Crabb2023-01-051-6/+3
|
* More UI cleanup: Vas Crabb2023-01-051-1/+4
| | | | | | | | | * Got rid of more UI globals. * Cache more metrics in system/software selection menus. * Don't lose a BDF font specified on the command line when changing font size via the UI. * For win32 debugger, behave as though most recent history item was just entered when restoring session state.
* debugger: Add missing override qualifiers in Qt debugger. Vas Crabb2022-12-022-9/+9
|
* debugger: Hopefully fix undefined names in Cocoa debugger. Vas Crabb2022-12-022-2/+6
|
* -debugger: Improved session save/restore. Vas Crabb2022-12-0229-591/+737
| | | | | | | | | | | | * Qt: Save expression for memory and disassembly views. * Qt: Made command history behave more like Cocoa. * Qt: Added expression history and made behaviour more like Cocoa. * Qt: Refactored global notifications to use signals. * Win32: Increased command/expression history size to 100 items. * Cocoa: Save state of device info viewer windows. * Qt/Win32/Cocoa: Save command/expression history. -util/xmlfile.cpp: Fixed bug where copyInto failed to copy nodes.
* nios2: Preliminary execution core and gdb support AJR2022-11-191-0/+60
|
* MACOS_X_VERSION_10_15 is not defined on really SDKs. (#10388) ksherlock2022-10-031-1/+1
|
* debugview.mm: Raise requirement for Dark Mode to 10.15. [R. Belmont, kmg] arbee2022-09-231-2/+2
|
* debuggdbstub.cpp: Use swapendian_int* AJR2022-09-221-22/+6
|
* osd/modules/debugger/debugqt.cpp: Don't try closing windows if debugger ↵ Vas Crabb2022-09-211-3/+5
| | | | console wasn't created.
* fixed building with clang 15.0.0 on windows smf-2022-09-201-1/+1
|
* Renamed n2a03 to rp2a03 throughout source tree. (#10343) 0kmg2022-09-201-1/+1
|
* Debugger updates: Vas Crabb2022-09-2052-472/+584
| | | | | | | | | | | | | | | | | | | | | | | Made closing the Qt debugger console window hide all debugger windows and run the emulated machine (debugger windows will be shown on next user break or breakpoint hit). This matches the behaviour of the Win32 and Cocoa debuggers. Made Qt debugger clean up its windows on exit rather than on subsequent starts. This fixes GitHub #9789. Made Qt debugger less reliant on global variables, and made code to save and load configuration a bit less convoluted. It still needs more refactoring on this front, but it's in slightly better shape now. Made Qt debugger a bit less crashy on invalid configuration. Still plenty of ways to crash it, but every little bit counts. Made Qt debugger do less comparisons on menu item names and object names - it might be possible to localise one day. Moved all the C++ debugger implementations into namespaces. They're using awfully generic class names, so it's about time.
* debugview.mm: full dark mode support for macOS 10.14 and later [R. Belmont] arbee2022-09-171-0/+21
|
* Added a crude dark theme for the Win32 debugger. Vas Crabb2022-09-1730-393/+509
| | | | | | Also made a start on weaning the Qt debugger off its weird configuation objects. It can now save more view state with less string comparisons on memory labels, but it can't restore all of it yet.
* debugger/win: Added capability to save/restore window arrangement. Vas Crabb2022-09-1649-209/+825
| | | | | | | | | * Format is mostly compatible with the Cocoa debugger, besides reversed vertical positioning. * Made Qt debugger more compatible with configuration format used by Win32 and Cocoa debuggers. * emu/config.cpp: Preserve elements with no registered handlers in default and system configuation files.
* fixes for clang 15.0 on windows [smf] smf-2022-09-151-4/+0
|
* Debugger changes AJR2022-08-284-6/+6
| | | | | | | - 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.
* debuggdbstub.cpp: implement thread alive command. Sandro Ronco2022-08-211-0/+13
|
* debugger/debuggdbstub.cpp: Fixed failure to find CPU. Vas Crabb2022-08-211-1/+1
|
* ui/icorender.cpp: Revert initialisations that can hide real bugs. Vas Crabb2022-08-031-10/+2
| | | | | | | | | | | | | | | | | | MSVC isn't smart enough to detect that these can only be used after being assigned while clang and GCC can work it out fine. Initialising them to zero at declaration has the potential to mask real bugs if some code path tries to use them without assigning them. Code flow analysis (e.g. Coverity) or memory analysers (e.g. valgrind or Purify) won't pick up on the buggy path because the variable will technically be initialised. MSVC is problematic when it comes to warnings about uninitialised variables in general. Unfortunately MSVC has no option to selectively treat warnings as errors, unlike clang/GCC which have -Wno-error= which we use extensively. Until Microsoft addresses these issues, you'll have to use NOWERROR=1 when building with MSVC. Also, some cleanup.
* Changed gdbstub to no longer expect a CPU named ':maincpu' (#10170) npwoods2022-08-021-1/+13
| | | The logic was changed to find the first CPU, without any particular expectation about naming. This should address issue #10141
* return proper enumeration value Miodrag Milanovic2022-06-131-1/+1
|
* osd: Cleaned up Windows API usage a little. Vas Crabb2022-05-262-241/+218
| | | | | | | | | * Bumped target windows version to 6.0.0 (Vista). * Use WRL COM pointers to manage some COM-like objects. * Cleaned up logging in DirectSound module. * Cleaned up includes in Windows input modules. * Switched to Common Item Dialogs in Windows debugger. * Replaced disabled code that never really worked with a TODO comment.
* floppy: remove the intermediate allocator Olivier Galibert2022-03-301-2/+2
|
* Better fix for Mac compile. [R. Belmont] arbee2022-03-161-1/+1
|
* Fix Mac compile. [R. Belmont] arbee2022-03-151-1/+1
|
* Fixed some debugger memory view annoyances and cleaned up Lua bindings. Vas Crabb2022-03-161-1/+1
| | | | | | | | | | | | Made the debugger memory view not depend on isprint which is affected by the global locale. Assume the OSD will display as ISO-8869-1 and replace problematic printable characters. Started changing Lua function bindings to use set_function to avoid potential issues related to ThePhD/sol2#608, and worked out what was causing problems with symbol table read_memory/write_memory. (They aren't really essential - you can do the same thing with the address space object itself, but they're easier to parameterise.)
* Delete some unnecessary c_str() calls AJR2022-02-131-3/+3
|
* Remove fileio.h from emu.h AJR2022-02-111-0/+1
|
* osd/modules/debugger/win/consolewininfo.cpp: fixed build on Windows, AJR ↵ Ivan Vangelista2022-01-071-1/+3
| | | | please check
* device_image_interface: Interface overhaul AJR2022-01-061-3/+4
| | | | | | | | | | | | | - Remove the iodevice_t classification, which was not used that much and was incomplete anyway. Image device implementations must now provide their own instance names and brief instance names. Several new parent classes have been created to make it easier to use the old standard names. - Change must_be_loaded from a pure virtual function to be overridden in implementations to a getter for a base class property that can be set on the host side (as was formerly made possible for NES, MD and "generic" cartridge slots) but defaults to false for all types. This restrictive property has been unset for a small number of cases. - Create parent classes for paper tape and magnetic tape devices. At present these are dummy classes that do little to nothing, but may help unify implementations in the future. - Change several member functions to take std::string_view parameters rather than const std::string & or const char *. - Make update_names take into account brief names, as discussed in PR #2555. - Remove the obsolete uses_file_extension function (which used thread-unsafe strtok). * portfolio_ccm_slot: Change image type from "cartridge" to "memcard" * i7220, datapack: Add custom instance names that weren't there before * pc11: Add note
* debugimgui: Fix menus losing focus, add octal display and octal/decimal ↵ Barry Rodewald2021-11-191-12/+46
| | | | address select.
* -frontend: Refactored menu event handling and fixed a number of issues. (#8777) Vas Crabb2021-10-318-122/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moved common code for drawing about box, info viewer, and other text box menus to a base class; removed the last of the info viewer logic and the multi-line item hack from the base menu class. * Added previous/next group navigation for general inputs and plugin input selection menus. * Moved message catalog logic to lib/util, allowing osd and emu to use localised messages. * Made the base menu class use the UI manager’s feature for holding session state rather than a static map and mutex. * Improved menu event handling model, and fixed many issues, particularly with menus behaving badly when hidden/shown. * Added better support for menus that don’t participate in the usual menu stack, like the menuless sliders and the save/load state menus. * Made a number of menus refresh state when being shown after being hidden (fixes MT08121 among other issues). * Fixed indication of mounted slot option in the slot option details menu. * Improved appearance of background menus when emulation isn't running - draw all menus in the stack, and darken the background menus to make the edges of the active menu clearer. * Fixed locale issues in -listxml. -debugger: Made GUI debuggers more uniform. * Added new memory view features to Win32 debugger. * Fixed spelling of hexadecimal in Cocoa debugger and added decimal address option. * Fixed duplicate keyboard shortcut in Cocoa debugger (Shift-Cmd-D was both new device window and 64-bit float format). * Made keyboard shortcuts slightly more consistent across debuggers. -plugins: Moved input selection menu and sequence polling code to a common library. Fixed the issue that prevented keyboard inputs being mapped with -steadykey on. -docs: Started adding some documentation for MAME's internal UI, and updated the list of example front-ends. -Regenerated message catalog sources. For translators, the new strings are mostly: * The names of the inputs provided by the OS-dependent layer for things like fullscreen and video features. These show up in the user interface inputs menu. * The names for automatically generated views. These show up in the video options menu - test with a system with a lot of screens to see more variants. * The input macro plugin UI. * A few format strings for analog input assignments. * A few strings for the about box header.
* debugger: support octal on the Mac native debugger [R. Belmont] arbee2021-10-271-4/+65
|
* debugger/qt/memorywindow.cpp: Remove leftover printf AJR2021-10-271-2/+0
|
* Debug memory view improvements AJR2021-10-272-16/+113
| | | | | | | | - Add options for 1-byte, 2-byte, 4-byte and 8-byte octal data display, which are selected automatically for memory spaces configured as octal. Octal data has also been made editable. - Add options for displaying addresses in decimal or octal as alternatives to the typical hexadecimal format. This also affects the address expression box. - Prevent the cursor from moving left from the first address or right from the maximum address. Note that the new options have only been hooked up for the Qt debugger. The Windows and OS X debuggers should also be updated to include them.