Ejemplo n.º 1
0
static READ16_HANDLER( pkgnshdx_input_r )
{
	UINT16 sel = ~realbrk_dsw_select[0];

	switch(offset)
	{
		case 0x00/2: return 0xffff;
		case 0x02/2: return input_port_0_word_r(0,0);/*Service buttons*/
		/*DSW,same handling as realbrk*/
		case 0x04/2:
			if (sel & 0x01)	return	(input_port_1_word_r(0,0) & 0x00ff) << 8;		// DSW1 low bits
			if (sel & 0x02)	return	(input_port_2_word_r(0,0) & 0x00ff) << 8;		// DSW2 low bits
			if (sel & 0x04)	return	(input_port_3_word_r(0,0) & 0x00ff) << 8;		// DSW3 low bits
			if (sel & 0x08)	return	(input_port_4_word_r(0,0) & 0x00ff) << 8;		// DSW4 low bits

			if (sel & 0x10)	return	((input_port_1_word_r(0,0) & 0x0300) << 0) |	// DSWs high 2 bits
									((input_port_2_word_r(0,0) & 0x0300) << 2) |
									((input_port_3_word_r(0,0) & 0x0300) << 4) |
									((input_port_4_word_r(0,0) & 0x0300) << 6) ;

			return 0xffff;
		case 0x06/2: return input_port_6_word_r(0,0);/*Buttons+Handle 2p*/
		case 0x08/2: return input_port_5_word_r(0,0);/*Buttons+Handle 1p*/
		case 0x0a/2: return 0xffff;
		case 0x0c/2: return 0xffff;
		case 0x0e/2: return 0xffff;
		case 0x10/2: return 0xffff;
		case 0x12/2: return 0xffff;
	}

	return 0xffff;
}
Ejemplo n.º 2
0
static READ16_HANDLER( darius_ioc_r )
{
	switch (offset)
	{
		case 0x01:
			return (taitosound_comm_r(0) & 0xff);	/* sound interface read */

		case 0x04:
			return input_port_0_word_r(0,mem_mask);	/* IN0 */

		case 0x05:
			return input_port_1_word_r(0,mem_mask);	/* IN1 */

		case 0x06:
			return input_port_2_word_r(0,mem_mask);	/* IN2 */

		case 0x07:
			return coin_word;	/* bits 3&4 coin lockouts, must return zero */

		case 0x08:
			return input_port_3_word_r(0,mem_mask);	/* DSW */
	}

logerror("CPU #0 PC %06x: warning - read unmapped ioc offset %06x\n",activecpu_get_pc(),offset);

	return 0xff;
}
Ejemplo n.º 3
0
static READ16_HANDLER( pkgnsh_input_r )
{
	switch(offset)
	{
		case 0x00/2: return 0xffff;
		case 0x02/2: return 0xffff;
		case 0x04/2: return input_port_0_word_r(0,0);/*Service buttons*/
		case 0x06/2: return input_port_1_word_r(0,0);/*DIP 2*/
		case 0x08/2: return input_port_2_word_r(0,0);/*DIP 1*/
		case 0x0a/2: return input_port_3_word_r(0,0);/*DIP 1+2 Hi-Bits*/
		case 0x0c/2: return input_port_4_word_r(0,0);/*Handle 1p*/
		case 0x0e/2: return input_port_5_word_r(0,0);/*Buttons 1p*/
		case 0x10/2: return input_port_6_word_r(0,0);/*Handle 2p*/
		case 0x12/2: return input_port_7_word_r(0,0);/*Buttons 2p*/
	}
	return 0xffff;
}