summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Scott Stone <tafoid@users.noreply.github.com>2011-02-10 00:05:22 +0000
committer Scott Stone <tafoid@users.noreply.github.com>2011-02-10 00:05:22 +0000
commit7efcc1571c2d6fbed085f0f2327fb58d399f076f (patch)
tree54cb8746c6e9075cc5298eacb80979f42088b14f /src/emu
parent83883e5ac3df2fde8baf83ecdb0f9d51b79e76e8 (diff)
Added information screen output for any game known to have bad or missing data in order to better inform the user as to the reason their emulation may not work as expected. [Alex Jackson]
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/romload.c26
-rw-r--r--src/emu/romload.h5
-rw-r--r--src/emu/ui.c8
3 files changed, 30 insertions, 9 deletions
diff --git a/src/emu/romload.c b/src/emu/romload.c
index 81539f92a0b..56943bbb94d 100644
--- a/src/emu/romload.c
+++ b/src/emu/romload.c
@@ -53,6 +53,7 @@ struct _romload_private
int system_bios; /* the system BIOS we wish to load */
int warnings; /* warning count during processing */
+ int knownbad; /* BAD_DUMP/NO_DUMP count during processing */
int errors; /* error count during processing */
int romsloaded; /* current ROMs loaded count */
@@ -431,7 +432,7 @@ static void handle_missing_file(rom_load_data *romdata, const rom_entry *romp)
else if (ROM_NOGOODDUMP(romp))
{
romdata->errorstring.catprintf("%s NOT FOUND (NO GOOD DUMP KNOWN)\n", ROM_GETNAME(romp));
- romdata->warnings++;
+ romdata->knownbad++;
}
/* anything else is bad */
@@ -521,7 +522,7 @@ static void verify_length_and_hash(rom_load_data *romdata, const char *name, UIN
if (hash_data_has_info(hash, HASH_INFO_NO_DUMP))
{
romdata->errorstring.catprintf("%s NO GOOD DUMP KNOWN\n", name);
- romdata->warnings++;
+ romdata->knownbad++;
}
/* verify checksums */
else if (!hash_data_is_equal(hash, acthash, 0))
@@ -537,7 +538,7 @@ static void verify_length_and_hash(rom_load_data *romdata, const char *name, UIN
else if (hash_data_has_info(hash, HASH_INFO_BAD_DUMP))
{
romdata->errorstring.catprintf("%s ROM NEEDS REDUMP\n",name);
- romdata->warnings++;
+ romdata->knownbad++;
}
}
@@ -581,7 +582,7 @@ static void display_rom_load_results(rom_load_data *romdata)
}
/* if we had warnings, output them, but continue */
- if (romdata->warnings)
+ if ((romdata-> warnings) || (romdata->knownbad))
{
romdata->errorstring.cat("WARNING: the "GAMENOUN" might not run correctly.");
mame_printf_warning("%s\n", romdata->errorstring.cstr());
@@ -1275,7 +1276,9 @@ static void process_disk_entries(rom_load_data *romdata, const char *regiontag,
romdata->errorstring.catprintf("%s CHD ERROR: %s\n", filename.cstr(), chd_error_string(err));
/* if this is NO_DUMP, keep going, though the system may not be able to handle it */
- if (hash_data_has_info(ROM_GETHASHDATA(romp), HASH_INFO_NO_DUMP) || DISK_ISOPTIONAL(romp))
+ if (hash_data_has_info(ROM_GETHASHDATA(romp), HASH_INFO_NO_DUMP))
+ romdata->knownbad++;
+ else if (DISK_ISOPTIONAL(romp))
romdata->warnings++;
else
romdata->errors++;
@@ -1297,7 +1300,7 @@ static void process_disk_entries(rom_load_data *romdata, const char *regiontag,
else if (hash_data_has_info(ROM_GETHASHDATA(romp), HASH_INFO_BAD_DUMP))
{
romdata->errorstring.catprintf("%s CHD NEEDS REDUMP\n", filename.cstr());
- romdata->warnings++;
+ romdata->knownbad++;
}
/* if not read-only, make the diff file */
@@ -1608,3 +1611,14 @@ int rom_load_warnings(running_machine *machine)
{
return machine->romload_data->warnings;
}
+
+
+/*-------------------------------------------------
+ rom_load_knownbad - return the number of
+ BAD_DUMP/NO_DUMP warnings we generated
+-------------------------------------------------*/
+
+int rom_load_knownbad(running_machine *machine)
+{
+ return machine->romload_data->knownbad;
+}
diff --git a/src/emu/romload.h b/src/emu/romload.h
index 039042ffae4..b4d8584f7f2 100644
--- a/src/emu/romload.h
+++ b/src/emu/romload.h
@@ -273,12 +273,15 @@ struct rom_entry
/* ----- ROM processing ----- */
-/* load the ROMs and open the disk images associated with the given machine */
+/* load the ROMs and open the disk images associated with the given machine */
void rom_init(running_machine *machine);
/* return the number of warnings we generated */
int rom_load_warnings(running_machine *machine);
+/* return the number of BAD_DUMP/NO_DUMP warnings we generated */
+int rom_load_knownbad(running_machine *machine);
+
/* ----- Helpers ----- */
diff --git a/src/emu/ui.c b/src/emu/ui.c
index cf6b1be3087..28b7927ab27 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -912,7 +912,7 @@ static astring &warnings_string(running_machine *machine, astring &string)
string.reset();
/* if no warnings, nothing to return */
- if (rom_load_warnings(machine) == 0 && !(machine->gamedrv->flags & WARNING_FLAGS))
+ if (rom_load_warnings(machine) == 0 && rom_load_knownbad(machine) == 0 && !(machine->gamedrv->flags & WARNING_FLAGS))
return string;
/* add a warning if any ROMs were loaded with warnings */
@@ -924,10 +924,14 @@ static astring &warnings_string(running_machine *machine, astring &string)
}
/* if we have at least one warning flag, print the general header */
- if (machine->gamedrv->flags & WARNING_FLAGS)
+ if ((machine->gamedrv->flags & WARNING_FLAGS) || rom_load_knownbad(machine) > 0)
{
string.cat("There are known problems with this " GAMENOUN "\n\n");
+ /* add a warning if any ROMs are flagged BAD_DUMP/NO_DUMP */
+ if (rom_load_knownbad(machine) > 0)
+ string.cat("One or more ROMs/CHDs for this " GAMENOUN " are known to be bad or missing. As a result the " GAMENOUN " may not work correctly. You may be missing graphics, sound or other essential gameplay elements until the proper data is found.\n");
+
/* add one line per warning flag */
if (input_machine_has_keyboard(machine))
string.cat("The keyboard emulation may not be 100% accurate.\n");