Add ambiguous execute() and memory() methods to the

device_execute/memory_interfaces respectively in order
to catch unnecessary usage of the corresponding device_t 
methods. Removed all existing redundant usage. 
[Aaron Giles]
This commit is contained in:
Aaron Giles 2012-09-11 16:29:26 +00:00
parent 0aa418e85b
commit d1a2c2e7a3
128 changed files with 430 additions and 438 deletions

View File

@ -220,6 +220,10 @@ public:
// required operation overrides
void run() { execute_run(); }
// deliberately ambiguous functions; if you have the execute interface
// just use it
device_execute_interface &execute() { return *this; }
protected:
// internal helpers
void run_thread_wrapper();

View File

@ -123,6 +123,10 @@ public:
bool write(address_spacenum spacenum, offs_t offset, int size, UINT64 value) { return memory_write(spacenum, offset, size, value); }
bool readop(offs_t offset, int size, UINT64 &value) { return memory_readop(offset, size, value); }
// deliberately ambiguous functions; if you have the memory interface
// just use it
device_memory_interface &memory() { return *this; }
protected:
// required overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum) const = 0;

View File

@ -233,18 +233,4 @@ inline offs_t device_t::safe_pcbase()
}
//-------------------------------------------------
// device_state - return a pointer to the device
// state interface for this device
//-------------------------------------------------
inline device_state_interface *device_state(device_t *device)
{
device_state_interface *intf;
if (!device->interface(intf))
throw emu_fatalerror("Device '%s' does not have state interface", device->tag());
return intf;
}
#endif /* __DISTATE_H__ */

View File

