Example #1
0
static int sfx_sh_irq_callback(int irqline)
{
	/* interrupt acknowledge clears the flip-flop --
       we need to pulse the CLR line because MAME's core never clears this
       line, only asserts it */
	TTL7474_clear_w(3, 0);
	TTL7474_update(3);

	TTL7474_clear_w(3, 1);
	TTL7474_update(3);

	return 0xff;
}
Example #2
0
static void galaxian_7474_9M_2_callback(void)
{
	/* Q bar clocks the other flip-flop,
       Q is VBLANK (not visible to the CPU) */
	TTL7474_clock_w(1, TTL7474_output_comp_r(0));
	TTL7474_update(1);
}
Example #3
0
static TIMER_CALLBACK( interrupt_timer )
{
	/* 128V, 64V and 32V go to D */
	TTL7474_d_w(0, (param & 0xe0) != 0xe0);

	/* 16V clocks the flip-flop */
	TTL7474_clock_w(0, param & 0x10);

	param = (param + 0x10) & 0xff;

	timer_adjust(int_timer, video_screen_get_time_until_pos(0, param, 0), param, attotime_zero);

	TTL7474_update(0);
}
Example #4
0
static void interrupt_timer(int param)
{
	/* 128V, 64V and 32V go to D */
	TTL7474_d_w(0, (param & 0xe0) != 0xe0);

	/* 16V clocks the flip-flop */
	TTL7474_clock_w(0, param & 0x10);

	param = (param + 0x10) & 0xff;

	timer_adjust(int_timer, cpu_getscanlinetime(param), param, 0);

	TTL7474_update(0);
}
Example #5
0
static WRITE8_HANDLER( pia_0_port_a_w )
{
	/* bit 0 - Coin counter
       bit 1 - Player 4 crash sound
       bit 2 - Player 3 crash sound
       bit 3 - Clear steering wheel logic
       bit 4 - Player 2 crash sound
       bit 5 - Score pulse sound
       bit 6 - Player 1 crash sound
       bit 7 - Ball hit pulse sound */

	coin_counter_w(0, data & 0x01);


	TTL7474_clear_w(TTL7474_1F_1, data & 0x08);
	TTL7474_clear_w(TTL7474_1D_1, data & 0x08);
	TTL7474_clear_w(TTL7474_1C_1, data & 0x08);
	TTL7474_clear_w(TTL7474_1A_1, data & 0x08);

	TTL7474_update(TTL7474_1F_1);
	TTL7474_update(TTL7474_1D_1);
	TTL7474_update(TTL7474_1C_1);
	TTL7474_update(TTL7474_1A_1);
}
Example #6
0
static WRITE8_HANDLER( coin4_interrupt_clear_w )
{
	TTL7474_clear_w(TTL7474_2U_2, data);
	TTL7474_update(TTL7474_2U_2);
}
Example #7
0
static WRITE8_HANDLER( coin1_interrupt_clear_w )
{
	TTL7474_clear_w(TTL7474_2S_1, data);
	TTL7474_update(TTL7474_2S_1);
}