mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
Fixes suprridr0122u2gra by multiplexing inputs
This commit is contained in:
parent
a52032ce1c
commit
aca6a26c11
@ -215,18 +215,30 @@ ADDRESS_MAP_END
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Port definitions
|
||||
* Port definitions and helpers
|
||||
*
|
||||
*************************************/
|
||||
|
||||
#define SUPRRIDR_P1_CONTROL_PORT_TAG ("CONTP1")
|
||||
#define SUPRRIDR_P2_CONTROL_PORT_TAG ("CONTP2")
|
||||
|
||||
static UINT32 suprridr_control_r(void *param)
|
||||
{
|
||||
UINT32 ret;
|
||||
|
||||
/* screen flip multiplexes controls */
|
||||
if (suprridr_is_screen_flipped())
|
||||
ret = readinputportbytag(SUPRRIDR_P2_CONTROL_PORT_TAG);
|
||||
else
|
||||
ret = readinputportbytag(SUPRRIDR_P1_CONTROL_PORT_TAG);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static INPUT_PORTS_START( suprridr )
|
||||
PORT_START /* IN0 */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
|
||||
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(suprridr_control_r, 0)
|
||||
|
||||
PORT_START /* IN1 */
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
|
||||
@ -259,6 +271,22 @@ static INPUT_PORTS_START( suprridr )
|
||||
PORT_DIPNAME( 0x80, 0x00, "Invulnerability?" )
|
||||
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
|
||||
|
||||
PORT_START_TAG(SUPRRIDR_P1_CONTROL_PORT_TAG)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
|
||||
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
|
||||
PORT_START_TAG(SUPRRIDR_P2_CONTROL_PORT_TAG)
|
||||
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
|
||||
PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
|
||||
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@ WRITE8_HANDLER( suprridr_flipy_w );
|
||||
WRITE8_HANDLER( suprridr_fgdisable_w );
|
||||
WRITE8_HANDLER( suprridr_fgscrolly_w );
|
||||
WRITE8_HANDLER( suprridr_bgscrolly_w );
|
||||
int suprridr_is_screen_flipped(void);
|
||||
|
||||
WRITE8_HANDLER( suprridr_fgram_w );
|
||||
WRITE8_HANDLER( suprridr_bgram_w );
|
||||
|
@ -130,6 +130,12 @@ WRITE8_HANDLER( suprridr_bgscrolly_w )
|
||||
}
|
||||
|
||||
|
||||
int suprridr_is_screen_flipped(void)
|
||||
{
|
||||
return flipx; /* or is it flipy? */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user