diff options
Diffstat (limited to 'src/emu/cpu/v60/v60.c')
-rw-r--r-- | src/emu/cpu/v60/v60.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/emu/cpu/v60/v60.c b/src/emu/cpu/v60/v60.c index 040663a4758..3429f3bb6a1 100644 --- a/src/emu/cpu/v60/v60.c +++ b/src/emu/cpu/v60/v60.c @@ -77,7 +77,7 @@ struct _v60_state v60_flags flags; UINT8 irq_line; UINT8 nmi_line; - cpu_irq_callback irq_cb; + device_irq_callback irq_cb; running_device *device; const address_space *program; const address_space *io; @@ -114,11 +114,10 @@ struct _v60_state INLINE v60_state *get_safe_token(running_device *device) { assert(device != NULL); - assert(device->token != NULL); - assert(device->type == CPU); + assert(device->type() == CPU); assert(cpu_get_type(device) == CPU_V60 || cpu_get_type(device) == CPU_V70); - return (v60_state *)device->token; + return (v60_state *)downcast<cpu_device *>(device)->token(); } /* @@ -312,7 +311,7 @@ static UINT32 opUNHANDLED(v60_state *cpustate) // Opcode jump table #include "optable.c" -static void base_init(running_device *device, cpu_irq_callback irqcallback) +static void base_init(running_device *device, device_irq_callback irqcallback) { v60_state *cpustate = get_safe_token(device); @@ -342,8 +341,8 @@ static CPU_INIT( v60 ) cpustate->PIR = 0x00006000; cpustate->info = v60_i; cpustate->device = device; - cpustate->program = device->space(AS_PROGRAM); - cpustate->io = device->space(AS_IO); + cpustate->program = device_memory(device)->space(AS_PROGRAM); + cpustate->io = device_memory(device)->space(AS_IO); } static CPU_INIT( v70 ) @@ -356,8 +355,8 @@ static CPU_INIT( v70 ) cpustate->PIR = 0x00007000; cpustate->info = v70_i; cpustate->device = device; - cpustate->program = device->space(AS_PROGRAM); - cpustate->io = device->space(AS_IO); + cpustate->program = device_memory(device)->space(AS_PROGRAM); + cpustate->io = device_memory(device)->space(AS_IO); } static CPU_RESET( v60 ) @@ -552,7 +551,7 @@ static CPU_SET_INFO( v60 ) CPU_GET_INFO( v60 ) { - v60_state *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL; + v60_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL; switch (state) { |