diff options
Diffstat (limited to 'src/emu/cpu/pic16c5x/pic16c5x.c')
-rw-r--r-- | src/emu/cpu/pic16c5x/pic16c5x.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/emu/cpu/pic16c5x/pic16c5x.c b/src/emu/cpu/pic16c5x/pic16c5x.c index 5722e9206bc..d10bfe0911f 100644 --- a/src/emu/cpu/pic16c5x/pic16c5x.c +++ b/src/emu/cpu/pic16c5x/pic16c5x.c @@ -106,14 +106,13 @@ struct _pic16c5x_state INLINE pic16c5x_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_PIC16C54 || cpu_get_type(device) == CPU_PIC16C55 || cpu_get_type(device) == CPU_PIC16C56 || cpu_get_type(device) == CPU_PIC16C57 || cpu_get_type(device) == CPU_PIC16C58); - return (pic16c5x_state *)device->token; + return (pic16c5x_state *)downcast<cpu_device *>(device)->token(); } @@ -730,9 +729,9 @@ static CPU_INIT( pic16c5x ) pic16c5x_state *cpustate = get_safe_token(device); cpustate->device = device; - cpustate->program = device->space(AS_PROGRAM); - cpustate->data = device->space(AS_DATA); - cpustate->io = device->space(AS_IO); + cpustate->program = device_memory(device)->space(AS_PROGRAM); + cpustate->data = device_memory(device)->space(AS_DATA); + cpustate->io = device_memory(device)->space(AS_IO); /* ensure the internal ram pointers are set before get_info is called */ update_internalram_ptr(cpustate); @@ -997,7 +996,7 @@ static CPU_SET_INFO( pic16c5x ) static CPU_GET_INFO( pic16c5x ) { - pic16c5x_state *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL; + pic16c5x_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL; switch (state) { |