diff options
author | 2010-06-08 17:35:49 +0000 | |
---|---|---|
committer | 2010-06-08 17:35:49 +0000 | |
commit | 5e04468569256d7b9cc1b6069f9c46c90e2455be (patch) | |
tree | 6e00da715aa56ac59d107f6c3f7b8058362da5b0 /src/emu/cpu/z8000/z8000.c | |
parent | d1e9200589119fa135ffd5801dd018ead4865c23 (diff) |
Changed CPU callbacks to use cpu_device, eliminating a bunch of casting.
Diffstat (limited to 'src/emu/cpu/z8000/z8000.c')
-rw-r--r-- | src/emu/cpu/z8000/z8000.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/emu/cpu/z8000/z8000.c b/src/emu/cpu/z8000/z8000.c index 6eed70a3411..a75ea7fc66d 100644 --- a/src/emu/cpu/z8000/z8000.c +++ b/src/emu/cpu/z8000/z8000.c @@ -82,7 +82,7 @@ struct _z8000_state int nmi_state; /* NMI line state */ int irq_state[2]; /* IRQ line states (NVI, VI) */ device_irq_callback irq_callback; - running_device *device; + cpu_device *device; const address_space *program; const address_space *io; int icount; @@ -365,8 +365,8 @@ static CPU_INIT( z8001 ) cpustate->irq_callback = irqcallback; cpustate->device = device; - cpustate->program = device_memory(device)->space(AS_PROGRAM); - cpustate->io = device_memory(device)->space(AS_IO); + cpustate->program = device->space(AS_PROGRAM); + cpustate->io = device->space(AS_IO); /* already initialized? */ if(z8000_exec == NULL) @@ -379,8 +379,8 @@ static CPU_INIT( z8002 ) cpustate->irq_callback = irqcallback; cpustate->device = device; - cpustate->program = device_memory(device)->space(AS_PROGRAM); - cpustate->io = device_memory(device)->space(AS_IO); + cpustate->program = device->space(AS_PROGRAM); + cpustate->io = device->space(AS_IO); /* already initialized? */ if(z8000_exec == NULL) @@ -395,8 +395,8 @@ static CPU_RESET( z8001 ) memset(cpustate, 0, sizeof(*cpustate)); cpustate->irq_callback = save_irqcallback; cpustate->device = device; - cpustate->program = device_memory(device)->space(AS_PROGRAM); - cpustate->io = device_memory(device)->space(AS_IO); + cpustate->program = device->space(AS_PROGRAM); + cpustate->io = device->space(AS_IO); cpustate->fcw = RDMEM_W(cpustate, 2); /* get reset cpustate->fcw */ if(cpustate->fcw & F_SEG) { @@ -416,8 +416,8 @@ static CPU_RESET( z8002 ) memset(cpustate, 0, sizeof(*cpustate)); cpustate->irq_callback = save_irqcallback; cpustate->device = device; - cpustate->program = device_memory(device)->space(AS_PROGRAM); - cpustate->io = device_memory(device)->space(AS_IO); + cpustate->program = device->space(AS_PROGRAM); + cpustate->io = device->space(AS_IO); cpustate->fcw = RDMEM_W(cpustate, 2); /* get reset cpustate->fcw */ cpustate->pc = RDMEM_W(cpustate, 4); /* get reset cpustate->pc */ } @@ -568,7 +568,7 @@ static CPU_SET_INFO( z8002 ) CPU_GET_INFO( z8002 ) { - z8000_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL; + z8000_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL; switch (state) { |