diff options
Diffstat (limited to 'src/emu/machine.cpp')
-rw-r--r-- | src/emu/machine.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 2fa926afb15..a1bd50bc3d1 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -223,6 +223,10 @@ void running_machine::start() // initialize the streams engine before the sound devices start m_sound = std::make_unique<sound_manager>(*this); + // resolve objects that can be used by memory maps + for (device_t &device : device_iterator(root_device())) + device.resolve_pre_map(); + // configure the address spaces, load ROMs (which needs // width/endianess of the spaces), then populate memory (which // needs rom bases), and finally initialize CPUs (which needs @@ -251,6 +255,10 @@ void running_machine::start() manager().create_custom(*this); + // resolve objects that are created by memory maps + for (device_t &device : device_iterator(root_device())) + device.resolve_post_map(); + // register callbacks for the devices, then start them add_notifier(MACHINE_NOTIFY_RESET, machine_notify_delegate(&running_machine::reset_all_devices, this)); add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(&running_machine::stop_all_devices, this)); @@ -1007,10 +1015,6 @@ void running_machine::logfile_callback(const char *buffer) void running_machine::start_all_devices() { - // resolve objects first to avoid messy start order dependencies - for (device_t &device : device_iterator(root_device())) - device.resolve_objects(); - m_dummy_space.start(); // iterate through the devices |