diff --git a/src/drivers/asteroid.c b/src/drivers/asteroid.c index 6366d15e4..0c27f4313 100644 --- a/src/drivers/asteroid.c +++ b/src/drivers/asteroid.c @@ -539,6 +539,22 @@ INPUT_PORTS_START( astdelux ) PORT_DIPSETTING ( 0xa0, "1 each 4" ) PORT_DIPSETTING ( 0xc0, "1 each 2" ) PORT_DIPSETTING ( 0xe0, "None" ) + + PORT_START /* fake IN4 - inverter circuit */ + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) + + PORT_START /* IN5 - asteroid_cocktail_port0 */ + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 | IPF_PLAYER2) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_PLAYER2) + PORT_BIT( 0xe7, IP_ACTIVE_HIGH, IPT_UNUSED ) + + PORT_START /* IN6 - asteroid_cocktail_port1 */ + PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 | IPF_PLAYER2) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_PLAYER2) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT | IPF_2WAY | IPF_PLAYER2) INPUT_PORTS_END @@ -884,6 +900,8 @@ static DRIVER_INIT( asterock ) static DRIVER_INIT( astdelux ) { + asteroid_install_inv = true; + OVERLAY_START( astdelux_overlay ) OVERLAY_RECT( 0.0, 0.0, 1.0, 1.0, MAKE_ARGB(0x04,0x88,0xff,0xff) ) OVERLAY_END diff --git a/src/machine/asteroid_machine.c b/src/machine/asteroid_machine.c index 9ade3c407..f8e71f87a 100644 --- a/src/machine/asteroid_machine.c +++ b/src/machine/asteroid_machine.c @@ -196,6 +196,14 @@ WRITE_HANDLER( astdelux_bank_switch_w ) RAM[0x300 + i] = temp; } } + + if (asteroid_install_inv) + { + /* player selection is bit 0x80 */ + optional_io_active = (readinputport(asteroid_cocktail_switch) && (data & 0x80))?1:0; + avg_set_flip_x( optional_io_active ); + avg_set_flip_y( optional_io_active ); + } }