summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <robbbert@users.noreply.github.com>2012-12-16 13:34:35 +0000
committer Robbbert <robbbert@users.noreply.github.com>2012-12-16 13:34:35 +0000
commitd2149a9960c0ad5023e6011ff617a03c221e2303 (patch)
tree5c1e549fab0685308e40c0925fa0c2a868af95b8
parentff193f9a68bb9a1ec44f65fa4640901c7b8d9d09 (diff)
shuttlei, skylove : fixed cocktail mode [Robbbert]
-rw-r--r--src/mame/drivers/8080bw.c39
-rw-r--r--src/mame/includes/8080bw.h2
-rw-r--r--src/mame/video/8080bw.c8
3 files changed, 45 insertions, 4 deletions
diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c
index 1b06bbee92d..6c24bb3cd90 100644
--- a/src/mame/drivers/8080bw.c
+++ b/src/mame/drivers/8080bw.c
@@ -2154,6 +2154,14 @@ static INPUT_PORTS_START( shuttlei )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+
+ PORT_START("P2")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+
+ /* Dummy port for cocktail mode */
+ INVADERS_CAB_TYPE_PORT
INPUT_PORTS_END
// 'no 1' which is displayed before each player plays actually refers to the wave number, not the player number!
@@ -2194,8 +2202,33 @@ static INPUT_PORTS_START( skylove )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(1)
+
+ PORT_START("P2")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
+
+ /* Dummy port for cocktail mode */
+ INVADERS_CAB_TYPE_PORT
INPUT_PORTS_END
+READ8_MEMBER( _8080bw_state::shuttlei_ff_r )
+{
+ UINT8 data = ioport("INPUTS")->read();
+ if (!m_c8080bw_flip_screen) return data;
+ return (data & 0x3b) | ioport("P2")->read();
+}
+
+WRITE8_MEMBER( _8080bw_state::shuttlei_ff_w )
+{
+ /* bit 0 goes high when first coin inserted
+ bit 1 also goes high when subsequent coins are inserted
+ These may be for indicator lamps under the start buttons.
+ bit 2 goes high while player 2 is playing */
+
+ m_c8080bw_flip_screen = BIT(data, 2) & BIT(ioport(CABINET_PORT_TAG)->read(), 0);
+}
+
static ADDRESS_MAP_START( shuttlei_map, AS_PROGRAM, 8, _8080bw_state )
AM_RANGE(0x0000, 0x1fff) AM_ROM
AM_RANGE(0x2000, 0x3fff) AM_RAM AM_SHARE("main_ram")
@@ -2207,7 +2240,7 @@ static ADDRESS_MAP_START( shuttlei_io_map, AS_IO, 8, _8080bw_state )
AM_RANGE(0xfc, 0xfc) AM_WRITENOP /* game writes 0xAA every so often (perhaps when base hit?) */
AM_RANGE(0xfd, 0xfd) AM_WRITE(shuttlei_sh_port_1_w)
AM_RANGE(0xfe, 0xfe) AM_READ_PORT("DSW") AM_WRITE(shuttlei_sh_port_2_w)
- AM_RANGE(0xff, 0xff) AM_READ_PORT("INPUTS")
+ AM_RANGE(0xff, 0xff) AM_READWRITE(shuttlei_ff_r,shuttlei_ff_w)
ADDRESS_MAP_END
@@ -4286,8 +4319,8 @@ GAME( 1979, spaceph, ozmawars, invaders, spaceph, driver_device, 0, ROT270
GAME( 1979, solfight, ozmawars, invaders, ozmawars, driver_device, 0, ROT270, "bootleg", "Solar Fight (bootleg of Ozma Wars)", GAME_SUPPORTS_SAVE )
GAME( 1979, yosakdon, 0, yosakdon, yosakdon, driver_device, 0, ROT270, "Wing", "Yosaku To Donbei (set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
GAME( 1979, yosakdona, yosakdon, yosakdon, yosakdon, driver_device, 0, ROT270, "Wing", "Yosaku To Donbei (set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
-GAMEL(1979, shuttlei, 0, shuttlei, shuttlei, driver_device, 0, ROT270, "Omori Electric Co., Ltd.", "Shuttle Invader", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL, layout_shuttlei )
-GAMEL(1979, skylove, 0, shuttlei, skylove, driver_device, 0, ROT270, "Omori Electric Co., Ltd.", "Sky Love", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_NO_COCKTAIL, layout_shuttlei )
+GAMEL(1979, shuttlei, 0, shuttlei, shuttlei, driver_device, 0, ROT270, "Omori Electric Co., Ltd.", "Shuttle Invader", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_shuttlei )
+GAMEL(1979, skylove, 0, shuttlei, skylove, driver_device, 0, ROT270, "Omori Electric Co., Ltd.", "Sky Love", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_shuttlei )
GAME (1978, claybust, 0, claybust, claybust, driver_device, 0, ROT0, "Model Racing", "Claybuster", GAME_SUPPORTS_SAVE | GAME_NO_SOUND ) // no titlescreen, Claybuster according to flyers
GAME (1980, gunchamp, 0, claybust, gunchamp, driver_device, 0, ROT0, "Model Racing", "Gun Champ", GAME_SUPPORTS_SAVE | GAME_NO_SOUND ) // no titlescreen, Gun Champ according to original cab
GAME( 19??, astropal, 0, astropal, astropal, driver_device, 0, ROT0, "Sidam?", "Astropal", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h
index c8013cf297f..28b358c3b62 100644
--- a/src/mame/includes/8080bw.h
+++ b/src/mame/includes/8080bw.h
@@ -80,6 +80,8 @@ public:
DECLARE_WRITE8_MEMBER(schasercv_sh_port_2_w);
DECLARE_WRITE8_MEMBER(yosakdon_sh_port_1_w);
DECLARE_WRITE8_MEMBER(yosakdon_sh_port_2_w);
+ DECLARE_READ8_MEMBER(shuttlei_ff_r);
+ DECLARE_WRITE8_MEMBER(shuttlei_ff_w);
DECLARE_WRITE8_MEMBER(shuttlei_sh_port_1_w);
DECLARE_WRITE8_MEMBER(shuttlei_sh_port_2_w);
DECLARE_READ8_MEMBER(claybust_gun_lo_r);
diff --git a/src/mame/video/8080bw.c b/src/mame/video/8080bw.c
index 8444b60a3e6..0f96611715b 100644
--- a/src/mame/video/8080bw.c
+++ b/src/mame/video/8080bw.c
@@ -454,7 +454,13 @@ UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32
for (i = 0; i < 8; i++)
{
- bitmap.pix32(y, x|i) = pens[BIT(data, 7)];
+ if (m_c8080bw_flip_screen)
+ {
+ if (y < 192)
+ bitmap.pix32(191-y, 255-(x|i)) = pens[BIT(data, 7)];
+ }
+ else
+ bitmap.pix32(y, x|i) = pens[BIT(data, 7)];
data <<= 1;
}
}