diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2016-07-27 09:12:55 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2016-07-27 09:12:55 -0400 |
commit | af80bf0e69e8b3caebcd420f45dd4db8e17b14ab (patch) | |
tree | 1fdc52bfea5235f9fc6566ab6acd287323bfed1b | |
parent | d061b1ddb3a8a744ec46351d0dca739c2aa10efc (diff) |
Validity checking improvements
- Always print the name of each driver checked with -validate -verbose, and print before beginning the check to help detect crashes
- Fix already_checked test so that softlists get validated the first time, not every time but the first
- Remove #include "validity.h" where not required (nw)
- attotime::from_double cannot be constexpr because it uses floor (nw)
-rw-r--r-- | src/emu/attotime.h | 4 | ||||
-rw-r--r-- | src/emu/dimemory.cpp | 1 | ||||
-rw-r--r-- | src/emu/divtlb.cpp | 1 | ||||
-rw-r--r-- | src/emu/validity.cpp | 8 | ||||
-rw-r--r-- | src/emu/validity.h | 2 | ||||
-rw-r--r-- | src/mame/machine/slapstic.cpp | 1 |
6 files changed, 10 insertions, 7 deletions
diff --git a/src/emu/attotime.h b/src/emu/attotime.h index d2209ea9c32..75c55e4638c 100644 --- a/src/emu/attotime.h +++ b/src/emu/attotime.h @@ -120,7 +120,7 @@ public: /** @return the seconds portion. */ constexpr seconds_t seconds() const { return m_seconds; } - static constexpr attotime from_double(double _time); + static attotime from_double(double _time); static attotime from_ticks(UINT64 ticks, UINT32 frequency); /** Create an attotime from a integer count of seconds @seconds */ static constexpr attotime from_seconds(INT32 seconds) { return attotime(seconds, 0); } @@ -376,7 +376,7 @@ inline attotime attotime::from_ticks(UINT64 ticks, UINT32 frequency) } /** Create an attotime from floating point count of seconds @p _time */ -inline constexpr attotime attotime::from_double(double _time) +inline attotime attotime::from_double(double _time) { seconds_t secs = floor(_time); _time -= double(secs); diff --git a/src/emu/dimemory.cpp b/src/emu/dimemory.cpp index 56543ae551a..0081062c38c 100644 --- a/src/emu/dimemory.cpp +++ b/src/emu/dimemory.cpp @@ -9,7 +9,6 @@ ***************************************************************************/ #include "emu.h" -#include "validity.h" //************************************************************************** diff --git a/src/emu/divtlb.cpp b/src/emu/divtlb.cpp index 01be30919cb..3f4266a2285 100644 --- a/src/emu/divtlb.cpp +++ b/src/emu/divtlb.cpp @@ -10,7 +10,6 @@ #include "emu.h" #include "divtlb.h" -#include "validity.h" diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index f4c80a8f205..cfbad976d66 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -270,6 +270,10 @@ void validity_checker::validate_end() void validity_checker::validate_one(const game_driver &driver) { + // help verbose validation detect configuration-related crashes + if (m_print_verbose) + output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Validating driver %s (%s)...\n", driver.name, core_filename_extract_base(driver.source_file).c_str()); + // set the current driver m_current_driver = &driver; m_current_config = nullptr; @@ -303,7 +307,9 @@ void validity_checker::validate_one(const game_driver &driver) // if we had warnings or errors, output if (m_errors > start_errors || m_warnings > start_warnings || !m_verbose_text.empty()) { - output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Driver %s (file %s): %d errors, %d warnings\n", driver.name, core_filename_extract_base(driver.source_file).c_str(), m_errors - start_errors, m_warnings - start_warnings); + if (!m_print_verbose) + output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Driver %s (file %s): ", driver.name, core_filename_extract_base(driver.source_file).c_str()); + output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "%d errors, %d warnings\n", m_errors - start_errors, m_warnings - start_warnings); if (m_errors > start_errors) output_indented_errors(m_error_text, "Errors"); if (m_warnings > start_warnings) diff --git a/src/emu/validity.h b/src/emu/validity.h index a25a922e7b6..36b40df80c9 100644 --- a/src/emu/validity.h +++ b/src/emu/validity.h @@ -51,7 +51,7 @@ public: int region_length(const char *tag) { return m_region_map.find(tag)->second; } // generic registry of already-checked stuff - bool already_checked(const char *string) { return m_already_checked.insert(string).second; } + bool already_checked(const char *string) { return !m_already_checked.insert(string).second; } // osd_output interface diff --git a/src/mame/machine/slapstic.cpp b/src/mame/machine/slapstic.cpp index 2d1e83aae67..50d14f2e4c2 100644 --- a/src/mame/machine/slapstic.cpp +++ b/src/mame/machine/slapstic.cpp @@ -182,7 +182,6 @@ #include "includes/slapstic.h" -#include "validity.h" extern const device_type SLAPSTIC = &device_creator<atari_slapstic_device>; |