From 733b797a3dae6c89b11c9b3f3eaad68995f6ef09 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Wed, 30 Jun 2010 03:46:21 +0000 Subject: 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. --- src/emu/debugger.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/emu/debugger.c') diff --git a/src/emu/debugger.c b/src/emu/debugger.c index 12a4b5360fb..f04f20c26aa 100644 --- a/src/emu/debugger.c +++ b/src/emu/debugger.c @@ -48,7 +48,7 @@ static int atexit_registered; FUNCTION PROTOTYPES ***************************************************************************/ -static void debugger_exit(running_machine *machine); +static void debugger_exit(running_machine &machine); @@ -78,7 +78,7 @@ void debugger_init(running_machine *machine) debugint_init(machine); /* allocate a new entry for our global list */ - add_exit_callback(machine, debugger_exit); + machine->add_notifier(MACHINE_NOTIFY_EXIT, debugger_exit); entry = global_alloc(machine_entry); entry->next = machine_list; entry->machine = machine; @@ -90,7 +90,7 @@ void debugger_init(running_machine *machine) atexit_registered = TRUE; /* listen in on the errorlog */ - add_logerror_callback(machine, debug_errorlog_write_line); + machine->add_logerror_callback(debug_errorlog_write_line); } } @@ -111,13 +111,13 @@ void debugger_refresh_display(running_machine *machine) global list of active machines for cleanup -------------------------------------------------*/ -static void debugger_exit(running_machine *machine) +static void debugger_exit(running_machine &machine) { machine_entry **entryptr; /* remove this machine from the list; it came down cleanly */ for (entryptr = &machine_list; *entryptr != NULL; entryptr = &(*entryptr)->next) - if ((*entryptr)->machine == machine) + if ((*entryptr)->machine == &machine) { machine_entry *deleteme = *entryptr; *entryptr = deleteme->next; -- cgit v1.2.3-70-g09d2