• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ required_ioport类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中required_ioport的典型用法代码示例。如果您正苦于以下问题:C++ required_ioport类的具体用法?C++ required_ioport怎么用?C++ required_ioport使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了required_ioport类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1:

/* Reset it */
void force68k_state::machine_reset ()
{
	LOG("%s\n", FUNCNAME);

	// Set up the BRG divider. RSA is a jumper setting and RSB is always set High
	m_brg->rsa_w( m_serial_brf->read() == 0x80 ? ASSERT_LINE : CLEAR_LINE );
	m_brg->rsb_w( ASSERT_LINE);

	// Disable all configured timers, only enabling the used ones
	m_brg->timer_disable_all();
	m_brg->timer_enable((mc14411_device::timer_id) m_serial_p3->read(), true);
	m_brg->timer_enable((mc14411_device::timer_id) m_serial_p4->read(), true);
	m_brg->timer_enable((mc14411_device::timer_id) m_serial_p5->read(), true);
}
开发者ID:MASHinfo,项目名称:mame,代码行数:15,代码来源:force68k.cpp


示例2: get_lightgun_pos

int alg_state::get_lightgun_pos(int player, int *x, int *y)
{
	const rectangle &visarea = m_screen->visible_area();

	int xpos = (player == 0) ? m_gun1x->read() : (m_gun2x ? m_gun2x->read() : 0xffffffff);
	int ypos = (player == 0) ? m_gun1y->read() : (m_gun2y ? m_gun2y->read() : 0xffffffff);

	if (xpos == -1 || ypos == -1)
		return FALSE;

	*x = visarea.min_x + xpos * visarea.width() / 255;
	*y = visarea.min_y + ypos * visarea.height() / 255;
	return TRUE;
}
开发者ID:stengun,项目名称:mame,代码行数:14,代码来源:alg.cpp


示例3:

UINT32 cv1k_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	m_blitter->set_delay_scale(m_blitrate->read());

	m_blitter->draw_screen(bitmap,cliprect);
	return 0;
}
开发者ID:marioaugustorama,项目名称:mame,代码行数:7,代码来源:cv1k.cpp


示例4:

void nascom2_state::machine_reset()
{
	// base machine reset
	nascom_state::machine_reset();

	// restart address (on the real system, a12 to a15 are forced to 1 for one memory cycle)
	m_maincpu->set_state_int(Z80_PC, m_lsw1->read() << 12);
}
开发者ID:bmunger,项目名称:mame,代码行数:8,代码来源:nascom1.cpp


示例5: screen_update_rainbow

UINT32 rainbow_state::screen_update_rainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	m_crtc->palette_select( m_inp9->read() );

	if ( m_SCREEN_BLANK )
			m_crtc->video_blanking(bitmap, cliprect);
	else
			m_crtc->video_update(bitmap, cliprect);
	return 0;
}
开发者ID:MisterTea,项目名称:MAMEHub,代码行数:10,代码来源:rainbow.c


示例6: pico_read_penpos

UINT16 pico_base_state::pico_read_penpos(int pen)
{
	UINT16 penpos = 0;

	switch (pen)
	{
		case PICO_PENX:
			penpos = m_io_penx->read();
			penpos |= 0x6;
			penpos = penpos * 320 / 255;
			penpos += 0x3d;
			break;
		case PICO_PENY:
			penpos = m_io_peny->read();
			penpos |= 0x6;
			penpos = penpos * 251 / 255;
			penpos += 0x1fc;
			break;
	}

	return penpos;
}
开发者ID:DragonMinded,项目名称:mame,代码行数:22,代码来源:segapico.cpp


示例7: mouse_update

void supercon_state::mouse_update()
{
	UINT8 port_input; // m_left;
	int i;

/* border pieces and moving piece */

	port_input = m_b_white->read();
	if (port_input)
	{
		i = get_first_bit(port_input);
		m_moving_piece = m_border_pieces[i];
		output_set_value("MOVING", m_moving_piece);
		return;
	}


	port_input = m_b_black->read();
	if (port_input)
	{
		i = get_first_bit(port_input);
		m_moving_piece = m_border_pieces[6+i];
		output_set_value("MOVING", m_moving_piece);
		return;
	}


	port_input = m_b_clr->read();
	if (port_input)
	{
		if (m_moving_piece)
		{
			m_moving_piece=0;
			output_set_value("MOVING", m_moving_piece);
			return;
		}
	}
}
开发者ID:CJBass,项目名称:mame2013-libretro,代码行数:38,代码来源:supercon.c


示例8: screen_update_rainbow

UINT32 rainbow_state::screen_update_rainbow(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
	// TEST-DEBUG: no screen updates during diskette operations!
	if (MOTOR_DISABLE_counter)
		return 0;

	m_crtc->palette_select( m_inp9->read() );

	if ( m_SCREEN_BLANK )
			m_crtc->video_blanking(bitmap, cliprect);
	else
			m_crtc->video_update(bitmap, cliprect);
	return 0;
}
开发者ID:thomas41546,项目名称:mame4raspi,代码行数:14,代码来源:rainbow.c


