예제 #1
0
void mario_state::sound_reset()
{
	address_space &space = machine().device("audiocpu")->memory().space(AS_PROGRAM);

#if USE_8039
	set_ea(machine, 1);
#endif

	/* FIXME: convert to latch8 */
	soundlatch_clear_byte_w(space, 0, 0);
	soundlatch2_clear_byte_w(space, 0, 0);
	soundlatch3_clear_byte_w(space, 0, 0);
	soundlatch4_clear_byte_w(space, 0, 0);
	I8035_P1_W(space, 0x00); /* Input port */
	I8035_P2_W(space, 0xff); /* Port is in high impedance state after reset */

	m_last = 0;
}
예제 #2
0
파일: mario.cpp 프로젝트: crazii/mameui
void mario_state::sound_reset()
{
	if (!m_audiocpu) return;

	address_space &space = machine().device("audiocpu")->memory().space(AS_PROGRAM);

#if USE_8039
	set_ea(machine, 1);
#endif

	/* FIXME: convert to latch8 */
	m_soundlatch->clear_w(space, 0, 0);
	if (m_soundlatch2) m_soundlatch2->clear_w(space, 0, 0);
	if (m_soundlatch3) m_soundlatch3->clear_w(space, 0, 0);
	if (m_soundlatch4) m_soundlatch4->clear_w(space, 0, 0);
	if (m_soundlatch3) I8035_P1_W(space, 0x00); /* Input port */
	if (m_soundlatch4) I8035_P2_W(space, 0xff); /* Port is in high impedance state after reset */

	m_last = 0;
}