Beispiel #1
0
static READ8_HANDLER( videopin_misc_r )
{
	double plunger = calc_plunger_pos();

	// The plunger of the ball shooter has a black piece of
	// plastic (flag) attached to it. When the plunger flag passes
	// between the first section of the optical coupler, the MPU
	// receives a non-maskable interrupt. When the flag passes
	// between the second section of the optical coupler, the MPU
	// calculates the time between the PLUNGER1 and PLUNGER2
	// signals received. This results in the MPU displaying the
	// ball being shot onto the playfield at a certain speed.

	UINT8 val = readinputport(2);

	if (plunger >= 0.000 && plunger <= 0.001)
	{
		val &= ~1;   /* PLUNGER1 */
	}
	if (plunger >= 0.006 && plunger <= 0.007)
	{
		val &= ~2;   /* PLUNGER2 */
	}

	return val;
}
Beispiel #2
0
static READ8_HANDLER( mgolf_misc_r )
{
    double plunger = calc_plunger_pos(); /* see Video Pinball */

    UINT8 val = readinputport(3);

    if (plunger >= 0.000 && plunger <= 0.001)
    {
        val &= ~0x20;   /* PLUNGER1 */
    }
    if (plunger >= 0.006 && plunger <= 0.007)
    {
        val &= ~0x40;   /* PLUNGER2 */
    }

    return val;
}
Beispiel #3
0
static READ8_HANDLER( mgolf_misc_r )
{
	double plunger = calc_plunger_pos(space->machine); /* see Video Pinball */

	UINT8 val = input_port_read(space->machine, "61");

	if (plunger >= 0.000 && plunger <= 0.001)
	{
		val &= ~0x20;   /* PLUNGER1 */
	}
	if (plunger >= 0.006 && plunger <= 0.007)
	{
		val &= ~0x40;   /* PLUNGER2 */
	}

	return val;
}