@ -82,7 +82,7 @@ READ8_DEVICE_HANDLER( latch8_r )
if (latch8->has_read)
{
/* temporary hack until all relevant systems are devices */
address_space *space = device->machine().firstcpu->memory().space(AS_PROGRAM);
address_space *space = device->machine().firstcpu->space(AS_PROGRAM);
int i;
for (i=0; i<8; i++)
{

View File

@ -702,7 +702,7 @@ static void SCSP_UpdateSlotReg(scsp_state *scsp,int s,int r)
static void SCSP_UpdateReg(scsp_state *scsp, int reg)
{
/* temporary hack until this is converted to a device */
address_space *space = scsp->device->machine().firstcpu->memory().space(AS_PROGRAM);
address_space *space = scsp->device->machine().firstcpu->space(AS_PROGRAM);
switch(reg&0x3f)
{
@ -1325,7 +1325,7 @@ WRITE16_DEVICE_HANDLER( scsp_w )
case 0x416:
COMBINE_DATA(&scsp->dma_regs[((offset-0x412)/2) & 3]);
if(ACCESSING_BITS_8_15 && offset*2 == 0x416)
dma_scsp(device->machine().firstcpu->memory().space(AS_PROGRAM), scsp);
dma_scsp(device->machine().firstcpu->space(AS_PROGRAM), scsp);
break;
case 0x42a: //check main cpu IRQ
scsp->main_irq(1);

View File

@ -329,11 +329,11 @@ static int internal_pc_cga_video_start(running_machine &machine)
static VIDEO_START( pc_cga )
{
int buswidth;
address_space *space = machine.firstcpu->memory().space(AS_PROGRAM);
address_space *spaceio = machine.firstcpu->memory().space(AS_IO);
address_space *space = machine.firstcpu->space(AS_PROGRAM);
address_space *spaceio = machine.firstcpu->space(AS_IO);
space->install_readwrite_bank(0xb8000, 0xbbfff, 0, 0x04000, "bank11" );
buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
buswidth = machine.firstcpu->space_config(AS_PROGRAM)->m_databus_width;
UINT64 mask = 0;
switch(buswidth)
{
@ -370,12 +370,12 @@ static VIDEO_START( pc_cga )
static VIDEO_START( pc_cga32k )
{
int buswidth;
address_space *space = machine.firstcpu->memory().space(AS_PROGRAM);
address_space *spaceio = machine.firstcpu->memory().space(AS_IO);
address_space *space = machine.firstcpu->space(AS_PROGRAM);
address_space *spaceio = machine.firstcpu->space(AS_IO);
space->install_readwrite_bank(0xb8000, 0xbffff, "bank11" );
buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
buswidth = machine.firstcpu->space_config(AS_PROGRAM)->m_databus_width;
UINT64 mask = 0;
switch(buswidth)
{
@ -1201,8 +1201,8 @@ static WRITE8_HANDLER( pc_cga8_w )
case 0x0f:
// Not sure if some all CGA cards have ability to upload char definition
// The original CGA card had a char rom
UINT8 buswidth = space->machine().firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
address_space *space_prg = space->machine().firstcpu->memory().space(AS_PROGRAM);
UINT8 buswidth = space->machine().firstcpu->space_config(AS_PROGRAM)->m_databus_width;
address_space *space_prg = space->machine().firstcpu->space(AS_PROGRAM);
cga.p3df = data;
if (data & 1) {
UINT64 mask = 0;
@ -1635,8 +1635,8 @@ static VIDEO_START( pc1512 )
cga.videoram_size = 0x10000;
cga.videoram = auto_alloc_array(machine, UINT8, 0x10000 );
address_space *space = machine.firstcpu->memory().space( AS_PROGRAM );
address_space *io_space = machine.firstcpu->memory().space( AS_IO );
address_space *space = machine.firstcpu->space( AS_PROGRAM );
address_space *io_space = machine.firstcpu->space( AS_IO );
space->install_read_bank( 0xb8000, 0xbbfff, 0, 0x0C000, "bank1" );
machine.root_device().membank("bank1")->set_base(cga.videoram + videoram_offset[0]);

View File

@ -2015,7 +2015,7 @@ void pc_vga_io_init(running_machine &machine, address_space *mem_space, offs_t m
int buswidth;
UINT64 mask = 0;
buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
buswidth = machine.firstcpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 8:
@ -2440,7 +2440,7 @@ void pc_svga_trident_io_init(running_machine &machine, address_space *mem_space,
int buswidth;
UINT64 mask = 0;
buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
buswidth = machine.firstcpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 8:
@ -4461,7 +4461,7 @@ void pc_vga_gamtor_io_init(running_machine &machine, address_space *mem_space, o
int buswidth;
UINT64 mask = 0;
buswidth = machine.firstcpu->memory().space_config(AS_PROGRAM)->m_databus_width;
buswidth = machine.firstcpu->space_config(AS_PROGRAM)->m_databus_width;
switch(buswidth)
{
case 8:

View File

@ -898,7 +898,7 @@ static TIMER_CALLBACK( schaser_effect_555_cb )
static void schaser_reinit_555_time_remain(_8080bw_state *state)
{
address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *space = state->m_maincpu->space(AS_PROGRAM);
state->m_schaser_effect_555_time_remain = attotime::from_double(state->m_schaser_effect_555_time_remain_savable);
state->schaser_sh_port_2_w(*space, 0, state->m_port_2_last_extra);
}

View File

@ -147,7 +147,7 @@ void atarijsa_init(running_machine &machine, const char *testport, int testmask)
/* install POKEY memory handlers */
if (pokey != NULL)
jsacpu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x2c00, 0x2c0f, read8_delegate(FUNC(pokey_device::read),pokey), write8_delegate(FUNC(pokey_device::write),pokey));
jsacpu->space(AS_PROGRAM)->install_readwrite_handler(0x2c00, 0x2c0f, read8_delegate(FUNC(pokey_device::read),pokey), write8_delegate(FUNC(pokey_device::write),pokey));
init_save_state(machine);
atarijsa_reset();

View File

@ -177,7 +177,7 @@ void cage_init(running_machine &machine, offs_t speedup)
state->timer[1] = machine.device<timer_device>("cage_timer1");
if (speedup)
state->speedup_ram = state->cpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(speedup, speedup, FUNC(speedup_w));
state->speedup_ram = state->cpu->space(AS_PROGRAM)->install_legacy_write_handler(speedup, speedup, FUNC(speedup_w));
for (chan = 0; chan < DAC_BUFFER_CHANNELS; chan++)
{

View File

@ -2141,7 +2141,7 @@ static TIMER_CALLBACK( s1_ack_callback2 )
machine.scheduler().timer_set(attotime::from_usec(1), FUNC(s1_ack_callback2), param);
return;
}
output_latch_w(dcs.cpu->memory().space(AS_PROGRAM), 0, 0x000a, 0xffff);
output_latch_w(dcs.cpu->space(AS_PROGRAM), 0, 0x000a, 0xffff);
}
@ -2153,7 +2153,7 @@ static TIMER_CALLBACK( s1_ack_callback1 )
machine.scheduler().timer_set(attotime::from_usec(1), FUNC(s1_ack_callback1), param);
return;
}
output_latch_w(dcs.cpu->memory().space(AS_PROGRAM), 0, param, 0xffff);
output_latch_w(dcs.cpu->space(AS_PROGRAM), 0, param, 0xffff);
/* chain to the next word we need to write back */
machine.scheduler().timer_set(attotime::from_usec(1), FUNC(s1_ack_callback2));
@ -2285,7 +2285,7 @@ static int preprocess_stage_1(running_machine &machine, UINT16 data)
static TIMER_CALLBACK( s2_ack_callback )
{
address_space *space = dcs.cpu->memory().space(AS_PROGRAM);
address_space *space = dcs.cpu->space(AS_PROGRAM);
/* if the output is full, stall for a usec */
if (IS_OUTPUT_FULL())

View File

@ -231,15 +231,13 @@ WRITE16_MEMBER(harddriv_state::hdsnd68k_320ram_w)
READ16_MEMBER(harddriv_state::hdsnd68k_320ports_r)
{
address_space *iospace = m_sounddsp->memory().space(AS_IO);
return iospace->read_word((offset & 7) << 1);
return m_sounddsp->space(AS_IO)->read_word((offset & 7) << 1);
}
WRITE16_MEMBER(harddriv_state::hdsnd68k_320ports_w)
{
address_space *iospace = m_sounddsp->memory().space(AS_IO);
iospace->write_word((offset & 7) << 1, data);
m_sounddsp->space(AS_IO)->write_word((offset & 7) << 1, data);
}

View File

@ -2533,7 +2533,7 @@ static MACHINE_RESET( invmulti )
{
_8080bw_state *state = machine.driver_data<_8080bw_state>();
state->invmulti_bank_w(*state->m_maincpu->memory().space(AS_PROGRAM), 0, 0);
state->invmulti_bank_w(*state->m_maincpu->space(AS_PROGRAM), 0, 0);
MACHINE_RESET_CALL(mw8080bw);
}

View File

@ -252,7 +252,7 @@ void destiny_state::machine_start()
void destiny_state::machine_reset()
{
bank_select_w(*m_maincpu->memory().space(AS_PROGRAM), 0, 0);
bank_select_w(*m_maincpu->space(AS_PROGRAM), 0, 0);
}
static MACHINE_CONFIG_START( destiny, destiny_state )

View File

@ -443,7 +443,7 @@ READ32_MEMBER(gunbustr_state::main_cycle_r)
DRIVER_INIT_MEMBER(gunbustr_state,gunbustr)
{
/* Speedup handler */
m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x203acc, 0x203acf, read32_delegate(FUNC(gunbustr_state::main_cycle_r),this));
m_maincpu->space(AS_PROGRAM)->install_read_handler(0x203acc, 0x203acf, read32_delegate(FUNC(gunbustr_state::main_cycle_r),this));
}
DRIVER_INIT_MEMBER(gunbustr_state,gunbustrj)

View File

@ -3999,9 +3999,9 @@ static void init_multisync(running_machine &machine, int compact_inputs)
/* install handlers for the compact driving games' inputs */
if (compact_inputs)
{
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x400000, 0x400001, FUNC(hdc68k_wheel_r));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x408000, 0x408001, FUNC(hdc68k_wheel_edge_reset_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xa80000, 0xafffff, FUNC(hdc68k_port1_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x400000, 0x400001, FUNC(hdc68k_wheel_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x408000, 0x408001, FUNC(hdc68k_wheel_edge_reset_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0xa80000, 0xafffff, FUNC(hdc68k_port1_r));
}
}
@ -4012,18 +4012,18 @@ static void init_adsp(running_machine &machine)
harddriv_state *state = machine.driver_data<harddriv_state>();
/* install ADSP program RAM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x800000, 0x807fff, FUNC(hd68k_adsp_program_r), FUNC(hd68k_adsp_program_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x800000, 0x807fff, FUNC(hd68k_adsp_program_r), FUNC(hd68k_adsp_program_w));
/* install ADSP data RAM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x808000, 0x80bfff, FUNC(hd68k_adsp_data_r), FUNC(hd68k_adsp_data_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x808000, 0x80bfff, FUNC(hd68k_adsp_data_r), FUNC(hd68k_adsp_data_w));
/* install ADSP serial buffer RAM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x810000, 0x813fff, FUNC(hd68k_adsp_buffer_r), FUNC(hd68k_adsp_buffer_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x810000, 0x813fff, FUNC(hd68k_adsp_buffer_r), FUNC(hd68k_adsp_buffer_w));
/* install ADSP control locations */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x818000, 0x81801f, FUNC(hd68k_adsp_control_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x818060, 0x81807f, FUNC(hd68k_adsp_irq_clear_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x838000, 0x83ffff, FUNC(hd68k_adsp_irq_state_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x818000, 0x81801f, FUNC(hd68k_adsp_control_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x818060, 0x81807f, FUNC(hd68k_adsp_irq_clear_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x838000, 0x83ffff, FUNC(hd68k_adsp_irq_state_r));
}
@ -4033,21 +4033,21 @@ static void init_ds3(running_machine &machine)
harddriv_state *state = machine.driver_data<harddriv_state>();
/* install ADSP program RAM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x800000, 0x807fff, FUNC(hd68k_ds3_program_r), FUNC(hd68k_ds3_program_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x800000, 0x807fff, FUNC(hd68k_ds3_program_r), FUNC(hd68k_ds3_program_w));
/* install ADSP data RAM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x808000, 0x80bfff, FUNC(hd68k_adsp_data_r), FUNC(hd68k_adsp_data_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x80c000, 0x80dfff, FUNC(hdds3_special_r), FUNC(hdds3_special_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x808000, 0x80bfff, FUNC(hd68k_adsp_data_r), FUNC(hd68k_adsp_data_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x80c000, 0x80dfff, FUNC(hdds3_special_r), FUNC(hdds3_special_w));
/* install ADSP control locations */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x820000, 0x8207ff, FUNC(hd68k_ds3_gdata_r));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x820800, 0x820fff, FUNC(hd68k_ds3_girq_state_r));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x820000, 0x8207ff, FUNC(hd68k_ds3_gdata_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x821000, 0x8217ff, FUNC(hd68k_adsp_irq_clear_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x822000, 0x8227ff, FUNC(hd68k_ds3_sdata_r));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x822800, 0x822fff, FUNC(hd68k_ds3_sirq_state_r));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x822000, 0x8227ff, FUNC(hd68k_ds3_sdata_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x823800, 0x823fff, FUNC(hd68k_ds3_control_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x820000, 0x8207ff, FUNC(hd68k_ds3_gdata_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x820800, 0x820fff, FUNC(hd68k_ds3_girq_state_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x820000, 0x8207ff, FUNC(hd68k_ds3_gdata_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x821000, 0x8217ff, FUNC(hd68k_adsp_irq_clear_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x822000, 0x8227ff, FUNC(hd68k_ds3_sdata_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x822800, 0x822fff, FUNC(hd68k_ds3_sirq_state_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x822000, 0x8227ff, FUNC(hd68k_ds3_sdata_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x823800, 0x823fff, FUNC(hd68k_ds3_control_w));
/* if we have a sound DSP, boot it */
if (state->m_ds4cpu1 != NULL)
@ -4132,26 +4132,26 @@ static void init_dsk(running_machine &machine)
UINT8 *usr3 = state->memregion("user3")->base();
/* install ASIC61 */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x85c000, 0x85c7ff, FUNC(hd68k_dsk_dsp32_r), FUNC(hd68k_dsk_dsp32_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x85c000, 0x85c7ff, FUNC(hd68k_dsk_dsp32_r), FUNC(hd68k_dsk_dsp32_w));
/* install control registers */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x85c800, 0x85c81f, FUNC(hd68k_dsk_control_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x85c800, 0x85c81f, FUNC(hd68k_dsk_control_w));
/* install extra RAM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x900000, 0x90ffff, FUNC(hd68k_dsk_ram_r), FUNC(hd68k_dsk_ram_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x900000, 0x90ffff, FUNC(hd68k_dsk_ram_r), FUNC(hd68k_dsk_ram_w));
state->m_dsk_ram = (UINT16 *)(usr3 + 0x40000);
/* install extra ZRAM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x910000, 0x910fff, FUNC(hd68k_dsk_zram_r), FUNC(hd68k_dsk_zram_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x910000, 0x910fff, FUNC(hd68k_dsk_zram_r), FUNC(hd68k_dsk_zram_w));
state->m_dsk_zram = (UINT16 *)(usr3 + 0x50000);
/* install ASIC65 */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x914000, 0x917fff, FUNC(asic65_data_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x914000, 0x917fff, FUNC(asic65_r));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x918000, 0x91bfff, FUNC(asic65_io_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x914000, 0x917fff, FUNC(asic65_data_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x914000, 0x917fff, FUNC(asic65_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x918000, 0x91bfff, FUNC(asic65_io_r));
/* install extra ROM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x940000, 0x9fffff, FUNC(hd68k_dsk_small_rom_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x940000, 0x9fffff, FUNC(hd68k_dsk_small_rom_r));
state->m_dsk_rom = (UINT16 *)(usr3 + 0x00000);
/* set up the ASIC65 */
@ -4166,22 +4166,22 @@ static void init_dsk2(running_machine &machine)
UINT8 *usr3 = state->memregion("user3")->base();
/* install ASIC65 */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x824000, 0x824003, FUNC(asic65_data_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x824000, 0x824003, FUNC(asic65_r));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x825000, 0x825001, FUNC(asic65_io_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x824000, 0x824003, FUNC(asic65_data_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x824000, 0x824003, FUNC(asic65_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x825000, 0x825001, FUNC(asic65_io_r));
/* install ASIC61 */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x827000, 0x8277ff, FUNC(hd68k_dsk_dsp32_r), FUNC(hd68k_dsk_dsp32_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x827000, 0x8277ff, FUNC(hd68k_dsk_dsp32_r), FUNC(hd68k_dsk_dsp32_w));
/* install control registers */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x827800, 0x82781f, FUNC(hd68k_dsk_control_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x827800, 0x82781f, FUNC(hd68k_dsk_control_w));
/* install extra RAM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0x880000, 0x8bffff, FUNC(hd68k_dsk_ram_r), FUNC(hd68k_dsk_ram_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0x880000, 0x8bffff, FUNC(hd68k_dsk_ram_r), FUNC(hd68k_dsk_ram_w));
state->m_dsk_ram = (UINT16 *)(usr3 + 0x100000);
/* install extra ROM */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x900000, 0x9fffff, FUNC(hd68k_dsk_rom_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x900000, 0x9fffff, FUNC(hd68k_dsk_rom_r));
state->m_dsk_rom = (UINT16 *)(usr3 + 0x000000);
/* set up the ASIC65 */
@ -4195,15 +4195,15 @@ static void init_dspcom(running_machine &machine)
harddriv_state *state = machine.driver_data<harddriv_state>();
/* install ASIC65 */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x900000, 0x900003, FUNC(asic65_data_w));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x900000, 0x900003, FUNC(asic65_r));
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x901000, 0x910001, FUNC(asic65_io_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x900000, 0x900003, FUNC(asic65_data_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x900000, 0x900003, FUNC(asic65_r));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x901000, 0x910001, FUNC(asic65_io_r));
/* set up the ASIC65 */
asic65_config(machine, ASIC65_STEELTAL);
/* install DSPCOM control */
state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x904000, 0x90401f, FUNC(hddspcom_control_w));
state->m_maincpu->space(AS_PROGRAM)->install_legacy_write_handler(0x904000, 0x90401f, FUNC(hddspcom_control_w));
}
@ -4215,9 +4215,9 @@ static void init_driver_sound(running_machine &machine)
hdsnd_init(machine);
/* install sound handlers */
state->m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x840000, 0x840001, read16_delegate(FUNC(harddriv_state::hd68k_snd_data_r),state), write16_delegate(FUNC(harddriv_state::hd68k_snd_data_w),state));
state->m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x844000, 0x844001, read16_delegate(FUNC(harddriv_state::hd68k_snd_status_r),state));
state->m_maincpu->memory().space(AS_PROGRAM)->install_write_handler(0x84c000, 0x84c001, write16_delegate(FUNC(harddriv_state::hd68k_snd_reset_w),state));
state->m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(0x840000, 0x840001, read16_delegate(FUNC(harddriv_state::hd68k_snd_data_r),state), write16_delegate(FUNC(harddriv_state::hd68k_snd_data_w),state));
state->m_maincpu->space(AS_PROGRAM)->install_read_handler(0x844000, 0x844001, read16_delegate(FUNC(harddriv_state::hd68k_snd_status_r),state));
state->m_maincpu->space(AS_PROGRAM)->install_write_handler(0x84c000, 0x84c001, write16_delegate(FUNC(harddriv_state::hd68k_snd_reset_w),state));
}
@ -4238,18 +4238,18 @@ DRIVER_INIT_MEMBER(harddriv_state,harddriv)
init_driver_sound(machine());
/* set up gsp speedup handler */
m_gsp_speedup_addr[0] = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup1_w));
m_gsp_speedup_addr[1] = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfffcfc00, 0xfffcfc0f, FUNC(hdgsp_speedup2_w));
m_gsp->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup_r));
m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup1_w));
m_gsp_speedup_addr[1] = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfffcfc00, 0xfffcfc0f, FUNC(hdgsp_speedup2_w));
m_gsp->space(AS_PROGRAM)->install_legacy_read_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup_r));
m_gsp_speedup_pc = 0xffc00f10;
/* set up msp speedup handler */
m_msp_speedup_addr = m_msp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x00751b00, 0x00751b0f, FUNC(hdmsp_speedup_w));
m_msp->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x00751b00, 0x00751b0f, FUNC(hdmsp_speedup_r));
m_msp_speedup_addr = m_msp->space(AS_PROGRAM)->install_legacy_write_handler(0x00751b00, 0x00751b0f, FUNC(hdmsp_speedup_w));
m_msp->space(AS_PROGRAM)->install_legacy_read_handler(0x00751b00, 0x00751b0f, FUNC(hdmsp_speedup_r));
m_msp_speedup_pc = 0x00723b00;
/* set up adsp speedup handlers */
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
}
@ -4262,18 +4262,18 @@ DRIVER_INIT_MEMBER(harddriv_state,harddrivc)
init_driver_sound(machine());
/* set up gsp speedup handler */
m_gsp_speedup_addr[0] = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup1_w));
m_gsp_speedup_addr[1] = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfffcfc00, 0xfffcfc0f, FUNC(hdgsp_speedup2_w));
m_gsp->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup_r));
m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup1_w));
m_gsp_speedup_addr[1] = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfffcfc00, 0xfffcfc0f, FUNC(hdgsp_speedup2_w));
m_gsp->space(AS_PROGRAM)->install_legacy_read_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup_r));
m_gsp_speedup_pc = 0xfff40ff0;
/* set up msp speedup handler */
m_msp_speedup_addr = m_msp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x00751b00, 0x00751b0f, FUNC(hdmsp_speedup_w));
m_msp->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x00751b00, 0x00751b0f, FUNC(hdmsp_speedup_r));
m_msp_speedup_addr = m_msp->space(AS_PROGRAM)->install_legacy_write_handler(0x00751b00, 0x00751b0f, FUNC(hdmsp_speedup_w));
m_msp->space(AS_PROGRAM)->install_legacy_read_handler(0x00751b00, 0x00751b0f, FUNC(hdmsp_speedup_r));
m_msp_speedup_pc = 0x00723b00;
/* set up adsp speedup handlers */
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
}
@ -4286,13 +4286,13 @@ DRIVER_INIT_MEMBER(harddriv_state,stunrun)
atarijsa_init(machine(), "IN0", 0x0020);
/* set up gsp speedup handler */
m_gsp_speedup_addr[0] = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup1_w));
m_gsp_speedup_addr[1] = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfffcfc00, 0xfffcfc0f, FUNC(hdgsp_speedup2_w));
m_gsp->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup_r));
m_gsp_speedup_addr[0] = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup1_w));
m_gsp_speedup_addr[1] = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfffcfc00, 0xfffcfc0f, FUNC(hdgsp_speedup2_w));
m_gsp->space(AS_PROGRAM)->install_legacy_read_handler(0xfff9fc00, 0xfff9fc0f, FUNC(hdgsp_speedup_r));
m_gsp_speedup_pc = 0xfff41070;
/* set up adsp speedup handlers */
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
}
@ -4307,14 +4307,14 @@ DRIVER_INIT_MEMBER(harddriv_state,racedriv)
/* set up the slapstic */
slapstic_init(machine(), 117);
m_m68k_slapstic_base = m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(rd68k_slapstic_r), FUNC(rd68k_slapstic_w));
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(rd68k_slapstic_r), FUNC(rd68k_slapstic_w));
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x613c00, 0x613c03, FUNC(rddsp32_sync0_w));
m_rddsp32_sync[1] = m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x613e00, 0x613e03, FUNC(rddsp32_sync1_w));
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x613c00, 0x613c03, FUNC(rddsp32_sync0_w));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x613e00, 0x613e03, FUNC(rddsp32_sync1_w));
/* set up adsp speedup handlers */
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
}
@ -4330,22 +4330,22 @@ static void racedrivc_init_common(running_machine &machine, offs_t gsp_protectio
/* set up the slapstic */
slapstic_init(machine, 117);
state->m_m68k_slapstic_base = state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(rd68k_slapstic_r), FUNC(rd68k_slapstic_w));
state->m_m68k_slapstic_base = state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(rd68k_slapstic_r), FUNC(rd68k_slapstic_w));
/* synchronization */
state->m_rddsp32_sync[0] = state->m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x613c00, 0x613c03, FUNC(rddsp32_sync0_w));
state->m_rddsp32_sync[1] = state->m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x613e00, 0x613e03, FUNC(rddsp32_sync1_w));
state->m_rddsp32_sync[0] = state->m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x613c00, 0x613c03, FUNC(rddsp32_sync0_w));
state->m_rddsp32_sync[1] = state->m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x613e00, 0x613e03, FUNC(rddsp32_sync1_w));
/* set up protection hacks */
state->m_gsp_protection = state->m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(gsp_protection, gsp_protection + 0x0f, FUNC(hdgsp_protection_w));
state->m_gsp_protection = state->m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(gsp_protection, gsp_protection + 0x0f, FUNC(hdgsp_protection_w));
/* set up gsp speedup handler */
state->m_gsp_speedup_addr[0] = state->m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff76f60, 0xfff76f6f, FUNC(rdgsp_speedup1_w));
state->m_gsp->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xfff76f60, 0xfff76f6f, FUNC(rdgsp_speedup1_r));
state->m_gsp_speedup_addr[0] = state->m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfff76f60, 0xfff76f6f, FUNC(rdgsp_speedup1_w));
state->m_gsp->space(AS_PROGRAM)->install_legacy_read_handler(0xfff76f60, 0xfff76f6f, FUNC(rdgsp_speedup1_r));
state->m_gsp_speedup_pc = 0xfff43a00;
/* set up adsp speedup handlers */
state->m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
state->m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
}
DRIVER_INIT_MEMBER(harddriv_state,racedrivc) { racedrivc_init_common(machine(), 0xfff95cd0); }
@ -4357,8 +4357,8 @@ DRIVER_INIT_MEMBER(harddriv_state,racedrivb1)
/* this unpleasantness prevents racedrivb1 and racedrivg1 from crashing MAME during boot */
/* both clear the DSP32C's RAM and then release it from reset, causing it to run through */
/* its address space recursively executing instructions */
m_dsp32->memory().space(AS_PROGRAM)->install_read_handler(0x002000, 0x5fffff, read32_delegate(FUNC(harddriv_state::rddsp_unmap_r),this));
m_dsp32->memory().space(AS_PROGRAM)->install_read_handler(0x640000, 0xfff7ff, read32_delegate(FUNC(harddriv_state::rddsp_unmap_r),this));
m_dsp32->space(AS_PROGRAM)->install_read_handler(0x002000, 0x5fffff, read32_delegate(FUNC(harddriv_state::rddsp_unmap_r),this));
m_dsp32->space(AS_PROGRAM)->install_read_handler(0x640000, 0xfff7ff, read32_delegate(FUNC(harddriv_state::rddsp_unmap_r),this));
DRIVER_INIT_CALL(racedriv);
}
@ -4385,23 +4385,23 @@ static void steeltal_init_common(running_machine &machine, offs_t ds3_transfer_p
init_dspcom(machine);
atarijsa_init(machine, "IN0", 0x0020);
state->m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x908000, 0x908001, read16_delegate(FUNC(harddriv_state::steeltal_dummy_r),state));
state->m_maincpu->space(AS_PROGRAM)->install_read_handler(0x908000, 0x908001, read16_delegate(FUNC(harddriv_state::steeltal_dummy_r),state));
/* set up the SLOOP */
if (!proto_sloop)
{
state->m_m68k_slapstic_base = state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(st68k_sloop_r), FUNC(st68k_sloop_w));
state->m_m68k_sloop_alt_base = state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x4e000, 0x4ffff, FUNC(st68k_sloop_alt_r));
state->m_m68k_slapstic_base = state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(st68k_sloop_r), FUNC(st68k_sloop_w));
state->m_m68k_sloop_alt_base = state->m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0x4e000, 0x4ffff, FUNC(st68k_sloop_alt_r));
}
else
state->m_m68k_slapstic_base = state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(st68k_protosloop_r), FUNC(st68k_protosloop_w));
state->m_m68k_slapstic_base = state->m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(st68k_protosloop_r), FUNC(st68k_protosloop_w));
/* set up protection hacks */
state->m_gsp_protection = state->m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff965d0, 0xfff965df, FUNC(hdgsp_protection_w));
state->m_gsp_protection = state->m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfff965d0, 0xfff965df, FUNC(hdgsp_protection_w));
/* set up adsp speedup handlers */
state->m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
state->m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1f99, 0x1f99, FUNC(hdds3_speedup_r));
state->m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
state->m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1f99, 0x1f99, FUNC(hdds3_speedup_r));
state->m_ds3_speedup_addr = &state->m_adsp_data_memory[0x1f99];
state->m_ds3_speedup_pc = 0xff;
state->m_ds3_transfer_pc = ds3_transfer_pc;
@ -4423,20 +4423,20 @@ DRIVER_INIT_MEMBER(harddriv_state,strtdriv)
/* set up the slapstic */
slapstic_init(machine(), 117);
m_m68k_slapstic_base = m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(rd68k_slapstic_r), FUNC(rd68k_slapstic_w));
m_m68k_slapstic_base = m_maincpu->space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(rd68k_slapstic_r), FUNC(rd68k_slapstic_w));
m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xa80000, 0xafffff, FUNC(hda68k_port1_r));
m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0xa80000, 0xafffff, FUNC(hda68k_port1_r));
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x613c00, 0x613c03, FUNC(rddsp32_sync0_w));
m_rddsp32_sync[1] = m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x613e00, 0x613e03, FUNC(rddsp32_sync1_w));
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x613c00, 0x613c03, FUNC(rddsp32_sync0_w));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x613e00, 0x613e03, FUNC(rddsp32_sync1_w));
/* set up protection hacks */
m_gsp_protection = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff960a0, 0xfff960af, FUNC(hdgsp_protection_w));
m_gsp_protection = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfff960a0, 0xfff960af, FUNC(hdgsp_protection_w));
/* set up adsp speedup handlers */
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1f99, 0x1f99, FUNC(hdds3_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1f99, 0x1f99, FUNC(hdds3_speedup_r));
m_ds3_speedup_addr = &m_adsp_data_memory[0x1f99];
m_ds3_speedup_pc = 0xff;
m_ds3_transfer_pc = 0x43672;
@ -4451,18 +4451,18 @@ DRIVER_INIT_MEMBER(harddriv_state,hdrivair)
init_ds3(machine());
init_dsk2(machine());
m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xa80000, 0xafffff, FUNC(hda68k_port1_r));
m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0xa80000, 0xafffff, FUNC(hda68k_port1_r));
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x21fe00, 0x21fe03, FUNC(rddsp32_sync0_w));
m_rddsp32_sync[1] = m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x21ff00, 0x21ff03, FUNC(rddsp32_sync1_w));
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x21fe00, 0x21fe03, FUNC(rddsp32_sync0_w));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x21ff00, 0x21ff03, FUNC(rddsp32_sync1_w));
/* set up protection hacks */
m_gsp_protection = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff943f0, 0xfff943ff, FUNC(hdgsp_protection_w));
m_gsp_protection = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfff943f0, 0xfff943ff, FUNC(hdgsp_protection_w));
/* set up adsp speedup handlers */
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1f99, 0x1f99, FUNC(hdds3_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1f99, 0x1f99, FUNC(hdds3_speedup_r));
m_ds3_speedup_addr = &m_adsp_data_memory[0x1f99];
m_ds3_speedup_pc = 0x2da;
m_ds3_transfer_pc = 0x407b8;
@ -4477,18 +4477,18 @@ DRIVER_INIT_MEMBER(harddriv_state,hdrivairp)
init_ds3(machine());
init_dsk2(machine());
m_maincpu->memory().space(AS_PROGRAM)->install_legacy_read_handler(0xa80000, 0xafffff, FUNC(hda68k_port1_r));
m_maincpu->space(AS_PROGRAM)->install_legacy_read_handler(0xa80000, 0xafffff, FUNC(hda68k_port1_r));
/* synchronization */
m_rddsp32_sync[0] = m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x21fe00, 0x21fe03, FUNC(rddsp32_sync0_w));
m_rddsp32_sync[1] = m_dsp32->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x21ff00, 0x21ff03, FUNC(rddsp32_sync1_w));
m_rddsp32_sync[0] = m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x21fe00, 0x21fe03, FUNC(rddsp32_sync0_w));
m_rddsp32_sync[1] = m_dsp32->space(AS_PROGRAM)->install_legacy_write_handler(0x21ff00, 0x21ff03, FUNC(rddsp32_sync1_w));
/* set up protection hacks */
m_gsp_protection = m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff916c0, 0xfff916cf, FUNC(hdgsp_protection_w));
m_gsp_protection = m_gsp->space(AS_PROGRAM)->install_legacy_write_handler(0xfff916c0, 0xfff916cf, FUNC(hdgsp_protection_w));
/* set up adsp speedup handlers */
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1f9a, 0x1f9a, FUNC(hdds3_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
m_adsp->space(AS_DATA)->install_legacy_read_handler(0x1f9a, 0x1f9a, FUNC(hdds3_speedup_r));
m_ds3_speedup_addr = &m_adsp_data_memory[0x1f9a];
m_ds3_speedup_pc = 0x2d9;
m_ds3_transfer_pc = 0X407da;

View File

@ -3399,7 +3399,7 @@ static MACHINE_RESET( lhzb2a )
{
igs017_state *state = machine.driver_data<igs017_state>();
MACHINE_RESET_CALL( mgcs );
state->lhzb2a_input_addr_w(*state->m_maincpu->memory().space(AS_PROGRAM), 0, 0xf0);
state->lhzb2a_input_addr_w(*state->m_maincpu->space(AS_PROGRAM), 0, 0xf0);
}
static MACHINE_CONFIG_START( lhzb2a, igs017_state )

View File

@ -761,9 +761,9 @@ WRITE16_MEMBER( magictg_state::adsp_control_w )
UINT32 src_addr = (page << 14) | m_adsp_regs.bdma_external_addr;
if (type == 0)
addr_space = m_adsp->memory().space(AS_PROGRAM);
addr_space = m_adsp->space(AS_PROGRAM);
else
addr_space = m_adsp->memory().space(AS_DATA);
addr_space = m_adsp->space(AS_DATA);
if (dir == 0)
{

View File

@ -133,7 +133,7 @@ READ16_MEMBER(metro_state::metro_irq_cause_r)
static void update_irq_state( running_machine &machine )
{
metro_state *state = machine.driver_data<metro_state>();
address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *space = state->m_maincpu->space(AS_PROGRAM);
/* Get the pending IRQs (only the enabled ones, e.g. where irq_enable is *0*) */
UINT16 irq = state->metro_irq_cause_r(*space, 0, 0xffff) & ~*state->m_irq_enable;
@ -266,7 +266,7 @@ static void ymf278b_interrupt( device_t *device, int active )
static int metro_io_callback( device_t *device, int ioline, int state )
{
metro_state *driver_state = device->machine().driver_data<metro_state>();
address_space *space = driver_state->m_maincpu->memory().space(AS_PROGRAM);
address_space *space = driver_state->m_maincpu->space(AS_PROGRAM);
UINT8 data = 0;
switch (ioline)

View File

@ -251,7 +251,7 @@ static void intel82439tx_pci_w(device_t *busdevice, device_t *device, int functi
static UINT8 piix4_config_r(device_t *busdevice, device_t *device, int function, int reg)
{
address_space *space = busdevice->machine().firstcpu->memory().space( AS_PROGRAM );
address_space *space = busdevice->machine().firstcpu->space( AS_PROGRAM );
midqslvr_state *state = busdevice->machine().driver_data<midqslvr_state>();
function &= 3;

View File

@ -872,8 +872,8 @@ static void supergm3_set_bank(running_machine &machine)
state->m_supergm3_chr_bank == 0x40 )
{
// VRAM
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x0000, 0x1fff, "bank1");
ppu->memory().space(AS_PROGRAM)->install_write_bank(0x0000, 0x1fff, "bank1");
ppu->space(AS_PROGRAM)->install_read_bank(0x0000, 0x1fff, "bank1");
ppu->space(AS_PROGRAM)->install_write_bank(0x0000, 0x1fff, "bank1");
state->membank("bank1")->set_base(state->m_vram);
if (state->m_supergm3_chr_bank == 0x40)
@ -881,15 +881,15 @@ static void supergm3_set_bank(running_machine &machine)
}
else
{
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x0000, 0x03ff, "bank2");
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x0400, 0x07ff, "bank3");
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x0800, 0x0bff, "bank4");
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x0c00, 0x0fff, "bank5");
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x1000, 0x13ff, "bank6");
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x1400, 0x17ff, "bank7");
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x1800, 0x1bff, "bank8");
ppu->memory().space(AS_PROGRAM)->install_read_bank(0x1c00, 0x1fff, "bank9");
ppu->memory().space(AS_PROGRAM)->unmap_write(0x0000, 0x1fff);
ppu->space(AS_PROGRAM)->install_read_bank(0x0000, 0x03ff, "bank2");
ppu->space(AS_PROGRAM)->install_read_bank(0x0400, 0x07ff, "bank3");
ppu->space(AS_PROGRAM)->install_read_bank(0x0800, 0x0bff, "bank4");
ppu->space(AS_PROGRAM)->install_read_bank(0x0c00, 0x0fff, "bank5");
ppu->space(AS_PROGRAM)->install_read_bank(0x1000, 0x13ff, "bank6");
ppu->space(AS_PROGRAM)->install_read_bank(0x1400, 0x17ff, "bank7");
ppu->space(AS_PROGRAM)->install_read_bank(0x1800, 0x1bff, "bank8");
ppu->space(AS_PROGRAM)->install_read_bank(0x1c00, 0x1fff, "bank9");
ppu->space(AS_PROGRAM)->unmap_write(0x0000, 0x1fff);
set_videorom_bank(machine, 0, 8, 0, 8);
}

