From 89f75d74a92be020658ceccad05915f2057e721e Mon Sep 17 00:00:00 2001 From: Couriersud Date: Thu, 17 Jan 2008 23:34:58 +0000 Subject: [PATCH] phoenix.c: * Modified I8085 clock * Added dip locations * consolidated inputs * tagged inputs * combined memory maps pleiads: * video timing from schematics * palette from schematics (resnet.h) * no more colortable survival: * palette from schematics (resnet.h) --- src/mame/drivers/phoenix.c | 501 ++++++++---------------------------- src/mame/includes/phoenix.h | 4 +- src/mame/video/phoenix.c | 140 ++++------ 3 files changed, 155 insertions(+), 490 deletions(-) diff --git a/src/mame/drivers/phoenix.c b/src/mame/drivers/phoenix.c index 95cc45a8a98..b33517e2460 100644 --- a/src/mame/drivers/phoenix.c +++ b/src/mame/drivers/phoenix.c @@ -44,60 +44,43 @@ Pleiads: #include "phoenix.h" -static ADDRESS_MAP_START( phoenix_readmem, ADDRESS_SPACE_PROGRAM, 8 ) - AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) - AM_RANGE(0x4000, 0x4fff) AM_READ(MRA8_BANK1) /* 2 pages selected by bit 0 of the video register */ - AM_RANGE(0x7000, 0x73ff) AM_READ(phoenix_input_port_0_r) /* IN0 or IN1 */ - AM_RANGE(0x7800, 0x7bff) AM_READ(input_port_2_r) /* DSW */ -ADDRESS_MAP_END - -static ADDRESS_MAP_START( pleiads_readmem, ADDRESS_SPACE_PROGRAM, 8 ) - AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) - AM_RANGE(0x4000, 0x4fff) AM_READ(MRA8_BANK1) /* 2 pages selected by bit 0 of the video register */ - AM_RANGE(0x7000, 0x73ff) AM_READ(pleiads_input_port_0_r) /* IN0 or IN1 + protection */ - AM_RANGE(0x7800, 0x7bff) AM_READ(input_port_2_r) /* DSW */ -ADDRESS_MAP_END - -static ADDRESS_MAP_START( survival_readmem, ADDRESS_SPACE_PROGRAM, 8 ) - AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM) - AM_RANGE(0x4000, 0x4fff) AM_READ(MRA8_BANK1) /* 2 pages selected by bit 0 of the video register */ - AM_RANGE(0x6900, 0x69ff) AM_READ(AY8910_read_port_0_r) - AM_RANGE(0x7000, 0x73ff) AM_READ(survival_input_port_0_r)/* IN0 or IN1 */ - AM_RANGE(0x7800, 0x7bff) AM_READ(input_port_2_r) /* DSW */ -ADDRESS_MAP_END - - -static ADDRESS_MAP_START( phoenix_writemem, ADDRESS_SPACE_PROGRAM, 8 ) - AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM) - AM_RANGE(0x4000, 0x4fff) AM_WRITE(phoenix_videoram_w) /* 2 pages selected by bit 0 of the video register */ +static ADDRESS_MAP_START( phoenix_memory_map, ADDRESS_SPACE_PROGRAM, 8 ) + AM_RANGE(0x0000, 0x3fff) AM_ROM + AM_RANGE(0x4000, 0x4fff) AM_READWRITE(MRA8_BANK1, phoenix_videoram_w) /* 2 pages selected by bit 0 of the video register */ AM_RANGE(0x5000, 0x53ff) AM_WRITE(phoenix_videoreg_w) AM_RANGE(0x5800, 0x5bff) AM_WRITE(phoenix_scroll_w) AM_RANGE(0x6000, 0x63ff) AM_WRITE(phoenix_sound_control_a_w) AM_RANGE(0x6800, 0x6bff) AM_WRITE(phoenix_sound_control_b_w) + AM_RANGE(0x7000, 0x73ff) AM_READ(phoenix_input_port_0_r) /* IN0 or IN1 */ + AM_RANGE(0x7800, 0x7bff) AM_READ_PORT("DSW0") /* DSW */ ADDRESS_MAP_END -static ADDRESS_MAP_START( pleiads_writemem, ADDRESS_SPACE_PROGRAM, 8 ) - AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM) - AM_RANGE(0x4000, 0x4fff) AM_WRITE(phoenix_videoram_w) /* 2 pages selected by bit 0 of the video register */ +static ADDRESS_MAP_START( pleiads_memory_map, ADDRESS_SPACE_PROGRAM, 8 ) + AM_RANGE(0x0000, 0x3fff) AM_ROM + AM_RANGE(0x4000, 0x4fff) AM_READWRITE(MRA8_BANK1, phoenix_videoram_w) /* 2 pages selected by bit 0 of the video register */ AM_RANGE(0x5000, 0x53ff) AM_WRITE(pleiads_videoreg_w) AM_RANGE(0x5800, 0x5bff) AM_WRITE(phoenix_scroll_w) AM_RANGE(0x6000, 0x63ff) AM_WRITE(pleiads_sound_control_a_w) AM_RANGE(0x6800, 0x6bff) AM_WRITE(pleiads_sound_control_b_w) + AM_RANGE(0x7000, 0x73ff) AM_READ(pleiads_input_port_0_r) /* IN0 or IN1 + protection */ + AM_RANGE(0x7800, 0x7bff) AM_READ_PORT("DSW0") /* DSW */ ADDRESS_MAP_END -static ADDRESS_MAP_START( survival_writemem, ADDRESS_SPACE_PROGRAM, 8 ) - AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM) - AM_RANGE(0x4000, 0x4fff) AM_WRITE(phoenix_videoram_w) /* 2 pages selected by bit 0 of the video register */ +static ADDRESS_MAP_START( survival_memory_map, ADDRESS_SPACE_PROGRAM, 8 ) + AM_RANGE(0x0000, 0x3fff) AM_ROM + AM_RANGE(0x4000, 0x4fff) AM_READWRITE(MRA8_BANK1, phoenix_videoram_w) /* 2 pages selected by bit 0 of the video register */ AM_RANGE(0x5000, 0x53ff) AM_WRITE(phoenix_videoreg_w) AM_RANGE(0x5800, 0x5bff) AM_WRITE(phoenix_scroll_w) AM_RANGE(0x6800, 0x68ff) AM_WRITE(AY8910_control_port_0_w) - AM_RANGE(0x6900, 0x69ff) AM_WRITE(AY8910_write_port_0_w) + AM_RANGE(0x6900, 0x69ff) AM_READWRITE(AY8910_read_port_0_r, AY8910_write_port_0_w) + AM_RANGE(0x7000, 0x73ff) AM_READ(survival_input_port_0_r) /* IN0 or IN1 */ + AM_RANGE(0x7800, 0x7bff) AM_READ_PORT("DSW0") /* DSW */ ADDRESS_MAP_END static INPUT_PORTS_START( phoenix ) - PORT_START /* IN0 */ + PORT_START_TAG("IN0") /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) @@ -107,7 +90,7 @@ static INPUT_PORTS_START( phoenix ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_START /* IN1 */ + PORT_START_TAG("IN1") /* IN1 */ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL @@ -115,207 +98,83 @@ static INPUT_PORTS_START( phoenix ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) + PORT_START_TAG("DSW0") /* DSW0 */ + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" ) PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x01, "4" ) PORT_DIPSETTING( 0x02, "5" ) PORT_DIPSETTING( 0x03, "6" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:3,4" ) PORT_DIPSETTING( 0x00, "3K 30K" ) PORT_DIPSETTING( 0x04, "4K 40K" ) PORT_DIPSETTING( 0x08, "5K 50K" ) PORT_DIPSETTING( 0x0c, "6K 60K" ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:5" ) PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:6" ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:7" ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) + PORT_START_TAG("CAB") /* fake port for non-memory mapped dip switch */ + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW1:!8" ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END static INPUT_PORTS_START( phoenixa ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_INCLUDE( phoenix ) - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3K 30K" ) - PORT_DIPSETTING( 0x04, "4K 40K" ) - PORT_DIPSETTING( 0x08, "5K 50K" ) - PORT_DIPSETTING( 0x0c, "6K 60K" ) + PORT_MODIFY("DSW0") /* Coinage is backwards from phoenix (Amstar) */ - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Coinage ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:5" ) PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END static INPUT_PORTS_START( phoenixt ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_INCLUDE( phoenix ) - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3K 30K" ) - PORT_DIPSETTING( 0x04, "4K 40K" ) - PORT_DIPSETTING( 0x08, "5K 50K" ) - PORT_DIPSETTING( 0x0c, "6K 60K" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) +PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:5" ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END static INPUT_PORTS_START( phoenix3 ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_INCLUDE( phoenix ) - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3K 30K" ) - PORT_DIPSETTING( 0x04, "4K 40K" ) - PORT_DIPSETTING( 0x08, "5K 50K" ) - PORT_DIPSETTING( 0x0c, "6K 60K" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:5" ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:6" ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coinage ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:7" ) PORT_DIPSETTING( 0x40, "A - 2C/1C B - 1C/3C" ) PORT_DIPSETTING( 0x00, "A - 1C/1C B - 1C/6C" ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END static INPUT_PORTS_START( condor ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_INCLUDE( phoenix ) - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" ) PORT_DIPSETTING( 0x00, "2" ) PORT_DIPSETTING( 0x01, "3" ) PORT_DIPSETTING( 0x02, "4" ) PORT_DIPSETTING( 0x03, "5" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:3,4" ) PORT_DIPSETTING( 0x00, "Every 6000" ) PORT_DIPSETTING( 0x08, "Every 10000" ) PORT_DIPSETTING( 0x04, "Every 14000" ) PORT_DIPSETTING( 0x0c, "Every 18000" ) - PORT_DIPNAME( 0x70, 0x30, "Fuel Consumption" ) + PORT_DIPNAME( 0x70, 0x30, "Fuel Consumption" ) PORT_DIPLOCATION( "SW1:5,6,7" ) PORT_DIPSETTING( 0x00, "Slowest" ) PORT_DIPSETTING( 0x10, "Slower" ) PORT_DIPSETTING( 0x20, "Slow" ) @@ -324,14 +183,8 @@ static INPUT_PORTS_START( condor ) PORT_DIPSETTING( 0x50, "Fast" ) PORT_DIPSETTING( 0x60, "Faster" ) PORT_DIPSETTING( 0x70, "Fastest" ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) - - PORT_START + PORT_START_TAG("COINAGE") PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_B ) ) PORT_DIPSETTING( 0x08, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x09, DEF_STR( 2C_2C ) ) @@ -369,243 +222,90 @@ static INPUT_PORTS_START( condor ) INPUT_PORTS_END static INPUT_PORTS_START( falcona ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_INCLUDE( phoenix ) - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" ) PORT_DIPSETTING( 0x00, "2" ) PORT_DIPSETTING( 0x01, "3" ) PORT_DIPSETTING( 0x02, "4" ) PORT_DIPSETTING( 0x03, "5" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:3,4" ) PORT_DIPSETTING( 0x00, "3K 30K" ) PORT_DIPSETTING( 0x04, "4K 40K" ) PORT_DIPSETTING( 0x08, "5K 50K" ) PORT_DIPSETTING( 0x0c, "6K 60K" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:5" ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:6" ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coinage ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:7" ) PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END static INPUT_PORTS_START( nextfase ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_INCLUDE( phoenix ) - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" ) PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x01, "2" ) PORT_DIPSETTING( 0x02, "3" ) PORT_DIPSETTING( 0x03, "4" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:3,4" ) PORT_DIPSETTING( 0x00, "3K 30K" ) PORT_DIPSETTING( 0x04, "4K 40K" ) PORT_DIPSETTING( 0x08, "5K 50K" ) PORT_DIPSETTING( 0x0c, "6K 60K" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:5" ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x60, 0x00, DEF_STR( Coinage ) ) + PORT_DIPNAME( 0x60, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:6,7" ) PORT_DIPSETTING( 0x00, "1C/1C & 1C/2C" ) PORT_DIPSETTING( 0x20, "2C/3C & 1C/3C" ) PORT_DIPSETTING( 0x40, "1C/2C & 1C/4C" ) PORT_DIPSETTING( 0x60, "2C/5C & 1C/5C" ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END static INPUT_PORTS_START( pleiads ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) /* Protection. See 0x0552 */ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_INCLUDE( phoenix ) - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL + PORT_MODIFY("IN0") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) /* Protection. See 0x0552 */ - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3K 30K" ) - PORT_DIPSETTING( 0x04, "4K 40K" ) - PORT_DIPSETTING( 0x08, "5K 50K" ) - PORT_DIPSETTING( 0x0c, "6K 60K" ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END static INPUT_PORTS_START( pleiadce ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) /* Protection. See 0x0552 */ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) + PORT_INCLUDE( pleiads ) - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION( "SW1:3,4" ) PORT_DIPSETTING( 0x00, "7K 70K" ) PORT_DIPSETTING( 0x04, "8K 80K" ) PORT_DIPSETTING( 0x08, "9K 90K" ) /*PORT_DIPSETTING( 0x0c, "INVALID" ) Sets bonus to A000 */ - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) INPUT_PORTS_END static INPUT_PORTS_START( capitol ) - PORT_START /* IN0 */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) - - PORT_START /* IN1 */ - PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL - - PORT_START /* DSW0 */ - PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPSETTING( 0x01, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x03, "6" ) - PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) - PORT_DIPSETTING( 0x00, "3K 30K" ) - PORT_DIPSETTING( 0x04, "4K 40K" ) - PORT_DIPSETTING( 0x08, "5K 50K" ) - PORT_DIPSETTING( 0x0c, "6K 60K" ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - - PORT_START /* fake port for non-memory mapped dip switch */ - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) + PORT_INCLUDE( phoenix ) + + PORT_MODIFY("DSW0") + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) INPUT_PORTS_END static INPUT_PORTS_START( survival ) - PORT_START /* IN0 */ + PORT_START_TAG("IN0") /* IN0 */ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 ) @@ -615,7 +315,7 @@ static INPUT_PORTS_START( survival ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_START /* IN1 */ + PORT_START_TAG("IN1") /* IN1 */ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_SPECIAL ) /* comes from IN0 0-2 */ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL @@ -623,7 +323,7 @@ static INPUT_PORTS_START( survival ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_COCKTAIL - PORT_START + PORT_START_TAG("DSW0") PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) ) PORT_DIPSETTING( 0x03, "2" ) PORT_DIPSETTING( 0x02, "3" ) @@ -644,7 +344,7 @@ static INPUT_PORTS_START( survival ) PORT_DIPSETTING( 0x60, DEF_STR( 1C_1C ) ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK ) - PORT_START /* fake port for non-memory mapped dip switch */ + PORT_START_TAG("CAB") /* fake port for non-memory mapped dip switch */ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x01, DEF_STR( Cocktail ) ) @@ -664,13 +364,13 @@ static const gfx_layout charlayout = }; static GFXDECODE_START( phoenix ) - GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 16 ) - GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 0, 16 ) + GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 32 ) + GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 0, 32 ) GFXDECODE_END static GFXDECODE_START( pleiads ) - GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 32 ) - GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 32*4, 32 ) + GFXDECODE_ENTRY( REGION_GFX1, 0, charlayout, 0, 64 ) + GFXDECODE_ENTRY( REGION_GFX2, 0, charlayout, 0, 64 ) GFXDECODE_END @@ -721,7 +421,7 @@ static MACHINE_DRIVER_START( phoenix ) /* basic machine hardware */ MDRV_CPU_ADD_TAG("main", 8085A, CPU_CLOCK) /* 2.75 MHz */ - MDRV_CPU_PROGRAM_MAP(phoenix_readmem,phoenix_writemem) + MDRV_CPU_PROGRAM_MAP(phoenix_memory_map, 0) MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) @@ -761,14 +461,12 @@ static MACHINE_DRIVER_START( pleiads ) /* basic machine hardware */ MDRV_IMPORT_FROM(phoenix) MDRV_CPU_MODIFY("main") - MDRV_CPU_PROGRAM_MAP(pleiads_readmem,pleiads_writemem) + MDRV_CPU_PROGRAM_MAP(pleiads_memory_map, 0) /* video hardware */ MDRV_GFXDECODE(pleiads) - MDRV_COLORTABLE_LENGTH(32*4+32*4) MDRV_PALETTE_INIT(pleiads) - MDRV_VIDEO_START(pleiads) /* sound hardware */ MDRV_SOUND_REPLACE("tms", TMS36XX, 247) @@ -788,28 +486,30 @@ MACHINE_DRIVER_END static MACHINE_DRIVER_START( survival ) /* basic machine hardware */ - MDRV_CPU_ADD(8085A,11000000/4) /* 2.75 MHz */ - MDRV_CPU_PROGRAM_MAP(survival_readmem,survival_writemem) - - MDRV_SCREEN_REFRESH_RATE(60) - MDRV_SCREEN_VBLANK_TIME(DEFAULT_REAL_60HZ_VBLANK_DURATION) - + MDRV_CPU_ADD_TAG("main", 8085A, CPU_CLOCK) /* 5.50 MHz */ + MDRV_CPU_PROGRAM_MAP(survival_memory_map, 0) + + /* schematics fairly identical to phoenix, however the interesting + * page is missing + */ + MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART) + + MDRV_MACHINE_RESET(phoenix) + /* video hardware */ MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER) MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) - MDRV_SCREEN_SIZE(32*8, 32*8) - MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 26*8-1) MDRV_GFXDECODE(phoenix) MDRV_PALETTE_LENGTH(256) - MDRV_COLORTABLE_LENGTH(16*4+16*4) - - MDRV_PALETTE_INIT(phoenix) + + MDRV_PALETTE_INIT(survival) MDRV_VIDEO_START(phoenix) MDRV_VIDEO_UPDATE(phoenix) - + /* sound hardware */ MDRV_SPEAKER_STANDARD_MONO("mono") + /* FIXME: check clock */ MDRV_SOUND_ADD(AY8910, 11000000/4) MDRV_SOUND_CONFIG(survival_ay8910_interface) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) @@ -821,6 +521,7 @@ static MACHINE_DRIVER_START( condor ) /* basic machine hardware */ MDRV_IMPORT_FROM(phoenix) + /* FIXME: Verify clock. This is most likely 11MHz/2 */ MDRV_CPU_REPLACE("main", Z80, 11000000/4) /* 2.75 MHz??? */ MACHINE_DRIVER_END @@ -1314,17 +1015,17 @@ GAME( 1980, phoenix3, phoenix, phoenix, phoenix3, 0, ROT90, "bootleg", " GAME( 1981, phoenixc, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg?", "Phoenix (IRECSA, G.G.I Corp)", GAME_SUPPORTS_SAVE ) -GAME( 1981, condor, phoenix, condor, condor, condor, ROT90, "Sidam (bootleg)", "Condor (bootleg of Phoenix)", 0 ) +GAME( 1981, condor, phoenix, condor, condor, condor, ROT90, "Sidam (bootleg)", "Condor (bootleg of Phoenix)", GAME_SUPPORTS_SAVE ) // the following 2 were common bootlegs in england & france respectively GAME( 1980, falcon, phoenix, phoenix, phoenixt, 0, ROT90, "bootleg", "Falcon (bootleg of Phoenix) (set 1)", GAME_SUPPORTS_SAVE ) GAME( 1980, vautour, phoenix, phoenix, phoenixt, 0, ROT90, "Jeutel (bootleg)", "Vautour (bootleg of Phoenix) (set 1)", GAME_SUPPORTS_SAVE ) -GAME( 1980, vautour2, phoenix, condor, condor, condor, ROT90, "bootleg", "Vautour (bootleg of Phoenix) (set 2)", 0 ) +GAME( 1980, vautour2, phoenix, condor, condor, condor, ROT90, "bootleg", "Vautour (bootleg of Phoenix) (set 2)", GAME_SUPPORTS_SAVE ) // fenix is an italian bootleg based on vautour -GAME( 1980, fenix, phoenix, condor, condor, condor, ROT90, "bootleg", "Fenix (bootleg of Phoenix)", GAME_NOT_WORKING ) -GAME( 1980, griffon, phoenix, condor, condor, condor, ROT90, "Videotron (bootleg)", "Griffon (bootleg of Phoenix)", 0 ) -GAME( 1980, falcona, phoenix, condor, falcona, 0, ROT90, "bootleg", "Falcon (bootleg of Phoenix) (set 2)", 0 ) +GAME( 1980, fenix, phoenix, condor, condor, condor, ROT90, "bootleg", "Fenix (bootleg of Phoenix)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) +GAME( 1980, griffon, phoenix, condor, condor, condor, ROT90, "Videotron (bootleg)", "Griffon (bootleg of Phoenix)", GAME_SUPPORTS_SAVE ) +GAME( 1980, falcona, phoenix, condor, falcona, 0, ROT90, "bootleg", "Falcon (bootleg of Phoenix) (set 2)", GAME_SUPPORTS_SAVE ) // nextfase is a spanish bootleg -GAME( 1981, nextfase, phoenix, phoenix, nextfase, 0, ROT90, "Petaco S.A. (bootleg)","Next Fase (bootleg of Phoenix)", 0 ) +GAME( 1981, nextfase, phoenix, phoenix, nextfase, 0, ROT90, "Petaco S.A. (bootleg)","Next Fase (bootleg of Phoenix)", GAME_SUPPORTS_SAVE ) GAME( 1981, pleiads, 0, pleiads, pleiads, 0, ROT90, "Tehkan", "Pleiads (Tehkan)", GAME_IMPERFECT_COLORS ) GAME( 1981, pleiadbl, pleiads, pleiads, pleiads, 0, ROT90, "bootleg", "Pleiads (bootleg)", GAME_IMPERFECT_COLORS ) diff --git a/src/mame/includes/phoenix.h b/src/mame/includes/phoenix.h index 78e3510ab42..0227b4856f8 100644 --- a/src/mame/includes/phoenix.h +++ b/src/mame/includes/phoenix.h @@ -7,7 +7,7 @@ #define MASTER_CLOCK XTAL_11MHz #define PIXEL_CLOCK (MASTER_CLOCK/2) -#define CPU_CLOCK (PIXEL_CLOCK/2) +#define CPU_CLOCK (PIXEL_CLOCK) #define HTOTAL (512-160) #define HBSTART (256) #define HBEND (0) @@ -53,9 +53,9 @@ VIDEO_UPDATE( naughtyb ); /*----------- defined in video/phoenix.c -----------*/ PALETTE_INIT( phoenix ); +PALETTE_INIT( survival ); PALETTE_INIT( pleiads ); VIDEO_START( phoenix ); -VIDEO_START( pleiads ); VIDEO_UPDATE( phoenix ); WRITE8_HANDLER( phoenix_videoram_w ); diff --git a/src/mame/video/phoenix.c b/src/mame/video/phoenix.c index 22aa6e78aff..4c1379be485 100644 --- a/src/mame/video/phoenix.c +++ b/src/mame/video/phoenix.c @@ -62,65 +62,75 @@ static const res_net_info phoenix_net_info = } }; +static const res_net_info pleiades_net_info = +{ + RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_OPEN_COL, + { + { RES_NET_AMP_NONE, 150, 270, 2, { 270, 1 } }, + { RES_NET_AMP_NONE, 150, 270, 2, { 270, 1 } }, + { RES_NET_AMP_NONE, 150, 270, 2, { 270, 1 } } + } +}; + +static const res_net_info survival_net_info = +{ + RES_NET_VCC_5V | RES_NET_VBIAS_5V | RES_NET_VIN_OPEN_COL, + { + { RES_NET_AMP_NONE, 270, 270, 2, { 180, 1 } }, + { RES_NET_AMP_NONE, 270, 270, 2, { 180, 1 } }, + { RES_NET_AMP_NONE, 270, 270, 2, { 180, 1 } } + } +}; + PALETTE_INIT( phoenix ) { int i; - int t[4]= {0,1,2,3}; rgb_t *rgb; - #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) rgb = compute_res_net_all(color_prom, &phoenix_decode_info, &phoenix_net_info); /* native order */ for (i=0;i<256;i++) { int col; - col = ((t[i & 0x03] << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0x60); + col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0x60); palette_set_color(machine,i,rgb[col]); } palette_normalize_range(machine->palette, 0, 255, 0, 255); free(rgb); +} - /* first bank of characters use colors 0x00-0x1f and 0x40-0x5f */ - /* second bank of characters use colors 0x20-0x3f and 0x60-0x7f */ +PALETTE_INIT( survival ) +{ + int i; + rgb_t *rgb; + + rgb = compute_res_net_all(color_prom, &phoenix_decode_info, &survival_net_info); + /* native order */ + for (i=0;i<256;i++) + { + int col; + col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0x60); + palette_set_color(machine,i,rgb[col]); + } + palette_normalize_range(machine->palette, 0, 255, 0, 255); + free(rgb); } PALETTE_INIT( pleiads ) { int i; - #define COLOR(gfxn,offs) (colortable[machine->drv->gfxdecodeinfo[gfxn].color_codes_start + offs]) + rgb_t *rgb; - - for (i = 0;i < machine->drv->total_colors;i++) - { - int bit0,bit1,r,g,b; - - - bit0 = (color_prom[0] >> 0) & 0x01; - bit1 = (color_prom[machine->drv->total_colors] >> 0) & 0x01; - r = 0x55 * bit0 + 0xaa * bit1; - bit0 = (color_prom[0] >> 2) & 0x01; - bit1 = (color_prom[machine->drv->total_colors] >> 2) & 0x01; - g = 0x55 * bit0 + 0xaa * bit1; - bit0 = (color_prom[0] >> 1) & 0x01; - bit1 = (color_prom[machine->drv->total_colors] >> 1) & 0x01; - b = 0x55 * bit0 + 0xaa * bit1; - - palette_set_color(machine,i,MAKE_RGB(r,g,b)); - color_prom++; - } - - /* first bank of characters use colors 0x00-0x1f, 0x40-0x5f, 0x80-0x9f and 0xc0-0xdf */ - /* second bank of characters use colors 0x20-0x3f, 0x60-0x7f, 0xa0-0xbf and 0xe0-0xff */ - for (i = 0;i < 0x80;i++) + rgb = compute_res_net_all(color_prom, &phoenix_decode_info, &pleiades_net_info); + /* native order */ + for (i=0;i<256;i++) { int col; - - - col = ((i & 0x1c) >> 2) | ((i & 0x03) << 3) | ((i & 0x60) << 1); - - COLOR(0,i) = col; - COLOR(1,i) = col | 0x20; - } + col = ((i << 3 ) & 0x18) | ((i>>2) & 0x07) | (i & 0xE0); + palette_set_color(machine,i,rgb[col]); + } + palette_normalize_range(machine->palette, 0, 255, 0, 255); + free(rgb); } /*************************************************************************** @@ -157,30 +167,6 @@ static TILE_GET_INFO( get_bg_tile_info ) 0); } -static TILE_GET_INFO( pleiads_get_fg_tile_info ) -{ - int code; - - code = videoram_pg[videoram_pg_index][tile_index]; - SET_TILE_INFO( - 1, - code, - (code >> 5) | (palette_bank << 3), - (tile_index & 0x1f) ? 0 : TILE_FORCE_LAYER0); /* first row (column) is opaque */ -} - -static TILE_GET_INFO( pleiads_get_bg_tile_info ) -{ - int code; - - code = videoram_pg[videoram_pg_index][tile_index + 0x800]; - SET_TILE_INFO( - 0, - code, - (code >> 5) | (palette_bank << 3), - 0); -} - /*************************************************************************** Start the video hardware emulation. @@ -215,28 +201,6 @@ VIDEO_START( phoenix ) state_save_register_global(cocktail_mode); } -VIDEO_START( pleiads ) -{ - videoram_pg[0] = auto_malloc(0x1000); - videoram_pg[1] = auto_malloc(0x1000); - - memory_configure_bank(1, 0, 1, videoram_pg[0], 0); - memory_configure_bank(1, 1, 1, videoram_pg[1], 0); - memory_set_bank(1, 0); - - videoram_pg_index = 0; - - fg_tilemap = tilemap_create(pleiads_get_fg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN,8,8,32,32); - bg_tilemap = tilemap_create(pleiads_get_bg_tile_info,tilemap_scan_rows,TILEMAP_TYPE_PEN, 8,8,32,32); - - tilemap_set_transparent_pen(fg_tilemap,0); - - tilemap_set_scrolldx(fg_tilemap, 0, (HTOTAL - HBSTART)); - tilemap_set_scrolldx(bg_tilemap, 0, (HTOTAL - HBSTART)); - tilemap_set_scrolldy(fg_tilemap, 0, (VTOTAL - VBSTART)); - tilemap_set_scrolldy(bg_tilemap, 0, (VTOTAL - VBSTART)); -} - /*************************************************************************** Memory handlers @@ -287,7 +251,7 @@ WRITE8_HANDLER( phoenix_videoreg_w ) WRITE8_HANDLER( pleiads_videoreg_w ) { - if (videoram_pg_index != (data & 1)) + if (videoram_pg_index != (data & 1)) { /* set memory bank */ videoram_pg_index = data & 1; @@ -306,7 +270,7 @@ WRITE8_HANDLER( pleiads_videoreg_w ) if (palette_bank != ((data >> 1) & 3)) { - palette_bank = ((data >> 1) & 3); + palette_bank = ((data >> 1) & 3); tilemap_mark_all_tiles_dirty(ALL_TILEMAPS); @@ -329,14 +293,14 @@ WRITE8_HANDLER( phoenix_scroll_w ) READ8_HANDLER( phoenix_input_port_0_r ) { if (cocktail_mode) - return (input_port_0_r(0) & 0x07) | (input_port_1_r(0) & 0xf8); + return (readinputportbytag("IN0") & 0x07) | (readinputportbytag("IN1") & 0xf8); else - return input_port_0_r(0); + return readinputportbytag("IN0"); } READ8_HANDLER( pleiads_input_port_0_r ) { - int ret = phoenix_input_port_0_r(0) & 0xf7; + int ret = readinputportbytag("IN0") & 0xf7; /* handle Pleiads protection */ switch (pleiads_protection_question) @@ -359,7 +323,7 @@ READ8_HANDLER( pleiads_input_port_0_r ) READ8_HANDLER( survival_input_port_0_r ) { - int ret = phoenix_input_port_0_r(0); + int ret = readinputportbytag("IN0"); if (survival_protection_value) {