summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/lh5801/lh5801.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/cpu/lh5801/lh5801.c')
-rw-r--r--src/emu/cpu/lh5801/lh5801.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/emu/cpu/lh5801/lh5801.c b/src/emu/cpu/lh5801/lh5801.c
index 012c714c9d7..0d8385d9b53 100644
--- a/src/emu/cpu/lh5801/lh5801.c
+++ b/src/emu/cpu/lh5801/lh5801.c
@@ -71,10 +71,9 @@ struct _lh5810_state
INLINE lh5801_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_LH5801);
- return (lh5801_state *)device->token;
+ return (lh5801_state *)downcast<cpu_device *>(device)->token();
}
#define P cpustate->p.w.l
@@ -105,9 +104,9 @@ static CPU_INIT( lh5801 )
lh5801_state *cpustate = get_safe_token(device);
memset(cpustate, 0, sizeof(*cpustate));
- cpustate->config = (const lh5801_cpu_core *) device->baseconfig().static_config;
+ cpustate->config = (const lh5801_cpu_core *) device->baseconfig().static_config();
cpustate->device = device;
- cpustate->program = device->space(AS_PROGRAM);
+ cpustate->program = device_memory(device)->space(AS_PROGRAM);
}
static CPU_RESET( lh5801 )
@@ -184,7 +183,7 @@ static CPU_SET_INFO( lh5801 )
CPU_GET_INFO( lh5801 )
{
- lh5801_state *cpustate = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL;
+ lh5801_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{