diff options
author | Aaron Giles <aaron@aarongiles.com> | 2012-09-11 16:29:26 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2012-09-11 16:29:26 +0000 |
commit | d1a2c2e7a36796de9619ec4d9f81ea755178412d (patch) | |
tree | e210e894a1cda37c5407eaa0ff5a1e89b97cbfe3 /src/mame | |
parent | 0aa418e85b7f7aad5088bc96c9da0c371b15b2f2 (diff) |
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]
Diffstat (limited to 'src/mame')
-rw-r--r-- | src/mame/audio/8080bw.c | 2 | ||||
-rw-r--r-- | src/mame/audio/atarijsa.c | 2 | ||||
-rw-r--r-- | src/mame/audio/cage.c | 2 | ||||
-rw-r--r-- | src/mame/audio/dcs.c | 6 | ||||
-rw-r--r-- | src/mame/audio/harddriv.c | 6 | ||||
-rw-r--r-- | src/mame/drivers/8080bw.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/deshoros.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/gunbustr.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/harddriv.c | 194 | ||||
-rw-r--r-- | src/mame/drivers/igs017.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/magictg.c | 4 | ||||
-rw-r--r-- | src/mame/drivers/metro.c | 4 | ||||
-rw-r--r-- | src/mame/drivers/midqslvr.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/multigam.c | 22 | ||||
-rw-r--r-- | src/mame/drivers/namcos22.c | 30 | ||||
-rw-r--r-- | src/mame/drivers/pacman.c | 20 | ||||
-rw-r--r-- | src/mame/drivers/pntnpuzl.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/segae.c | 8 | ||||
-rw-r--r-- | src/mame/machine/snes.c | 10 | ||||
-rw-r--r-- | src/mame/video/namcos22.c | 4 |
20 files changed, 162 insertions, 164 deletions
diff --git a/src/mame/audio/8080bw.c b/src/mame/audio/8080bw.c index 2dc4395e9f7..ad745e28132 100644 --- a/src/mame/audio/8080bw.c +++ b/src/mame/audio/8080bw.c @@ -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); } diff --git a/src/mame/audio/atarijsa.c b/src/mame/audio/atarijsa.c index 309056c650a..da1b4d3e0fd 100644 --- a/src/mame/audio/atarijsa.c +++ b/src/mame/audio/atarijsa.c @@ -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(); diff --git a/src/mame/audio/cage.c b/src/mame/audio/cage.c index dcb8f39cbe5..d321ea7b8b2 100644 --- a/src/mame/audio/cage.c +++ b/src/mame/audio/cage.c @@ -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++) { diff --git a/src/mame/audio/dcs.c b/src/mame/audio/dcs.c index f93607b4922..46555f8d9fd 100644 --- a/src/mame/audio/dcs.c +++ b/src/mame/audio/dcs.c @@ -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()) diff --git a/src/mame/audio/harddriv.c b/src/mame/audio/harddriv.c index dbfc3e27253..ee2aec6bb47 100644 --- a/src/mame/audio/harddriv.c +++ b/src/mame/audio/harddriv.c @@ -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); } diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index 52f4a811fa2..e23d24af3b2 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -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); } diff --git a/src/mame/drivers/deshoros.c b/src/mame/drivers/deshoros.c index e01b267aac9..f753b3d6d79 100644 --- a/src/mame/drivers/deshoros.c +++ b/src/mame/drivers/deshoros.c @@ -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 ) diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c index 9845d958bb8..fba493a34c7 100644 --- a/src/mame/drivers/gunbustr.c +++ b/src/mame/drivers/gunbustr.c @@ -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) diff --git a/src/mame/drivers/harddriv.c b/src/mame/drivers/harddriv.c index 5b39172bf83..5e334754b00 100644 --- a/src/mame/drivers/harddriv.c +++ b/src/mame/drivers/harddriv.c @@ -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; diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c index 13a77631357..70e630a4271 100644 --- a/src/mame/drivers/igs017.c +++ b/src/mame/drivers/igs017.c @@ -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 ) diff --git a/src/mame/drivers/magictg.c b/src/mame/drivers/magictg.c index 7684f5b9a51..72ba6adc2c5 100644 --- a/src/mame/drivers/magictg.c +++ b/src/mame/drivers/magictg.c @@ -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) { diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c index fb5fa2fe821..3adb3465130 100644 --- a/src/mame/drivers/metro.c +++ b/src/mame/drivers/metro.c @@ -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) diff --git a/src/mame/drivers/midqslvr.c b/src/mame/drivers/midqslvr.c index 55d1224ea55..64f127c3d42 100644 --- a/src/mame/drivers/midqslvr.c +++ b/src/mame/drivers/midqslvr.c @@ -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; diff --git a/src/mame/drivers/multigam.c b/src/mame/drivers/multigam.c index e9699ec8f59..722548aa5de 100644 --- a/src/mame/drivers/multigam.c +++ b/src/mame/drivers/multigam.c @@ -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); } diff --git a/src/mame/drivers/namcos22.c b/src/mame/drivers/namcos22.c index 638ed0e6bc1..e844ff2946e 100644 --- a/src/mame/drivers/namcos22.c +++ b/src/mame/drivers/namcos22.c @@ -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; diff --git a/src/mame/drivers/pacman.c b/src/mame/drivers/pacman.c index b56cd429d16..f130e1e0dc9 100644 --- a/src/mame/drivers/pacman.c +++ b/src/mame/drivers/pacman.c @@ -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)); } diff --git a/src/mame/drivers/pntnpuzl.c b/src/mame/drivers/pntnpuzl.c index 630d2b02055..020802e1ed6 100644 --- a/src/mame/drivers/pntnpuzl.c +++ b/src/mame/drivers/pntnpuzl.c @@ -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 ) diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c index 379e82cca1d..96d0a0792ec 100644 --- a/src/mame/drivers/segae.c +++ b/src/mame/drivers/segae.c @@ -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)); } diff --git a/src/mame/machine/snes.c b/src/mame/machine/snes.c index 3efe257e484..abf3347195f 100644 --- a/src/mame/machine/snes.c +++ b/src/mame/machine/snes.c @@ -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(); diff --git a/src/mame/video/namcos22.c b/src/mame/video/namcos22.c index b143d21996d..1e8ed3a866b 100644 --- a/src/mame/video/namcos22.c +++ b/src/mame/video/namcos22.c @@ -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"); |