本文整理汇总了C++中required_device::change_state方法的典型用法代码示例。如果您正苦于以下问题:C++ required_device::change_state方法的具体用法?C++ required_device::change_state怎么用?C++ required_device::change_state使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类required_device
的用法示例。
在下文中一共展示了required_device::change_state方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void alphatro_state::port10_w(uint8_t data)
{
// Bit 0 -> 0 = 40 cols; 1 = 80 cols
// Bit 1 -> 0 = display enable, 1 = display inhibit
// Bit 2 -> 0 = USART is connected to cassette, 1 = RS232 port
// Bit 3 -> 0 = cassette motor off, 1 = cassette motor on
// Bit 4 -> 0 = beeper off, 1 = beeper on
// Bit 5 -> always 0
// Bit 6 -> 1 = select ROM pack at A000, 0 = RAM at A000
// Bit 7 -> 0 = ROM enabled at 0, 1 = RAM enabled
if (BIT(data ^ m_port_10, 0))
{
if (BIT(data, 0))
m_crtc->set_unscaled_clock(16_MHz_XTAL / 8);
else if (m_is_ntsc || system_bios() == 3) // kludge for bios 2, which expects a NTSC clock even for ~50 Hz video
m_crtc->set_unscaled_clock(14.318181_MHz_XTAL / 16);
else
m_crtc->set_unscaled_clock(17.73447_MHz_XTAL / 16);
}
m_port_10 = data;
m_beep->set_state(BIT(data, 4));
m_cass->change_state( BIT(data, 3) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR);
if (BIT(data,2))
m_cassbit = 1;
update_banking();
}
示例2:
INPUT_PORTS_END
void cp1_state::machine_reset()
{
m_port2 = 0;
m_matrix = 0;
m_7seg = 0;
m_cassette->change_state(CASSETTE_STOPPED, CASSETTE_MASK_UISTATE);
}
示例3: machine_reset
void bmjr_state::machine_reset()
{
m_tape_switch = 0;
m_cass->change_state(CASSETTE_MOTOR_DISABLED,CASSETTE_MASK_MOTOR);
}