summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/clifront.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/mame/clifront.cpp')
-rw-r--r--src/frontend/mame/clifront.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp
index c2007cae06c..91a4df81b3c 100644
--- a/src/frontend/mame/clifront.cpp
+++ b/src/frontend/mame/clifront.cpp
@@ -498,15 +498,19 @@ void cli_frontend::listcrc(const std::vector<std::string> &args)
// iterate through matches, and then through ROMs
while (drivlist.next())
{
- for (device_t &device : device_iterator(drivlist.config()->root_device()))
- for (const rom_entry *region = rom_first_region(device); region; region = rom_next_region(region))
- for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
+ for (device_t const &device : device_iterator(drivlist.config()->root_device()))
+ {
+ for (tiny_rom_entry const *rom = device.rom_region(); rom && !ROMENTRY_ISEND(rom); ++rom)
+ {
+ if (ROMENTRY_ISFILE(rom))
{
// if we have a CRC, display it
uint32_t crc;
- if (util::hash_collection(ROM_GETHASHDATA(rom)).crc(crc))
- osd_printf_info("%08x %-32s\t%-16s\t%s\n", crc, ROM_GETNAME(rom), device.shortname(), device.name());
+ if (util::hash_collection(rom->hashdata).crc(crc))
+ osd_printf_info("%08x %-32s\t%-16s\t%s\n", crc, rom->name, device.shortname(), device.name());
}
+ }
+ }
}
}
@@ -549,7 +553,7 @@ void cli_frontend::listroms(const std::vector<std::string> &args)
// iterate through roms
bool hasroms = false;
- for (device_t &device : device_iterator(root))
+ for (device_t const &device : device_iterator(root))
{
for (const rom_entry *region = rom_first_region(device); region; region = rom_next_region(region))
{