本文整理汇总了C++中required_device::ca2_handler方法的典型用法代码示例。如果您正苦于以下问题:C++ required_device::ca2_handler方法的具体用法?C++ required_device::ca2_handler怎么用?C++ required_device::ca2_handler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类required_device
的用法示例。
在下文中一共展示了required_device::ca2_handler方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void s4_state::s4(machine_config &config)
{
/* basic machine hardware */
M6800(config, m_maincpu, 3580000);
m_maincpu->set_addrmap(AS_PROGRAM, &s4_state::s4_main_map);
TIMER(config, "irq").configure_periodic(FUNC(s4_state::irq), attotime::from_hz(250));
MCFG_MACHINE_RESET_OVERRIDE(s4_state, s4)
/* Video */
config.set_default_layout(layout_s4);
/* Sound */
genpin_audio(config);
/* Devices */
PIA6821(config, m_pia22, 0);
m_pia22->writepa_handler().set(FUNC(s4_state::sol0_w));
m_pia22->writepb_handler().set(FUNC(s4_state::sol1_w));
m_pia22->ca2_handler().set(FUNC(s4_state::pia22_ca2_w));
m_pia22->cb2_handler().set(FUNC(s4_state::pia22_cb2_w));
m_pia22->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
m_pia22->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
PIA6821(config, m_pia24, 0);
m_pia24->writepa_handler().set(FUNC(s4_state::lamp0_w));
m_pia24->writepb_handler().set(FUNC(s4_state::lamp1_w));
m_pia24->ca2_handler().set(FUNC(s4_state::pia24_ca2_w));
m_pia24->cb2_handler().set(FUNC(s4_state::pia24_cb2_w));
m_pia24->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
m_pia24->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
PIA6821(config, m_pia28, 0);
m_pia28->readpa_handler().set(FUNC(s4_state::dips_r));
m_pia28->readca1_handler().set(FUNC(s4_state::pia28_ca1_r));
m_pia28->readcb1_handler().set(FUNC(s4_state::pia28_cb1_r));
m_pia28->writepa_handler().set(FUNC(s4_state::dig0_w));
m_pia28->writepb_handler().set(FUNC(s4_state::dig1_w));
m_pia28->ca2_handler().set(FUNC(s4_state::pia28_ca2_w));
m_pia28->cb2_handler().set(FUNC(s4_state::pia28_cb2_w));
m_pia28->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
m_pia28->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
PIA6821(config, m_pia30, 0);
m_pia30->readpa_handler().set(FUNC(s4_state::switch_r));
m_pia30->writepb_handler().set(FUNC(s4_state::switch_w));
m_pia30->ca2_handler().set(FUNC(s4_state::pia30_ca2_w));
m_pia30->cb2_handler().set(FUNC(s4_state::pia30_cb2_w));
m_pia30->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
m_pia30->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
}
示例2: FUNC
void mekd2_state::mekd2(machine_config &config)
{
/* basic machine hardware */
M6800(config, m_maincpu, XTAL_MEKD2 / 2); /* 614.4 kHz */
m_maincpu->set_addrmap(AS_PROGRAM, &mekd2_state::mekd2_mem);
config.set_default_layout(layout_mekd2);
/* sound hardware */
SPEAKER(config, "mono").front_center();
WAVE(config, "wave", "cassette").add_route(ALL_OUTPUTS, "mono", 0.25);
CASSETTE(config, m_cass);
/* Devices */
PIA6821(config, m_pia_s, 0);
m_pia_s->readpa_handler().set(FUNC(mekd2_state::mekd2_key_r));
m_pia_s->readcb1_handler().set(FUNC(mekd2_state::mekd2_key40_r));
m_pia_s->writepa_handler().set(FUNC(mekd2_state::mekd2_segment_w));
m_pia_s->writepb_handler().set(FUNC(mekd2_state::mekd2_digit_w));
m_pia_s->ca2_handler().set(FUNC(mekd2_state::mekd2_nmi_w));
m_pia_s->irqa_handler().set_inputline("maincpu", INPUT_LINE_NMI);
m_pia_s->irqb_handler().set_inputline("maincpu", INPUT_LINE_NMI);
PIA6821(config, m_pia_u, 0);
m_pia_u->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
m_pia_u->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
ACIA6850(config, m_acia, 0);
m_acia->txd_handler().set(FUNC(mekd2_state::cass_w));
clock_device &acia_tx_clock(CLOCK(config, "acia_tx_clock", XTAL_MEKD2 / 256)); // 4800Hz
acia_tx_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_txc));
clock_device &acia_rx_clock(CLOCK(config, "acia_rx_clock", 300)); // toggled by cassette circuit
acia_rx_clock.signal_handler().set(m_acia, FUNC(acia6850_device::write_rxc));
TIMER(config, "mekd2_c").configure_periodic(FUNC(mekd2_state::mekd2_c), attotime::from_hz(4800));
TIMER(config, "mekd2_p").configure_periodic(FUNC(mekd2_state::mekd2_p), attotime::from_hz(40000));
QUICKLOAD(config, "quickload").set_handler(snapquick_load_delegate(&QUICKLOAD_LOAD_NAME(mekd2_state, mekd2_quik), this), "d2", attotime::from_seconds(1));
}
示例3: lwriter
void lwriter_state::lwriter(machine_config &config)
{
M68000(config, m_maincpu, CPU_CLK);
m_maincpu->set_addrmap(AS_PROGRAM, &lwriter_state::maincpu_map);
SCC8530N(config, m_scc, CPU_CLK);
m_scc->configure_channels(RXC_CLK, 0, RXC_CLK, 0);
/* Port A */
m_scc->out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd));
m_scc->out_dtra_callback().set("rs232a", FUNC(rs232_port_device::write_dtr));
m_scc->out_rtsa_callback().set("rs232a", FUNC(rs232_port_device::write_rts));
/* Port B */
m_scc->out_txdb_callback().set("rs232b", FUNC(rs232_port_device::write_txd));
m_scc->out_dtrb_callback().set("rs232b", FUNC(rs232_port_device::write_dtr));
m_scc->out_rtsb_callback().set("rs232b", FUNC(rs232_port_device::write_rts));
/* Interrupt */
m_scc->out_int_callback().set("via", FUNC(via6522_device::write_ca1));
//m_scc->out_int_callback().set(FUNC(lwriter_state::scc_int));
rs232_port_device &rs232a(RS232_PORT(config, "rs232a", default_rs232_devices, "terminal"));
rs232a.rxd_handler().set("scc", FUNC(scc8530_device::rxa_w));
rs232a.cts_handler().set("scc", FUNC(scc8530_device::ctsa_w));
rs232_port_device &rs232b(RS232_PORT(config, "rs232b", default_rs232_devices, "terminal"));
rs232b.rxd_handler().set("scc", FUNC(scc8530_device::rxb_w));
rs232b.cts_handler().set("scc", FUNC(scc8530_device::ctsb_w));
#if TPI
TPI6525(config, "tpi", 0);
#else
VIA6522(config, m_via, CPU_CLK/10); // 68000 E clock presumed
m_via->readpa_handler().set(FUNC(lwriter_state::via_pa_r));
m_via->readpb_handler().set(FUNC(lwriter_state::via_pb_r));
m_via->writepa_handler().set(FUNC(lwriter_state::via_pa_w));
m_via->writepb_handler().set(FUNC(lwriter_state::via_pb_w));
m_via->cb1_handler().set(FUNC(lwriter_state::via_cb1_w));
m_via->ca2_handler().set(FUNC(lwriter_state::via_ca2_w));
m_via->cb2_handler().set(FUNC(lwriter_state::via_cb2_w));
m_via->irq_handler().set(FUNC(lwriter_state::via_int_w));
#endif
}
示例4: FUNC
void s6_state::s6(machine_config &config)
{
/* basic machine hardware */
M6808(config, m_maincpu, 3580000); // 6802 or 6808 could be used here
m_maincpu->set_addrmap(AS_PROGRAM, &s6_state::s6_main_map);
MCFG_MACHINE_RESET_OVERRIDE(s6_state, s6)
/* Video */
config.set_default_layout(layout_s6);
/* Sound */
genpin_audio(config);
/* Devices */
PIA6821(config, m_pia22, 0);
m_pia22->writepa_handler().set(FUNC(s6_state::sol0_w));
m_pia22->writepb_handler().set(FUNC(s6_state::sol1_w));
m_pia22->ca2_handler().set(FUNC(s6_state::pia22_ca2_w));
m_pia22->cb2_handler().set(FUNC(s6_state::pia22_cb2_w));
m_pia22->irqa_handler().set(FUNC(s6_state::pia_irq));
m_pia22->irqb_handler().set(FUNC(s6_state::pia_irq));
PIA6821(config, m_pia24, 0);
m_pia24->writepa_handler().set(FUNC(s6_state::lamp0_w));
m_pia24->writepb_handler().set(FUNC(s6_state::lamp1_w));
m_pia24->ca2_handler().set(FUNC(s6_state::pia24_ca2_w));
m_pia24->cb2_handler().set(FUNC(s6_state::pia24_cb2_w));
m_pia24->irqa_handler().set(FUNC(s6_state::pia_irq));
m_pia24->irqb_handler().set(FUNC(s6_state::pia_irq));
PIA6821(config, m_pia28, 0);
m_pia28->readpa_handler().set(FUNC(s6_state::dips_r));
m_pia28->writepa_handler().set(FUNC(s6_state::dig0_w));
m_pia28->writepb_handler().set(FUNC(s6_state::dig1_w));
m_pia28->ca2_handler().set(FUNC(s6_state::pia28_ca2_w));
m_pia28->cb2_handler().set(FUNC(s6_state::pia28_cb2_w));
m_pia28->irqa_handler().set(FUNC(s6_state::pia_irq));
m_pia28->irqb_handler().set(FUNC(s6_state::pia_irq));
PIA6821(config, m_pia30, 0);
m_pia30->readpa_handler().set(FUNC(s6_state::switch_r));
m_pia30->writepb_handler().set(FUNC(s6_state::switch_w));
m_pia30->ca2_handler().set(FUNC(s6_state::pia30_ca2_w));
m_pia30->cb2_handler().set(FUNC(s6_state::pia30_cb2_w));
m_pia30->irqa_handler().set(FUNC(s6_state::pia_irq));
m_pia30->irqb_handler().set(FUNC(s6_state::pia_irq));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
/* Add the soundcard */
M6802(config, m_audiocpu, 3580000);
m_audiocpu->set_addrmap(AS_PROGRAM, &s6_state::s6_audio_map);
SPEAKER(config, "speaker").front_center();
MC1408(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5);
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
SPEAKER(config, "speech").front_center();
HC55516(config, m_hc55516, 0).add_route(ALL_OUTPUTS, "speech", 1.00);
PIA6821(config, m_pias, 0);
m_pias->readpb_handler().set(FUNC(s6_state::sound_r));
m_pias->writepa_handler().set("dac", FUNC(dac_byte_interface::data_w));
m_pias->ca2_handler().set(m_hc55516, FUNC(hc55516_device::digit_w));
m_pias->cb2_handler().set(m_hc55516, FUNC(hc55516_device::clock_w));
m_pias->irqa_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE); // FIXME: needs an input merger
m_pias->irqb_handler().set_inputline(m_audiocpu, M6802_IRQ_LINE);
}
示例5: XTAL
void by133_state::babypac(machine_config &config)
{
/* basic machine hardware */
M6800(config, m_maincpu, XTAL(3'579'545)/4); // no xtal, just 2 chips
m_maincpu->set_addrmap(AS_PROGRAM, &by133_state::main_map);
MC6809(config, m_videocpu, XTAL(3'579'545));
m_videocpu->set_addrmap(AS_PROGRAM, &by133_state::video_map);
M6803(config, m_audiocpu, XTAL(3'579'545));
m_audiocpu->set_addrmap(AS_PROGRAM, &by133_state::sound_map);
m_audiocpu->out_p1_cb().set("dac", FUNC(dac_byte_interface::data_w)); // P10-P17
m_audiocpu->in_p2_cb().set(FUNC(by133_state::m6803_port2_r)); // P20-P24 sound command in
m_audiocpu->out_p2_cb().set(FUNC(by133_state::m6803_port2_w));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
PIA6821(config, m_pia_u7, 0);
m_pia_u7->readpa_handler().set(FUNC(by133_state::u7_a_r));
m_pia_u7->writepa_handler().set(FUNC(by133_state::u7_a_w));
m_pia_u7->readpb_handler().set(FUNC(by133_state::u7_b_r));
m_pia_u7->writepb_handler().set(FUNC(by133_state::u7_b_w));
m_pia_u7->ca2_handler().set(FUNC(by133_state::u7_ca2_w));
m_pia_u7->cb2_handler().set(FUNC(by133_state::u7_cb2_w));
m_pia_u7->irqa_handler().set_inputline("videocpu", M6809_FIRQ_LINE);
m_pia_u7->irqa_handler().set_inputline("videocpu", M6809_FIRQ_LINE);
PIA6821(config, m_pia_u10, 0);
m_pia_u10->readpa_handler().set(FUNC(by133_state::u10_a_r));
m_pia_u10->writepa_handler().set(FUNC(by133_state::u10_a_w));
m_pia_u10->readpb_handler().set(FUNC(by133_state::u10_b_r));
m_pia_u10->writepb_handler().set(FUNC(by133_state::u10_b_w));
m_pia_u10->ca2_handler().set(FUNC(by133_state::u10_ca2_w));
m_pia_u10->cb2_handler().set(FUNC(by133_state::u10_cb2_w));
m_pia_u10->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
m_pia_u10->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
TIMER(config, "babypac1").configure_periodic(FUNC(by133_state::u10_timer), attotime::from_hz(120)); // mains freq*2
PIA6821(config, m_pia_u11, 0);
m_pia_u11->readpa_handler().set(FUNC(by133_state::u11_a_r));
m_pia_u11->writepa_handler().set(FUNC(by133_state::u11_a_w));
m_pia_u11->readpb_handler().set(FUNC(by133_state::u11_b_r));
m_pia_u11->writepb_handler().set(FUNC(by133_state::u11_b_w));
m_pia_u11->ca2_handler().set(FUNC(by133_state::u11_ca2_w));
m_pia_u11->cb2_handler().set(FUNC(by133_state::u11_cb2_w));
m_pia_u11->irqa_handler().set_inputline("maincpu", M6800_IRQ_LINE);
m_pia_u11->irqb_handler().set_inputline("maincpu", M6800_IRQ_LINE);
TIMER(config, "babypac2").configure_periodic(FUNC(by133_state::u11_timer), attotime::from_hz(634)); // 555 timer*2
/* video hardware */
TMS9928A(config, m_crtc, XTAL(10'738'635)).set_screen("screen");
m_crtc->set_vram_size(0x4000);
m_crtc->int_callback().set_inputline(m_videocpu, M6809_IRQ_LINE);
SCREEN(config, "screen", SCREEN_TYPE_RASTER);
/* sound hardware */
SPEAKER(config, "speaker").front_center();
ZN429E(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // U32 (Vidiot) or U6 (Cheap Squeak)
voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref"));
vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT);
SPEAKER(config, "beee").front_center();
BEEP(config, m_beep, 600).add_route(ALL_OUTPUTS, "beee", 0.10);
}