View File

@ -2691,7 +2691,7 @@ READ8_MEMBER(namcos22_state::propcycle_mcu_adc_r)
int i;
for (i = 0; i < 16; i++)
{
generic_pulse_irq_line(m_mcu->execute(), M37710_LINE_TIMERA3TICK, 1);
generic_pulse_irq_line(*m_mcu, M37710_LINE_TIMERA3TICK, 1);
}
}
@ -5448,7 +5448,7 @@ static void install_c74_speedup(running_machine &machine)
{
namcos22_state *state = machine.driver_data<namcos22_state>();
if (MCU_SPEEDUP)
state->m_mcu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x80, 0x81, read16_delegate(FUNC(namcos22_state::mcuc74_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
state->m_mcu->space(AS_PROGRAM)->install_readwrite_handler(0x80, 0x81, read16_delegate(FUNC(namcos22_state::mcuc74_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
}
static void install_130_speedup(running_machine &machine)
@ -5456,7 +5456,7 @@ static void install_130_speedup(running_machine &machine)
namcos22_state *state = machine.driver_data<namcos22_state>();
// install speedup cheat for 1.30 MCU BIOS
if (MCU_SPEEDUP)
state->m_mcu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu130_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
state->m_mcu->space(AS_PROGRAM)->install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu130_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
}
static void install_141_speedup(running_machine &machine)
@ -5464,7 +5464,7 @@ static void install_141_speedup(running_machine &machine)
namcos22_state *state = machine.driver_data<namcos22_state>();
// install speedup cheat for 1.41 MCU BIOS
if (MCU_SPEEDUP)
state->m_mcu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu141_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
state->m_mcu->space(AS_PROGRAM)->install_readwrite_handler(0x82, 0x83, read16_delegate(FUNC(namcos22_state::mcu141_speedup_r),state), write16_delegate(FUNC(namcos22_state::mcu_speedup_w),state));
}
static void namcos22_init( running_machine &machine, int game_type )
@ -5487,8 +5487,8 @@ static void alpine_init_common( running_machine &machine, int game_type )
namcos22_state *state = machine.driver_data<namcos22_state>();
namcos22_init(machine, game_type);
state->m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::alpineracer_mcu_adc_r),state));
state->m_mcu->memory().space(AS_IO)->install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::alpine_mcu_port5_w),state));
state->m_mcu->space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::alpineracer_mcu_adc_r),state));
state->m_mcu->space(AS_IO)->install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::alpine_mcu_port5_w),state));
state->m_motor_timer = machine.scheduler().timer_alloc(FUNC(alpine_steplock_callback));
state->m_motor_timer->reset();
@ -5517,8 +5517,8 @@ DRIVER_INIT_MEMBER(namcos22_state,alpinesa)
{
alpine_init_common(machine(), NAMCOS22_ALPINE_SURFER);
m_maincpu->memory().space(AS_PROGRAM)->install_read_handler (0x200000, 0x200003, read32_delegate(FUNC(namcos22_state::alpinesa_prot_r),this));
m_maincpu->memory().space(AS_PROGRAM)->install_write_handler(0x300000, 0x300003, write32_delegate(FUNC(namcos22_state::alpinesa_prot_w),this));
m_maincpu->space(AS_PROGRAM)->install_read_handler (0x200000, 0x200003, read32_delegate(FUNC(namcos22_state::alpinesa_prot_r),this));
m_maincpu->space(AS_PROGRAM)->install_write_handler(0x300000, 0x300003, write32_delegate(FUNC(namcos22_state::alpinesa_prot_w),this));
install_141_speedup(machine());
m_keycus_id = 0x01a9;
@ -5529,7 +5529,7 @@ DRIVER_INIT_MEMBER(namcos22_state,airco22)
namcos22_init(machine(), NAMCOS22_AIR_COMBAT22);
// S22-BIOS ver1.20 namco all rights reserved 94/12/21
m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::airco22_mcu_adc_r),this));
m_mcu->space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::airco22_mcu_adc_r),this));
}
DRIVER_INIT_MEMBER(namcos22_state,propcycl)
@ -5552,8 +5552,8 @@ DRIVER_INIT_MEMBER(namcos22_state,propcycl)
// pROM[0x22296/4] |= 0x00004e75;
namcos22_init(machine(), NAMCOS22_PROP_CYCLE);
m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::propcycle_mcu_adc_r),this));
m_mcu->memory().space(AS_IO)->install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::propcycle_mcu_port5_w),this));
m_mcu->space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::propcycle_mcu_adc_r),this));
m_mcu->space(AS_IO)->install_write_handler(M37710_PORT5, M37710_PORT5, write8_delegate(FUNC(namcos22_state::propcycle_mcu_port5_w),this));
install_141_speedup(machine());
}
@ -5613,7 +5613,7 @@ DRIVER_INIT_MEMBER(namcos22_state,cybrcyc)
{
namcos22_init(machine(), NAMCOS22_CYBER_CYCLES);
m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),this));
m_mcu->space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),this));
install_130_speedup(machine());
m_keycus_id = 0x0387;
@ -5630,7 +5630,7 @@ DRIVER_INIT_MEMBER(namcos22_state,tokyowar)
{
namcos22_init(machine(), NAMCOS22_TOKYO_WARS);
m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::tokyowar_mcu_adc_r),this));
m_mcu->space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::tokyowar_mcu_adc_r),this));
install_141_speedup(machine());
m_keycus_id = 0x01a8;
@ -5639,7 +5639,7 @@ DRIVER_INIT_MEMBER(namcos22_state,tokyowar)
DRIVER_INIT_MEMBER(namcos22_state,aquajet)
{
namcos22_init(machine(), NAMCOS22_AQUA_JET);
m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::aquajet_mcu_adc_r),this));
m_mcu->space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::aquajet_mcu_adc_r),this));
install_141_speedup(machine());
}
@ -5647,7 +5647,7 @@ DRIVER_INIT_MEMBER(namcos22_state,dirtdash)
{
namcos22_init(machine(), NAMCOS22_DIRT_DASH);
m_mcu->memory().space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),this));
m_mcu->space(AS_IO)->install_read_handler(M37710_ADC0_L, M37710_ADC7_H, read8_delegate(FUNC(namcos22_state::cybrcycc_mcu_adc_r),this));
install_141_speedup(machine());
m_keycus_id = 0x01a2;

