diff options
author | Ivan Vangelista <mesgnet@yahoo.it> | 2020-06-16 18:11:46 +0200 |
---|---|---|
committer | Ivan Vangelista <mesgnet@yahoo.it> | 2020-06-16 18:11:46 +0200 |
commit | da639365600fab4edad4b4ede11333cfd5da218a (patch) | |
tree | 1287207f24714054cecaf17094aa1de3cde615e6 /src/mame/drivers | |
parent | b681607a543255a237036cadb0931a41444ede3d (diff) |
drivers starting with t, u, v, w and most of drivers starting with x: removed read* and write* macros (nw)
Diffstat (limited to 'src/mame/drivers')
97 files changed, 746 insertions, 752 deletions
diff --git a/src/mame/drivers/galaga.cpp b/src/mame/drivers/galaga.cpp index 7f12fcee83f..e6835d5eb75 100644 --- a/src/mame/drivers/galaga.cpp +++ b/src/mame/drivers/galaga.cpp @@ -3478,8 +3478,8 @@ void xevious_state::init_xevios() void battles_state::driver_init() { /* replace the Namco I/O handlers with interface to the 4th CPU */ - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x7000, 0x700f, read8_delegate(*this, FUNC(battles_state::customio_data0_r)), write8_delegate(*this, FUNC(battles_state::customio_data0_w))); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x7100, 0x7100, read8_delegate(*this, FUNC(battles_state::customio0_r)), write8_delegate(*this, FUNC(battles_state::customio0_w))); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x7000, 0x700f, read8sm_delegate(*this, FUNC(battles_state::customio_data0_r)), write8sm_delegate(*this, FUNC(battles_state::customio_data0_w))); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x7100, 0x7100, read8smo_delegate(*this, FUNC(battles_state::customio0_r)), write8smo_delegate(*this, FUNC(battles_state::customio0_w))); init_xevious(); } diff --git a/src/mame/drivers/tagteam.cpp b/src/mame/drivers/tagteam.cpp index 5f707810bfc..995dbf54b9b 100644 --- a/src/mame/drivers/tagteam.cpp +++ b/src/mame/drivers/tagteam.cpp @@ -42,7 +42,7 @@ void tagteam_state::machine_start() save_item(NAME(m_sound_nmi_mask)); } -WRITE8_MEMBER(tagteam_state::irq_clear_w) +void tagteam_state::irq_clear_w(uint8_t data) { m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); } @@ -61,7 +61,7 @@ void tagteam_state::main_map(address_map &map) map(0x8000, 0xffff).rom(); } -WRITE8_MEMBER(tagteam_state::sound_nmi_mask_w) +void tagteam_state::sound_nmi_mask_w(uint8_t data) { m_sound_nmi_mask = data & 1; } diff --git a/src/mame/drivers/tail2nos.cpp b/src/mame/drivers/tail2nos.cpp index 763633bafe7..b4a0918706d 100644 --- a/src/mame/drivers/tail2nos.cpp +++ b/src/mame/drivers/tail2nos.cpp @@ -25,7 +25,7 @@ #include "speaker.h" -READ8_MEMBER(tail2nos_state::sound_semaphore_r) +uint8_t tail2nos_state::sound_semaphore_r() { return m_soundlatch->pending_r(); } diff --git a/src/mame/drivers/taito_b.cpp b/src/mame/drivers/taito_b.cpp index 886d5ab84cb..ce56e0e0f22 100644 --- a/src/mame/drivers/taito_b.cpp +++ b/src/mame/drivers/taito_b.cpp @@ -193,31 +193,31 @@ TODO! #include "speaker.h" -WRITE8_MEMBER(taitob_state::bankswitch_w) +void taitob_state::bankswitch_w(uint8_t data) { m_audiobank->set_entry(data & 3); } template<int Player> -READ16_MEMBER(taitob_state::tracky_hi_r) +uint16_t taitob_state::tracky_hi_r() { return m_trackx_io[Player]->read(); } template<int Player> -READ16_MEMBER(taitob_state::tracky_lo_r) +uint16_t taitob_state::tracky_lo_r() { return (m_trackx_io[Player]->read() & 0xff) << 8; } template<int Player> -READ16_MEMBER(taitob_state::trackx_hi_r) +uint16_t taitob_state::trackx_hi_r() { return m_tracky_io[Player]->read(); } template<int Player> -READ16_MEMBER(taitob_state::trackx_lo_r) +uint16_t taitob_state::trackx_lo_r() { return (m_tracky_io[Player]->read() & 0xff) << 8; } @@ -233,12 +233,12 @@ INPUT_CHANGED_MEMBER(taitob_c_state::realpunc_sensor) ***************************************************************************/ -READ16_MEMBER(taitob_state::eep_latch_r) +uint16_t taitob_state::eep_latch_r() { return m_eep_latch; } -WRITE16_MEMBER(taitob_state::eeprom_w) +void taitob_state::eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_eep_latch); @@ -275,12 +275,12 @@ void taitob_state::player_12_coin_ctrl_w(uint8_t data) machine().bookkeeping().coin_counter_w(1, data & 0x08); } -READ16_MEMBER(taitob_state::player_34_coin_ctrl_r) +uint16_t taitob_state::player_34_coin_ctrl_r() { return m_coin_word; } -WRITE16_MEMBER(taitob_state::player_34_coin_ctrl_w) +void taitob_state::player_34_coin_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_coin_word); @@ -291,7 +291,7 @@ WRITE16_MEMBER(taitob_state::player_34_coin_ctrl_w) machine().bookkeeping().coin_counter_w(3, data & 0x0800); } -WRITE16_MEMBER(taitob_state::spacedxo_tc0220ioc_w) +void taitob_state::spacedxo_tc0220ioc_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) m_tc0220ioc->write(offset, data & 0xff); @@ -302,7 +302,7 @@ WRITE16_MEMBER(taitob_state::spacedxo_tc0220ioc_w) } } -WRITE16_MEMBER(taitob_c_state::realpunc_output_w) +void taitob_c_state::realpunc_output_w(uint16_t data) { /* 15 = Camera Enable? diff --git a/src/mame/drivers/taito_h.cpp b/src/mame/drivers/taito_h.cpp index 17d2313a543..612e74eb9e9 100644 --- a/src/mame/drivers/taito_h.cpp +++ b/src/mame/drivers/taito_h.cpp @@ -161,7 +161,7 @@ some kind of zoom table? ***************************************************************************/ -READ8_MEMBER(taitoh_state::syvalion_input_bypass_r) +u8 taitoh_state::syvalion_input_bypass_r() { /* Bypass TC0040IOC controller for analog input */ diff --git a/src/mame/drivers/taito_l.cpp b/src/mame/drivers/taito_l.cpp index 10cbfac8221..b91ac388579 100644 --- a/src/mame/drivers/taito_l.cpp +++ b/src/mame/drivers/taito_l.cpp @@ -191,7 +191,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(taitol_state::vbl_interrupt) } } -WRITE8_MEMBER(taitol_state::irq_enable_w) +void taitol_state::irq_enable_w(u8 data) { //logerror("irq_enable = %02x\n",data); m_vdp->irq_enable_w(data); @@ -202,7 +202,7 @@ WRITE8_MEMBER(taitol_state::irq_enable_w) } -WRITE8_MEMBER(taitol_state::rombankswitch_w) +void taitol_state::rombankswitch_w(u8 data) { if (m_vdp->rom_bank_r() != data) { @@ -217,7 +217,7 @@ WRITE8_MEMBER(taitol_state::rombankswitch_w) } } -WRITE8_MEMBER(fhawk_state::slave_rombank_w) +void fhawk_state::slave_rombank_w(u8 data) { data &= 0xf; @@ -236,7 +236,7 @@ WRITE8_MEMBER(fhawk_state::slave_rombank_w) } } -READ8_MEMBER(fhawk_state::slave_rombank_r) +u8 fhawk_state::slave_rombank_r() { return m_slave_rombank; } @@ -249,19 +249,19 @@ void taitol_state::coin_control_w(u8 data) machine().bookkeeping().coin_counter_w(1, data & 0x08); } -READ8_MEMBER(taitol_1cpu_state::extport_select_and_ym2203_r) +u8 taitol_1cpu_state::extport_select_and_ym2203_r(offs_t offset) { for (auto &mux : m_mux) mux->select_w((offset >> 1) & 1); return m_ymsnd->read(offset & 1); } -WRITE8_MEMBER(taitol_state::mcu_control_w) +void taitol_state::mcu_control_w(u8 data) { // logerror("mcu control %02x (%04x)\n", data, m_main_cpu->pc()); } -READ8_MEMBER(taitol_state::mcu_control_r) +u8 taitol_state::mcu_control_r() { // logerror("mcu control read (%04x)\n", m_main_cpu->pc()); return 0x1; @@ -282,22 +282,22 @@ WRITE_LINE_MEMBER(champwr_state::msm5205_vck) } } -WRITE8_MEMBER(champwr_state::msm5205_lo_w) +void champwr_state::msm5205_lo_w(u8 data) { m_adpcm_pos = (m_adpcm_pos & 0xff00ff) | (data << 8); } -WRITE8_MEMBER(champwr_state::msm5205_hi_w) +void champwr_state::msm5205_hi_w(u8 data) { m_adpcm_pos = ((m_adpcm_pos & 0x00ffff) | (data << 16)) & 0x1ffff; } -WRITE8_MEMBER(champwr_state::msm5205_start_w) +void champwr_state::msm5205_start_w(u8 data) { m_msm->reset_w(0); } -WRITE8_MEMBER(champwr_state::msm5205_stop_w) +void champwr_state::msm5205_stop_w(u8 data) { m_msm->reset_w(1); m_adpcm_pos &= 0x1ff00; @@ -366,7 +366,7 @@ void taitol_2cpu_state::raimais_2_map(address_map &map) } -WRITE8_MEMBER(taitol_2cpu_state::sound_bankswitch_w) +void taitol_2cpu_state::sound_bankswitch_w(u8 data) { m_audio_bnk->set_entry(data & 0x03); } diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp index 41b754e6782..163365ca89f 100644 --- a/src/mame/drivers/taito_z.cpp +++ b/src/mame/drivers/taito_z.cpp @@ -1369,7 +1369,7 @@ static const u16 spacegun_default_eeprom[64]= #if 0 -READ16_MEMBER(taitoz_state::eep_latch_r) +u16 taitoz_state::eep_latch_r() { return m_eep_latch; } diff --git a/src/mame/drivers/taitoair.cpp b/src/mame/drivers/taitoair.cpp index f9d14be6eee..9843cb5ad0e 100644 --- a/src/mame/drivers/taitoair.cpp +++ b/src/mame/drivers/taitoair.cpp @@ -295,7 +295,7 @@ void taitoair_state::gradram_w(offs_t offset, u16 data, u16 mem_mask) INPUTS ***********************************************************/ -READ16_MEMBER(taitoair_state::stick_input_r) +u16 taitoair_state::stick_input_r(offs_t offset) { switch (offset) { @@ -315,7 +315,7 @@ READ16_MEMBER(taitoair_state::stick_input_r) return 0; } -READ16_MEMBER(taitoair_state::stick2_input_r) +u16 taitoair_state::stick2_input_r(offs_t offset) { switch (offset) { diff --git a/src/mame/drivers/taitojc.cpp b/src/mame/drivers/taitojc.cpp index b89a9fac04d..e8b01aba025 100644 --- a/src/mame/drivers/taitojc.cpp +++ b/src/mame/drivers/taitojc.cpp @@ -474,7 +474,7 @@ void taitojc_state::coin_control_w(uint8_t data) ***************************************************************************/ // dsp common ram has similar interrupt capability as MB8421 -WRITE16_MEMBER(taitojc_state::dsp_to_main_7fe_w) +void taitojc_state::dsp_to_main_7fe_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_dsp_shared_ram[0x7fe]); @@ -483,7 +483,7 @@ WRITE16_MEMBER(taitojc_state::dsp_to_main_7fe_w) m_maincpu->set_input_line(6, ASSERT_LINE); } -READ16_MEMBER(taitojc_state::dsp_to_main_7fe_r) +uint16_t taitojc_state::dsp_to_main_7fe_r(offs_t offset, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) m_maincpu->set_input_line(6, CLEAR_LINE); @@ -491,7 +491,7 @@ READ16_MEMBER(taitojc_state::dsp_to_main_7fe_r) return m_dsp_shared_ram[0x7fe]; } -WRITE16_MEMBER(taitojc_state::main_to_dsp_7ff_w) +void taitojc_state::main_to_dsp_7ff_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_dsp_shared_ram[0x7ff]); @@ -536,7 +536,7 @@ INTERRUPT_GEN_MEMBER(taitojc_state::taitojc_vblank) device.execute().set_input_line(2, HOLD_LINE); // where does it come from? } -WRITE8_MEMBER(taitojc_state::jc_irq_unk_w) +void taitojc_state::jc_irq_unk_w(uint8_t data) { // gets written to at the end of irq6 routine // writes $02 or $06, depending on a value in DSP RAM, what does it mean? @@ -549,18 +549,18 @@ WRITE8_MEMBER(taitojc_state::jc_irq_unk_w) ***************************************************************************/ -READ16_MEMBER(taitojc_state::dsp_shared_r) +uint16_t taitojc_state::dsp_shared_r(offs_t offset) { return m_dsp_shared_ram[offset]; } -WRITE16_MEMBER(taitojc_state::dsp_shared_w) +void taitojc_state::dsp_shared_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_dsp_shared_ram[offset]); } -READ8_MEMBER(taitojc_state::mcu_comm_r) +uint8_t taitojc_state::mcu_comm_r(offs_t offset) { switch (offset) { @@ -578,7 +578,7 @@ READ8_MEMBER(taitojc_state::mcu_comm_r) return 0; } -WRITE8_MEMBER(taitojc_state::mcu_comm_w) +void taitojc_state::mcu_comm_w(offs_t offset, uint8_t data) { switch (offset) { @@ -598,7 +598,7 @@ WRITE8_MEMBER(taitojc_state::mcu_comm_w) } -READ8_MEMBER(taitojc_state::jc_pcbid_r) +uint8_t taitojc_state::jc_pcbid_r(offs_t offset) { static const char pcb_id[0x40] = { "DEV=TC0870HVP SYS=CG VER=1.0"}; @@ -618,12 +618,12 @@ Not emulated yet... */ -READ8_MEMBER(taitojc_state::jc_lan_r) +uint8_t taitojc_state::jc_lan_r() { return 0xff; } -WRITE8_MEMBER(taitojc_state::jc_lan_w) +void taitojc_state::jc_lan_w(uint8_t data) { } @@ -660,7 +660,7 @@ The OKI is used for seat vibration effects. */ -WRITE8_MEMBER(taitojc_state::dendego_speedmeter_w) +void taitojc_state::dendego_speedmeter_w(uint8_t data) { if (m_speed_meter != dendego_odometer_table[data]) { @@ -670,7 +670,7 @@ WRITE8_MEMBER(taitojc_state::dendego_speedmeter_w) } } -WRITE8_MEMBER(taitojc_state::dendego_brakemeter_w) +void taitojc_state::dendego_brakemeter_w(uint8_t data) { if (m_brake_meter != dendego_pressure_table[data]) { @@ -786,37 +786,37 @@ void taitojc_state::hc11_pgm_map(address_map &map) 0x703b: Unknown read/write */ -WRITE16_MEMBER(taitojc_state::dsp_math_projection_w) +void taitojc_state::dsp_math_projection_w(offs_t offset, uint16_t data) { m_projection_data[offset] = data; } -WRITE16_MEMBER(taitojc_state::dsp_math_viewport_w) +void taitojc_state::dsp_math_viewport_w(offs_t offset, uint16_t data) { m_viewport_data[offset] = data; } -READ16_MEMBER(taitojc_state::dsp_math_projection_y_r) +uint16_t taitojc_state::dsp_math_projection_y_r() { return (m_projection_data[2] != 0) ? (m_projection_data[0] * m_viewport_data[0]) / m_projection_data[2] : 0; } -READ16_MEMBER(taitojc_state::dsp_math_projection_x_r) +uint16_t taitojc_state::dsp_math_projection_x_r() { return (m_projection_data[2] != 0) ? (m_projection_data[1] * m_viewport_data[1]) / m_projection_data[2] : 0; } -WRITE16_MEMBER(taitojc_state::dsp_math_intersection_w) +void taitojc_state::dsp_math_intersection_w(offs_t offset, uint16_t data) { m_intersection_data[offset] = data; } -READ16_MEMBER(taitojc_state::dsp_math_intersection_r) +uint16_t taitojc_state::dsp_math_intersection_r() { return (m_intersection_data[2] != 0) ? (m_intersection_data[0] * m_intersection_data[1]) / m_intersection_data[2] : 0; } -READ16_MEMBER(taitojc_state::dsp_math_unk_r) +uint16_t taitojc_state::dsp_math_unk_r() { return 0x7fff; } @@ -824,13 +824,13 @@ READ16_MEMBER(taitojc_state::dsp_math_unk_r) /**************************************************************************/ -READ16_MEMBER(taitojc_state::dsp_rom_r) +uint16_t taitojc_state::dsp_rom_r() { assert (m_dsp_rom_pos < 0x800000); // never happens return m_dspgfx[machine().side_effects_disabled() ? m_dsp_rom_pos : m_dsp_rom_pos++]; } -WRITE16_MEMBER(taitojc_state::dsp_rom_w) +void taitojc_state::dsp_rom_w(offs_t offset, uint16_t data) { if (offset == 0) { @@ -1154,7 +1154,7 @@ void taitojc_state::dendego(machine_config &config) ***************************************************************************/ -READ16_MEMBER(taitojc_state::taitojc_dsp_idle_skip_r) +uint16_t taitojc_state::taitojc_dsp_idle_skip_r() { if (m_dsp->pc() == 0x404c) m_dsp->spin_until_time(attotime::from_usec(500)); @@ -1162,7 +1162,7 @@ READ16_MEMBER(taitojc_state::taitojc_dsp_idle_skip_r) return m_dsp_shared_ram[0x7f0]; } -READ16_MEMBER(taitojc_state::dendego2_dsp_idle_skip_r) +uint16_t taitojc_state::dendego2_dsp_idle_skip_r() { if (m_dsp->pc() == 0x402e) m_dsp->spin_until_time(attotime::from_usec(500)); @@ -1176,7 +1176,7 @@ void taitojc_state::init_taitojc() m_has_dsp_hack = 1; if (DSP_IDLESKIP) - m_dsp->space(AS_DATA).install_read_handler(0x7ff0, 0x7ff0, read16_delegate(*this, FUNC(taitojc_state::taitojc_dsp_idle_skip_r))); + m_dsp->space(AS_DATA).install_read_handler(0x7ff0, 0x7ff0, read16smo_delegate(*this, FUNC(taitojc_state::taitojc_dsp_idle_skip_r))); } void taitojc_state::init_dendego2() @@ -1184,7 +1184,7 @@ void taitojc_state::init_dendego2() init_taitojc(); if (DSP_IDLESKIP) - m_dsp->space(AS_DATA).install_read_handler(0x7ff0, 0x7ff0, read16_delegate(*this, FUNC(taitojc_state::dendego2_dsp_idle_skip_r))); + m_dsp->space(AS_DATA).install_read_handler(0x7ff0, 0x7ff0, read16smo_delegate(*this, FUNC(taitojc_state::dendego2_dsp_idle_skip_r))); } void taitojc_state::init_dangcurv() diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp index 90af0b7e1ca..a9743f63004 100644 --- a/src/mame/drivers/taitosj.cpp +++ b/src/mame/drivers/taitosj.cpp @@ -179,7 +179,7 @@ void taitosj_state::taitosj_sndnmi_msk_w(uint8_t data) m_soundnmi->in_w<0>((~data)&1); } -WRITE8_MEMBER(taitosj_state::soundlatch_w) +void taitosj_state::soundlatch_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::soundlatch_w_cb), this), data); } @@ -191,7 +191,7 @@ void taitosj_state::input_port_4_f0_w(uint8_t data) } // EPORT2 -WRITE8_MEMBER(taitosj_state::sound_semaphore2_w) +void taitosj_state::sound_semaphore2_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::sound_semaphore2_w_cb), this), data); } @@ -341,7 +341,7 @@ TIMER_CALLBACK_MEMBER(taitosj_state::sound_semaphore2_clear_w_cb) } // RD5000 -READ8_MEMBER(taitosj_state::soundlatch_r) +uint8_t taitosj_state::soundlatch_r() { if (!machine().side_effects_disabled()) { @@ -352,19 +352,19 @@ READ8_MEMBER(taitosj_state::soundlatch_r) } // RD5001 -READ8_MEMBER(taitosj_state::soundlatch_flags_r) +uint8_t taitosj_state::soundlatch_flags_r() { return (m_soundlatch_flag?8:0) | (m_sound_semaphore2?4:0) | 3; } // WR5000 -WRITE8_MEMBER(taitosj_state::soundlatch_clear7_w) +void taitosj_state::soundlatch_clear7_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::soundlatch_clear7_w_cb), this), data); } // WR5001 -WRITE8_MEMBER(taitosj_state::sound_semaphore2_clear_w) +void taitosj_state::sound_semaphore2_clear_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::sound_semaphore2_clear_w_cb), this), data); } @@ -2851,7 +2851,7 @@ void taitosj_state::init_spacecr() init_common(); /* install protection handler */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0xd48b, 0xd48b, read8_delegate(*this, FUNC(taitosj_state::spacecr_prot_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xd48b, 0xd48b, read8smo_delegate(*this, FUNC(taitosj_state::spacecr_prot_r))); } void taitosj_state::init_alpine() @@ -2859,8 +2859,8 @@ void taitosj_state::init_alpine() init_common(); /* install protection handlers */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0xd40b, 0xd40b, read8_delegate(*this, FUNC(taitosj_state::alpine_port_2_r))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd50f, 0xd50f, write8_delegate(*this, FUNC(taitosj_state::alpine_protection_w))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xd40b, 0xd40b, read8smo_delegate(*this, FUNC(taitosj_state::alpine_port_2_r))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd50f, 0xd50f, write8smo_delegate(*this, FUNC(taitosj_state::alpine_protection_w))); } void taitosj_state::init_alpinea() @@ -2868,8 +2868,8 @@ void taitosj_state::init_alpinea() init_common(); /* install protection handlers */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0xd40b, 0xd40b, read8_delegate(*this, FUNC(taitosj_state::alpine_port_2_r))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd50e, 0xd50e, write8_delegate(*this, FUNC(taitosj_state::alpinea_bankswitch_w))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xd40b, 0xd40b, read8smo_delegate(*this, FUNC(taitosj_state::alpine_port_2_r))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd50e, 0xd50e, write8smo_delegate(*this, FUNC(taitosj_state::alpinea_bankswitch_w))); } void taitosj_state::init_junglhbr() @@ -2877,7 +2877,7 @@ void taitosj_state::init_junglhbr() init_common(); /* inverter on bits 0 and 1 */ - m_maincpu->space(AS_PROGRAM).install_write_handler(0x9000, 0xbfff, write8_delegate(*this, FUNC(taitosj_state::junglhbr_characterram_w))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x9000, 0xbfff, write8sm_delegate(*this, FUNC(taitosj_state::junglhbr_characterram_w))); } GAME( 1981, spaceskr, 0, nomcu, spaceskr, taitosj_state, init_taitosj, ROT0, "Taito Corporation", "Space Seeker", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/tandy2k.cpp b/src/mame/drivers/tandy2k.cpp index ef3e8869002..69b7ba9e13a 100644 --- a/src/mame/drivers/tandy2k.cpp +++ b/src/mame/drivers/tandy2k.cpp @@ -68,17 +68,17 @@ void tandy2k_state::speaker_update() m_speaker->level_w(level); } -READ8_MEMBER( tandy2k_state::char_ram_r ) +uint8_t tandy2k_state::char_ram_r(offs_t offset) { return m_char_ram[offset]; } -WRITE8_MEMBER( tandy2k_state::char_ram_w ) +void tandy2k_state::char_ram_w(offs_t offset, uint8_t data) { m_char_ram[offset] = data; } -READ8_MEMBER( tandy2k_state::videoram_r ) +uint8_t tandy2k_state::videoram_r(offs_t offset) { address_space &program = m_maincpu->space(AS_PROGRAM); @@ -94,7 +94,7 @@ READ8_MEMBER( tandy2k_state::videoram_r ) return data & 0xff; } -READ8_MEMBER( tandy2k_state::enable_r ) +uint8_t tandy2k_state::enable_r() { /* @@ -119,7 +119,7 @@ READ8_MEMBER( tandy2k_state::enable_r ) return data; } -WRITE8_MEMBER( tandy2k_state::enable_w ) +void tandy2k_state::enable_w(uint8_t data) { /* @@ -169,7 +169,7 @@ WRITE8_MEMBER( tandy2k_state::enable_w ) m_maincpu->tmrin1_w(BIT(data, 7)); } -WRITE8_MEMBER( tandy2k_state::dma_mux_w ) +void tandy2k_state::dma_mux_w(uint8_t data) { /* @@ -206,7 +206,7 @@ WRITE8_MEMBER( tandy2k_state::dma_mux_w ) update_drq(); } -READ8_MEMBER( tandy2k_state::kbint_clr_r ) +uint8_t tandy2k_state::kbint_clr_r() { if (m_pb_sel == KBDINEN) { @@ -219,7 +219,7 @@ READ8_MEMBER( tandy2k_state::kbint_clr_r ) return 0xff; } -READ8_MEMBER( tandy2k_state::clkmouse_r ) +uint8_t tandy2k_state::clkmouse_r(offs_t offset) { uint8_t ret = 0; switch (offset) @@ -241,7 +241,7 @@ READ8_MEMBER( tandy2k_state::clkmouse_r ) return ret; } -WRITE8_MEMBER( tandy2k_state::clkmouse_w ) +void tandy2k_state::clkmouse_w(offs_t offset, uint8_t data) { switch (offset) { @@ -290,22 +290,22 @@ WRITE8_MEMBER( tandy2k_state::clkmouse_w ) } } -READ8_MEMBER( tandy2k_state::fldtc_r ) +uint8_t tandy2k_state::fldtc_r() { if (LOG) logerror("FLDTC\n"); - fldtc_w(space, 0, 0); + fldtc_w(0); return 0; } -WRITE8_MEMBER( tandy2k_state::fldtc_w ) +void tandy2k_state::fldtc_w(uint8_t data) { m_fdc->tc_w(1); m_fdc->tc_w(false); } -WRITE8_MEMBER( tandy2k_state::addr_ctrl_w ) +void tandy2k_state::addr_ctrl_w(uint8_t data) { /* @@ -567,7 +567,7 @@ WRITE_LINE_MEMBER( tandy2k_state::vpac_sld_w ) m_vac->sld_w(state); } -WRITE8_MEMBER( tandy2k_state::hires_plane_w ) +void tandy2k_state::hires_plane_w(uint8_t data) { int bank = 3; if (((data & 1) + ((data >> 1) & 1) + ((data >> 2) & 1)) == 1) @@ -579,7 +579,7 @@ WRITE8_MEMBER( tandy2k_state::hires_plane_w ) // bit 0 - 0 = hires board installed // bit 1 - 0 = 1 plane, 1 = 3 planes // bit 2-4 - board rev -READ8_MEMBER( tandy2k_state::hires_status_r ) +uint8_t tandy2k_state::hires_status_r() { return 2; } diff --git a/src/mame/drivers/tank8.cpp b/src/mame/drivers/tank8.cpp index 63a6f3da119..16db51c93d1 100644 --- a/src/mame/drivers/tank8.cpp +++ b/src/mame/drivers/tank8.cpp @@ -29,40 +29,40 @@ void tank8_state::machine_reset() } -READ8_MEMBER(tank8_state::collision_r) +uint8_t tank8_state::collision_r() { return m_collision_index; } -WRITE8_MEMBER(tank8_state::lockout_w) +void tank8_state::lockout_w(offs_t offset, uint8_t data) { machine().bookkeeping().coin_lockout_w(offset, ~data & 1); } -WRITE8_MEMBER(tank8_state::int_reset_w) +void tank8_state::int_reset_w(uint8_t data) { m_collision_index &= ~0x3f; m_maincpu->set_input_line(0, CLEAR_LINE); } -WRITE8_MEMBER(tank8_state::crash_w) +void tank8_state::crash_w(uint8_t data) { m_discrete->write(TANK8_CRASH_EN, data); } -WRITE8_MEMBER(tank8_state::explosion_w) +void tank8_state::explosion_w(uint8_t data) { m_discrete->write(TANK8_EXPLOSION_EN, data); } -WRITE8_MEMBER(tank8_state::bugle_w) +void tank8_state::bugle_w(uint8_t data) { m_discrete->write(TANK8_BUGLE_EN, data); } -WRITE8_MEMBER(tank8_state::bug_w) +void tank8_state::bug_w(uint8_t data) { /* D0 and D1 determine the on/off time off the square wave */ switch(data & 3) { @@ -86,12 +86,12 @@ WRITE8_MEMBER(tank8_state::bug_w) } -WRITE8_MEMBER(tank8_state::attract_w) +void tank8_state::attract_w(uint8_t data) { m_discrete->write(TANK8_ATTRACT_EN, data); } -WRITE8_MEMBER(tank8_state::motor_w) +void tank8_state::motor_w(offs_t offset, uint8_t data) { m_discrete->write(NODE_RELATIVE(TANK8_MOTOR1_EN, offset), data); } diff --git a/src/mame/drivers/tankbatt.cpp b/src/mame/drivers/tankbatt.cpp index 44ffc6cece5..39264cb98dd 100644 --- a/src/mame/drivers/tankbatt.cpp +++ b/src/mame/drivers/tankbatt.cpp @@ -74,7 +74,7 @@ void tankbatt_state::machine_start() save_item(NAME(m_sound_enable)); } -READ8_MEMBER(tankbatt_state::in0_r) +uint8_t tankbatt_state::in0_r(offs_t offset) { int val; @@ -82,7 +82,7 @@ READ8_MEMBER(tankbatt_state::in0_r) return ((val << (7 - offset)) & 0x80); } -READ8_MEMBER(tankbatt_state::in1_r) +uint8_t tankbatt_state::in1_r(offs_t offset) { int val; @@ -90,7 +90,7 @@ READ8_MEMBER(tankbatt_state::in1_r) return ((val << (7 - offset)) & 0x80); } -READ8_MEMBER(tankbatt_state::dsw_r) +uint8_t tankbatt_state::dsw_r(offs_t offset) { int val; @@ -140,7 +140,7 @@ WRITE_LINE_MEMBER(tankbatt_state::sh_fire_w) } } -WRITE8_MEMBER(tankbatt_state::irq_ack_w) +void tankbatt_state::irq_ack_w(uint8_t data) { /* 0x6e written at the end of the irq routine, could be either irq ack or a coin sample */ m_maincpu->set_input_line(0, CLEAR_LINE); diff --git a/src/mame/drivers/tankbust.cpp b/src/mame/drivers/tankbust.cpp index 5fa36b04bde..0e0a743b3da 100644 --- a/src/mame/drivers/tankbust.cpp +++ b/src/mame/drivers/tankbust.cpp @@ -46,7 +46,7 @@ TIMER_CALLBACK_MEMBER(tankbust_state::soundlatch_callback) m_latch = param; } -WRITE8_MEMBER(tankbust_state::soundlatch_w) +void tankbust_state::soundlatch_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(tankbust_state::soundlatch_callback),this), data); } @@ -76,7 +76,7 @@ TIMER_CALLBACK_MEMBER(tankbust_state::soundirqline_callback) -WRITE8_MEMBER(tankbust_state::e0xx_w) +void tankbust_state::e0xx_w(offs_t offset, uint8_t data) { m_e0xx_data[offset] = data; @@ -120,7 +120,7 @@ WRITE8_MEMBER(tankbust_state::e0xx_w) } } -READ8_MEMBER(tankbust_state::debug_output_area_r) +uint8_t tankbust_state::debug_output_area_r(offs_t offset) { return m_e0xx_data[offset]; } @@ -175,13 +175,13 @@ void tankbust_state::tankbust_palette(palette_device &palette) const } #if 0 -READ8_MEMBER(tankbust_state::read_from_unmapped_memory) +uint8_t tankbust_state::read_from_unmapped_memory() { return 0xff; } #endif -READ8_MEMBER(tankbust_state::some_changing_input) +uint8_t tankbust_state::some_changing_input() { m_variable_data += 8; return m_variable_data; diff --git a/src/mame/drivers/taotaido.cpp b/src/mame/drivers/taotaido.cpp index 74bef03ac7e..0dc5e540e24 100644 --- a/src/mame/drivers/taotaido.cpp +++ b/src/mame/drivers/taotaido.cpp @@ -84,7 +84,7 @@ void taotaido_state::machine_start() } -READ16_MEMBER(taotaido_state::pending_command_r) +uint16_t taotaido_state::pending_command_r() { /* Only bit 0 is tested */ return m_soundlatch->pending_r(); @@ -119,7 +119,7 @@ void taotaido_state::main_map(address_map &map) /* sound cpu - same as aerofgt */ -WRITE8_MEMBER(taotaido_state::sh_bankswitch_w) +void taotaido_state::sh_bankswitch_w(uint8_t data) { m_soundbank->set_entry(data & 0x03); } diff --git a/src/mame/drivers/targeth.cpp b/src/mame/drivers/targeth.cpp index 7a5857d8e0e..072079fc2c1 100644 --- a/src/mame/drivers/targeth.cpp +++ b/src/mame/drivers/targeth.cpp @@ -103,12 +103,12 @@ TIMER_CALLBACK_MEMBER(targeth_state::gun2_irq) m_gun_irq_timer[1]->adjust( m_screen->time_until_pos(160, 0 ) ); } -WRITE8_MEMBER(targeth_state::oki_bankswitch_w) +void targeth_state::oki_bankswitch_w(uint8_t data) { m_okibank->set_entry(data & 0x0f); } -WRITE16_MEMBER(targeth_state::output_latch_w) +void targeth_state::output_latch_w(offs_t offset, uint16_t data) { m_outlatch->write_bit(offset >> 3, BIT(data, 0)); } @@ -123,13 +123,13 @@ WRITE_LINE_MEMBER(targeth_state::coin2_counter_w) machine().bookkeeping().coin_counter_w(1, state); } -WRITE8_MEMBER(targeth_state::shareram_w) +void targeth_state::shareram_w(offs_t offset, uint8_t data) { // why isn't there address map functionality for this? reinterpret_cast<u8 *>(m_shareram.target())[BYTE_XOR_BE(offset)] = data; } -READ8_MEMBER(targeth_state::shareram_r) +uint8_t targeth_state::shareram_r(offs_t offset) { // why isn't there address map functionality for this? return reinterpret_cast<u8 const *>(m_shareram.target())[BYTE_XOR_BE(offset)]; diff --git a/src/mame/drivers/tatsumi.cpp b/src/mame/drivers/tatsumi.cpp index 2061844ab26..63628d16ee9 100644 --- a/src/mame/drivers/tatsumi.cpp +++ b/src/mame/drivers/tatsumi.cpp @@ -173,43 +173,43 @@ /***************************************************************************/ -WRITE8_MEMBER(cyclwarr_state::cyclwarr_sound_w) +void cyclwarr_state::cyclwarr_sound_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } -READ16_MEMBER(cyclwarr_state::cyclwarr_sprite_r) +uint16_t cyclwarr_state::cyclwarr_sprite_r(offs_t offset) { return m_spriteram[offset]; } -WRITE16_MEMBER(cyclwarr_state::cyclwarr_sprite_w) +void cyclwarr_state::cyclwarr_sprite_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_spriteram[offset]); } -WRITE16_MEMBER(cyclwarr_state::bigfight_a40000_w) +void cyclwarr_state::bigfight_a40000_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_bigfight_a40000[offset]); } template<int Bank> -READ16_MEMBER(cyclwarr_state::cyclwarr_videoram_r) +uint16_t cyclwarr_state::cyclwarr_videoram_r(offs_t offset) { return m_cyclwarr_videoram[Bank][offset]; } template<int Bank> -WRITE16_MEMBER(cyclwarr_state::cyclwarr_videoram_w) +void cyclwarr_state::cyclwarr_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_cyclwarr_videoram[Bank][offset]); m_layer[(Bank<<1)|0]->mark_tile_dirty(offset); m_layer[(Bank<<1)|1]->mark_tile_dirty(offset); } -WRITE16_MEMBER(cyclwarr_state::output_w) +void cyclwarr_state::output_w(offs_t offset, uint16_t data, uint16_t mem_mask) { machine().bookkeeping().coin_counter_w(0, data & 1); machine().bookkeeping().coin_counter_w(1, data & 2); diff --git a/src/mame/drivers/tbowl.cpp b/src/mame/drivers/tbowl.cpp index f1eb041866a..55d1c880abf 100644 --- a/src/mame/drivers/tbowl.cpp +++ b/src/mame/drivers/tbowl.cpp @@ -25,7 +25,7 @@ Might be some priority glitches #include "speaker.h" -WRITE8_MEMBER(tbowl_state::coincounter_w) +void tbowl_state::coincounter_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, data & 1); } @@ -36,12 +36,12 @@ note: check this, its borrowed from tecmo.cpp / wc90.cpp at the moment and could ***/ -WRITE8_MEMBER(tbowl_state::boardb_bankswitch_w) +void tbowl_state::boardb_bankswitch_w(uint8_t data) { membank("mainbank")->set_entry(data >> 3); } -WRITE8_MEMBER(tbowl_state::boardc_bankswitch_w) +void tbowl_state::boardc_bankswitch_w(uint8_t data) { membank("subbank")->set_entry(data >> 3); } @@ -93,7 +93,7 @@ void tbowl_state::_6206B_map(address_map &map) } /* Board C */ -WRITE8_MEMBER(tbowl_state::trigger_nmi) +void tbowl_state::trigger_nmi(uint8_t data) { /* trigger NMI on 6206B's Cpu? (guess but seems to work..) */ m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); @@ -116,19 +116,19 @@ void tbowl_state::_6206C_map(address_map &map) /* Board A */ -WRITE8_MEMBER(tbowl_state::adpcm_start_w) +void tbowl_state::adpcm_start_w(offs_t offset, uint8_t data) { msm5205_device *adpcm = (offset & 1) ? m_msm2 : m_msm1; m_adpcm_pos[offset & 1] = data << 8; adpcm->reset_w(0); } -WRITE8_MEMBER(tbowl_state::adpcm_end_w) +void tbowl_state::adpcm_end_w(offs_t offset, uint8_t data) { m_adpcm_end[offset & 1] = (data + 1) << 8; } -WRITE8_MEMBER(tbowl_state::adpcm_vol_w) +void tbowl_state::adpcm_vol_w(offs_t offset, uint8_t data) { msm5205_device *adpcm = (offset & 1) ? m_msm2 : m_msm1; adpcm->set_output_gain(ALL_OUTPUTS, (data & 127) / 127.0); diff --git a/src/mame/drivers/tceptor.cpp b/src/mame/drivers/tceptor.cpp index 212f9a15a45..2254880d9b7 100644 --- a/src/mame/drivers/tceptor.cpp +++ b/src/mame/drivers/tceptor.cpp @@ -27,12 +27,12 @@ /*******************************************************************/ -READ8_MEMBER(tceptor_state::m68k_shared_r) +uint8_t tceptor_state::m68k_shared_r(offs_t offset) { return m_m68k_shared_ram[offset]; } -WRITE8_MEMBER(tceptor_state::m68k_shared_w) +void tceptor_state::m68k_shared_w(offs_t offset, uint8_t data) { m_m68k_shared_ram[offset] = data; } @@ -40,29 +40,29 @@ WRITE8_MEMBER(tceptor_state::m68k_shared_w) /*******************************************************************/ -WRITE8_MEMBER(tceptor_state::m6809_irq_enable_w) +void tceptor_state::m6809_irq_enable_w(uint8_t data) { m_m6809_irq_enable = 1; } -WRITE8_MEMBER(tceptor_state::m6809_irq_disable_w) +void tceptor_state::m6809_irq_disable_w(uint8_t data) { m_m6809_irq_enable = 0; } -WRITE16_MEMBER(tceptor_state::m68k_irq_enable_w) +void tceptor_state::m68k_irq_enable_w(uint16_t data) { m_m68k_irq_enable = data; } -WRITE8_MEMBER(tceptor_state::mcu_irq_enable_w) +void tceptor_state::mcu_irq_enable_w(uint8_t data) { m_mcu_irq_enable = 1; } -WRITE8_MEMBER(tceptor_state::mcu_irq_disable_w) +void tceptor_state::mcu_irq_disable_w(uint8_t data) { m_mcu_irq_enable = 0; } @@ -101,22 +101,22 @@ uint8_t tceptor_state::fix_input1(uint8_t in1, uint8_t in2) return r; } -READ8_MEMBER(tceptor_state::dsw0_r) +uint8_t tceptor_state::dsw0_r() { return fix_input0(ioport("DSW1")->read(), ioport("DSW2")->read()); } -READ8_MEMBER(tceptor_state::dsw1_r) +uint8_t tceptor_state::dsw1_r() { return fix_input1(ioport("DSW1")->read(), ioport("DSW2")->read()); } -READ8_MEMBER(tceptor_state::input0_r) +uint8_t tceptor_state::input0_r() { return fix_input0(ioport("BUTTONS")->read(), ioport("SERVICE")->read()); } -READ8_MEMBER(tceptor_state::input1_r) +uint8_t tceptor_state::input1_r() { return fix_input1(ioport("BUTTONS")->read(), ioport("SERVICE")->read()); } diff --git a/src/mame/drivers/tdv2324.cpp b/src/mame/drivers/tdv2324.cpp index a57544fdd68..d6862e336ed 100644 --- a/src/mame/drivers/tdv2324.cpp +++ b/src/mame/drivers/tdv2324.cpp @@ -108,18 +108,18 @@ #include "softlist.h" -READ8_MEMBER( tdv2324_state::tdv2324_main_io_30 ) +uint8_t tdv2324_state::tdv2324_main_io_30() { return 0xff; } // Not sure what this is for, i/o read at 0xE6 on maincpu, post fails if it does not return bit 4 set -READ8_MEMBER( tdv2324_state::tdv2324_main_io_e6 ) +uint8_t tdv2324_state::tdv2324_main_io_e6() { return 0x10; // TODO: this should actually return something meaningful, for now is enough to pass early boot test } -WRITE8_MEMBER( tdv2324_state::tdv2324_main_io_e2 ) +void tdv2324_state::tdv2324_main_io_e2(uint8_t data) { printf("%c\n", data); } diff --git a/src/mame/drivers/tecmo.cpp b/src/mame/drivers/tecmo.cpp index 9c8029bdc27..ea82c85c471 100644 --- a/src/mame/drivers/tecmo.cpp +++ b/src/mame/drivers/tecmo.cpp @@ -67,23 +67,23 @@ f80b ???? #include "speaker.h" -WRITE8_MEMBER(tecmo_state::bankswitch_w) +void tecmo_state::bankswitch_w(uint8_t data) { m_mainbank->set_entry(data >> 3); } -WRITE8_MEMBER(tecmo_state::adpcm_start_w) +void tecmo_state::adpcm_start_w(uint8_t data) { m_adpcm_pos = data << 8; m_msm->reset_w(0); } -WRITE8_MEMBER(tecmo_state::adpcm_end_w) +void tecmo_state::adpcm_end_w(uint8_t data) { m_adpcm_end = (data + 1) << 8; } -WRITE8_MEMBER(tecmo_state::adpcm_vol_w) +void tecmo_state::adpcm_vol_w(uint8_t data) { m_msm->set_output_gain(ALL_OUTPUTS, (data & 15) / 15.0); } @@ -106,28 +106,28 @@ WRITE_LINE_MEMBER(tecmo_state::adpcm_int) } /* the 8-bit dipswitches are split across addresses */ -READ8_MEMBER(tecmo_state::dswa_l_r) +uint8_t tecmo_state::dswa_l_r() { uint8_t port = ioport("DSWA")->read(); port &= 0x0f; return port; } -READ8_MEMBER(tecmo_state::dswa_h_r) +uint8_t tecmo_state::dswa_h_r() { uint8_t port = ioport("DSWA")->read(); port &= 0xf0; return port>>4; } -READ8_MEMBER(tecmo_state::dswb_l_r) +uint8_t tecmo_state::dswb_l_r() { uint8_t port = ioport("DSWB")->read(); port &= 0x0f; return port; } -READ8_MEMBER(tecmo_state::dswb_h_r) +uint8_t tecmo_state::dswb_h_r() { uint8_t port = ioport("DSWB")->read(); port &= 0xf0; diff --git a/src/mame/drivers/tecmosys.cpp b/src/mame/drivers/tecmosys.cpp index d11f8d0590b..58442dc95d2 100644 --- a/src/mame/drivers/tecmosys.cpp +++ b/src/mame/drivers/tecmosys.cpp @@ -197,12 +197,12 @@ ae500w07.ad1 - M6295 Samples (23c4001) #include "speaker.h" -READ8_MEMBER(tecmosys_state::sound_command_pending_r) +u8 tecmosys_state::sound_command_pending_r() { return m_soundlatch->pending_r(); } -WRITE8_MEMBER(tecmosys_state::sound_nmi_disable_w) +void tecmosys_state::sound_nmi_disable_w(u8 data) { // 00 and FF are the only values written here; the latter value is set during initialization and NMI processing m_soundnmi->in_w<1>(data == 0); @@ -217,7 +217,7 @@ WRITE8_MEMBER(tecmosys_state::sound_nmi_disable_w) - 880000 & 03, crash */ -WRITE16_MEMBER(tecmosys_state::unk880000_w) +void tecmosys_state::unk880000_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_880000regs[offset]); @@ -244,7 +244,7 @@ WRITE16_MEMBER(tecmosys_state::unk880000_w) } } -READ16_MEMBER(tecmosys_state::unk880000_r) +u16 tecmosys_state::unk880000_r(offs_t offset) { //u16 ret = m_880000regs[offset]; @@ -262,12 +262,12 @@ READ16_MEMBER(tecmosys_state::unk880000_r) } } -READ16_MEMBER(tecmosys_state::eeprom_r) +u16 tecmosys_state::eeprom_r() { return ((m_eeprom->do_read() & 0x01) << 11); } -WRITE16_MEMBER(tecmosys_state::eeprom_w) +void tecmosys_state::eeprom_w(offs_t offset, u16 data, u16 mem_mask) { if ( ACCESSING_BITS_8_15 ) { @@ -278,14 +278,14 @@ WRITE16_MEMBER(tecmosys_state::eeprom_w) } template<int Layer> -WRITE16_MEMBER(tecmosys_state::vram_w) +void tecmosys_state::vram_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_vram[Layer][offset]); m_tilemap[Layer]->mark_tile_dirty(offset/2); } template<int Layer> -WRITE16_MEMBER(tecmosys_state::lineram_w) +void tecmosys_state::lineram_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_lineram[Layer][offset]); if (data!=0x0000) popmessage("non 0 write to bg%01x lineram %04x %04x",Layer,offset,data); @@ -332,12 +332,12 @@ void tecmosys_state::main_map(address_map &map) } -WRITE8_MEMBER(tecmosys_state::z80_bank_w) +void tecmosys_state::z80_bank_w(u8 data) { m_audiobank->set_entry(data); } -WRITE8_MEMBER(tecmosys_state::oki_bank_w) +void tecmosys_state::oki_bank_w(u8 data) { m_okibank[0]->set_entry((data & 0x03) >> 0); m_okibank[1]->set_entry((data & 0x30) >> 4); diff --git a/src/mame/drivers/tehkanwc.cpp b/src/mame/drivers/tehkanwc.cpp index 2968742ee75..ec2bfcd8f34 100644 --- a/src/mame/drivers/tehkanwc.cpp +++ b/src/mame/drivers/tehkanwc.cpp @@ -112,7 +112,7 @@ void tehkanwc_state::machine_start() m_digits.resolve(); } -WRITE8_MEMBER(tehkanwc_state::sub_cpu_halt_w) +void tehkanwc_state::sub_cpu_halt_w(uint8_t data) { if (data) m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); @@ -121,7 +121,7 @@ WRITE8_MEMBER(tehkanwc_state::sub_cpu_halt_w) } -READ8_MEMBER(tehkanwc_state::track_0_r) +uint8_t tehkanwc_state::track_0_r(offs_t offset) { int joy; @@ -131,7 +131,7 @@ READ8_MEMBER(tehkanwc_state::track_0_r) return ioport(offset ? "P1Y" : "P1X")->read() - m_track0[offset]; } -READ8_MEMBER(tehkanwc_state::track_1_r) +uint8_t tehkanwc_state::track_1_r(offs_t offset) { int joy; @@ -141,13 +141,13 @@ READ8_MEMBER(tehkanwc_state::track_1_r) return ioport(offset ? "P2Y" : "P2X")->read() - m_track1[offset]; } -WRITE8_MEMBER(tehkanwc_state::track_0_reset_w) +void tehkanwc_state::track_0_reset_w(offs_t offset, uint8_t data) { /* reset the trackball counters */ m_track0[offset] = ioport(offset ? "P1Y" : "P1X")->read() + data; } -WRITE8_MEMBER(tehkanwc_state::track_1_reset_w) +void tehkanwc_state::track_1_reset_w(offs_t offset, uint8_t data) { /* reset the trackball counters */ m_track1[offset] = ioport(offset ? "P2Y" : "P2X")->read() + data; @@ -155,7 +155,7 @@ WRITE8_MEMBER(tehkanwc_state::track_1_reset_w) -WRITE8_MEMBER(tehkanwc_state::sound_command_w) +void tehkanwc_state::sound_command_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); @@ -173,7 +173,7 @@ void tehkanwc_state::device_timer(emu_timer &timer, device_timer_id id, int para } } -WRITE8_MEMBER(tehkanwc_state::sound_answer_w) +void tehkanwc_state::sound_answer_w(uint8_t data) { m_soundlatch2->write(data); diff --git a/src/mame/drivers/terracre.cpp b/src/mame/drivers/terracre.cpp index f823c04a8ce..9d2d3f6d87e 100644 --- a/src/mame/drivers/terracre.cpp +++ b/src/mame/drivers/terracre.cpp @@ -93,12 +93,12 @@ AT-2 #include "speaker.h" -WRITE16_MEMBER(terracre_state::amazon_sound_w) +void terracre_state::amazon_sound_w(uint16_t data) { m_soundlatch->write(((data & 0x7f) << 1) | 1); } -READ8_MEMBER(terracre_state::soundlatch_clear_r) +uint8_t terracre_state::soundlatch_clear_r() { m_soundlatch->clear_w(); return 0; diff --git a/src/mame/drivers/tetrisp2.cpp b/src/mame/drivers/tetrisp2.cpp index be4ccfe5765..73cf88abcb7 100644 --- a/src/mame/drivers/tetrisp2.cpp +++ b/src/mame/drivers/tetrisp2.cpp @@ -73,7 +73,7 @@ stepstag: ***************************************************************************/ -WRITE16_MEMBER(tetrisp2_state::tetrisp2_systemregs_w) +void tetrisp2_state::tetrisp2_systemregs_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) { @@ -83,7 +83,7 @@ WRITE16_MEMBER(tetrisp2_state::tetrisp2_systemregs_w) #define ROCKN_TIMER_BASE attotime::from_nsec(500000) -WRITE16_MEMBER(tetrisp2_state::rockn_systemregs_w) +void tetrisp2_state::rockn_systemregs_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) { @@ -97,7 +97,7 @@ WRITE16_MEMBER(tetrisp2_state::rockn_systemregs_w) } -WRITE16_MEMBER(tetrisp2_state::rocknms_sub_systemregs_w) +void tetrisp2_state::rocknms_sub_systemregs_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) { @@ -119,12 +119,12 @@ WRITE16_MEMBER(tetrisp2_state::rocknms_sub_systemregs_w) ***************************************************************************/ -READ16_MEMBER(tetrisp2_state::rockn_adpcmbank_r) +u16 tetrisp2_state::rockn_adpcmbank_r() { return ((m_rockn_adpcmbank & 0xf0ff) | (m_rockn_protectdata << 8)); } -WRITE16_MEMBER(tetrisp2_state::rockn_adpcmbank_w) +void tetrisp2_state::rockn_adpcmbank_w(u16 data) { u8 *SNDROM = memregion("ymz")->base(); int bank; @@ -141,7 +141,7 @@ WRITE16_MEMBER(tetrisp2_state::rockn_adpcmbank_w) memcpy(&SNDROM[0x0400000], &SNDROM[0x1000000 + (0x0c00000 * bank)], 0x0c00000); } -WRITE16_MEMBER(tetrisp2_state::rockn2_adpcmbank_w) +void tetrisp2_state::rockn2_adpcmbank_w(u16 data) { u8 *SNDROM = memregion("ymz")->base(); int bank; @@ -174,18 +174,18 @@ WRITE16_MEMBER(tetrisp2_state::rockn2_adpcmbank_w) } -READ16_MEMBER(tetrisp2_state::rockn_soundvolume_r) +u16 tetrisp2_state::rockn_soundvolume_r() { return 0xffff; } -WRITE16_MEMBER(tetrisp2_state::rockn_soundvolume_w) +void tetrisp2_state::rockn_soundvolume_w(u16 data) { m_rockn_soundvolume = data; } -WRITE16_MEMBER(tetrisp2_state::nndmseal_sound_bank_w) +void tetrisp2_state::nndmseal_sound_bank_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) { @@ -218,7 +218,7 @@ WRITE16_MEMBER(tetrisp2_state::nndmseal_sound_bank_w) ***************************************************************************/ -READ16_MEMBER(tetrisp2_state::tetrisp2_ip_1_word_r) +u16 tetrisp2_state::tetrisp2_ip_1_word_r() { return ( ioport("SYSTEM")->read() & 0xfcff ) | ( machine().rand() & ~0xfcff ) | @@ -237,18 +237,18 @@ READ16_MEMBER(tetrisp2_state::tetrisp2_ip_1_word_r) /* The game only ever writes even bytes and reads odd bytes */ -READ16_MEMBER(tetrisp2_state::tetrisp2_nvram_r) +u16 tetrisp2_state::tetrisp2_nvram_r(offs_t offset) { return ( (m_nvram[offset] >> 8) & 0x00ff ) | ( (m_nvram[offset] << 8) & 0xff00 ) ; } -WRITE16_MEMBER(tetrisp2_state::tetrisp2_nvram_w) +void tetrisp2_state::tetrisp2_nvram_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_nvram[offset]); } -READ16_MEMBER(tetrisp2_state::rockn_nvram_r) +u16 tetrisp2_state::rockn_nvram_r(offs_t offset) { return m_nvram[offset]; } @@ -263,12 +263,12 @@ READ16_MEMBER(tetrisp2_state::rockn_nvram_r) ***************************************************************************/ -READ16_MEMBER(tetrisp2_state::rocknms_main2sub_r) +u16 tetrisp2_state::rocknms_main2sub_r() { return m_rocknms_main2sub; } -WRITE16_MEMBER(tetrisp2_state::rocknms_main2sub_w) +void tetrisp2_state::rocknms_main2sub_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) m_rocknms_main2sub = (data ^ 0xffff); @@ -279,14 +279,14 @@ CUSTOM_INPUT_MEMBER(tetrisp2_state::rocknms_main2sub_status_r) return m_rocknms_sub2main & 0x0003; } -WRITE16_MEMBER(tetrisp2_state::rocknms_sub2main_w) +void tetrisp2_state::rocknms_sub2main_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) m_rocknms_sub2main = (data ^ 0xffff); } -WRITE16_MEMBER(tetrisp2_state::tetrisp2_coincounter_w) +void tetrisp2_state::tetrisp2_coincounter_w(u16 data) { machine().bookkeeping().coin_counter_w(0, (data & 0x0001)); } @@ -333,7 +333,7 @@ void tetrisp2_state::tetrisp2_map(address_map &map) } -WRITE16_MEMBER(tetrisp2_state::nndmseal_coincounter_w) +void tetrisp2_state::nndmseal_coincounter_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) { @@ -351,7 +351,7 @@ WRITE16_MEMBER(tetrisp2_state::nndmseal_coincounter_w) // popmessage("%04x",data); } -WRITE16_MEMBER(tetrisp2_state::nndmseal_b20000_w) +void tetrisp2_state::nndmseal_b20000_w(u16 data) { // leds? // popmessage("%04x",data); @@ -538,14 +538,14 @@ void tetrisp2_state::rocknms_sub_map(address_map &map) ***************************************************************************/ -READ16_MEMBER(stepstag_state::stepstag_coins_r) +u16 stepstag_state::stepstag_coins_r() { // bits 8 & 9? return ( ioport("COINS")->read() & 0xfcff ) | ( vj_upload_fini ? 0x300 : 0x100 ); } -WRITE16_MEMBER( stepstag_state::stepstag_b20000_w ) +void stepstag_state::stepstag_b20000_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) vj_upload_idx++; @@ -554,33 +554,33 @@ WRITE16_MEMBER( stepstag_state::stepstag_b20000_w ) vj_upload_fini = true; } -WRITE16_MEMBER( stepstag_state::stepstag_b00000_w ) +void stepstag_state::stepstag_b00000_w(u16 data) { vj_upload_idx = 0; vj_upload_fini = false; } -WRITE16_MEMBER( stepstag_state::stepstag_main2pc_w ) +void stepstag_state::stepstag_main2pc_w(u16 data) { popmessage("cmd @ pc: 0x%x\n", data); } -READ16_MEMBER(stepstag_state::unknown_read_0xc00000) +u16 stepstag_state::unknown_read_0xc00000() { return machine().rand(); // 3 } -READ16_MEMBER(stepstag_state::unknown_read_0xffff00) +u16 stepstag_state::unknown_read_0xffff00() { return machine().rand(); } -READ16_MEMBER(stepstag_state::stepstag_pc2main_r) +u16 stepstag_state::stepstag_pc2main_r() { return ioport("DEBUG_DSW")->read(); } -WRITE16_MEMBER(stepstag_state::stepstag_soundlatch_word_w) +void stepstag_state::stepstag_soundlatch_word_w(u16 data) { m_soundlatch->write(data); @@ -590,7 +590,7 @@ WRITE16_MEMBER(stepstag_state::stepstag_soundlatch_word_w) } -WRITE16_MEMBER(stepstag_state::stepstag_neon_w) +void stepstag_state::stepstag_neon_w(offs_t offset, u16 data, u16 mem_mask) { // 1f60, 1c60, 0790, 0490, 0b60, 0860, 1390, 1090, 1f60, 1c60, 1390, 1090, 0b60, 0860, 0790, 0490, ... if (ACCESSING_BITS_0_7) @@ -612,7 +612,7 @@ WRITE16_MEMBER(stepstag_state::stepstag_neon_w) } } -WRITE16_MEMBER(stepstag_state::stepstag_step_leds_w) +void stepstag_state::stepstag_step_leds_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_0_7) { @@ -635,7 +635,7 @@ WRITE16_MEMBER(stepstag_state::stepstag_step_leds_w) } } -WRITE16_MEMBER(stepstag_state::stepstag_button_leds_w) +void stepstag_state::stepstag_button_leds_w(offs_t offset, u16 data, u16 mem_mask) { if (ACCESSING_BITS_8_15) { diff --git a/src/mame/drivers/thedeep.cpp b/src/mame/drivers/thedeep.cpp index e0fcb7c29cb..3888f73b184 100644 --- a/src/mame/drivers/thedeep.cpp +++ b/src/mame/drivers/thedeep.cpp @@ -50,7 +50,7 @@ NOTE: There is manual for Run Deep which is (c) 1988 by World Games. Is Cream Co ***************************************************************************/ -WRITE8_MEMBER(thedeep_state::nmi_w) +void thedeep_state::nmi_w(uint8_t data) { m_nmi_enable = data; if (!m_nmi_enable) @@ -69,19 +69,19 @@ void thedeep_state::machine_start() save_item(NAME(m_coin_result)); } -READ8_MEMBER(thedeep_state::protection_r) +uint8_t thedeep_state::protection_r() { m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); return m_mcu_to_maincpu; } -WRITE8_MEMBER(thedeep_state::protection_w) +void thedeep_state::protection_w(uint8_t data) { m_maincpu_to_mcu = data; m_mcu->set_input_line(MCS51_INT0_LINE, ASSERT_LINE); } -READ8_MEMBER(thedeep_state::e004_r) +uint8_t thedeep_state::e004_r() { // 7654321- unused? // -------0 coin status from mcu ready @@ -93,7 +93,7 @@ READ8_MEMBER(thedeep_state::e004_r) return data; } -WRITE8_MEMBER(thedeep_state::e100_w) +void thedeep_state::e100_w(uint8_t data) { if (data != 1) logerror("pc %04x: e100 = %02x\n", m_maincpu->pc(),data); diff --git a/src/mame/drivers/thepit.cpp b/src/mame/drivers/thepit.cpp index 22feb9f7572..bd32f1f54df 100644 --- a/src/mame/drivers/thepit.cpp +++ b/src/mame/drivers/thepit.cpp @@ -182,7 +182,7 @@ void thepit_state::machine_start() save_item(NAME(m_nmi_mask)); } -READ8_MEMBER(thepit_state::intrepid_colorram_mirror_r) +uint8_t thepit_state::intrepid_colorram_mirror_r(offs_t offset) { return m_colorram[offset]; } @@ -1323,7 +1323,7 @@ ROM_END */ -READ8_MEMBER(thepit_state::rtriv_question_r) +uint8_t thepit_state::rtriv_question_r(offs_t offset) { // Set-up the remap table for every 16 bytes if((offset & 0xc00) == 0x800) @@ -1353,7 +1353,7 @@ READ8_MEMBER(thepit_state::rtriv_question_r) void thepit_state::init_rtriv() { // Set-up the weirdest questions read ever done - m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0x4fff, read8_delegate(*this, FUNC(thepit_state::rtriv_question_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0x4fff, read8sm_delegate(*this, FUNC(thepit_state::rtriv_question_r))); save_item(NAME(m_question_address)); save_item(NAME(m_question_rom)); diff --git a/src/mame/drivers/thoop2.cpp b/src/mame/drivers/thoop2.cpp index d1f840327a3..5f31406d781 100644 --- a/src/mame/drivers/thoop2.cpp +++ b/src/mame/drivers/thoop2.cpp @@ -78,7 +78,7 @@ void thoop2_state::machine_start() m_okibank->configure_entries(0, 16, memregion("oki")->base(), 0x10000); } -WRITE8_MEMBER(thoop2_state::oki_bankswitch_w) +void thoop2_state::oki_bankswitch_w(uint8_t data) { m_okibank->set_entry(data & 0x0f); } @@ -103,13 +103,13 @@ WRITE_LINE_MEMBER(thoop2_state::coin2_counter_w) machine().bookkeeping().coin_counter_w(1, state); } -WRITE8_MEMBER(thoop2_state::shareram_w) +void thoop2_state::shareram_w(offs_t offset, uint8_t data) { // why isn't there address map functionality for this? reinterpret_cast<u8 *>(m_shareram.target())[BYTE_XOR_BE(offset)] = data; } -READ8_MEMBER(thoop2_state::shareram_r) +uint8_t thoop2_state::shareram_r(offs_t offset) { // why isn't there address map functionality for this? return reinterpret_cast<u8 const *>(m_shareram.target())[BYTE_XOR_BE(offset)]; diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp index c5b3bc292f4..e82d772a168 100644 --- a/src/mame/drivers/thunderj.cpp +++ b/src/mame/drivers/thunderj.cpp @@ -72,7 +72,7 @@ void thunderj_state::machine_start() * *************************************/ -READ16_MEMBER(thunderj_state::special_port2_r) +uint16_t thunderj_state::special_port2_r() { int result = ioport("260012")->read(); result ^= 0x0010; @@ -80,7 +80,7 @@ READ16_MEMBER(thunderj_state::special_port2_r) } -WRITE16_MEMBER(thunderj_state::latch_w) +void thunderj_state::latch_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* reset extra CPU */ if (ACCESSING_BITS_0_7) diff --git a/src/mame/drivers/ti89.cpp b/src/mame/drivers/ti89.cpp index 1e4a6c3bd20..700e3b978f1 100644 --- a/src/mame/drivers/ti89.cpp +++ b/src/mame/drivers/ti89.cpp @@ -49,7 +49,7 @@ uint8_t ti68k_state::keypad_r() } -WRITE16_MEMBER ( ti68k_state::ti68k_io_w ) +void ti68k_state::ti68k_io_w(offs_t offset, uint16_t data) { switch(offset & 0x0f) { @@ -92,7 +92,7 @@ WRITE16_MEMBER ( ti68k_state::ti68k_io_w ) } -READ16_MEMBER ( ti68k_state::ti68k_io_r ) +uint16_t ti68k_state::ti68k_io_r(offs_t offset) { uint16_t data; @@ -114,7 +114,7 @@ READ16_MEMBER ( ti68k_state::ti68k_io_r ) } -WRITE16_MEMBER ( ti68k_state::ti68k_io2_w ) +void ti68k_state::ti68k_io2_w(offs_t offset, uint16_t data) { switch(offset & 0x7f) { @@ -130,7 +130,7 @@ WRITE16_MEMBER ( ti68k_state::ti68k_io2_w ) } -READ16_MEMBER ( ti68k_state::ti68k_io2_r ) +uint16_t ti68k_state::ti68k_io2_r(offs_t offset) { uint16_t data; @@ -143,7 +143,7 @@ READ16_MEMBER ( ti68k_state::ti68k_io2_r ) } -READ16_MEMBER ( ti68k_state::rom_r ) +uint16_t ti68k_state::rom_r(offs_t offset) { return m_rom_base[offset]; } @@ -464,11 +464,11 @@ void ti68k_state::machine_start() if (initial_pc > 0x400000) { - m_maincpu->space(AS_PROGRAM).install_read_handler(0x400000, 0x5fffff, read16_delegate(*this, FUNC(ti68k_state::rom_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x400000, 0x5fffff, read16sm_delegate(*this, FUNC(ti68k_state::rom_r))); } else { - m_maincpu->space(AS_PROGRAM).install_read_handler(0x200000, 0x3fffff, read16_delegate(*this, FUNC(ti68k_state::rom_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x200000, 0x3fffff, read16sm_delegate(*this, FUNC(ti68k_state::rom_r))); } } diff --git a/src/mame/drivers/ti990_10.cpp b/src/mame/drivers/ti990_10.cpp index 3004c668f73..9caa53f84cb 100644 --- a/src/mame/drivers/ti990_10.cpp +++ b/src/mame/drivers/ti990_10.cpp @@ -101,8 +101,8 @@ private: WRITE_LINE_MEMBER( tape_interrupt ); WRITE_LINE_MEMBER(ti990_set_int13); WRITE_LINE_MEMBER(ti990_ckon_ckof_callback); - READ8_MEMBER( ti990_panel_read ); - WRITE8_MEMBER( ti990_panel_write ); + uint8_t ti990_panel_read(offs_t offset); + void ti990_panel_write(uint8_t data); TIMER_CALLBACK_MEMBER(clear_load); @@ -230,7 +230,7 @@ WRITE_LINE_MEMBER(ti990_10_state::ti990_ckon_ckof_callback) F: flag (according to 990 handbook) */ -READ8_MEMBER( ti990_10_state::ti990_panel_read ) +uint8_t ti990_10_state::ti990_panel_read(offs_t offset) { if (offset == 1) return 0x48; @@ -238,7 +238,7 @@ READ8_MEMBER( ti990_10_state::ti990_panel_read ) return 0; } -WRITE8_MEMBER( ti990_10_state::ti990_panel_write ) +void ti990_10_state::ti990_panel_write(uint8_t data) { } diff --git a/src/mame/drivers/tiamc1.cpp b/src/mame/drivers/tiamc1.cpp index 3ef5c87a85e..aac302ba266 100644 --- a/src/mame/drivers/tiamc1.cpp +++ b/src/mame/drivers/tiamc1.cpp @@ -135,8 +135,7 @@ void tiamc1_state::machine_reset() { - address_space &space = m_maincpu->space(AS_PROGRAM); - tiamc1_bankswitch_w(space, 0, 0); + tiamc1_bankswitch_w(0); } void tiamc1_state::tiamc1_control_w(uint8_t data) diff --git a/src/mame/drivers/tigeroad.cpp b/src/mame/drivers/tigeroad.cpp index ef14b999775..428da5cfd63 100644 --- a/src/mame/drivers/tigeroad.cpp +++ b/src/mame/drivers/tigeroad.cpp @@ -58,14 +58,14 @@ single plane board. -WRITE16_MEMBER(tigeroad_state::tigeroad_soundcmd_w) +void tigeroad_state::tigeroad_soundcmd_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_8_15) m_soundlatch->write(data >> 8); } -WRITE8_MEMBER(tigeroad_state::msm5205_w) +void tigeroad_state::msm5205_w(uint8_t data) { m_msm->reset_w(BIT(data, 7)); m_msm->data_w(data); @@ -92,7 +92,7 @@ void f1dream_state::out3_w(uint8_t data) m_old_p3 = data; } -WRITE16_MEMBER(f1dream_state::blktiger_to_mcu_w) +void f1dream_state::blktiger_to_mcu_w(uint16_t data) { m_mcu->set_input_line(MCS51_INT0_LINE, HOLD_LINE); @@ -123,13 +123,13 @@ void tigeroad_state::main_map(address_map &map) } -READ8_MEMBER(f1dream_state::mcu_shared_r) +uint8_t f1dream_state::mcu_shared_r(offs_t offset) { uint8_t ret = m_ram16[(0x3fe0 / 2) + offset]; return ret; } -WRITE8_MEMBER(f1dream_state::mcu_shared_w) +void f1dream_state::mcu_shared_w(offs_t offset, uint8_t data) { m_ram16[(0x3fe0 / 2) + offset] = (m_ram16[(0x3fe0 / 2) + offset] & 0xff00) | data; } diff --git a/src/mame/drivers/tiki100.cpp b/src/mame/drivers/tiki100.cpp index 122063589ed..9ddd46b6df3 100644 --- a/src/mame/drivers/tiki100.cpp +++ b/src/mame/drivers/tiki100.cpp @@ -92,14 +92,14 @@ void tiki100_state::mrq_w(offs_t offset, uint8_t data) m_exp->mrq_w(offset, data); } -READ8_MEMBER( tiki100_state::iorq_r ) +uint8_t tiki100_state::iorq_r(offs_t offset) { uint8_t data = m_exp->iorq_r(offset, 0xff); switch ((offset & 0xff) >> 2) { case 0x00: // KEYS - data = keyboard_r(space, 0); + data = keyboard_r(); break; case 0x01: // SERS @@ -131,14 +131,14 @@ READ8_MEMBER( tiki100_state::iorq_r ) return data; } -WRITE8_MEMBER( tiki100_state::iorq_w ) +void tiki100_state::iorq_w(offs_t offset, uint8_t data) { m_exp->iorq_w(offset, data); switch ((offset & 0xff) >> 2) { case 0x00: // KEYS - keyboard_w(space, 0, data); + keyboard_w(data); break; case 0x01: // SERS @@ -150,7 +150,7 @@ WRITE8_MEMBER( tiki100_state::iorq_w ) break; case 0x03: // VIPB - video_mode_w(space, 0, data); + video_mode_w(data); break; case 0x04: // FLOP @@ -161,7 +161,7 @@ WRITE8_MEMBER( tiki100_state::iorq_w ) switch (offset & 0x03) { case 0: case 1: - palette_w(space, 0, data); + palette_w(data); break; case 2: @@ -179,14 +179,14 @@ WRITE8_MEMBER( tiki100_state::iorq_w ) break; case 0x07: // SYL - system_w(space, 0, data); + system_w(data); break; } } /* Read/Write Handlers */ -READ8_MEMBER( tiki100_state::keyboard_r ) +uint8_t tiki100_state::keyboard_r() { uint8_t data = 0xff; @@ -201,12 +201,12 @@ READ8_MEMBER( tiki100_state::keyboard_r ) return data; } -WRITE8_MEMBER( tiki100_state::keyboard_w ) +void tiki100_state::keyboard_w(uint8_t data) { m_keylatch = 0; } -WRITE8_MEMBER( tiki100_state::video_mode_w ) +void tiki100_state::video_mode_w(uint8_t data) { /* @@ -226,7 +226,7 @@ WRITE8_MEMBER( tiki100_state::video_mode_w ) m_mode = data; } -WRITE8_MEMBER( tiki100_state::palette_w ) +void tiki100_state::palette_w(uint8_t data) { /* @@ -246,7 +246,7 @@ WRITE8_MEMBER( tiki100_state::palette_w ) m_palette_val = data; } -WRITE8_MEMBER( tiki100_state::system_w ) +void tiki100_state::system_w(uint8_t data) { /* @@ -699,9 +699,7 @@ void tiki100_state::machine_start() void tiki100_state::machine_reset() { - address_space &space = m_maincpu->space(AS_PROGRAM); - - system_w(space, 0, 0); + system_w(0); m_st = m_st_io->read(); } diff --git a/src/mame/drivers/timeplt.cpp b/src/mame/drivers/timeplt.cpp index 2a9e3ef9709..ffc5ac5a2b8 100644 --- a/src/mame/drivers/timeplt.cpp +++ b/src/mame/drivers/timeplt.cpp @@ -96,7 +96,7 @@ WRITE_LINE_MEMBER(timeplt_state::coin_counter_2_w) machine().bookkeeping().coin_counter_w(1, state); } -READ8_MEMBER(timeplt_state::psurge_protection_r) +uint8_t timeplt_state::psurge_protection_r() { return 0x80; } diff --git a/src/mame/drivers/timex.cpp b/src/mame/drivers/timex.cpp index 23d02d5059f..5c6c94d7344 100644 --- a/src/mame/drivers/timex.cpp +++ b/src/mame/drivers/timex.cpp @@ -165,23 +165,23 @@ http://www.z88forever.org.uk/zxplus3e/ /* TS2048 specific functions */ -READ8_MEMBER( timex_state::ts2068_port_f4_r ) +uint8_t timex_state::ts2068_port_f4_r() { return m_port_f4_data; } -WRITE8_MEMBER( timex_state::ts2068_port_f4_w ) +void timex_state::ts2068_port_f4_w(uint8_t data) { m_port_f4_data = data; ts2068_update_memory(); } -READ8_MEMBER( timex_state::ts2068_port_ff_r ) +uint8_t timex_state::ts2068_port_ff_r() { return m_port_ff_data; } -WRITE8_MEMBER( timex_state::ts2068_port_ff_w ) +void timex_state::ts2068_port_ff_w(offs_t offset, uint8_t data) { /* Bits 0-2 Video Mode Select Bits 3-5 64 column mode ink/paper selection @@ -565,7 +565,7 @@ MACHINE_RESET_MEMBER(timex_state,ts2068) /* TC2048 specific functions */ -WRITE8_MEMBER( timex_state::tc2048_port_ff_w ) +void timex_state::tc2048_port_ff_w(offs_t offset, uint8_t data) { m_port_ff_data = data; logerror("Port %04x write %02x\n", offset, data); diff --git a/src/mame/drivers/tmc1800.cpp b/src/mame/drivers/tmc1800.cpp index 4272e2372c6..ed0209da6e6 100644 --- a/src/mame/drivers/tmc1800.cpp +++ b/src/mame/drivers/tmc1800.cpp @@ -187,17 +187,17 @@ Demo tape contents: /* Read/Write Handlers */ -WRITE8_MEMBER( tmc1800_state::keylatch_w ) +void tmc1800_state::keylatch_w(uint8_t data) { m_keylatch = data; } -WRITE8_MEMBER( osc1000b_state::keylatch_w ) +void osc1000b_state::keylatch_w(uint8_t data) { m_keylatch = data; } -WRITE8_MEMBER( tmc2000_state::keylatch_w ) +void tmc2000_state::keylatch_w(uint8_t data) { /* @@ -217,7 +217,7 @@ WRITE8_MEMBER( tmc2000_state::keylatch_w ) m_keylatch = data & 0x3f; } -WRITE8_MEMBER( nano_state::keylatch_w ) +void nano_state::keylatch_w(uint8_t data) { /* @@ -280,7 +280,7 @@ void tmc2000_state::bankswitch() } } -WRITE8_MEMBER( tmc2000_state::bankswitch_w ) +void tmc2000_state::bankswitch_w(uint8_t data) { m_roc = 0; m_rac = BIT(data, 0); @@ -289,7 +289,7 @@ WRITE8_MEMBER( tmc2000_state::bankswitch_w ) m_cti->tone_latch_w(data); } -WRITE8_MEMBER( nano_state::bankswitch_w ) +void nano_state::bankswitch_w(uint8_t data) { /* enable RAM */ address_space &program = m_maincpu->space(AS_PROGRAM); @@ -300,7 +300,7 @@ WRITE8_MEMBER( nano_state::bankswitch_w ) m_cti->tone_latch_w(data); } -READ8_MEMBER( tmc1800_state::dispon_r ) +uint8_t tmc1800_state::dispon_r() { m_vdc->disp_on_w(1); m_vdc->disp_on_w(0); @@ -308,7 +308,7 @@ READ8_MEMBER( tmc1800_state::dispon_r ) return 0xff; } -WRITE8_MEMBER( tmc1800_state::dispoff_w ) +void tmc1800_state::dispoff_w(uint8_t data) { m_vdc->disp_off_w(1); m_vdc->disp_off_w(0); diff --git a/src/mame/drivers/tmc2000e.cpp b/src/mame/drivers/tmc2000e.cpp index eb728f9b7c0..3cf5ea4cb9f 100644 --- a/src/mame/drivers/tmc2000e.cpp +++ b/src/mame/drivers/tmc2000e.cpp @@ -40,43 +40,43 @@ /* Read/Write Handlers */ -READ8_MEMBER( tmc2000e_state::vismac_r ) +uint8_t tmc2000e_state::vismac_r() { return 0; } -WRITE8_MEMBER( tmc2000e_state::vismac_w ) +void tmc2000e_state::vismac_w(uint8_t data) { } -READ8_MEMBER( tmc2000e_state::floppy_r ) +uint8_t tmc2000e_state::floppy_r() { return 0; } -WRITE8_MEMBER( tmc2000e_state::floppy_w ) +void tmc2000e_state::floppy_w(uint8_t data) { } -READ8_MEMBER( tmc2000e_state::ascii_keyboard_r ) +uint8_t tmc2000e_state::ascii_keyboard_r() { return 0; } -READ8_MEMBER( tmc2000e_state::io_r ) +uint8_t tmc2000e_state::io_r() { return 0; } -WRITE8_MEMBER( tmc2000e_state::io_w ) +void tmc2000e_state::io_w(uint8_t data) { } -WRITE8_MEMBER( tmc2000e_state::io_select_w ) +void tmc2000e_state::io_select_w(uint8_t data) { } -WRITE8_MEMBER( tmc2000e_state::keyboard_latch_w ) +void tmc2000e_state::keyboard_latch_w(uint8_t data) { m_keylatch = data; } diff --git a/src/mame/drivers/tmc600.cpp b/src/mame/drivers/tmc600.cpp index 791203fbb6f..26d727321e7 100644 --- a/src/mame/drivers/tmc600.cpp +++ b/src/mame/drivers/tmc600.cpp @@ -97,7 +97,7 @@ Notes: #include "emu.h" #include "includes/tmc600.h" -READ8_MEMBER( tmc600_state::rtc_r ) +uint8_t tmc600_state::rtc_r() { m_rtc_int = m_vismac_reg_latch >> 3; diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp index b788d31fd47..af60fb44859 100644 --- a/src/mame/drivers/tmnt.cpp +++ b/src/mame/drivers/tmnt.cpp @@ -76,7 +76,7 @@ Updates: #include "speaker.h" -READ16_MEMBER(tmnt_state::k052109_word_noA12_r) +uint16_t tmnt_state::k052109_word_noA12_r(offs_t offset) { /* some games have the A12 line not connected, so the chip spans */ /* twice the memory range, with mirroring */ @@ -84,7 +84,7 @@ READ16_MEMBER(tmnt_state::k052109_word_noA12_r) return m_k052109->word_r(offset); } -WRITE16_MEMBER(tmnt_state::k052109_word_noA12_w) +void tmnt_state::k052109_word_noA12_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* some games have the A12 line not connected, so the chip spans */ /* twice the memory range, with mirroring */ @@ -92,7 +92,7 @@ WRITE16_MEMBER(tmnt_state::k052109_word_noA12_w) m_k052109->word_w(offset, data, mem_mask); } -WRITE16_MEMBER(tmnt_state::punkshot_k052109_word_w) +void tmnt_state::punkshot_k052109_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* it seems that a word write is supposed to affect only the MSB. The */ /* "ROUND 1" text in punkshtj goes lost otherwise. */ @@ -102,19 +102,19 @@ WRITE16_MEMBER(tmnt_state::punkshot_k052109_word_w) m_k052109->write(offset + 0x2000, data & 0xff); } -WRITE16_MEMBER(tmnt_state::punkshot_k052109_word_noA12_w) +void tmnt_state::punkshot_k052109_word_noA12_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* some games have the A12 line not connected, so the chip spans */ /* twice the memory range, with mirroring */ offset = ((offset & 0x3000) >> 1) | (offset & 0x07ff); - punkshot_k052109_word_w(space, offset, data, mem_mask); + punkshot_k052109_word_w(offset, data, mem_mask); } /* the interface with the 053245 is weird. The chip can address only 0x800 bytes */ /* of RAM, but they put 0x4000 there. The CPU can access them all. Address lines */ /* A1, A5 and A6 don't go to the 053245. */ -READ16_MEMBER(tmnt_state::k053245_scattered_word_r) +uint16_t tmnt_state::k053245_scattered_word_r(offs_t offset) { if (offset & 0x0031) return m_spriteram[offset]; @@ -125,7 +125,7 @@ READ16_MEMBER(tmnt_state::k053245_scattered_word_r) } } -WRITE16_MEMBER(tmnt_state::k053245_scattered_word_w) +void tmnt_state::k053245_scattered_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(m_spriteram + offset); @@ -136,14 +136,14 @@ WRITE16_MEMBER(tmnt_state::k053245_scattered_word_w) } } -READ16_MEMBER(tmnt_state::k053244_word_noA1_r) +uint16_t tmnt_state::k053244_word_noA1_r(offs_t offset) { offset &= ~1; /* handle mirror address */ return m_k053245->k053244_r(offset + 1) | (m_k053245->k053244_r(offset) << 8); } -WRITE16_MEMBER(tmnt_state::k053244_word_noA1_w) +void tmnt_state::k053244_word_noA1_w(offs_t offset, uint16_t data, uint16_t mem_mask) { offset &= ~1; /* handle mirror address */ @@ -174,7 +174,7 @@ INTERRUPT_GEN_MEMBER(tmnt_state::lgtnfght_interrupt) device.execute().set_input_line(M68K_IRQ_5, HOLD_LINE); } -WRITE8_MEMBER(glfgreat_state::glfgreat_sound_w) +void glfgreat_state::glfgreat_sound_w(offs_t offset, uint8_t data) { m_k053260->main_write(offset, data); @@ -183,23 +183,23 @@ WRITE8_MEMBER(glfgreat_state::glfgreat_sound_w) } -WRITE16_MEMBER(prmrsocr_state::prmrsocr_sound_irq_w) +void prmrsocr_state::prmrsocr_sound_irq_w(uint16_t data) { m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80 } -WRITE8_MEMBER(prmrsocr_state::prmrsocr_audio_bankswitch_w) +void prmrsocr_state::prmrsocr_audio_bankswitch_w(uint8_t data) { membank("bank1")->set_entry(data & 7); } -READ8_MEMBER(tmnt_state::tmnt_sres_r) +uint8_t tmnt_state::tmnt_sres_r() { return m_tmnt_soundlatch; } -WRITE8_MEMBER(tmnt_state::tmnt_sres_w) +void tmnt_state::tmnt_sres_w(uint8_t data) { /* bit 1 resets the UPD7795C sound chip */ m_upd7759->reset_w(data & 2); @@ -215,12 +215,12 @@ WRITE8_MEMBER(tmnt_state::tmnt_sres_w) m_tmnt_soundlatch = data; } -WRITE8_MEMBER(tmnt_state::tmnt_upd_start_w) +void tmnt_state::tmnt_upd_start_w(uint8_t data) { m_upd7759->start_w(data & 1); } -READ8_MEMBER(tmnt_state::tmnt_upd_busy_r) +uint8_t tmnt_state::tmnt_upd_busy_r() { return m_upd7759->busy_r() ? 1 : 0; } @@ -277,7 +277,7 @@ void tmnt_state::device_timer(emu_timer &timer, device_timer_id id, int param, v } } -WRITE8_MEMBER(tmnt_state::sound_arm_nmi_w) +void tmnt_state::sound_arm_nmi_w(uint8_t data) { // sound_nmi_enabled = 1; m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); @@ -285,7 +285,7 @@ WRITE8_MEMBER(tmnt_state::sound_arm_nmi_w) } -READ16_MEMBER(tmnt_state::punkshot_kludge_r) +uint16_t tmnt_state::punkshot_kludge_r() { /* I don't know what's going on here; at one point, the code reads location */ /* 0xffffff, and returning 0 causes the game to mess up - locking up in a */ @@ -296,7 +296,7 @@ READ16_MEMBER(tmnt_state::punkshot_kludge_r) /* protection simulation derived from a bootleg */ -READ16_MEMBER(tmnt_state::ssriders_protection_r) +uint16_t tmnt_state::ssriders_protection_r(address_space &space) { int data = space.read_word(0x105a0a); int cmd = space.read_word(0x1058fc); @@ -339,7 +339,7 @@ READ16_MEMBER(tmnt_state::ssriders_protection_r) } } -WRITE16_MEMBER(tmnt_state::ssriders_protection_w) +void tmnt_state::ssriders_protection_w(address_space &space, offs_t offset, uint16_t data) { if (offset == 1) { @@ -371,7 +371,7 @@ WRITE16_MEMBER(tmnt_state::ssriders_protection_w) ***************************************************************************/ -READ16_MEMBER(tmnt_state::blswhstl_coin_r) +uint16_t tmnt_state::blswhstl_coin_r() { int res; @@ -383,7 +383,7 @@ READ16_MEMBER(tmnt_state::blswhstl_coin_r) return res ^ m_toggle; } -READ16_MEMBER(tmnt_state::ssriders_eeprom_r) +uint16_t tmnt_state::ssriders_eeprom_r() { int res; @@ -397,7 +397,7 @@ READ16_MEMBER(tmnt_state::ssriders_eeprom_r) return res ^ m_toggle; } -READ16_MEMBER(tmnt_state::sunsetbl_eeprom_r) +uint16_t tmnt_state::sunsetbl_eeprom_r() { int res; @@ -411,7 +411,7 @@ READ16_MEMBER(tmnt_state::sunsetbl_eeprom_r) return res ^ m_toggle; } -WRITE16_MEMBER(tmnt_state::blswhstl_eeprom_w) +void tmnt_state::blswhstl_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -422,7 +422,7 @@ WRITE16_MEMBER(tmnt_state::blswhstl_eeprom_w) } } -READ16_MEMBER(tmnt_state::thndrx2_eeprom_r) +uint16_t tmnt_state::thndrx2_eeprom_r() { int res; @@ -435,7 +435,7 @@ READ16_MEMBER(tmnt_state::thndrx2_eeprom_r) return (res ^ m_toggle); } -WRITE16_MEMBER(tmnt_state::thndrx2_eeprom_w) +void tmnt_state::thndrx2_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -454,11 +454,11 @@ WRITE16_MEMBER(tmnt_state::thndrx2_eeprom_w) } } -WRITE16_MEMBER(prmrsocr_state::prmrsocr_eeprom_w) +void prmrsocr_state::prmrsocr_eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { - prmrsocr_122000_w(space, offset, data, mem_mask); + prmrsocr_122000_w(offset, data, mem_mask); } if (ACCESSING_BITS_8_15) @@ -470,7 +470,7 @@ WRITE16_MEMBER(prmrsocr_state::prmrsocr_eeprom_w) } } -WRITE8_MEMBER(tmnt_state::cuebrick_nvbank_w) +void tmnt_state::cuebrick_nvbank_w(uint8_t data) { membank("nvrambank")->set_entry(data); } @@ -580,7 +580,7 @@ void tmnt_state::lgtnfght_main_map(address_map &map) map(0x100000, 0x107fff).rw(FUNC(tmnt_state::k052109_word_noA12_r), FUNC(tmnt_state::k052109_word_noA12_w)); } -WRITE16_MEMBER(tmnt_state::ssriders_soundkludge_w) +void tmnt_state::ssriders_soundkludge_w(uint16_t dat) { /* I think this is more than just a trigger */ m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80 @@ -607,17 +607,15 @@ void tmnt_state::blswhstl_main_map(address_map &map) map(0x780700, 0x78071f).w(m_k053251, FUNC(k053251_device::write)).umask16(0x00ff); } -WRITE16_MEMBER(glfgreat_state::k053251_glfgreat_w) +void glfgreat_state::k053251_glfgreat_w(offs_t offset, uint16_t data, uint16_t mem_mask) { - int i; - if (ACCESSING_BITS_8_15) { m_k053251->write(offset, (data >> 8) & 0xff); /* FIXME: in the old code k052109 tilemaps were tilemaps 2,3,4 for k053251 and got marked as dirty in the write above... how was the original hardware working?!? */ - for (i = 0; i < 3; i++) + for (int i = 0; i < 3; i++) { if (m_k053251->get_tmap_dirty(2 + i)) { @@ -691,7 +689,7 @@ inline uint32_t tmnt_state::tmnt2_get_word( uint32_t addr ) return 0; } -void tmnt_state::tmnt2_put_word( address_space &space, uint32_t addr, uint16_t data ) +void tmnt_state::tmnt2_put_word( uint32_t addr, uint16_t data ) { uint32_t offs; if (addr >= 0x180000 / 2 && addr <= 0x183fff / 2) @@ -708,7 +706,7 @@ void tmnt_state::tmnt2_put_word( address_space &space, uint32_t addr, uint16_t d m_sunset_104000[addr - 0x104000 / 2] = data; } -WRITE16_MEMBER(tmnt_state::tmnt2_1c0800_w) +void tmnt_state::tmnt2_1c0800_w(offs_t offset, uint16_t data, uint16_t mem_mask) { uint32_t src_addr, dst_addr, mod_addr, attr1, code, attr2, cbase, cmod, color; int xoffs, yoffs, xmod, ymod, zmod, xzoom, yzoom, i; @@ -821,14 +819,14 @@ WRITE16_MEMBER(tmnt_state::tmnt2_1c0800_w) xoffs += xmod; yoffs += ymod; - tmnt2_put_word(space, dst_addr + 0, attr1); - tmnt2_put_word(space, dst_addr + 2, code); - tmnt2_put_word(space, dst_addr + 4, (uint32_t)yoffs); - tmnt2_put_word(space, dst_addr + 6, (uint32_t)xoffs); - tmnt2_put_word(space, dst_addr + 12, attr2 | color); + tmnt2_put_word(dst_addr + 0, attr1); + tmnt2_put_word(dst_addr + 2, code); + tmnt2_put_word(dst_addr + 4, (uint32_t)yoffs); + tmnt2_put_word(dst_addr + 6, (uint32_t)xoffs); + tmnt2_put_word(dst_addr + 12, attr2 | color); } #else // for reference; do not remove -WRITE16_MEMBER(tmnt_state::tmnt2_1c0800_w) +void tmnt_state::tmnt2_1c0800_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(m_tmnt2_1c0800 + offset); if (offset == 0x0008 && (m_tmnt2_1c0800[0x8] & 0xff00) == 0x8200) diff --git a/src/mame/drivers/toki.cpp b/src/mame/drivers/toki.cpp index 4e5aea77002..02a99b40ae4 100644 --- a/src/mame/drivers/toki.cpp +++ b/src/mame/drivers/toki.cpp @@ -103,13 +103,13 @@ Notes: #include "speaker.h" -WRITE16_MEMBER(toki_state::tokib_soundcommand_w) +void toki_state::tokib_soundcommand_w(uint16_t data) { m_soundlatch->write(data & 0xff); m_audiocpu->set_input_line(0, HOLD_LINE); } -READ16_MEMBER(toki_state::pip_r) +uint16_t toki_state::pip_r() { return ~0; } @@ -126,7 +126,7 @@ WRITE_LINE_MEMBER(toki_state::tokib_adpcm_int) m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } -WRITE8_MEMBER(toki_state::tokib_adpcm_control_w) +void toki_state::tokib_adpcm_control_w(uint8_t data) { /* the code writes either 2 or 3 in the bottom two bits */ membank("bank1")->set_entry(data & 1); @@ -134,7 +134,7 @@ WRITE8_MEMBER(toki_state::tokib_adpcm_control_w) m_msm->reset_w(data & 0x08); } -WRITE8_MEMBER(toki_state::tokib_adpcm_data_w) +void toki_state::tokib_adpcm_data_w(uint8_t data) { m_msm5205next = data; } @@ -234,7 +234,7 @@ void toki_state::jujuba_audio_opcodes_map(address_map &map) map(0x8000, 0xffff).bankr("seibu_bank1"); } -READ8_MEMBER(toki_state::jujuba_z80_data_decrypt) +uint8_t toki_state::jujuba_z80_data_decrypt(offs_t offset) { return m_audiocpu_rom[offset] ^ 0x55; } diff --git a/src/mame/drivers/toobin.cpp b/src/mame/drivers/toobin.cpp index e1792e893d1..811b038cc11 100644 --- a/src/mame/drivers/toobin.cpp +++ b/src/mame/drivers/toobin.cpp @@ -59,7 +59,7 @@ void toobin_state::machine_start() * *************************************/ -WRITE16_MEMBER(toobin_state::interrupt_scan_w) +void toobin_state::interrupt_scan_w(offs_t offset, uint16_t data, uint16_t mem_mask) { int oldword = m_interrupt_scan[offset]; int newword = oldword; diff --git a/src/mame/drivers/tp84.cpp b/src/mame/drivers/tp84.cpp index 11ee5986988..c5f775d47eb 100644 --- a/src/mame/drivers/tp84.cpp +++ b/src/mame/drivers/tp84.cpp @@ -127,7 +127,7 @@ WRITE_LINE_MEMBER(tp84_state::flip_screen_y_w) } -READ8_MEMBER(tp84_state::tp84_sh_timer_r) +uint8_t tp84_state::tp84_sh_timer_r() { /* main xtal 14.318MHz, divided by 4 to get the CPU clock, further */ /* divided by 2048 to get this timer */ @@ -137,7 +137,7 @@ READ8_MEMBER(tp84_state::tp84_sh_timer_r) } -WRITE8_MEMBER(tp84_state::tp84_filter_w) +void tp84_state::tp84_filter_w(offs_t offset, uint8_t data) { int C; @@ -164,7 +164,7 @@ WRITE8_MEMBER(tp84_state::tp84_filter_w) m_filter[2]->filter_rc_set_RC(filter_rc_device::LOWPASS,1000,2200,1000,CAP_P(C)); } -WRITE8_MEMBER(tp84_state::tp84_sh_irqtrigger_w) +void tp84_state::tp84_sh_irqtrigger_w(uint8_t data) { m_audiocpu->set_input_line_and_vector(0,HOLD_LINE,0xff); // Z80 } @@ -214,7 +214,7 @@ void tp84_state::tp84b_cpu1_map(address_map &map) } -WRITE8_MEMBER(tp84_state::sub_irq_mask_w) +void tp84_state::sub_irq_mask_w(uint8_t data) { m_sub_irq_mask = data & 1; if (!m_sub_irq_mask) diff --git a/src/mame/drivers/trackfld.cpp b/src/mame/drivers/trackfld.cpp index 8823e73dde7..4fdb8089b13 100644 --- a/src/mame/drivers/trackfld.cpp +++ b/src/mame/drivers/trackfld.cpp @@ -210,7 +210,7 @@ WRITE_LINE_MEMBER(trackfld_state::coin_counter_2_w) machine().bookkeeping().coin_counter_w(1, state); } -WRITE8_MEMBER(trackfld_state::questions_bank_w) +void trackfld_state::questions_bank_w(uint8_t data) { for (int i = 0; i < 8; i++) { @@ -259,7 +259,7 @@ WRITE_LINE_MEMBER(trackfld_state::nmi_mask_w) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -READ8_MEMBER(trackfld_state::trackfld_speech_r) +uint8_t trackfld_state::trackfld_speech_r() { if (m_vlm->bsy()) return 1; @@ -267,7 +267,7 @@ READ8_MEMBER(trackfld_state::trackfld_speech_r) return 0; } -WRITE8_MEMBER(trackfld_state::trackfld_VLM5030_control_w) +void trackfld_state::trackfld_VLM5030_control_w(uint8_t data) { /* bit 0 is latch direction */ m_vlm->st((data >> 1) & 1); @@ -387,9 +387,9 @@ void trackfld_state::wizzquiz_map(address_map &map) } -READ8_MEMBER(trackfld_state::trackfld_SN76496_r) +uint8_t trackfld_state::trackfld_SN76496_r() { - konami_SN76496_w(space, 0, 0); + konami_SN76496_w(0); return 0xff; // ? } @@ -1657,7 +1657,7 @@ void trackfld_state::init_atlantol() downcast<konami1_device &>(*m_maincpu).set_encryption_boundary(0x6000); - space.install_write_handler(0x0800, 0x0800, write8_delegate(*this, FUNC(trackfld_state::atlantol_gfxbank_w))); + space.install_write_handler(0x0800, 0x0800, write8smo_delegate(*this, FUNC(trackfld_state::atlantol_gfxbank_w))); space.nop_write(0x1000, 0x1000); /* unmapped areas read as ROM */ diff --git a/src/mame/drivers/travrusa.cpp b/src/mame/drivers/travrusa.cpp index fff5add9418..4b41aa7feb9 100644 --- a/src/mame/drivers/travrusa.cpp +++ b/src/mame/drivers/travrusa.cpp @@ -598,7 +598,7 @@ void travrusa_state::init_shtridra() rom[A] = bitswap<8>(rom[A],7,5,6,3,4,2,1,0); } -READ8_MEMBER(travrusa_state::shtridrb_port11_r) +uint8_t travrusa_state::shtridrb_port11_r() { printf("shtridrb_port11_r %04x\n", m_maincpu->pc()); // reads, masks with 0xa8, checks for 0x88, resets game if not happy with value? @@ -608,7 +608,7 @@ READ8_MEMBER(travrusa_state::shtridrb_port11_r) void travrusa_state::init_shtridrb() { - m_maincpu->space(AS_IO).install_read_handler(0x11, 0x11, 0, 0xff00, 0, read8_delegate(*this, FUNC(travrusa_state::shtridrb_port11_r))); + m_maincpu->space(AS_IO).install_read_handler(0x11, 0x11, 0, 0xff00, 0, read8smo_delegate(*this, FUNC(travrusa_state::shtridrb_port11_r))); } diff --git a/src/mame/drivers/triplhnt.cpp b/src/mame/drivers/triplhnt.cpp index 2c89a9eddc1..e3762400373 100644 --- a/src/mame/drivers/triplhnt.cpp +++ b/src/mame/drivers/triplhnt.cpp @@ -54,7 +54,7 @@ WRITE_LINE_MEMBER(triplhnt_state::tape_control_w) } -READ8_MEMBER(triplhnt_state::cmos_r) +uint8_t triplhnt_state::cmos_r(offs_t offset) { m_cmos_latch = offset; @@ -62,21 +62,21 @@ READ8_MEMBER(triplhnt_state::cmos_r) } -READ8_MEMBER(triplhnt_state::input_port_4_r) +uint8_t triplhnt_state::input_port_4_r() { m_watchdog->watchdog_reset(); return ioport("0C0B")->read(); } -READ8_MEMBER(triplhnt_state::misc_r) +uint8_t triplhnt_state::misc_r(offs_t offset) { m_latch->write_a0(offset); return ioport("VBLANK")->read() | m_hit_code; } -READ8_MEMBER(triplhnt_state::da_latch_r) +uint8_t triplhnt_state::da_latch_r(offs_t offset) { int cross_x = ioport("STICKX")->read(); int cross_y = ioport("STICKY")->read(); diff --git a/src/mame/drivers/trs80m2.cpp b/src/mame/drivers/trs80m2.cpp index abb82e29851..2a249824e59 100644 --- a/src/mame/drivers/trs80m2.cpp +++ b/src/mame/drivers/trs80m2.cpp @@ -98,7 +98,7 @@ void trs80m2_state::write(offs_t offset, uint8_t data) } } -WRITE8_MEMBER( trs80m2_state::rom_enable_w ) +void trs80m2_state::rom_enable_w(uint8_t data) { /* @@ -118,7 +118,7 @@ WRITE8_MEMBER( trs80m2_state::rom_enable_w ) m_boot_rom = BIT(data, 0); } -WRITE8_MEMBER( trs80m2_state::drvslt_w ) +void trs80m2_state::drvslt_w(uint8_t data) { /* @@ -155,7 +155,7 @@ WRITE8_MEMBER( trs80m2_state::drvslt_w ) m_fdc->dden_w(!BIT(data, 7)); } -READ8_MEMBER( trs80m2_state::keyboard_r ) +uint8_t trs80m2_state::keyboard_r() { // clear keyboard interrupt if (!m_kbirq) @@ -170,7 +170,7 @@ READ8_MEMBER( trs80m2_state::keyboard_r ) return m_key_data; } -READ8_MEMBER( trs80m2_state::rtc_r ) +uint8_t trs80m2_state::rtc_r() { // clear RTC interrupt m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); @@ -178,7 +178,7 @@ READ8_MEMBER( trs80m2_state::rtc_r ) return 0; } -READ8_MEMBER( trs80m2_state::nmi_r ) +uint8_t trs80m2_state::nmi_r() { /* @@ -212,7 +212,7 @@ READ8_MEMBER( trs80m2_state::nmi_r ) return data; } -WRITE8_MEMBER( trs80m2_state::nmi_w ) +void trs80m2_state::nmi_w(uint8_t data) { /* @@ -252,17 +252,17 @@ WRITE8_MEMBER( trs80m2_state::nmi_w ) m_msel = BIT(data, 7); } -READ8_MEMBER( trs80m2_state::fdc_r ) +uint8_t trs80m2_state::fdc_r(offs_t offset) { return m_fdc->read(offset) ^ 0xff; } -WRITE8_MEMBER( trs80m2_state::fdc_w ) +void trs80m2_state::fdc_w(offs_t offset, uint8_t data) { m_fdc->write(offset, data ^ 0xff); } -WRITE8_MEMBER( trs80m16_state::tcl_w ) +void trs80m16_state::tcl_w(uint8_t data) { /* @@ -289,7 +289,7 @@ WRITE8_MEMBER( trs80m16_state::tcl_w ) m_ual = (m_ual & 0x1fe) | BIT(data, 7); } -WRITE8_MEMBER( trs80m16_state::ual_w ) +void trs80m16_state::ual_w(uint8_t data) { /* diff --git a/src/mame/drivers/trucocl.cpp b/src/mame/drivers/trucocl.cpp index b41f03821a4..84d31497c62 100644 --- a/src/mame/drivers/trucocl.cpp +++ b/src/mame/drivers/trucocl.cpp @@ -45,7 +45,7 @@ Daughterboard: Custom made, plugged in the 2 roms and Z80 mainboard sockets. // TODO: doesn't seem suited to neither irq nor nmi -WRITE8_MEMBER(trucocl_state::irq_enable_w) +void trucocl_state::irq_enable_w(uint8_t data) { m_irq_mask = (data & 1) ^ 1; } @@ -64,7 +64,7 @@ void trucocl_state::device_timer(emu_timer &timer, device_timer_id id, int param } -WRITE8_MEMBER(trucocl_state::audio_dac_w) +void trucocl_state::audio_dac_w(uint8_t data) { uint8_t *rom = memregion("maincpu")->base(); int dac_address = ( data & 0xf0 ) << 8; diff --git a/src/mame/drivers/tryout.cpp b/src/mame/drivers/tryout.cpp index 99b6ba0e83d..25167d031ac 100644 --- a/src/mame/drivers/tryout.cpp +++ b/src/mame/drivers/tryout.cpp @@ -28,12 +28,12 @@ $208 strikes count #include "speaker.h" -WRITE8_MEMBER(tryout_state::nmi_ack_w) +void tryout_state::nmi_ack_w(uint8_t data) { m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE ); } -WRITE8_MEMBER(tryout_state::sound_w) +void tryout_state::sound_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->set_input_line(0, HOLD_LINE); @@ -41,7 +41,7 @@ WRITE8_MEMBER(tryout_state::sound_w) /*this is actually irq/nmi mask, polls only four values at start up (81->01->81->01) and then stays on this state.*/ -WRITE8_MEMBER(tryout_state::sound_irq_ack_w) +void tryout_state::sound_irq_ack_w(uint8_t data) { // m_audiocpu->set_input_line(0, CLEAR_LINE); } @@ -51,7 +51,7 @@ void tryout_state::machine_start() membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x2000); } -WRITE8_MEMBER(tryout_state::bankswitch_w) +void tryout_state::bankswitch_w(uint8_t data) { membank("bank1")->set_entry(data & 0x01); } diff --git a/src/mame/drivers/tsamurai.cpp b/src/mame/drivers/tsamurai.cpp index 2e1438a8a70..b2e29a74abe 100644 --- a/src/mame/drivers/tsamurai.cpp +++ b/src/mame/drivers/tsamurai.cpp @@ -85,44 +85,44 @@ WRITE_LINE_MEMBER(tsamurai_state::vblank_irq) m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } -READ8_MEMBER(tsamurai_state::tsamurai_unknown_d803_r) +uint8_t tsamurai_state::tsamurai_unknown_d803_r() { return 0x6b; } -READ8_MEMBER(tsamurai_state::m660_unknown_d803_r) +uint8_t tsamurai_state::m660_unknown_d803_r() { return 0x53; // this is what the bootleg patches in. } -READ8_MEMBER(tsamurai_state::unknown_d806_r) +uint8_t tsamurai_state::unknown_d806_r() { return 0x40; } -READ8_MEMBER(tsamurai_state::unknown_d900_r) +uint8_t tsamurai_state::unknown_d900_r() { return 0x6a; } -READ8_MEMBER(tsamurai_state::unknown_d938_r) +uint8_t tsamurai_state::unknown_d938_r() { return 0xfb; } -WRITE8_MEMBER(tsamurai_state::sound_command1_w) +void tsamurai_state::sound_command1_w(uint8_t data) { m_sound_command1 = data; m_audiocpu->set_input_line(0, HOLD_LINE ); } -WRITE8_MEMBER(tsamurai_state::sound_command2_w) +void tsamurai_state::sound_command2_w(uint8_t data) { m_sound_command2 = data; m_audio2->set_input_line(0, HOLD_LINE ); } -WRITE8_MEMBER(tsamurai_state::m660_sound_command3_w) +void tsamurai_state::m660_sound_command3_w(uint8_t data) { m_sound_command3 = data; m_audio3->set_input_line(0, HOLD_LINE ); @@ -227,17 +227,17 @@ void tsamurai_state::vsgongf_audio_io_map(address_map &map) map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::address_data_w)); } -READ8_MEMBER(tsamurai_state::sound_command1_r) +uint8_t tsamurai_state::sound_command1_r() { return m_sound_command1; } -READ8_MEMBER(tsamurai_state::sound_command2_r) +uint8_t tsamurai_state::sound_command2_r() { return m_sound_command2; } -READ8_MEMBER(tsamurai_state::m660_sound_command3_r) +uint8_t tsamurai_state::m660_sound_command3_r() { return m_sound_command3; } @@ -304,7 +304,7 @@ void tsamurai_state::sound3_m660_io_map(address_map &map) /*******************************************************************************/ -WRITE8_MEMBER(tsamurai_state::vsgongf_sound_nmi_enable_w) +void tsamurai_state::vsgongf_sound_nmi_enable_w(uint8_t data) { m_vsgongf_sound_nmi_enabled = data; } @@ -317,7 +317,7 @@ INTERRUPT_GEN_MEMBER(tsamurai_state::vsgongf_sound_interrupt) /* what are these, protection of some kind? */ -READ8_MEMBER(tsamurai_state::vsgongf_a006_r) +uint8_t tsamurai_state::vsgongf_a006_r() { /* sound CPU busy? */ if (!strcmp(machine().system().name,"vsgongf")) return 0x80; @@ -328,7 +328,7 @@ READ8_MEMBER(tsamurai_state::vsgongf_a006_r) return 0x00; } -READ8_MEMBER(tsamurai_state::vsgongf_a100_r) +uint8_t tsamurai_state::vsgongf_a100_r() { /* protection? */ if (!strcmp(machine().system().name,"vsgongf")) return 0xaa; @@ -339,7 +339,7 @@ READ8_MEMBER(tsamurai_state::vsgongf_a100_r) return 0x00; } -WRITE8_MEMBER(tsamurai_state::vsgongf_sound_command_w) +void tsamurai_state::vsgongf_sound_command_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); @@ -1395,7 +1395,7 @@ ROM_END void tsamurai_state::init_the26thz() { m_maincpu->space(AS_PROGRAM).unmap_read(0xd803, 0xd803); - m_maincpu->space(AS_PROGRAM).install_read_handler(0xd803, 0xd803, read8_delegate(*this, FUNC(tsamurai_state::tsamurai_unknown_d803_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xd803, 0xd803, read8smo_delegate(*this, FUNC(tsamurai_state::tsamurai_unknown_d803_r))); } GAME( 1984, vsgongf, 0, vsgongf, vsgongf, tsamurai_state, empty_init, ROT90, "Kaneko", "VS Gong Fight", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE | MACHINE_UNEMULATED_PROTECTION ) diff --git a/src/mame/drivers/tsispch.cpp b/src/mame/drivers/tsispch.cpp index 02384fd3bfe..3266dc4b0e2 100644 --- a/src/mame/drivers/tsispch.cpp +++ b/src/mame/drivers/tsispch.cpp @@ -152,7 +152,7 @@ WRITE_LINE_MEMBER(tsispch_state::i8251_txrdy_int) /***************************************************************************** LED/dipswitch stuff *****************************************************************************/ -READ8_MEMBER( tsispch_state::dsw_r ) +uint8_t tsispch_state::dsw_r() { /* the only dipswitch I'm really sure about is s4-7 which enables the test mode * The switches are, for normal operation on my unit (and the older unit as well): @@ -164,7 +164,7 @@ READ8_MEMBER( tsispch_state::dsw_r ) return ioport("s4")->read(); } -WRITE8_MEMBER( tsispch_state::peripheral_w ) +void tsispch_state::peripheral_w(uint8_t data) { /* This controls the four LEDS, the RESET line for the upd77p20, and (probably) the p0-to-ir0 masking of the upd77p20; there are two @@ -183,7 +183,7 @@ WRITE8_MEMBER( tsispch_state::peripheral_w ) /***************************************************************************** UPD77P20 stuff *****************************************************************************/ -READ16_MEMBER( tsispch_state::dsp_data_r ) +uint16_t tsispch_state::dsp_data_r() { #ifdef DEBUG_DSP uint8_t temp = m_dsp->snesdsp_read(true); @@ -194,7 +194,7 @@ READ16_MEMBER( tsispch_state::dsp_data_r ) #endif } -WRITE16_MEMBER( tsispch_state::dsp_data_w ) +void tsispch_state::dsp_data_w(uint16_t data) { #ifdef DEBUG_DSP_W fprintf(stderr, "dsp data write: %02x\n", data); @@ -202,7 +202,7 @@ WRITE16_MEMBER( tsispch_state::dsp_data_w ) m_dsp->snesdsp_write(true, data); } -READ16_MEMBER( tsispch_state::dsp_status_r ) +uint16_t tsispch_state::dsp_status_r() { #ifdef DEBUG_DSP uint8_t temp = m_dsp->snesdsp_read(false); @@ -213,7 +213,7 @@ READ16_MEMBER( tsispch_state::dsp_status_r ) #endif } -WRITE16_MEMBER( tsispch_state::dsp_status_w ) +void tsispch_state::dsp_status_w(uint16_t data) { fprintf(stderr, "warning: upd772x status register should never be written to!\n"); m_dsp->snesdsp_write(false, data); diff --git a/src/mame/drivers/tubep.cpp b/src/mame/drivers/tubep.cpp index 59378d006d5..75c2fd7d8cb 100644 --- a/src/mame/drivers/tubep.cpp +++ b/src/mame/drivers/tubep.cpp @@ -146,7 +146,7 @@ void tubep_state::tubep_main_map(address_map &map) } -WRITE8_MEMBER(tubep_state::main_cpu_irq_line_clear_w) +void tubep_state::main_cpu_irq_line_clear_w(uint8_t data) { m_maincpu->set_input_line(0, CLEAR_LINE); LOGIRQ("CPU#0 VBLANK int clear at scanline=%3i\n", m_curr_scanline); @@ -178,7 +178,7 @@ void tubep_state::tubep_main_portmap(address_map &map) * *************************************/ -WRITE8_MEMBER(tubep_state::second_cpu_irq_line_clear_w) +void tubep_state::second_cpu_irq_line_clear_w(uint8_t data) { m_slave->set_input_line(0, CLEAR_LINE); LOGIRQ("CPU#1 VBLANK int clear at scanline=%3i\n", m_curr_scanline); @@ -206,12 +206,12 @@ void tubep_state::tubep_second_portmap(address_map &map) } -READ8_MEMBER(tubep_state::tubep_soundlatch_r) +uint8_t tubep_state::tubep_soundlatch_r() { return (m_soundlatch->pending_r() << 7) | (m_soundlatch->read() & 0x7f); } -READ8_MEMBER(tubep_state::tubep_sound_irq_ack) +uint8_t tubep_state::tubep_sound_irq_ack() { m_soundcpu->set_input_line(0, CLEAR_LINE); return 0; @@ -499,7 +499,7 @@ MACHINE_RESET_MEMBER(tubep_state,rjammer) * *************************************/ -WRITE8_MEMBER(tubep_state::rjammer_voice_startstop_w) +void tubep_state::rjammer_voice_startstop_w(uint8_t data) { /* bit 0 of data selects voice start/stop (reset pin on MSM5205)*/ // 0 -stop; 1-start @@ -509,7 +509,7 @@ WRITE8_MEMBER(tubep_state::rjammer_voice_startstop_w) } -WRITE8_MEMBER(tubep_state::rjammer_voice_frequency_select_w) +void tubep_state::rjammer_voice_frequency_select_w(uint8_t data) { /* bit 0 of data selects voice frequency on MSM5205 */ // 0 -4 KHz; 1- 8KHz @@ -537,7 +537,7 @@ WRITE_LINE_MEMBER(tubep_state::rjammer_adpcm_vck) } -WRITE8_MEMBER(tubep_state::rjammer_voice_input_w) +void tubep_state::rjammer_voice_input_w(uint8_t data) { /* 8 bits of adpcm data for MSM5205 */ /* need to buffer the data, and switch two nibbles on two following interrupts*/ @@ -554,7 +554,7 @@ WRITE8_MEMBER(tubep_state::rjammer_voice_input_w) } -WRITE8_MEMBER(tubep_state::rjammer_voice_intensity_control_w) +void tubep_state::rjammer_voice_intensity_control_w(uint8_t data) { /* 4 LSB bits select the intensity (analog circuit that alters the output from MSM5205) */ /* need to buffer the data */ diff --git a/src/mame/drivers/tumbleb.cpp b/src/mame/drivers/tumbleb.cpp index 04bc2354cd6..e1046c28b64 100644 --- a/src/mame/drivers/tumbleb.cpp +++ b/src/mame/drivers/tumbleb.cpp @@ -319,7 +319,7 @@ Stephh's notes (based on the games M68000 code and some tests) : /******************************************************************************/ -WRITE16_MEMBER(tumbleb_state::tumblepb_oki_w) +void tumbleb_state::tumblepb_oki_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (mem_mask == 0xffff) { @@ -334,14 +334,14 @@ WRITE16_MEMBER(tumbleb_state::tumblepb_oki_w) /* STUFF IN OTHER BYTE TOO..*/ } -READ16_MEMBER(tumbleb_state::tumblepb_prot_r) +uint16_t tumbleb_state::tumblepb_prot_r() { return ~0; } /******************************************************************************/ -READ16_MEMBER(tumbleb_state::tumblepopb_controls_r) +uint16_t tumbleb_state::tumblepopb_controls_r(offs_t offset) { switch (offset << 1) { @@ -607,7 +607,7 @@ void tumbleb_state::process_tumbleb2_music_command( okim6295_device *oki, int da } -WRITE16_MEMBER(tumbleb_state::tumbleb2_soundmcu_w) +void tumbleb_state::tumbleb2_soundmcu_w(uint16_t data) { int sound = tumbleb_sound_lookup[data & 0xff]; @@ -730,7 +730,7 @@ void tumbleb_state::magipur_main_map(address_map &map) } -READ16_MEMBER(tumbleb_state::semibase_unknown_r) +uint16_t tumbleb_state::semibase_unknown_r() { return machine().rand(); } @@ -756,7 +756,7 @@ void tumbleb_state::htchctch_main_map(address_map &map) -WRITE16_MEMBER(tumbleb_state::jumpkids_sound_w) +void tumbleb_state::jumpkids_sound_w(uint16_t data) { m_soundlatch->write(data & 0xff); m_audiocpu->set_input_line(0, HOLD_LINE); @@ -838,7 +838,7 @@ void tumbleb_pic_state::driver_start() /******************************************************************************/ -WRITE16_MEMBER(tumbleb_state::semicom_soundcmd_w) +void tumbleb_state::semicom_soundcmd_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -3703,7 +3703,7 @@ void tumbleb_state::init_tumbleb2() #if TUMBLEP_HACK tumblepb_patch_code(0x000132); #endif - m_maincpu->space(AS_PROGRAM).install_write_handler(0x100000, 0x100001, write16_delegate(*this, FUNC(tumbleb_state::tumbleb2_soundmcu_w))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x100000, 0x100001, write16smo_delegate(*this, FUNC(tumbleb_state::tumbleb2_soundmcu_w))); } @@ -3737,7 +3737,7 @@ void tumbleb_state::init_magipur() } -READ16_MEMBER(tumbleb_state::bcstory_1a0_read) +uint16_t tumbleb_state::bcstory_1a0_read() { //osd_printf_debug("bcstory_io %06x\n",m_maincpu->pc()); @@ -3748,7 +3748,7 @@ READ16_MEMBER(tumbleb_state::bcstory_1a0_read) void tumbleb_state::init_bcstory() { tumblepb_gfx_rearrange(1); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x180008, 0x180009, read16_delegate(*this, FUNC(tumbleb_state::bcstory_1a0_read))); // io should be here?? + m_maincpu->space(AS_PROGRAM).install_read_handler(0x180008, 0x180009, read16smo_delegate(*this, FUNC(tumbleb_state::bcstory_1a0_read))); // io should be here?? } @@ -3816,7 +3816,7 @@ void tumbleb_state::init_chokchok() m_maincpu->space(AS_PROGRAM).install_write_handler(0x140000, 0x140fff, write16s_delegate(*m_palette, FUNC(palette_device::write16))); // slightly different banking - m_maincpu->space(AS_PROGRAM).install_write_handler(0x100002, 0x100003, write16_delegate(*this, FUNC(tumbleb_state::chokchok_tilebank_w))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x100002, 0x100003, write16s_delegate(*this, FUNC(tumbleb_state::chokchok_tilebank_w))); } void tumbleb_state::init_carket() @@ -3824,7 +3824,7 @@ void tumbleb_state::init_carket() init_htchctch(); // slightly different banking - m_maincpu->space(AS_PROGRAM).install_write_handler(0x100002, 0x100003, write16_delegate(*this, FUNC(tumbleb_state::chokchok_tilebank_w))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x100002, 0x100003, write16s_delegate(*this, FUNC(tumbleb_state::chokchok_tilebank_w))); } void tumbleb_state::init_wlstar() @@ -3832,7 +3832,7 @@ void tumbleb_state::init_wlstar() tumblepb_gfx_rearrange(1); // slightly different banking - m_maincpu->space(AS_PROGRAM).install_write_handler(0x100002, 0x100003, write16_delegate(*this, FUNC(tumbleb_state::wlstar_tilebank_w))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x100002, 0x100003, write16smo_delegate(*this, FUNC(tumbleb_state::wlstar_tilebank_w))); m_protbase = 0x0000; } diff --git a/src/mame/drivers/turbo.cpp b/src/mame/drivers/turbo.cpp index abb5de31b6b..6a9c9d31694 100644 --- a/src/mame/drivers/turbo.cpp +++ b/src/mame/drivers/turbo.cpp @@ -473,20 +473,20 @@ TIMER_CALLBACK_MEMBER(turbo_state::delayed_i8255_w) } -WRITE8_MEMBER(turbo_state::buckrog_i8255_0_w) +void turbo_state::buckrog_i8255_0_w(offs_t offset, uint8_t data) { /* the port C handshaking signals control the sub CPU IRQ, */ /* so we have to sync whenever we access this PPI */ machine().scheduler().synchronize(timer_expired_delegate(FUNC(turbo_state::delayed_i8255_w),this), ((offset & 3) << 8) | (data & 0xff)); } -READ8_MEMBER(turbo_state::spriteram_r) +uint8_t turbo_state::spriteram_r(offs_t offset) { offset = (offset & 0x07) | ((offset & 0xf0) >> 1); return m_alt_spriteram[offset]; } -WRITE8_MEMBER(turbo_state::spriteram_w) +void turbo_state::spriteram_w(offs_t offset, uint8_t data) { offset = (offset & 0x07) | ((offset & 0xf0) >> 1); m_alt_spriteram[offset] = data; diff --git a/src/mame/drivers/turrett.cpp b/src/mame/drivers/turrett.cpp index 087e946aacb..3e299e6ecd1 100644 --- a/src/mame/drivers/turrett.cpp +++ b/src/mame/drivers/turrett.cpp @@ -169,13 +169,13 @@ READ_LINE_MEMBER( turrett_state::sbrc3_r ) } -READ32_MEMBER( turrett_state::int_r ) +uint32_t turrett_state::int_r() { return update_inputs() << 24; } -WRITE32_MEMBER( turrett_state::int_w ) +void turrett_state::int_w(uint32_t data) { // TODO logerror("Output write: %08x\n", data); diff --git a/src/mame/drivers/tutankhm.cpp b/src/mame/drivers/tutankhm.cpp index cfde6c90b61..5485d85a965 100644 --- a/src/mame/drivers/tutankhm.cpp +++ b/src/mame/drivers/tutankhm.cpp @@ -127,7 +127,7 @@ WRITE_LINE_MEMBER(tutankhm_state::irq_enable_w) * *************************************/ -WRITE8_MEMBER(tutankhm_state::tutankhm_bankselect_w) +void tutankhm_state::tutankhm_bankselect_w(uint8_t data) { membank("bank1")->set_entry(data & 0x0f); } @@ -151,7 +151,7 @@ WRITE_LINE_MEMBER(tutankhm_state::coin_counter_2_w) } -WRITE8_MEMBER(tutankhm_state::sound_on_w) +void tutankhm_state::sound_on_w(uint8_t data) { m_timeplt_audio->sh_irqtrigger_w(0); m_timeplt_audio->sh_irqtrigger_w(1); diff --git a/src/mame/drivers/twin16.cpp b/src/mame/drivers/twin16.cpp index 9ac145cb775..5644a0883b9 100644 --- a/src/mame/drivers/twin16.cpp +++ b/src/mame/drivers/twin16.cpp @@ -69,7 +69,7 @@ int twin16_state::spriteram_process_enable() /* Read/Write Handlers */ -WRITE16_MEMBER(twin16_state::CPUA_register_w) +void twin16_state::CPUA_register_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* 7 6 5 4 3 2 1 0 @@ -102,7 +102,7 @@ WRITE16_MEMBER(twin16_state::CPUA_register_w) } } -WRITE16_MEMBER(twin16_state::CPUB_register_w) +void twin16_state::CPUB_register_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* 7 6 5 4 3 2 1 0 @@ -123,7 +123,7 @@ WRITE16_MEMBER(twin16_state::CPUB_register_w) } } -WRITE16_MEMBER(fround_state::fround_CPU_register_w) +void fround_state::fround_CPU_register_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* 7 6 5 4 3 2 1 0 @@ -143,17 +143,17 @@ WRITE16_MEMBER(fround_state::fround_CPU_register_w) } } -READ8_MEMBER(twin16_state::upd_busy_r) +uint8_t twin16_state::upd_busy_r() { return m_upd7759->busy_r(); } -WRITE8_MEMBER(twin16_state::upd_reset_w) +void twin16_state::upd_reset_w(uint8_t data) { m_upd7759->reset_w(data & 2); } -WRITE8_MEMBER(twin16_state::upd_start_w) +void twin16_state::upd_start_w(uint8_t data) { m_upd7759->start_w(data & 1); } @@ -1243,7 +1243,7 @@ void fround_state::init_fround() m_is_fround = true; } -WRITE8_MEMBER(cuebrickj_state::nvram_bank_w) +void cuebrickj_state::nvram_bank_w(uint8_t data) { membank("nvrambank")->set_entry(data); } @@ -1255,7 +1255,7 @@ void cuebrickj_state::init_cuebrickj() address_space &space = m_maincpu->space(AS_PROGRAM); space.install_readwrite_bank(0x0b0000, 0x0b03ff, "nvrambank"); - space.install_write_handler( 0x0b0400, 0x0b0401, write8_delegate(*this, FUNC(cuebrickj_state::nvram_bank_w)), 0xff00); + space.install_write_handler( 0x0b0400, 0x0b0401, write8smo_delegate(*this, FUNC(cuebrickj_state::nvram_bank_w)), 0xff00); membank("nvrambank")->configure_entries(0, 0x20, m_nvram, 0x400); diff --git a/src/mame/drivers/tx1.cpp b/src/mame/drivers/tx1.cpp index ff74f761652..4f013057a31 100644 --- a/src/mame/drivers/tx1.cpp +++ b/src/mame/drivers/tx1.cpp @@ -61,12 +61,12 @@ * *************************************/ -WRITE16_MEMBER(tx1_state::resume_math_w) +void tx1_state::resume_math_w(uint16_t data) { m_mathcpu->set_input_line(INPUT_LINE_TEST, ASSERT_LINE); } -WRITE16_MEMBER(tx1_state::halt_math_w) +void tx1_state::halt_math_w(uint16_t data) { m_mathcpu->set_input_line(INPUT_LINE_TEST, CLEAR_LINE); } diff --git a/src/mame/drivers/ultraman.cpp b/src/mame/drivers/ultraman.cpp index 29e35c0df30..4c3aa68f10f 100644 --- a/src/mame/drivers/ultraman.cpp +++ b/src/mame/drivers/ultraman.cpp @@ -23,7 +23,7 @@ #include "speaker.h" -WRITE8_MEMBER(ultraman_state::sound_nmi_enable_w) +void ultraman_state::sound_nmi_enable_w(uint8_t data) { m_soundnmi->in_w<1>(BIT(data, 0)); } diff --git a/src/mame/drivers/ultratnk.cpp b/src/mame/drivers/ultratnk.cpp index d3cf768e5b0..86e7adb4e29 100644 --- a/src/mame/drivers/ultratnk.cpp +++ b/src/mame/drivers/ultratnk.cpp @@ -94,45 +94,45 @@ void ultratnk_state::machine_reset() } -READ8_MEMBER(ultratnk_state::wram_r) +uint8_t ultratnk_state::wram_r(offs_t offset) { return m_videoram[0x380 + offset]; } -READ8_MEMBER(ultratnk_state::analog_r) +uint8_t ultratnk_state::analog_r(offs_t offset) { return (ioport("ANALOG")->read() << (~offset & 7)) & 0x80; } -READ8_MEMBER(ultratnk_state::coin_r) +uint8_t ultratnk_state::coin_r(offs_t offset) { return (ioport("COIN")->read() << (~offset & 7)) & 0x80; } -READ8_MEMBER(ultratnk_state::collision_r) +uint8_t ultratnk_state::collision_r(offs_t offset) { return (ioport("COLLISION")->read() << (~offset & 7)) & 0x80; } -READ8_MEMBER(ultratnk_state::options_r) +uint8_t ultratnk_state::options_r(offs_t offset) { return (ioport("DIP")->read() >> (2 * (offset & 3))) & 3; } -WRITE8_MEMBER(ultratnk_state::wram_w) +void ultratnk_state::wram_w(offs_t offset, uint8_t data) { m_videoram[0x380 + offset] = data; } -WRITE8_MEMBER(ultratnk_state::collision_reset_w) +void ultratnk_state::collision_reset_w(offs_t offset, uint8_t data) { m_collision[(offset >> 1) & 3] = 0; } -WRITE8_MEMBER(ultratnk_state::da_latch_w) +void ultratnk_state::da_latch_w(uint8_t data) { m_da_latch = data & 15; } @@ -144,11 +144,11 @@ WRITE_LINE_MEMBER(ultratnk_state::lockout_w) } -WRITE8_MEMBER(ultratnk_state::attract_w) +void ultratnk_state::attract_w(uint8_t data) { m_discrete->write(ULTRATNK_ATTRACT_EN, data & 1); } -WRITE8_MEMBER(ultratnk_state::explosion_w) +void ultratnk_state::explosion_w(uint8_t data) { m_discrete->write(ULTRATNK_EXPLOSION_DATA, data & 15); } diff --git a/src/mame/drivers/unico.cpp b/src/mame/drivers/unico.cpp index 133a6909ed3..12625029b70 100644 --- a/src/mame/drivers/unico.cpp +++ b/src/mame/drivers/unico.cpp @@ -47,7 +47,7 @@ Year + Game PCB Notes Burglar X ***************************************************************************/ -WRITE8_MEMBER(unico_state::burglarx_okibank_w) +void unico_state::burglarx_okibank_w(uint8_t data) { m_oki->set_rom_bank(data & 1); } @@ -79,7 +79,7 @@ void unico_state::burglarx_map(address_map &map) Zero Point ***************************************************************************/ -WRITE8_MEMBER(zeropnt_state::zeropnt_okibank_leds_w) +void zeropnt_state::zeropnt_okibank_leds_w(uint8_t data) { /* Banked sound samples. The 3rd quarter of the ROM contains garbage. Indeed, only banks 0&1 are used */ @@ -92,7 +92,7 @@ WRITE8_MEMBER(zeropnt_state::zeropnt_okibank_leds_w) } /* Light Gun - need to wiggle the input slightly otherwise fire doesn't work */ -READ16_MEMBER(zeropnt_state::gunx_0_msb_r) +uint16_t zeropnt_state::gunx_0_msb_r() { int x=m_gun_axes[X0]->read(); @@ -103,7 +103,7 @@ READ16_MEMBER(zeropnt_state::gunx_0_msb_r) return ((x&0xff) ^ (m_screen->frame_number()&1))<<8; } -READ16_MEMBER(zeropnt_state::guny_0_msb_r) +uint16_t zeropnt_state::guny_0_msb_r() { int y=m_gun_axes[Y0]->read(); @@ -112,7 +112,7 @@ READ16_MEMBER(zeropnt_state::guny_0_msb_r) return ((y&0xff) ^ (m_screen->frame_number()&1))<<8; } -READ16_MEMBER(zeropnt_state::gunx_1_msb_r) +uint16_t zeropnt_state::gunx_1_msb_r() { int x=m_gun_axes[X1]->read(); @@ -123,7 +123,7 @@ READ16_MEMBER(zeropnt_state::gunx_1_msb_r) return ((x&0xff) ^ (m_screen->frame_number()&1))<<8; } -READ16_MEMBER(zeropnt_state::guny_1_msb_r) +uint16_t zeropnt_state::guny_1_msb_r() { int y=m_gun_axes[Y1]->read(); @@ -167,24 +167,24 @@ void zeropnt_state::zeropnt_oki_map(address_map &map) Zero Point 2 ***************************************************************************/ -READ32_MEMBER(zeropnt2_state::zeropnt2_gunx_0_msb_r) { return (gunx_0_msb_r(space,0,0xffff)-0x0800) << 16; } -READ32_MEMBER(zeropnt2_state::zeropnt2_guny_0_msb_r) { return (guny_0_msb_r(space,0,0xffff)+0x0800) << 16; } -READ32_MEMBER(zeropnt2_state::zeropnt2_gunx_1_msb_r) { return (gunx_1_msb_r(space,0,0xffff)-0x0800) << 16; } -READ32_MEMBER(zeropnt2_state::zeropnt2_guny_1_msb_r) { return (guny_1_msb_r(space,0,0xffff)+0x0800) << 16; } +uint32_t zeropnt2_state::zeropnt2_gunx_0_msb_r() { return (gunx_0_msb_r()-0x0800) << 16; } +uint32_t zeropnt2_state::zeropnt2_guny_0_msb_r() { return (guny_0_msb_r()+0x0800) << 16; } +uint32_t zeropnt2_state::zeropnt2_gunx_1_msb_r() { return (gunx_1_msb_r()-0x0800) << 16; } +uint32_t zeropnt2_state::zeropnt2_guny_1_msb_r() { return (guny_1_msb_r()+0x0800) << 16; } -WRITE8_MEMBER(zeropnt2_state::zeropnt2_okibank) +void zeropnt2_state::zeropnt2_okibank(uint8_t data) { m_okibank->set_entry((data & 3) % 4); } -WRITE8_MEMBER(zeropnt2_state::leds_w) +void zeropnt2_state::leds_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0,data & 0x01); m_leds[0] = BIT(data, 7); // Start 1 m_leds[1] = BIT(data, 6); // Start 2 } -WRITE32_MEMBER(zeropnt2_state::eeprom_w) +void zeropnt2_state::eeprom_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if (data & ~0xfe00000) logerror("%s - Unknown EEPROM bit written %04X\n",machine().describe_context(),data); diff --git a/src/mame/drivers/usgames.cpp b/src/mame/drivers/usgames.cpp index e2e25062703..8a7296a5f18 100644 --- a/src/mame/drivers/usgames.cpp +++ b/src/mame/drivers/usgames.cpp @@ -43,12 +43,12 @@ void usgames_state::machine_start() membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000); } -WRITE8_MEMBER(usgames_state::rombank_w) +void usgames_state::rombank_w(uint8_t data) { membank("bank1")->set_entry(data); } -WRITE8_MEMBER(usgames_state::lamps1_w) +void usgames_state::lamps1_w(uint8_t data) { /* button lamps */ for (int i = 0; i < 4; i++) @@ -57,7 +57,7 @@ WRITE8_MEMBER(usgames_state::lamps1_w) /* bit 5 toggles all the time - extra lamp? */ } -WRITE8_MEMBER(usgames_state::lamps2_w) +void usgames_state::lamps2_w(uint8_t data) { /* bit 5 toggles all the time - extra lamp? */ } diff --git a/src/mame/drivers/v1050.cpp b/src/mame/drivers/v1050.cpp index a5676b5beaa..7467a589257 100644 --- a/src/mame/drivers/v1050.cpp +++ b/src/mame/drivers/v1050.cpp @@ -326,7 +326,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(v1050_state::v1050_keyboard_tick) scan_keyboard(); } -READ8_MEMBER( v1050_state::kb_data_r ) +uint8_t v1050_state::kb_data_r() { m_keyavail = 0; @@ -335,7 +335,7 @@ READ8_MEMBER( v1050_state::kb_data_r ) return m_keydata; } -READ8_MEMBER( v1050_state::kb_status_r ) +uint8_t v1050_state::kb_status_r() { uint8_t val = m_uart_kb->status_r(); @@ -344,37 +344,37 @@ READ8_MEMBER( v1050_state::kb_status_r ) // Z80 Read/Write Handlers -WRITE8_MEMBER( v1050_state::v1050_i8214_w ) +void v1050_state::v1050_i8214_w(uint8_t data) { m_pic->b_w((data >> 1) & 0x07); m_pic->sgs_w(BIT(data, 4)); } -READ8_MEMBER( v1050_state::vint_clr_r ) +uint8_t v1050_state::vint_clr_r() { set_interrupt(INT_VSYNC, 0); return 0xff; } -WRITE8_MEMBER( v1050_state::vint_clr_w ) +void v1050_state::vint_clr_w(uint8_t data) { set_interrupt(INT_VSYNC, 0); } -READ8_MEMBER( v1050_state::dint_clr_r ) +uint8_t v1050_state::dint_clr_r() { set_interrupt(INT_DISPLAY, 0); return 0xff; } -WRITE8_MEMBER( v1050_state::dint_clr_w ) +void v1050_state::dint_clr_w(uint8_t data) { set_interrupt(INT_DISPLAY, 0); } -WRITE8_MEMBER( v1050_state::bank_w ) +void v1050_state::bank_w(uint8_t data) { m_bank = data; @@ -383,17 +383,17 @@ WRITE8_MEMBER( v1050_state::bank_w ) // SY6502A Read/Write Handlers -WRITE8_MEMBER( v1050_state::dint_w ) +void v1050_state::dint_w(uint8_t data) { set_interrupt(INT_DISPLAY, 1); } -WRITE8_MEMBER( v1050_state::dvint_clr_w ) +void v1050_state::dvint_clr_w(uint8_t data) { m_subcpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); } -WRITE8_MEMBER( v1050_state::sasi_data_w ) +void v1050_state::sasi_data_w(uint8_t data) { m_sasi_data = data; @@ -429,7 +429,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(v1050_state::sasi_rst_tick) m_sasibus->write_rst(0); } -WRITE8_MEMBER( v1050_state::sasi_ctrl_w ) +void v1050_state::sasi_ctrl_w(uint8_t data) { /* diff --git a/src/mame/drivers/vaportra.cpp b/src/mame/drivers/vaportra.cpp index 80881936c23..de8ed58c73b 100644 --- a/src/mame/drivers/vaportra.cpp +++ b/src/mame/drivers/vaportra.cpp @@ -29,14 +29,14 @@ /******************************************************************************/ -READ8_MEMBER(vaportra_state::irq6_ack_r) +uint8_t vaportra_state::irq6_ack_r() { m_maincpu->set_input_line(M68K_IRQ_6, CLEAR_LINE); return (0); } -WRITE8_MEMBER(vaportra_state::irq6_ack_w) +void vaportra_state::irq6_ack_w(uint8_t data) { m_maincpu->set_input_line(M68K_IRQ_6, CLEAR_LINE); } diff --git a/src/mame/drivers/vball.cpp b/src/mame/drivers/vball.cpp index d625035ecd2..defe6397da1 100644 --- a/src/mame/drivers/vball.cpp +++ b/src/mame/drivers/vball.cpp @@ -139,7 +139,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(vball_state::vball_scanline) } } -WRITE8_MEMBER(vball_state::irq_ack_w) +void vball_state::irq_ack_w(offs_t offset, uint8_t data) { if (offset == 0) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); @@ -158,7 +158,7 @@ WRITE8_MEMBER(vball_state::irq_ack_w) bit 6 = scroll y hi bit 7 = ? */ -WRITE8_MEMBER(vball_state::bankswitch_w) +void vball_state::bankswitch_w(uint8_t data) { membank("mainbank")->set_entry(data & 1); @@ -180,7 +180,7 @@ WRITE8_MEMBER(vball_state::bankswitch_w) bit 6 = sp prom bank bit 7 = sp prom bank */ -WRITE8_MEMBER(vball_state::scrollx_hi_w) +void vball_state::scrollx_hi_w(uint8_t data) { flip_screen_set(~data&1); m_scrollx_hi = (data & 0x02) << 7; @@ -189,7 +189,7 @@ WRITE8_MEMBER(vball_state::scrollx_hi_w) //logerror("%04x: scrollx_hi = %d\n", m_maincpu->pcbase(), m_scrollx_hi); } -WRITE8_MEMBER(vball_state::scrollx_lo_w) +void vball_state::scrollx_lo_w(uint8_t data) { m_scrollx_lo = data; //logerror("%04x: scrollx_lo =%d\n", m_maincpu->pcbase(), m_scrollx_lo); diff --git a/src/mame/drivers/vc4000.cpp b/src/mame/drivers/vc4000.cpp index 82b7eda570b..b3c8427ed8d 100644 --- a/src/mame/drivers/vc4000.cpp +++ b/src/mame/drivers/vc4000.cpp @@ -137,7 +137,7 @@ Q-0900^76203F0161063005080E492DCD4890597877103F020E75105A0A0C1E89F4101879 #include "speaker.h" -READ8_MEMBER( vc4000_state::vc4000_key_r ) +uint8_t vc4000_state::vc4000_key_r(offs_t offset) { uint8_t data=0; switch(offset & 0x0f) @@ -167,19 +167,19 @@ READ8_MEMBER( vc4000_state::vc4000_key_r ) return data; } -WRITE8_MEMBER( vc4000_state::vc4000_sound_ctl ) +void vc4000_state::vc4000_sound_ctl(offs_t offset, uint8_t data) { logerror("Write to sound control register offset= %d value= %d\n", offset, data); } // Write cassette - Address 0x1DFF -WRITE8_MEMBER( vc4000_state::elektor_cass_w ) +void vc4000_state::elektor_cass_w(uint8_t data) { m_cassette->output(BIT(data, 7) ? -1.0 : +1.0); } // Read cassette - Address 0x1DBF -READ8_MEMBER( vc4000_state::elektor_cass_r ) +uint8_t vc4000_state::elektor_cass_r() { return (m_cassette->input() > 0.03) ? 0xff : 0x7f; } @@ -502,7 +502,7 @@ QUICKLOAD_LOAD_MEMBER(vc4000_state::quickload_cb) read_ = quick_length; if (quick_length > 0x1FC0) for (i = 0x1F50; i < read_; i++) - vc4000_video_w(space, i-0x1f00, quick_data[i]); + vc4000_video_w(i-0x1f00, quick_data[i]); /* display a message about the loaded quickload */ image.message(" Quickload: size=%04X : exec=%04X",quick_length,exec_addr); diff --git a/src/mame/drivers/vendetta.cpp b/src/mame/drivers/vendetta.cpp index 54a6d2cb308..2b53766ad76 100644 --- a/src/mame/drivers/vendetta.cpp +++ b/src/mame/drivers/vendetta.cpp @@ -105,7 +105,7 @@ ***************************************************************************/ -WRITE8_MEMBER(vendetta_state::eeprom_w) +void vendetta_state::eeprom_w(uint8_t data) { /* bit 0 - VOC0 - Video banking related */ /* bit 1 - VOC1 - Video banking related */ @@ -131,12 +131,12 @@ WRITE8_MEMBER(vendetta_state::eeprom_w) /********************************************/ -READ8_MEMBER(vendetta_state::K052109_r) +uint8_t vendetta_state::K052109_r(offs_t offset) { return m_k052109->read(offset + 0x2000); } -WRITE8_MEMBER(vendetta_state::K052109_w) +void vendetta_state::K052109_w(offs_t offset, uint8_t data) { // ************************************************************************************* // * Escape Kids uses 052109's mirrored Tilemap ROM bank selector, but only during * @@ -148,7 +148,7 @@ WRITE8_MEMBER(vendetta_state::K052109_w) } -WRITE8_MEMBER(vendetta_state::_5fe0_w) +void vendetta_state::_5fe0_w(uint8_t data) { /* bit 0,1 coin counters */ machine().bookkeeping().coin_counter_w(0, data & 0x01); @@ -177,19 +177,19 @@ void vendetta_state::device_timer(emu_timer &timer, device_timer_id id, int para } } -WRITE8_MEMBER(vendetta_state::z80_arm_nmi_w) +void vendetta_state::z80_arm_nmi_w(uint8_t data) { m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); timer_set(attotime::from_usec(25), TIMER_Z80_NMI); } -WRITE8_MEMBER(vendetta_state::z80_irq_w) +void vendetta_state::z80_irq_w(uint8_t data) { m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80 } -READ8_MEMBER(vendetta_state::z80_irq_r) +uint8_t vendetta_state::z80_irq_r() { m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80 return 0x00; diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp index f66dfe8c582..67d786dc0b6 100644 --- a/src/mame/drivers/vicdual.cpp +++ b/src/mame/drivers/vicdual.cpp @@ -226,7 +226,7 @@ int vicdual_state::is_cabinet_color() *************************************/ -WRITE8_MEMBER(vicdual_state::videoram_w) +void vicdual_state::videoram_w(offs_t offset, uint8_t data) { // m_screen->update_now(); m_screen->update_partial(m_screen->vpos()); @@ -234,7 +234,7 @@ WRITE8_MEMBER(vicdual_state::videoram_w) } -WRITE8_MEMBER(vicdual_state::characterram_w) +void vicdual_state::characterram_w(offs_t offset, uint8_t data) { // m_screen->update_now(); m_screen->update_partial(m_screen->vpos()); @@ -294,7 +294,7 @@ void vicdual_state::vicdual_root(machine_config &config) * *************************************/ -READ8_MEMBER(vicdual_state::depthch_io_r) +uint8_t vicdual_state::depthch_io_r(offs_t offset) { uint8_t ret = 0; @@ -305,7 +305,7 @@ READ8_MEMBER(vicdual_state::depthch_io_r) } -WRITE8_MEMBER(vicdual_state::depthch_io_w) +void vicdual_state::depthch_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) assert_coin_status(); if (offset & 0x04) depthch_audio_w(data); @@ -378,7 +378,7 @@ void vicdual_state::depthch(machine_config &config) * *************************************/ -READ8_MEMBER(vicdual_state::safari_io_r) +uint8_t vicdual_state::safari_io_r(offs_t offset) { uint8_t ret = 0; @@ -389,7 +389,7 @@ READ8_MEMBER(vicdual_state::safari_io_r) } -WRITE8_MEMBER(vicdual_state::safari_io_w) +void vicdual_state::safari_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) assert_coin_status(); if (offset & 0x02) { /* safari_audio_w(0, data) */ } @@ -463,7 +463,7 @@ void vicdual_state::safari(machine_config &config) * *************************************/ -READ8_MEMBER(vicdual_state::frogs_io_r) +uint8_t vicdual_state::frogs_io_r(offs_t offset) { uint8_t ret = 0; @@ -474,10 +474,10 @@ READ8_MEMBER(vicdual_state::frogs_io_r) } -WRITE8_MEMBER(vicdual_state::frogs_io_w) +void vicdual_state::frogs_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) assert_coin_status(); - if (offset & 0x02) frogs_audio_w(space, 0, data); + if (offset & 0x02) frogs_audio_w(data); } @@ -576,7 +576,7 @@ void vicdual_state::frogs(machine_config &config) * *************************************/ -READ8_MEMBER(vicdual_state::headon_io_r) +uint8_t vicdual_state::headon_io_r(offs_t offset) { uint8_t ret = 0; @@ -587,7 +587,7 @@ READ8_MEMBER(vicdual_state::headon_io_r) } -READ8_MEMBER(vicdual_state::sspaceat_io_r) +uint8_t vicdual_state::sspaceat_io_r(offs_t offset) { uint8_t ret = 0; @@ -599,11 +599,11 @@ READ8_MEMBER(vicdual_state::sspaceat_io_r) } -WRITE8_MEMBER(vicdual_state::headon_io_w) +void vicdual_state::headon_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) assert_coin_status(); - if (offset & 0x02) headon_audio_w(space, 0, data); - if (offset & 0x04) { /* palette_bank_w(0, data) */ } /* not written to */ + if (offset & 0x02) headon_audio_w(data); + if (offset & 0x04) { /* palette_bank_w(data) */ } /* not written to */ } @@ -866,7 +866,7 @@ void vicdual_state::sspaceat(machine_config &config) * *************************************/ -READ8_MEMBER( vicdual_state::headon2_io_r ) +uint8_t vicdual_state::headon2_io_r(offs_t offset) { uint8_t data = 0xff; @@ -878,20 +878,20 @@ READ8_MEMBER( vicdual_state::headon2_io_r ) return data; } -WRITE8_MEMBER(vicdual_state::headon2_io_w) +void vicdual_state::headon2_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) assert_coin_status(); - if (offset & 0x02) headon_audio_w(space, 0, data); + if (offset & 0x02) headon_audio_w(data); } -WRITE8_MEMBER(vicdual_state::digger_io_w) +void vicdual_state::digger_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) assert_coin_status(); if (offset & 0x02) { /* digger_audio_1_w(0, data) */ } if (offset & 0x04) { - palette_bank_w(space, 0, data & 0x03); + palette_bank_w(data & 0x03); /* digger_audio_2_w(0, data & 0xfc); */ } @@ -1105,89 +1105,89 @@ void vicdual_state::digger(machine_config &config) * *************************************/ -WRITE8_MEMBER(vicdual_state::invho2_io_w) +void vicdual_state::invho2_io_w(offs_t offset, uint8_t data) { - if (offset & 0x01) invho2_audio_w(space, 0, data); + if (offset & 0x01) invho2_audio_w(data); if (offset & 0x02) invinco_audio_w(data); if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } -WRITE8_MEMBER(vicdual_state::invds_io_w) +void vicdual_state::invds_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) invinco_audio_w(data); if (offset & 0x02) { /* deepscan_audio_w(0, data) */ } if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } -WRITE8_MEMBER(vicdual_state::carhntds_io_w) +void vicdual_state::carhntds_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) { /* invinco_audio_w(data); */ } if (offset & 0x02) { /* deepscan_audio_w(0, data) */ } if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } -WRITE8_MEMBER(vicdual_state::sspacaho_io_w) +void vicdual_state::sspacaho_io_w(offs_t offset, uint8_t data) { - if (offset & 0x01) invho2_audio_w(space, 0, data); - if (offset & 0x02) { /* sspaceatt_audio_w(space, 0, data) */ } + if (offset & 0x01) invho2_audio_w(data); + if (offset & 0x02) { /* sspaceatt_audio_w(data) */ } if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } -WRITE8_MEMBER(vicdual_state::tranqgun_io_w) +void vicdual_state::tranqgun_io_w(offs_t offset, uint8_t data) { - if (offset & 0x01) tranqgun_audio_w(space, 0, data); - if (offset & 0x02) palette_bank_w(space, 0, data); + if (offset & 0x01) tranqgun_audio_w(data); + if (offset & 0x02) palette_bank_w(data); if (offset & 0x08) assert_coin_status(); } -WRITE8_MEMBER(vicdual_state::spacetrk_io_w) +void vicdual_state::spacetrk_io_w(offs_t offset, uint8_t data) { - if (offset & 0x01) { /* spacetrk_audio_w(space, 0, data) */ } - if (offset & 0x02) { /* spacetrk_audio_w(space, 0, data) */ } + if (offset & 0x01) { /* spacetrk_audio_w(data) */ } + if (offset & 0x02) { /* spacetrk_audio_w(data) */ } if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } -WRITE8_MEMBER(carnival_state::carnival_io_w) +void carnival_state::carnival_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) carnival_audio_1_w(data); if (offset & 0x02) carnival_audio_2_w(data); if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } -WRITE8_MEMBER(vicdual_state::brdrline_io_w) +void vicdual_state::brdrline_io_w(offs_t offset, uint8_t data) { - if (offset & 0x01) brdrline_audio_w(space, 0, data); + if (offset & 0x01) brdrline_audio_w(data); if (offset & 0x02) { - palette_bank_w(space, 0, data); - brdrline_audio_aux_w(space,0, data); + palette_bank_w(data); + brdrline_audio_aux_w(data); } if (offset & 0x08) assert_coin_status(); } -WRITE8_MEMBER(vicdual_state::pulsar_io_w) +void vicdual_state::pulsar_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) pulsar_audio_1_w(data); if (offset & 0x02) pulsar_audio_2_w(data); if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } -WRITE8_MEMBER(vicdual_state::heiankyo_io_w) +void vicdual_state::heiankyo_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) { /* heiankyo_audio_1_w(0, data) */ } if (offset & 0x02) { /* heiankyo_audio_2_w(0, data) */ } @@ -1195,25 +1195,25 @@ WRITE8_MEMBER(vicdual_state::heiankyo_io_w) } -WRITE8_MEMBER(vicdual_state::alphaho_io_w) +void vicdual_state::alphaho_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) { /* headon_audio_w(0, data) */ } if (offset & 0x02) { /* alphaf_audio_w(0, data) */ } if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } -WRITE8_MEMBER(vicdual_state::headonn_io_w) +void vicdual_state::headonn_io_w(offs_t offset, uint8_t data) { - if (offset & 0x01) invho2_audio_w(space, 0, data); + if (offset & 0x01) invho2_audio_w(data); if (offset & 0x02) { // 7654---- unused? // ----32-- always 1 // ------10 palette bank (bit 0 inverted) - palette_bank_w(space, 0, (data & 3) ^ 1); + palette_bank_w((data & 3) ^ 1); } if (offset & 0x08) assert_coin_status(); } @@ -2333,7 +2333,7 @@ void vicdual_state::headonn(machine_config &config) * *************************************/ -WRITE8_MEMBER(vicdual_state::samurai_protection_w) +void vicdual_state::samurai_protection_w(uint8_t data) { m_samurai_protection_data = data; } @@ -2353,11 +2353,11 @@ READ_LINE_MEMBER(vicdual_state::samurai_protection_r) } -WRITE8_MEMBER(vicdual_state::samurai_io_w) +void vicdual_state::samurai_io_w(offs_t offset, uint8_t data) { if (offset & 0x02) { /* samurai_audio_w(0, data) */ } if (offset & 0x08) assert_coin_status(); - if (offset & 0x40) palette_bank_w(space, 0, data); + if (offset & 0x40) palette_bank_w(data); } @@ -2467,7 +2467,7 @@ void vicdual_state::samurai(machine_config &config) * *************************************/ -READ8_MEMBER(nsub_state::nsub_io_r) +uint8_t nsub_state::nsub_io_r(offs_t offset) { uint8_t ret = 0; @@ -2478,7 +2478,7 @@ READ8_MEMBER(nsub_state::nsub_io_r) } -WRITE8_MEMBER(nsub_state::nsub_io_w) +void nsub_state::nsub_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) assert_coin_status(); if (offset & 0x02) @@ -2487,7 +2487,7 @@ WRITE8_MEMBER(nsub_state::nsub_io_w) } if (offset & 0x04) { - palette_bank_w(space, 0, data); + palette_bank_w(data); m_s97269pb->palette_bank_w(data); } } @@ -2664,7 +2664,7 @@ void nsub_state::nsub(machine_config &config) * *************************************/ -READ8_MEMBER(vicdual_state::invinco_io_r) +uint8_t vicdual_state::invinco_io_r(offs_t offset) { uint8_t ret = 0; @@ -2676,11 +2676,11 @@ READ8_MEMBER(vicdual_state::invinco_io_r) } -WRITE8_MEMBER(vicdual_state::invinco_io_w) +void vicdual_state::invinco_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) assert_coin_status(); if (offset & 0x02) invinco_audio_w(data); - if (offset & 0x04) palette_bank_w(space, 0, data); + if (offset & 0x04) palette_bank_w(data); } diff --git a/src/mame/drivers/victory.cpp b/src/mame/drivers/victory.cpp index ed44226b932..63bce95b124 100644 --- a/src/mame/drivers/victory.cpp +++ b/src/mame/drivers/victory.cpp @@ -110,7 +110,7 @@ * *************************************/ -WRITE8_MEMBER(victory_state::lamp_control_w) +void victory_state::lamp_control_w(uint8_t data) { m_lamps[0] = BIT(data, 7); m_lamps[1] = BIT(data, 6); diff --git a/src/mame/drivers/vidbrain.cpp b/src/mame/drivers/vidbrain.cpp index 449d6829905..1bc42153e12 100644 --- a/src/mame/drivers/vidbrain.cpp +++ b/src/mame/drivers/vidbrain.cpp @@ -63,7 +63,7 @@ // keyboard_w - keyboard column write //------------------------------------------------- -WRITE8_MEMBER( vidbrain_state::keyboard_w ) +void vidbrain_state::keyboard_w(uint8_t data) { /* @@ -90,7 +90,7 @@ WRITE8_MEMBER( vidbrain_state::keyboard_w ) // keyboard_r - keyboard row read //------------------------------------------------- -READ8_MEMBER( vidbrain_state::keyboard_r ) +uint8_t vidbrain_state::keyboard_r() { /* @@ -124,7 +124,7 @@ READ8_MEMBER( vidbrain_state::keyboard_r ) // sound_w - sound clock write //------------------------------------------------- -WRITE8_MEMBER( vidbrain_state::sound_w ) +void vidbrain_state::sound_w(uint8_t data) { /* diff --git a/src/mame/drivers/vigilant.cpp b/src/mame/drivers/vigilant.cpp index 803e7b6ce9d..3eda7e50b21 100644 --- a/src/mame/drivers/vigilant.cpp +++ b/src/mame/drivers/vigilant.cpp @@ -40,7 +40,7 @@ void vigilant_state::machine_start() membank("bank1")->configure_entries(0, 8, memregion("maincpu")->base() + 0x10000, 0x4000); } -WRITE8_MEMBER(vigilant_state::bank_select_w) +void vigilant_state::bank_select_w(uint8_t data) { membank("bank1")->set_entry(data & 0x07); } @@ -48,7 +48,7 @@ WRITE8_MEMBER(vigilant_state::bank_select_w) /*************************************************************************** vigilant_out2_w **************************************************************************/ -WRITE8_MEMBER(vigilant_state::vigilant_out2_w) +void vigilant_state::vigilant_out2_w(uint8_t data) { /* D0 = FILP = Flip screen? */ /* D1 = COA1 = Coin Counter A? */ @@ -61,7 +61,7 @@ WRITE8_MEMBER(vigilant_state::vigilant_out2_w) // data & 0x01 cocktail mode } -WRITE8_MEMBER(vigilant_state::kikcubic_coin_w) +void vigilant_state::kikcubic_coin_w(uint8_t data) { /* bits 0 is flip screen */ diff --git a/src/mame/drivers/vindictr.cpp b/src/mame/drivers/vindictr.cpp index b5e4e2fbd7d..2a1e31d56cb 100644 --- a/src/mame/drivers/vindictr.cpp +++ b/src/mame/drivers/vindictr.cpp @@ -59,7 +59,7 @@ void vindictr_state::machine_reset() * *************************************/ -READ16_MEMBER(vindictr_state::port1_r) +uint16_t vindictr_state::port1_r() { int result = ioport("260010")->read(); result ^= 0x0010; diff --git a/src/mame/drivers/vip.cpp b/src/mame/drivers/vip.cpp index 421035b3807..f5a51d5ccb2 100644 --- a/src/mame/drivers/vip.cpp +++ b/src/mame/drivers/vip.cpp @@ -279,7 +279,7 @@ void vip_state::update_interrupts() // read - //------------------------------------------------- -READ8_MEMBER(vip_state::read) +uint8_t vip_state::read(offs_t offset) { int cs = BIT(offset, 15) || m_8000; int cdef = !((offset >= 0xc00) && (offset < 0x1000)); @@ -304,7 +304,7 @@ READ8_MEMBER(vip_state::read) // write - //------------------------------------------------- -WRITE8_MEMBER(vip_state::write) +void vip_state::write(offs_t offset, uint8_t data) { int cs = BIT(offset, 15) || m_8000; int cdef = !((offset >= 0xc00) && (offset < 0x1000)); @@ -323,7 +323,7 @@ WRITE8_MEMBER(vip_state::write) // io_r - //------------------------------------------------- -READ8_MEMBER(vip_state::io_r) +uint8_t vip_state::io_r(offs_t offset) { uint8_t data = m_exp->io_r(offset); @@ -352,7 +352,7 @@ READ8_MEMBER(vip_state::io_r) // io_w - //------------------------------------------------- -WRITE8_MEMBER(vip_state::io_w) +void vip_state::io_w(offs_t offset, uint8_t data) { m_exp->io_w(offset, data); diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp index bcc08415b15..b30a882147b 100644 --- a/src/mame/drivers/vixen.cpp +++ b/src/mame/drivers/vixen.cpp @@ -73,21 +73,21 @@ void vixen_state::update_interrupt() } -READ8_MEMBER( vixen_state::opram_r ) +uint8_t vixen_state::opram_r(offs_t offset) { if (!machine().side_effects_disabled()) membank("bank3")->set_entry(0); // read videoram return m_program->read_byte(offset); } -READ8_MEMBER( vixen_state::oprom_r ) +uint8_t vixen_state::oprom_r(offs_t offset) { if (!machine().side_effects_disabled()) membank("bank3")->set_entry(1); // read rom return m_rom[offset]; } -READ8_MEMBER( vixen_state::status_r ) +uint8_t vixen_state::status_r() { /* @@ -118,7 +118,7 @@ READ8_MEMBER( vixen_state::status_r ) return data; } -WRITE8_MEMBER( vixen_state::cmd_w ) +void vixen_state::cmd_w(uint8_t data) { /* @@ -152,7 +152,7 @@ WRITE8_MEMBER( vixen_state::cmd_w ) update_interrupt(); } -READ8_MEMBER( vixen_state::ieee488_r ) +uint8_t vixen_state::ieee488_r() { /* @@ -203,7 +203,7 @@ READ8_MEMBER( vixen_state::ieee488_r ) // port3_r - serial status read //------------------------------------------------- -READ8_MEMBER( vixen_state::port3_r ) +uint8_t vixen_state::port3_r() { /* diff --git a/src/mame/drivers/vp415.cpp b/src/mame/drivers/vp415.cpp index 3cda464b158..155360b95c2 100644 --- a/src/mame/drivers/vp415.cpp +++ b/src/mame/drivers/vp415.cpp @@ -132,7 +132,7 @@ WRITE_LINE_MEMBER(vp415_state::cpu_int1_w) set_int_line(0, state); } -WRITE8_MEMBER(vp415_state::sel34_w) +void vp415_state::sel34_w(uint8_t data) { logerror("%s: sel34: /INTR=%d, RES=%d, ERD=%d, ENW=%d\n", machine().describe_context(), BIT(data, SEL34_INTR_N_BIT), BIT(data, SEL34_RES_BIT), BIT(data, SEL34_ERD_BIT), BIT(data, SEL34_ENW_BIT)); m_sel34 = data; @@ -144,7 +144,7 @@ WRITE8_MEMBER(vp415_state::sel34_w) } } -READ8_MEMBER(vp415_state::sel37_r) +uint8_t vp415_state::sel37_r() { logerror("%s: sel37: ID0=%d, ID1=%d\n", machine().describe_context(), BIT(m_sel37, SEL37_ID0_BIT), BIT(m_sel37, SEL37_ID1_BIT)); return m_sel37; @@ -211,7 +211,7 @@ void vp415_state::datamcu_program_map(address_map &map) // Control Module (S) -WRITE8_MEMBER(vp415_state::ctrl_regs_w) +void vp415_state::ctrl_regs_w(offs_t offset, uint8_t data) { const uint8_t handler_index = (offset & 0x0c00) >> 10; switch (handler_index) @@ -233,7 +233,7 @@ WRITE8_MEMBER(vp415_state::ctrl_regs_w) } } -READ8_MEMBER(vp415_state::ctrl_regs_r) +uint8_t vp415_state::ctrl_regs_r(offs_t offset) { const uint8_t handler_index = (offset & 0x0c00) >> 10; uint8_t value = 0; diff --git a/src/mame/drivers/vsmile.cpp b/src/mame/drivers/vsmile.cpp index a62a4a5e489..723bb22e32a 100644 --- a/src/mame/drivers/vsmile.cpp +++ b/src/mame/drivers/vsmile.cpp @@ -45,7 +45,7 @@ void vsmile_base_state::chip_sel_w(uint8_t data) m_maincpu->invalidate_cache(); } -READ16_MEMBER(vsmile_base_state::bank3_r) +uint16_t vsmile_base_state::bank3_r(offs_t offset) { return ((uint16_t*)m_system_region->base())[offset]; } diff --git a/src/mame/drivers/vsnes.cpp b/src/mame/drivers/vsnes.cpp index e324e0cf148..834f3acf3e6 100644 --- a/src/mame/drivers/vsnes.cpp +++ b/src/mame/drivers/vsnes.cpp @@ -151,19 +151,19 @@ Changes: /******************************************************************************/ -WRITE8_MEMBER(vsnes_state::sprite_dma_0_w) +void vsnes_state::sprite_dma_0_w(address_space &space, uint8_t data) { int source = ( data & 7 ); m_ppu1->spriteram_dma( space, source ); } -WRITE8_MEMBER(vsnes_state::sprite_dma_1_w) +void vsnes_state::sprite_dma_1_w(address_space &space, uint8_t data) { int source = ( data & 7 ); m_ppu2->spriteram_dma( space, source ); } -WRITE8_MEMBER(vsnes_state::vsnes_coin_counter_w) +void vsnes_state::vsnes_coin_counter_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, data & 0x01 ); m_coin = data; @@ -175,13 +175,13 @@ WRITE8_MEMBER(vsnes_state::vsnes_coin_counter_w) } } -READ8_MEMBER(vsnes_state::vsnes_coin_counter_r) +uint8_t vsnes_state::vsnes_coin_counter_r() { //only for platoon return m_coin; } -WRITE8_MEMBER(vsnes_state::vsnes_coin_counter_1_w) +void vsnes_state::vsnes_coin_counter_1_w(uint8_t data) { machine().bookkeeping().coin_counter_w(1, data & 0x01 ); if( data & 0xfe ) //vsbball service mode @@ -221,7 +221,7 @@ void vsnes_state::vsnes_cpu2_map(address_map &map) -READ8_MEMBER(vsnes_state::vsnes_bootleg_z80_address_r) +uint8_t vsnes_state::vsnes_bootleg_z80_address_r() { // NMI routine uses the value read here as the low part of an offset from 0x2000 to store a value read at 0x4000 // before reading 0x6000 and returning @@ -233,14 +233,14 @@ READ8_MEMBER(vsnes_state::vsnes_bootleg_z80_address_r) return m_bootleg_sound_offset; } -WRITE8_MEMBER(vsnes_state::bootleg_sound_write) +void vsnes_state::bootleg_sound_write(offs_t offset, uint8_t data) { m_bootleg_sound_offset = offset & 0xf; m_bootleg_sound_data = data; m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } -READ8_MEMBER(vsnes_state::vsnes_bootleg_z80_data_r) +uint8_t vsnes_state::vsnes_bootleg_z80_data_r() { //printf("Z80 read data %02x\n", m_bootleg_sound_data); m_subcpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); @@ -248,7 +248,7 @@ READ8_MEMBER(vsnes_state::vsnes_bootleg_z80_data_r) } // A0 = SN #1 enable, A1 = SN #2 enable, A2 = SN write enables (both) on edge -WRITE8_MEMBER(vsnes_state::vssmbbl_sn_w) +void vsnes_state::vssmbbl_sn_w(offs_t offset, uint8_t data) { // printf("sn_w: ofs %x\n", offset & 7); if (!(offset & 4)) @@ -280,7 +280,7 @@ void vsnes_state::vsnes_cpu1_bootleg_map(address_map &map) map(0x8000, 0xffff).rom(); } -READ8_MEMBER( vsnes_state::vsnes_bootleg_z80_latch_r ) +uint8_t vsnes_state::vsnes_bootleg_z80_latch_r() { return 0x00; } diff --git a/src/mame/drivers/warpwarp.cpp b/src/mame/drivers/warpwarp.cpp index fed5d69fdab..0688f5b4505 100644 --- a/src/mame/drivers/warpwarp.cpp +++ b/src/mame/drivers/warpwarp.cpp @@ -160,7 +160,7 @@ WRITE_LINE_MEMBER(warpwarp_state::vblank_irq) } /* B&W Games I/O */ -READ8_MEMBER(warpwarp_state::geebee_in_r) +uint8_t warpwarp_state::geebee_in_r(offs_t offset) { int res; @@ -180,7 +180,7 @@ READ8_MEMBER(warpwarp_state::geebee_in_r) return res; } -WRITE8_MEMBER(warpwarp_state::geebee_out6_w) +void warpwarp_state::geebee_out6_w(offs_t offset, uint8_t data) { switch (offset & 3) { @@ -231,19 +231,19 @@ WRITE_LINE_MEMBER(warpwarp_state::inv_w) /* Color Games I/O */ /* Read Switch Inputs */ -READ8_MEMBER(warpwarp_state::warpwarp_sw_r) +uint8_t warpwarp_state::warpwarp_sw_r(offs_t offset) { return (m_in0->read() >> (offset & 7)) & 1; } /* Read Dipswitches */ -READ8_MEMBER(warpwarp_state::warpwarp_dsw1_r) +uint8_t warpwarp_state::warpwarp_dsw1_r(offs_t offset) { return (m_dsw1->read() >> (offset & 7)) & 1; } /* Read mux Controller Inputs */ -READ8_MEMBER(warpwarp_state::warpwarp_vol_r) +uint8_t warpwarp_state::warpwarp_vol_r() { int res; @@ -259,7 +259,7 @@ READ8_MEMBER(warpwarp_state::warpwarp_vol_r) return res; } -WRITE8_MEMBER(warpwarp_state::warpwarp_out0_w) +void warpwarp_state::warpwarp_out0_w(offs_t offset, uint8_t data) { switch (offset & 3) { diff --git a/src/mame/drivers/wc90.cpp b/src/mame/drivers/wc90.cpp index 9e91def8fb5..9b2659ee1c2 100644 --- a/src/mame/drivers/wc90.cpp +++ b/src/mame/drivers/wc90.cpp @@ -63,12 +63,12 @@ Press one of the start buttons to exit. #include "speaker.h" -WRITE8_MEMBER(wc90_state::bankswitch_w) +void wc90_state::bankswitch_w(uint8_t data) { m_mainbank->set_entry(data >> 3); } -WRITE8_MEMBER(wc90_state::bankswitch1_w) +void wc90_state::bankswitch1_w(uint8_t data) { m_subbank->set_entry(data >> 3); } diff --git a/src/mame/drivers/wc90b.cpp b/src/mame/drivers/wc90b.cpp index 02b698a8284..138b5f23042 100644 --- a/src/mame/drivers/wc90b.cpp +++ b/src/mame/drivers/wc90b.cpp @@ -101,40 +101,40 @@ Noted added by ClawGrip 28-Mar-2008: #define MSM5205_CLOCK XTAL(384'000) -WRITE8_MEMBER(wc90b_state::bankswitch_w) +void wc90b_state::bankswitch_w(uint8_t data) { membank("mainbank")->set_entry(data >> 3); } -WRITE8_MEMBER(wc90b_state::bankswitch1_w) +void wc90b_state::bankswitch1_w(uint8_t data) { membank("subbank")->set_entry(data >> 3); } -WRITE8_MEMBER(wc90b_state::sound_command_w) +void wc90b_state::sound_command_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->set_input_line(0, HOLD_LINE); } -WRITE8_MEMBER(wc90b_state::adpcm_control_w) +void wc90b_state::adpcm_control_w(uint8_t data) { membank("audiobank")->set_entry(data & 0x01); m_msm->reset_w(data & 0x08); } -WRITE8_MEMBER(wc90b_state::adpcm_data_w) +void wc90b_state::adpcm_data_w(uint8_t data) { m_msm5205next = data; } -READ8_MEMBER(wc90b_state::master_irq_ack_r) +uint8_t wc90b_state::master_irq_ack_r() { m_maincpu->set_input_line(0,CLEAR_LINE); return 0xff; } -WRITE8_MEMBER(wc90b_state::slave_irq_ack_w) +void wc90b_state::slave_irq_ack_w(uint8_t data) { m_subcpu->set_input_line(0,CLEAR_LINE); } @@ -190,7 +190,7 @@ void wc90b_state::sound_cpu(address_map &map) } -WRITE8_MEMBER(eurogael_state::master_irq_ack_w) +void eurogael_state::master_irq_ack_w(uint8_t data) { // this seems to be write based instead of read based m_maincpu->set_input_line(0,CLEAR_LINE); diff --git a/src/mame/drivers/wecleman.cpp b/src/mame/drivers/wecleman.cpp index 3b14850648f..363cd1dcd13 100644 --- a/src/mame/drivers/wecleman.cpp +++ b/src/mame/drivers/wecleman.cpp @@ -288,7 +288,7 @@ TODO: Common Routines ***************************************************************************/ -READ16_MEMBER(wecleman_state::wecleman_protection_r) +uint16_t wecleman_state::wecleman_protection_r() { int blend, data0, data1, r0, g0, b0, r1, g1, b1; @@ -314,7 +314,7 @@ READ16_MEMBER(wecleman_state::wecleman_protection_r) return(r0); } -WRITE16_MEMBER(wecleman_state::wecleman_protection_w) +void wecleman_state::wecleman_protection_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 2) m_prot_state = data & 0x2000; if (!m_prot_state) COMBINE_DATA(m_protection_ram + offset); @@ -341,7 +341,7 @@ WRITE16_MEMBER(wecleman_state::wecleman_protection_w) Schems: SUBRESET does a RST+HALT Sub CPU IRQ 4 generated by SUBINT, no other IRQs */ -WRITE16_MEMBER(wecleman_state::irqctrl_w) +void wecleman_state::irqctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -386,7 +386,7 @@ WRITE16_MEMBER(wecleman_state::irqctrl_w) ------10 ? out 1/2 */ -WRITE16_MEMBER(wecleman_state::selected_ip_w) +void wecleman_state::selected_ip_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) m_selected_ip = data & 0xff; // latch the value } @@ -439,7 +439,7 @@ uint8_t wecleman_state::selected_ip_r() The color code in the original sprite encoding has special meanings on the other hand. I'll take a shortcut by manually copying list[0] and list[1] to sprite RAM for further process. */ -WRITE16_MEMBER(wecleman_state::blitter_w) +void wecleman_state::blitter_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_blitter_regs[offset]); @@ -609,12 +609,12 @@ void wecleman_state::hotchase_sub_map(address_map &map) ***************************************************************************/ /* Protection - an external multiplier connected to the sound CPU */ -READ8_MEMBER(wecleman_state::multiply_r) +uint8_t wecleman_state::multiply_r() { return (m_multiply_reg[0] * m_multiply_reg[1]) & 0xFF; } -WRITE8_MEMBER(wecleman_state::multiply_w) +void wecleman_state::multiply_w(offs_t offset, uint8_t data) { m_multiply_reg[offset] = data; } @@ -641,7 +641,7 @@ void wecleman_state::wecleman_volume_callback(uint8_t data) m_k007232[0]->set_volume(1, 0, (data & 0x0f) * 0x11); } -WRITE8_MEMBER(wecleman_state::wecleman_K00723216_bank_w) +void wecleman_state::wecleman_K00723216_bank_w(uint8_t data) { m_k007232[0]->set_bank(0, ~data&1 ); //* (wecleman062gre) } @@ -665,7 +665,7 @@ void wecleman_state::wecleman_sound_map(address_map &map) Hot Chase Sound CPU Handlers ***************************************************************************/ -WRITE8_MEMBER(wecleman_state::hotchase_sound_control_w) +void wecleman_state::hotchase_sound_control_w(offs_t offset, uint8_t data) { // int reg[8]; @@ -712,7 +712,7 @@ WRITE8_MEMBER(wecleman_state::hotchase_sound_control_w) } } -WRITE8_MEMBER(wecleman_state::hotchase_sound_hs_w) +void wecleman_state::hotchase_sound_hs_w(uint8_t data) { m_hotchase_sound_hs = true; } @@ -720,13 +720,13 @@ WRITE8_MEMBER(wecleman_state::hotchase_sound_hs_w) /* Read and write handlers for one K007232 chip: even and odd register are mapped swapped */ template<int Chip> -READ8_MEMBER(wecleman_state::hotchase_k007232_r) +uint8_t wecleman_state::hotchase_k007232_r(offs_t offset) { return m_k007232[Chip]->read(offset ^ 1); } template<int Chip> -WRITE8_MEMBER(wecleman_state::hotchase_k007232_w) +void wecleman_state::hotchase_k007232_w(offs_t offset, uint8_t data) { m_k007232[Chip]->write(offset ^ 1, data); } diff --git a/src/mame/drivers/welltris.cpp b/src/mame/drivers/welltris.cpp index b62ff069796..3b8234ba440 100644 --- a/src/mame/drivers/welltris.cpp +++ b/src/mame/drivers/welltris.cpp @@ -327,7 +327,7 @@ TODO: #define WELLTRIS_4P_HACK 0 -WRITE8_MEMBER(welltris_state::sound_bankswitch_w) +void welltris_state::sound_bankswitch_w(uint8_t data) { membank("soundbank")->set_entry(data & 0x03); } diff --git a/src/mame/drivers/wiping.cpp b/src/mame/drivers/wiping.cpp index 6c2d86abade..193e1240d9f 100644 --- a/src/mame/drivers/wiping.cpp +++ b/src/mame/drivers/wiping.cpp @@ -54,7 +54,7 @@ void wiping_state::machine_start() } /* input ports are rotated 90 degrees */ -READ8_MEMBER(wiping_state::ports_r) +uint8_t wiping_state::ports_r(offs_t offset) { int i,res; static const char *const portnames[] = { "P1", "P2", "IN2", "IN3", "IN4", "IN5", "SYSTEM", "DSW" }; diff --git a/src/mame/drivers/witch.cpp b/src/mame/drivers/witch.cpp index 35922066615..9e927d4c57c 100644 --- a/src/mame/drivers/witch.cpp +++ b/src/mame/drivers/witch.cpp @@ -357,13 +357,13 @@ uint32_t witch_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } -WRITE8_MEMBER(witch_state::gfx0_vram_w) +void witch_state::gfx0_vram_w(offs_t offset, uint8_t data) { m_gfx0_vram[offset] = data; m_gfx0_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(witch_state::gfx0_cram_w) +void witch_state::gfx0_cram_w(offs_t offset, uint8_t data) { m_gfx0_cram[offset] = data; m_gfx0_tilemap->mark_tile_dirty(offset); @@ -372,26 +372,26 @@ WRITE8_MEMBER(witch_state::gfx0_cram_w) #define FIX_OFFSET() do { \ offset=(((offset + ((m_scrolly & 0xf8) << 2) ) & 0x3e0)+((offset + (m_scrollx >> 3) ) & 0x1f)+32)&0x3ff; } while(0) -WRITE8_MEMBER(witch_state::gfx1_vram_w) +void witch_state::gfx1_vram_w(offs_t offset, uint8_t data) { FIX_OFFSET(); m_gfx1_vram[offset] = data; m_gfx1_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(witch_state::gfx1_cram_w) +void witch_state::gfx1_cram_w(offs_t offset, uint8_t data) { FIX_OFFSET(); m_gfx1_cram[offset] = data; m_gfx1_tilemap->mark_tile_dirty(offset); } -READ8_MEMBER(witch_state::gfx1_vram_r) +uint8_t witch_state::gfx1_vram_r(offs_t offset) { FIX_OFFSET(); return m_gfx1_vram[offset]; } -READ8_MEMBER(witch_state::gfx1_cram_r) +uint8_t witch_state::gfx1_cram_r(offs_t offset) { FIX_OFFSET(); return m_gfx1_cram[offset]; @@ -451,17 +451,17 @@ void witch_state::write_a006(uint8_t data) machine().bookkeeping().coin_counter_w(0, !BIT(data, 6)); // coin in counter } -WRITE8_MEMBER(witch_state::main_write_a008) +void witch_state::main_write_a008(uint8_t data) { m_maincpu->set_input_line(0, CLEAR_LINE); } -WRITE8_MEMBER(witch_state::sub_write_a008) +void witch_state::sub_write_a008(uint8_t data) { m_subcpu->set_input_line(0, CLEAR_LINE); } -READ8_MEMBER(witch_state::prot_read_700x) +uint8_t witch_state::prot_read_700x(offs_t offset) { /* Code @$21a looks like simple protection check. @@ -500,7 +500,7 @@ void witch_state::yscroll_w(uint8_t data) m_scrolly = data; } -WRITE8_MEMBER(keirinou_state::palette_w) +void keirinou_state::palette_w(offs_t offset, uint8_t data) { int r,g,b; @@ -1136,7 +1136,7 @@ void witch_state::init_witch() m_mainbank->configure_entries(0, 4, memregion("maincpu")->base() + UNBANKED_SIZE, 0x8000); m_mainbank->set_entry(0); - m_subcpu->space(AS_PROGRAM).install_read_handler(0x7000, 0x700f, read8_delegate(*this, FUNC(witch_state::prot_read_700x))); + m_subcpu->space(AS_PROGRAM).install_read_handler(0x7000, 0x700f, read8sm_delegate(*this, FUNC(witch_state::prot_read_700x))); } GAME( 1987, keirinou, 0, keirinou, keirinou, keirinou_state, empty_init, ROT0, "Excellent System", "Keirin Ou", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/wiz.cpp b/src/mame/drivers/wiz.cpp index 81f118d0062..f7c68980bef 100644 --- a/src/mame/drivers/wiz.cpp +++ b/src/mame/drivers/wiz.cpp @@ -264,14 +264,14 @@ static DISCRETE_SOUND_START(stinger_discrete) DISCRETE_SOUND_END -WRITE8_MEMBER(wiz_state::stinger_explosion_w) +void wiz_state::stinger_explosion_w(uint8_t data) { // explosion sound trigger(analog?) m_discrete->write(STINGER_BOOM_EN1, m_dsc1); m_discrete->write(STINGER_BOOM_EN2, m_dsc1^=1); } -WRITE8_MEMBER(wiz_state::stinger_shot_w) +void wiz_state::stinger_shot_w(uint8_t data) { // player shot sound trigger(analog?) m_discrete->write(STINGER_SHOT_EN1, m_dsc0); @@ -286,7 +286,7 @@ WRITE8_MEMBER(wiz_state::stinger_shot_w) ***************************************************************************/ -READ8_MEMBER(wiz_state::wiz_protection_r) +uint8_t wiz_state::wiz_protection_r() { switch (m_colorram2[0]) { @@ -298,12 +298,12 @@ READ8_MEMBER(wiz_state::wiz_protection_r) return m_colorram2[0]; } -WRITE8_MEMBER(wiz_state::wiz_coin_counter_w) +void wiz_state::wiz_coin_counter_w(offs_t offset, uint8_t data) { machine().bookkeeping().coin_counter_w(offset, data & 1); } -WRITE8_MEMBER(wiz_state::wiz_main_nmi_mask_w) +void wiz_state::wiz_main_nmi_mask_w(uint8_t data) { m_main_nmi_mask = data & 1; } @@ -359,7 +359,7 @@ void wiz_state::stinger_main_map(address_map &map) /**************************************************************************/ -WRITE8_MEMBER(wiz_state::wiz_sound_nmi_mask_w) +void wiz_state::wiz_sound_nmi_mask_w(uint8_t data) { m_sound_nmi_mask = data & 1; } diff --git a/src/mame/drivers/wolfpack.cpp b/src/mame/drivers/wolfpack.cpp index 426c730ae63..8f91c08a839 100644 --- a/src/mame/drivers/wolfpack.cpp +++ b/src/mame/drivers/wolfpack.cpp @@ -60,7 +60,7 @@ READ_LINE_MEMBER(wolfpack_state::dial_r) } -READ8_MEMBER(wolfpack_state::misc_r) +uint8_t wolfpack_state::misc_r() { uint8_t val = 0; @@ -86,43 +86,43 @@ READ8_MEMBER(wolfpack_state::misc_r) } -WRITE8_MEMBER(wolfpack_state::high_explo_w){ } -WRITE8_MEMBER(wolfpack_state::sonar_ping_w){} -WRITE8_MEMBER(wolfpack_state::sirlat_w){} -WRITE8_MEMBER(wolfpack_state::pt_sound_w){} -WRITE8_MEMBER(wolfpack_state::launch_torpedo_w){} -WRITE8_MEMBER(wolfpack_state::low_explo_w){} -WRITE8_MEMBER(wolfpack_state::screw_cont_w){} -WRITE8_MEMBER(wolfpack_state::lamp_flash_w){} -WRITE8_MEMBER(wolfpack_state::warning_light_w){} -WRITE8_MEMBER(wolfpack_state::audamp_w){} +void wolfpack_state::high_explo_w(uint8_t data){ } +void wolfpack_state::sonar_ping_w(uint8_t data){} +void wolfpack_state::sirlat_w(uint8_t data){} +void wolfpack_state::pt_sound_w(uint8_t data){} +void wolfpack_state::launch_torpedo_w(uint8_t data){} +void wolfpack_state::low_explo_w(uint8_t data){} +void wolfpack_state::screw_cont_w(uint8_t data){} +void wolfpack_state::lamp_flash_w(uint8_t data){} +void wolfpack_state::warning_light_w(uint8_t data){} +void wolfpack_state::audamp_w(uint8_t data){} -WRITE8_MEMBER(wolfpack_state::word_w) +void wolfpack_state::word_w(uint8_t data) { /* latch word from bus into temp register, and place on s14001a input bus */ /* there is no real need for a temp register at all, since the bus 'register' acts as one */ m_s14001a->data_w(data & 0x1f); /* SA0 (IN5) is pulled low according to the schematic, so its 0x1f and not 0x3f as one would expect */ } -WRITE8_MEMBER(wolfpack_state::start_speech_w) +void wolfpack_state::start_speech_w(uint8_t data) { m_s14001a->start_w(data&1); } -WRITE8_MEMBER(wolfpack_state::attract_w) +void wolfpack_state::attract_w(uint8_t data) { machine().bookkeeping().coin_lockout_global_w(!(data & 1)); } -WRITE8_MEMBER(wolfpack_state::credit_w) +void wolfpack_state::credit_w(uint8_t data) { m_led = BIT(~data, 0); } -WRITE8_MEMBER(wolfpack_state::coldetres_w) +void wolfpack_state::coldetres_w(uint8_t data) { m_collision = 0; } diff --git a/src/mame/drivers/wpc_dot.cpp b/src/mame/drivers/wpc_dot.cpp index aae24a9ba7b..8dc47fb4784 100644 --- a/src/mame/drivers/wpc_dot.cpp +++ b/src/mame/drivers/wpc_dot.cpp @@ -193,12 +193,12 @@ void wpc_dot_state::init_wpc_dot() save_pointer(m_dmdram,"DMD RAM",0x2000); } -READ8_MEMBER(wpc_dot_state::ram_r) +uint8_t wpc_dot_state::ram_r(offs_t offset) { return m_ram[offset]; } -WRITE8_MEMBER(wpc_dot_state::ram_w) +void wpc_dot_state::ram_w(offs_t offset, uint8_t data) { if((!m_wpc->memprotect_active()) || ((offset & m_wpc->get_memprotect_mask()) != m_wpc->get_memprotect_mask())) m_ram[offset] = data; diff --git a/src/mame/drivers/wwfsstar.cpp b/src/mame/drivers/wwfsstar.cpp index fc4c87dc1cf..9c922e97687 100644 --- a/src/mame/drivers/wwfsstar.cpp +++ b/src/mame/drivers/wwfsstar.cpp @@ -209,7 +209,7 @@ void wwfsstar_state::sound_map(address_map &map) as used by the above memory map *******************************************************************************/ -WRITE16_MEMBER(wwfsstar_state::scroll_w) +void wwfsstar_state::scroll_w(offs_t offset, uint16_t data) { switch (offset) { @@ -222,12 +222,12 @@ WRITE16_MEMBER(wwfsstar_state::scroll_w) } } -WRITE16_MEMBER(wwfsstar_state::flipscreen_w) +void wwfsstar_state::flipscreen_w(uint16_t data) { flip_screen_set(data & 1); } -WRITE16_MEMBER(wwfsstar_state::irqack_w) +void wwfsstar_state::irqack_w(offs_t offset, uint16_t data) { if (offset == 0) m_maincpu->set_input_line(6, CLEAR_LINE); diff --git a/src/mame/drivers/x07.cpp b/src/mame/drivers/x07.cpp index cd10fe813e0..9a0948aa6db 100644 --- a/src/mame/drivers/x07.cpp +++ b/src/mame/drivers/x07.cpp @@ -1108,7 +1108,7 @@ uint32_t x07_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c Machine ***************************************************************************/ -READ8_MEMBER( x07_state::x07_io_r ) +uint8_t x07_state::x07_io_r(offs_t offset) { uint8_t data = 0xff; @@ -1158,7 +1158,7 @@ READ8_MEMBER( x07_state::x07_io_r ) } -WRITE8_MEMBER( x07_state::x07_io_w ) +void x07_state::x07_io_w(offs_t offset, uint8_t data) { switch(offset) { diff --git a/src/mame/drivers/x1.cpp b/src/mame/drivers/x1.cpp index 04a77ff8a7b..7b822545fe4 100644 --- a/src/mame/drivers/x1.cpp +++ b/src/mame/drivers/x1.cpp @@ -443,7 +443,7 @@ uint8_t x1_state::get_game_key(uint8_t port) return ret; } -READ8_MEMBER( x1_state::x1_sub_io_r ) +uint8_t x1_state::x1_sub_io_r() { uint8_t ret,bus_res; @@ -565,7 +565,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_cmt_wind_timer) } } -WRITE8_MEMBER( x1_state::x1_sub_io_w ) +void x1_state::x1_sub_io_w(uint8_t data) { /* sub-routine at $10e sends to these sub-routines when a keyboard input is triggered: $17a -> floppy @@ -695,7 +695,7 @@ WRITE8_MEMBER( x1_state::x1_sub_io_w ) *************************************/ -READ8_MEMBER( x1_state::x1_rom_r ) +uint8_t x1_state::x1_rom_r() { // logerror("%06x\n",m_rom_index[0]<<16|m_rom_index[1]<<8|m_rom_index[2]<<0); if (m_cart->exists()) @@ -704,17 +704,17 @@ READ8_MEMBER( x1_state::x1_rom_r ) return 0; } -WRITE8_MEMBER( x1_state::x1_rom_w ) +void x1_state::x1_rom_w(offs_t offset, uint8_t data) { m_rom_index[offset] = data; } -WRITE8_MEMBER( x1_state::x1_rom_bank_0_w ) +void x1_state::x1_rom_bank_0_w(uint8_t data) { m_ram_bank = 0x10; } -WRITE8_MEMBER( x1_state::x1_rom_bank_1_w ) +void x1_state::x1_rom_bank_1_w(uint8_t data) { m_ram_bank = 0x00; } @@ -725,7 +725,7 @@ WRITE8_MEMBER( x1_state::x1_rom_bank_1_w ) * *************************************/ -READ8_MEMBER( x1_state::x1_fdc_r ) +uint8_t x1_state::x1_fdc_r(offs_t offset) { //uint8_t ret = 0; @@ -756,7 +756,7 @@ READ8_MEMBER( x1_state::x1_fdc_r ) return 0x00; } -WRITE8_MEMBER( x1_state::x1_fdc_w ) +void x1_state::x1_fdc_w(offs_t offset, uint8_t data) { floppy_image_device *floppy = nullptr; @@ -844,7 +844,7 @@ uint16_t x1_state::get_pcg_addr( uint16_t width, uint8_t y_char_size ) return pcg_offset; } -READ8_MEMBER( x1_state::x1_pcg_r ) +uint8_t x1_state::x1_pcg_r(offs_t offset) { int addr; int pcg_offset; @@ -880,7 +880,7 @@ READ8_MEMBER( x1_state::x1_pcg_r ) return res; } -WRITE8_MEMBER( x1_state::x1_pcg_w ) +void x1_state::x1_pcg_w(offs_t offset, uint8_t data) { int addr,pcg_offset; @@ -951,25 +951,25 @@ void x1_state::set_current_palette() /* Note: docs claims that reading the palette ports makes the value to change somehow in X1 mode ... In 4096 color mode, it's used for reading the value back. */ -WRITE8_MEMBER( x1_state::x1_pal_r_w ) +void x1_state::x1_pal_r_w(uint8_t data) { m_x_r = data; set_current_palette(); } -WRITE8_MEMBER( x1_state::x1_pal_g_w ) +void x1_state::x1_pal_g_w(uint8_t data) { m_x_g = data; set_current_palette(); } -WRITE8_MEMBER( x1_state::x1_pal_b_w ) +void x1_state::x1_pal_b_w(uint8_t data) { m_x_b = data; set_current_palette(); } -WRITE8_MEMBER( x1_state::x1turboz_4096_palette_w ) +void x1_state::x1turboz_4096_palette_w(offs_t offset, uint8_t data) { if (m_turbo_reg.pal & 0x80) // AEN bit, Turbo Z { @@ -1005,19 +1005,19 @@ WRITE8_MEMBER( x1_state::x1turboz_4096_palette_w ) switch (offset & 0x0300) { case 0x0000: - x1_pal_b_w(space, offset & 0x00ff, data); + x1_pal_b_w(data); break; case 0x0100: - x1_pal_r_w(space, offset & 0x00ff, data); + x1_pal_r_w(data); break; case 0x0200: - x1_pal_g_w(space, offset & 0x00ff, data); + x1_pal_g_w(data); break; } } } -READ8_MEMBER( x1_state::x1_ex_gfxram_r ) +uint8_t x1_state::x1_ex_gfxram_r(offs_t offset) { if (!machine().side_effects_disabled()) { @@ -1030,7 +1030,7 @@ READ8_MEMBER( x1_state::x1_ex_gfxram_r ) } } -WRITE8_MEMBER( x1_state::x1_ex_gfxram_w ) +void x1_state::x1_ex_gfxram_w(offs_t offset, uint8_t data) { uint8_t ex_mask; @@ -1057,7 +1057,7 @@ WRITE8_MEMBER( x1_state::x1_ex_gfxram_w ) d6(40) = 0:8-raster graphics 1:16-raster graphics d7(80) = 0:don't display 1:display <- underline (when 1, graphics are not displayed) */ -WRITE8_MEMBER( x1_state::x1_scrn_w ) +void x1_state::x1_scrn_w(uint8_t data) { m_scrn_reg.pcg_mode = BIT(data, 5); m_bitmapbank->set_entry(BIT(data, 4)); @@ -1071,13 +1071,13 @@ WRITE8_MEMBER( x1_state::x1_scrn_w ) logerror("SCRN sets true 400 lines mode\n"); } -WRITE8_MEMBER( x1_state::x1_pri_w ) +void x1_state::x1_pri_w(uint8_t data) { m_scrn_reg.pri = data; // logerror("PRI = %02x\n",data); } -WRITE8_MEMBER( x1_state::x1_6845_w ) +void x1_state::x1_6845_w(offs_t offset, uint8_t data) { if(offset == 0) { @@ -1091,13 +1091,13 @@ WRITE8_MEMBER( x1_state::x1_6845_w ) } } -READ8_MEMBER( x1_state::x1turboz_blackclip_r ) +uint8_t x1_state::x1turboz_blackclip_r() { /* TODO: this returns only on x1turboz */ return m_scrn_reg.blackclip; } -WRITE8_MEMBER( x1_state::x1turbo_blackclip_w ) +void x1_state::x1turbo_blackclip_w(uint8_t data) { /* -x-- ---- replace blanking duration with black @@ -1111,33 +1111,33 @@ WRITE8_MEMBER( x1_state::x1turbo_blackclip_w ) logerror("Blackclip data access %02x\n",data); } -READ8_MEMBER( x1_state::x1turbo_pal_r ) +uint8_t x1_state::x1turbo_pal_r() { return m_turbo_reg.pal; } -READ8_MEMBER( x1_state::x1turbo_txpal_r ) +uint8_t x1_state::x1turbo_txpal_r(offs_t offset) { return m_turbo_reg.txt_pal[offset]; } -READ8_MEMBER( x1_state::x1turbo_txdisp_r ) +uint8_t x1_state::x1turbo_txdisp_r() { return m_turbo_reg.txt_disp; } -READ8_MEMBER( x1_state::x1turbo_gfxpal_r ) +uint8_t x1_state::x1turbo_gfxpal_r() { return m_turbo_reg.gfx_pal; } -WRITE8_MEMBER( x1_state::x1turbo_pal_w ) +void x1_state::x1turbo_pal_w(uint8_t data) { logerror("TURBO PAL %02x\n",data); m_turbo_reg.pal = data; } -WRITE8_MEMBER( x1_state::x1turbo_txpal_w ) +void x1_state::x1turbo_txpal_w(offs_t offset, uint8_t data) { int r,g,b; @@ -1154,13 +1154,13 @@ WRITE8_MEMBER( x1_state::x1turbo_txpal_w ) } } -WRITE8_MEMBER( x1_state::x1turbo_txdisp_w ) +void x1_state::x1turbo_txdisp_w(uint8_t data) { logerror("TURBO TEXT DISPLAY %02x\n",data); m_turbo_reg.txt_disp = data; } -WRITE8_MEMBER( x1_state::x1turbo_gfxpal_w ) +void x1_state::x1turbo_gfxpal_w(uint8_t data) { logerror("TURBO GFX PAL %02x\n",data); m_turbo_reg.gfx_pal = data; @@ -1186,7 +1186,7 @@ uint16_t x1_state::jis_convert(int kanji_addr) return 0x0000; } -READ8_MEMBER( x1_state::x1_kanji_r ) +uint8_t x1_state::x1_kanji_r(offs_t offset) { uint8_t res; @@ -1198,7 +1198,7 @@ READ8_MEMBER( x1_state::x1_kanji_r ) return res; } -WRITE8_MEMBER( x1_state::x1_kanji_w ) +void x1_state::x1_kanji_w(offs_t offset, uint8_t data) { // if(offset < 2) @@ -1228,7 +1228,7 @@ WRITE8_MEMBER( x1_state::x1_kanji_w ) } } -READ8_MEMBER( x1_state::x1_emm_r ) +uint8_t x1_state::x1_emm_r(offs_t offset) { uint8_t res; @@ -1252,7 +1252,7 @@ READ8_MEMBER( x1_state::x1_emm_r ) return res; } -WRITE8_MEMBER( x1_state::x1_emm_w ) +void x1_state::x1_emm_w(offs_t offset, uint8_t data) { if(offset & ~3) { @@ -1275,13 +1275,13 @@ WRITE8_MEMBER( x1_state::x1_emm_w ) /* CZ-141SF, CZ-127MF, X1turboZII, X1turboZ3 boards */ -READ8_MEMBER( x1_state::x1turbo_bank_r ) +uint8_t x1_state::x1turbo_bank_r() { // logerror("BANK access read\n"); return m_ex_bank & 0x3f; } -WRITE8_MEMBER( x1_state::x1turbo_bank_w ) +void x1_state::x1turbo_bank_w(uint8_t data) { //uint8_t *RAM = memregion("x1_cpu")->base(); /* @@ -1295,7 +1295,7 @@ WRITE8_MEMBER( x1_state::x1turbo_bank_w ) } /* TODO: waitstate penalties */ -READ8_MEMBER( x1_state::x1_mem_r ) +uint8_t x1_state::x1_mem_r(offs_t offset) { if((offset & 0x8000) == 0 && (m_ram_bank == 0)) { @@ -1305,25 +1305,25 @@ READ8_MEMBER( x1_state::x1_mem_r ) return m_work_ram[offset]; //RAM } -WRITE8_MEMBER( x1_state::x1_mem_w ) +void x1_state::x1_mem_w(offs_t offset, uint8_t data) { m_work_ram[offset] = data; //RAM } -READ8_MEMBER( x1_state::x1turbo_mem_r ) +uint8_t x1_state::x1turbo_mem_r(offs_t offset) { if((m_ex_bank & 0x10) == 0) return m_work_ram[offset+((m_ex_bank & 0xf)*0x10000)]; - return x1_mem_r(space,offset); + return x1_mem_r(offset); } -WRITE8_MEMBER( x1_state::x1turbo_mem_w ) +void x1_state::x1turbo_mem_w(offs_t offset, uint8_t data) { if((m_ex_bank & 0x10) == 0) m_work_ram[offset+((m_ex_bank & 0xf)*0x10000)] = data; //RAM else - x1_mem_w(space,offset,data); + x1_mem_w(offset,data); } /************************************* @@ -1558,7 +1558,7 @@ void x1_state::io_write_byte(offs_t offset, uint8_t data) return prog_space.write_byte(offset, data); } -READ8_MEMBER(x1_state::ym_r) +uint8_t x1_state::ym_r(offs_t offset) { uint8_t result = m_ym->read(offset); if (!BIT(offset, 0)) @@ -1572,99 +1572,99 @@ READ8_MEMBER(x1_state::ym_r) * *************************************/ -READ8_MEMBER(x1_state::color_board_r) +uint8_t x1_state::color_board_r(address_space &space) { logerror("Color image board read\n"); return space.unmap(); } -WRITE8_MEMBER(x1_state::color_board_w) +void x1_state::color_board_w(uint8_t data) { logerror("Color image board write %02x\n", data); } -READ8_MEMBER(x1_state::color_board_2_r) +uint8_t x1_state::color_board_2_r(address_space &space) { logerror("Color image board 2 read\n"); return space.unmap(); } -WRITE8_MEMBER(x1_state::color_board_2_w) +void x1_state::color_board_2_w(uint8_t data) { logerror("Color image board 2 write %02x\n", data); } -READ8_MEMBER(x1_state::stereo_board_r) +uint8_t x1_state::stereo_board_r(address_space &space, offs_t offset) { logerror("Stereoscopic board read %04x\n", offset); return space.unmap(); } -WRITE8_MEMBER(x1_state::stereo_board_w) +void x1_state::stereo_board_w(offs_t offset, uint8_t data) { logerror("Stereoscopic board write %04x %02x\n", offset, data); } -READ8_MEMBER(x1_state::rs232_r) +uint8_t x1_state::rs232_r(offs_t offset) { logerror("RS-232C read %04x\n", offset); return 0; } -WRITE8_MEMBER(x1_state::rs232_w) +void x1_state::rs232_w(offs_t offset, uint8_t data) { logerror("RS-232C write %04x %02x\n", offset, data); } -READ8_MEMBER(x1_state::sasi_r) +uint8_t x1_state::sasi_r(address_space &space, offs_t offset) { //logerror("SASI HDD read %04x\n",offset); return space.unmap(); } -WRITE8_MEMBER(x1_state::sasi_w) +void x1_state::sasi_w(offs_t offset, uint8_t data) { logerror("SASI HDD write %04x %02x\n", offset, data); } -READ8_MEMBER(x1_state::fdd8_r) +uint8_t x1_state::fdd8_r(address_space &space, offs_t offset) { logerror("8-inch FD read %04x\n", offset); return space.unmap(); } -WRITE8_MEMBER(x1_state::fdd8_w) +void x1_state::fdd8_w(offs_t offset, uint8_t data) { logerror("8-inch FD write %04x %02x\n", offset, data); } -READ8_MEMBER(x1_state::ext_sio_ctc_r) +uint8_t x1_state::ext_sio_ctc_r(address_space &space, offs_t offset) { logerror("Extended SIO/CTC read %04x\n", offset); return space.unmap(); } -WRITE8_MEMBER(x1_state::ext_sio_ctc_w) +void x1_state::ext_sio_ctc_w(offs_t offset, uint8_t data) { logerror("Extended SIO/CTC write %04x %02x\n", offset, data); } -WRITE8_MEMBER(x1_state::z_img_cap_w) +void x1_state::z_img_cap_w(uint8_t data) { logerror("Z image capturing access %02x\n", data); } -WRITE8_MEMBER(x1_state::z_mosaic_w) +void x1_state::z_mosaic_w(uint8_t data) { logerror("Z mosaic effect access %02x\n", data); } -WRITE8_MEMBER(x1_state::z_chroma_key_w) +void x1_state::z_chroma_key_w(uint8_t data) { logerror("Z Chroma key access %02x\n", data); } -WRITE8_MEMBER(x1_state::z_extra_scroll_w) +void x1_state::z_extra_scroll_w(uint8_t data) { logerror("Z Extra scroll config access %02x\n", data); } @@ -2049,7 +2049,6 @@ IRQ_CALLBACK_MEMBER(x1_state::x1_irq_callback) TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_keyboard_callback) { - address_space &space = m_maincpu->space(AS_PROGRAM); uint32_t key1 = ioport("key1")->read(); uint32_t key2 = ioport("key2")->read(); uint32_t key3 = ioport("key3")->read(); @@ -2064,7 +2063,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_keyboard_callback) if((key1 != m_old_key1) || (key2 != m_old_key2) || (key3 != m_old_key3) || (key4 != m_old_key4) || (f_key != m_old_fkey)) { // generate keyboard IRQ - x1_sub_io_w(space,0,0xe6); + x1_sub_io_w(0xe6); m_irq_vector = m_key_irq_vector; m_key_irq_flag = 1; m_maincpu->set_input_line(0,ASSERT_LINE); diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp index 2004230c84f..a2eca47417d 100644 --- a/src/mame/drivers/x68k.cpp +++ b/src/mame/drivers/x68k.cpp @@ -243,7 +243,7 @@ int x68k_state::read_mouse() 0xe98005 - Z8530 command port A 0xe98007 - Z8530 data port A (RS232) */ -READ16_MEMBER(x68k_state::scc_r ) +uint16_t x68k_state::scc_r(offs_t offset) { offset %= 4; switch(offset) @@ -261,7 +261,7 @@ READ16_MEMBER(x68k_state::scc_r ) } } -WRITE16_MEMBER(x68k_state::scc_w ) +void x68k_state::scc_w(offs_t offset, uint16_t data) { offset %= 4; @@ -595,7 +595,7 @@ void x68k_state::ppi_port_c_w(uint8_t data) // NEC uPD72065 at 0xe94000 -WRITE16_MEMBER(x68k_state::fdc_w) +void x68k_state::fdc_w(offs_t offset, uint16_t data) { unsigned int drive, x; switch(offset) @@ -639,7 +639,7 @@ WRITE16_MEMBER(x68k_state::fdc_w) } } -READ16_MEMBER(x68k_state::fdc_r) +uint16_t x68k_state::fdc_r(offs_t offset) { unsigned int ret; int x; @@ -719,7 +719,7 @@ void x68k_state::ct_w(uint8_t data) - bits 7-2 = vector - bits 1,0 = device (00 = FDC, 01 = FDD, 10 = HDD, 11 = Printer) */ -WRITE16_MEMBER(x68k_state::ioc_w) +void x68k_state::ioc_w(offs_t offset, uint16_t data) { switch(offset) { @@ -751,7 +751,7 @@ WRITE16_MEMBER(x68k_state::ioc_w) } } -READ16_MEMBER(x68k_state::ioc_r) +uint16_t x68k_state::ioc_r(offs_t offset) { switch(offset) { @@ -783,7 +783,7 @@ READ16_MEMBER(x68k_state::ioc_r) Any other value, then SRAM is read only. Port 8 (0xe8e00f) - Power off control - write 0x00, 0x0f, 0x0f sequentially to switch power off. */ -WRITE16_MEMBER(x68k_state::sysport_w) +void x68k_state::sysport_w(offs_t offset, uint16_t data, uint16_t mem_mask) { switch(offset) { @@ -806,7 +806,7 @@ WRITE16_MEMBER(x68k_state::sysport_w) } } -READ16_MEMBER(x68k_state::sysport_r) +uint16_t x68k_state::sysport_r(offs_t offset) { int ret = 0; switch(offset) @@ -826,18 +826,18 @@ READ16_MEMBER(x68k_state::sysport_r) } } -WRITE16_MEMBER(x68k_state::ppi_w) +void x68k_state::ppi_w(offs_t offset, uint16_t data) { m_ppi->write(offset & 0x03,data); } -READ16_MEMBER(x68k_state::ppi_r) +uint16_t x68k_state::ppi_r(offs_t offset) { return m_ppi->read(offset & 0x03); } -WRITE16_MEMBER(x68k_state::sram_w) +void x68k_state::sram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if(m_sysport.sram_writeprotect == 0x31) { @@ -845,7 +845,7 @@ WRITE16_MEMBER(x68k_state::sram_w) } } -READ16_MEMBER(x68k_state::sram_r) +uint16_t x68k_state::sram_r(offs_t offset) { // HACKS! // if(offset == 0x5a/2) // 0x5a should be 0 if no SASI HDs are present. @@ -855,7 +855,7 @@ READ16_MEMBER(x68k_state::sram_r) return m_nvram[offset]; } -WRITE16_MEMBER(x68k_state::vid_w) +void x68k_state::vid_w(offs_t offset, uint16_t data, uint16_t mem_mask) { switch(offset) { @@ -892,7 +892,7 @@ WRITE16_MEMBER(x68k_state::vid_w) } } -READ16_MEMBER(x68k_state::vid_r) +uint16_t x68k_state::vid_r(offs_t offset) { switch(offset) { @@ -909,19 +909,19 @@ READ16_MEMBER(x68k_state::vid_r) return 0xff; } -READ16_MEMBER(x68k_state::areaset_r) +uint16_t x68k_state::areaset_r() { // register is write-only return 0xffff; } -WRITE16_MEMBER(x68k_state::areaset_w) +void x68k_state::areaset_w(uint16_t data) { // TODO LOGMASKED(LOG_SYS, "SYS: Supervisor area set: 0x%02x\n",data & 0xff); } -WRITE16_MEMBER(x68k_state::enh_areaset_w ) +void x68k_state::enh_areaset_w(offs_t offset, uint16_t data) { // TODO LOGMASKED(LOG_SYS, "SYS: Enhanced Supervisor area set (from %iMB): 0x%02x\n",(offset + 1) * 2,data & 0xff); @@ -946,7 +946,7 @@ void x68k_state::set_bus_error(uint32_t address, bool rw, uint16_t mem_mask) LOGMASKED(LOG_SYS, "%s: Bus error: Unused RAM access [%08x]\n", machine().describe_context(), address); } -READ16_MEMBER(x68k_state::rom0_r) +uint16_t x68k_state::rom0_r(offs_t offset, uint16_t mem_mask) { /* this location contains the address of some expansion device ROM, if no ROM exists, then access causes a bus error */ @@ -955,7 +955,7 @@ READ16_MEMBER(x68k_state::rom0_r) return 0xff; } -WRITE16_MEMBER(x68k_state::rom0_w) +void x68k_state::rom0_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* this location contains the address of some expansion device ROM, if no ROM exists, then access causes a bus error */ @@ -963,7 +963,7 @@ WRITE16_MEMBER(x68k_state::rom0_w) set_bus_error((offset << 1) + 0xbffffc, false, mem_mask); } -READ16_MEMBER(x68k_state::emptyram_r) +uint16_t x68k_state::emptyram_r(offs_t offset, uint16_t mem_mask) { /* this location is unused RAM, access here causes a bus error Often a method for detecting amount of installed RAM, is to read or write at 1MB intervals, until a bus error occurs */ @@ -972,7 +972,7 @@ READ16_MEMBER(x68k_state::emptyram_r) return 0xff; } -WRITE16_MEMBER(x68k_state::emptyram_w) +void x68k_state::emptyram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* this location is unused RAM, access here causes a bus error Often a method for detecting amount of installed RAM, is to read or write at 1MB intervals, until a bus error occurs */ @@ -980,7 +980,7 @@ WRITE16_MEMBER(x68k_state::emptyram_w) set_bus_error((offset << 1), 1, mem_mask); } -READ16_MEMBER(x68k_state::exp_r) +uint16_t x68k_state::exp_r(offs_t offset, uint16_t mem_mask) { /* These are expansion devices, if not present, they cause a bus error */ if((m_options->read() & 0x02) && !machine().side_effects_disabled()) @@ -988,7 +988,7 @@ READ16_MEMBER(x68k_state::exp_r) return 0xff; } -WRITE16_MEMBER(x68k_state::exp_w) +void x68k_state::exp_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* These are expansion devices, if not present, they cause a bus error */ if((m_options->read() & 0x02) && !machine().side_effects_disabled()) @@ -1021,7 +1021,7 @@ WRITE_LINE_MEMBER(x68k_state::fm_irq) } } -WRITE8_MEMBER(x68k_state::adpcm_w) +void x68k_state::adpcm_w(offs_t offset, uint8_t data) { switch(offset) { diff --git a/src/mame/drivers/xain.cpp b/src/mame/drivers/xain.cpp index 8e569c4801d..7d11474eeb3 100644 --- a/src/mame/drivers/xain.cpp +++ b/src/mame/drivers/xain.cpp @@ -205,18 +205,18 @@ TIMER_DEVICE_CALLBACK_MEMBER(xain_state::scanline) m_vblank = 0; } -WRITE8_MEMBER(xain_state::cpuA_bankswitch_w) +void xain_state::cpuA_bankswitch_w(uint8_t data) { m_pri = data & 0x7; m_rom_banks[0]->set_entry((data >> 3) & 1); } -WRITE8_MEMBER(xain_state::cpuB_bankswitch_w) +void xain_state::cpuB_bankswitch_w(uint8_t data) { m_rom_banks[1]->set_entry(data & 1); } -WRITE8_MEMBER(xain_state::main_irq_w) +void xain_state::main_irq_w(offs_t offset, uint8_t data) { switch (offset) { @@ -235,12 +235,12 @@ WRITE8_MEMBER(xain_state::main_irq_w) } } -WRITE8_MEMBER(xain_state::irqA_assert_w) +void xain_state::irqA_assert_w(uint8_t data) { m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } -WRITE8_MEMBER(xain_state::irqB_clear_w) +void xain_state::irqB_clear_w(uint8_t data) { m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); } @@ -265,7 +265,7 @@ CUSTOM_INPUT_MEMBER(xain_state::mcu_status_r) ((m_mcu && (CLEAR_LINE != m_mcu->host_semaphore_r())) ? 0x00 : 0x02); } -READ8_MEMBER(xain_state::mcu_comm_reset_r) +uint8_t xain_state::mcu_comm_reset_r() { if (m_mcu.found() && !machine().side_effects_disabled()) { @@ -282,19 +282,19 @@ READ8_MEMBER(xain_state::mcu_comm_reset_r) ***************************************************************************/ -template <unsigned N> WRITE8_MEMBER(xain_state::bgram_w) +template <unsigned N> void xain_state::bgram_w(offs_t offset, uint8_t data) { m_bgram[N][offset] = data; m_bg_tilemaps[N]->mark_tile_dirty(offset & 0x3ff); } -template <unsigned N> WRITE8_MEMBER(xain_state::scrollx_w) +template <unsigned N> void xain_state::scrollx_w(offs_t offset, uint8_t data) { m_scrollx[N][offset] = data; m_bg_tilemaps[N]->set_scrollx(0, m_scrollx[N][0] | (m_scrollx[N][1] << 8)); } -template <unsigned N> WRITE8_MEMBER(xain_state::scrolly_w) +template <unsigned N> void xain_state::scrolly_w(offs_t offset, uint8_t data) { m_scrolly[N][offset] = data; m_bg_tilemaps[N]->set_scrolly(0, m_scrolly[N][0] | (m_scrolly[N][1] << 8)); diff --git a/src/mame/drivers/xerox820.cpp b/src/mame/drivers/xerox820.cpp index f6dfe656f73..64bd8293172 100644 --- a/src/mame/drivers/xerox820.cpp +++ b/src/mame/drivers/xerox820.cpp @@ -103,23 +103,23 @@ void xerox820ii_state::bankswitch(int bank) } } -READ8_MEMBER( xerox820_state::fdc_r ) +uint8_t xerox820_state::fdc_r(offs_t offset) { return m_fdc->read(offset) ^ 0xff; } -WRITE8_MEMBER( xerox820_state::fdc_w ) +void xerox820_state::fdc_w(offs_t offset, uint8_t data) { m_fdc->write(offset, data ^ 0xff); } -WRITE8_MEMBER( xerox820_state::scroll_w ) +void xerox820_state::scroll_w(offs_t offset, uint8_t data) { m_scroll = (offset >> 8) & 0x1f; } #ifdef UNUSED_CODE -WRITE8_MEMBER( xerox820_state::x120_system_w ) +void xerox820_state::x120_system_w(uint8_t data) { /* @@ -138,27 +138,27 @@ WRITE8_MEMBER( xerox820_state::x120_system_w ) } #endif -WRITE8_MEMBER( xerox820ii_state::bell_w ) +void xerox820ii_state::bell_w(offs_t offset, uint8_t data) { m_speaker->level_w(offset); } -WRITE8_MEMBER( xerox820ii_state::slden_w ) +void xerox820ii_state::slden_w(offs_t offset, uint8_t data) { m_fdc->dden_w(offset); } -WRITE8_MEMBER( xerox820ii_state::chrom_w ) +void xerox820ii_state::chrom_w(offs_t offset, uint8_t data) { m_chrom = offset; } -WRITE8_MEMBER( xerox820ii_state::lowlite_w ) +void xerox820ii_state::lowlite_w(uint8_t data) { m_lowlite = data; } -WRITE8_MEMBER( xerox820ii_state::sync_w ) +void xerox820ii_state::sync_w(offs_t offset, uint8_t data) { if (offset) { diff --git a/src/mame/drivers/xexex.cpp b/src/mame/drivers/xexex.cpp index 8c72bbf94f3..2f9013f0c05 100644 --- a/src/mame/drivers/xexex.cpp +++ b/src/mame/drivers/xexex.cpp @@ -158,7 +158,7 @@ reference(xexexj) : https://www.youtube.com/watch?v=TegjBEvvGxI /* the interface with the 053247 is weird. The chip can address only 0x1000 bytes */ /* of RAM, but they put 0x8000 there. The CPU can access them all. Address lines */ /* A1, A5 and A6 don't go to the 053247. */ -READ16_MEMBER(xexex_state::k053247_scattered_word_r) +uint16_t xexex_state::k053247_scattered_word_r(offs_t offset, uint16_t mem_mask) { if (offset & 0x0031) return m_spriteram[offset]; @@ -169,7 +169,7 @@ READ16_MEMBER(xexex_state::k053247_scattered_word_r) } } -WRITE16_MEMBER(xexex_state::k053247_scattered_word_w) +void xexex_state::k053247_scattered_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset & 0x0031) COMBINE_DATA(m_spriteram + offset); @@ -216,17 +216,17 @@ void xexex_state::xexex_objdma( int limiter ) if (num_inactive) do { *dst = 0; dst += 8; } while (--num_inactive); } -READ16_MEMBER(xexex_state::spriteram_mirror_r) +uint16_t xexex_state::spriteram_mirror_r(offs_t offset) { return m_spriteram[offset]; } -WRITE16_MEMBER(xexex_state::spriteram_mirror_w) +void xexex_state::spriteram_mirror_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(m_spriteram + offset); } -READ16_MEMBER(xexex_state::xexex_waitskip_r) +uint16_t xexex_state::xexex_waitskip_r() { if (m_maincpu->pc() == 0x1158) { @@ -255,23 +255,23 @@ void xexex_state::parse_control2( ) m_cur_alpha = !(m_cur_control2 & 0x200); } -READ16_MEMBER(xexex_state::control2_r) +uint16_t xexex_state::control2_r() { return m_cur_control2; } -WRITE16_MEMBER(xexex_state::control2_w) +void xexex_state::control2_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_cur_control2); parse_control2(); } -WRITE16_MEMBER(xexex_state::sound_irq_w) +void xexex_state::sound_irq_w(uint16_t data) { m_audiocpu->set_input_line(0, HOLD_LINE); } -WRITE8_MEMBER(xexex_state::sound_bankswitch_w) +void xexex_state::sound_bankswitch_w(uint8_t data) { m_z80bank->set_entry(data & 0x07); } diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp index 4525e8e1896..ef456350671 100644 --- a/src/mame/drivers/xmen.cpp +++ b/src/mame/drivers/xmen.cpp @@ -35,7 +35,7 @@ likewise a 2 screen game ***************************************************************************/ -WRITE16_MEMBER(xmen_state::eeprom_w) +void xmen_state::eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) { logerror("%06x: write %04x to 108000\n", m_maincpu->pc(),data); if (ACCESSING_BITS_0_7) @@ -63,7 +63,7 @@ WRITE16_MEMBER(xmen_state::eeprom_w) } } -WRITE16_MEMBER(xmen_state::xmen_18fa00_w) +void xmen_state::xmen_18fa00_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if(ACCESSING_BITS_0_7) { @@ -72,7 +72,7 @@ WRITE16_MEMBER(xmen_state::xmen_18fa00_w) } } -WRITE8_MEMBER(xmen_state::sound_bankswitch_w) +void xmen_state::sound_bankswitch_w(uint8_t data) { m_z80bank->set_entry(data & 0x07); } diff --git a/src/mame/drivers/xor100.cpp b/src/mame/drivers/xor100.cpp index b18e9b1b73c..ce02a984266 100644 --- a/src/mame/drivers/xor100.cpp +++ b/src/mame/drivers/xor100.cpp @@ -117,7 +117,7 @@ void xor100_state::bankswitch() } } -WRITE8_MEMBER( xor100_state::mmu_w ) +void xor100_state::mmu_w(uint8_t data) { /* @@ -139,7 +139,7 @@ WRITE8_MEMBER( xor100_state::mmu_w ) bankswitch(); } -WRITE8_MEMBER( xor100_state::prom_toggle_w ) +void xor100_state::prom_toggle_w(uint8_t data) { switch (m_mode) { @@ -150,7 +150,7 @@ WRITE8_MEMBER( xor100_state::prom_toggle_w ) bankswitch(); } -READ8_MEMBER( xor100_state::prom_disable_r ) +uint8_t xor100_state::prom_disable_r() { m_mode = EPROM_F800; @@ -159,7 +159,7 @@ READ8_MEMBER( xor100_state::prom_disable_r ) return 0xff; } -READ8_MEMBER( xor100_state::fdc_wait_r ) +uint8_t xor100_state::fdc_wait_r() { /* @@ -187,7 +187,7 @@ READ8_MEMBER( xor100_state::fdc_wait_r ) return m_fdc_irq ? 0x7f : 0xff; } -WRITE8_MEMBER( xor100_state::fdc_dcont_w ) +void xor100_state::fdc_dcont_w(uint8_t data) { /* @@ -217,7 +217,7 @@ WRITE8_MEMBER( xor100_state::fdc_dcont_w ) if (floppy) floppy->mon_w(0); } -WRITE8_MEMBER( xor100_state::fdc_dsel_w ) +void xor100_state::fdc_dsel_w(uint8_t data) { /* diff --git a/src/mame/drivers/xxmissio.cpp b/src/mame/drivers/xxmissio.cpp index f55a213efa8..84efdb18c68 100644 --- a/src/mame/drivers/xxmissio.cpp +++ b/src/mame/drivers/xxmissio.cpp @@ -19,7 +19,7 @@ XX Mission (c) 1986 UPL #include "speaker.h" -WRITE8_MEMBER(xxmissio_state::bank_sel_w) +void xxmissio_state::bank_sel_w(uint8_t data) { membank("bank1")->set_entry(data & 7); } @@ -30,7 +30,7 @@ READ_LINE_MEMBER(xxmissio_state::status_r) return (m_status & Mask) ? 1 : 0; } -WRITE8_MEMBER(xxmissio_state::status_m_w) +void xxmissio_state::status_m_w(uint8_t data) { switch (data) { @@ -49,7 +49,7 @@ WRITE8_MEMBER(xxmissio_state::status_m_w) } } -WRITE8_MEMBER(xxmissio_state::status_s_w) +void xxmissio_state::status_s_w(uint8_t data) { switch (data) { |