summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/watchdog.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-06-30 03:46:21 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-06-30 03:46:21 +0000
commit733b797a3dae6c89b11c9b3f3eaad68995f6ef09 (patch)
tree6fa31dcfd68bd9c4a34dd8f2c139d63c00d3e33e /src/emu/watchdog.c
parent2c549dad23fd5b5e8dc48e5a9c8f7790d17e697d (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/watchdog.c')
-rw-r--r--src/emu/watchdog.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emu/watchdog.c b/src/emu/watchdog.c
index e52282cefef..8f8c63d819a 100644
--- a/src/emu/watchdog.c
+++ b/src/emu/watchdog.c
@@ -27,7 +27,7 @@ static emu_timer *watchdog_timer;
FUNCTION PROTOTYPES
***************************************************************************/
-static void watchdog_internal_reset(running_machine *machine);
+static void watchdog_internal_reset(running_machine &machine);
static TIMER_CALLBACK( watchdog_callback );
@@ -41,7 +41,7 @@ void watchdog_init(running_machine *machine)
/* allocate a timer for the watchdog */
watchdog_timer = timer_alloc(machine, watchdog_callback, NULL);
- add_reset_callback(machine, watchdog_internal_reset);
+ machine->add_notifier(MACHINE_NOTIFY_RESET, watchdog_internal_reset);
/* save some stuff in the default tag */
state_save_register_item(machine, "watchdog", NULL, 0, watchdog_enabled);
@@ -54,11 +54,11 @@ void watchdog_init(running_machine *machine)
system
-------------------------------------------------*/
-static void watchdog_internal_reset(running_machine *machine)
+static void watchdog_internal_reset(running_machine &machine)
{
/* set up the watchdog timer; only start off enabled if explicitly configured */
- watchdog_enabled = (machine->config->m_watchdog_vblank_count != 0 || attotime_compare(machine->config->m_watchdog_time, attotime_zero) != 0);
- watchdog_reset(machine);
+ watchdog_enabled = (machine.m_config.m_watchdog_vblank_count != 0 || attotime_compare(machine.m_config.m_watchdog_time, attotime_zero) != 0);
+ watchdog_reset(&machine);
watchdog_enabled = TRUE;
}
@@ -75,7 +75,7 @@ static TIMER_CALLBACK( watchdog_callback )
popmessage("Reset caused by the watchdog!!!\n");
#endif
- mame_schedule_soft_reset(machine);
+ machine->schedule_soft_reset();
}