diff options
Diffstat (limited to 'src/emu/cpu/pdp1/tx0.c')
-rw-r--r-- | src/emu/cpu/pdp1/tx0.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/emu/cpu/pdp1/tx0.c b/src/emu/cpu/pdp1/tx0.c index dc4f6857994..29f925f5e74 100644 --- a/src/emu/cpu/pdp1/tx0.c +++ b/src/emu/cpu/pdp1/tx0.c @@ -71,11 +71,10 @@ struct _tx0_state INLINE tx0_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_TX0_64KW || cpu_get_type(device) == CPU_TX0_8KW); - return (tx0_state *)device->token; + return (tx0_state *)downcast<cpu_device *>(device)->token(); } #define READ_TX0_18BIT(A) ((signed)memory_read_dword_32be(cpustate->program, (A)<<2)) @@ -127,18 +126,18 @@ static void tx0_write(tx0_state *cpustate, offs_t address, int data) ; } -static void tx0_init_common(running_device *device, cpu_irq_callback irqcallback, int is_64kw) +static void tx0_init_common(running_device *device, device_irq_callback irqcallback, int is_64kw) { tx0_state *cpustate = get_safe_token(device); /* clean-up */ - cpustate->iface = (const tx0_reset_param_t *)device->baseconfig().static_config; + cpustate->iface = (const tx0_reset_param_t *)device->baseconfig().static_config(); cpustate->address_mask = is_64kw ? ADDRESS_MASK_64KW : ADDRESS_MASK_8KW; cpustate->ir_mask = is_64kw ? 03 : 037; cpustate->device = device; - cpustate->program = device->space(AS_PROGRAM); + cpustate->program = device_memory(device)->space(AS_PROGRAM); } static CPU_INIT( tx0_64kw ) @@ -435,7 +434,7 @@ static CPU_SET_INFO( tx0 ) CPU_GET_INFO( tx0_64kw ) { - tx0_state *cpustate = ( device != NULL && device->token != NULL ) ? get_safe_token(device) : NULL; + tx0_state *cpustate = ( device != NULL && downcast<cpu_device *>(device)->token() != NULL ) ? get_safe_token(device) : NULL; switch (state) { @@ -561,7 +560,7 @@ CPU_GET_INFO( tx0_64kw ) CPU_GET_INFO( tx0_8kw ) { - tx0_state *cpustate = ( device != NULL && device->token != NULL ) ? get_safe_token(device) : NULL; + tx0_state *cpustate = ( device != NULL && downcast<cpu_device *>(device)->token() != NULL ) ? get_safe_token(device) : NULL; switch (state) { |