diff options
Diffstat (limited to 'src/emu/clifront.c')
-rw-r--r-- | src/emu/clifront.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/emu/clifront.c b/src/emu/clifront.c index 0d5486b8b45..934013cdb1f 100644 --- a/src/emu/clifront.c +++ b/src/emu/clifront.c @@ -21,6 +21,8 @@ #include "clifront.h" #include "xmlfile.h" +#include "drivenum.h" + #include <new> #include <ctype.h> @@ -67,6 +69,34 @@ const options_entry cli_options::s_option_entries[] = { NULL } }; +// media_identifier class identifies media by hash via a search in +// the driver database +class media_identifier +{ +public: + // construction/destruction + media_identifier(cli_options &options); + + // getters + int total() const { return m_total; } + int matches() const { return m_matches; } + int nonroms() const { return m_nonroms; } + + // operations + void reset() { m_total = m_matches = m_nonroms = 0; } + void identify(const char *name); + void identify_file(const char *name); + void identify_data(const char *name, const UINT8 *data, int length); + int find_by_hash(const hash_collection &hashes, int length); + +private: + // internal state + driver_enumerator m_drivlist; + int m_total; + int m_matches; + int m_nonroms; +}; + //************************************************************************** @@ -78,8 +108,9 @@ const options_entry cli_options::s_option_entries[] = //------------------------------------------------- cli_options::cli_options() +: emu_options() { - add_entries(s_option_entries); + add_entries(cli_options::s_option_entries); } |