示例#1
0
static void spacefev_update_SN76477_status( device_t *sn )
{
	n8080_state *state = sn->machine().driver_data<n8080_state>();
	double dblR0 = RES_M(1.0);
	double dblR1 = RES_M(1.5);

	if (!state->m_mono_flop[0])
	{
		dblR0 = 1 / (1 / RES_K(150) + 1 / dblR0); /* ? */
	}
	if (!state->m_mono_flop[1])
	{
		dblR1 = 1 / (1 / RES_K(620) + 1 / dblR1); /* ? */
	}

	sn76477_decay_res_w(sn, dblR0);

	sn76477_vco_res_w(sn, dblR1);

	sn76477_enable_w(sn,
		!state->m_mono_flop[0] &&
		!state->m_mono_flop[1] &&
		!state->m_mono_flop[2]);

	sn76477_vco_w(sn, state->m_mono_flop[1]);

	sn76477_mixer_b_w(sn, state->m_mono_flop[0]);
}
示例#2
0
static void sheriff_update_SN76477_status( device_t *sn )
{
	n8080_state *state = sn->machine().driver_data<n8080_state>();
	if (state->m_mono_flop[1])
	{
		sn76477_vco_voltage_w(sn, 5);
	}
	else
	{
		sn76477_vco_voltage_w(sn, 0);
	}

	sn76477_enable_w(sn,
		!state->m_mono_flop[0] &&
		!state->m_mono_flop[1]);

	sn76477_vco_w(sn, state->m_mono_flop[0]);

	sn76477_mixer_b_w(sn, !state->m_mono_flop[0]);
}
示例#3
0
static TIMER_CALLBACK( schaser_effect_555_cb )
{
	_8080bw_state *state = machine.driver_data<_8080bw_state>();
	int effect = param;
	attotime new_time;
	/* Toggle 555 output */
	state->m_schaser_effect_555_is_low = !state->m_schaser_effect_555_is_low;
	state->m_schaser_effect_555_time_remain = attotime::zero;
	state->m_schaser_effect_555_time_remain_savable = state->m_schaser_effect_555_time_remain.as_double();

	if (state->m_schaser_effect_555_is_low)
		new_time = PERIOD_OF_555_ASTABLE(0, RES_K(20), CAP_U(1)) / 2;
	else
	{
		if (effect)
			new_time = attotime(0, ATTOSECONDS_PER_SECOND * .8873 * schaser_effect_rc[effect]);
		else
			new_time = attotime::never;
	}
	state->m_schaser_effect_555_timer->adjust(new_time, effect);
	sn76477_enable_w(state->m_sn, !(state->m_schaser_effect_555_is_low || state->m_schaser_explosion));
	sn76477_one_shot_cap_voltage_w(state->m_sn, !(state->m_schaser_effect_555_is_low || state->m_schaser_explosion) ? 0 : SN76477_EXTERNAL_VOLTAGE_DISCONNECT);
}
示例#4
0
static TIMER_CALLBACK( schaser_effect_555_cb )
{
    mw8080bw_state *state = machine->driver_data<mw8080bw_state>();
    int effect = param;
    attotime new_time;
    /* Toggle 555 output */
    state->schaser_effect_555_is_low = !state->schaser_effect_555_is_low;
    state->schaser_effect_555_time_remain = attotime_zero;
    state->schaser_effect_555_time_remain_savable = attotime_to_double(state->schaser_effect_555_time_remain);

    if (state->schaser_effect_555_is_low)
        new_time = attotime_div(PERIOD_OF_555_ASTABLE(0, RES_K(20), CAP_U(1)), 2);
    else
    {
        if (effect)
            new_time = attotime_make(0, ATTOSECONDS_PER_SECOND * .8873 * schaser_effect_rc[effect]);
        else
            new_time = attotime_never;
    }
    timer_adjust_oneshot(state->schaser_effect_555_timer, new_time, effect);
    sn76477_enable_w(state->sn, !(state->schaser_effect_555_is_low || state->schaser_explosion));
    sn76477_one_shot_cap_voltage_w(state->sn, !(state->schaser_effect_555_is_low || state->schaser_explosion) ? 0 : SN76477_EXTERNAL_VOLTAGE_DISCONNECT);
}
示例#5
0
void crbaloon_audio_set_explosion_enable(device_t *sn, int enabled)
{
	sn76477_enable_w(sn, enabled);
}