本文整理汇总了C++中required_device::comp_output_cb方法的典型用法代码示例。如果您正苦于以下问题:C++ required_device::comp_output_cb方法的具体用法?C++ required_device::comp_output_cb怎么用?C++ required_device::comp_output_cb使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类required_device
的用法示例。
在下文中一共展示了required_device::comp_output_cb方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FUNC
void trs80dt1_state::trs80dt1(machine_config &config)
{
/* basic machine hardware */
I8051(config, m_maincpu, 7372800);
m_maincpu->set_addrmap(AS_PROGRAM, &trs80dt1_state::prg_map);
m_maincpu->set_addrmap(AS_IO, &trs80dt1_state::io_map);
m_maincpu->port_out_cb<1>().set(FUNC(trs80dt1_state::port1_w));
m_maincpu->port_out_cb<3>().set(FUNC(trs80dt1_state::port3_w));
/* video hardware */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_screen_update("crtc", FUNC(i8276_device::screen_update));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_size(40*12, 16*16);
screen.set_visarea(0, 40*12-1, 0, 16*16-1);
GFXDECODE(config, "gfxdecode", m_palette, gfx_trs80dt1);
I8276(config, m_crtc, 12480000 / 8);
m_crtc->set_character_width(8);
m_crtc->set_display_callback(FUNC(trs80dt1_state::crtc_update_row), this);
m_crtc->drq_wr_callback().set_inputline(m_maincpu, MCS51_INT0_LINE); // BRDY pin goes through inverter to /INT0, so we don't invert
m_crtc->irq_wr_callback().set(m_7474, FUNC(ttl7474_device::clear_w)); // INT pin
m_crtc->irq_wr_callback().append(m_7474, FUNC(ttl7474_device::d_w));
m_crtc->vrtc_wr_callback().set(m_7474, FUNC(ttl7474_device::clock_w));
m_crtc->set_screen("screen");
PALETTE(config, "palette").set_entries(3);
X2210(config, "nvram");
TTL7474(config, m_7474, 0);
m_7474->comp_output_cb().set_inputline(m_maincpu, MCS51_INT1_LINE).invert(); // /Q connects directly to /INT1, so we need to invert?
/* sound hardware */
SPEAKER(config, "mono").front_center();
BEEP(config, m_beep, 2000);
m_beep->add_route(ALL_OUTPUTS, "mono", 0.50);
}
示例2: spinb
void spinb_state::spinb(machine_config &config)
{
/* basic machine hardware */
Z80(config, m_maincpu, XTAL(5'000'000) / 2);
m_maincpu->set_addrmap(AS_PROGRAM, &spinb_state::spinb_map);
m_maincpu->set_periodic_int(FUNC(spinb_state::irq0_line_hold), attotime::from_hz(160)); // NE556 adjustable (if faster, then jolypark has a stack problem)
Z80(config, m_audiocpu, XTAL(5'000'000) / 2);
m_audiocpu->set_addrmap(AS_PROGRAM, &spinb_state::spinb_audio_map);
Z80(config, m_musiccpu, XTAL(5'000'000) / 2);
m_musiccpu->set_addrmap(AS_PROGRAM, &spinb_state::spinb_music_map);
I8031(config, m_dmdcpu, XTAL(16'000'000));
m_dmdcpu->set_addrmap(AS_PROGRAM, &spinb_state::dmd_mem);
m_dmdcpu->set_addrmap(AS_IO, &spinb_state::dmd_io);
m_dmdcpu->port_out_cb<1>().set(FUNC(spinb_state::p1_w));
m_dmdcpu->port_in_cb<3>().set(FUNC(spinb_state::p3_r));
m_dmdcpu->port_out_cb<3>().set(FUNC(spinb_state::p3_w));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_1);
/* Video */
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD));
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500));
screen.set_screen_update(FUNC(spinb_state::screen_update));
screen.set_size(128, 32);
screen.set_visarea(0, 127, 0, 31);
screen.set_palette("palette");
PALETTE(config, "palette", FUNC(spinb_state::spinb_palette), 3);
/* Sound */
genpin_audio(config);
SPEAKER(config, "msmavol").front_center();
MSM5205(config, m_msm_a, XTAL(384'000));
m_msm_a->vck_callback().set("ic5a", FUNC(ttl7474_device::clock_w));
m_msm_a->set_prescaler_selector(msm5205_device::S48_4B); /* 4KHz 4-bit */
m_msm_a->add_route(ALL_OUTPUTS, "msmavol", 1.0);
SPEAKER(config, "msmmvol").front_center();
MSM5205(config, m_msm_m, XTAL(384'000));
m_msm_m->vck_callback().set("ic5m", FUNC(ttl7474_device::clock_w));
m_msm_m->set_prescaler_selector(msm5205_device::S48_4B); /* 4KHz 4-bit */
m_msm_m->add_route(ALL_OUTPUTS, "msmmvol", 1.0);
/* Devices */
i8255_device &ppi60(I8255A(config, "ppi60"));
//ppi60.in_pa_callback().set(FUNC(spinb_state::ppi60a_r));
ppi60.out_pa_callback().set(FUNC(spinb_state::ppi60a_w));
//ppi60.in_pb_callback().set(FUNC(spinb_state::ppi60b_r));
ppi60.out_pb_callback().set(FUNC(spinb_state::ppi60b_w));
ppi60.in_pc_callback().set(FUNC(spinb_state::sw_r));
//ppi60.out_pc_callback().set(FUNC(spinb_state::ppi60c_w));
i8255_device &ppi64(I8255A(config, "ppi64"));
//ppi64.in_pa_callback().set(FUNC(spinb_state::ppi64a_r));
//ppi64.out_pa_callback().set(FUNC(spinb_state::ppi64a_w));
//ppi64.in_pb_callback().set(FUNC(spinb_state::ppi64b_r));
//ppi64.out_pb_callback().set(FUNC(spinb_state::ppi64b_w));
//ppi64.in_pc_callback().set(FUNC(spinb_state::ppi64c_r));
ppi64.out_pc_callback().set(FUNC(spinb_state::ppi64c_w));
I8255A(config, "ppi68");
//ppi68.in_pa_callback().set(FUNC(spinb_state::ppi68a_r));
//ppi68.out_pa_callback().set(FUNC(spinb_state::ppi68a_w));
//ppi68.in_pb_callback().set(FUNC(spinb_state::ppi68b_r));
//ppi68.out_pb_callback().set(FUNC(spinb_state::ppi68b_w));
//ppi68.in_pc_callback().set(FUNC(spinb_state::ppi68c_r));
//ppi68.out_pc_callback().set(FUNC(spinb_state::ppi68c_w));
I8255A(config, "ppi6c");
//ppi6c.in_pa_callback().set(FUNC(spinb_state::ppi6ca_r));
//ppi6c.out_pa_callback().set(FUNC(spinb_state::ppi6ca_w));
//ppi6c.in_pb_callback().set(FUNC(spinb_state::ppi6cb_r));
//ppi6c.out_pb_callback().set(FUNC(spinb_state::ppi6cb_w));
//ppi6c.in_pc_callback().set(FUNC(spinb_state::ppi6cc_r));
//ppi6c.out_pc_callback().set(FUNC(spinb_state::ppi6cc_w));
i8255_device &ppia(I8255A(config, "ppia"));
ppia.out_pa_callback().set(FUNC(spinb_state::ppia_a_w));
ppia.out_pb_callback().set(FUNC(spinb_state::ppia_b_w));
ppia.in_pc_callback().set(FUNC(spinb_state::ppia_c_r));
ppia.out_pc_callback().set(FUNC(spinb_state::ppia_c_w));
i8255_device &ppim(I8255A(config, "ppim"));
ppim.out_pa_callback().set(FUNC(spinb_state::ppim_a_w));
ppim.out_pb_callback().set(FUNC(spinb_state::ppim_b_w));
ppim.in_pc_callback().set(FUNC(spinb_state::ppim_c_r));
ppim.out_pc_callback().set(FUNC(spinb_state::ppim_c_w));
TTL7474(config, m_ic5a, 0);
m_ic5a->comp_output_cb().set(FUNC(spinb_state::ic5a_w));
HC157(config, m_ic14a, 0); // actually IC15 on Jolly Park
m_ic14a->out_callback().set("msm_a", FUNC(msm5205_device::data_w));
TTL7474(config, m_ic5m, 0);
//.........这里部分代码省略.........