From 5af0650c555edf33d13183f5953096d0512eaaf5 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 24 Jul 2023 16:39:58 +0200 Subject: mos6530n: add pa/pb_w byte handler, add irq callback to 6530 --- src/devices/bus/a800/atari1050.cpp | 12 ++++----- src/devices/bus/a800/atari810.cpp | 10 ++++---- src/devices/bus/ieee488/c2040.cpp | 8 +++--- src/devices/bus/ieee488/c8050.cpp | 6 ++--- src/devices/bus/ieee488/c8280.cpp | 4 +-- src/devices/bus/ieee488/d9060.cpp | 4 +-- src/devices/machine/mos6530n.cpp | 19 +++++++------- src/devices/machine/mos6530n.h | 12 ++++----- src/mame/alliedleisure/killcom.cpp | 51 ++++++++++--------------------------- src/mame/alliedleisure/killcom.h | 18 ++++++------- src/mame/alliedleisure/trvquest.cpp | 2 +- src/mame/atari/firefox.cpp | 4 +-- src/mame/atari/starwars.cpp | 4 +-- src/mame/commodore/chessmate.cpp | 5 +--- src/mame/pinball/allied.cpp | 6 ++--- src/mame/shared/exidysound.cpp | 2 +- 16 files changed, 69 insertions(+), 98 deletions(-) diff --git a/src/devices/bus/a800/atari1050.cpp b/src/devices/bus/a800/atari1050.cpp index 5ea47f1ec2f..10a482e84f7 100644 --- a/src/devices/bus/a800/atari1050.cpp +++ b/src/devices/bus/a800/atari1050.cpp @@ -54,17 +54,17 @@ void atari1050_device::mem_map(address_map &map) void atari1050_device::data_out_w(int state) { - m_pia->pb_w<6>(state); + m_pia->pb_bit_w<6>(state); } void atari1050_device::command_w(int state) { - m_pia->pb_w<7>(state); + m_pia->pb_bit_w<7>(state); } void atari1050_device::ready_w(int state) { - m_pia->pb_w<1>(state); + m_pia->pb_bit_w<1>(state); } @@ -93,12 +93,12 @@ void atari1050_device::device_add_mconfig(machine_config &config) m_pia->pa_wr_callback().set(m_fdc, FUNC(wd2793_device::dden_w)).bit(3); //m_pia->pa_wr_callback().append(atari1050_device::motor_control_w)).bit(1); m_pia->pb_wr_callback().set(FUNC(atari1050_device::step_w)); - m_pia->irq_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_w<6>)).invert(); + m_pia->irq_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_bit_w<6>)).invert(); //m_pia->irq_wr_callback().append(m_fdc, FUNC(wd2793_device::ip_w)); WD2793(config, m_fdc, 4_MHz_XTAL / 4); - m_fdc->drq_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_w<7>)); - m_fdc->enp_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_w<4>)); + m_fdc->drq_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_bit_w<7>)); + m_fdc->enp_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_bit_w<4>)); } diff --git a/src/devices/bus/a800/atari810.cpp b/src/devices/bus/a800/atari810.cpp index bacb8e90bc3..bc130bfcb38 100644 --- a/src/devices/bus/a800/atari810.cpp +++ b/src/devices/bus/a800/atari810.cpp @@ -52,17 +52,17 @@ void atari810_device::mem_map(address_map &map) void atari810_device::data_out_w(int state) { - m_pia->pb_w<7>(state); + m_pia->pb_bit_w<7>(state); } void atari810_device::command_w(int state) { - m_pia->pb_w<6>(state); + m_pia->pb_bit_w<6>(state); } void atari810_device::ready_w(int state) { - m_pia->pb_w<1>(state); + m_pia->pb_bit_w<1>(state); } @@ -92,8 +92,8 @@ void atari810_device::device_add_mconfig(machine_config &config) //m_pia->irq_wr_callback().set(m_fdc, FUNC(fd1771_device::ip_w)); FD1771(config, m_fdc, 1_MHz_XTAL); - m_fdc->drq_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_w<7>)); - m_fdc->intrq_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_w<6>)); + m_fdc->drq_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_bit_w<7>)); + m_fdc->intrq_wr_callback().set(m_pia, FUNC(mos6532_new_device::pa_bit_w<6>)); } diff --git a/src/devices/bus/ieee488/c2040.cpp b/src/devices/bus/ieee488/c2040.cpp index faaeae24fa2..cafc1e3d44a 100644 --- a/src/devices/bus/ieee488/c2040.cpp +++ b/src/devices/bus/ieee488/c2040.cpp @@ -485,11 +485,11 @@ void c2040_device::add_common_devices(machine_config &config) m_miot->pb_wr_callback<0>().set(m_fdc, FUNC(c2040_fdc_device::drv_sel_w)); m_miot->pb_wr_callback<1>().set(m_fdc, FUNC(c2040_fdc_device::ds0_w)); m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c2040_fdc_device::ds1_w)); - m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE).invert(); m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c2040_fdc_device::wps_r)); + m_miot->irq_wr_callback().set_inputline(m_fdccpu, M6502_IRQ_LINE); C2040_FDC(config, m_fdc, XTAL(16'000'000)); - m_fdc->sync_wr_callback().set(m_miot, FUNC(mos6530_new_device::pb_w<6>)); + m_fdc->sync_wr_callback().set(m_miot, FUNC(mos6530_new_device::pb_bit_w<6>)); m_fdc->ready_wr_callback().set(m_via, FUNC(via6522_device::write_ca1)); m_fdc->error_wr_callback().set(m_via, FUNC(via6522_device::write_cb1)); } @@ -658,7 +658,7 @@ void c2040_device::device_reset() m_miot->reset(); m_via->reset(); - m_riot1->pa_w<7>(0); + m_riot1->pa_bit_w<7>(0); // turn off spindle motors m_fdc->mtr0_w(1); @@ -674,7 +674,7 @@ void c2040_device::ieee488_atn(int state) { update_ieee_signals(); - m_riot1->pa_w<7>(!state); + m_riot1->pa_bit_w<7>(!state); } diff --git a/src/devices/bus/ieee488/c8050.cpp b/src/devices/bus/ieee488/c8050.cpp index 95e069126d4..6fe75a0129f 100644 --- a/src/devices/bus/ieee488/c8050.cpp +++ b/src/devices/bus/ieee488/c8050.cpp @@ -564,7 +564,7 @@ void c8050_device::add_common_devices(machine_config &config) m_miot->pb_wr_callback<2>().set(m_fdc, FUNC(c8050_fdc_device::ds1_w)); m_miot->pb_rd_callback<3>().set(m_fdc, FUNC(c8050_fdc_device::wps_r)); m_miot->pb_rd_callback<6>().set_constant(1); // SINGLE SIDED - m_miot->pb_wr_callback<7>().set_inputline(m_fdccpu, M6502_IRQ_LINE).invert(); + m_miot->irq_wr_callback().set_inputline(m_fdccpu, M6502_IRQ_LINE); C8050_FDC(config, m_fdc, XTAL(12'000'000)/2); m_fdc->sync_wr_callback().set(m_via, FUNC(via6522_device::write_pb7)); @@ -774,7 +774,7 @@ void c8050_device::device_reset() m_miot->reset(); m_via->reset(); - m_riot1->pa_w<7>(1); + m_riot1->pa_bit_w<7>(1); // turn off spindle motors m_fdc->mtr0_w(1); @@ -790,7 +790,7 @@ void c8050_device::ieee488_atn(int state) { update_ieee_signals(); - m_riot1->pa_w<7>(state); + m_riot1->pa_bit_w<7>(state); } diff --git a/src/devices/bus/ieee488/c8280.cpp b/src/devices/bus/ieee488/c8280.cpp index b5117025f2b..83f33f148c6 100644 --- a/src/devices/bus/ieee488/c8280.cpp +++ b/src/devices/bus/ieee488/c8280.cpp @@ -434,7 +434,7 @@ void c8280_device::device_reset() m_riot1->reset(); m_fdc->reset(); - m_riot1->pa_w<7>(1); + m_riot1->pa_bit_w<7>(1); m_fk5 = 0; m_floppy = nullptr; @@ -451,7 +451,7 @@ void c8280_device::ieee488_atn(int state) { update_ieee_signals(); - m_riot1->pa_w<7>(state); + m_riot1->pa_bit_w<7>(state); } diff --git a/src/devices/bus/ieee488/d9060.cpp b/src/devices/bus/ieee488/d9060.cpp index 0302571c146..c520ee71182 100644 --- a/src/devices/bus/ieee488/d9060.cpp +++ b/src/devices/bus/ieee488/d9060.cpp @@ -542,7 +542,7 @@ void d9060_device_base::device_reset() m_hdccpu->set_input_line(M6502_SET_OVERFLOW, ASSERT_LINE); - m_riot1->pa_w<7>(1); + m_riot1->pa_bit_w<7>(1); } @@ -554,7 +554,7 @@ void d9060_device_base::ieee488_atn(int state) { update_ieee_signals(); - m_riot1->pa_w<7>(state); + m_riot1->pa_bit_w<7>(state); } diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp index 3ede6240b0d..57222760bf8 100644 --- a/src/devices/machine/mos6530n.cpp +++ b/src/devices/machine/mos6530n.cpp @@ -243,6 +243,8 @@ void mos6530_new_device::update_pb() } else m_out8_pb_cb(data); + + m_irq_cb(BIT(data, 7) ? CLEAR_LINE: ASSERT_LINE); } @@ -364,13 +366,11 @@ void mos6530_device_base::edge_detect() // pa_w - //------------------------------------------------- -void mos6530_device_base::pa_w(int bit, int state) +void mos6530_device_base::pa_w(offs_t offset, uint8_t data, uint8_t mem_mask) { - LOG("%s %s %s Port A Data Bit %u State %u\n", machine().time().as_string(), machine().describe_context(), name(), bit, state); - - m_pa_in &= ~(1 << bit); - m_pa_in |= (state << bit); + LOG("%s %s %s Port A Data Write %02X Mask %02X\n", machine().time().as_string(), machine().describe_context(), name(), data, mem_mask); + m_pa_in = (m_pa_in & ~mem_mask) | (data & mem_mask); edge_detect(); } @@ -379,12 +379,11 @@ void mos6530_device_base::pa_w(int bit, int state) // pb_w - //------------------------------------------------- -void mos6530_device_base::pb_w(int bit, int state) +void mos6530_device_base::pb_w(offs_t offset, uint8_t data, uint8_t mem_mask) { - LOG("%s %s %s Port B Data Bit %u State %u\n", machine().time().as_string(), machine().describe_context(), name(), bit, state); + LOG("%s %s %s Port B Data Write %02X Mask %02X\n", machine().time().as_string(), machine().describe_context(), name(), data, mem_mask); - m_pb_in &= ~(1 << bit); - m_pb_in |= (state << bit); + m_pb_in = (m_pb_in & ~mem_mask) | (data & mem_mask); } @@ -515,7 +514,7 @@ uint8_t mos6530_device_base::timer_r(bool ie) if (!machine().side_effects_disabled()) { // IRQ is not cleared when reading at the same time IRQ is raised - if (m_timeout <= machine().time() - attotime::from_hz(clock())) + if (m_timeout < machine().time() - attotime::from_hz(2 * clock())) { m_irq_timer = false; diff --git a/src/devices/machine/mos6530n.h b/src/devices/machine/mos6530n.h index f7030df218f..212a90aeafa 100644 --- a/src/devices/machine/mos6530n.h +++ b/src/devices/machine/mos6530n.h @@ -77,12 +77,14 @@ public: template auto pb_rd_callback() { return m_in_pb_cb[N].bind(); } template auto pb_wr_callback() { return m_out_pb_cb[N].bind(); } - // 6532 _IRQ pin (on 6530 it is PB7) + // _IRQ pin (on 6530 it's shared with PB7) auto irq_wr_callback() { return m_irq_cb.bind(); } - // write to port inputs - template void pa_w(int state) { pa_w(N, state); } - template void pb_w(int state) { pb_w(N, state); } + // write to port inputs (PA7 can trigger an IRQ, the others are normal inputs) + void pa_w(offs_t offset, uint8_t data, uint8_t mem_mask = 0xff); + void pb_w(offs_t offset, uint8_t data, uint8_t mem_mask = 0xff); + template void pa_bit_w(int state) { pa_w(0, (state & 1) << N, 1 << N); } + template void pb_bit_w(int state) { pb_w(0, (state & 1) << N, 1 << N); } protected: // construction/destruction @@ -113,8 +115,6 @@ protected: TIMER_CALLBACK_MEMBER(timer_end); void edge_detect(); - void pa_w(int bit, int state); - void pb_w(int bit, int state); void timer_w(offs_t offset, uint8_t data, bool ie); uint8_t timer_r(bool ie); diff --git a/src/mame/alliedleisure/killcom.cpp b/src/mame/alliedleisure/killcom.cpp index c7c1345839e..e6472ceb4c2 100644 --- a/src/mame/alliedleisure/killcom.cpp +++ b/src/mame/alliedleisure/killcom.cpp @@ -88,6 +88,7 @@ BTANB: #include "killcom.h" #include "cpu/m6502/m6502.h" +#include "machine/input_merger.h" #include "speaker.h" @@ -103,7 +104,6 @@ void killcom_state::machine_start() // register for save states save_item(NAME(m_current_port)); save_item(NAME(m_audio_reset)); - save_item(NAME(m_audio_trigger)); } void killcom_state::machine_reset() @@ -298,48 +298,28 @@ void killcom_state::coin_w(int state) * *************************************/ -void killcom_state::audio_reset_sync_w(int param) +void killcom_state::audio_cmd_w_sync(int param) { - if (param && !m_audio_reset) - { - m_ay->reset(); - m_riot->reset(); - } - - m_audio_reset = param; - m_audiocpu->set_input_line(INPUT_LINE_RESET, param ? CLEAR_LINE : ASSERT_LINE); + m_riot->pa_w(0, param, 0x7f); } -void killcom_state::audio_reset_w(int state) +void killcom_state::audio_trigger_w_sync(int param) { - machine().scheduler().synchronize(timer_expired_delegate(FUNC(killcom_state::audio_reset_sync_w), this), state); + m_riot->pa_bit_w<7>(param); } -void killcom_state::audio_trigger_sync_w(int param) +void killcom_state::audio_reset_w_sync(int param) { - m_audio_trigger = param; - m_riot->pa_w<7>(param); -} - - -void killcom_state::audio_trigger_w(int state) -{ - machine().scheduler().synchronize(timer_expired_delegate(FUNC(killcom_state::audio_trigger_sync_w), this), state); -} - - - -/************************************* - * - * RIOT - audio - * - *************************************/ + if (param && !m_audio_reset) + { + m_ay->reset(); + m_riot->reset(); + } -uint8_t killcom_state::soundlatch_r() -{ - return m_audio_trigger << 7 | (m_soundlatch->read() & 0x7f); + m_audio_reset = param; + m_audiocpu->set_input_line(INPUT_LINE_RESET, param ? CLEAR_LINE : ASSERT_LINE); } @@ -1130,10 +1110,7 @@ void killcom_state::killcom(machine_config &config) M6502(config, m_audiocpu, 3.579545_MHz_XTAL / 4); m_audiocpu->set_addrmap(AS_PROGRAM, &killcom_state::killcom_audio_map); - GENERIC_LATCH_8(config, m_soundlatch); - MOS6532_NEW(config, m_riot, 3.579545_MHz_XTAL / 4); - m_riot->pa_rd_callback().set(FUNC(killcom_state::soundlatch_r)); m_riot->pb_wr_callback().set(m_via[2], FUNC(via6522_device::write_pb)); m_riot->irq_wr_callback().set_inputline(m_audiocpu, 0); @@ -1152,7 +1129,7 @@ void killcom_state::killcom(machine_config &config) m_via[1]->irq_handler().set("main_irqs", FUNC(input_merger_device::in_w<1>)); MOS6522(config, m_via[2], 3.579545_MHz_XTAL / 4); - m_via[2]->writepa_handler().set(m_soundlatch, FUNC(generic_latch_8_device::write)); + m_via[2]->writepa_handler().set(FUNC(killcom_state::audio_cmd_w)); m_via[2]->ca2_handler().set(FUNC(killcom_state::audio_trigger_w)); m_via[2]->cb2_handler().set(FUNC(killcom_state::audio_reset_w)); m_via[2]->irq_handler().set("main_irqs", FUNC(input_merger_device::in_w<2>)); diff --git a/src/mame/alliedleisure/killcom.h b/src/mame/alliedleisure/killcom.h index 81f4343fdac..765ce999101 100644 --- a/src/mame/alliedleisure/killcom.h +++ b/src/mame/alliedleisure/killcom.h @@ -7,8 +7,6 @@ ***************************************************************************/ #include "machine/6522via.h" -#include "machine/gen_latch.h" -#include "machine/input_merger.h" #include "machine/mos6530n.h" #include "sound/ay8910.h" @@ -28,8 +26,7 @@ public: m_dsw(*this, "DSW%u", 0U), m_audiocpu(*this, "audiocpu"), m_riot(*this, "riot"), - m_ay(*this, "ay"), - m_soundlatch(*this, "soundlatch") + m_ay(*this, "ay") { } void killcom(machine_config &config); @@ -75,15 +72,16 @@ private: optional_device m_audiocpu; optional_device m_riot; optional_device m_ay; - optional_device m_soundlatch; void io_select_w(uint8_t data); uint8_t io_port_r(); - void audio_reset_w(int state); - void audio_reset_sync_w(int param); - void audio_trigger_w(int state); - void audio_trigger_sync_w(int param); - uint8_t soundlatch_r(); + + void audio_cmd_w_sync(int param); + void audio_trigger_w_sync(int param); + void audio_reset_w_sync(int param); + void audio_cmd_w(uint8_t data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(killcom_state::audio_cmd_w_sync), this), data); } + void audio_trigger_w(int state) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(killcom_state::audio_trigger_w_sync), this), state); } + void audio_reset_w(int state) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(killcom_state::audio_reset_w_sync), this), state); } TIMER_CALLBACK_MEMBER(hblank_callback); uint8_t leprechn_videoram_r(); diff --git a/src/mame/alliedleisure/trvquest.cpp b/src/mame/alliedleisure/trvquest.cpp index 13296be198d..9ed8363d442 100644 --- a/src/mame/alliedleisure/trvquest.cpp +++ b/src/mame/alliedleisure/trvquest.cpp @@ -129,7 +129,7 @@ static INPUT_PORTS_START( trvquest ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Reset") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) diff --git a/src/mame/atari/firefox.cpp b/src/mame/atari/firefox.cpp index e89482a1883..e5d099ae42a 100644 --- a/src/mame/atari/firefox.cpp +++ b/src/mame/atari/firefox.cpp @@ -662,12 +662,12 @@ void firefox_state::firefox(machine_config &config) SPEAKER(config, "rspeaker").front_right(); GENERIC_LATCH_8(config, soundlatch[0]); - soundlatch[0]->data_pending_callback().set(m_riot, FUNC(mos6532_new_device::pa_w<7>)); // MAINFLAG + soundlatch[0]->data_pending_callback().set(m_riot, FUNC(mos6532_new_device::pa_bit_w<7>)); // MAINFLAG soundlatch[0]->data_pending_callback().append_inputline(m_audiocpu, INPUT_LINE_NMI); soundlatch[0]->data_pending_callback().append([this](int state) { if (state) machine().scheduler().perfect_quantum(attotime::from_usec(100)); }); GENERIC_LATCH_8(config, soundlatch[1]); - soundlatch[1]->data_pending_callback().set(m_riot, FUNC(mos6532_new_device::pa_w<6>)); // SOUNDFLAG + soundlatch[1]->data_pending_callback().set(m_riot, FUNC(mos6532_new_device::pa_bit_w<6>)); // SOUNDFLAG for (int i = 0; i < 4; i++) { diff --git a/src/mame/atari/starwars.cpp b/src/mame/atari/starwars.cpp index 4a2f2bc5661..4924cdebaea 100644 --- a/src/mame/atari/starwars.cpp +++ b/src/mame/atari/starwars.cpp @@ -333,11 +333,11 @@ void starwars_state::starwars(machine_config &config) TMS5220(config, m_tms, MASTER_CLOCK/2/9).add_route(ALL_OUTPUTS, "mono", 0.50); GENERIC_LATCH_8(config, m_soundlatch); - m_soundlatch->data_pending_callback().set(m_riot, FUNC(mos6532_new_device::pa_w<7>)); + m_soundlatch->data_pending_callback().set(m_riot, FUNC(mos6532_new_device::pa_bit_w<7>)); m_soundlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().perfect_quantum(attotime::from_usec(100)); }); GENERIC_LATCH_8(config, m_mainlatch); - m_mainlatch->data_pending_callback().set(m_riot, FUNC(mos6532_new_device::pa_w<6>)); + m_mainlatch->data_pending_callback().set(m_riot, FUNC(mos6532_new_device::pa_bit_w<6>)); m_mainlatch->data_pending_callback().append([this](int state) { if (state) machine().scheduler().perfect_quantum(attotime::from_usec(100)); }); } diff --git a/src/mame/commodore/chessmate.cpp b/src/mame/commodore/chessmate.cpp index 2d7b4e53a16..4f2b00e6d47 100644 --- a/src/mame/commodore/chessmate.cpp +++ b/src/mame/commodore/chessmate.cpp @@ -143,10 +143,6 @@ void chmate_state::control_w(u8 data) // d3-d5: leds (direct) m_led_data = data >> 3 & 7; update_display(); - - // d6: chipselect used? - // d7: IRQ out - m_maincpu->set_input_line(M6502_IRQ_LINE, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); } void chmate_state::digit_w(u8 data) @@ -272,6 +268,7 @@ void chmate_state::chmate(machine_config &config) m_miot->pa_rd_callback().set(FUNC(chmate_state::input_r)); m_miot->pa_wr_callback().set(FUNC(chmate_state::digit_w)); m_miot->pb_wr_callback().set(FUNC(chmate_state::control_w)); + m_miot->irq_wr_callback().set_inputline(m_maincpu, 0); // video hardware PWM_DISPLAY(config, m_display).set_size(4+1, 8); diff --git a/src/mame/pinball/allied.cpp b/src/mame/pinball/allied.cpp index c01da039cda..35333ba828b 100644 --- a/src/mame/pinball/allied.cpp +++ b/src/mame/pinball/allied.cpp @@ -727,21 +727,21 @@ void allied_state::allied(machine_config &config) m_ic8->irqb_handler().set("main_irqs", FUNC(input_merger_device::in_w<9>)); MOS6530_NEW(config, m_ic3, 3.579545_MHz_XTAL/4); // unknown where the ram and i/o is located - m_ic3->pb_wr_callback().set("main_irqs", FUNC(input_merger_device::in_w<10>)).bit(7).invert(); + m_ic3->irq_wr_callback().set("main_irqs", FUNC(input_merger_device::in_w<10>)); MOS6530_NEW(config, m_ic5, 3.579545_MHz_XTAL/4); m_ic5->pa_rd_callback().set(FUNC(allied_state::ic5_a_r)); //m_ic5->pa_wr_callback().set(FUNC(allied_state::ic5_a_w)); //m_ic5->pb_rd_callback().set(FUNC(allied_state::ic5_b_r)); m_ic5->pb_wr_callback().set(FUNC(allied_state::ic5_b_w)); - m_ic5->pb_wr_callback().append("main_irqs", FUNC(input_merger_device::in_w<11>)).bit(7).invert(); + m_ic5->irq_wr_callback().set("main_irqs", FUNC(input_merger_device::in_w<11>)); MOS6530_NEW(config, m_ic6, 3.579545_MHz_XTAL/4); m_ic6->pa_rd_callback().set(FUNC(allied_state::ic6_a_r)); //m_ic6->pa_wr_callback().set(FUNC(allied_state::ic6_a_w)); m_ic6->pb_rd_callback().set(FUNC(allied_state::ic6_b_r)); m_ic6->pb_wr_callback().set(FUNC(allied_state::ic6_b_w)); - m_ic6->pb_wr_callback().append("main_irqs", FUNC(input_merger_device::in_w<12>)).bit(7).invert(); + m_ic6->irq_wr_callback().set("main_irqs", FUNC(input_merger_device::in_w<12>)); TIMER(config, "timer_a").configure_periodic(FUNC(allied_state::timer_a), attotime::from_hz(50)); } diff --git a/src/mame/shared/exidysound.cpp b/src/mame/shared/exidysound.cpp index e1bf6df9e7a..521ea98afed 100644 --- a/src/mame/shared/exidysound.cpp +++ b/src/mame/shared/exidysound.cpp @@ -717,7 +717,7 @@ void mtrap_sound_device::voiceio_w(offs_t offset, uint8_t data) m_cvsd->digit_w(data & 1); if (!(offset & 0x20)) - m_riot->pb_w<0>(data & 1); + m_riot->pb_bit_w<0>(data & 1); } -- cgit v1.2.3