diff options
author | 2008-11-06 18:42:37 +0000 | |
---|---|---|
committer | 2008-11-06 18:42:37 +0000 | |
commit | b44da3b748d0ef6fa95e1c39f556e5e3cff5169b (patch) | |
tree | 2a7acc4cfab418620bfc99ec6f460f32475bb934 /src/emu/cpu/sc61860 | |
parent | 1228d0ad9ea3fa2fb7a3b88357ba286247fc8826 (diff) |
WARNING: This is a significant change. If you are risk-averse and
working on something, hold off syncing.
Defined macros for core CPU functions: CPU_INIT, CPU_RESET, CPU_EXIT,
CPU_EXECUTE, along with macros for the name and for calling, in the
spirit of the devintrf.h macros. More will come later.
Changed init, reset, exit, and execute interfaces to be passed a
const device_config * object. This is a fake object for the moment,
but encapsulates the machine pointer and token. Eventually this will
be a real device.
Changed the CPU IRQ callbacks to a proper type, and added a device
parameter to them.
Updated all CPU cores to the new macros and parameters.
Note that this changes the way we "pointer"-ify cores. I'll send an
update shortly.
Diffstat (limited to 'src/emu/cpu/sc61860')
-rw-r--r-- | src/emu/cpu/sc61860/sc61860.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emu/cpu/sc61860/sc61860.c b/src/emu/cpu/sc61860/sc61860.c index 9733e5e7d7e..4a9e88fc59f 100644 --- a/src/emu/cpu/sc61860/sc61860.c +++ b/src/emu/cpu/sc61860/sc61860.c @@ -77,7 +77,7 @@ static TIMER_CALLBACK(sc61860_2ms_tick) #include "scops.c" #include "sctable.c" -static void sc61860_reset(void) +static CPU_RESET( sc61860 ) { sc61860.timer.t2ms=0; sc61860.timer.t512ms=0; @@ -86,7 +86,7 @@ static void sc61860_reset(void) change_pc(sc61860.pc); } -static void sc61860_init(int index, int clock, const void *config, int (*irqcallback)(int)) +static CPU_INIT( sc61860 ) { sc61860.config = (sc61860_cpu_core *) config; timer_pulse(ATTOTIME_IN_HZ(500), NULL, 0, sc61860_2ms_tick); @@ -107,7 +107,7 @@ static void sc61860_set_context (void *src) } } -static int sc61860_execute(int cycles) +static CPU_EXECUTE( sc61860 ) { sc61860_ICount = cycles; @@ -210,9 +210,9 @@ void sc61860_get_info(UINT32 state, cpuinfo *info) case CPUINFO_PTR_SET_INFO: info->setinfo = sc61860_set_info; break; case CPUINFO_PTR_GET_CONTEXT: info->getcontext = sc61860_get_context; break; case CPUINFO_PTR_SET_CONTEXT: info->setcontext = sc61860_set_context; break; - case CPUINFO_PTR_INIT: info->init = sc61860_init; break; - case CPUINFO_PTR_RESET: info->reset = sc61860_reset; break; - case CPUINFO_PTR_EXECUTE: info->execute = sc61860_execute; break; + case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(sc61860); break; + case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(sc61860); break; + case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(sc61860); break; case CPUINFO_PTR_BURN: info->burn = NULL; break; case CPUINFO_PTR_DISASSEMBLE: info->disassemble = sc61860_dasm; break; case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &sc61860_ICount; break; |