summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/f8/f8.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/cpu/f8/f8.c')
-rw-r--r--src/emu/cpu/f8/f8.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/emu/cpu/f8/f8.c b/src/emu/cpu/f8/f8.c
index 95079a45723..c6ff2362bfa 100644
--- a/src/emu/cpu/f8/f8.c
+++ b/src/emu/cpu/f8/f8.c
@@ -52,7 +52,7 @@ struct _f8_Regs
UINT8 dbus; /* data bus value */
UINT16 io; /* last I/O address */
UINT16 irq_vector;
- cpu_irq_callback irq_callback;
+ device_irq_callback irq_callback;
running_device *device;
const address_space *program;
const address_space *iospace;
@@ -64,10 +64,9 @@ struct _f8_Regs
INLINE f8_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_F8);
- return (f8_Regs *)device->token;
+ return (f8_Regs *)downcast<cpu_device *>(device)->token();
}
/* timer shifter polynome values (will be used for timer interrupts) */
@@ -1546,14 +1545,14 @@ static CPU_RESET( f8 )
f8_Regs *cpustate = get_safe_token(device);
UINT8 data;
int i;
- cpu_irq_callback save_callback;
+ device_irq_callback save_callback;
save_callback = cpustate->irq_callback;
memset(cpustate, 0, sizeof(f8_Regs));
cpustate->irq_callback = save_callback;
cpustate->device = device;
- cpustate->program = device->space(AS_PROGRAM);
- cpustate->iospace = device->space(AS_IO);
+ cpustate->program = device_memory(device)->space(AS_PROGRAM);
+ cpustate->iospace = device_memory(device)->space(AS_IO);
cpustate->w&=~I;
/* save PC0 to PC1 and reset PC0 */
@@ -1902,8 +1901,8 @@ static CPU_INIT( f8 )
f8_Regs *cpustate = get_safe_token(device);
cpustate->irq_callback = irqcallback;
cpustate->device = device;
- cpustate->program = device->space(AS_PROGRAM);
- cpustate->iospace = device->space(AS_IO);
+ cpustate->program = device_memory(device)->space(AS_PROGRAM);
+ cpustate->iospace = device_memory(device)->space(AS_IO);
state_save_register_device_item(device, 0, cpustate->pc0);
state_save_register_device_item(device, 0, cpustate->pc1);
@@ -2020,7 +2019,7 @@ static CPU_SET_INFO( f8 )
CPU_GET_INFO( f8 )
{
- f8_Regs *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL;
+ f8_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{