From b152071023416cd88e23b713f0dbd5b5801354e1 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sat, 14 Apr 2018 00:31:38 +0200 Subject: warpwarp.cpp: added sos overlay, and added optional color setting for kaitei [Angelo Salese] --- src/mame/drivers/warpwarp.cpp | 34 +++++++++++++++++++++++++++++----- src/mame/includes/warpwarp.h | 6 ++++++ src/mame/layout/sos.lay | 29 +++++++++++++++++++++++++++++ src/mame/video/warpwarp.cpp | 30 ++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 5 deletions(-) create mode 100644 src/mame/layout/sos.lay diff --git a/src/mame/drivers/warpwarp.cpp b/src/mame/drivers/warpwarp.cpp index 3b15ec8932e..55bb376717e 100644 --- a/src/mame/drivers/warpwarp.cpp +++ b/src/mame/drivers/warpwarp.cpp @@ -136,6 +136,7 @@ Notes: #include "geebee.lh" #include "navarone.lh" +#include "sos.lh" #define MASTER_CLOCK XTAL(18'432'000) @@ -438,7 +439,16 @@ static INPUT_PORTS_START( navarone ) PORT_BIT( 0x02, 0x00, IPT_JOYSTICK_LEFT ) PORT_COCKTAIL INPUT_PORTS_END +static INPUT_PORTS_START( kaitei_config ) + PORT_START("CONFIG") + PORT_CONFNAME( 0x01, 0x00, "Color Type" ) + PORT_CONFSETTING( 0x00, "Black & White" ) + PORT_CONFSETTING( 0x01, "Color" ) +INPUT_PORTS_END + static INPUT_PORTS_START( kaitein ) + PORT_INCLUDE( kaitei_config ) + PORT_START("SW0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL @@ -479,6 +489,8 @@ static INPUT_PORTS_START( kaitein ) INPUT_PORTS_END static INPUT_PORTS_START( kaitei ) + PORT_INCLUDE( kaitei_config ) + PORT_START("SW0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 ) @@ -764,6 +776,18 @@ MACHINE_CONFIG_START(warpwarp_state::navarone) MCFG_VIDEO_START_OVERRIDE(warpwarp_state,navarone) MACHINE_CONFIG_END +MACHINE_CONFIG_START(warpwarp_state::kaitei) + geebee(config); + + /* basic machine hardware */ + MCFG_GFXDECODE_MODIFY("gfxdecode", 1k) + MCFG_PALETTE_MODIFY("palette") + MCFG_PALETTE_ENTRIES(4*2+1) + + MCFG_MACHINE_RESET_OVERRIDE(warpwarp_state,kaitei) +MACHINE_CONFIG_END + + MACHINE_CONFIG_START(warpwarp_state::bombbee) /* basic machine hardware */ @@ -972,7 +996,7 @@ DRIVER_INIT_MEMBER(warpwarp_state,kaitein) { m_handle_joystick = 1; - m_ball_pen = 1; + m_ball_pen = 8; m_ball_sizex = 1; m_ball_sizey = 16; } @@ -981,7 +1005,7 @@ DRIVER_INIT_MEMBER(warpwarp_state,kaitei) { m_handle_joystick = 0; - m_ball_pen = 1; + m_ball_pen = 8; m_ball_sizex = 1; m_ball_sizey = 16; } @@ -1021,9 +1045,9 @@ GAMEL(1978, geebeeb, geebee, geebeeb, geebeeb, warpwarp_state, geebee, GAMEL(1978, geebeeg, geebee, geebee, geebee, warpwarp_state, geebee, ROT90, "Namco (Gremlin license)", "Gee Bee (US)", MACHINE_SUPPORTS_SAVE, layout_geebee ) GAMEL(1980, navarone, 0, navarone, navarone, warpwarp_state, navarone, ROT90, "Namco", "Navarone", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_navarone ) -GAME( 1980, kaitein, kaitei, navarone, kaitein, warpwarp_state, kaitein, ROT90, "K.K. Tokki (Namco license)", "Kaitei Takara Sagashi (Namco license)", MACHINE_SUPPORTS_SAVE ) // pretty sure it didn't have a color overlay -GAME( 1980, kaitei, 0, navarone, kaitei, warpwarp_state, kaitei, ROT90, "K.K. Tokki", "Kaitei Takara Sagashi", MACHINE_SUPPORTS_SAVE ) // " -GAME( 1980, sos, 0, navarone, sos, warpwarp_state, sos, ROT90, "Namco", "SOS", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // developed by Shoei? +GAME( 1980, kaitein, kaitei, kaitei, kaitein, warpwarp_state, kaitein, ROT90, "K.K. Tokki (Namco license)", "Kaitei Takara Sagashi (Namco license)", MACHINE_SUPPORTS_SAVE ) // pretty sure it didn't have a color overlay +GAME( 1980, kaitei, 0, kaitei, kaitei, warpwarp_state, kaitei, ROT90, "K.K. Tokki", "Kaitei Takara Sagashi", MACHINE_SUPPORTS_SAVE ) // " +GAMEL( 1980, sos, 0, navarone, sos, warpwarp_state, sos, ROT90, "Namco", "SOS", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_sos ) // developed by Shoei? /* Color games */ GAME( 1979, bombbee, 0, bombbee, bombbee, warpwarp_state, bombbee, ROT90, "Namco", "Bomb Bee", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/includes/warpwarp.h b/src/mame/includes/warpwarp.h index 71d71b8dfa5..1b1cec16552 100644 --- a/src/mame/includes/warpwarp.h +++ b/src/mame/includes/warpwarp.h @@ -17,12 +17,14 @@ public: m_geebee_sound(*this, "geebee_custom"), m_geebee_videoram(*this, "geebee_videoram"), m_videoram(*this, "videoram"), + m_palette(*this, "palette"), m_in0(*this, "IN0"), m_in1(*this, "IN1"), m_in2(*this, "IN2"), m_dsw1(*this, "DSW1"), m_volin1(*this, "VOLIN1"), m_volin2(*this, "VOLIN2"), + m_in_config(*this, "CONFIG"), m_ports(*this, { { "SW0", "SW1", "DSW2", "PLACEHOLDER" } }) // "IN1" & "IN2" are read separately when offset==3 { } @@ -33,12 +35,14 @@ public: optional_device m_geebee_sound; optional_shared_ptr m_geebee_videoram; optional_shared_ptr m_videoram; + optional_device m_palette; optional_ioport m_in0; optional_ioport m_in1; optional_ioport m_in2; optional_ioport m_dsw1; optional_ioport m_volin1; optional_ioport m_volin2; + optional_ioport m_in_config; optional_ioport_array<4> m_ports; int m_geebee_bgw; @@ -73,6 +77,7 @@ public: DECLARE_WRITE8_MEMBER(geebee_videoram_w); virtual void machine_start() override; + DECLARE_MACHINE_RESET(kaitei); DECLARE_DRIVER_INIT(navarone); DECLARE_DRIVER_INIT(geebee); DECLARE_DRIVER_INIT(kaitein); @@ -100,6 +105,7 @@ public: void warpwarp(machine_config &config); void geebee(machine_config &config); void navarone(machine_config &config); + void kaitei(machine_config &config); void bombbee(machine_config &config); void geebeeb(machine_config &config); void bombbee_map(address_map &map); diff --git a/src/mame/layout/sos.lay b/src/mame/layout/sos.lay new file mode 100644 index 00000000000..1caa901bf2d --- /dev/null +++ b/src/mame/layout/sos.lay @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/video/warpwarp.cpp b/src/mame/video/warpwarp.cpp index b25964d30b6..ad9a8119f6c 100644 --- a/src/mame/video/warpwarp.cpp +++ b/src/mame/video/warpwarp.cpp @@ -40,6 +40,36 @@ PALETTE_INIT_MEMBER(warpwarp_state,navarone) palette.set_pen_color(3, geebee_palette[0]); } +MACHINE_RESET_MEMBER(warpwarp_state,kaitei) +{ + // TODO: some PCB videos/images shows a b&w arrangement, others a full colorized one. + // Both versions seems to have equal distribution (latter is hack/homebrew?) therefore + // support both under machine configuration. + if(m_in_config->read() & 1) // color + { + m_palette->set_pen_color(0, rgb_t(0x00,0x00,0x00)); + m_palette->set_pen_color(1, rgb_t(0x00,0xff,0xff)); + m_palette->set_pen_color(2, rgb_t(0x00,0xff,0xff)); + m_palette->set_pen_color(3, rgb_t(0x00,0x00,0x00)); + m_palette->set_pen_color(4, rgb_t(0x00,0x00,0x00)); + m_palette->set_pen_color(5, rgb_t(0x00,0xff,0x00)); + m_palette->set_pen_color(6, rgb_t(0x00,0xff,0x00)); + m_palette->set_pen_color(7, rgb_t(0x00,0x00,0x00)); + m_palette->set_pen_color(8, rgb_t(0xff,0x00,0x00)); // ball pen + } + else // b & w + { + m_palette->set_pen_color(0, geebee_palette[0]); + m_palette->set_pen_color(1, geebee_palette[1]); + m_palette->set_pen_color(2, geebee_palette[1]); + m_palette->set_pen_color(3, geebee_palette[0]); + m_palette->set_pen_color(4, geebee_palette[0]); + m_palette->set_pen_color(5, geebee_palette[1]); + m_palette->set_pen_color(6, geebee_palette[1]); + m_palette->set_pen_color(7, geebee_palette[0]); + m_palette->set_pen_color(8, geebee_palette[1]); // ball pen + } +} /*************************************************************************** -- cgit v1.2.3