示例9:

uint8_t alphatro_state::port10_r()
{
// Bit 0 -> 1 = FDC is installed, 0 = not
// Bit 1 -> 1 = Graphic Board is installed, 0 = not
// Bits 2-4 = Country select: 0 = Intl, 1 = German, 2 = US
// Bit 5 -> 1 = BASIC LPRINT is RS-232, 0 = BASIC LPRINT is Centronics
// Bit 6 -> 1 = NTSC, 0 = PAL
// Bit 7 -> 1 = vblank or hblank, 0 = active display area

	u8 retval = m_is_ntsc ? 0x40 : 0x00;

	// we'll get "FDC present" and "graphics expansion present" from the config switches
	retval |= (m_config->read() & 3);

	if (!m_crtc->de_r())
	{
		retval |= 0x80;
	}

	return retval;
}
开发者ID:fesh0r,项目名称:mame-full,代码行数:21,代码来源:alphatro.cpp


示例10: machine_reset

void gimix_state::machine_reset()
{
	m_term_data = 0;
	m_rombank1->set_entry(0);  // RAM banks are undefined on startup
	m_rombank2->set_entry(1);
	m_fixedrombank->set_entry(0);
	m_dma_status = 0x00;
	m_dma_ctrl = 0x00;
	m_task = 0x00;
	m_selected_drive = 0;
	m_floppy0_ready = false;
	m_floppy1_ready = false;
	membank("lower_ram")->set_base(m_ram->pointer());
	if(m_ram->size() > 65536)
		membank("upper_ram")->set_base(m_ram->pointer()+0x10000);

	// initialise FDC clock based on DIP Switch S2-9 (5.25"/8" drive select)
	if(m_dma_dip->read() & 0x00000100)
		m_fdc->set_unscaled_clock(XTAL_8MHz / 4); // 8 inch (2MHz)
	else
		m_fdc->set_unscaled_clock(XTAL_8MHz / 8); // 5.25 inch (1MHz)
}
开发者ID:Fulg,项目名称:mame,代码行数:22,代码来源:gimix.cpp


示例11: machine_reset

INPUT_PORTS_END


void rainbow_state::machine_reset()
{
	m_unit = INVALID_DRIVE;

	m_fdc->reset();
	m_fdc->set_floppy(NULL);
	m_fdc->dden_w(0);
	//m_fdc->set_force_ready(false);

	/* configure RAM */
	address_space &program = m_maincpu->space(AS_PROGRAM);
	if (m_inp8->read() < END_OF_RAM)
	{
		program.unmap_readwrite(m_inp8->read(), END_OF_RAM);
	}

	// BIOS can't handle soft resets (=> triggers ERROR 16).
	if ( COLD_BOOT == 2 )
	{   // As a fallback, execute a hard reboot -
		device().machine().schedule_hard_reset();
	}

	if ( COLD_BOOT == 1 )
	{
		COLD_BOOT = 2;
		m_crtc->MHFU(-100); // reset MHFU counter
	}

	m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);

	INT88 = false;
	INTZ80 = false;

	m_zflip = true;
	m_z80_halted = true;
	m_kbd_tx_ready = m_kbd_rx_ready = false;

	m_kbd8251->write_cts(1);

	m_KBD = 0;
	m_irq_high = 0;

	// RESET ALL LEDs
	output_set_value("led1", 1);
	output_set_value("led2", 1);
	output_set_value("led3", 1);
	output_set_value("led4", 1);
	output_set_value("led5", 1);
	output_set_value("led6", 1);
	output_set_value("led7", 1);

	// GREEN KEYBOARD LEDs (1 = on, 0 = off):
	output_set_value("led_wait", 0);    // led8
	output_set_value("led_compose", 0); // led9
	output_set_value("led_lock", 0);    // led10
	output_set_value("led_hold", 0);    // led11

	m_irq_mask = 0;


}
开发者ID:MisterTea,项目名称:MAMEHub,代码行数:64,代码来源:rainbow.c


示例12: machine_reset

void ql_state::machine_reset()
{
    // QIMI
    m_qimi_enabled = (m_config->read() & 0x01) ? true : false;
}
开发者ID:Robbbert,项目名称:store1,代码行数:5,代码来源:ql.cpp


示例13:

void ti74_state::machine_reset()
{
	m_power = 1;

	update_battery_status(m_battery_inp->read());
}
开发者ID:DragonMinded,项目名称:mame,代码行数:6,代码来源:ti74.cpp


示例14: vblank_w

void oric_state::vblank_w(screen_device &screen, bool state)
{
	if(m_config->read())
		m_via->write_cb1(state);
}
开发者ID:bradhugh,项目名称:mame,代码行数:5,代码来源:oric.cpp



注:本文中的required_ioport类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ required_memory_bank类代码示例发布时间:2022-05-31
下一篇:
C++ required_device类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap