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; }
static SOUND_RESET( mario ) { mario_state *state = machine.driver_data<mario_state>(); address_space &space = machine.device("audiocpu")->memory().space(AS_PROGRAM); #if USE_8039 set_ea(machine, 1); #endif /* FIXME: convert to latch8 */ state->soundlatch_clear_byte_w(space, 0, 0); state->soundlatch2_clear_byte_w(space, 0, 0); state->soundlatch3_clear_byte_w(space, 0, 0); state->soundlatch4_clear_byte_w(space, 0, 0); state->I8035_P1_W(space, 0x00); /* Input port */ I8035_P2_W(space, 0xff); /* Port is in high impedance state after reset */ state->m_last = 0; }
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; }