diff options
Diffstat (limited to 'src/emu/cpu/lr35902/lr35902.c')
-rw-r--r-- | src/emu/cpu/lr35902/lr35902.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/emu/cpu/lr35902/lr35902.c b/src/emu/cpu/lr35902/lr35902.c index 50f30fa0028..90250e91507 100644 --- a/src/emu/cpu/lr35902/lr35902.c +++ b/src/emu/cpu/lr35902/lr35902.c @@ -64,7 +64,7 @@ typedef struct { UINT8 IF; int irq_state; int ei_delay; - cpu_irq_callback irq_callback; + device_irq_callback irq_callback; running_device *device; const address_space *program; int icount; @@ -116,10 +116,9 @@ union _lr35902_state { INLINE lr35902_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_LR35902); - return (lr35902_state *)device->token; + return (lr35902_state *)downcast<cpu_device *>(device)->token(); } typedef int (*OpcodeEmulator) (lr35902_state *cpustate); @@ -191,10 +190,10 @@ static CPU_INIT( lr35902 ) { lr35902_state *cpustate = get_safe_token(device); - cpustate->w.config = (const lr35902_cpu_core *) device->baseconfig().static_config; + cpustate->w.config = (const lr35902_cpu_core *) device->baseconfig().static_config(); cpustate->w.irq_callback = irqcallback; cpustate->w.device = device; - cpustate->w.program = device->space(AS_PROGRAM); + cpustate->w.program = device_memory(device)->space(AS_PROGRAM); } /*** Reset lr353902 registers: ******************************/ @@ -411,7 +410,7 @@ static CPU_SET_INFO( lr35902 ) CPU_GET_INFO( lr35902 ) { - lr35902_state *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL; + lr35902_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL; switch (state) { |