diff options
author | 2021-10-15 09:42:35 +1100 | |
---|---|---|
committer | 2021-10-15 10:12:56 +1100 | |
commit | 22bc3486c3ef8f2230e99daf49785a89ac8a1182 (patch) | |
tree | 4f10f7386b7b0a32c9d560395399e8b7632df34c /src/emu/debug/debugcmd.cpp | |
parent | 3e8763bea5a93f3139204fcb8a0c74c2ac364af5 (diff) |
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.
Diffstat (limited to 'src/emu/debug/debugcmd.cpp')
-rw-r--r-- | src/emu/debug/debugcmd.cpp | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index e7ca864988d..fe5bce41841 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -23,6 +23,7 @@ #include "emuopts.h" #include "natkeyboard.h" #include "render.h" +#include "softlist.h" #include "corestr.h" @@ -4126,9 +4127,26 @@ void debugger_commands::execute_images(const std::vector<std::string> ¶ms) { image_interface_enumerator iter(m_machine.root_device()); for (device_image_interface &img : iter) - m_console.printf("%s: %s\n", img.brief_instance_name(), img.exists() ? img.filename() : "[empty slot]"); - if (iter.first() == nullptr) - m_console.printf("No image devices in this driver\n"); + { + if (!img.exists()) + { + m_console.printf("%s: [no media]\n", img.brief_instance_name()); + } + else if (img.loaded_through_softlist()) + { + m_console.printf("%s: %s:%s:%s\n", + img.brief_instance_name(), + img.software_list_name(), + img.software_entry()->shortname(), + img.part_entry()->name()); + } + else + { + m_console.printf("%s: %s\n", img.brief_instance_name(), img.filename()); + } + } + if (!iter.first()) + m_console.printf("No image devices present\n"); } /*------------------------------------------------- @@ -4137,21 +4155,18 @@ void debugger_commands::execute_images(const std::vector<std::string> ¶ms) void debugger_commands::execute_mount(const std::vector<std::string> ¶ms) { - bool done = false; for (device_image_interface &img : image_interface_enumerator(m_machine.root_device())) { - if (img.brief_instance_name() == params[0]) + if ((img.instance_name() == params[0]) || (img.brief_instance_name() == params[0])) { if (img.load(params[1]) != image_init_result::PASS) m_console.printf("Unable to mount file %s on %s\n", params[1], params[0]); else m_console.printf("File %s mounted on %s\n", params[1], params[0]); - done = true; - break; + return; } } - if (!done) - m_console.printf("There is no image device :%s\n", params[0]); + m_console.printf("No image instance %s\n", params[0]); } /*------------------------------------------------- @@ -4160,19 +4175,23 @@ void debugger_commands::execute_mount(const std::vector<std::string> ¶ms) void debugger_commands::execute_unmount(const std::vector<std::string> ¶ms) { - bool done = false; for (device_image_interface &img : image_interface_enumerator(m_machine.root_device())) { - if (img.brief_instance_name() == params[0]) + if ((img.instance_name() == params[0]) || (img.brief_instance_name() == params[0])) { - img.unload(); - m_console.printf("Unmounted file from : %s\n", params[0]); - done = true; - break; + if (img.exists()) + { + img.unload(); + m_console.printf("Unmounted media from %s\n", params[0]); + } + else + { + m_console.printf("No media mounted on %s\n", params[0]); + } + return; } } - if (!done) - m_console.printf("There is no image device :%s\n", params[0]); + m_console.printf("No image instance %s\n", params[0]); } |