本文整理汇总了C++中optional_device类的典型用法代码示例。如果您正苦于以下问题:C++ optional_device类的具体用法?C++ optional_device怎么用?C++ optional_device使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了optional_device类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: XTAL
void by133_state::granny(machine_config &config)
{
babypac(config);
MC6809(config.replace(), m_videocpu, XTAL(8'000'000)); // MC68B09P (XTAL value hard to read)
m_videocpu->set_addrmap(AS_PROGRAM, &by133_state::granny_map);
TMS9928A(config, m_crtc2, XTAL(10'738'635)).set_screen("screen");
m_crtc2->set_vram_size(0x4000);
m_crtc2->int_callback().set_inputline(m_videocpu, M6809_IRQ_LINE);
subdevice<screen_device>("screen")->set_screen_update(FUNC(by133_state::screen_update_granny));
}
示例2:
UINT32 zr107_state::screen_update_zr107(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
bitmap.fill(machine().pens[0], cliprect);
m_k056832->tilemap_draw(screen, bitmap, cliprect, 1, 0, 0);
K001005_draw(bitmap, cliprect);
m_k056832->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0);
draw_7segment_led(bitmap, 3, 3, m_led_reg0);
draw_7segment_led(bitmap, 9, 3, m_led_reg1);
sharc_set_flag_input(machine().device("dsp"), 1, ASSERT_LINE);
return 0;
}
示例3: memregion
void pb1000_state::machine_start()
{
std::string region_tag;
m_rom_reg = memregion("rom");
if (m_card1)
m_card1_reg = memregion(region_tag.assign(m_card1->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
if (m_card2)
m_card2_reg = memregion(region_tag.assign(m_card2->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
membank("bank1")->set_base(m_rom_reg->base());
m_kb_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pb1000_state::keyboard_timer),this));
m_kb_timer->adjust(attotime::from_hz(192), 0, attotime::from_hz(192));
}
示例4:
uint32_t deco156_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
// sprites are flipped relative to tilemaps
m_sprgen->set_flip_screen(true);
screen.priority().fill(0);
bitmap.fill(0);
m_deco_tilegen->pf_update(m_pf1_rowscroll, m_pf2_rowscroll);
m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram.get(), 0x800);
m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
return 0;
}
示例5:
void bfmsys85_state::machine_reset()
{
m_alpha_clock = 0;
m_mmtr_latch = 0;
m_triac_latch = 0;
m_irq_status = 0;
m_is_timer_enabled = 1;
m_coin_inhibits = 0;
m_mux_output_strobe = 0;
m_mux_input_strobe = 0;
m_mux_input = 0;
m_vfd->reset(); // reset display1
// reset stepper motors ///////////////////////////////////////////////////
{
int pattern =0, i;
for ( i = 0; i < 6; i++)
{
stepper_reset_position(i);
if ( stepper_optic_state(i) ) pattern |= 1<<i;
}
m_optic_pattern = pattern;
}
m_locked = 0x00; // hardware is open
}
示例6: screen_update_speglsht
UINT32 speglsht_state::screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
int x,y,dy;
dy=(m_videoreg&0x20)?(256*512):0; //visible frame
for(y=0; y<256; y++)
{
for(x=0; x<512; x++)
{
int tmp=dy+y*512+x;
PLOT_PIXEL_RGB(x-67,y-5,(m_framebuffer[tmp]>>0)&0xff,(m_framebuffer[tmp]>>8)&0xff,(m_framebuffer[tmp]>>16)&0xff);
}
}
//draw st0016 gfx to temporary bitmap (indexed 16)
m_bitmap->fill(0);
m_maincpu->st0016_draw_screen(screen, *m_bitmap, cliprect);
//copy temporary bitmap to rgb 32 bit bitmap
for(y=cliprect.min_y; y<cliprect.max_y; y++)
{
UINT16 *srcline = &m_bitmap->pix16(y);
for(x=cliprect.min_x; x<cliprect.max_x; x++)
{
if(srcline[x])
{
rgb_t color=m_maincpu->m_palette->pen_color(srcline[x]);
PLOT_PIXEL_RGB(x,y,color.r(),color.g(),color.b());
}
}
}
return 0;
}
示例7: machine_start
void apf_state::machine_start()
{
m_apf_ints = 0;
if (m_cass) // apfimag only
m_cass->change_state(CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
}
示例8: power_off
void tispellb_state::power_off()
{
hh_tms1k_state::power_off();
if (m_subcpu)
m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
示例9:
UINT32 by133_state::screen_update_granny(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
//bitmap.fill(0xff000000, cliprect);
copybitmap(bitmap, m_crtc->get_bitmap(), 0, 0, 0, 0, cliprect);
copybitmap_trans(bitmap, m_crtc2->get_bitmap(), 0, 0, 0, 0, cliprect, 0xff000000);
return 0;
}
示例10:
void mu100_state::regs_int_read_tap(offs_t address, u16 data, u16 mem_mask)
{
offs_t pc = m_maincpu->pc();
offs_t reg = (address - 0x214ca2-0x320)/2;
if(pc != 0x729c6)
logerror("regs_int_r %03x, %04x @ %04x (%06x)\n", reg, data, mem_mask, pc);
}
示例11: power_off
void tispellb_state::power_off()
{
m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
if (m_subcpu)
m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
m_power_on = false;
}
示例12: screen_update
UINT32 sandscrp_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
bitmap.fill(0, cliprect);
screen.priority().fill(0, cliprect);
m_view2_0->kaneko16_prepare(bitmap, cliprect);
for ( int i = 0; i < 8; i++ )
{
m_view2_0->render_tilemap_chip(screen,bitmap,cliprect,i);
}
// copy sprite bitmap to screen
m_pandora->update(bitmap, cliprect);
return 0;
}
示例13: machine_reset
void ngen_state::machine_reset()
{
m_port00 = 0;
m_control = 0;
m_xbus_current = 0;
m_viduart->write_dsr(0);
m_viduart->write_cts(0);
m_fd0->get_device()->set_rpm(300);
}
示例14: if
bool mc10_state::screen_update(screen_device &screen, bitmap_t &bitmap, const rectangle &cliprect)
{
if (m_mc6847) //mc10, alice
return mc6847_update(m_mc6847, &bitmap, &cliprect);
else if (m_ef9345) //alice32
m_ef9345->video_update(&bitmap, &cliprect);
return 0;
}
示例15: resolution
void fastinvaders_state::fastinvaders_8275(machine_config &config)
{
fastinvaders(config);
m_maincpu->set_addrmap(AS_IO, &fastinvaders_state::fastinvaders_8275_io);
I8275(config, m_crtc8275, 10000000); /* guess */ // does not configure a very useful resolution(!)
m_crtc8275->set_character_width(16);
// m_crtc8275->set_display_callback(FUNC(apogee_state::display_pixels));
// m_crtc8275->drq_wr_callback().set("dma8257", FUNC(i8257_device::dreq2_w));
}