View File

@ -389,7 +389,7 @@ static MACHINE_RESET( mschamp )
static MACHINE_RESET( superabc )
{
pacman_state *state = machine.driver_data<pacman_state>();
state->superabc_bank_w(*state->m_maincpu->memory().space(AS_PROGRAM), 0, 0);
state->superabc_bank_w(*state->m_maincpu->space(AS_PROGRAM), 0, 0);
}
@ -5745,7 +5745,7 @@ ROM_END
static void maketrax_rom_decode(running_machine &machine)
{
pacman_state *state = machine.driver_data<pacman_state>();
address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *space = state->m_maincpu->space(AS_PROGRAM);
UINT8 *decrypted = auto_alloc_array(machine, UINT8, 0x4000);
UINT8 *rom = machine.root_device().memregion("maincpu")->base();
@ -5769,8 +5769,8 @@ static void maketrax_rom_decode(running_machine &machine)
DRIVER_INIT_MEMBER(pacman_state,maketrax)
{
/* set up protection handlers */
m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x5080, 0x50bf, read8_delegate(FUNC(pacman_state::maketrax_special_port2_r),this));
m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x50c0, 0x50ff, read8_delegate(FUNC(pacman_state::maketrax_special_port3_r),this));
m_maincpu->space(AS_PROGRAM)->install_read_handler(0x5080, 0x50bf, read8_delegate(FUNC(pacman_state::maketrax_special_port2_r),this));
m_maincpu->space(AS_PROGRAM)->install_read_handler(0x50c0, 0x50ff, read8_delegate(FUNC(pacman_state::maketrax_special_port3_r),this));
maketrax_rom_decode(machine());
}
@ -5778,7 +5778,7 @@ DRIVER_INIT_MEMBER(pacman_state,maketrax)
static void korosuke_rom_decode(running_machine &machine)
{
pacman_state *state = machine.driver_data<pacman_state>();
address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *space = state->m_maincpu->space(AS_PROGRAM);
UINT8 *decrypted = auto_alloc_array(machine, UINT8, 0x4000);
UINT8 *rom = machine.root_device().memregion("maincpu")->base();
@ -5802,8 +5802,8 @@ static void korosuke_rom_decode(running_machine &machine)
DRIVER_INIT_MEMBER(pacman_state,korosuke)
{
/* set up protection handlers */
m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x5080, 0x5080, read8_delegate(FUNC(pacman_state::korosuke_special_port2_r),this));
m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x50c0, 0x50ff, read8_delegate(FUNC(pacman_state::korosuke_special_port3_r),this));
m_maincpu->space(AS_PROGRAM)->install_read_handler(0x5080, 0x5080, read8_delegate(FUNC(pacman_state::korosuke_special_port2_r),this));
m_maincpu->space(AS_PROGRAM)->install_read_handler(0x50c0, 0x50ff, read8_delegate(FUNC(pacman_state::korosuke_special_port3_r),this));
korosuke_rom_decode(machine());
}
@ -6105,7 +6105,7 @@ READ8_MEMBER(pacman_state::mspacii_protection_r)
DRIVER_INIT_MEMBER(pacman_state,mspacii)
{
// protection
m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x504d, 0x506f, read8_delegate(FUNC(pacman_state::mspacii_protection_r), this));
m_maincpu->space(AS_PROGRAM)->install_read_handler(0x504d, 0x506f, read8_delegate(FUNC(pacman_state::mspacii_protection_r), this));
}
DRIVER_INIT_MEMBER(pacman_state,superabc)
@ -6166,10 +6166,10 @@ DRIVER_INIT_MEMBER(pacman_state,cannonbp)
{
/* extra memory */
m_maincpu->memory().space(AS_PROGRAM)->install_ram(0x4800, 0x4bff);
m_maincpu->space(AS_PROGRAM)->install_ram(0x4800, 0x4bff);
/* protection? */
m_maincpu->memory().space(AS_PROGRAM)->install_read_handler(0x3000, 0x3fff, read8_delegate(FUNC(pacman_state::cannonbp_protection_r),this));
m_maincpu->space(AS_PROGRAM)->install_read_handler(0x3000, 0x3fff, read8_delegate(FUNC(pacman_state::cannonbp_protection_r),this));
}

