mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
Attempt basic validation of slot cards
Note that this currently segfaults on anything ISA, and probably other stuff. For example, any of the following will crash: * mame -valid c386sx16 * mame -valid 386i * mame -valid b128 Pushing before dinner so others can take a look
This commit is contained in:
parent
88b41d3566
commit
6975b237af
@ -1831,6 +1831,27 @@ void validity_checker::validate_devices()
|
||||
|
||||
// done with this device
|
||||
m_current_device = nullptr;
|
||||
|
||||
// if it's a slot, iterate over possible cards (don't recurse, or you'll stack infinite tee connectors)
|
||||
device_slot_interface *const slot = dynamic_cast<device_slot_interface *>(&device);
|
||||
if (slot && !slot->fixed())
|
||||
{
|
||||
for (auto &option : slot->option_list())
|
||||
{
|
||||
if (option.second->selectable())
|
||||
{
|
||||
device_t *const card = m_current_config->device_add(&slot->device(), "_dummy", option.second->devtype(), 0);
|
||||
for (device_t &card_dev : device_iterator(*card))
|
||||
{
|
||||
m_current_device = &card_dev;
|
||||
card_dev.findit(true);
|
||||
card_dev.validity_check(*this);
|
||||
m_current_device = nullptr;
|
||||
}
|
||||
m_current_config->device_remove(&slot->device(), "_dummy");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ private:
|
||||
|
||||
// current state
|
||||
const game_driver * m_current_driver;
|
||||
const machine_config * m_current_config;
|
||||
machine_config * m_current_config;
|
||||
const device_t * m_current_device;
|
||||
const char * m_current_ioport;
|
||||
int_map m_region_map;
|
||||
|
Loading…
Reference in New Issue
Block a user