diff options
Diffstat (limited to 'src/emu/devintrf.c')
-rw-r--r-- | src/emu/devintrf.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c index fa221c86d46..6e424c3f9f8 100644 --- a/src/emu/devintrf.c +++ b/src/emu/devintrf.c @@ -307,6 +307,30 @@ device_config::device_config(const machine_config &mconfig, device_type type, co } +device_config::device_config(const machine_config &mconfig, device_type type, const char *name, const char *shortname, const char *tag, const device_config *owner, UINT32 clock, UINT32 param) + : m_next(NULL), + m_owner(const_cast<device_config *>(owner)), + m_interface_list(NULL), + m_type(type), + m_clock(clock), + m_machine_config(mconfig), + m_static_config(NULL), + m_input_defaults(NULL), + m_name(name), + m_shortname(shortname), + m_searchpath(shortname), + m_tag(tag), + m_config_complete(false) +{ + // derive the clock from our owner if requested + if ((m_clock & 0xff000000) == 0xff000000) + { + assert(m_owner != NULL); + m_clock = m_owner->m_clock * ((m_clock >> 12) & 0xfff) / ((m_clock >> 0) & 0xfff); + } +} + + //------------------------------------------------- // ~device_config - destructor //------------------------------------------------- |