summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/romload.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
committer Vas Crabb <vas@vastheman.com>2019-03-26 11:13:37 +1100
commit97b67170277437131adf6ed4d60139c172529e4f (patch)
tree7a5cbf608f191075f1612b1af15832c206a3fe2d /src/emu/romload.cpp
parentb380514764cf857469bae61c11143a19f79a74c5 (diff)
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
Diffstat (limited to 'src/emu/romload.cpp')
-rw-r--r--src/emu/romload.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp
index 674f4d1ab23..c5b03607509 100644
--- a/src/emu/romload.cpp
+++ b/src/emu/romload.cpp
@@ -32,14 +32,9 @@
static osd_file::error common_process_file(emu_options &options, const char *location, const char *ext, const rom_entry *romp, emu_file &image_file)
{
- osd_file::error filerr;
-
- if (location != nullptr && strcmp(location, "") != 0)
- filerr = image_file.open(location, PATH_SEPARATOR, ROM_GETNAME(romp), ext);
- else
- filerr = image_file.open(ROM_GETNAME(romp), ext);
-
- return filerr;
+ return (location && *location)
+ ? image_file.open(location, PATH_SEPARATOR, ROM_GETNAME(romp), ext)
+ : image_file.open(ROM_GETNAME(romp), ext);
}
std::unique_ptr<emu_file> common_process_file(emu_options &options, const char *location, bool has_crc, u32 crc, const rom_entry *romp, osd_file::error &filerr)
@@ -860,29 +855,29 @@ void rom_load_manager::process_rom_entries(const char *regiontag, const rom_entr
/* loop until we hit the end of this region */
while (!ROMENTRY_ISREGIONEND(romp))
{
- /* if this is a continue entry, it's invalid */
if (ROMENTRY_ISCONTINUE(romp))
fatalerror("Error in RomModule definition: ROM_CONTINUE not preceded by ROM_LOAD\n");
- /* if this is an ignore entry, it's invalid */
if (ROMENTRY_ISIGNORE(romp))
fatalerror("Error in RomModule definition: ROM_IGNORE not preceded by ROM_LOAD\n");
- /* if this is a reload entry, it's invalid */
if (ROMENTRY_ISRELOAD(romp))
fatalerror("Error in RomModule definition: ROM_RELOAD not preceded by ROM_LOAD\n");
- /* handle fills */
if (ROMENTRY_ISFILL(romp))
- fill_rom_data(romp++);
+ {
+ if (!ROM_GETBIOSFLAGS(romp) || ROM_GETBIOSFLAGS(romp) == device->system_bios())
+ fill_rom_data(romp);
- /* handle copies */
+ romp++;
+ }
else if (ROMENTRY_ISCOPY(romp))
+ {
copy_rom_data(romp++);
-
- /* handle files */
+ }
else if (ROMENTRY_ISFILE(romp))
{
+ /* handle files */
int irrelevantbios = (ROM_GETBIOSFLAGS(romp) != 0 && ROM_GETBIOSFLAGS(romp) != device->system_bios());
const rom_entry *baserom = romp;
int explength = 0;
@@ -941,7 +936,7 @@ void rom_load_manager::process_rom_entries(const char *regiontag, const rom_entr
}
else
{
- romp++; /* something else; skip */
+ romp++; // something else - skip
}
}
}