Since nobody checks for NULLs anyway, make

device_memory_interface::space() assert against NULL and
return a reference, and pushed references throughout all 
address space usage in the system. Added a has_space() 
method to check for those rare case when it is ambiguous.
[Aaron Giles]

Also reinstated the generic space and added fatal error
handlers if anyone tries to actually read/write from it.
This commit is contained in:
Aaron Giles 2012-09-19 19:48:09 +00:00
parent 33c77e65bb
commit 621ac620ae
848 changed files with 4372 additions and 4320 deletions

View File

@ -445,10 +445,10 @@ UINT16 adsp2181_device::idma_data_r()
void adsp21xx_device::device_start()
{
// get our address spaces
m_program = space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
m_data = space(AS_DATA);
m_io = space(AS_IO);
m_data = &space(AS_DATA);
m_io = has_space(AS_IO) ? &space(AS_IO) : NULL;
// "core"
save_item(NAME(m_core.ax0.u));

View File

@ -668,7 +668,7 @@ static CPU_INIT( alpha8201 )
alpha8201_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
device->save_item(NAME(cpustate->RAM));

View File

@ -154,11 +154,11 @@ static CPU_INIT( am29000 )
{
am29000_state *am29000 = get_safe_token(device);
am29000->program = device->space(AS_PROGRAM);
am29000->program = &device->space(AS_PROGRAM);
am29000->direct = &am29000->program->direct();
am29000->data = device->space(AS_DATA);
am29000->data = &device->space(AS_DATA);
am29000->datadirect = &am29000->data->direct();
am29000->io = device->space(AS_IO);
am29000->io = &device->space(AS_IO);
am29000->cfg = (PRL_AM29000 | PRL_REV_D) << CFG_PRL_SHIFT;
/* Register state for saving */

View File

@ -800,8 +800,8 @@ static CPU_INIT( apexc )
apexc_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
device->save_item(NAME(cpustate->a));
device->save_item(NAME(cpustate->r));

View File

@ -345,7 +345,7 @@ static CPU_RESET( arm )
cpustate->irq_callback = save_irqcallback;
cpustate->endian = save_endian;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
/* start up in SVC mode with interrupts disabled. */
@ -528,7 +528,7 @@ static CPU_INIT( arm )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->endian = ENDIANNESS_LITTLE;
device->save_item(NAME(cpustate->sArmRegister));
@ -544,7 +544,7 @@ static CPU_INIT( arm_be )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->endian = ENDIANNESS_BIG;
device->save_item(NAME(cpustate->sArmRegister));

View File

@ -427,7 +427,7 @@ static CPU_INIT( arm7 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
// setup co-proc callbacks

View File

@ -140,7 +140,7 @@ static void arm7_core_reset(legacy_cpu_device *device)
memset(cpustate, 0, sizeof(arm_state));
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->endian = ENDIANNESS_LITTLE;
cpustate->direct = &cpustate->program->direct();

View File

@ -211,7 +211,7 @@ asap_device::asap_device(const machine_config &mconfig, const char *tag, device_
void asap_device::device_start()
{
// get our address spaces
m_program = space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
// register our state for the debugger

View File

@ -188,8 +188,8 @@ static CPU_INIT( avr8 )
cpustate->pc = 0;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
WRITE_IO_8(cpustate, AVR8_IO_SREG, 0);

View File

@ -130,10 +130,10 @@ 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->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
device->save_item(NAME(cpustate->PC));
device->save_item(NAME(cpustate->A));

View File

@ -872,10 +872,10 @@ static void cop400_init(legacy_cpu_device *device, UINT8 g_mask, UINT8 d_mask, U
/* find address spaces */
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
/* set output pin masks */

View File

@ -231,9 +231,9 @@ void cosmac_device::device_config_complete()
void cosmac_device::device_start()
{
// get our address spaces
m_program = space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
m_io = space(AS_IO);
m_io = &space(AS_IO);
// register our state for the debugger
state_add(STATE_GENPC, "GENPC", m_pc).callimport().callexport().noshow();

View File

@ -3388,7 +3388,7 @@ static CPU_INIT( cp1610 )
cpustate->intrm_pending = 0;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
device->save_item(NAME(cpustate->r));
device->save_item(NAME(cpustate->flags));

View File

@ -282,7 +282,7 @@ static CPU_INIT( cquestsnd )
cpustate->sound_data = (UINT16*)device->machine().root_device().memregion(_config->sound_data_region)->base();
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
/* Allocate RAM shared with 68000 */
@ -350,7 +350,7 @@ static CPU_INIT( cquestrot )
cpustate->device = device;
cpustate->lindevice = device->machine().device<legacy_cpu_device>(rotconfig->lin_cpu_tag);
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cquestrot_state_register(device);
@ -429,7 +429,7 @@ static CPU_INIT( cquestlin )
cpustate->device = device;
cpustate->rotdevice = device->machine().device<legacy_cpu_device>(linconfig->rot_cpu_tag);
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cquestlin_state_register(device);

View File

@ -180,7 +180,7 @@ private:
// CPU parameters
cpu_device & m_cpudevice; // CPU device object
address_space * m_program; // program address space for this CPU
address_space & m_program; // program address space for this CPU
offs_t m_pageshift; // shift to convert address to a page index
// opcode descriptor arrays

View File

@ -121,11 +121,11 @@ drcbe_interface::drcbe_interface(drcuml_state &drcuml, drc_cache &cache, device_
device_memory_interface *memory;
if (device.interface(memory))
for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_space); spacenum++)
{
m_space[spacenum] = memory->space(spacenum);
if (m_space[spacenum] != NULL)
if (memory->has_space(spacenum))
{
m_space[spacenum] = &memory->space(spacenum);
m_space[spacenum]->accessors(m_accessors[spacenum]);
}
}
}

View File

@ -42,7 +42,7 @@ dsp16_device::dsp16_device(const machine_config &mconfig, const char *tag, devic
void dsp16_device::device_start()
{
// get our address spaces
m_program = space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
save_item(NAME(m_pc));

View File

@ -231,7 +231,7 @@ void dsp32c_device::static_set_config(device_t &device, const dsp32_config &conf
void dsp32c_device::device_start()
{
// get our address spaces
m_program = space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
// register our state for the debugger

View File

@ -232,9 +232,9 @@ static CPU_INIT( dsp56k )
//cpustate->config = device->static_config();
//cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
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! */

View File

@ -1542,9 +1542,9 @@ static void hyperstone_init(legacy_cpu_device *device, device_irq_acknowledge_ca
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->timer = device->machine().scheduler().timer_alloc(FUNC(e132xs_timer_callback), (void *)device);
cpustate->clock_scale_mask = scale_mask;
}
@ -1650,9 +1650,9 @@ static CPU_RESET( hyperstone )
cpustate->irq_callback = save_irqcallback;
cpustate->opcodexor = save_opcodexor;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->timer = save_timer;
cpustate->tr_clocks_per_tick = 2;

View File

@ -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->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
/* Create the instruction decode lookup table */

View File

@ -1619,9 +1619,9 @@ static CPU_RESET( f8 )
memset(cpustate, 0, sizeof(f8_Regs));
cpustate->irq_callback = save_callback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->iospace = device->space(AS_IO);
cpustate->iospace = &device->space(AS_IO);
cpustate->w&=~I;
/* save PC0 to PC1 and reset PC0 */
@ -1967,9 +1967,9 @@ static CPU_INIT( f8 )
f8_Regs *cpustate = get_safe_token(device);
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->iospace = device->space(AS_IO);
cpustate->iospace = &device->space(AS_IO);
device->save_item(NAME(cpustate->pc0));
device->save_item(NAME(cpustate->pc1));

View File

@ -338,7 +338,7 @@ static CPU_INIT( g65816 )
g65816_set_irq_callback(cpustate, irqcallback);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->cpu_type = CPU_TYPE_G65816;
device->save_item(NAME(cpustate->a));

View File

@ -161,9 +161,9 @@ static CPU_INIT( h6280 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
}
static CPU_RESET( h6280 )
@ -178,9 +178,9 @@ static CPU_RESET( h6280 )
memset(cpustate, 0, sizeof(h6280_Regs));
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
/* set I and B flags */
P = _fI | _fB;

View File

@ -217,9 +217,9 @@ static CPU_INIT(h8)
h8->mode_8bit = 0;
h8->program = device->space(AS_PROGRAM);
h8->program = &device->space(AS_PROGRAM);
h8->direct = &h8->program->direct();
h8->io = device->space(AS_IO);
h8->io = &device->space(AS_IO);
device->save_item(NAME(h8->h8err));
device->save_item(NAME(h8->regs));

View File

@ -234,9 +234,9 @@ static CPU_INIT(h8bit)
h8->mode_8bit = 1;
h8->program = device->space(AS_PROGRAM);
h8->program = &device->space(AS_PROGRAM);
h8->direct = &h8->program->direct();
h8->io = device->space(AS_IO);
h8->io = &device->space(AS_IO);
h8->timer[0] = h8->device->machine().scheduler().timer_alloc(FUNC(h8_timer_0_cb), h8);
h8->timer[1] = h8->device->machine().scheduler().timer_alloc(FUNC(h8_timer_1_cb), h8);

View File

@ -316,8 +316,8 @@ static CPU_INIT( hcd62121 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
}

View File

@ -124,7 +124,7 @@ void hd61700_cpu_device::static_set_config(device_t &device, const hd61700_confi
void hd61700_cpu_device::device_start()
{
m_program = this->space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_sec_timer = timer_alloc(SEC_TIMER);
m_sec_timer->adjust(attotime::from_seconds(1), 0, attotime::from_seconds(1));

View File

@ -518,7 +518,7 @@ static CPU_INIT( hd6309 )
m68_state->irq_callback = irqcallback;
m68_state->device = device;
m68_state->program = device->space(AS_PROGRAM);
m68_state->program = &device->space(AS_PROGRAM);
m68_state->direct = &m68_state->program->direct();
/* setup regtable */

View File

@ -2882,9 +2882,9 @@ static CPU_INIT( i386 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
device->save_item(NAME( cpustate->reg.d));
device->save_item(NAME(cpustate->sreg[ES].selector));
@ -3006,9 +3006,9 @@ static CPU_RESET( i386 )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -3497,9 +3497,9 @@ static CPU_RESET( i486 )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -3604,9 +3604,9 @@ static CPU_RESET( pentium )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -3727,9 +3727,9 @@ static CPU_RESET( mediagx )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -3842,9 +3842,9 @@ static CPU_RESET( pentium_pro )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -3938,9 +3938,9 @@ static CPU_RESET( pentium_mmx )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -4034,9 +4034,9 @@ static CPU_RESET( pentium2 )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -4130,9 +4130,9 @@ static CPU_RESET( pentium3 )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;
@ -4226,9 +4226,9 @@ static CPU_RESET( pentium4 )
memset( cpustate, 0, sizeof(*cpustate) );
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sreg[CS].selector = 0xf000;
cpustate->sreg[CS].base = 0xffff0000;

View File

@ -462,10 +462,10 @@ static CPU_INIT( i4004 )
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
device->save_item(NAME(cpustate->PC));
device->save_item(NAME(cpustate->A));

View File

@ -51,9 +51,9 @@ i8008_device::i8008_device(const machine_config &mconfig, const char *tag, devic
void i8008_device::device_start()
{
// find address spaces
m_program = space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
m_io = space(AS_IO);
m_io = &space(AS_IO);
// save state
save_item(NAME(m_PC));

View File

@ -1006,9 +1006,9 @@ static void init_808x_common(legacy_cpu_device *device, device_irq_acknowledge_c
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
/* resolve callbacks */
cpustate->out_status_func.resolve(cpustate->config.out_status_func, *device);

View File

@ -310,8 +310,8 @@ static CPU_INIT( i80286 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
cpustate->direct = &cpustate->program->direct();
/* If a reset parameter is given, take it as pointer to an address mask */

View File

@ -165,9 +165,9 @@ static CPU_INIT( i8086 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
/* set up the state table */
{
@ -236,9 +236,9 @@ static CPU_RESET( i8086 )
memset(cpustate, 0, sizeof(*cpustate));
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
cpustate->sregs[CS] = 0xffff;
cpustate->base[CS] = SegBase(CS);

View File

@ -30,7 +30,7 @@ static CPU_INIT( i860 )
{
i860_state_t *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = 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);

View File

@ -2067,7 +2067,7 @@ static CPU_INIT( i960 )
i960->irq_cb = irqcallback;
i960->device = device;
i960->program = device->space(AS_PROGRAM);
i960->program = &device->space(AS_PROGRAM);
i960->direct = &i960->program->direct();
device->save_item(NAME(i960->PIP));

View File

@ -417,7 +417,7 @@ static void init_common(int isdsp, legacy_cpu_device *device, device_irq_acknowl
jaguar->irq_callback = irqcallback;
jaguar->device = device;
jaguar->program = device->space(AS_PROGRAM);
jaguar->program = &device->space(AS_PROGRAM);
jaguar->direct = &jaguar->program->direct();
if (configdata != NULL)
jaguar->cpu_interrupt = configdata->cpu_int_callback;

View File

@ -403,7 +403,7 @@ static CPU_INIT( konami )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
device->save_item(NAME(PC));

View File

@ -117,8 +117,8 @@ static CPU_INIT( lh5801 )
memset(cpustate, 0, sizeof(*cpustate));
cpustate->config = (const lh5801_cpu_core *) device->static_config();
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
cpustate->direct = &cpustate->program->direct();
}

View File

@ -117,7 +117,7 @@ inline void lr35902_cpu_device::mem_write_word( UINT16 addr, UINT16 data )
void lr35902_cpu_device::device_start()
{
m_device = this;
m_program = this->space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
save_item(NAME(m_A));
save_item(NAME(m_F));

View File

@ -978,8 +978,8 @@ static CPU_INIT( m37710 )
INT_ACK = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
cpustate->ICount = 0;

View File

@ -191,7 +191,7 @@ static CPU_INIT( m4510 )
cpustate->interrupt_inhibit = 0;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->space = device->space(AS_PROGRAM);
cpustate->space = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->space->direct();
if ( intf )

View File

@ -136,7 +136,7 @@ static void m6502_common_init(legacy_cpu_device *device, device_irq_acknowledge_
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->space = device->space(AS_PROGRAM);
cpustate->space = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->space->direct();
cpustate->subtype = subtype;
cpustate->insn = insn;
@ -548,7 +548,7 @@ static CPU_INIT( deco16 )
{
m6502_Regs *cpustate = get_safe_token(device);
m6502_common_init(device, irqcallback, SUBTYPE_DECO16, insndeco16, "deco16");
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
}

View File

@ -141,7 +141,7 @@ static CPU_INIT( m6509 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->space = device->space(AS_PROGRAM);
cpustate->space = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->space->direct();
if ( intf )

View File

@ -101,7 +101,7 @@ static CPU_INIT( m65ce02 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->space = device->space(AS_PROGRAM);
cpustate->space = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->space->direct();
if ( intf )

View File

@ -1046,10 +1046,10 @@ static CPU_INIT( m6800 )
{
m6800_state *cpustate = get_safe_token(device);
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
// cpustate->subtype = SUBTYPE_M6800;
cpustate->insn = m6800_insn;
@ -1199,10 +1199,10 @@ static CPU_INIT( m6801 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
cpustate->clock = device->clock() / 4;
cpustate->sci_timer = device->machine().scheduler().timer_alloc(FUNC(sci_tick), cpustate);
@ -1234,10 +1234,10 @@ static CPU_INIT( m6802 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
state_register(cpustate, "m6802");
}
@ -1254,10 +1254,10 @@ static CPU_INIT( m6803 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
cpustate->clock = device->clock() / 4;
cpustate->sci_timer = device->machine().scheduler().timer_alloc(FUNC(sci_tick), cpustate);
@ -1296,10 +1296,10 @@ static CPU_INIT( m6808 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
state_register(cpustate, "m6808");
}
@ -1317,10 +1317,10 @@ static CPU_INIT( hd6301 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
cpustate->clock = device->clock() / 4;
cpustate->sci_timer = device->machine().scheduler().timer_alloc(FUNC(sci_tick), cpustate);
@ -1342,10 +1342,10 @@ static CPU_INIT( hd63701 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
cpustate->clock = device->clock() / 4;
cpustate->sci_timer = device->machine().scheduler().timer_alloc(FUNC(sci_tick), cpustate);
@ -1377,10 +1377,10 @@ static CPU_INIT( nsc8105 )
// cpustate->subtype = SUBTYPE_NSC8105;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
cpustate->insn = nsc8105_insn;
cpustate->cycles = cycles_nsc8105;

View File

@ -898,7 +898,7 @@ static CPU_INIT( m68k )
m68ki_cpu_core *m68k = m68k_get_safe_token(device);
m68k->device = device;
m68k->program = device->space(AS_PROGRAM);
m68k->program = &device->space(AS_PROGRAM);
m68k->int_ack_callback = irqcallback;
/* disable all MMUs */
@ -2065,7 +2065,7 @@ static CPU_INIT( m68307 )
m68k->m68307SERIAL->reset();
m68k->m68307TIMER->reset();
m68k->internal = device->space(AS_PROGRAM);
m68k->internal = &device->space(AS_PROGRAM);
m68k->m68307_base = 0xbfff;
m68k->m68307_scrhigh = 0x0007;
m68k->m68307_scrlow = 0xf010;
@ -2862,7 +2862,7 @@ static CPU_INIT( m68340 )
m68k->m68340_base = 0x00000000;
m68k->internal = device->space(AS_PROGRAM);
m68k->internal = &device->space(AS_PROGRAM);
define_state(device);
}

View File

@ -479,7 +479,7 @@ static CPU_INIT( m6805 )
state_register(cpustate, "m6805", device);
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
}
@ -493,7 +493,7 @@ static CPU_RESET( m6805 )
cpustate->iCount=50000; /* Used to be global */
cpustate->irq_callback = save_irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
/* Force CPU sub-type and relevant masks */

View File

@ -377,7 +377,7 @@ static CPU_INIT( m6809 )
m68_state->irq_callback = irqcallback;
m68_state->device = device;
m68_state->program = device->space(AS_PROGRAM);
m68_state->program = &device->space(AS_PROGRAM);
m68_state->direct = &m68_state->program->direct();
/* setup regtable */

View File

@ -111,7 +111,7 @@ static CPU_INIT( mb86233 )
memset(cpustate, 0, sizeof( *cpustate ) );
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
if ( _config )

View File

@ -143,10 +143,10 @@ static CPU_INIT( mb88 )
cpustate->irqcallback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
cpustate->serial = device->machine().scheduler().timer_alloc(FUNC(serial_timer), (void *)device);

View File

@ -446,9 +446,9 @@ static CPU_INIT( hc11 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
device->save_item(NAME(cpustate->pc));
device->save_item(NAME(cpustate->ix));

View File

@ -858,10 +858,10 @@ static void mcs48_init(legacy_cpu_device *device, device_irq_acknowledge_callbac
cpustate->int_rom_size = romsize;
cpustate->feature_mask = feature_mask;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
/* set up the state table */
{

View File

@ -2075,10 +2075,10 @@ static CPU_INIT( mcs51 )
mcs51_state->irq_callback = irqcallback;
mcs51_state->device = device;
mcs51_state->program = device->space(AS_PROGRAM);
mcs51_state->program = &device->space(AS_PROGRAM);
mcs51_state->direct = &mcs51_state->program->direct();
mcs51_state->data = device->space(AS_DATA);
mcs51_state->io = device->space(AS_IO);
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 */

View File

@ -119,7 +119,7 @@ static CPU_INIT( minx )
minx_state *minx = get_safe_token(device);
minx->irq_callback = irqcallback;
minx->device = device;
minx->program = device->space(AS_PROGRAM);
minx->program = &device->space(AS_PROGRAM);
if ( device->static_config() != NULL )
{
}

View File

@ -81,7 +81,7 @@ void mips3com_init(mips3_state *mips, mips3_flavor flavor, int bigendian, legacy
mips->cpu_clock = device->clock();
mips->irq_callback = irqcallback;
mips->device = device;
mips->program = device->space(AS_PROGRAM);
mips->program = &device->space(AS_PROGRAM);
mips->direct = &mips->program->direct();
mips->icache_size = config->icache;
mips->dcache_size = config->dcache;

View File

@ -311,7 +311,7 @@ static CPU_INIT( r3000 )
r3000->irq_callback = irqcallback;
r3000->device = device;
r3000->program = device->space(AS_PROGRAM);
r3000->program = &device->space(AS_PROGRAM);
r3000->direct = &r3000->program->direct();
}

View File

@ -274,8 +274,8 @@ static CPU_INIT(mn10200)
memset(cpustate, 0, sizeof(mn102_info));
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
device->save_item(NAME(cpustate->pc));
device->save_item(NAME(cpustate->d));

View File

@ -367,9 +367,9 @@ static void nec_init(legacy_cpu_device *device, device_irq_acknowledge_callback
nec_state->irq_callback = irqcallback;
nec_state->device = device;
nec_state->program = device->space(AS_PROGRAM);
nec_state->program = &device->space(AS_PROGRAM);
nec_state->direct = &nec_state->program->direct();
nec_state->io = device->space(AS_IO);
nec_state->io = &device->space(AS_IO);
}

View File

@ -486,9 +486,9 @@ static void v25_init(legacy_cpu_device *device, device_irq_acknowledge_callback
nec_state->irq_callback = irqcallback;
nec_state->device = device;
nec_state->program = device->space(AS_PROGRAM);
nec_state->program = &device->space(AS_PROGRAM);
nec_state->direct = &nec_state->program->direct();
nec_state->io = device->space(AS_IO);
nec_state->io = &device->space(AS_IO);
}

View File

@ -543,7 +543,7 @@ static CPU_INIT( pdp1 )
/* clean-up */
memset (cpustate, 0, sizeof (*cpustate));
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
/* set up params and callbacks */
for (i=0; i<64; i++)

View File

@ -135,7 +135,7 @@ static void tx0_init_common(legacy_cpu_device *device, device_irq_acknowledge_ca
cpustate->ir_mask = is_64kw ? 03 : 037;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
}
static CPU_INIT( tx0_64kw )

View File

@ -727,10 +727,10 @@ static CPU_INIT( pic16c5x )
pic16c5x_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
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);

View File

@ -834,10 +834,10 @@ static CPU_INIT( pic16c62x )
pic16c62x_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
cpustate->CONFIG = 0x3fff;

View File

@ -963,7 +963,7 @@ static CPU_INIT( ppc403 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device->space(AS_PROGRAM);
ppc.program = &device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
}
@ -1009,7 +1009,7 @@ static CPU_INIT( ppc405 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device->space(AS_PROGRAM);
ppc.program = &device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
}
@ -1134,7 +1134,7 @@ static CPU_INIT( ppc603 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device->space(AS_PROGRAM);
ppc.program = &device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
@ -1282,7 +1282,7 @@ static CPU_INIT( ppc602 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device->space(AS_PROGRAM);
ppc.program = &device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
@ -1423,7 +1423,7 @@ static CPU_INIT( mpc8240 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device->space(AS_PROGRAM);
ppc.program = &device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
@ -1549,7 +1549,7 @@ static CPU_INIT( ppc601 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device->space(AS_PROGRAM);
ppc.program = &device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;
@ -1679,7 +1679,7 @@ static CPU_INIT( ppc604 )
ppc.irq_callback = irqcallback;
ppc.device = device;
ppc.program = device->space(AS_PROGRAM);
ppc.program = &device->space(AS_PROGRAM);
ppc.pvr = configdata->pvr;

View File

@ -317,7 +317,7 @@ void ppccom_init(powerpc_state *ppc, powerpc_flavor flavor, UINT32 cap, int tb_d
ppc->cpu_clock = device->clock();
ppc->irq_callback = irqcallback;
ppc->device = device;
ppc->program = device->space(AS_PROGRAM);
ppc->program = &device->space(AS_PROGRAM);
ppc->direct = &ppc->program->direct();
ppc->system_clock = (config != NULL) ? config->bus_frequency : device->clock();
ppc->dcr_read_func = (config != NULL) ? config->dcr_read_func : NULL;

View File

@ -337,10 +337,10 @@ static CPU_INIT( pps4 )
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
device->save_item(NAME(cpustate->A));
device->save_item(NAME(cpustate->X));

View File

@ -1629,7 +1629,7 @@ cxd8606cq_device::cxd8606cq_device(const machine_config &mconfig, const char *ta
void psxcpu_device::device_start()
{
// get our address spaces
m_program = space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
save_item( NAME(m_op) );

View File

@ -281,7 +281,7 @@ static CPU_INIT( rsp )
rsp->irq_callback = irqcallback;
rsp->device = device;
rsp->program = device->space(AS_PROGRAM);
rsp->program = &device->space(AS_PROGRAM);
rsp->direct = &rsp->program->direct();
#if 1

View File

@ -588,7 +588,7 @@ static void rspcom_init(rsp_state *rsp, legacy_cpu_device *device, device_irq_ac
rsp->config = (const rsp_config *)device->static_config();
rsp->irq_callback = irqcallback;
rsp->device = device;
rsp->program = device->space(AS_PROGRAM);
rsp->program = &device->space(AS_PROGRAM);
rsp->direct = &rsp->program->direct();
#if 1

View File

@ -795,9 +795,9 @@ static CPU_INIT( s2650 )
s2650c->irq_callback = irqcallback;
s2650c->device = device;
s2650c->program = device->space(AS_PROGRAM);
s2650c->program = &device->space(AS_PROGRAM);
s2650c->direct = &s2650c->program->direct();
s2650c->io = device->space(AS_IO);
s2650c->io = &device->space(AS_IO);
device->save_item(NAME(s2650c->ppc));
device->save_item(NAME(s2650c->page));
@ -828,9 +828,9 @@ static CPU_RESET( s2650 )
memset(s2650c->ras, 0, sizeof(s2650c->ras));
s2650c->device = device;
s2650c->program = device->space(AS_PROGRAM);
s2650c->program = &device->space(AS_PROGRAM);
s2650c->direct = &s2650c->program->direct();
s2650c->io = device->space(AS_IO);
s2650c->io = &device->space(AS_IO);
s2650c->psl = COM | WC;
/* force write */
s2650c->psu = 0xff;

View File

@ -114,7 +114,7 @@ static CPU_INIT( saturn )
cpustate->config = (saturn_cpu_core *) device->static_config();
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
device->save_item(NAME(cpustate->reg[R0]));

View File

@ -105,7 +105,7 @@ static CPU_INIT( sc61860 )
cpustate->config = (sc61860_cpu_core *) device->static_config();
device->machine().scheduler().timer_pulse(attotime::from_hz(500), FUNC(sc61860_2ms_tick), 0, cpustate);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
}

View File

@ -513,7 +513,7 @@ static CPU_INIT( scmp )
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
/* resolve callbacks */

View File

@ -1717,7 +1717,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->space(AS_PROGRAM);
se3208_state->program = &device->space(AS_PROGRAM);
se3208_state->direct = &se3208_state->program->direct();
se3208_state->PC=SE3208_Read32(se3208_state, 0);
se3208_state->SR=0;
@ -1788,7 +1788,7 @@ static CPU_INIT( se3208 )
se3208_state->irq_callback = irqcallback;
se3208_state->device = device;
se3208_state->program = device->space(AS_PROGRAM);
se3208_state->program = &device->space(AS_PROGRAM);
se3208_state->direct = &se3208_state->program->direct();
}

View File

@ -961,9 +961,9 @@ void sh2_common_init(sh2_state *sh2, legacy_cpu_device *device, device_irq_ackno
}
sh2->irq_callback = irqcallback;
sh2->device = device;
sh2->program = device->space(AS_PROGRAM);
sh2->program = &device->space(AS_PROGRAM);
sh2->direct = &sh2->program->direct();
sh2->internal = device->space(AS_PROGRAM);
sh2->internal = &device->space(AS_PROGRAM);
device->save_item(NAME(sh2->pc));
device->save_item(NAME(sh2->sr));

View File

@ -2868,10 +2868,10 @@ static CPU_RESET( common_sh4_reset )
sh4->ftcsr_read_callback = f;
sh4->irq_callback = save_irqcallback;
sh4->device = device;
sh4->internal = device->space(AS_PROGRAM);
sh4->program = device->space(AS_PROGRAM);
sh4->internal = &device->space(AS_PROGRAM);
sh4->program = &device->space(AS_PROGRAM);
sh4->direct = &sh4->program->direct();
sh4->io = device->space(AS_IO);
sh4->io = &device->space(AS_IO);
sh4->dma_timer[0] = tsaved[0];
sh4->dma_timer[1] = tsaved[1];
@ -3216,9 +3216,9 @@ static CPU_INIT( sh4 )
sh4->irq_callback = irqcallback;
sh4->device = device;
sh4->internal = device->space(AS_PROGRAM);
sh4->program = device->space(AS_PROGRAM);
sh4->io = 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;

View File

@ -425,8 +425,8 @@ static CPU_INIT( sharc )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->data = device->space(AS_DATA);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->data = &device->space(AS_DATA);
build_opcode_table();

View File

@ -124,7 +124,7 @@ static CPU_INIT( sm8500 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
if ( device->static_config() != NULL ) {
cpustate->config.handle_dma = ((SM8500_CONFIG *)device->static_config())->handle_dma;
cpustate->config.handle_timers = ((SM8500_CONFIG *)device->static_config())->handle_timers;

View File

@ -1286,7 +1286,7 @@ static CPU_INIT( spc700 )
INT_ACK = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
}

View File

@ -149,7 +149,7 @@ static CPU_INIT( ssem )
cpustate->halt = 0;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
}
static CPU_EXIT( ssem )

View File

@ -528,9 +528,9 @@ 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->space(AS_PROGRAM);
ssp1601_state->program = &device->space(AS_PROGRAM);
ssp1601_state->direct = &ssp1601_state->program->direct();
ssp1601_state->io = device->space(AS_IO);
ssp1601_state->io = &device->space(AS_IO);
}

View File

@ -751,7 +751,7 @@ static CPU_INIT( superfx )
superfx_update_speed(cpustate);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
if (device->static_config() != NULL)
{

View File

@ -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->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
device->save_item(NAME(cpustate->ppc.w.l));

View File

@ -2713,8 +2713,8 @@ static CPU_INIT( t90 )
memset(cpustate, 0, sizeof(t90_Regs));
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
cpustate->timer_period = attotime::from_hz(device->unscaled_clock()) * 8;

View File

@ -222,7 +222,7 @@ static CPU_INIT( tlcs900 )
cpustate->intf = (const tlcs900_interface *)device->static_config();
cpustate->irqcallback = irqcallback;
cpustate->device = device;
cpustate->program = device->space( AS_PROGRAM );
cpustate->program = &device->space( AS_PROGRAM );
cpustate->to1.resolve(cpustate->intf->to1, *device );
cpustate->to3.resolve(cpustate->intf->to3, *device );

View File

@ -503,8 +503,8 @@ static void cpu_init_tms_common( legacy_cpu_device *device, const UINT32* decode
cpustate->pc_size = pc_size;
cpustate->byte_size = byte_size;
cpustate->program = device->space( AS_PROGRAM );
cpustate->data = device->space( AS_PROGRAM );
cpustate->program = &device->space( AS_PROGRAM );
cpustate->data = &device->space( AS_PROGRAM );
device->save_item( NAME(cpustate->prev_pc) );
device->save_item( NAME(cpustate->prev_pa) );

View File

@ -826,10 +826,10 @@ static CPU_INIT( tms32010 )
device->save_item(NAME(cpustate->addr_mask));
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
}

View File

@ -1676,10 +1676,10 @@ static CPU_INIT( tms32025 )
cpustate->intRAM = auto_alloc_array(device->machine(), UINT16, 0x800);
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->io = device->space(AS_IO);
cpustate->data = &device->space(AS_DATA);
cpustate->io = &device->space(AS_IO);
device->save_item(NAME(cpustate->PC));
device->save_item(NAME(cpustate->STR0));

View File

@ -368,7 +368,7 @@ inline void tms3203x_device::WMEM(offs_t addr, UINT32 data)
void tms3203x_device::device_start()
{
// find address spaces
m_program = space(AS_PROGRAM);
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
// save state

View File

@ -223,9 +223,9 @@ static CPU_INIT( tms )
tms32051_state *cpustate = get_safe_token(device);
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->data = device->space(AS_DATA);
cpustate->data = &device->space(AS_DATA);
cpustate->pcstack_ptr = 0;
}

View File

@ -626,7 +626,7 @@ static CPU_INIT( tms34010 )
tms->config = configdata;
tms->irq_callback = irqcallback;
tms->device = device;
tms->program = device->space(AS_PROGRAM);
tms->program = &device->space(AS_PROGRAM);
tms->direct = &tms->program->direct();
tms->screen = downcast<screen_device *>(device->machine().device(configdata->screen_tag));
@ -688,7 +688,7 @@ static CPU_RESET( tms34010 )
tms->irq_callback = save_irqcallback;
tms->scantimer = save_scantimer;
tms->device = device;
tms->program = device->space(AS_PROGRAM);
tms->program = &device->space(AS_PROGRAM);
tms->direct = &tms->program->direct();
/* fetch the initial PC and reset the state */
@ -699,7 +699,7 @@ static CPU_RESET( tms34010 )
/* the first time we are run */
tms->reset_deferred = tms->config->halt_on_reset;
if (tms->config->halt_on_reset)
tms34010_io_register_w(*device->space(AS_PROGRAM), REG_HSTCTLH, 0x8000, 0xffff);
tms34010_io_register_w(device->space(AS_PROGRAM), REG_HSTCTLH, 0x8000, 0xffff);
}
@ -1630,7 +1630,7 @@ void tms34010_host_w(device_t *cpu, int reg, int data)
case TMS34010_HOST_CONTROL:
{
tms->external_host_access = TRUE;
address_space &space = *tms->device->space(AS_PROGRAM);
address_space &space = tms->device->space(AS_PROGRAM);
tms34010_io_register_w(space, REG_HSTCTLH, data & 0xff00, 0xffff);
tms34010_io_register_w(space, REG_HSTCTLL, data & 0x00ff, 0xffff);
tms->external_host_access = FALSE;

View File

@ -787,8 +787,8 @@ void tms57002_device::execute_run()
void tms57002_device::device_start()
{
sti = S_IDLE;
program = space(AS_PROGRAM);
data = space(AS_DATA);
program = &space(AS_PROGRAM);
data = &space(AS_DATA);
state_add(STATE_GENPC,"GENPC", pc).noshow();

View File

@ -165,9 +165,9 @@ static CPU_INIT( tms7000 )
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->direct = &cpustate->program->direct();
cpustate->io = device->space(AS_IO);
cpustate->io = &device->space(AS_IO);
memset(cpustate->pf, 0, 0x100);
memset(cpustate->rf, 0, 0x80);

View File

@ -1294,8 +1294,8 @@ static CPU_INIT( tms99xx )
cpustate->irq_level = 16;
cpustate->irq_callback = irqcallback;
cpustate->device = device;
cpustate->program = device->space(AS_PROGRAM);
cpustate->io = device->space(AS_IO);
cpustate->program = &device->space(AS_PROGRAM);
cpustate->io = &device->space(AS_IO);
#if (TMS99XX_MODEL == TMS9995_ID)
cpustate->timer = device->machine().scheduler().timer_alloc(FUNC(decrementer_callback), cpustate);

View File

@ -167,8 +167,8 @@ void tms99xx_device::device_start()
// TODO: Restore state save feature
m_prgspace = space(AS_PROGRAM); // dimemory.h
m_cru = space(AS_IO);
m_prgspace = &space(AS_PROGRAM); // dimemory.h
m_cru = &space(AS_IO);
// Resolve our external connections
m_external_operation.resolve(conf->external_callback, *this);

View File

@ -148,8 +148,8 @@ void tms9995_device::device_start()
// TODO: Restore save state suport
m_prgspace = space(AS_PROGRAM); // dimemory.h
m_cru = space(AS_IO);
m_prgspace = &space(AS_PROGRAM); // dimemory.h
m_cru = &space(AS_IO);
// Resolve our external connections
m_external_operation.resolve(conf->external_callback, *this);

View File

@ -114,7 +114,7 @@ static CPU_INIT( unsp )
memset(unsp->r, 0, sizeof(UINT16) * UNSP_GPR_COUNT);
unsp->device = device;
unsp->program = device->space(AS_PROGRAM);
unsp->program = &device->space(AS_PROGRAM);
}
static CPU_RESET( unsp )

View File

@ -80,8 +80,8 @@ void necdsp_device::device_config_complete()
void necdsp_device::device_start()
{
// get our address spaces
m_program = space(AS_PROGRAM);
m_data = space(AS_DATA);
m_program = &space(AS_PROGRAM);
m_data = &space(AS_DATA);
m_direct = &m_program->direct();
// register our state for the debugger

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