summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/z80
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-06-08 17:35:49 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-06-08 17:35:49 +0000
commit5e04468569256d7b9cc1b6069f9c46c90e2455be (patch)
tree6e00da715aa56ac59d107f6c3f7b8058362da5b0 /src/emu/cpu/z80
parentd1e9200589119fa135ffd5801dd018ead4865c23 (diff)
Changed CPU callbacks to use cpu_device, eliminating a bunch of casting.
Diffstat (limited to 'src/emu/cpu/z80')
-rw-r--r--src/emu/cpu/z80/z80.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c
index c06c6bab865..b90c4cc6ccb 100644
--- a/src/emu/cpu/z80/z80.c
+++ b/src/emu/cpu/z80/z80.c
@@ -149,7 +149,7 @@ struct _z80_state
UINT8 after_ei; /* are we in the EI shadow? */
UINT32 ea;
device_irq_callback irq_callback;
- running_device *device;
+ cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@@ -3470,8 +3470,8 @@ static CPU_INIT( z80 )
z80->daisy.init(device, (const z80_daisy_config *)device->baseconfig().static_config());
z80->irq_callback = irqcallback;
z80->device = device;
- z80->program = device_memory(device)->space(AS_PROGRAM);
- z80->io = device_memory(device)->space(AS_IO);
+ z80->program = device->space(AS_PROGRAM);
+ z80->io = device->space(AS_IO);
z80->IX = z80->IY = 0xffff; /* IX and IY are FFFF after a reset! */
z80->F = ZF; /* Zero flag is set */
@@ -3825,7 +3825,7 @@ void z80_set_cycle_tables(running_device *device, const UINT8 *op, const UINT8 *
CPU_GET_INFO( z80 )
{
- z80_state *z80 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
+ z80_state *z80 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
@@ -3875,7 +3875,7 @@ CPU_GET_INFO( z80 )
CPU_GET_INFO( nsc800 )
{
- z80_state *z80 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
+ z80_state *z80 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
case CPUINFO_INT_INPUT_LINES: info->i = 4; break;