summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debugger.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/debugger.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/debugger.c')
-rw-r--r--src/emu/debugger.c10
1 files changed, 5 insertions, 5 deletions
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;