コード例 #1
0
static READ8_HANDLER( sound_slave_latch_r )
{
	/* read latch and clear interrupt */
	cpunum_set_input_line(3, M6502_IRQ_LINE, CLEAR_LINE);
	return slave_sound_latch;
}
コード例 #2
0
ファイル: tubep.c プロジェクト: CrouchingLlama/openlase-mame
static READ8_HANDLER( tubep_sound_irq_ack )
{
	cpunum_set_input_line(2, 0, CLEAR_LINE);
	return 0;
}
コード例 #3
0
ファイル: mrflea.c プロジェクト: Sunoo/nonamemame
static WRITE8_HANDLER( mrflea_io_w ){
	mrflea_status |= 0x08; // pending command to IO CPU
	mrflea_io = data;
	cpunum_set_input_line( 1, 0, HOLD_LINE );
}
コード例 #4
0
ファイル: capbowl.c プロジェクト: cdenix/ps3-mame-0125
static void firqhandler(int irq)
{
	cpunum_set_input_line(Machine, 1, 1, irq ? ASSERT_LINE : CLEAR_LINE);
}
コード例 #5
0
ファイル: bzone.c プロジェクト: Sunoo/nonamemame
static INTERRUPT_GEN( bzone_interrupt )
{
	if (readinputport(0) & 0x10)
		cpunum_set_input_line(0, INPUT_LINE_NMI, PULSE_LINE);
}
コード例 #6
0
ファイル: cabal.c プロジェクト: joolswills/mameox
static void irqhandler(int irq)
{
	cpunum_set_input_line(1,0,irq ? ASSERT_LINE : CLEAR_LINE);
}
コード例 #7
0
ファイル: capbowl.c プロジェクト: cdenix/ps3-mame-0125
static INTERRUPT_GEN( capbowl_interrupt )
{
	if (input_port_read_indexed(machine, 4) & 1)	/* get status of the F2 key */
		cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, PULSE_LINE);	/* trigger self test */
}
コード例 #8
0
ファイル: megazone.c プロジェクト: broftkd/historic-mame
static WRITE8_HANDLER( megazone_i8039_irq_w )
{
	cpunum_set_input_line(2, 0, ASSERT_LINE);
}
コード例 #9
0
ファイル: megazone.c プロジェクト: broftkd/historic-mame
static WRITE8_HANDLER( i8039_irqen_and_status_w )
{
	if ((data & 0x80) == 0)
		cpunum_set_input_line(2, 0, CLEAR_LINE);
	i8039_status = (data & 0x70) >> 4;
}
コード例 #10
0
ファイル: vsnes.c プロジェクト: broftkd/mess-cvs
static void ppu_irq( int num, int *ppu_regs )
{
	cpunum_set_input_line(num, INPUT_LINE_NMI, PULSE_LINE );
}
コード例 #11
0
ファイル: apple1.c プロジェクト: Synapseware/coco
/*****************************************************************************
**	apple1_kbd_poll
**
**	Keyboard polling handles both ordinary keys and the special RESET
**	and CLEAR SCREEN switches.
**
**	For ordinary keys, this implements 2-key rollover to reduce the
**	chance of missed keypresses.  If we press a key and then press a
**	second key while the first hasn't been completely released, as
**	might happen during rapid typing, only the second key is
**	registered; the first key is ignored.
**
**	If multiple newly-pressed keys are found, the one closest to the
**	end of the input ports list is counted; the others are ignored.
*****************************************************************************/
static void apple1_kbd_poll(int dummy)
{
	int port, bit;
	int key_pressed;
	UINT32 shiftkeys, ctrlkeys;

	/* This holds the values of all the input ports for ordinary keys
	   seen during the last scan. */
	static UINT32 kbd_last_scan[] = { 0, 0, 0, 0 };

	static int reset_flag = 0;

	/* First we check the RESET and CLEAR SCREEN pushbutton switches. */

	/* The RESET switch resets the CPU and the 6820 PIA. */
	if (readinputport(5) & 0x0001)
	{
		if (!reset_flag) {
			reset_flag = 1;
			/* using PULSE_LINE does not allow us to press and hold key */
			cpunum_set_input_line(0, INPUT_LINE_RESET, ASSERT_LINE);
			pia_reset();
		}
	}
	else if (reset_flag) {
		/* RESET released--allow the processor to continue. */
		reset_flag = 0;
		cpunum_set_input_line(0, INPUT_LINE_RESET, CLEAR_LINE);
	}

	/* The CLEAR SCREEN switch clears the video hardware. */
	if (readinputport(5) & 0x0002)
	{
		if (!apple1_vh_clrscrn_pressed)
		{
			/* Ignore further video writes, and clear the screen. */
			apple1_vh_clrscrn_pressed = 1;
			apple1_vh_dsp_clr();
		}
	}
	else if (apple1_vh_clrscrn_pressed)
	{
		/* CLEAR SCREEN released--pay attention to video writes again. */
		apple1_vh_clrscrn_pressed = 0;
	}

	/* Now we scan all the input ports for ordinary keys, recording
	   new keypresses while ignoring keys that were already pressed in
	   the last scan. */

	apple1_kbd_data = 0;
	key_pressed = 0;

	/* The keyboard strobe line should always be low when a scan starts. */
	pia_set_input_ca1(0, 0);

	shiftkeys = readinputport(4) & 0x0003;
	ctrlkeys = readinputport(4) & 0x000c;

	for (port = 0; port < 4; port++)
	{
		UINT32 portval = readinputport(port);
		UINT32 newkeys = portval & ~(kbd_last_scan[port]);

		if (newkeys)
		{
			key_pressed = 1;
			for (bit = 0; bit < 16; bit++) {
				if (newkeys & 1)
				{
					apple1_kbd_data = (ctrlkeys)
					  ? apple1_control_keymap[port*16 + bit]
					  : (shiftkeys)
					  ? apple1_shifted_keymap[port*16 + bit]
					  : apple1_unshifted_keymap[port*16 + bit];
				}
				newkeys >>= 1;
			}
		}
		kbd_last_scan[port] = portval;
	}

	if (key_pressed)
	{
		/* The keyboard will pulse its strobe line when a key is
		   pressed.  A 10-usec pulse is typical. */
		pia_set_input_ca1(0, 1);
		timer_set(TIME_IN_USEC(10), 0, apple1_kbd_strobe_end);
	}
}
コード例 #12
0
void triplhnt_hit_callback(int code)
{
	triplhnt_hit_code = code;

	cpunum_set_input_line(0, 0, HOLD_LINE);
}
コード例 #13
0
static void TTL74148_3S_cb(void)
{
	cpunum_set_input_line(0, M6502_IRQ_LINE, TTL74148_output_valid_r(TTL74148_3S) ? CLEAR_LINE : ASSERT_LINE);
}
コード例 #14
0
static READ8_HANDLER( sound_nmi_to_slave_r )
{
	/* a read from here triggers an NMI pulse to the slave */
	cpunum_set_input_line(3, INPUT_LINE_NMI, PULSE_LINE);
	return 0xff;
}
コード例 #15
0
ファイル: talbot.c プロジェクト: CrouchingLlama/openlase-mame
static WRITE8_HANDLER( talbot_mcu_halt_w )
{
	data &= 1;
	cpunum_set_input_line(1, INPUT_LINE_HALT, data ? ASSERT_LINE : CLEAR_LINE);
}
コード例 #16
0
static WRITE8_HANDLER( spcforce_soundtrigger_w )
{
	cpunum_set_input_line(1, 0, (~data & 0x08) ? ASSERT_LINE : CLEAR_LINE);
}
コード例 #17
0
ファイル: sg1000a.c プロジェクト: broftkd/historic-mess
static void vdp_interrupt (int state)
{
	cpunum_set_input_line(0,0, HOLD_LINE);
}
コード例 #18
0
ファイル: lethal.c プロジェクト: cdenix/ps3-mame-0125
static INTERRUPT_GEN(lethalen_interrupt)
{
	if (K056832_is_IRQ_enabled(0)) cpunum_set_input_line(machine, 0, HD6309_IRQ_LINE, HOLD_LINE);
}
コード例 #19
0
ファイル: bigevglf.c プロジェクト: RobinDX/xmame
static void nmi_callback(int param)
{
    if (sound_nmi_enable) cpunum_set_input_line(2,INPUT_LINE_NMI,PULSE_LINE);
    else pending_nmi = 1;
    sound_state &= ~1;
}
コード例 #20
0
ファイル: lethal.c プロジェクト: cdenix/ps3-mame-0125
static WRITE8_HANDLER( sound_irq_w )
{
	cpunum_set_input_line(machine, 1, 0, HOLD_LINE);
}
コード例 #21
0
ファイル: capbowl.c プロジェクト: cdenix/ps3-mame-0125
static WRITE8_HANDLER( capbowl_sndcmd_w )
{
	cpunum_set_input_line(machine, 1, M6809_IRQ_LINE, HOLD_LINE);
	soundlatch_w(machine, offset, data);
}
コード例 #22
0
ファイル: lethal.c プロジェクト: cdenix/ps3-mame-0125
static void sound_nmi(void)
{
	cpunum_set_input_line(Machine, 1, INPUT_LINE_NMI, PULSE_LINE);
}
コード例 #23
0
ファイル: scramble.c プロジェクト: broftkd/historic-mame
static void sfx_sh_7474_callback(void)
{
	/* the Q bar is connected to the Z80's INT line.  But since INT is complemented, */
	/* we need to complement Q bar */
	cpunum_set_input_line(2, 0, !TTL7474_output_comp_r(3) ? ASSERT_LINE : CLEAR_LINE);
}
コード例 #24
0
ファイル: mcr.c プロジェクト: cdenix/ps3-mame-0125
static void ipu_ctc_interrupt(int state)
{
	cpunum_set_input_line(Machine, 3, 0, state);
}
コード例 #25
0
ファイル: boogwing.c プロジェクト: shangma/mame0112
static void sound_irq(int state)
{
	cpunum_set_input_line(1,1,state); /* IRQ 2 */
}
コード例 #26
0
ファイル: spbactn.c プロジェクト: Sunoo/nonamemame
static void irqhandler(int linestate)
{
	cpunum_set_input_line(1,0,linestate);
}
コード例 #27
0
ファイル: tubep.c プロジェクト: CrouchingLlama/openlase-mame
static WRITE8_HANDLER( rjammer_soundlatch_w )
{
	sound_latch = data;
	cpunum_set_input_line(2, INPUT_LINE_NMI, PULSE_LINE);
}
コード例 #28
0
ファイル: luctoday.c プロジェクト: shangma/mame0112
static void galaxian_7474_9M_1_callback(void)
{
	/* Q goes to the NMI line */
	cpunum_set_input_line(0, irq_line, TTL7474_output_r(1) ? CLEAR_LINE : ASSERT_LINE);
}
コード例 #29
0
ファイル: witch.c プロジェクト: broftkd/historic-mess
static INTERRUPT_GEN( witch_main_interrupt )
{
	cpunum_set_input_line(0,0,ASSERT_LINE);
}
コード例 #30
0
static void master_sound_nmi_callback(int param)
{
	/* bit 0 of the sound control determines if the NMI is actually delivered */
	if (sound_control & 0x01)
		cpunum_set_input_line(2, INPUT_LINE_NMI, PULSE_LINE);
}