Changed CPU callbacks to use cpu_device, eliminating a bunch of casting.

This commit is contained in:
Aaron Giles 2010-06-08 17:35:49 +00:00
parent d1e9200589
commit 5e04468569
123 changed files with 549 additions and 540 deletions

View File

@ -242,7 +242,7 @@ typedef struct
UINT8 irq_state[9];
UINT8 irq_latch[9];
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
/* other internal states */
int icount;
@ -563,7 +563,7 @@ static void set_irq_line(adsp2100_state *adsp, int irqline, int state)
INITIALIZATION AND SHUTDOWN
***************************************************************************/
static adsp2100_state *adsp21xx_init(running_device *device, device_irq_callback irqcallback, int chiptype)
static adsp2100_state *adsp21xx_init(cpu_device *device, device_irq_callback irqcallback, int chiptype)
{
const adsp21xx_config *config = (const adsp21xx_config *)device->baseconfig().static_config();
adsp2100_state *adsp = get_safe_token(device);
@ -578,9 +578,9 @@ static adsp2100_state *adsp21xx_init(running_device *device, device_irq_callback
/* fetch device parameters */
adsp->device = device;
adsp->program = device_memory(device)->space(AS_PROGRAM);
adsp->data = device_memory(device)->space(AS_DATA);
adsp->io = device_memory(device)->space(AS_IO);
adsp->program = device->space(AS_PROGRAM);
adsp->data = device->space(AS_DATA);
adsp->io = device->space(AS_IO);
/* copy function pointers from the config */
if (config != NULL)
@ -1861,7 +1861,7 @@ static CPU_SET_INFO( adsp21xx )
static CPU_GET_INFO( adsp21xx )
{
adsp2100_state *adsp = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
adsp2100_state *adsp = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -197,7 +197,7 @@ struct _alpha8201_state
UINT8 halt; /* halt input line */
#endif
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
int inst_cycles;
@ -669,7 +669,7 @@ static CPU_INIT( alpha8201 )
alpha8201_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
state_save_register_device_item_array(device, 0, cpustate->RAM);
state_save_register_device_item(device, 0, cpustate->PREVPC);
@ -878,7 +878,7 @@ static CPU_SET_INFO( alpha8201 )
/* 8201 and 8301 */
static CPU_GET_INFO( alpha8xxx )
{
alpha8201_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
alpha8201_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -153,9 +153,9 @@ static CPU_INIT( am29000 )
{
am29000_state *am29000 = get_safe_token(device);
am29000->program = device_memory(device)->space(AS_PROGRAM);
am29000->data = device_memory(device)->space(AS_DATA);
am29000->io = device_memory(device)->space(AS_IO);
am29000->program = device->space(AS_PROGRAM);
am29000->data = device->space(AS_DATA);
am29000->io = device->space(AS_IO);
am29000->cfg = (PRL_AM29000 | PRL_REV_D) << CFG_PRL_SHIFT;
/* Register state for saving */
@ -712,7 +712,7 @@ static CPU_SET_INFO( am29000 )
CPU_GET_INFO( am29000 )
{
am29000_state *am29000 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
am29000_state *am29000 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -358,7 +358,7 @@ struct _apexc_state
/* running: flag implied by the existence of the stop instruction */
UINT32 pc; /* address of next instruction for the disassembler */
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -802,8 +802,8 @@ static CPU_INIT( apexc )
apexc_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
state_save_register_device_item(device, 0, cpustate->a);
state_save_register_device_item(device, 0, cpustate->r);
@ -889,7 +889,7 @@ static CPU_SET_INFO( apexc )
CPU_GET_INFO( apexc )
{
apexc_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
apexc_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -234,7 +234,7 @@ typedef struct
UINT8 pendingIrq;
UINT8 pendingFiq;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
} ARM_REGS;
@ -315,7 +315,7 @@ static CPU_RESET( arm )
memset(cpustate, 0, sizeof(ARM_REGS));
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
/* start up in SVC mode with interrupts disabled. */
R15 = eARM_MODE_SVC|I_MASK|F_MASK;
@ -500,7 +500,7 @@ static CPU_INIT( arm )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
state_save_register_device_item_array(device, 0, cpustate->sArmRegister);
state_save_register_device_item_array(device, 0, cpustate->coproRegister);
@ -1435,7 +1435,7 @@ static CPU_SET_INFO( arm )
CPU_GET_INFO( arm )
{
ARM_REGS *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
ARM_REGS *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -190,7 +190,7 @@ INLINE UINT32 arm7_tlb_translate(arm_state *cpustate, UINT32 vaddr)
static CPU_TRANSLATE( arm7 )
{
arm_state *cpustate = (device != NULL) ? (arm_state *)downcast<cpu_device *>(device)->token() : NULL;
arm_state *cpustate = (device != NULL) ? (arm_state *)device->token() : NULL;
/* only applies to the program address space and only does something if the MMU's enabled */
if( space == ADDRESS_SPACE_PROGRAM && ( COPRO_CTRL & COPRO_CTRL_MMU_EN ) )
@ -216,7 +216,7 @@ static CPU_INIT( arm7 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
// setup co-proc callbacks
arm7_coproc_do_callback = arm7_do_callback;
@ -384,7 +384,7 @@ static CPU_SET_INFO( arm7 )
CPU_GET_INFO( arm7 )
{
arm_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
arm_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -543,7 +543,7 @@ static void arm7_core_init(running_device *device, const char *cpuname)
}
// CPU RESET
static void arm7_core_reset(running_device *device)
static void arm7_core_reset(cpu_device *device)
{
arm_state *cpustate = get_safe_token(device);
@ -552,7 +552,7 @@ static void arm7_core_reset(running_device *device)
memset(cpustate, 0, sizeof(arm_state));
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
/* start up in SVC mode with interrupts disabled. */
SwitchMode(cpustate, eARM7_MODE_SVC);

View File

@ -161,7 +161,7 @@ enum
UINT8 pendingSwi; \
INT32 iCount; \
device_irq_callback irq_callback; \
running_device *device; \
cpu_device *device; \
const address_space *program;

View File

@ -87,7 +87,7 @@ struct _asap_state
int icount;
device_irq_callback irq_callback;
const address_space *program;
running_device *device;
cpu_device *device;
/* src2val table, registers are at the end */
UINT32 src2val[65536];
@ -446,7 +446,7 @@ static CPU_INIT( asap )
asap->src2val[i] = i;
asap->irq_callback = irqcallback;
asap->device = device;
asap->program = device_memory(device)->space(AS_PROGRAM);
asap->program = device->space(AS_PROGRAM);
state_save_register_device_item(device, 0, asap->pc);
@ -1727,7 +1727,7 @@ static CPU_SET_INFO( asap )
CPU_GET_INFO( asap )
{
asap_state *asap = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
asap_state *asap = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -26,7 +26,7 @@ struct _avr8_state
{
UINT32 pc;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -189,8 +189,8 @@ static CPU_INIT( avr8 )
cpustate->pc = 0;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
WRITE_IO_8(cpustate, AVR8_IO_SREG, 0);
@ -1073,7 +1073,7 @@ static CPU_SET_INFO( avr8 )
CPU_GET_INFO( avr8 )
{
avr8_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
avr8_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -43,7 +43,7 @@ struct _ccpu_state
int icount;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *data;
const address_space *io;
@ -131,9 +131,9 @@ static CPU_INIT( ccpu )
cpustate->external_input = configdata->external_input ? configdata->external_input : read_jmi;
cpustate->vector_callback = configdata->vector_callback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
state_save_register_device_item(device, 0, cpustate->PC);
state_save_register_device_item(device, 0, cpustate->A);
@ -730,7 +730,7 @@ static CPU_SET_INFO( ccpu )
CPU_GET_INFO( ccpu )
{
ccpu_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
ccpu_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -992,8 +992,8 @@ static CPU_INIT( cdp1802 )
}
/* find address spaces */
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
/* set initial values */
cpustate->p = mame_rand(device->machine) & 0x0f;
@ -1058,7 +1058,7 @@ static CPU_SET_INFO( cdp1802 )
CPU_GET_INFO( cdp1802 )
{
cdp1802_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
cdp1802_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -865,7 +865,7 @@ static void define_state_table(running_device *device)
state->state_add(COP400_T, "T", cpustate->t);
}
static void cop400_init(running_device *device, UINT8 g_mask, UINT8 d_mask, UINT8 in_mask, int has_counter, int has_inil)
static void cop400_init(cpu_device *device, UINT8 g_mask, UINT8 d_mask, UINT8 in_mask, int has_counter, int has_inil)
{
cop400_state *cpustate = get_safe_token(device);
@ -873,9 +873,9 @@ static void cop400_init(running_device *device, UINT8 g_mask, UINT8 d_mask, UINT
/* find address spaces */
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
/* set output pin masks */
@ -1380,7 +1380,7 @@ static CPU_SET_INFO( cop400 )
static CPU_GET_INFO( cop400 )
{
cop400_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
cop400_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
cop400_interface *intf = (devconfig->static_config() != NULL) ? (cop400_interface *)devconfig->static_config() : NULL;
switch (state)
@ -1494,7 +1494,7 @@ CPU_GET_INFO( cop401 )
CPU_GET_INFO( cop420 )
{
cop400_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
cop400_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
@ -1575,7 +1575,7 @@ CPU_GET_INFO( cop402 )
CPU_GET_INFO( cop444 )
{
cop400_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
cop400_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -46,7 +46,7 @@ struct _cp1610_state
int intr_pending;
int intrm_pending;
int mask_interrupts;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
};
@ -3394,7 +3394,7 @@ static CPU_INIT( cp1610 )
cpustate->intrm_pending = 0;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
state_save_register_device_item_array(device, 0, cpustate->r);
state_save_register_device_item(device, 0, cpustate->flags);
@ -3459,7 +3459,7 @@ static CPU_SET_INFO( cp1610 )
CPU_GET_INFO( cp1610 )
{
cp1610_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
cp1610_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -97,7 +97,7 @@ typedef struct
cubeqst_dac_w_func dac_w;
UINT16 *sound_data;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
} cquestsnd_state;
@ -137,8 +137,8 @@ typedef struct
UINT8 rc;
UINT8 clkcnt;
running_device *device;
running_device *lindevice;
cpu_device *device;
cpu_device *lindevice;
const address_space *program;
int icount;
} cquestrot_state;
@ -183,8 +183,8 @@ typedef struct
UINT32 *e_stack;
UINT32 *o_stack;
running_device *device;
running_device *rotdevice;
cpu_device *device;
cpu_device *rotdevice;
const address_space *program;
int icount;
} cquestlin_state;
@ -289,7 +289,7 @@ static CPU_INIT( cquestsnd )
cpustate->sound_data = (UINT16*)memory_region(device->machine, _config->sound_data_region);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
/* Allocate RAM shared with 68000 */
cpustate->sram = auto_alloc_array(device->machine, UINT16, 4096/2);
@ -362,8 +362,8 @@ static CPU_INIT( cquestrot )
cpustate->sram = auto_alloc_array(device->machine, UINT16, 2048); /* Private */
cpustate->device = device;
cpustate->lindevice = device->machine->device(rotconfig->lin_cpu_tag);
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->lindevice = device->machine->device<cpu_device>(rotconfig->lin_cpu_tag);
cpustate->program = device->space(AS_PROGRAM);
cquestrot_state_register(device);
}
@ -447,8 +447,8 @@ static CPU_INIT( cquestlin )
cpustate->o_stack = auto_alloc_array(device->machine, UINT32, 32768); /* Stack DRAM: 32kx20 */
cpustate->device = device;
cpustate->rotdevice = device->machine->device(linconfig->rot_cpu_tag);
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->rotdevice = device->machine->device<cpu_device>(linconfig->rot_cpu_tag);
cpustate->program = device->space(AS_PROGRAM);
cquestlin_state_register(device);
}
@ -1597,7 +1597,7 @@ static CPU_SET_INFO( cquestsnd )
CPU_GET_INFO( cquestsnd )
{
cquestsnd_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token_snd(device) : NULL;
cquestsnd_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token_snd(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
@ -1715,7 +1715,7 @@ static CPU_SET_INFO( cquestrot )
CPU_GET_INFO( cquestrot )
{
cquestrot_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token_rot(device) : NULL;
cquestrot_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token_rot(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
@ -1833,7 +1833,7 @@ static CPU_SET_INFO( cquestlin )
CPU_GET_INFO( cquestlin )
{
cquestlin_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token_lin(device) : NULL;
cquestlin_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token_lin(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -353,7 +353,7 @@ static drcbe_state *drcbec_alloc(drcuml_state *drcuml, drccache *cache, running_
/* remember our pointers */
drcbe->device = device;
for (spacenum = 0; spacenum < ARRAY_LENGTH(drcbe->space); spacenum++)
drcbe->space[spacenum] = device_memory(device)->space(spacenum);
drcbe->space[spacenum] = downcast<cpu_device *>(device)->space(spacenum);
drcbe->drcuml = drcuml;
drcbe->cache = cache;

View File

@ -714,7 +714,7 @@ static drcbe_state *drcbex64_alloc(drcuml_state *drcuml, drccache *cache, runnin
/* get address spaces and accessors */
for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++)
{
drcbe->space[spacenum] = device_memory(device)->space(spacenum);
drcbe->space[spacenum] = device->space(spacenum);
if (drcbe->space[spacenum] != NULL)
drcbe->accessors[spacenum] = drcbe->space[spacenum]->accessors;
}

View File

@ -631,7 +631,7 @@ static drcbe_state *drcbex86_alloc(drcuml_state *drcuml, drccache *cache, runnin
/* get address spaces */
for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++)
drcbe->space[spacenum] = device_memory(device)->space(spacenum);
drcbe->space[spacenum] = downcast<cpu_device *>(device)->space(spacenum);
/* allocate hash tables */
drcbe->hash = drchash_alloc(cache, modes, addrbits, ignorebits);

View File

@ -139,8 +139,8 @@ drcfe_state *drcfe_init(running_device *cpu, const drcfe_config *config, void *p
/* initialize the state */
drcfe->cpudevice = downcast<cpu_device *>(cpu);
drcfe->program = device_memory(cpu)->space(AS_PROGRAM);
drcfe->pageshift = device_memory(cpu)->space_config(AS_PROGRAM)->m_page_shift;
drcfe->program = drcfe->cpudevice->space(AS_PROGRAM);
drcfe->pageshift = drcfe->cpudevice->space_config(AS_PROGRAM)->m_page_shift;
return drcfe;
}

View File

@ -184,7 +184,7 @@ struct _dsp32_state
UINT8 lastpins;
UINT32 ppc;
void (*output_pins_changed)(running_device *device, UINT32 pins);
running_device *device;
cpu_device * device;
const address_space *program;
};
@ -359,7 +359,7 @@ static CPU_INIT( dsp32c )
cpustate->output_pins_changed = configdata->output_pins_changed;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
dsp32_register_save(device);
}
@ -765,7 +765,7 @@ static CPU_SET_INFO( dsp32c )
CPU_GET_INFO( dsp32c )
{
dsp32_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
dsp32_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -235,8 +235,8 @@ static CPU_INIT( dsp56k )
//cpustate->config = device->baseconfig().static_config();
//cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
/* Setup the direct memory handler for this CPU */
/* NOTE: Be sure to grab this guy and call him if you ever install another direct_update_hander in a driver! */
@ -436,7 +436,7 @@ static CPU_SET_INFO( dsp56k )
CPU_GET_INFO( dsp56k )
{
dsp56k_core* cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
dsp56k_core* cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -232,7 +232,7 @@ typedef struct
UINT32 op;
int interrupt_cycles;
void (*output_pins_changed)(UINT32 pins);
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *data;
} dsp56k_core;

View File

@ -319,7 +319,7 @@ struct _hyperstone_state
struct _delay delay;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
UINT32 opcodexor;
@ -637,7 +637,7 @@ static void adjust_timer_interrupt(hyperstone_state *cpustate)
static TIMER_CALLBACK( e132xs_timer_callback )
{
running_device *device = (running_device *)ptr;
cpu_device *device = (cpu_device *)ptr;
hyperstone_state *cpustate = get_safe_token(device);
int update = param;
@ -1527,7 +1527,7 @@ static void set_irq_line(hyperstone_state *cpustate, int irqline, int state)
ISR &= ~(1 << irqline);
}
static void hyperstone_init(running_device *device, device_irq_callback irqcallback, int scale_mask)
static void hyperstone_init(cpu_device *device, device_irq_callback irqcallback, int scale_mask)
{
hyperstone_state *cpustate = get_safe_token(device);
@ -1543,13 +1543,13 @@ static void hyperstone_init(running_device *device, device_irq_callback irqcallb
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->timer = timer_alloc(device->machine, e132xs_timer_callback, (void *)device);
cpustate->clock_scale_mask = scale_mask;
}
static void e116_init(running_device *device, device_irq_callback irqcallback, int scale_mask)
static void e116_init(cpu_device *device, device_irq_callback irqcallback, int scale_mask)
{
hyperstone_state *cpustate = get_safe_token(device);
hyperstone_init(device, irqcallback, scale_mask);
@ -1586,7 +1586,7 @@ static CPU_INIT( gms30c2216 )
e116_init(device, irqcallback, 0);
}
static void e132_init(running_device *device, device_irq_callback irqcallback, int scale_mask)
static void e132_init(cpu_device *device, device_irq_callback irqcallback, int scale_mask)
{
hyperstone_state *cpustate = get_safe_token(device);
hyperstone_init(device, irqcallback, scale_mask);
@ -1650,8 +1650,8 @@ static CPU_RESET( hyperstone )
cpustate->irq_callback = save_irqcallback;
cpustate->opcodexor = save_opcodexor;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->timer = save_timer;
cpustate->tr_clocks_per_tick = 2;
@ -4843,7 +4843,7 @@ static CPU_SET_INFO( hyperstone )
static CPU_GET_INFO( hyperstone )
{
hyperstone_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
hyperstone_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -109,7 +109,7 @@ typedef struct
UINT16 *ipt_ram;
UINT8 *lbrm;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
@ -264,7 +264,7 @@ static CPU_INIT( esrip )
cpustate->ipt_ram = auto_alloc_array(device->machine, UINT16, IPT_RAM_SIZE/2);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
/* Create the instruction decode lookup table */
cpustate->optable = auto_alloc_array(device->machine, UINT8, 65536);
@ -1890,7 +1890,7 @@ static CPU_SET_INFO( esrip )
CPU_GET_INFO( esrip )
{
esrip_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
esrip_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -53,7 +53,7 @@ struct _f8_Regs
UINT16 io; /* last I/O address */
UINT16 irq_vector;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *iospace;
int icount;
@ -1551,8 +1551,8 @@ static CPU_RESET( f8 )
memset(cpustate, 0, sizeof(f8_Regs));
cpustate->irq_callback = save_callback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->iospace = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->iospace = device->space(AS_IO);
cpustate->w&=~I;
/* save PC0 to PC1 and reset PC0 */
@ -1901,8 +1901,8 @@ static CPU_INIT( f8 )
f8_Regs *cpustate = get_safe_token(device);
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->iospace = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->iospace = device->space(AS_IO);
state_save_register_device_item(device, 0, cpustate->pc0);
state_save_register_device_item(device, 0, cpustate->pc1);
@ -2019,7 +2019,7 @@ static CPU_SET_INFO( f8 )
CPU_GET_INFO( f8 )
{
f8_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
f8_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -337,7 +337,7 @@ static CPU_INIT( g65816 )
g65816_set_irq_callback(cpustate, irqcallback);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
cpustate->cpu_type = CPU_TYPE_G65816;
state_save_register_device_item(device, 0, cpustate->a);
@ -418,7 +418,7 @@ void g65816_set_read_vector_callback(running_device *device, read8_space_func re
CPU_GET_INFO( g65816 )
{
g65816i_cpu_struct *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
g65816i_cpu_struct *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -94,7 +94,7 @@ struct _g65816i_cpu_struct
uint ir; /* Instruction Register */
uint irq_delay; /* delay 1 instruction before checking irq */
device_irq_callback int_ack; /* Interrupt Acknowledge */
running_device *device;
cpu_device *device;
const address_space *program;
read8_space_func read_vector; /* Read vector override */
uint stopped; /* Sets how the CPU is stopped */

View File

@ -162,8 +162,8 @@ static CPU_INIT( h6280 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
}
static CPU_RESET( h6280 )
@ -178,8 +178,8 @@ static CPU_RESET( h6280 )
memset(cpustate, 0, sizeof(h6280_Regs));
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
/* set I and B flags */
P = _fI | _fB;
@ -425,7 +425,7 @@ static CPU_SET_INFO( h6280 )
CPU_GET_INFO( h6280 )
{
h6280_Regs* cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
h6280_Regs* cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -61,7 +61,7 @@ typedef struct
UINT8 irq_state[3];
UINT8 irq_pending;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;

View File

@ -220,8 +220,8 @@ static CPU_INIT(h8)
h8->mode_8bit = 0;
h8->program = device_memory(device)->space(AS_PROGRAM);
h8->io = device_memory(device)->space(AS_IO);
h8->program = device->space(AS_PROGRAM);
h8->io = device->space(AS_IO);
state_save_register_device_item(device, 0, h8->h8err);
state_save_register_device_item_array(device, 0, h8->regs);
@ -570,7 +570,7 @@ ADDRESS_MAP_END
CPU_GET_INFO( h8_3002 )
{
h83xx_state *h8 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
h83xx_state *h8 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state) {
// Interface functions and variables

View File

@ -237,8 +237,8 @@ static CPU_INIT(h8bit)
h8->mode_8bit = 1;
h8->program = device_memory(device)->space(AS_PROGRAM);
h8->io = device_memory(device)->space(AS_IO);
h8->program = device->space(AS_PROGRAM);
h8->io = device->space(AS_IO);
h8->timer[0] = timer_alloc(h8->device->machine, h8_timer_0_cb, h8);
h8->timer[1] = timer_alloc(h8->device->machine, h8_timer_1_cb, h8);
@ -751,7 +751,7 @@ ADDRESS_MAP_END
CPU_GET_INFO( h8_3334 )
{
h83xx_state *h8 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
h83xx_state *h8 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state) {
// Interface functions and variables

View File

@ -26,7 +26,7 @@ struct _h83xx_state
UINT8 incheckirqs;
device_irq_callback irq_cb;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;

View File

@ -132,7 +132,7 @@ struct _m68_state_t
int extra_cycles; /* cycles used up by interrupts */
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
int icount;
PAIR ea; /* effective address */
@ -505,7 +505,7 @@ static void check_irq_lines( m68_state_t *m68_state )
static STATE_POSTLOAD( hd6309_postload )
{
running_device *device = (running_device *)param;
running_device *device = (cpu_device *)param;
m68_state_t *m68_state = get_safe_token(device);
UpdateState(m68_state);
@ -522,7 +522,7 @@ static CPU_INIT( hd6309 )
m68_state->irq_callback = irqcallback;
m68_state->device = device;
m68_state->program = device_memory(device)->space(AS_PROGRAM);
m68_state->program = device->space(AS_PROGRAM);
/* setup regtable */
@ -1258,7 +1258,7 @@ static CPU_SET_INFO( hd6309 )
CPU_GET_INFO( hd6309 )
{
m68_state_t *m68_state = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m68_state_t *m68_state = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -463,7 +463,7 @@ static void I386OP(decode_two_byte)(i386_state *cpustate)
static UINT64 i386_debug_segbase(void *globalref, void *ref, UINT32 params, const UINT64 *param)
{
running_device *device = (running_device *)ref;
cpu_device *device = (cpu_device *)ref;
i386_state *cpustate = get_safe_token(device);
UINT32 result;
I386_SREG seg;
@ -484,7 +484,7 @@ static UINT64 i386_debug_segbase(void *globalref, void *ref, UINT32 params, cons
static UINT64 i386_debug_seglimit(void *globalref, void *ref, UINT32 params, const UINT64 *param)
{
running_device *device = (running_device *)ref;
cpu_device *device = (cpu_device *)ref;
i386_state *cpustate = get_safe_token(device);
UINT32 result = 0;
I386_SREG seg;
@ -509,7 +509,7 @@ static CPU_DEBUG_INIT( i386 )
static STATE_POSTLOAD( i386_postload )
{
running_device *device = (running_device *)param;
cpu_device *device = (cpu_device *)param;
i386_state *cpustate = get_safe_token(device);
int i;
for (i = 0; i < 6; i++)
@ -548,8 +548,8 @@ static CPU_INIT( i386 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
state_save_register_device_item_array(device, 0, cpustate->reg.d);
state_save_register_device_item(device, 0, cpustate->sreg[ES].selector);
@ -647,8 +647,8 @@ static CPU_RESET( i386 )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -870,7 +870,7 @@ static CPU_SET_INFO( i386 )
CPU_GET_INFO( i386 )
{
i386_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i386_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
@ -1103,8 +1103,8 @@ static CPU_RESET( i486 )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -1165,7 +1165,7 @@ static CPU_SET_INFO( i486 )
CPU_GET_INFO( i486 )
{
i386_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i386_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
case CPUINFO_FCT_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(i486);break;
@ -1219,8 +1219,8 @@ static CPU_RESET( pentium )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -1296,7 +1296,7 @@ static CPU_SET_INFO( pentium )
CPU_GET_INFO( pentium )
{
i386_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i386_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
case CPUINFO_FCT_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(pentium); break;
@ -1350,8 +1350,8 @@ static CPU_RESET( mediagx )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -1422,7 +1422,7 @@ static CPU_SET_INFO( mediagx )
CPU_GET_INFO( mediagx )
{
i386_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i386_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
case CPUINFO_FCT_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(mediagx); break;

View File

@ -227,7 +227,7 @@ struct _i386_state
UINT8 irq_state;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
UINT32 a20_mask;

View File

@ -33,7 +33,7 @@ struct _i4004_state
PAIR PC; // It is in fact one of ADDR regs
UINT8 flags; // used for I/O only
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *data;
const address_space *io;
@ -468,9 +468,9 @@ static CPU_INIT( i4004 )
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
state_save_register_device_item(device, 0, cpustate->PC);
state_save_register_device_item(device, 0, cpustate->A);
@ -574,7 +574,7 @@ static CPU_SET_INFO( i4004 )
CPU_GET_INFO( i4004 )
{
i4004_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i4004_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -33,7 +33,7 @@ struct _i8008_state
UINT8 PF; // Parity flag
UINT8 HALT;
UINT8 flags; // temporary I/O only
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -547,8 +547,8 @@ static CPU_INIT( i8008 )
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->irq_callback = irqcallback;
@ -676,7 +676,7 @@ static CPU_SET_INFO( i8008 )
CPU_GET_INFO( i8008 )
{
i8008_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i8008_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -183,7 +183,7 @@ struct _i8085_state
UINT8 ietemp; /* import/export temp space */
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -971,7 +971,7 @@ static void init_tables (int type)
}
static void init_808x_common(running_device *device, device_irq_callback irqcallback, int type)
static void init_808x_common(cpu_device *device, device_irq_callback irqcallback, int type)
{
i8085_state *cpustate = get_safe_token(device);
@ -1010,8 +1010,8 @@ static void init_808x_common(running_device *device, device_irq_callback irqcall
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
/* resolve callbacks */
devcb_resolve_write8(&cpustate->out_status_func, &cpustate->config.out_status_func, device);
@ -1202,7 +1202,7 @@ static CPU_SET_INFO( i808x )
CPU_GET_INFO( i8085 )
{
i8085_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i8085_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -58,7 +58,7 @@ struct _i80286_state
UINT8 rights;
} ldtr, tr;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
INT32 AuxVal, OverVal, SignVal, ZeroVal, CarryVal, DirVal; /* 0 or non-0 valued flags */
@ -293,8 +293,8 @@ static CPU_INIT( i80286 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
/* If a reset parameter is given, take it as pointer to an address mask */
if( device->baseconfig().static_config() )
@ -388,7 +388,7 @@ static CPU_SET_INFO( i80286 )
CPU_GET_INFO( i80286 )
{
i80286_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i80286_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -59,7 +59,7 @@ struct _i8086_state
memory_interface mem;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -167,8 +167,8 @@ static CPU_INIT( i8086 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
/* set up the state table */
{
@ -224,8 +224,8 @@ static CPU_RESET( i8086 )
cpustate->irq_callback = save_irqcallback;
cpustate->mem = save_mem;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->sregs[CS] = 0xf000;
cpustate->base[CS] = SegBase(CS);
@ -523,7 +523,7 @@ static CPU_SET_INFO( i8086 )
CPU_GET_INFO( i8086 )
{
i8086_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i8086_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -30,7 +30,7 @@ static CPU_INIT( i860 )
{
i860_state_t *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
reset_i860(cpustate);
i860_set_pin(device, DEC_PIN_BUS_HOLD, 0);
i860_set_pin(device, DEC_PIN_RESET, 0);
@ -176,7 +176,7 @@ static CPU_SET_INFO( i860 )
CPU_GET_INFO( i860 )
{
i860_state_t *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i860_state_t *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -169,7 +169,7 @@ typedef struct {
/*
* MAME-specific stuff.
*/
running_device *device;
cpu_device *device;
const address_space *program;
UINT32 ppc;
int icount;

View File

@ -34,7 +34,7 @@ struct _i960_state_t {
int immediate_irq, immediate_vector, immediate_pri;
device_irq_callback irq_cb;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
@ -2070,7 +2070,7 @@ static CPU_INIT( i960 )
i960->irq_cb = irqcallback;
i960->device = device;
i960->program = device_memory(device)->space(AS_PROGRAM);
i960->program = device->space(AS_PROGRAM);
state_save_register_device_item(device, 0, i960->PIP);
state_save_register_device_item(device, 0, i960->SAT);
@ -2107,7 +2107,7 @@ static CPU_RESET( i960 )
CPU_GET_INFO( i960 )
{
i960_state_t *i960 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
i960_state_t *i960 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
if(state >= CPUINFO_INT_REGISTER+I960_R0 && state <= CPUINFO_INT_REGISTER + I960_G15) {
info->i = i960->r[state - (CPUINFO_INT_REGISTER + I960_R0)];

View File

@ -100,7 +100,7 @@ struct _jaguar_state
void (*const *table)(jaguar_state *jaguar, UINT16 op);
device_irq_callback irq_callback;
jaguar_int_func cpu_interrupt;
running_device *device;
cpu_device *device;
const address_space *program;
};
@ -401,7 +401,7 @@ static void init_tables(void)
static STATE_POSTLOAD( jaguar_postload )
{
running_device *device = (running_device *)param;
cpu_device *device = (cpu_device *)param;
jaguar_state *jaguar = get_safe_token(device);
update_register_banks(jaguar);
@ -409,7 +409,7 @@ static STATE_POSTLOAD( jaguar_postload )
}
static void init_common(int isdsp, running_device *device, device_irq_callback irqcallback)
static void init_common(int isdsp, cpu_device *device, device_irq_callback irqcallback)
{
const jaguar_cpu_config *configdata = (const jaguar_cpu_config *)device->baseconfig().static_config();
jaguar_state *jaguar = get_safe_token(device);
@ -421,7 +421,7 @@ static void init_common(int isdsp, running_device *device, device_irq_callback i
jaguar->irq_callback = irqcallback;
jaguar->device = device;
jaguar->program = device_memory(device)->space(AS_PROGRAM);
jaguar->program = device->space(AS_PROGRAM);
if (configdata != NULL)
jaguar->cpu_interrupt = configdata->cpu_int_callback;
@ -1495,7 +1495,7 @@ static CPU_SET_INFO( jaguargpu )
CPU_GET_INFO( jaguargpu )
{
jaguar_state *jaguar = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
jaguar_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
@ -1648,7 +1648,7 @@ static CPU_SET_INFO( jaguardsp )
CPU_GET_INFO( jaguardsp )
{
jaguar_state *jaguar = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
jaguar_state *jaguar = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -61,7 +61,7 @@ struct _konami_state
UINT8 nmi_state;
UINT8 nmi_pending;
int icount;
running_device *device;
cpu_device *device;
const address_space *program;
konami_set_lines_func setlines_callback;
};
@ -404,7 +404,7 @@ static CPU_INIT( konami )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
state_save_register_device_item(device, 0, PC);
state_save_register_device_item(device, 0, U);
@ -547,7 +547,7 @@ static CPU_SET_INFO( konami )
CPU_GET_INFO( konami )
{
konami_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
konami_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -50,7 +50,7 @@ typedef struct _lh5810_state lh5801_state;
struct _lh5810_state
{
const lh5801_cpu_core *config;
running_device *device;
cpu_device *device;
const address_space *program;
PAIR s, p, u, x, y;
@ -106,7 +106,7 @@ static CPU_INIT( lh5801 )
memset(cpustate, 0, sizeof(*cpustate));
cpustate->config = (const lh5801_cpu_core *) device->baseconfig().static_config();
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
}
static CPU_RESET( lh5801 )
@ -183,7 +183,7 @@ static CPU_SET_INFO( lh5801 )
CPU_GET_INFO( lh5801 )
{
lh5801_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
lh5801_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -65,7 +65,7 @@ typedef struct {
int irq_state;
int ei_delay;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
/* Timer stuff */
@ -193,7 +193,7 @@ static CPU_INIT( lr35902 )
cpustate->w.config = (const lr35902_cpu_core *) device->baseconfig().static_config();
cpustate->w.irq_callback = irqcallback;
cpustate->w.device = device;
cpustate->w.program = device_memory(device)->space(AS_PROGRAM);
cpustate->w.program = device->space(AS_PROGRAM);
}
/*** Reset lr353902 registers: ******************************/
@ -410,7 +410,7 @@ static CPU_SET_INFO( lr35902 )
CPU_GET_INFO( lr35902 )
{
lr35902_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
lr35902_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -896,8 +896,8 @@ static CPU_INIT( m37710 )
INT_ACK = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->ICount = 0;
@ -1014,7 +1014,7 @@ ADDRESS_MAP_END
CPU_GET_INFO( m37710 )
{
m37710i_cpu_struct *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m37710i_cpu_struct *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -109,7 +109,7 @@ struct _m37710i_cpu_struct
uint source; /* temp register */
uint destination; /* temp register */
device_irq_callback int_ack;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
uint stopped; /* Sets how the CPU is stopped */

View File

@ -143,7 +143,7 @@ struct _m4510_Regs {
UINT32 mem[8];
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *space;
int icount;
@ -206,7 +206,7 @@ static CPU_INIT( m4510 )
cpustate->port_write = NULL;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->space = device_memory(device)->space(AS_PROGRAM);
cpustate->space = device->space(AS_PROGRAM);
if ( intf )
{
@ -455,7 +455,7 @@ static CPU_SET_INFO( m4510 )
CPU_GET_INFO( m4510 )
{
m4510_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m4510_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -69,7 +69,7 @@ struct _m6502_Regs
UINT8 so_state;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *space;
const address_space *io;
int int_occured;
@ -128,14 +128,14 @@ static void default_wdmem_id(const address_space *space, offs_t offset, UINT8 da
*
*****************************************************************************/
static void m6502_common_init(running_device *device, device_irq_callback irqcallback, UINT8 subtype, void (*const *insn)(m6502_Regs *cpustate), const char *type)
static void m6502_common_init(cpu_device *device, device_irq_callback irqcallback, UINT8 subtype, void (*const *insn)(m6502_Regs *cpustate), const char *type)
{
m6502_Regs *cpustate = get_safe_token(device);
const m6502_interface *intf = (const m6502_interface *)device->baseconfig().static_config();
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->space = device_memory(device)->space(AS_PROGRAM);
cpustate->space = device->space(AS_PROGRAM);
cpustate->subtype = subtype;
cpustate->insn = insn;
cpustate->rdmem_id = default_rdmem_id;
@ -528,7 +528,7 @@ static CPU_INIT( deco16 )
{
m6502_Regs *cpustate = get_safe_token(device);
m6502_common_init(device, irqcallback, SUBTYPE_DECO16, insndeco16, "deco16");
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->io = device->space(AS_IO);
}
@ -691,7 +691,7 @@ static CPU_SET_INFO( m6502 )
CPU_GET_INFO( m6502 )
{
m6502_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m6502_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
@ -809,7 +809,7 @@ static CPU_SET_INFO( m6510 )
CPU_GET_INFO( m6510 )
{
m6502_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m6502_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -78,7 +78,7 @@ struct _m6509_Regs {
UINT8 irq_state;
UINT8 so_state;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *space;
int icount;
@ -147,7 +147,7 @@ static CPU_INIT( m6509 )
cpustate->wrmem_id = default_wdmem_id;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->space = device_memory(device)->space(AS_PROGRAM);
cpustate->space = device->space(AS_PROGRAM);
if ( intf )
{
@ -330,7 +330,7 @@ static CPU_SET_INFO( m6509 )
CPU_GET_INFO( m6509 )
{
m6509_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m6509_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -75,7 +75,7 @@ struct _m65ce02_Regs {
UINT8 irq_state;
int icount;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *space;
read8_space_func rdmem_id; /* readmem callback for indexed instructions */
write8_space_func wrmem_id; /* writemem callback for indexed instructions */
@ -107,7 +107,7 @@ static CPU_INIT( m65ce02 )
cpustate->wrmem_id = default_wdmem_id;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->space = device_memory(device)->space(AS_PROGRAM);
cpustate->space = device->space(AS_PROGRAM);
if ( intf )
{
@ -275,7 +275,7 @@ static CPU_SET_INFO( m65ce02 )
CPU_GET_INFO( m65ce02 )
{
m65ce02_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m65ce02_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch( state )
{

View File

@ -113,7 +113,7 @@ struct _m6800_state
UINT8 ic_eddge; /* InputCapture eddge , b.0=fall,b.1=raise */
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
/* Memory spaces */
const address_space *program;
@ -897,9 +897,9 @@ static CPU_INIT( m6800 )
{
m6800_state *cpustate = get_safe_token(device);
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
// cpustate->subtype = SUBTYPE_M6800;
cpustate->insn = m6800_insn;
@ -1293,9 +1293,9 @@ static CPU_INIT( m6801 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->clock = device->clock() / 4;
cpustate->m6800_rx_timer = timer_alloc(device->machine, m6800_rx_tick, cpustate);
@ -1316,9 +1316,9 @@ static CPU_INIT( m6802 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
state_register(cpustate, "m6802");
}
@ -1335,9 +1335,9 @@ static CPU_INIT( m6803 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->clock = device->clock() / 4;
cpustate->m6800_rx_timer = timer_alloc(device->machine, m6800_rx_tick, cpustate);
@ -1669,9 +1669,9 @@ static CPU_INIT( m6808 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
state_register(cpustate, "m6808");
}
@ -1689,9 +1689,9 @@ static CPU_INIT( hd63701 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->clock = device->clock() / 4;
cpustate->m6800_rx_timer = timer_alloc(device->machine, m6800_rx_tick, cpustate);
@ -2037,9 +2037,9 @@ static CPU_INIT( nsc8105 )
// cpustate->subtype = SUBTYPE_NSC8105;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->insn = nsc8105_insn;
cpustate->cycles = cycles_nsc8105;
@ -2671,7 +2671,7 @@ static CPU_SET_INFO( m6800 )
CPU_GET_INFO( m6800 )
{
m6800_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m6800_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -637,7 +637,7 @@ static CPU_INIT( m68k )
m68ki_cpu_core *m68k = get_safe_token(device);
m68k->device = device;
m68k->program = device_memory(device)->space(AS_PROGRAM);
m68k->program = device->space(AS_PROGRAM);
m68k->int_ack_callback = irqcallback;
/* The first call to this function initializes the opcode handler jump table */
@ -885,7 +885,7 @@ static CPU_EXPORT_STRING( m68k )
static CPU_GET_INFO( m68k )
{
m68ki_cpu_core *m68k = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m68ki_cpu_core *m68k = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -627,7 +627,7 @@ struct _m68ki_cpu_core
m68k_rte_func rte_instr_callback; /* Called when a RTE instruction is encountered */
m68k_tas_func tas_instr_callback; /* Called when a TAS instruction is encountered, allows / disallows writeback */
running_device *device;
cpu_device *device;
const address_space *program;
m68k_memory_interface memory;
offs_t encrypted_start;

View File

@ -61,7 +61,7 @@ typedef struct
UINT16 pending_interrupts; /* MB */
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
int irq_state[9]; /* KW Additional lines for HD63705 */
int nmi_state;
@ -441,7 +441,7 @@ static void Interrupt( m6805_Regs *cpustate )
}
}
static void state_register(m6805_Regs *cpustate, const char *type, running_device *device)
static void state_register(m6805_Regs *cpustate, const char *type, cpu_device *device)
{
state_save_register_device_item(device, 0, A);
state_save_register_device_item(device, 0, PC);
@ -459,7 +459,7 @@ static CPU_INIT( m6805 )
state_register(cpustate, "m6805", device);
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
}
static CPU_RESET( m6805 )
@ -472,7 +472,7 @@ static CPU_RESET( m6805 )
cpustate->iCount=50000; /* Used to be global */
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
/* Force CPU sub-type and relevant masks */
cpustate->subtype = SUBTYPE_M6805;
@ -907,7 +907,7 @@ static CPU_SET_INFO( m6805 )
CPU_GET_INFO( m6805 )
{
m6805_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m6805_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
@ -1001,7 +1001,7 @@ static CPU_SET_INFO( m68705 )
CPU_GET_INFO( m68705 )
{
m6805_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m6805_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
@ -1048,7 +1048,7 @@ static CPU_SET_INFO( hd63705 )
CPU_GET_INFO( hd63705 )
{
m6805_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m6805_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -99,7 +99,7 @@ struct _m68_state_t
int extra_cycles; /* cycles used up by interrupts */
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const m6809_config *config;
int icount;
PAIR ea; /* effective address */
@ -383,7 +383,7 @@ static CPU_INIT( m6809 )
m68_state->irq_callback = irqcallback;
m68_state->device = device;
m68_state->program = device_memory(device)->space(AS_PROGRAM);
m68_state->program = device->space(AS_PROGRAM);
/* setup regtable */
@ -1101,7 +1101,7 @@ static CPU_SET_INFO( m6809 )
CPU_GET_INFO( m6809 )
{
m68_state_t *m68_state = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
m68_state_t *m68_state = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -50,7 +50,7 @@ struct _mb86233_state
UINT32 gpr[16];
UINT32 extport[0x30];
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
@ -112,7 +112,7 @@ static CPU_INIT( mb86233 )
memset(cpustate, 0, sizeof( *cpustate ) );
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
if ( _config )
{
@ -1606,7 +1606,7 @@ static CPU_SET_INFO( mb86233 )
CPU_GET_INFO( mb86233 )
{
mb86233_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
mb86233_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -74,7 +74,7 @@ struct _mb88_state
/* IRQ handling */
UINT8 pending_interrupt;
device_irq_callback irqcallback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *data;
const address_space *io;
@ -144,9 +144,9 @@ static CPU_INIT( mb88 )
cpustate->irqcallback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->serial = timer_alloc(device->machine, serial_timer, (void *)device);
@ -209,7 +209,7 @@ static CPU_RESET( mb88 )
static TIMER_CALLBACK( serial_timer )
{
mb88_state *cpustate = get_safe_token((running_device *)ptr);
mb88_state *cpustate = get_safe_token((cpu_device *)ptr);
cpustate->SBcount++;
@ -926,7 +926,7 @@ static CPU_SET_INFO( mb88 )
CPU_GET_INFO( mb88 )
{
mb88_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
mb88_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -61,7 +61,7 @@ struct _hc11_state
device_irq_callback irq_callback;
UINT8 irq_state[2];
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -416,8 +416,8 @@ static CPU_INIT( hc11 )
cpustate->ram_position = 0x100;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
}
static CPU_RESET( hc11 )
@ -537,7 +537,7 @@ static CPU_SET_INFO( mc68hc11 )
CPU_GET_INFO( mc68hc11 )
{
hc11_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
hc11_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -150,7 +150,7 @@ struct _mcs48_state
UINT16 a11; /* A11 value, either 0x000 or 0x800 */
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
int icount;
/* Memory spaces */
@ -840,7 +840,7 @@ static const mcs48_ophandler opcode_table[256]=
mcs48_init - generic MCS-48 initialization
-------------------------------------------------*/
static void mcs48_init(running_device *device, device_irq_callback irqcallback, UINT8 feature_mask, UINT16 romsize)
static void mcs48_init(cpu_device *device, device_irq_callback irqcallback, UINT8 feature_mask, UINT16 romsize)
{
mcs48_state *cpustate = get_safe_token(device);
@ -857,9 +857,9 @@ static void mcs48_init(running_device *device, device_irq_callback irqcallback,
cpustate->int_rom_size = romsize;
cpustate->feature_mask = feature_mask;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
/* set up the state table */
{
@ -1190,7 +1190,7 @@ UINT8 upi41_master_r(running_device *device, UINT8 a0)
static TIMER_CALLBACK( master_callback )
{
running_device *device = (running_device *)ptr;
cpu_device *device = (cpu_device *)ptr;
mcs48_state *cpustate = get_safe_token(device);
UINT8 a0 = (param >> 8) & 1;
UINT8 data = param;
@ -1213,8 +1213,9 @@ static TIMER_CALLBACK( master_callback )
cpustate->sts |= STS_F1;
}
void upi41_master_w(running_device *device, UINT8 a0, UINT8 data)
void upi41_master_w(running_device *_device, UINT8 a0, UINT8 data)
{
cpu_device *device = downcast<cpu_device *>(_device);
timer_call_after_resynch(device->machine, (void *)device, (a0 << 8) | data, master_callback);
}
@ -1359,7 +1360,7 @@ static CPU_SET_INFO( mcs48 )
static CPU_GET_INFO( mcs48 )
{
mcs48_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
mcs48_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
@ -1418,7 +1419,7 @@ static CPU_GET_INFO( mcs48 )
CPU-SPECIFIC CONTEXT ACCESS
***************************************************************************/
static void mcs48_generic_get_info(const device_config *devconfig, running_device *device, UINT32 state, cpuinfo *info, UINT8 features, int romsize, int ramsize, const char *name)
static void mcs48_generic_get_info(const device_config *devconfig, cpu_device *device, UINT32 state, cpuinfo *info, UINT8 features, int romsize, int ramsize, const char *name)
{
switch (state)
{

View File

@ -282,7 +282,7 @@ struct _mcs51_state_t
/* Interrupt Callback */
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
/* Memory spaces */
const address_space *program;
@ -2079,9 +2079,9 @@ static CPU_INIT( mcs51 )
mcs51_state->irq_callback = irqcallback;
mcs51_state->device = device;
mcs51_state->program = device_memory(device)->space(AS_PROGRAM);
mcs51_state->data = device_memory(device)->space(AS_DATA);
mcs51_state->io = device_memory(device)->space(AS_IO);
mcs51_state->program = device->space(AS_PROGRAM);
mcs51_state->data = device->space(AS_DATA);
mcs51_state->io = device->space(AS_IO);
mcs51_state->features = FEATURE_NONE;
mcs51_state->ram_mask = 0x7F; /* 128 bytes of ram */
@ -2475,7 +2475,7 @@ static CPU_SET_INFO( mcs51 )
static CPU_GET_INFO( mcs51 )
{
mcs51_state_t *mcs51_state = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
mcs51_state_t *mcs51_state = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -84,7 +84,7 @@ typedef struct {
UINT8 halted;
UINT8 interrupt_pending;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
} minx_state;
@ -120,7 +120,7 @@ static CPU_INIT( minx )
minx_state *minx = get_safe_token(device);
minx->irq_callback = irqcallback;
minx->device = device;
minx->program = device_memory(device)->space(AS_PROGRAM);
minx->program = device->space(AS_PROGRAM);
if ( device->baseconfig().static_config() != NULL )
{
}
@ -312,7 +312,7 @@ static CPU_SET_INFO( minx )
CPU_GET_INFO( minx )
{
minx_state *minx = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
minx_state *minx = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch( state )
{
case CPUINFO_INT_CONTEXT_SIZE: info->i = sizeof(minx_state); break;

View File

@ -69,7 +69,7 @@ INLINE int tlb_entry_is_global(const mips3_tlb_entry *entry)
structure based on the configured type
-------------------------------------------------*/
void mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, running_device *device, device_irq_callback irqcallback)
void mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, cpu_device *device, device_irq_callback irqcallback)
{
const mips3_config *config = (const mips3_config *)device->baseconfig().static_config();
int tlbindex;
@ -81,7 +81,7 @@ void mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, runnin
mips->cpu_clock = device->clock();
mips->irq_callback = irqcallback;
mips->device = device;
mips->program = device_memory(device)->space(AS_PROGRAM);
mips->program = device->space(AS_PROGRAM);
mips->icache_size = config->icache;
mips->dcache_size = config->dcache;
mips->system_clock = config->system_clock;
@ -751,7 +751,7 @@ void mips3com_get_info(mips3_state *mips, UINT32 state, cpuinfo *info)
static TIMER_CALLBACK( compare_int_callback )
{
running_device *device = (running_device *)ptr;
cpu_device *device = (cpu_device *)ptr;
cpu_set_input_line(device, MIPS3_IRQ5, ASSERT_LINE);
}

View File

@ -195,7 +195,7 @@ struct _mips3_state
/* internal stuff */
mips3_flavor flavor;
device_irq_callback irq_callback;
running_device *device;
cpu_device * device;
const address_space *program;
UINT32 system_clock;
UINT32 cpu_clock;
@ -229,7 +229,7 @@ struct _mips3_state
FUNCTION PROTOTYPES
***************************************************************************/
void mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, running_device *device, device_irq_callback irqcallback);
void mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, cpu_device *device, device_irq_callback irqcallback);
void mips3com_exit(mips3_state *mips);
void mips3com_reset(mips3_state *mips);

View File

@ -359,7 +359,7 @@ INLINE void save_fast_iregs(mips3_state *mips3, drcuml_block *block)
mips3_init - initialize the processor
-------------------------------------------------*/
static void mips3_init(mips3_flavor flavor, int bigendian, running_device *device, device_irq_callback irqcallback)
static void mips3_init(mips3_flavor flavor, int bigendian, cpu_device *device, device_irq_callback irqcallback)
{
drcfe_config feconfig =
{
@ -380,7 +380,7 @@ static void mips3_init(mips3_flavor flavor, int bigendian, running_device *devic
fatalerror("Unable to allocate cache of size %d", (UINT32)(CACHE_SIZE + sizeof(*mips3)));
/* allocate the core memory */
*(mips3_state **)downcast<cpu_device *>(device)->token() = mips3 = (mips3_state *)drccache_memory_alloc_near(cache, sizeof(*mips3));
*(mips3_state **)device->token() = mips3 = (mips3_state *)drccache_memory_alloc_near(cache, sizeof(*mips3));
memset(mips3, 0, sizeof(*mips3));
/* initialize the core */
@ -601,7 +601,7 @@ static CPU_SET_INFO( mips3 )
static CPU_GET_INFO( mips3 )
{
mips3_state *mips3 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
mips3_state *mips3 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -185,7 +185,7 @@ struct _psxcpu_state
UINT32 multiplier_operand1;
UINT32 multiplier_operand2;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
int bus_attached;
UINT32 bad_byte_address_mask;
@ -1605,7 +1605,7 @@ static STATE_POSTLOAD( mips_postload )
mips_update_scratchpad( psxcpu->program );
}
static void mips_state_register( const char *type, running_device *device )
static void mips_state_register( const char *type, cpu_device *device )
{
psxcpu_state *psxcpu = get_safe_token(device);
@ -1636,7 +1636,7 @@ static CPU_INIT( psxcpu )
psxcpu->irq_callback = irqcallback;
psxcpu->device = device;
psxcpu->program = device_memory(device)->space(AS_PROGRAM);
psxcpu->program = device->space(AS_PROGRAM);
mips_state_register( "psxcpu", device );
}
@ -6110,7 +6110,7 @@ static CPU_SET_INFO( psxcpu )
CPU_GET_INFO( psxcpu )
{
psxcpu_state *psxcpu = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
psxcpu_state *psxcpu = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -138,7 +138,7 @@ struct _r3000_state
int interrupt_cycles;
int hasfpu;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
/* endian-dependent load/store */
@ -312,7 +312,7 @@ static CPU_INIT( r3000 )
r3000->irq_callback = irqcallback;
r3000->device = device;
r3000->program = device_memory(device)->space(AS_PROGRAM);
r3000->program = device->space(AS_PROGRAM);
}
@ -1163,7 +1163,7 @@ static CPU_SET_INFO( r3000 )
static CPU_GET_INFO( r3000 )
{
r3000_state *r3000 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
r3000_state *r3000 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -64,7 +64,7 @@ struct _mn102_info
int cycles;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
};
@ -276,8 +276,8 @@ static CPU_INIT(mn10200)
memset(cpustate, 0, sizeof(mn102_info));
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
state_save_register_device_item(device, 0, cpustate->pc);
state_save_register_device_item_array(device, 0, cpustate->d);
@ -2335,7 +2335,7 @@ static UINT32 mn10200_r(mn102_info *mn102, UINT32 adr, int type)
static CPU_SET_INFO(mn10200)
{
mn102_info *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
mn102_info *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
@ -2364,7 +2364,7 @@ static CPU_SET_INFO(mn10200)
CPU_GET_INFO( mn10200 )
{
mn102_info *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
mn102_info *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -161,7 +161,7 @@ struct _nec_state_t
UINT8 no_interrupt;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -1100,7 +1100,7 @@ static CPU_DISASSEMBLE( nec )
return necv_dasm_one(buffer, pc, oprom, nec_state->config);
}
static void nec_init(running_device *device, device_irq_callback irqcallback, int type)
static void nec_init(cpu_device *device, device_irq_callback irqcallback, int type)
{
const nec_config *config = device->baseconfig().static_config() ? (const nec_config *)device->baseconfig().static_config() : &default_config;
nec_state_t *nec_state = get_safe_token(device);
@ -1130,8 +1130,8 @@ static void nec_init(running_device *device, device_irq_callback irqcallback, in
nec_state->irq_callback = irqcallback;
nec_state->device = device;
nec_state->program = device_memory(device)->space(AS_PROGRAM);
nec_state->io = device_memory(device)->space(AS_IO);
nec_state->program = device->space(AS_PROGRAM);
nec_state->io = device->space(AS_IO);
}
@ -1320,7 +1320,7 @@ static CPU_SET_INFO( nec )
static CPU_GET_INFO( nec )
{
nec_state_t *nec_state = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
nec_state_t *nec_state = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
int flags;
switch (state)

View File

@ -417,7 +417,7 @@ struct _pdp1_state
/* 1 for 16-line sequence break system, 0 for default break system */
int type_20_sbs;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
};
@ -545,7 +545,7 @@ static CPU_INIT( pdp1 )
/* clean-up */
memset (cpustate, 0, sizeof (*cpustate));
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
/* set up params and callbacks */
for (i=0; i<64; i++)
@ -936,7 +936,7 @@ static CPU_SET_INFO( pdp1 )
CPU_GET_INFO( pdp1 )
{
pdp1_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
pdp1_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -64,7 +64,7 @@ struct _tx0_state
int icount;
running_device *device;
cpu_device *device;
const address_space *program;
};
@ -126,7 +126,7 @@ static void tx0_write(tx0_state *cpustate, offs_t address, int data)
;
}
static void tx0_init_common(running_device *device, device_irq_callback irqcallback, int is_64kw)
static void tx0_init_common(cpu_device *device, device_irq_callback irqcallback, int is_64kw)
{
tx0_state *cpustate = get_safe_token(device);
@ -137,7 +137,7 @@ static void tx0_init_common(running_device *device, device_irq_callback irqcallb
cpustate->ir_mask = is_64kw ? 03 : 037;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
}
static CPU_INIT( tx0_64kw )
@ -434,7 +434,7 @@ static CPU_SET_INFO( tx0 )
CPU_GET_INFO( tx0_64kw )
{
tx0_state *cpustate = ( device != NULL && downcast<cpu_device *>(device)->token() != NULL ) ? get_safe_token(device) : NULL;
tx0_state *cpustate = ( device != NULL && device->token() != NULL ) ? get_safe_token(device) : NULL;
switch (state)
{
@ -560,7 +560,7 @@ CPU_GET_INFO( tx0_64kw )
CPU_GET_INFO( tx0_8kw )
{
tx0_state *cpustate = ( device != NULL && downcast<cpu_device *>(device)->token() != NULL ) ? get_safe_token(device) : NULL;
tx0_state *cpustate = ( device != NULL && device->token() != NULL ) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -97,7 +97,7 @@ struct _pic16c5x_state
int inst_cycles;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *data;
const address_space *io;
@ -729,9 +729,9 @@ static CPU_INIT( pic16c5x )
pic16c5x_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
/* ensure the internal ram pointers are set before get_info is called */
update_internalram_ptr(cpustate);
@ -996,7 +996,7 @@ static CPU_SET_INFO( pic16c5x )
static CPU_GET_INFO( pic16c5x )
{
pic16c5x_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
pic16c5x_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -87,7 +87,7 @@ struct _pic16c62x_state
int inst_cycles;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *data;
const address_space *io;
@ -837,9 +837,9 @@ static CPU_INIT( pic16c62x )
pic16c62x_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->CONFIG = 0x3fff;
@ -1114,7 +1114,7 @@ static CPU_SET_INFO( pic16c62x )
static CPU_GET_INFO( pic16c62x )
{
pic16c62x_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
pic16c62x_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -306,7 +306,7 @@ typedef struct {
UINT64 tb; /* 56-bit timebase register */
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
// STUFF added for the 6xx series
@ -963,7 +963,7 @@ static CPU_INIT( ppc403 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device_memory(device)->space(AS_PROGRAM);
ppc.program = device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
}
@ -1088,7 +1088,7 @@ static CPU_INIT( ppc603 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device_memory(device)->space(AS_PROGRAM);
ppc.program = device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
@ -1236,7 +1236,7 @@ static CPU_INIT( ppc602 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device_memory(device)->space(AS_PROGRAM);
ppc.program = device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
@ -1377,7 +1377,7 @@ static CPU_INIT( mpc8240 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device_memory(device)->space(AS_PROGRAM);
ppc.program = device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
@ -1503,7 +1503,7 @@ static CPU_INIT( ppc601 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device_memory(device)->space(AS_PROGRAM);
ppc.program = device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
@ -1633,7 +1633,7 @@ static CPU_INIT( ppc604 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device_memory(device)->space(AS_PROGRAM);
ppc.program = device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;

View File

@ -286,7 +286,7 @@ INLINE int sign_double(double x)
structure based on the configured type
-------------------------------------------------*/
void ppccom_init(powerpc_state *ppc, powerpc_flavor flavor, UINT8 cap, int tb_divisor, running_device *device, device_irq_callback irqcallback)
void ppccom_init(powerpc_state *ppc, powerpc_flavor flavor, UINT8 cap, int tb_divisor, cpu_device *device, device_irq_callback irqcallback)
{
const powerpc_config *config = (const powerpc_config *)device->baseconfig().static_config();
@ -299,11 +299,11 @@ void ppccom_init(powerpc_state *ppc, powerpc_flavor flavor, UINT8 cap, int tb_di
ppc->cpu_clock = device->clock();
ppc->irq_callback = irqcallback;
ppc->device = device;
ppc->program = device_memory(device)->space(AS_PROGRAM);
ppc->program = device->space(AS_PROGRAM);
ppc->system_clock = (config != NULL) ? config->bus_frequency : device->clock();
ppc->tb_divisor = (ppc->tb_divisor * device->clock() + ppc->system_clock / 2 - 1) / ppc->system_clock;
ppc->codexor = 0;
if (!(cap & PPCCAP_4XX) && device_memory(device)->space_config()->m_endianness != ENDIANNESS_NATIVE)
if (!(cap & PPCCAP_4XX) && device->space_config()->m_endianness != ENDIANNESS_NATIVE)
ppc->codexor = 4;
/* allocate the virtual TLB */

View File

@ -551,7 +551,7 @@ struct _powerpc_state
/* internal stuff */
device_irq_callback irq_callback;
running_device *device;
cpu_device * device;
const address_space *program;
offs_t codexor;
UINT32 irq_pending;
@ -571,7 +571,7 @@ struct _powerpc_state
FUNCTION PROTOTYPES
***************************************************************************/
void ppccom_init(powerpc_state *ppc, powerpc_flavor flavor, UINT8 cap, int tb_divisor, running_device *device, device_irq_callback irqcallback);
void ppccom_init(powerpc_state *ppc, powerpc_flavor flavor, UINT8 cap, int tb_divisor, cpu_device *device, device_irq_callback irqcallback);
void ppccom_exit(powerpc_state *ppc);
void ppccom_reset(powerpc_state *ppc);

View File

@ -547,7 +547,7 @@ INLINE UINT32 compute_spr(UINT32 spr)
ppcdrc_init - initialize the processor
-------------------------------------------------*/
static void ppcdrc_init(powerpc_flavor flavor, UINT8 cap, int tb_divisor, running_device *device, device_irq_callback irqcallback)
static void ppcdrc_init(powerpc_flavor flavor, UINT8 cap, int tb_divisor, cpu_device *device, device_irq_callback irqcallback)
{
drcfe_config feconfig =
{
@ -568,7 +568,7 @@ static void ppcdrc_init(powerpc_flavor flavor, UINT8 cap, int tb_divisor, runnin
fatalerror("Unable to allocate cache of size %d", (UINT32)(CACHE_SIZE + sizeof(*ppc)));
/* allocate the core from the near cache */
*(powerpc_state **)downcast<cpu_device *>(device)->token() = ppc = (powerpc_state *)drccache_memory_alloc_near(cache, sizeof(*ppc));
*(powerpc_state **)device->token() = ppc = (powerpc_state *)drccache_memory_alloc_near(cache, sizeof(*ppc));
memset(ppc, 0, sizeof(*ppc));
/* initialize the core */
@ -793,7 +793,7 @@ static CPU_SET_INFO( ppcdrc )
static CPU_GET_INFO( ppcdrc )
{
powerpc_state *ppc = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
powerpc_state *ppc = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */
@ -1478,7 +1478,7 @@ static void static_generate_memory_accessor(powerpc_state *ppc, int mode, int si
/* on exit, read result is in I0 */
/* routine trashes I0-I3 */
drcuml_state *drcuml = ppc->impstate->drcuml;
int fastxor = BYTE8_XOR_BE(0) >> (int)(device_memory(ppc->device)->space_config(AS_PROGRAM)->m_databus_width < 64);
int fastxor = BYTE8_XOR_BE(0) >> (int)(ppc->device->space_config(AS_PROGRAM)->m_databus_width < 64);
drcuml_block *block;
jmp_buf errorbuf;
int translate_type;
@ -4290,7 +4290,7 @@ static void log_opcode_desc(drcuml_state *drcuml, const opcode_desc *desclist, i
static CPU_GET_INFO( ppcdrc4xx )
{
powerpc_state *ppc = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
powerpc_state *ppc = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
CPU_GET_INFO_CALL(ppcdrc);
ppc4xx_get_info(ppc, state, info);
}

View File

@ -308,7 +308,7 @@ static CPU_INIT( rsp )
rsp->irq_callback = irqcallback;
rsp->device = device;
rsp->program = device_memory(device)->space(AS_PROGRAM);
rsp->program = device->space(AS_PROGRAM);
#if 1
// Inaccurate. RSP registers power on to a random state...
@ -2865,7 +2865,7 @@ static CPU_SET_INFO( rsp )
CPU_GET_INFO( rsp )
{
rsp_state *rsp = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
rsp_state *rsp = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -209,7 +209,7 @@ struct _rsp_state
UINT32 nextpc;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;

View File

@ -684,7 +684,7 @@ static const int vector_elements_2[16][8] =
{ 7, 7, 7, 7, 7, 7, 7, 7 }, // 7
};
static void rspcom_init(rsp_state *rsp, running_device *device, device_irq_callback irqcallback)
static void rspcom_init(rsp_state *rsp, cpu_device *device, device_irq_callback irqcallback)
{
int regIdx = 0;
int accumIdx;
@ -694,7 +694,7 @@ static void rspcom_init(rsp_state *rsp, running_device *device, device_irq_callb
rsp->config = (const rsp_config *)device->baseconfig().static_config();
rsp->irq_callback = irqcallback;
rsp->device = device;
rsp->program = device_memory(device)->space(AS_PROGRAM);
rsp->program = device->space(AS_PROGRAM);
#if 1
// Inaccurate. RSP registers power on to a random state...
@ -747,7 +747,7 @@ static CPU_INIT( rsp )
}
/* allocate the core memory */
*(rsp_state **)downcast<cpu_device *>(device)->token() = rsp = (rsp_state *)drccache_memory_alloc_near(cache, sizeof(*rsp));
*(rsp_state **)device->token() = rsp = (rsp_state *)drccache_memory_alloc_near(cache, sizeof(*rsp));
memset(rsp, 0, sizeof(*rsp));
rspcom_init(rsp, device, irqcallback);
@ -8594,7 +8594,7 @@ static CPU_SET_INFO( rsp )
CPU_GET_INFO( rsp )
{
rsp_state *rsp = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
rsp_state *rsp = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -42,7 +42,7 @@ struct _s2650_regs {
int icount;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
};
@ -796,8 +796,8 @@ static CPU_INIT( s2650 )
s2650c->irq_callback = irqcallback;
s2650c->device = device;
s2650c->program = device_memory(device)->space(AS_PROGRAM);
s2650c->io = device_memory(device)->space(AS_IO);
s2650c->program = device->space(AS_PROGRAM);
s2650c->io = device->space(AS_IO);
state_save_register_device_item(device, 0, s2650c->ppc);
state_save_register_device_item(device, 0, s2650c->page);
@ -828,8 +828,8 @@ static CPU_RESET( s2650 )
memset(s2650c->ras, 0, sizeof(s2650c->ras));
s2650c->device = device;
s2650c->program = device_memory(device)->space(AS_PROGRAM);
s2650c->io = device_memory(device)->space(AS_IO);
s2650c->program = device->space(AS_PROGRAM);
s2650c->io = device->space(AS_IO);
s2650c->psl = COM | WC;
/* force write */
s2650c->psu = 0xff;
@ -1545,7 +1545,7 @@ static CPU_SET_INFO( s2650 )
CPU_GET_INFO( s2650 )
{
s2650_regs *s2650c = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
s2650_regs *s2650c = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -82,7 +82,7 @@ struct _saturn_state
int monitor_id;
int monitor_in;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
};
@ -115,7 +115,7 @@ static CPU_INIT( saturn )
cpustate->config = (saturn_cpu_core *) device->baseconfig().static_config();
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
state_save_register_device_item_array(device, 0,cpustate->reg[R0]);
state_save_register_device_item_array(device, 0,cpustate->reg[R1]);
@ -304,7 +304,7 @@ static INT64 Reg64Int(Saturn64 r)
CPU_GET_INFO( saturn )
{
saturn_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
saturn_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -55,7 +55,7 @@ struct _sc61860_state
struct { int t2ms, t512ms; int count;} timer;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
};
@ -106,7 +106,7 @@ static CPU_INIT( sc61860 )
cpustate->config = (sc61860_cpu_core *) device->baseconfig().static_config();
timer_pulse(device->machine, ATTOTIME_IN_HZ(500), cpustate, 0, sc61860_2ms_tick);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
}
static CPU_EXECUTE( sc61860 )
@ -173,7 +173,7 @@ static CPU_SET_INFO( sc61860 )
CPU_GET_INFO( sc61860 )
{
sc61860_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
sc61860_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -32,7 +32,7 @@ struct _scmp_state
UINT8 ER;
UINT8 SR;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -518,7 +518,7 @@ static CPU_INIT( scmp )
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
/* resolve callbacks */
devcb_resolve_write8(&cpustate->flag_out_func, &cpustate->config.flag_out_func, device);
@ -603,7 +603,7 @@ static CPU_SET_INFO( scmp )
CPU_GET_INFO( scmp )
{
scmp_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
scmp_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -23,7 +23,7 @@ struct _se3208_state_t
UINT32 PPC;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
UINT8 IRQ;
UINT8 NMI;
@ -1718,7 +1718,7 @@ static CPU_RESET( se3208 )
memset(se3208_state,0,sizeof(se3208_state_t));
se3208_state->irq_callback = save_irqcallback;
se3208_state->device = device;
se3208_state->program = device_memory(device)->space(AS_PROGRAM);
se3208_state->program = device->space(AS_PROGRAM);
se3208_state->PC=SE3208_Read32(se3208_state, 0);
se3208_state->SR=0;
se3208_state->IRQ=CLEAR_LINE;
@ -1791,7 +1791,7 @@ static CPU_INIT( se3208 )
se3208_state->irq_callback = irqcallback;
se3208_state->device = device;
se3208_state->program = device_memory(device)->space(AS_PROGRAM);
se3208_state->program = device->space(AS_PROGRAM);
}
static CPU_EXIT( se3208 )
@ -1842,7 +1842,7 @@ static CPU_SET_INFO( se3208 )
CPU_GET_INFO( se3208 )
{
se3208_state_t *se3208_state = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
se3208_state_t *se3208_state = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -699,7 +699,7 @@ void sh2_exception(SH2 *sh2, const char *message, int irqline)
#endif
}
void sh2_common_init(SH2 *sh2, running_device *device, device_irq_callback irqcallback)
void sh2_common_init(SH2 *sh2, cpu_device *device, device_irq_callback irqcallback)
{
const sh2_cpu_core *conf = (const sh2_cpu_core *)device->baseconfig().static_config();
@ -727,8 +727,8 @@ void sh2_common_init(SH2 *sh2, running_device *device, device_irq_callback irqca
}
sh2->irq_callback = irqcallback;
sh2->device = device;
sh2->program = device_memory(device)->space(AS_PROGRAM);
sh2->internal = device_memory(device)->space(AS_PROGRAM);
sh2->program = device->space(AS_PROGRAM);
sh2->internal = device->space(AS_PROGRAM);
state_save_register_device_item(device, 0, sh2->pc);
state_save_register_device_item(device, 0, sh2->r[15]);

View File

@ -115,7 +115,7 @@ typedef struct
INT8 irq_line_state[17];
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *internal;
UINT32 *m;
@ -172,7 +172,7 @@ typedef struct
#endif
} SH2;
void sh2_common_init(SH2 *sh2, running_device *device, device_irq_callback irqcallback);
void sh2_common_init(SH2 *sh2, cpu_device *device, device_irq_callback irqcallback);
void sh2_recalc_irq(SH2 *sh2);
void sh2_set_irq_line(SH2 *sh2, int irqline, int state);
void sh2_exception(SH2 *sh2, const char *message, int irqline);

View File

@ -693,7 +693,7 @@ static CPU_INIT( sh2 )
fatalerror("Unable to allocate cache of size %d", (UINT32)(CACHE_SIZE + sizeof(SH2)));
/* allocate the core memory */
*(SH2 **)downcast<cpu_device *>(device)->token() = sh2 = (SH2 *)drccache_memory_alloc_near(cache, sizeof(SH2));
*(SH2 **)device->token() = sh2 = (SH2 *)drccache_memory_alloc_near(cache, sizeof(SH2));
memset(sh2, 0, sizeof(SH2));
/* initialize the common core parts */
@ -3262,7 +3262,7 @@ static CPU_SET_INFO( sh2 )
CPU_GET_INFO( sh2 )
{
SH2 *sh2 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
SH2 *sh2 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{
/* --- the following bits of info are returned as 64-bit signed integers --- */

View File

@ -3281,9 +3281,9 @@ static CPU_RESET( sh4 )
sh4->ftcsr_read_callback = f;
sh4->irq_callback = save_irqcallback;
sh4->device = device;
sh4->internal = device_memory(device)->space(AS_PROGRAM);
sh4->program = device_memory(device)->space(AS_PROGRAM);
sh4->io = device_memory(device)->space(AS_IO);
sh4->internal = device->space(AS_PROGRAM);
sh4->program = device->space(AS_PROGRAM);
sh4->io = device->space(AS_IO);
sh4->dma_timer[0] = tsaved[0];
sh4->dma_timer[1] = tsaved[1];
@ -3392,9 +3392,9 @@ static CPU_INIT( sh4 )
sh4->irq_callback = irqcallback;
sh4->device = device;
sh4->internal = device_memory(device)->space(AS_PROGRAM);
sh4->program = device_memory(device)->space(AS_PROGRAM);
sh4->io = device_memory(device)->space(AS_IO);
sh4->internal = device->space(AS_PROGRAM);
sh4->program = device->space(AS_PROGRAM);
sh4->io = device->space(AS_IO);
sh4_default_exception_priorities(sh4);
sh4->irln = 15;
sh4->test_irq = 0;
@ -3674,7 +3674,7 @@ ADDRESS_MAP_END
CPU_GET_INFO( sh4 )
{
SH4 *sh4 = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
SH4 *sh4 = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -62,7 +62,7 @@ typedef struct
INT8 irq_line_state[17];
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *internal;
const address_space *program;
const address_space *io;

View File

@ -125,7 +125,7 @@ struct _SHARC_REGS
UINT16 *internal_ram_block0, *internal_ram_block1;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *data;
void (*opcode_handler)(SHARC_REGS *cpustate);
@ -426,8 +426,8 @@ static CPU_INIT( sharc )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->data = device_memory(device)->space(AS_DATA);
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
build_opcode_table();
@ -1058,7 +1058,7 @@ ADDRESS_MAP_END
static CPU_GET_INFO( sharc )
{
SHARC_REGS *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
SHARC_REGS *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -51,7 +51,7 @@ struct _sm8500_state
int halted;
int icount;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
UINT8 internal_ram[0x500];
};
@ -99,7 +99,7 @@ static CPU_INIT( sm8500 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
if ( device->baseconfig().static_config() != NULL ) {
cpustate->config.handle_dma = ((SM8500_CONFIG *)device->baseconfig().static_config())->handle_dma;
cpustate->config.handle_timers = ((SM8500_CONFIG *)device->baseconfig().static_config())->handle_timers;
@ -444,7 +444,7 @@ static CPU_SET_INFO( sm8500 )
CPU_GET_INFO( sm8500 )
{
sm8500_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
sm8500_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -87,7 +87,7 @@ typedef struct
uint line_rst; /* Status of the RESET line */
uint ir; /* Instruction Register */
device_irq_callback int_ack;
running_device *device;
cpu_device *device;
const address_space *program;
uint stopped; /* stopped status */
int ICount;
@ -1246,7 +1246,7 @@ INLINE void SET_FLAG_I(spc700i_cpu *cpustate, uint value)
/* ================================= API ================================== */
/* ======================================================================== */
static void state_register( running_device *device )
static void state_register( cpu_device *device )
{
spc700i_cpu *cpustate = get_safe_token(device);
@ -1287,7 +1287,7 @@ static CPU_INIT( spc700 )
INT_ACK = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
}
@ -1657,7 +1657,7 @@ static CPU_SET_INFO( spc700 )
CPU_GET_INFO( spc700 )
{
spc700i_cpu *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
spc700i_cpu *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
uint p = 0;
if (cpustate != NULL)

View File

@ -21,7 +21,7 @@ struct _ssem_state
UINT32 a;
UINT32 halt;
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
};
@ -151,7 +151,7 @@ static CPU_INIT( ssem )
cpustate->halt = 0;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
}
static CPU_EXIT( ssem )
@ -255,7 +255,7 @@ static CPU_SET_INFO( ssem )
CPU_GET_INFO( ssem )
{
ssem_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
ssem_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -52,7 +52,7 @@ struct _ssp1601_state_t
int g_cycles;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
};
@ -529,8 +529,8 @@ static CPU_INIT( ssp1601 )
memset(ssp1601_state, 0, sizeof(ssp1601_state_t));
ssp1601_state->gr[0].w.h = 0xffff; // constant reg
ssp1601_state->device = device;
ssp1601_state->program = device_memory(device)->space(AS_PROGRAM);
ssp1601_state->io = device_memory(device)->space(AS_IO);
ssp1601_state->program = device->space(AS_PROGRAM);
ssp1601_state->io = device->space(AS_IO);
}
@ -808,7 +808,7 @@ static CPU_SET_INFO( ssp1601 )
CPU_GET_INFO( ssp1601 )
{
ssp1601_state_t *ssp1601_state = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
ssp1601_state_t *ssp1601_state = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -61,7 +61,7 @@ struct _superfx_state
cache_t cache;
pixelcache_t pixelcache[2];
running_device *device;
cpu_device *device;
const address_space *program;
int icount;
};
@ -669,7 +669,7 @@ void superfx_add_clocks(running_device *cpu, INT32 clocks)
/*****************************************************************************/
static void superfx_register_save( running_device *device )
static void superfx_register_save( cpu_device *device )
{
superfx_state *cpustate = get_safe_token(device);
int i;
@ -753,7 +753,7 @@ static CPU_INIT( superfx )
superfx_update_speed(cpustate);
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
if (device->baseconfig().static_config() != NULL)
{
@ -1556,7 +1556,7 @@ static CPU_SET_INFO( superfx )
CPU_GET_INFO( superfx )
{
superfx_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
superfx_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch(state)
{

View File

@ -33,7 +33,7 @@ struct _t11_state
UINT8 irq_state;
int icount;
device_irq_callback irq_callback;
running_device *device;
cpu_device * device;
const address_space *program;
};
@ -264,7 +264,7 @@ static CPU_INIT( t11 )
cpustate->initial_pc = initial_pc[setup->mode >> 13];
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->program = device->space(AS_PROGRAM);
state_save_register_device_item(device, 0, cpustate->ppc.w.l);
state_save_register_device_item(device, 0, cpustate->reg[0].w.l);
@ -412,7 +412,7 @@ static CPU_SET_INFO( t11 )
CPU_GET_INFO( t11 )
{
t11_state *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
t11_state *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

View File

@ -31,7 +31,7 @@ typedef struct
UINT8 halt, after_EI;
UINT16 irq_state, irq_mask;
device_irq_callback irq_callback;
running_device *device;
cpu_device *device;
const address_space *program;
const address_space *io;
int icount;
@ -2635,7 +2635,7 @@ static WRITE8_HANDLER( t90_internal_registers_w )
cpustate->internal_registers[offset] = data;
}
static void state_register( running_device *device )
static void state_register( cpu_device *device )
{
t90_Regs *cpustate = get_safe_token(device);
@ -2715,8 +2715,8 @@ static CPU_INIT( t90 )
memset(cpustate, 0, sizeof(t90_Regs));
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device_memory(device)->space(AS_PROGRAM);
cpustate->io = device_memory(device)->space(AS_IO);
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->timer_period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(device)), 8);
@ -2790,7 +2790,7 @@ static CPU_SET_INFO( t90 )
CPU_GET_INFO( tmp90840 )
{
t90_Regs *cpustate = (device != NULL && downcast<cpu_device *>(device)->token() != NULL) ? get_safe_token(device) : NULL;
t90_Regs *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
switch (state)
{

Some files were not shown because too many files have changed in this diff Show More