View File

@ -323,7 +323,7 @@ INPUT_CHANGED_MEMBER(pntnpuzl_state::coin_inserted)
/* TODO: change this! */
if(newval)
generic_pulse_irq_line(m_maincpu->execute(), (UINT8)(FPTR)param, 1);
generic_pulse_irq_line(*m_maincpu, (UINT8)(FPTR)param, 1);
}
static INPUT_PORTS_START( pntnpuzl )

View File

@ -511,8 +511,8 @@ void ridleofp_state::driver_start()
{
systeme_state::driver_start();
m_maincpu->memory().space(AS_IO)->install_read_handler(0xf8, 0xf8, read8_delegate(FUNC(systeme_state::ridleofp_port_f8_read), this));
m_maincpu->memory().space(AS_IO)->install_write_handler(0xfa, 0xfa, write8_delegate(FUNC(systeme_state::ridleofp_port_fa_write), this));
m_maincpu->space(AS_IO)->install_read_handler(0xf8, 0xf8, read8_delegate(FUNC(systeme_state::ridleofp_port_f8_read), this));
m_maincpu->space(AS_IO)->install_write_handler(0xfa, 0xfa, write8_delegate(FUNC(systeme_state::ridleofp_port_fa_write), this));
}
@ -520,8 +520,8 @@ void hangonjr_state::driver_start()
{
systeme_state::driver_start();
m_maincpu->memory().space(AS_IO)->install_read_handler(0xf8, 0xf8, read8_delegate(FUNC(systeme_state::hangonjr_port_f8_read), this));
m_maincpu->memory().space(AS_IO)->install_write_handler(0xfa, 0xfa, write8_delegate(FUNC(systeme_state::hangonjr_port_fa_write), this));
m_maincpu->space(AS_IO)->install_read_handler(0xf8, 0xf8, read8_delegate(FUNC(systeme_state::hangonjr_port_f8_read), this));
m_maincpu->space(AS_IO)->install_write_handler(0xfa, 0xfa, write8_delegate(FUNC(systeme_state::hangonjr_port_fa_write), this));
}

View File

