diff options
Diffstat (limited to 'src/emu/device.cpp')
-rw-r--r-- | src/emu/device.cpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/src/emu/device.cpp b/src/emu/device.cpp index 5325e506568..e03e09e8dac 100644 --- a/src/emu/device.cpp +++ b/src/emu/device.cpp @@ -450,10 +450,11 @@ bool device_t::findit(bool isvalidation) const } //------------------------------------------------- -// start - start a device +// resolve_objects - find objects referenced in +// configuration //------------------------------------------------- -void device_t::start() +void device_t::resolve_objects() { // prepare the logerror buffer if (m_machine->allow_logging()) @@ -463,6 +464,20 @@ void device_t::start() if (!findit(false)) throw emu_fatalerror("Missing some required objects, unable to proceed"); + // allow implementation to do additional setup + device_resolve_objects(); +} + +//------------------------------------------------- +// start - start a device +//------------------------------------------------- + +void device_t::start() +{ + // prepare the logerror buffer + if (m_machine->allow_logging()) + m_string_buffer.reserve(1024); + // let the interfaces do their pre-work for (device_interface &intf : interfaces()) intf.interface_pre_start(); @@ -681,6 +696,18 @@ void device_t::device_reset_after_children() //------------------------------------------------- +// device_resolve_objects - resolve objects that +// may be needed for other devices to set +// initial conditions at start time +//------------------------------------------------- + +void device_t::device_resolve_objects() +{ + // do nothing by default +} + + +//------------------------------------------------- // device_stop - clean up anything that needs to // happen before the running_machine goes away //------------------------------------------------- |