static void spacefev_sound_pins_changed( running_machine &machine ) { device_t *sn = machine.device("snsnd"); n8080_state *state = machine.driver_data<n8080_state>(); UINT16 changes = ~state->m_curr_sound_pins & state->m_prev_sound_pins; if (changes & (1 << 0x3)) { stop_mono_flop(sn, 1); } if (changes & ((1 << 0x3) | (1 << 0x6))) { stop_mono_flop(sn, 2); } if (changes & (1 << 0x3)) { start_mono_flop(sn, 0, attotime::from_usec(550 * 36 * 100)); } if (changes & (1 << 0x6)) { start_mono_flop(sn, 1, attotime::from_usec(550 * 22 * 33)); } if (changes & (1 << 0x4)) { start_mono_flop(sn, 2, attotime::from_usec(550 * 22 * 33)); } if (changes & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5))) { generic_pulse_irq_line(machine.device("audiocpu"), 0, 2); } }
void n8080_state::spacefev_sound_pins_changed() { uint16_t changes = ~m_curr_sound_pins & m_prev_sound_pins; if (changes & (1 << 0x3)) { stop_mono_flop(1); } if (changes & ((1 << 0x3) | (1 << 0x6))) { stop_mono_flop(2); } if (changes & (1 << 0x3)) { start_mono_flop(0, attotime::from_usec(550 * 36 * 100)); } if (changes & (1 << 0x6)) { start_mono_flop(1, attotime::from_usec(550 * 22 * 33)); } if (changes & (1 << 0x4)) { start_mono_flop(2, attotime::from_usec(550 * 22 * 33)); } bool irq_active = (~m_curr_sound_pins & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5))) != 0; m_audiocpu->set_input_line(INPUT_LINE_IRQ0, irq_active ? ASSERT_LINE : CLEAR_LINE); }
void n8080_state::spacefev_sound_pins_changed() { UINT16 changes = ~m_curr_sound_pins & m_prev_sound_pins; if (changes & (1 << 0x3)) { stop_mono_flop(1); } if (changes & ((1 << 0x3) | (1 << 0x6))) { stop_mono_flop(2); } if (changes & (1 << 0x3)) { start_mono_flop(0, attotime::from_usec(550 * 36 * 100)); } if (changes & (1 << 0x6)) { start_mono_flop(1, attotime::from_usec(550 * 22 * 33)); } if (changes & (1 << 0x4)) { start_mono_flop(2, attotime::from_usec(550 * 22 * 33)); } if (changes & ((1 << 0x2) | (1 << 0x3) | (1 << 0x5))) { generic_pulse_irq_line(m_audiocpu, 0, 2); } }
static TIMER_CALLBACK( stop_mono_flop_callback ) { stop_mono_flop(machine.device("snsnd"), param); }