@ -135,7 +135,7 @@ static TIMER_CALLBACK( snes_reset_oam_address )
{
snes_state *state = machine.driver_data<snes_state>();
// make sure we're in the 65816's context since we're messing with the OAM and stuff
address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *space = state->m_maincpu->space(AS_PROGRAM);
if (!(snes_ppu.screen_disabled)) //Reset OAM address, byuu says it happens at H=10
{
@ -148,14 +148,14 @@ static TIMER_CALLBACK( snes_reset_oam_address )
static TIMER_CALLBACK( snes_reset_hdma )
{
snes_state *state = machine.driver_data<snes_state>();
address_space *cpu0space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *cpu0space = state->m_maincpu->space(AS_PROGRAM);
snes_hdma_init(cpu0space);
}
static TIMER_CALLBACK( snes_update_io )
{
snes_state *state = machine.driver_data<snes_state>();
address_space *cpu0space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *cpu0space = state->m_maincpu->space(AS_PROGRAM);
state->m_io_read(cpu0space->machine());
snes_ram[HVBJOY] &= 0xfe; /* Clear busy bit */
@ -233,7 +233,7 @@ static TIMER_CALLBACK( snes_scanline_tick )
// hdma reset happens at scanline 0, H=~6
if (snes_ppu.beam.current_vert == 0)
{
address_space *cpu0space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *cpu0space = state->m_maincpu->space(AS_PROGRAM);
snes_hdma_init(cpu0space);
}
@ -257,7 +257,7 @@ static TIMER_CALLBACK( snes_scanline_tick )
static TIMER_CALLBACK( snes_hblank_tick )
{
snes_state *state = machine.driver_data<snes_state>();
address_space *cpu0space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *cpu0space = state->m_maincpu->space(AS_PROGRAM);
int nextscan;
snes_ppu.beam.current_vert = machine.primary_screen->vpos();

View File

@ -2818,7 +2818,7 @@ SCREEN_UPDATE_RGB32( namcos22s )
FILE *f = fopen( "dump.txt", "wb" );
if( f )
{
address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *space = state->m_maincpu->space(AS_PROGRAM);
if (1) // czram
{
@ -2883,7 +2883,7 @@ SCREEN_UPDATE_RGB32( namcos22 )
FILE *f = fopen( "dump.txt", "wb" );
if( f )
{
address_space *space = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *space = state->m_maincpu->space(AS_PROGRAM);
//Dump(space, f,0x90000000, 0x90000003, "led?" );
Dump(space, f,0x90010000, 0x90017fff, "cz_ram");

View File

@ -220,7 +220,7 @@ READ8_MEMBER( a5105_state::a5105_memsel_r )
WRITE8_MEMBER( a5105_state::a5105_memsel_w )
{
address_space *prog = m_maincpu->memory().space( AS_PROGRAM );
address_space *prog = m_maincpu->space( AS_PROGRAM );
if (m_memsel[0] != ((data & 0x03) >> 0))
{
@ -455,7 +455,7 @@ INPUT_PORTS_END
MACHINE_RESET_MEMBER(a5105_state)
{
address_space *space = m_maincpu->memory().space(AS_PROGRAM);
address_space *space = m_maincpu->space(AS_PROGRAM);
a5105_ab_w(*space, 0, 9); // turn motor off
beep_set_frequency(m_beep, 500);

View File

@ -604,7 +604,7 @@ static TIMER_CALLBACK( flyback_timer_callback )
void a7000_state::viddma_transfer_start()
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
UINT32 src = m_viddma_addr_start;
UINT32 dst = 0;
UINT32 size = m_viddma_addr_end;

View File

@ -182,7 +182,7 @@ UINT8 abc1600_state::read_ram(offs_t offset)
else if (offset < 0x180000)
{
// video RAM
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
data = video_ram_r(*program, offset);
}
else
@ -209,7 +209,7 @@ void abc1600_state::write_ram(offs_t offset, UINT8 data)
else if (offset < 0x180000)
{
// video RAM
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
video_ram_w(*program, offset, data);
}
else
@ -242,7 +242,7 @@ UINT8 abc1600_state::read_io(offs_t offset)
UINT8 abc1600_state::read_internal_io(offs_t offset)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 data = 0;
if (X11)
@ -467,7 +467,7 @@ void abc1600_state::write_io(offs_t offset, UINT8 data)
void abc1600_state::write_internal_io(offs_t offset, UINT8 data)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
if (X11)
{
@ -770,7 +770,7 @@ void abc1600_state::write_user_memory(offs_t offset, UINT8 data)
UINT8 abc1600_state::read_supervisor_memory(offs_t offset)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 data = 0;
if (!A2 && !A1)
@ -799,7 +799,7 @@ UINT8 abc1600_state::read_supervisor_memory(offs_t offset)
void abc1600_state::write_supervisor_memory(offs_t offset, UINT8 data)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
if (!A2 && !A1)
{
@ -1879,7 +1879,7 @@ void abc1600_state::machine_start()
void abc1600_state::machine_reset()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
// clear special control register
for (int i = 0; i < 8; i++)

View File

@ -192,7 +192,7 @@ READ8_MEMBER( abc802_state::pling_r )
void abc800_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
if (m_fetch_charram)
{
@ -213,7 +213,7 @@ void abc800_state::bankswitch()
void abc802_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
if (m_lrs)
{
@ -235,7 +235,7 @@ void abc802_state::bankswitch()
void abc806_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT32 videoram_mask = m_ram->size() - (32 * 1024) - 1;
int bank;
char bank_name[10];

View File

@ -590,7 +590,7 @@ static Z80PIO_INTERFACE( pio_intf )
void ace_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* configure RAM */
switch (m_ram->size())

View File

@ -245,7 +245,7 @@ enum
void adam_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
switch (m_mioc & 0x03)

View File

@ -256,7 +256,7 @@ static const mc6845_interface apricot_mc6845_intf =
DRIVER_INIT_MEMBER(apricot_state,apricot)
{
address_space *prg = m_maincpu->memory().space(AS_PROGRAM);
address_space *prg = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
UINT32 ram_size = m_ram->size();

View File

@ -32,7 +32,7 @@
UINT32 f1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int lines = m_200_256 ? 200 : 256;
for (int y = 0; y < lines; y++)

View File

@ -67,7 +67,7 @@ void st_state::flush_dma_fifo()
if (m_fdc_fifo_empty[m_fdc_fifo_sel]) return;
if (m_fdc_dmabytes) {
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
for (int i = 0; i < 8; i++) {
UINT16 data = m_fdc_fifo[m_fdc_fifo_sel][i];
@ -98,7 +98,7 @@ void st_state::flush_dma_fifo()
void st_state::fill_dma_fifo()
{
if (m_fdc_dmabytes) {
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
for (int i = 0; i < 8; i++) {
UINT16 data = program->read_word(m_dma_base);
@ -2142,7 +2142,7 @@ static IRQ_CALLBACK( atarist_int_ack )
void st_state::configure_memory()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
switch (m_ram->size())
{
@ -2292,7 +2292,7 @@ void megaste_state::machine_start()
void stbook_state::machine_start()
{
/* configure RAM banking */
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
switch (m_ram->size())
{

View File

@ -123,7 +123,7 @@ Hardware: PPIA 8255
void atom_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *eprom = memregion(EXTROM_TAG)->base() + (m_eprom << 12);
@ -648,7 +648,7 @@ void atom_state::machine_start()
generator. I don't know if this is hardware, or random data because the
ram chips are not cleared at start-up. So at this time, these numbers
are poked into the memory to simulate it. When I have more details I will fix it */
UINT8 *m_baseram = (UINT8 *)m_maincpu->memory().space(AS_PROGRAM)->get_write_ptr(0x0000);
UINT8 *m_baseram = (UINT8 *)m_maincpu->space(AS_PROGRAM)->get_write_ptr(0x0000);
m_baseram[0x08] = machine().rand() & 0x0ff;
m_baseram[0x09] = machine().rand() & 0x0ff;

View File

@ -158,7 +158,7 @@ static RP5C01_INTERFACE( rtc_intf )
void avigo_state::refresh_memory(UINT8 bank, UINT8 chip_select)
{
address_space* space = m_maincpu->memory().space(AS_PROGRAM);
address_space* space = m_maincpu->space(AS_PROGRAM);
int &active_flash = (bank == 1 ? m_flash_at_0x4000 : m_flash_at_0x8000);
char bank_tag[6];
@ -830,7 +830,7 @@ static TIMER_DEVICE_CALLBACK( avigo_1hz_timer )
static QUICKLOAD_LOAD(avigo)
{
avigo_state *state = image.device().machine().driver_data<avigo_state>();
address_space* flash1 = state->m_flashes[1]->memory().space(0);
address_space* flash1 = state->m_flashes[1]->space(0);
const char *systemname = image.device().machine().system().name;
UINT32 first_app_page = (0x50000>>14);
int app_page;

View File

@ -415,7 +415,7 @@ static TIMER_DEVICE_CALLBACK( ctc_tick )
WRITE_LINE_MEMBER( bigbord2_state::frame )
{
address_space *space = m_maincpu->memory().space(AS_PROGRAM);
address_space *space = m_maincpu->space(AS_PROGRAM);
static UINT8 framecnt;
framecnt++;

View File

@ -634,7 +634,7 @@ static MACHINE_START(bml3)
void bml3_state::machine_reset()
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
/* defaults */
mem->install_rom(0xa000, 0xfeff,mem->machine().root_device().memregion("maincpu")->base() + 0xa000);
@ -698,7 +698,7 @@ const mc6843_interface bml3_6843_if = { NULL };
WRITE8_MEMBER(bml3_state::bml3_piaA_w)
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
/* ROM banking:
-0-- --0- 0xa000 - 0xbfff ROM R RAM W
-1-- --0- 0xa000 - 0xbfff RAM R/W

View File

@ -51,7 +51,7 @@
void bw12_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
switch (m_bank)
{

View File

@ -51,7 +51,7 @@ void bw2_state::bankswitch(UINT8 data)
*/
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int max_ram_bank = 0;
@ -133,7 +133,7 @@ void bw2_state::ramcard_bankswitch(UINT8 data)
*/
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int max_ram_bank = BANK_RAM1;
@ -200,7 +200,7 @@ void bw2_state::ramcard_bankswitch(UINT8 data)
WRITE8_MEMBER( bw2_state::ramcard_bank_w )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 ramcard_bank = data & 0x0f;
UINT32 bank_offset = ramcard_bank * 0x8000;

View File

@ -849,12 +849,12 @@ static CBM_IEC_INTERFACE( iec_intf )
READ8_MEMBER( c64_state::exp_dma_r )
{
return m_maincpu->memory().space(AS_PROGRAM)->read_byte(offset);
return m_maincpu->space(AS_PROGRAM)->read_byte(offset);
}
WRITE8_MEMBER( c64_state::exp_dma_w )
{
m_maincpu->memory().space(AS_PROGRAM)->write_byte(offset, data);
m_maincpu->space(AS_PROGRAM)->write_byte(offset, data);
}
WRITE_LINE_MEMBER( c64_state::exp_irq_w )

View File

@ -127,7 +127,7 @@ WRITE8_MEMBER( camplynx_state::lynx48k_bank_w )
WRITE8_MEMBER( camplynx_state::lynx128k_bank_w )
{
/* get address space */
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
UINT8 *base = mem->machine().root_device().memregion("maincpu")->base();
/* Set read banks */
@ -328,7 +328,7 @@ INPUT_PORTS_END
static MACHINE_RESET( lynx128k )
{
camplynx_state *state = machine.driver_data<camplynx_state>();
address_space *mem = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = state->m_maincpu->space(AS_PROGRAM);
mem->install_read_bank (0x0000, 0x1fff, "bank1");
mem->install_read_bank (0x2000, 0x3fff, "bank2");
mem->install_read_bank (0x4000, 0x5fff, "bank3");

View File

@ -252,7 +252,7 @@ INPUT_CHANGED_MEMBER( cosmicos_state::clear_data )
void cosmicos_state::set_ram_mode()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
if (m_ram_disable)
@ -486,7 +486,7 @@ static COSMAC_INTERFACE( cosmicos_config )
void cosmicos_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* initialize LED display */
m_led->rbi_w(1);

View File

@ -154,7 +154,7 @@ READ32_MEMBER( cxhumax_state::cx_scratch_r )
//we're in disabled debug_printf
unsigned char* buf = (unsigned char *)alloca(200);
unsigned char temp;
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
memset(buf,0,200);

View File

@ -236,7 +236,7 @@ static CDP1861_INTERFACE( elf2_cdp1861_intf )
void elf2_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* initialize LED displays */
m_led_l->rbi_w(1);

View File

@ -190,7 +190,7 @@ static const serial_terminal_interface terminal_intf =
void exp85_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* setup memory banking */
program->install_read_bank(0x0000, 0x07ff, "bank1");

View File

@ -295,7 +295,7 @@ WRITE8_MEMBER( fk1_state::fk1_intr_w )
READ8_MEMBER( fk1_state::fk1_bank_ram_r )
{
address_space *space_mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *space_mem = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer();
space_mem->install_write_bank(0x0000, 0x3fff, "bank1");
@ -306,7 +306,7 @@ READ8_MEMBER( fk1_state::fk1_bank_ram_r )
READ8_MEMBER( fk1_state::fk1_bank_rom_r )
{
address_space *space_mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *space_mem = m_maincpu->space(AS_PROGRAM);
space_mem->unmap_write(0x0000, 0x3fff);
membank("bank1")->set_base(machine().root_device().memregion("maincpu")->base());
membank("bank2")->set_base(machine().device<ram_device>(RAM_TAG)->pointer() + 0x10000);
@ -425,7 +425,7 @@ static TIMER_DEVICE_CALLBACK( vsync_callback )
MACHINE_RESET_MEMBER( fk1_state )
{
address_space *space = m_maincpu->memory().space(AS_PROGRAM);
address_space *space = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = machine().device<ram_device>(RAM_TAG)->pointer();
space->unmap_write(0x0000, 0x3fff);

View File

@ -171,7 +171,7 @@ WRITE8_MEMBER( fp1100_state::irq_mask_w )
irq_mask = data;
///printf("%02x\n",data);
// FIXME - the below 2 lines are needed, otherwise nothing ever gets written to videoram
address_space *mem = m_subcpu->memory().space(AS_PROGRAM);
address_space *mem = m_subcpu->space(AS_PROGRAM);
data = mem->read_byte(0xe800);
}

View File

@ -104,7 +104,7 @@ READ8_MEMBER( pc8201_state::bank_r )
void pc8201_state::bankswitch(UINT8 data)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int rom_bank = data & 0x03;
int ram_bank = (data >> 2) & 0x03;
@ -454,7 +454,7 @@ READ8_MEMBER( kc85_state::keyboard_r )
void tandy200_state::bankswitch(UINT8 data)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int rom_bank = data & 0x03;
int ram_bank = (data >> 2) & 0x03;
@ -1127,7 +1127,7 @@ static const i8251_interface tandy200_uart_intf =
void kc85_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* initialize RTC */
m_rtc->cs_w(1);
@ -1194,7 +1194,7 @@ void pc8201_state::machine_start()
void trsm100_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* initialize RTC */
m_rtc->cs_w(1);

View File

@ -296,7 +296,7 @@ static const z80_daisy_config lc80_daisy_chain[] =
void lc80_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* setup memory banking */
membank("bank1")->configure_entry(0, memregion(Z80_TAG)->base()); // TODO

View File

@ -617,7 +617,7 @@ static const z80_daisy_config m5_daisy_chain[] =
void m5_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
// configure RAM
switch (m_ram->size())

View File

@ -26,7 +26,7 @@
void mc1000_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* MC6845 video RAM */
membank("bank2")->set_entry(m_mc6845_bank);
@ -323,7 +323,7 @@ static const ay8910_interface ay8910_intf =
void mc1000_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* setup memory banking */
UINT8 *rom = memregion(Z80_TAG)->base();

View File

@ -164,12 +164,12 @@ WRITE8_MEMBER( micronic_state::bank_select_w )
if (data < 2)
{
membank("bank1")->set_entry(data);
m_maincpu->memory().space(AS_PROGRAM)->unmap_write(0x0000, 0x7fff);
m_maincpu->space(AS_PROGRAM)->unmap_write(0x0000, 0x7fff);
}
else
{
membank("bank1")->set_entry((data <= m_banks_num) ? data : m_banks_num);
m_maincpu->memory().space(AS_PROGRAM)->install_write_bank(0x0000, 0x7fff, "bank1");
m_maincpu->space(AS_PROGRAM)->install_write_bank(0x0000, 0x7fff, "bank1");
}
}
@ -342,7 +342,7 @@ void micronic_state::machine_start()
void micronic_state::machine_reset()
{
membank("bank1")->set_entry(0);
m_maincpu->memory().space(AS_PROGRAM)->unmap_write(0x0000, 0x7fff);
m_maincpu->space(AS_PROGRAM)->unmap_write(0x0000, 0x7fff);
}

View File

@ -757,7 +757,7 @@ void mm1_state::machine_start()
void mm1_state::machine_reset()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int i;
// reset LS259

View File

@ -479,7 +479,7 @@ DIRECT_UPDATE_MEMBER(mpf1_state::mpf1_direct_update_handler)
DRIVER_INIT_MEMBER(mpf1_state,mpf1)
{
m_maincpu->memory().space(AS_PROGRAM)->set_direct_update_handler(direct_update_delegate(FUNC(mpf1_state::mpf1_direct_update_handler), this));
m_maincpu->space(AS_PROGRAM)->set_direct_update_handler(direct_update_delegate(FUNC(mpf1_state::mpf1_direct_update_handler), this));
}
COMP( 1979, mpf1, 0, 0, mpf1, mpf1, mpf1_state, mpf1, "Multitech", "Micro Professor 1", 0)

View File

@ -65,7 +65,7 @@ INPUT_PORTS_END
void msbc1_state::machine_reset()
{
void *ram = machine().firstcpu->memory().space(AS_PROGRAM)->get_write_ptr(0);
void *ram = machine().firstcpu->space(AS_PROGRAM)->get_write_ptr(0);
UINT8 *rom = memregion(MC68000R12_TAG)->base();
memcpy(ram, rom, 8);

View File

@ -173,7 +173,7 @@ UINT32 mstation_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
void mstation_state::refresh_memory(UINT8 bank, UINT8 chip_select)
{
address_space* program = m_maincpu->memory().space(AS_PROGRAM);
address_space* program = m_maincpu->space(AS_PROGRAM);
int &active_flash = (bank == 1 ? m_flash_at_0x4000 : m_flash_at_0x8000);
char bank_tag[6];

View File

@ -66,7 +66,7 @@ void newbrain_state::check_interrupt()
void newbrain_eim_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int bank;
for (bank = 1; bank < 9; bank++)
@ -104,7 +104,7 @@ void newbrain_eim_state::bankswitch()
void newbrain_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int bank;
for (bank = 1; bank < 9; bank++)

View File

@ -304,7 +304,7 @@ void next_state::dma_drq_w(int slot, bool state)
dma_slot &ds = dma_slots[slot];
ds.drq = state;
if(state && (ds.state & DMA_ENABLE)) {
address_space *space = maincpu->memory().space(AS_PROGRAM);
address_space *space = maincpu->space(AS_PROGRAM);
if(ds.state & DMA_READ) {
while(ds.drq) {
dma_check_update(slot);

View File

@ -288,7 +288,7 @@ static serial_terminal_interface terminal_intf =
void ob68k1a_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
// configure RAM
switch (m_ram->size())
@ -306,7 +306,7 @@ void ob68k1a_state::machine_start()
void ob68k1a_state::machine_reset()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
// initialize COM8116
// m_dbrg->stt_w(program, 0, 0x01);

View File

@ -674,7 +674,7 @@ static ACIA6850_INTERFACE( osi470_acia_intf )
void sb2m600_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* configure RAM banking */
membank("bank1")->configure_entry(0, memregion(M6502_TAG)->base());
@ -699,7 +699,7 @@ void sb2m600_state::machine_start()
void c1p_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* configure RAM banking */
membank("bank1")->configure_entry(0, memregion(M6502_TAG)->base());

View File

@ -576,7 +576,7 @@ READ8_MEMBER( pasopia7_state::pasopia7_io_r )
if(m_mio_sel)
{
address_space *ram_space = m_maincpu->memory().space(AS_PROGRAM);
address_space *ram_space = m_maincpu->space(AS_PROGRAM);
m_mio_sel = 0;
//printf("%08x\n",offset);
@ -627,7 +627,7 @@ WRITE8_MEMBER( pasopia7_state::pasopia7_io_w )
if(m_mio_sel)
{
address_space *ram_space = m_maincpu->memory().space(AS_PROGRAM);
address_space *ram_space = m_maincpu->space(AS_PROGRAM);
m_mio_sel = 0;
ram_space->write_byte(offset, data);
return;

View File

@ -888,7 +888,7 @@ WRITE_LINE_MEMBER( pc1512_state::eop_w )
READ8_MEMBER( pc1512_state::memr_r )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
offs_t page_offset = m_dma_page[m_dma_channel] << 16;
return program->read_byte(page_offset + offset);
@ -896,7 +896,7 @@ READ8_MEMBER( pc1512_state::memr_r )
WRITE8_MEMBER( pc1512_state::memw_w )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
offs_t page_offset = m_dma_page[m_dma_channel] << 16;
program->write_byte(page_offset + offset, data);
@ -1210,7 +1210,7 @@ void pc1512_state::machine_start()
if (ram_size < 640 * 1024)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
program->unmap_readwrite(ram_size, 0x9ffff);
}

View File

@ -448,14 +448,14 @@ WRITE8_MEMBER( pc8001_state::dma_mem_w )
READ8_MEMBER( pc8001_state::dma_io_r )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
return program->read_byte(offset);
}
WRITE8_MEMBER( pc8001_state::dma_io_w )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
program->write_byte(offset, data);
}
@ -483,7 +483,7 @@ static UPD1990A_INTERFACE( rtc_intf )
void pc8001_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* initialize RTC */
m_rtc->cs_w(1);

View File

@ -72,7 +72,7 @@ static TIMER_DEVICE_CALLBACK( pc8401a_keyboard_tick )
void pc8401a_state::bankswitch(UINT8 data)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int rombank = data & 0x03;
int ram0000 = (data >> 2) & 0x03;

View File

@ -337,7 +337,7 @@ WRITE8_MEMBER( pce220_state::boot_bank_w )
// set to 1 after boot for restore the ram in the first bank
if (data & 0x01)
{
address_space *space_prg = m_maincpu->memory().space(AS_PROGRAM);
address_space *space_prg = m_maincpu->space(AS_PROGRAM);
space_prg->install_write_bank(0x0000, 0x3fff, "bank1");
membank("bank1")->set_entry(0);
}
@ -469,7 +469,7 @@ READ8_MEMBER( pcg850v_state::g850v_bank_r )
WRITE8_MEMBER( pcg850v_state::g850v_bank_w )
{
address_space *space_prg = m_maincpu->memory().space(AS_PROGRAM);
address_space *space_prg = m_maincpu->space(AS_PROGRAM);
if (data < 0x16)
{
@ -872,7 +872,7 @@ void pcg850v_state::machine_start()
void pce220_state::machine_reset()
{
address_space *space = m_maincpu->memory().space(AS_PROGRAM);
address_space *space = m_maincpu->space(AS_PROGRAM);
space->unmap_write(0x0000, 0x3fff);
// install the boot code into the first bank

View File

@ -67,14 +67,14 @@ public:
READ8_MEMBER(pcfx_state::extio_r)
{
address_space *io_space = m_maincpu->memory().space(AS_IO);
address_space *io_space = m_maincpu->space(AS_IO);
return io_space->read_byte(offset);
}
WRITE8_MEMBER(pcfx_state::extio_w)
{
address_space *io_space = m_maincpu->memory().space(AS_IO);
address_space *io_space = m_maincpu->space(AS_IO);
io_space->write_byte(offset, data);
}

View File

@ -802,12 +802,12 @@ static CBM_IEC_INTERFACE( c16_iec_intf )
READ8_MEMBER( plus4_state::exp_dma_r )
{
return m_maincpu->memory().space(AS_PROGRAM)->read_byte(offset);
return m_maincpu->space(AS_PROGRAM)->read_byte(offset);
}
WRITE8_MEMBER( plus4_state::exp_dma_w )
{
m_maincpu->memory().space(AS_PROGRAM)->write_byte(offset, data);
m_maincpu->space(AS_PROGRAM)->write_byte(offset, data);
}
WRITE_LINE_MEMBER( plus4_state::exp_irq_w )

View File

@ -165,7 +165,7 @@ WRITE8_MEMBER( poly_state::kbd_put )
{
m_term_data = data;
//m_term_key = 1;
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
mem->write_byte(0xebec, data); // this has to be 0xecf1 for bios 1
mem->write_byte(0xebd0, 1); // any non-zero here
}

View File

@ -438,7 +438,7 @@ WRITE8_MEMBER( portfolio_state::counter_w )
WRITE8_MEMBER( portfolio_state::ncc1_w )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
if (BIT(data, 0))
{
@ -763,7 +763,7 @@ static DEVICE_IMAGE_LOAD( portfolio_cart )
void portfolio_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* set CPU interrupt vector callback */
device_set_irq_callback(m_maincpu, portfolio_int_ack);
@ -801,7 +801,7 @@ void portfolio_state::machine_start()
void portfolio_state::machine_reset()
{
address_space *io = m_maincpu->memory().space(AS_IO);
address_space *io = m_maincpu->space(AS_IO);
// peripherals
m_pid = ioport("PERIPHERAL")->read();

View File

@ -120,7 +120,7 @@ READ8_MEMBER( prestige_state::bankswitch_r )
WRITE8_MEMBER( prestige_state::bankswitch_w )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
switch (offset)
{

View File

@ -48,7 +48,7 @@
void prof80_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
UINT8 *rom = memregion(Z80_TAG)->base();
int bank;

View File

@ -75,7 +75,7 @@ enum
void px8_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
UINT8 *ipl_rom = memregion(UPD70008_TAG)->base();

View File

@ -941,7 +941,7 @@ void ql_state::machine_start()
void ql_state::machine_reset()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
m_disk_type=ioport(QL_CONFIG_PORT)->read() & DISK_TYPE_MASK;
logerror("disktype=%d\n",m_disk_type);

View File

@ -153,7 +153,7 @@ READ8_MEMBER( rex6000_state::bankswitch_r )
WRITE8_MEMBER( rex6000_state::bankswitch_w )
{
address_space* program = m_maincpu->memory().space(AS_PROGRAM);
address_space* program = m_maincpu->space(AS_PROGRAM);
m_bank[offset&3] = data;
@ -451,7 +451,7 @@ void rex6000_state::machine_start()
}
void rex6000_state::machine_reset()
{
address_space* program = m_maincpu->memory().space(AS_PROGRAM);
address_space* program = m_maincpu->space(AS_PROGRAM);
program->install_readwrite_handler(0x8000, 0x9fff, 0, 0, read8_delegate(FUNC(rex6000_state::flash_0x8000_r), this), write8_delegate(FUNC(rex6000_state::flash_0x8000_w), this));
program->install_readwrite_handler(0xa000, 0xbfff, 0, 0, read8_delegate(FUNC(rex6000_state::flash_0xa000_r), this), write8_delegate(FUNC(rex6000_state::flash_0xa000_w), this));
@ -492,7 +492,7 @@ UINT32 rex6000_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
}
else
{
data = m_flash[mem_type]->memory().space(0)->read_byte(((lcd_bank & 0x7f)<<13) | (y*30 + x));
data = m_flash[mem_type]->space(0)->read_byte(((lcd_bank & 0x7f)<<13) | (y*30 + x));
}

View File

@ -642,7 +642,7 @@ const cassette_interface sc3000_cassette_interface =
void sg1000_state::install_cartridge(UINT8 *ptr, int size)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
switch (size)
{
@ -825,7 +825,7 @@ static DEVICE_IMAGE_LOAD( omv_cart )
void sc3000_state::install_cartridge(UINT8 *ptr, int size)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* include SG-1000 mapping */
sg1000_state::install_cartridge(ptr, size);

View File

@ -30,7 +30,7 @@
void super6_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
UINT8 *rom = memregion(Z80_TAG)->base();

View File

@ -990,7 +990,7 @@ WRITE16_MEMBER( supracan_state::supracan_dma_w )
{
acan_dma_regs_t *acan_dma_regs = &m_acan_dma_regs;
int ch = (offset < 0x10/2) ? 0 : 1;
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
switch(offset)
{
@ -1125,7 +1125,7 @@ ADDRESS_MAP_END
READ8_MEMBER( supracan_state::supracan_6502_soundmem_r )
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
UINT8 data = m_soundram[offset];
switch(offset)
@ -1354,7 +1354,7 @@ static PALETTE_INIT( supracan )
WRITE16_MEMBER( supracan_state::supracan_68k_soundram_w )
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
m_soundram[offset*2 + 1] = data & 0xff;
m_soundram[offset*2 + 0] = data >> 8;
@ -1377,7 +1377,7 @@ WRITE16_MEMBER( supracan_state::supracan_68k_soundram_w )
READ16_MEMBER( supracan_state::supracan_68k_soundram_r )
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
UINT16 val = m_soundram[offset*2 + 0] << 8;
val |= m_soundram[offset*2 + 1];
@ -1451,7 +1451,7 @@ WRITE16_MEMBER( supracan_state::supracan_sound_w )
READ16_MEMBER( supracan_state::supracan_video_r )
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
UINT16 data = m_video_regs[offset];
switch(offset)
@ -1554,7 +1554,7 @@ static TIMER_CALLBACK( supracan_video_callback )
WRITE16_MEMBER( supracan_state::supracan_video_w )
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
acan_sprdma_regs_t *acan_sprdma_regs = &m_acan_sprdma_regs;
int i;

View File

@ -49,7 +49,7 @@ void tandy2k_state::speaker_update()
READ8_MEMBER( tandy2k_state::videoram_r )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
offs_t addr = (m_vram_base << 15) | (offset << 1);
UINT16 data = program->read_word(addr);
@ -319,7 +319,7 @@ UINT32 tandy2k_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
static CRT9007_DRAW_SCANLINE( tandy2k_crt9007_display_pixels )
{
tandy2k_state *state = device->machine().driver_data<tandy2k_state>();
address_space *program = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *program = state->m_maincpu->space(AS_PROGRAM);
for (int sx = 0; sx < x_count; sx++)
{
@ -670,7 +670,7 @@ static TANDY2K_KEYBOARD_INTERFACE( kb_intf )
void tandy2k_state::machine_start()
{
// memory banking
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
int ram_size = m_ram->size();

View File

@ -117,7 +117,7 @@ static TIMER_DEVICE_CALLBACK( keyboard_tick )
void tek4051_state::bankswitch(UINT8 data)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
//int d = data & 0x07;
int lbs = (data >> 3) & 0x07;
@ -1167,7 +1167,7 @@ static IEEE488_INTERFACE( ieee488_intf )
void tek4051_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
// configure RAM
switch (m_ram->size())

View File

@ -44,7 +44,7 @@ WRITE8_MEMBER( tiki100_state::gfxram_w )
void tiki100_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
if (m_vire)
{

View File

@ -167,7 +167,7 @@ WRITE8_MEMBER( nano_state::keylatch_w )
void tmc2000_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
UINT8 *rom = memregion(CDP1802_TAG)->base();
@ -220,7 +220,7 @@ WRITE8_MEMBER( tmc2000_state::bankswitch_w )
WRITE8_MEMBER( nano_state::bankswitch_w )
{
/* enable RAM */
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
program->install_ram(0x0000, 0x0fff, 0, 0x7000, ram);
@ -745,7 +745,7 @@ void nano_state::machine_reset()
m_cti->reset();
/* enable ROM */
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *rom = memregion(CDP1802_TAG)->base();
program->install_rom(0x0000, 0x01ff, 0, 0x7e00, rom);
}

View File

@ -237,7 +237,7 @@ static COSMAC_INTERFACE( cosmac_intf )
void tmc600_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
/* configure RAM */
switch (m_ram->size())

View File

@ -32,7 +32,7 @@
void tvc_state::tvc_set_mem_page(UINT8 data)
{
address_space *space = m_maincpu->memory().space(AS_PROGRAM);
address_space *space = m_maincpu->space(AS_PROGRAM);
switch(data & 0x18)
{
case 0x00 : // system ROM selected

View File

@ -71,7 +71,7 @@ WRITE16_MEMBER( unixpc_state::romlmap_w )
void unixpc_state::machine_reset()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
// force ROM into lower mem on reset
romlmap_w(*program, 0, 0, 0xffff);

View File

@ -126,7 +126,7 @@ void v1050_state::set_interrupt(UINT8 mask, int state)
void v1050_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int bank = (m_bank >> 1) & 0x03;
@ -1020,7 +1020,7 @@ static IRQ_CALLBACK( v1050_int_ack )
void v1050_state::machine_start()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
// initialize SASI bus
m_sasibus->init_scsibus(256);

View File

@ -124,7 +124,7 @@ WRITE8_MEMBER( vic10_state::write )
READ8_MEMBER( vic10_state::vic_videoram_r )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
if (offset < 0x3000)
return program->read_byte(offset);

View File

@ -75,7 +75,7 @@ INPUT_PORTS_END
static MC6845_UPDATE_ROW( victor9k_update_row )
{
victor9k_state *state = device->machine().driver_data<victor9k_state>();
address_space *program = state->m_maincpu->memory().space(AS_PROGRAM);
address_space *program = state->m_maincpu->space(AS_PROGRAM);
const rgb_t *palette = palette_entry_list_raw(bitmap.palette());
if (BIT(ma, 13))
@ -926,7 +926,7 @@ void victor9k_state::machine_start()
device_set_irq_callback(m_maincpu, victor9k_irq_callback);
// memory banking
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
program->install_ram(0x00000, m_ram->size() - 1, m_ram->pointer());
}

View File

@ -441,7 +441,7 @@ static SCREEN_UPDATE_RGB32( vii )
void vii_state::vii_do_dma(UINT32 len)
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
UINT32 src = m_video_regs[0x70];
UINT32 dst = m_video_regs[0x71] + 0x2c00;
UINT32 j;
@ -612,7 +612,7 @@ void vii_state::vii_do_i2c()
void vii_state::spg_do_dma(UINT32 len)
{
address_space *mem = m_maincpu->memory().space(AS_PROGRAM);
address_space *mem = m_maincpu->space(AS_PROGRAM);
UINT32 src = ((m_io_regs[0x101] & 0x3f) << 16) | m_io_regs[0x100];
UINT32 dst = m_io_regs[0x103] & 0x3fff;

View File

@ -809,7 +809,7 @@ void vixen_state::machine_start()
void vixen_state::machine_reset()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
program->install_read_bank(0x0000, 0xefff, 0xfff, 0, "bank1");
program->install_write_bank(0x0000, 0xefff, 0xfff, 0, "bank2");
@ -910,7 +910,7 @@ DIRECT_UPDATE_MEMBER(vixen_state::vixen_direct_update_handler)
{
if (m_reset)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
program->install_read_bank(0x0000, 0xefff, "bank1");
program->install_write_bank(0x0000, 0xefff, "bank2");

View File

@ -696,7 +696,7 @@ WRITE_LINE_MEMBER( wangpc_state::eop_w )
READ8_MEMBER( wangpc_state::memr_r )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
offs_t addr = (m_dma_page[m_dack] << 16) | offset;
return program->read_byte(addr);
@ -704,7 +704,7 @@ READ8_MEMBER( wangpc_state::memr_r )
WRITE8_MEMBER( wangpc_state::memw_w )
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
offs_t addr = (m_dma_page[m_dack] << 16) | offset;
program->write_byte(addr, data);

View File

@ -1042,7 +1042,7 @@ static DEVICE_IMAGE_LOAD( x07_card )
{
running_machine &machine = image.device().machine();
x07_state *state = machine.driver_data<x07_state>();
address_space *space = state->m_maincpu->memory().space( AS_PROGRAM );
address_space *space = state->m_maincpu->space( AS_PROGRAM );
UINT16 ram_size = state->m_ram->size();
if (image.software_entry() == NULL)
@ -1454,7 +1454,7 @@ void x07_state::machine_start()
save_item(NAME(m_cursor.on));
/* install RAM */
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
program->install_ram(0x0000, m_ram->size() - 1, m_ram->pointer());
}

View File

@ -143,7 +143,7 @@ static TIMER_DEVICE_CALLBACK( xerox820_keyboard_tick )
void xerox820_state::bankswitch(int bank)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
if (bank)
@ -162,7 +162,7 @@ void xerox820_state::bankswitch(int bank)
void xerox820ii_state::bankswitch(int bank)
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
UINT8 *ram = m_ram->pointer();
if (bank)

View File

@ -57,7 +57,7 @@ enum
void xor100_state::bankswitch()
{
address_space *program = m_maincpu->memory().space(AS_PROGRAM);
address_space *program = m_maincpu->space(AS_PROGRAM);
int banks = m_ram->size() / 0x10000;
switch (m_mode)

View File

@ -67,8 +67,8 @@ void z88_state::bankswitch_update(int bank, UINT16 page, int rams)
// install read bank
if (m_bank_type[bank] != Z88_BANK_ROM)
{
m_maincpu->memory().space(AS_PROGRAM)->install_read_bank(bank<<14, (bank<<14) + 0x3fff, bank_tag);
m_maincpu->memory().space(AS_PROGRAM)->unmap_write(bank<<14, (bank<<14) + 0x3fff);
m_maincpu->space(AS_PROGRAM)->install_read_bank(bank<<14, (bank<<14) + 0x3fff, bank_tag);
m_maincpu->space(AS_PROGRAM)->unmap_write(bank<<14, (bank<<14) + 0x3fff);
m_bank_type[bank] = Z88_BANK_ROM;
}
@ -81,7 +81,7 @@ void z88_state::bankswitch_update(int bank, UINT16 page, int rams)
// install readwrite bank
if (m_bank_type[bank] != Z88_BANK_RAM)
{
m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_bank(bank<<14, (bank<<14) + 0x3fff, bank_tag);
m_maincpu->space(AS_PROGRAM)->install_readwrite_bank(bank<<14, (bank<<14) + 0x3fff, bank_tag);
m_bank_type[bank] = Z88_BANK_RAM;
}
@ -92,7 +92,7 @@ void z88_state::bankswitch_update(int bank, UINT16 page, int rams)
{
if (m_bank_type[bank] != Z88_BANK_UNMAP)
{
m_maincpu->memory().space(AS_PROGRAM)->unmap_readwrite(bank<<14, (bank<<14) + 0x3fff);
m_maincpu->space(AS_PROGRAM)->unmap_readwrite(bank<<14, (bank<<14) + 0x3fff);
m_bank_type[bank] = Z88_BANK_UNMAP;
}
}
@ -107,16 +107,16 @@ void z88_state::bankswitch_update(int bank, UINT16 page, int rams)
switch (bank)
{
case 0:
m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x0000, 0x3fff, 0, 0, read8_delegate(FUNC(z88_state::bank0_cart_r), this), write8_delegate(FUNC(z88_state::bank0_cart_w), this));
m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(0x0000, 0x3fff, 0, 0, read8_delegate(FUNC(z88_state::bank0_cart_r), this), write8_delegate(FUNC(z88_state::bank0_cart_w), this));
break;
case 1:
m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x4000, 0x7fff, 0, 0, read8_delegate(FUNC(z88_state::bank1_cart_r), this), write8_delegate(FUNC(z88_state::bank1_cart_w), this));
m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(0x4000, 0x7fff, 0, 0, read8_delegate(FUNC(z88_state::bank1_cart_r), this), write8_delegate(FUNC(z88_state::bank1_cart_w), this));
break;
case 2:
m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(0x8000, 0xbfff, 0, 0, read8_delegate(FUNC(z88_state::bank2_cart_r), this), write8_delegate(FUNC(z88_state::bank2_cart_w), this));
m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(0x8000, 0xbfff, 0, 0, read8_delegate(FUNC(z88_state::bank2_cart_r), this), write8_delegate(FUNC(z88_state::bank2_cart_w), this));
break;
case 3:
m_maincpu->memory().space(AS_PROGRAM)->install_readwrite_handler(0xc000, 0xffff, 0, 0, read8_delegate(FUNC(z88_state::bank3_cart_r), this), write8_delegate(FUNC(z88_state::bank3_cart_w), this));
m_maincpu->space(AS_PROGRAM)->install_readwrite_handler(0xc000, 0xffff, 0, 0, read8_delegate(FUNC(z88_state::bank3_cart_r), this), write8_delegate(FUNC(z88_state::bank3_cart_w), this));
break;
}
@ -128,13 +128,13 @@ void z88_state::bankswitch_update(int bank, UINT16 page, int rams)
// override setting for lower 8k of bank 0
if (bank == 0)
{
m_maincpu->memory().space(AS_PROGRAM)->install_read_bank(0, 0x1fff, "bank1");
m_maincpu->space(AS_PROGRAM)->install_read_bank(0, 0x1fff, "bank1");
// enable RAM
if (rams)
m_maincpu->memory().space(AS_PROGRAM)->install_write_bank(0, 0x1fff, "bank1");
m_maincpu->space(AS_PROGRAM)->install_write_bank(0, 0x1fff, "bank1");
else
m_maincpu->memory().space(AS_PROGRAM)->unmap_write(0, 0x1fff);
m_maincpu->space(AS_PROGRAM)->unmap_write(0, 0x1fff);
membank("bank1")->set_entry(rams & 1);
}

View File

@ -147,7 +147,7 @@ WRITE_LINE_MEMBER( z9001_state::cass_w )
static TIMER_DEVICE_CALLBACK( timer_callback )
{
z9001_state *state = timer.machine().driver_data<z9001_state>();
state->m_maincpu->memory().space(AS_PROGRAM)->write_byte(0x006a, 0);
state->m_maincpu->space(AS_PROGRAM)->write_byte(0x006a, 0);
}
MACHINE_RESET_MEMBER( z9001_state )
@ -221,7 +221,7 @@ static const gfx_layout z9001_charlayout =
WRITE8_MEMBER( z9001_state::kbd_put )
{
m_maincpu->memory().space(AS_PROGRAM)->write_byte(0x0025, data);
m_maincpu->space(AS_PROGRAM)->write_byte(0x0025, data);
}
static ASCII_KEYBOARD_INTERFACE( keyboard_intf )

View File

@ -27,7 +27,7 @@ SNAPSHOT_LOAD( ace )
{
cpu_device *cpu = image.device().machine().firstcpu;
UINT8 *RAM = image.device().machine().root_device().memregion(cpu->tag())->base();
address_space *space = cpu->memory().space(AS_PROGRAM);
address_space *space = cpu->space(AS_PROGRAM);
unsigned char ace_repeat, ace_byte, loop;
int done=0, ace_index=0x2000;

View File

@ -26,7 +26,7 @@
static void image_fread_memory(device_image_interface &image, UINT16 addr, UINT32 count)
{
void *ptr = image.device().machine().firstcpu->memory().space(AS_PROGRAM)->get_write_ptr(addr);
void *ptr = image.device().machine().firstcpu->space(AS_PROGRAM)->get_write_ptr(addr);
image.fread( ptr, count);
}

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