diff options
author | 2010-06-30 03:46:21 +0000 | |
---|---|---|
committer | 2010-06-30 03:46:21 +0000 | |
commit | 733b797a3dae6c89b11c9b3f3eaad68995f6ef09 (patch) | |
tree | 6fa31dcfd68bd9c4a34dd8f2c139d63c00d3e33e /src/emu/devintrf.c | |
parent | 2c549dad23fd5b5e8dc48e5a9c8f7790d17e697d (diff) |
Split mame.c into mame.c and machine.c, the latter containing the
running_machine definition and implementation.
Moved global machine-level operations and accessors into methods on the
running_machine class. For the most part, this doesn't affect drivers
except for a few occasional bits:
mame_get_phase() == machine->phase()
add_reset_callback() == machine->add_notifier(MACHINE_NOTIFY_RESET, ...)
add_exit_callback() == machine->add_notifier(MACHINE_NOTIFY_EXIT, ...)
mame_get_base_datetime() == machine->base_datetime()
mame_get_current_datetime() == machine->current_datetime()
Cleaned up the region_info class, removing most global region accessors
except for memory_region() and memory_region_length(). Again, this doesn't
generally affect drivers.
Diffstat (limited to 'src/emu/devintrf.c')
-rw-r--r-- | src/emu/devintrf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/emu/devintrf.c b/src/emu/devintrf.c index d3f8c960783..25caae2b1bb 100644 --- a/src/emu/devintrf.c +++ b/src/emu/devintrf.c @@ -80,7 +80,7 @@ resource_pool &machine_get_pool(running_machine &machine) { // temporary to get around include dependencies, until CPUs // get a proper device class - return machine.respool; + return machine.m_respool; } @@ -125,8 +125,8 @@ void device_list::start_all() { // add exit and reset callbacks assert(m_machine != NULL); - add_reset_callback(m_machine, static_reset); - add_exit_callback(m_machine, static_exit); + m_machine->add_notifier(MACHINE_NOTIFY_RESET, static_reset); + m_machine->add_notifier(MACHINE_NOTIFY_EXIT, static_exit); // add pre-save and post-load callbacks state_save_register_presave(m_machine, static_pre_save, this); @@ -185,9 +185,9 @@ void device_list::reset_all() } -void device_list::static_reset(running_machine *machine) +void device_list::static_reset(running_machine &machine) { - machine->m_devicelist.reset_all(); + machine.m_devicelist.reset_all(); } @@ -195,9 +195,9 @@ void device_list::static_reset(running_machine *machine) // static_exit - tear down all the devices //------------------------------------------------- -void device_list::static_exit(running_machine *machine) +void device_list::static_exit(running_machine &machine) { - machine->m_devicelist.reset(); + machine.m_devicelist.reset(); } |