src/emu/info.c
| r13401 | r13402 | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | |
| 40 | 40 | #include "emu.h" |
| 41 | #include "emuopts.h" |
| 41 | 42 | #include "machine/ram.h" |
| 42 | 43 | #include "sound/samples.h" |
| 43 | 44 | #include "info.h" |
| r13401 | r13402 | |
| 1275 | 1276 | const char *info_xml_creator::get_merge_name(const hash_collection &romhashes) |
| 1276 | 1277 | { |
| 1277 | 1278 | const char *merge_name = NULL; |
| 1278 | | |
| 1279 | emu_options lookup_options(m_drivlist.options()); |
| 1280 | lookup_options.remove_device_options(); |
| 1279 | 1281 | // walk the parent chain |
| 1280 | 1282 | for (int clone_of = m_drivlist.find(m_drivlist.driver().parent); clone_of != -1; clone_of = m_drivlist.find(m_drivlist.driver(clone_of).parent)) |
| 1281 | 1283 | |
| 1282 | 1284 | // look in the parent's ROMs |
| 1283 | | for (const rom_source *psource = rom_first_source(m_drivlist.config(clone_of)); psource != NULL; psource = rom_next_source(*psource)) |
| 1285 | for (const rom_source *psource = rom_first_source(m_drivlist.config(clone_of,lookup_options)); psource != NULL; psource = rom_next_source(*psource)) |
| 1284 | 1286 | for (const rom_entry *pregion = rom_first_region(*psource); pregion != NULL; pregion = rom_next_region(pregion)) |
| 1285 | 1287 | for (const rom_entry *prom = rom_first_file(pregion); prom != NULL; prom = rom_next_file(prom)) |
| 1286 | 1288 | { |
src/emu/driver.c
| r13401 | r13402 | |
| 209 | 209 | // driver, allocating on demand if needed |
| 210 | 210 | //------------------------------------------------- |
| 211 | 211 | |
| 212 | | machine_config &driver_enumerator::config(int index) const |
| 212 | machine_config &driver_enumerator::config(int index, emu_options &options) const |
| 213 | 213 | { |
| 214 | 214 | assert(index >= 0 && index < s_driver_count); |
| 215 | 215 | |
| r13401 | r13402 | |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | // allocate the config and add it to the end of the list |
| 228 | | machine_config *config = m_config[index] = global_alloc(machine_config(*s_drivers_sorted[index], m_options)); |
| 228 | machine_config *config = m_config[index] = global_alloc(machine_config(*s_drivers_sorted[index], options)); |
| 229 | 229 | m_config_cache.append(*global_alloc(config_entry(*config, index))); |
| 230 | 230 | } |
| 231 | 231 | return *m_config[index]; |
src/emu/driver.h
| r13401 | r13402 | |
| 170 | 170 | |
| 171 | 171 | // current item |
| 172 | 172 | const game_driver &driver() const { return driver_list::driver(m_current); } |
| 173 | | machine_config &config() const { return config(m_current); } |
| 173 | machine_config &config() const { return config(m_current, m_options); } |
| 174 | 174 | int clone() { return driver_list::clone(m_current); } |
| 175 | 175 | int non_bios_clone() { return driver_list::non_bios_clone(m_current); } |
| 176 | 176 | int compatible_with() { return driver_list::compatible_with(m_current); } |
| r13401 | r13402 | |
| 180 | 180 | // any item by index |
| 181 | 181 | bool included(int index) const { assert(index >= 0 && index < s_driver_count); return m_included[index]; } |
| 182 | 182 | bool excluded(int index) const { assert(index >= 0 && index < s_driver_count); return !m_included[index]; } |
| 183 | | machine_config &config(int index) const; |
| 183 | machine_config &config(int index) const { return config(index,m_options); } |
| 184 | machine_config &config(int index, emu_options &options) const; |
| 184 | 185 | void include(int index) { assert(index >= 0 && index < s_driver_count); if (!m_included[index]) { m_included[index] = true; m_filtered_count++; } } |
| 185 | 186 | void exclude(int index) { assert(index >= 0 && index < s_driver_count); if (m_included[index]) { m_included[index] = false; m_filtered_count--; } } |
| 186 | 187 | using driver_list::driver; |