diff options
author | 2022-03-10 02:55:40 +1100 | |
---|---|---|
committer | 2022-03-10 02:55:40 +1100 | |
commit | 422185fe558463a119cfdee25e2d4b6e5d71dc97 (patch) | |
tree | 10a01acb7c99b76a0cc575dabd4ce76ec9e3249f /src/emu/diimage.cpp | |
parent | bbb9ec846a44598159258d36f21bae42437ee290 (diff) |
docs: Added page describing how MAME searches for media.
Also made error messages for missing CHDs and missing files for software
parts using the image file loader show search paths, and changed the
(poorly named) bitbanger device to use the image file loader rather than
the ROM loader for software items.
Diffstat (limited to 'src/emu/diimage.cpp')
-rw-r--r-- | src/emu/diimage.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp index 6f01f8f26b5..2d192836ddd 100644 --- a/src/emu/diimage.cpp +++ b/src/emu/diimage.cpp @@ -26,6 +26,7 @@ #include <cctype> #include <cstring> #include <regex> +#include <sstream> //************************************************************************** @@ -683,7 +684,24 @@ bool device_image_interface::load_software(software_list_device &swlist, std::st else filerr = m_mame_file->open(romp->name()); if (filerr) + { m_mame_file.reset(); + std::ostringstream msg; + util::stream_format(msg, + "%s: error opening image file %s: %s (%s:%d)", + device().tag(), romp->name(), + filerr.message(), + filerr.category().name(), + filerr.value()); + if (!searchpath.empty()) + { + msg << " (tried in"; + for (auto const &path : searchpath) + msg << ' ' << path; + msg << ')'; + } + osd_printf_error("%s\n", std::move(msg).str()); + } warningcount += verify_length_and_hash(m_mame_file.get(), romp->name(), romp->get_length(), util::hash_collection(romp->hashdata())); |