diff options
Diffstat (limited to 'src/emu/cpu/s2650/s2650.c')
-rw-r--r-- | src/emu/cpu/s2650/s2650.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c index 759cdfc897a..325b8bcb589 100644 --- a/src/emu/cpu/s2650/s2650.c +++ b/src/emu/cpu/s2650/s2650.c @@ -41,7 +41,7 @@ struct _s2650_regs { UINT8 irq_state; int icount; - cpu_irq_callback irq_callback; + device_irq_callback irq_callback; running_device *device; const address_space *program; const address_space *io; @@ -50,10 +50,9 @@ struct _s2650_regs { INLINE s2650_regs *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_S2650); - return (s2650_regs *)device->token; + return (s2650_regs *)downcast<cpu_device *>(device)->token(); } /* condition code changes for a byte */ @@ -797,8 +796,8 @@ static CPU_INIT( s2650 ) s2650c->irq_callback = irqcallback; s2650c->device = device; - s2650c->program = device->space(AS_PROGRAM); - s2650c->io = device->space(AS_IO); + s2650c->program = device_memory(device)->space(AS_PROGRAM); + s2650c->io = device_memory(device)->space(AS_IO); state_save_register_device_item(device, 0, s2650c->ppc); state_save_register_device_item(device, 0, s2650c->page); @@ -829,8 +828,8 @@ static CPU_RESET( s2650 ) memset(s2650c->ras, 0, sizeof(s2650c->ras)); s2650c->device = device; - s2650c->program = device->space(AS_PROGRAM); - s2650c->io = device->space(AS_IO); + s2650c->program = device_memory(device)->space(AS_PROGRAM); + s2650c->io = device_memory(device)->space(AS_IO); s2650c->psl = COM | WC; /* force write */ s2650c->psu = 0xff; @@ -1546,7 +1545,7 @@ static CPU_SET_INFO( s2650 ) CPU_GET_INFO( s2650 ) { - s2650_regs *s2650c = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL; + s2650_regs *s2650c = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL; switch (state) { /* --- the following bits of info are returned as 64-bit signed integers --- */ |