summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/target/mame/arcade.lua3
-rw-r--r--src/mame/arcade.flt1
-rw-r--r--src/mame/drivers/markham.cpp606
-rw-r--r--src/mame/drivers/topspeed.cpp2
-rw-r--r--src/mame/includes/markham.h117
-rw-r--r--src/mame/mame.lst10
-rw-r--r--src/mame/video/markham.cpp67
7 files changed, 712 insertions, 94 deletions
diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua
index 823e64c38e4..b49382881dd 100644
--- a/scripts/target/mame/arcade.lua
+++ b/scripts/target/mame/arcade.lua
@@ -3659,9 +3659,6 @@ files {
MAME_DIR .. "src/mame/drivers/shangha3.cpp",
MAME_DIR .. "src/mame/includes/shangha3.h",
MAME_DIR .. "src/mame/video/shangha3.cpp",
- MAME_DIR .. "src/mame/drivers/strnskil.cpp",
- MAME_DIR .. "src/mame/includes/strnskil.h",
- MAME_DIR .. "src/mame/video/strnskil.cpp",
MAME_DIR .. "src/mame/drivers/tonton.cpp",
}
diff --git a/src/mame/arcade.flt b/src/mame/arcade.flt
index 6a9b4228f35..99b786f88b8 100644
--- a/src/mame/arcade.flt
+++ b/src/mame/arcade.flt
@@ -1154,7 +1154,6 @@ stellafr.cpp
stfight.cpp
stlforce.cpp
strkzn.cpp
-strnskil.cpp
stuntair.cpp
stv.cpp
su2000.cpp
diff --git a/src/mame/drivers/markham.cpp b/src/mame/drivers/markham.cpp
index 63b21464925..d671cbc24a3 100644
--- a/src/mame/drivers/markham.cpp
+++ b/src/mame/drivers/markham.cpp
@@ -3,36 +3,163 @@
/*****************************************************************************
Markham (c) 1983 Sun Electronics
+ Strength & Skill (c) 1984 Sun Electronics
Driver by Uki
- 17/Jun/2001 -
+ TODO:
+ - needs merging with ikki.cpp
+ - look up schematics for all games
+ - banbam and pettanp likely share the same MCU code, check once redumped
+ - fix banbam/pettanp simulated comms or hopefully hook up MCU ports and
+ at least get something out of the existing dump
+
+ Notes:
+ Banbam has a Fujitsu MB8841 4-Bit MCU for protection labeled SUN 8212.
+ Its internal ROM has been imaged, manually typed, and decoded as sun-8212.ic3.
+ Pettan Pyuu is a clone of Banbam although with different levels / play fields.
+
+ Protection currently fails on both Pettan Pyuu and Banbam if you play either
+ game to Round 11. When you get there, the music still plays but all you see is
+ "ERR-43" in red text at the bottom left of the screen and the game is no longer
+ playable. Also, in some earlier rounds you notice the background graphics are
+ also not producing logical playfields as bits of graphics are in different
+ locations.
*****************************************************************************/
#include "emu.h"
#include "includes/markham.h"
-#include "cpu/z80/z80.h"
-#include "sound/sn76496.h"
-#include "screen.h"
-#include "speaker.h"
+#define MASTER_CLOCK (20_MHz_XTAL)
+#define PIXEL_CLOCK (MASTER_CLOCK/4) // guess
+#define CPU_CLOCK (8_MHz_XTAL)
+/* also a guess */
+#define HTOTAL (320)
+#define HBEND (8)
+#define HBSTART (248)
+#define VTOTAL (262)
+#define VBEND (16)
+#define VBSTART (240)
READ8_MEMBER(markham_state::markham_e004_r)
{
return 0;
}
+WRITE8_MEMBER(markham_state::coin_output_w)
+{
+ /* only activated after first write? */
+ /* all machines write to slot B at selftest even without a coin */
+ if (m_coin_unlock)
+ {
+ /* banbam and pettanp write to both slot A and B when a coin
+ is inserted regardless of which; does this imply that they only
+ have one coin counter? */
+ machine().bookkeeping().coin_counter_w(0, BIT(data, 0));
+ machine().bookkeeping().coin_counter_w(1, BIT(data, 1));
+ }
+ else
+ {
+ m_coin_unlock = true;
+ }
+}
+
+template<int Bit>
+WRITE8_MEMBER(markham_state::flipscreen_w)
+{
+ /* Strength & Skill hardware only */
+ m_scroll_ctrl = data >> 5;
+
+ if (flip_screen() != (BIT(data, Bit)))
+ {
+ flip_screen_set(BIT(data, Bit));
+ machine().tilemap().mark_all_dirty();
+ }
+}
+
/****************************************************************************/
-void markham_state::markham_master_map(address_map &map)
+READ8_MEMBER(markham_state::strnskil_d800_r)
+{
+ /* bit0: interrupt type?, bit1: CPU2 busack? */
+
+ return (m_irq_source);
+}
+
+TIMER_DEVICE_CALLBACK_MEMBER(markham_state::strnskil_scanline)
+{
+ int scanline = param;
+
+ if (scanline == m_irq_scanline_end || scanline == m_irq_scanline_start)
+ {
+ m_maincpu->set_input_line(0, HOLD_LINE);
+
+ m_irq_source = (scanline != m_irq_scanline_end);
+ }
+}
+
+/****************************************************************************/
+
+READ8_MEMBER(markham_state::banbam_protection_r)
+{
+ int res;
+
+ switch (m_maincpu->pc())
+ {
+ case 0x6094: res = 0xa5; break;
+ case 0x6118: res = 0x20; break; /* bits 0-3 unknown */
+ case 0x6199: res = 0x30; break; /* bits 0-3 unknown */
+ case 0x61f5: res = 0x60 | (machine().rand() & 0x0f); break; /* bits 0-3 unknown */
+ case 0x6255: res = 0x77; break;
+ case 0x62a8: res = 0xb4; break;
+ default: res = 0xff; break;
+ }
+
+ logerror("%04x: protection_r -> %02x\n", m_maincpu->pc(), res);
+ return res;
+}
+
+READ8_MEMBER(markham_state::pettanp_protection_r)
+{
+ int res;
+
+ switch (m_maincpu->pc())
+ {
+ case 0x6066: res = 0xa5; break;
+ case 0x60dc: res = 0x20; break; /* bits 0-3 unknown */
+ case 0x615d: res = 0x30; break; /* bits 0-3 unknown */
+ case 0x61b9: res = 0x60 | (machine().rand() & 0x0f); break; /* bits 0-3 unknown */
+ case 0x6219: res = 0x77; break;
+ case 0x626c: res = 0xb4; break;
+ default: res = 0xff; break;
+ }
+
+ logerror("%04x: protection_r -> %02x\n", m_maincpu->pc(), res);
+ return res;
+}
+
+WRITE8_MEMBER(markham_state::protection_w)
+{
+ logerror("%04x: protection_w %02x\n", m_maincpu->pc(), data);
+}
+
+/****************************************************************************/
+
+void markham_state::base_master_map(address_map &map)
{
map(0x0000, 0x5fff).rom();
map(0xc000, 0xc7ff).ram();
+ map(0xd000, 0xd7ff).ram().w(this, FUNC(markham_state::videoram_w)).share("videoram");
+}
+
+void markham_state::markham_master_map(address_map &map)
+{
+ base_master_map(map);
+
map(0xc800, 0xcfff).ram().share("spriteram");
- map(0xd000, 0xd7ff).ram().w(this, FUNC(markham_state::markham_videoram_w)).share("videoram");
map(0xd800, 0xdfff).ram().share("share1");
map(0xe000, 0xe000).portr("DSW2");
@@ -44,11 +171,32 @@ void markham_state::markham_master_map(address_map &map)
map(0xe005, 0xe005).portr("SYSTEM");
- map(0xe008, 0xe008).nopw(); /* coin counter? */
+ map(0xe008, 0xe008).w(this, FUNC(markham_state::coin_output_w));
map(0xe009, 0xe009).nopw(); /* to CPU2 busreq */
map(0xe00c, 0xe00d).writeonly().share("xscroll");
- map(0xe00e, 0xe00e).w(this, FUNC(markham_state::markham_flipscreen_w));
+ map(0xe00e, 0xe00e).w(this, FUNC(markham_state::flipscreen_w<0>));
+}
+
+void markham_state::strnskil_master_map(address_map &map)
+{
+ base_master_map(map);
+
+ map(0x6000, 0x9fff).rom();
+
+ map(0xc800, 0xcfff).ram().share("share1");
+
+ map(0xd800, 0xd800).r(this, FUNC(markham_state::strnskil_d800_r));
+ map(0xd801, 0xd801).portr("DSW1");
+ map(0xd802, 0xd802).portr("DSW2");
+ map(0xd803, 0xd803).portr("SYSTEM");
+ map(0xd804, 0xd804).portr("P1");
+ map(0xd805, 0xd805).portr("P2");
+
+ /* same write used here is used for scrolling */
+ map(0xd808, 0xd808).w(this, FUNC(markham_state::flipscreen_w<3>));
+ map(0xd809, 0xd809).w(this, FUNC(markham_state::coin_output_w));
+ map(0xd80a, 0xd80b).writeonly().share("xscroll");
}
void markham_state::markham_slave_map(address_map &map)
@@ -63,6 +211,15 @@ void markham_state::markham_slave_map(address_map &map)
map(0xc003, 0xc003).nopw(); /* unknown */
}
+void markham_state::strnskil_slave_map(address_map &map)
+{
+ map(0x0000, 0x5fff).rom();
+ map(0xc000, 0xc7ff).ram().share("spriteram");
+ map(0xc800, 0xcfff).ram().share("share1");
+
+ map(0xd801, 0xd801).w("sn1", FUNC(sn76496_device::write));
+ map(0xd802, 0xd802).w("sn2", FUNC(sn76496_device::write));
+}
/****************************************************************************/
@@ -107,7 +264,7 @@ static INPUT_PORTS_START( markham )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" ) /* These next five dips are unused according to the manual */
+ PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" ) /* These next five dips are unused according to the manual */
PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" )
PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" )
@@ -115,7 +272,7 @@ static INPUT_PORTS_START( markham )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
- PORT_START("P1") /* e002 */
+ PORT_START("P1") /* e002 */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
@@ -125,7 +282,7 @@ static INPUT_PORTS_START( markham )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_START("P2") /* e003 */
+ PORT_START("P2") /* e003 */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
@@ -135,7 +292,7 @@ static INPUT_PORTS_START( markham )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
- PORT_START("SYSTEM") /* e005 */
+ PORT_START("SYSTEM") /* e005 */
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -146,6 +303,174 @@ static INPUT_PORTS_START( markham )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
INPUT_PORTS_END
+static INPUT_PORTS_START( strnskil )
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x02, 0x00, "Unknown 1-2" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Flip_Screen ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, "Unknown 1-4" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_DIPNAME( 0xf0, 0x00, "Coin1 / Coin2" )
+ PORT_DIPSETTING( 0x00, "1C 1C / 1C 1C" )
+ PORT_DIPSETTING( 0x10, "2C 1C / 2C 1C" )
+ PORT_DIPSETTING( 0x20, "2C 1C / 1C 3C" )
+ PORT_DIPSETTING( 0x30, "1C 1C / 1C 2C" )
+ PORT_DIPSETTING( 0x40, "1C 1C / 1C 3C" )
+ PORT_DIPSETTING( 0x50, "1C 1C / 1C 4C" )
+ PORT_DIPSETTING( 0x60, "1C 1C / 1C 5C" )
+ PORT_DIPSETTING( 0x70, "1C 1C / 1C 6C" )
+ PORT_DIPSETTING( 0x80, "1C 2C / 1C 2C" )
+ PORT_DIPSETTING( 0x90, "1C 2C / 1C 4C" )
+ PORT_DIPSETTING( 0xa0, "1C 2C / 1C 5C" )
+ PORT_DIPSETTING( 0xb0, "1C 2C / 1C 10C" )
+ PORT_DIPSETTING( 0xc0, "1C 2C / 1C 11C" )
+ PORT_DIPSETTING( 0xd0, "1C 2C / 1C 12C" )
+ PORT_DIPSETTING( 0xe0, "1C 2C / 1C 6C" )
+ PORT_DIPSETTING( 0xf0, DEF_STR( Free_Play ) )
+
+ PORT_START("DSW2")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Difficulty ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
+ PORT_DIPSETTING( 0x01, DEF_STR( Hard ) )
+ PORT_DIPNAME( 0x02, 0x00, "Unknown 2-2" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x02, DEF_STR( On ) )
+ PORT_DIPNAME( 0x04, 0x00, "Unknown 2-3" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( On ) )
+ PORT_DIPNAME( 0x08, 0x00, "Unknown 2-4" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x08, DEF_STR( On ) )
+ PORT_DIPNAME( 0x10, 0x00, "Unknown 2-5" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x00, "Unknown 2-6" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x00, "Unknown 2-7" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x00, "Freeze" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+
+ PORT_START("P1") /* d804 */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
+
+ PORT_START("P2") /* d805 */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
+
+ PORT_START("SYSTEM") /* d803 */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_SERVICE( 0x20, IP_ACTIVE_HIGH )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+INPUT_PORTS_END
+
+static INPUT_PORTS_START( banbam )
+ PORT_START("DSW1")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1")
+ PORT_DIPSETTING( 0x00, "3" )
+ PORT_DIPSETTING( 0x01, "5" )
+ PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:2")
+ PORT_DIPSETTING( 0x02, DEF_STR( Upright ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
+ PORT_DIPNAME( 0x04, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:3")
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x04, DEF_STR( On ) )
+ PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW1:4" )
+ PORT_DIPNAME( 0xf0, 0x00, "Coin1 / Coin2" ) PORT_DIPLOCATION("SW1:5,6,7,8")
+ PORT_DIPSETTING( 0x00, "1C 1C / 1C 1C" )
+ PORT_DIPSETTING( 0x10, "2C 1C / 2C 1C" )
+ PORT_DIPSETTING( 0x20, "2C 1C / 1C 3C" )
+ PORT_DIPSETTING( 0x30, "1C 1C / 1C 2C" )
+ PORT_DIPSETTING( 0x40, "1C 1C / 1C 3C" )
+ PORT_DIPSETTING( 0x50, "1C 1C / 1C 4C" )
+ PORT_DIPSETTING( 0x60, "1C 1C / 1C 5C" )
+ PORT_DIPSETTING( 0x70, "1C 1C / 1C 6C" )
+ PORT_DIPSETTING( 0x80, "1C 2C / 1C 2C" )
+ PORT_DIPSETTING( 0x90, "1C 2C / 1C 4C" )
+ PORT_DIPSETTING( 0xa0, "1C 2C / 1C 5C" )
+ PORT_DIPSETTING( 0xb0, "1C 2C / 1C 10C" )
+ PORT_DIPSETTING( 0xc0, "1C 2C / 1C 11C" )
+ PORT_DIPSETTING( 0xd0, "1C 2C / 1C 12C" )
+ PORT_DIPSETTING( 0xe0, "1C 2C / 1C 6C" )
+ PORT_DIPSETTING( 0xf0, DEF_STR( Free_Play ) )
+
+ PORT_START("DSW2")
+ PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1")
+ PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:2,3")
+ PORT_DIPSETTING( 0x00, "20000 50000" )
+ PORT_DIPSETTING( 0x02, "20000 80000" )
+ PORT_DIPSETTING( 0x04, "20000" )
+ PORT_DIPSETTING( 0x06, DEF_STR( None ) )
+ PORT_DIPNAME( 0x08, 0x00, "Second Practice" ) PORT_DIPLOCATION("SW2:4")
+ PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x00, DEF_STR( On ) )
+ PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" ) /* These four dips are unused according to the manual */
+ PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )
+ PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" )
+ PORT_DIPNAME( 0x80, 0x00, "Freeze" ) PORT_DIPLOCATION("SW2:8") // game stands in a tight loop at $14-$16 -> $866 if this is putted off
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+
+ PORT_START("P1") /* d804 */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
+
+ PORT_START("P2") /* d805 */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
+
+ PORT_START("SYSTEM") /* d803 */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 )
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_SERVICE( 0x20, IP_ACTIVE_HIGH )
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+INPUT_PORTS_END
/****************************************************************************/
@@ -178,26 +503,22 @@ static GFXDECODE_START( gfx_markham )
GFXDECODE_ENTRY( "gfx1", 0x0000, spritelayout, 0, 64 )
GFXDECODE_END
-
MACHINE_CONFIG_START(markham_state::markham)
/* basic machine hardware */
- MCFG_DEVICE_ADD("maincpu", Z80,8000000/2) /* 4.000MHz */
+ MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK/2) /* 4.000MHz */
MCFG_DEVICE_PROGRAM_MAP(markham_master_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", markham_state, irq0_line_hold)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", markham_state, irq0_line_hold)
- MCFG_DEVICE_ADD("sub", Z80,8000000/2) /* 4.000MHz */
+ MCFG_DEVICE_ADD("subcpu", Z80, CPU_CLOCK/2) /* 4.000MHz */
MCFG_DEVICE_PROGRAM_MAP(markham_slave_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", markham_state, irq0_line_hold)
+ MCFG_DEVICE_VBLANK_INT_DRIVER("screen", markham_state, irq0_line_hold)
MCFG_QUANTUM_TIME(attotime::from_hz(6000))
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_SIZE(32*8, 32*8)
- MCFG_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 2*8, 30*8-1)
+ MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
MCFG_SCREEN_UPDATE_DRIVER(markham_state, screen_update_markham)
MCFG_SCREEN_PALETTE("palette")
@@ -209,42 +530,243 @@ MACHINE_CONFIG_START(markham_state::markham)
/* sound hardware */
SPEAKER(config, "mono").front_center();
- MCFG_DEVICE_ADD("sn1", SN76496, 8000000/2)
+ MCFG_DEVICE_ADD("sn1", SN76496, CPU_CLOCK/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
- MCFG_DEVICE_ADD("sn2", SN76496, 8000000/2)
+ MCFG_DEVICE_ADD("sn2", SN76496, CPU_CLOCK/2)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
MACHINE_CONFIG_END
+MACHINE_CONFIG_START(markham_state::strnskil)
+
+ markham(config);
+ /* basic machine hardware */
+ MCFG_DEVICE_REMOVE("maincpu")
+ MCFG_DEVICE_ADD("maincpu", Z80, CPU_CLOCK/2) /* 4.000MHz */
+ MCFG_DEVICE_PROGRAM_MAP(strnskil_master_map)
+ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", markham_state, strnskil_scanline, "screen", 0, 1)
+
+ MCFG_DEVICE_REMOVE("subcpu")
+ MCFG_DEVICE_ADD("subcpu", Z80, CPU_CLOCK/2) /* 4.000MHz */
+ MCFG_DEVICE_PROGRAM_MAP(strnskil_slave_map)
+ MCFG_DEVICE_PERIODIC_INT_DRIVER(markham_state, irq0_line_hold, 2*(PIXEL_CLOCK/HTOTAL/VTOTAL))
+
+ /* video hardware */
+ MCFG_SCREEN_MODIFY("screen")
+ MCFG_SCREEN_UPDATE_DRIVER(markham_state, screen_update_strnskil)
+
+ MCFG_VIDEO_START_OVERRIDE(markham_state, strnskil)
+
+ /* sound hardware */
+ MCFG_DEVICE_MODIFY("sn1")
+ MCFG_DEVICE_CLOCK(CPU_CLOCK/4)
+MACHINE_CONFIG_END
+
+MACHINE_CONFIG_START(markham_state::banbam)
+
+ strnskil(config);
+ MCFG_DEVICE_ADD("mcu", MB8841, CPU_CLOCK/2) /* 4.000MHz */
+ // MCFG_MB88XX_READ_K_CB(READ8(*this, markham_state, mcu_portk_r))
+ // MCFG_MB88XX_READ_R0_CB(READ8(*this, markham_state, mcu_portr0_r))
+ // MCFG_MB88XX_WRITE_R0_CB(WRITE8(*this, markham_state, mcu_portr0_w))
+ MCFG_DEVICE_DISABLE()
+MACHINE_CONFIG_END
+
/****************************************************************************/
ROM_START( markham )
ROM_REGION( 0x10000, "maincpu", 0 ) /* main CPU */
- ROM_LOAD( "tv3.9", 0x0000, 0x2000, CRC(59391637) SHA1(e0cfe49a5591d6a6e64c3277319a19235b0ee6ea) )
- ROM_LOAD( "tvg4.10", 0x2000, 0x2000, CRC(1837bcce) SHA1(50e1ae0a4937f09a3dced48bb12f57cee846487a) )
- ROM_LOAD( "tvg5.11", 0x4000, 0x2000, CRC(651da602) SHA1(9f33d6ea0526af9be8ac9210910ea768da825ee5) )
+ ROM_LOAD( "tv3.9", 0x0000, 0x2000, CRC(59391637) SHA1(e0cfe49a5591d6a6e64c3277319a19235b0ee6ea) )
+ ROM_LOAD( "tvg4.10", 0x2000, 0x2000, CRC(1837bcce) SHA1(50e1ae0a4937f09a3dced48bb12f57cee846487a) )
+ ROM_LOAD( "tvg5.11", 0x4000, 0x2000, CRC(651da602) SHA1(9f33d6ea0526af9be8ac9210910ea768da825ee5) )
+
+ ROM_REGION( 0x10000, "subcpu", 0 ) /* sub CPU */
+ ROM_LOAD( "tvg1.5", 0x0000, 0x2000, CRC(c5299766) SHA1(a6c903088ffd6c5ae0ba7ff50c8509a185f88220) )
+ ROM_LOAD( "tvg2.6", 0x4000, 0x2000, CRC(b216300a) SHA1(036fafd0277b3422cf491db77748358da1ecfb43) )
+
+ ROM_REGION( 0x6000, "gfx1", 0 ) /* sprite */
+ ROM_LOAD( "tvg6.84", 0x0000, 0x2000, CRC(ab933ae5) SHA1(d2bdbc35d751480ddf8b89b90063510684b00db2) )
+ ROM_LOAD( "tvg7.85", 0x2000, 0x2000, CRC(ce8edda7) SHA1(5312754aec20791398de57f08857d4097a7cfc2c) )
+ ROM_LOAD( "tvg8.86", 0x4000, 0x2000, CRC(74d1536a) SHA1(ff2efbbe1420282643558a65bfa5fd278cdaf135) )
+
+ ROM_REGION( 0x6000, "gfx2", 0 ) /* bg */
+ ROM_LOAD( "tvg9.87", 0x0000, 0x2000, CRC(42168675) SHA1(d2cce79a05ca7fda9347630fe0045a2d8182025d) )
+ ROM_LOAD( "tvg10.88", 0x2000, 0x2000, CRC(fa9feb67) SHA1(669c6e1defc33541c36d4deb9667b67254f53a37) )
+ ROM_LOAD( "tvg11.89", 0x4000, 0x2000, CRC(71f3dd49) SHA1(8fecb6b76907c592d545dafeaa47cf765513b3fe) )
+
+ ROM_REGION( 0x0700, "proms", 0 ) /* color PROMs */
+ ROM_LOAD( "14-3.99", 0x0000, 0x0100, CRC(89d09126) SHA1(1f78f3b3ef8c6ba9c00a58ae89837d9a92e5078f) ) /* R */
+ ROM_LOAD( "14-4.100", 0x0100, 0x0100, CRC(e1cafe6c) SHA1(8c37c3829bf1b96690fb853a2436f1b5e8d45e8c) ) /* G */
+ ROM_LOAD( "14-5.101", 0x0200, 0x0100, CRC(2d444fa6) SHA1(66b64133ca740686bedd33bafd20a3f9f3df97d4) ) /* B */
+ ROM_LOAD( "14-1.61", 0x0300, 0x0200, CRC(3ad8306d) SHA1(877f1d58cb8da9098ec71a7c7aec633dbf9e76e6) ) /* sprite */
+ ROM_LOAD( "14-2.115", 0x0500, 0x0200, CRC(12a4f1ff) SHA1(375e37d7162053d45da66eee23d66bd432303c1c) ) /* bg */
+ROM_END
+
+ROM_START( strnskil )
+ ROM_REGION( 0x10000, "maincpu", 0 ) /* main CPU */
+ ROM_LOAD( "tvg3.7", 0x0000, 0x2000, CRC(31fd793a) SHA1(b86efe8ea60edf414a23fb6abc09db691c085fe9) )
+ ROM_CONTINUE( 0x8000, 0x2000 )
+ ROM_LOAD( "tvg4.8", 0x2000, 0x2000, CRC(c58315b5) SHA1(2039cd89ef59d05f353f6c367fa851c0f60cdc4a) )
+ ROM_LOAD( "tvg5.9", 0x4000, 0x2000, CRC(29e7ded5) SHA1(6eae5988139f22c3ff166192e4fda77db38a79bc) )
+ ROM_LOAD( "tvg6.10", 0x6000, 0x2000, CRC(8b126a4b) SHA1(68b617c5dc120c777e152919cba9daeaf3ceac5f) )
+
+ ROM_REGION( 0x10000, "subcpu", 0 ) /* sub CPU */
+ ROM_LOAD( "tvg1.2", 0x0000, 0x2000, CRC(b586b753) SHA1(7c9891fb279b1323c059ffdcf7c009bf971037be) )
+ ROM_LOAD( "tvg2.3", 0x2000, 0x2000, CRC(8bd71bb6) SHA1(cc35e1e4cbb893ab04f1b6ceef0a050243e3b462) )
+
+ ROM_REGION( 0x6000, "gfx1", 0 ) /* sprite */
+ ROM_LOAD( "tvg7.90", 0x0000, 0x2000, CRC(ee3bd593) SHA1(398e426e53695cc184d5a2750fd32a1c2c68bf30) )
+ ROM_LOAD( "tvg8.92", 0x2000, 0x2000, CRC(1b265360) SHA1(fbc64c504639106c1813bf91bd31bda1ce4c7ffe) )
+ ROM_LOAD( "tvg9.94", 0x4000, 0x2000, CRC(776c7ca6) SHA1(23fd1ac15395822b318db4435e48dd4e0e3e61de) )
+
+ ROM_REGION( 0x6000, "gfx2", 0 ) /* bg */
+ ROM_LOAD( "tvg12.102", 0x0000, 0x2000, CRC(68b9d888) SHA1(7a4071fe882c1949979f97a020d7c6e95643ef42) )
+ ROM_LOAD( "tvg11.101", 0x2000, 0x2000, CRC(7f2179ff) SHA1(24fab1f4430ae883bc1f477d3df7643e06c67349) )
+ ROM_LOAD( "tvg10.100", 0x4000, 0x2000, CRC(321ad963) SHA1(9b50fbf0c3b4ce7ce3c68339b99a2ccadef4646f) )
+
+ ROM_REGION( 0x0800, "proms", 0 ) /* color PROMs */
+ ROM_LOAD( "15-3.prm", 0x0000, 0x0100, CRC(dbcd3bec) SHA1(1baeec277b16c82b67e10da9d4c84cf383ef4a82) ) /* R */
+ ROM_LOAD( "15-4.prm", 0x0100, 0x0100, CRC(9eb7b6cf) SHA1(86451e8a510f8cfbc0be7d4e7bb1ee7dfd67f1f4) ) /* G */
+ ROM_LOAD( "15-5.prm", 0x0200, 0x0100, CRC(9b30a7f3) SHA1(a0aefc2c8325b95ea227e404583d14622b04a3b9) ) /* B */
+ ROM_LOAD( "15-1.prm", 0x0300, 0x0200, CRC(d4f5b3d7) SHA1(9a244c77a752df655ff756e063d56c2c767e37d9) ) /* sprite */
+ ROM_LOAD( "15-2.prm", 0x0500, 0x0200, CRC(cdffede9) SHA1(3ecdf91e3f78eb6cdd3a6f58d1a89d448a676c52) ) /* bg */
+
+ ROM_REGION( 0x0100, "scroll_prom", 0 ) /* scroll control PROM */
+ ROM_LOAD( "15-6.prm", 0x0000, 0x0100, CRC(ec4faf5b) SHA1(7ebbf50807d04105ebadec91bded069408e399ba) )
+ROM_END
+
+ROM_START( guiness )
+ ROM_REGION( 0x10000, "maincpu", 0 ) /* main CPU */
+ ROM_LOAD( "tvg3.15", 0x0000, 0x2000, CRC(3a605ad8) SHA1(f6e2dd4989fdb68bc55857f5a8f06601416139d5) )
+ ROM_CONTINUE( 0x8000, 0x2000 )
+ ROM_LOAD( "tvg4.8", 0x2000, 0x2000, CRC(c58315b5) SHA1(2039cd89ef59d05f353f6c367fa851c0f60cdc4a) )
+ ROM_LOAD( "tvg5.9", 0x4000, 0x2000, CRC(29e7ded5) SHA1(6eae5988139f22c3ff166192e4fda77db38a79bc) )
+ ROM_LOAD( "tvg6.10", 0x6000, 0x2000, CRC(8b126a4b) SHA1(68b617c5dc120c777e152919cba9daeaf3ceac5f) )
+
+ ROM_REGION( 0x10000, "subcpu", 0 ) /* sub CPU */
+ ROM_LOAD( "tvg1.2", 0x0000, 0x2000, CRC(b586b753) SHA1(7c9891fb279b1323c059ffdcf7c009bf971037be) )
+ ROM_LOAD( "tvg2.3", 0x2000, 0x2000, CRC(8bd71bb6) SHA1(cc35e1e4cbb893ab04f1b6ceef0a050243e3b462) )
+
+ ROM_REGION( 0x6000, "gfx1", 0 ) /* sprite */
+ ROM_LOAD( "tvg7.90", 0x0000, 0x2000, CRC(ee3bd593) SHA1(398e426e53695cc184d5a2750fd32a1c2c68bf30) )
+ ROM_LOAD( "tvg8.92", 0x2000, 0x2000, CRC(1b265360) SHA1(fbc64c504639106c1813bf91bd31bda1ce4c7ffe) )
+ ROM_LOAD( "tvg9.94", 0x4000, 0x2000, CRC(776c7ca6) SHA1(23fd1ac15395822b318db4435e48dd4e0e3e61de) )
+
+ ROM_REGION( 0x6000, "gfx2", 0 ) /* bg */
+ ROM_LOAD( "=tvg12.15", 0x0000, 0x2000, CRC(a82c923d) SHA1(2bd2b028d782fac18f2fe9c9ef73ce0af67db347) )
+ ROM_LOAD( "tvg11.15", 0x2000, 0x2000, CRC(d432c96f) SHA1(0d4b3af778dbd40bc26bad4c673a9ce1ef537c04) )
+ ROM_LOAD( "tvg10.15", 0x4000, 0x2000, CRC(a53959d6) SHA1(cdf7acf1a75d83b259948c482f06543624a695a3) )
+
+ ROM_REGION( 0x0800, "proms", 0 ) /* color PROMs */
+ ROM_LOAD( "15-3.prm", 0x0000, 0x0100, CRC(dbcd3bec) SHA1(1baeec277b16c82b67e10da9d4c84cf383ef4a82) ) /* R */
+ ROM_LOAD( "15-4.prm", 0x0100, 0x0100, CRC(9eb7b6cf) SHA1(86451e8a510f8cfbc0be7d4e7bb1ee7dfd67f1f4) ) /* G */
+ ROM_LOAD( "15-5.prm", 0x0200, 0x0100, CRC(9b30a7f3) SHA1(a0aefc2c8325b95ea227e404583d14622b04a3b9) ) /* B */
+ ROM_LOAD( "15-1.prm", 0x0300, 0x0200, CRC(d4f5b3d7) SHA1(9a244c77a752df655ff756e063d56c2c767e37d9) ) /* sprite */
+ ROM_LOAD( "15-2.prm", 0x0500, 0x0200, CRC(cdffede9) SHA1(3ecdf91e3f78eb6cdd3a6f58d1a89d448a676c52) ) /* bg */
+
+ ROM_REGION( 0x0100, "scroll_prom", 0 ) /* scroll control PROM */
+ ROM_LOAD( "15-6.prm", 0x0000, 0x0100, CRC(ec4faf5b) SHA1(7ebbf50807d04105ebadec91bded069408e399ba) )
+ROM_END
+
+ROM_START( banbam )
+ ROM_REGION( 0x10000, "maincpu", 0 ) /* main CPU */
+ ROM_LOAD( "ban-rom2.ic7", 0x0000, 0x2000, CRC(a5aeef6e) SHA1(92c1ad6ccb96b723e122899150e3c1855c5017b8) )
+ ROM_CONTINUE( 0x8000, 0x2000 )
+ ROM_LOAD( "ban-rom3.ic8", 0x2000, 0x2000, CRC(f91472bf) SHA1(94988b7bf2be3d3704a802db544070251d6c6a9c) )
+ ROM_LOAD( "ban-rom4.ic9", 0x4000, 0x2000, CRC(436a09ef) SHA1(7287f741fbf3ac43d5c46b2f43ec4439cb3d0d56) )
+ ROM_LOAD( "ban-rom5.ic10", 0x6000, 0x2000, CRC(45205f86) SHA1(a11d10beb21519f797c902b8a18775c8e2aa0fae) )
- ROM_REGION( 0x10000, "sub", 0 ) /* sub CPU */
- ROM_LOAD( "tvg1.5", 0x0000, 0x2000, CRC(c5299766) SHA1(a6c903088ffd6c5ae0ba7ff50c8509a185f88220) )
- ROM_LOAD( "tvg2.6", 0x4000, 0x2000, CRC(b216300a) SHA1(036fafd0277b3422cf491db77748358da1ecfb43) )
+ ROM_REGION( 0x10000, "subcpu", 0 ) /* sub CPU */
+ ROM_LOAD( "ban-rom1.ic2", 0x0000, 0x2000, CRC(e36009f6) SHA1(72c485e8c19fbfc9c850094cfd87f1055154c0c5) )
ROM_REGION( 0x6000, "gfx1", 0 ) /* sprite */
- ROM_LOAD( "tvg6.84", 0x0000, 0x2000, CRC(ab933ae5) SHA1(d2bdbc35d751480ddf8b89b90063510684b00db2) )
- ROM_LOAD( "tvg7.85", 0x2000, 0x2000, CRC(ce8edda7) SHA1(5312754aec20791398de57f08857d4097a7cfc2c) )
- ROM_LOAD( "tvg8.86", 0x4000, 0x2000, CRC(74d1536a) SHA1(ff2efbbe1420282643558a65bfa5fd278cdaf135) )
+ ROM_LOAD( "ban-rom6.ic90", 0x0000, 0x2000, CRC(41fc44df) SHA1(1c4f21cdc423078fab58370d5245a13292bf7fe6) )
+ ROM_LOAD( "ban-rom7.ic92", 0x2000, 0x2000, CRC(8b429c5b) SHA1(505796eac2c8dd84f9ed29a6227b3243f81ec072) )
+ ROM_LOAD( "ban-rom8.ic94", 0x4000, 0x2000, CRC(76c02d6b) SHA1(9ef7585da5376cdd604afee281594e24c69addf2) )
ROM_REGION( 0x6000, "gfx2", 0 ) /* bg */
- ROM_LOAD( "tvg9.87", 0x0000, 0x2000, CRC(42168675) SHA1(d2cce79a05ca7fda9347630fe0045a2d8182025d) )
- ROM_LOAD( "tvg10.88", 0x2000, 0x2000, CRC(fa9feb67) SHA1(669c6e1defc33541c36d4deb9667b67254f53a37) )
- ROM_LOAD( "tvg11.89", 0x4000, 0x2000, CRC(71f3dd49) SHA1(8fecb6b76907c592d545dafeaa47cf765513b3fe) )
+ ROM_LOAD( "ban-rom11.ic102", 0x0000, 0x2000, CRC(aa827c57) SHA1(87d0c5e7df6ce40b0b2fc8f4b9dd43d4b7b0bc2e) )
+ ROM_LOAD( "ban-rom10.ic101", 0x2000, 0x2000, CRC(51bd1c5c) SHA1(f714a3168d59cb4f8512440f7a2e27b6e0726a39) )
+ ROM_LOAD( "ban-rom9.ic100", 0x4000, 0x2000, CRC(c0a5a4c8) SHA1(7f0978669218982d379a5d72c6198a33a8213ab5) )
ROM_REGION( 0x0700, "proms", 0 ) /* color PROMs */
- ROM_LOAD( "14-3.99", 0x0000, 0x0100, CRC(89d09126) SHA1(1f78f3b3ef8c6ba9c00a58ae89837d9a92e5078f) ) /* R */
- ROM_LOAD( "14-4.100", 0x0100, 0x0100, CRC(e1cafe6c) SHA1(8c37c3829bf1b96690fb853a2436f1b5e8d45e8c) ) /* G */
- ROM_LOAD( "14-5.101", 0x0200, 0x0100, CRC(2d444fa6) SHA1(66b64133ca740686bedd33bafd20a3f9f3df97d4) ) /* B */
- ROM_LOAD( "14-1.61", 0x0300, 0x0200, CRC(3ad8306d) SHA1(877f1d58cb8da9098ec71a7c7aec633dbf9e76e6) ) /* sprite */
- ROM_LOAD( "14-2.115", 0x0500, 0x0200, CRC(12a4f1ff) SHA1(375e37d7162053d45da66eee23d66bd432303c1c) ) /* bg */
+ ROM_LOAD( "16-3.66", 0x0000, 0x0100, CRC(dbcd3bec) SHA1(1baeec277b16c82b67e10da9d4c84cf383ef4a82) ) /* R Prom type 24s10 */
+ ROM_LOAD( "16-4.67", 0x0100, 0x0100, CRC(9eb7b6cf) SHA1(86451e8a510f8cfbc0be7d4e7bb1ee7dfd67f1f4) ) /* G Prom type 24s10 */
+ ROM_LOAD( "16-5.68", 0x0200, 0x0100, CRC(9b30a7f3) SHA1(a0aefc2c8325b95ea227e404583d14622b04a3b9) ) /* B Prom type 24s10 */
+ ROM_LOAD( "16-1.148", 0x0300, 0x0200, CRC(777e2770) SHA1(7f4ef42ab4e0546c2932d498cf573bd4f4296db7) ) /* sprite Prom type mb7124h */
+ ROM_LOAD( "16-2.97", 0x0500, 0x0200, CRC(7f95d4b2) SHA1(68dc311739a4d5d72f4cfbace27f3a82f05316ff) ) /* bg Prom type mb7124h */
+
+ ROM_REGION( 0x0100, "scroll_prom", 0 ) /* scroll control PROM */
+ ROM_LOAD( "16-6.59", 0x0000, 0x0100, CRC(ec4faf5b) SHA1(7ebbf50807d04105ebadec91bded069408e399ba) ) /* Prom type 24s10 */
+
+ ROM_REGION( 0x2000, "prot_data", 0 ) /* protection, data used with Fujitsu MB8841 4-Bit MCU */
+ ROM_LOAD( "ban-rom12.ic2", 0x0000, 0x2000, CRC(044bb2f6) SHA1(829b2152740061e0506c7504885d8404fb8fe360) )
+
+ ROM_REGION(0x800, "mcu", 0) /* Fujitsu MB8841 4-Bit MCU internal ROM */
+ ROM_LOAD("sun-8212.ic3", 0x000, 0x800, BAD_DUMP CRC(8869611e) SHA1(c6443f3bcb0cdb4d7b1b19afcbfe339c300f36aa))
ROM_END
+ROM_START( pettanp )
+ ROM_REGION( 0x10000, "maincpu", 0 ) /* main CPU */
+ ROM_LOAD( "tvg2-16a.7", 0x0000, 0x2000, CRC(4cbbbd01) SHA1(3905cf9e9d324bb23688ab29c98d71529d3dbf0c) )
+ ROM_CONTINUE( 0x8000, 0x2000 )
+ ROM_LOAD( "tvg3-16a.8", 0x2000, 0x2000, CRC(aaa0420f) SHA1(aa7ead51002f8b1bbefd07ff23b9064804fc31b3) )
+ ROM_LOAD( "tvg4-16a.9", 0x4000, 0x2000, CRC(43306369) SHA1(1eadebd3d962da49fd204eff8692f1e1a1e3cc98) )
+ ROM_LOAD( "tvg5-16a.10", 0x6000, 0x2000, CRC(da9c635f) SHA1(3c084ad159dbabfd02a9772489c3193852d135b7) )
+
+ ROM_REGION( 0x10000, "subcpu", 0 ) /* sub CPU */
+ ROM_LOAD( "tvg1-16.2", 0x0000, 0x2000, CRC(e36009f6) SHA1(72c485e8c19fbfc9c850094cfd87f1055154c0c5) )
+
+ ROM_REGION( 0x6000, "gfx1", 0 ) /* sprite */
+ ROM_LOAD( "tvg6-16.90", 0x0000, 0x2000, CRC(6905d9d5) SHA1(586bf72bab5ab6e3e319c925decc16d7f3711af1) )
+ ROM_LOAD( "tvg7-16.92", 0x2000, 0x2000, CRC(40d02bfd) SHA1(2f6ca8197048318f7900b56169aba4c9fdf48693) )
+ ROM_LOAD( "tvg8-16.94", 0x4000, 0x2000, CRC(b18a2244) SHA1(168061e050530e6a5bc78c14a64e635370256dfd) )
+
+ ROM_REGION( 0x6000, "gfx2", 0 ) /* bg */
+ ROM_LOAD( "tvg11-16.102",0x0000, 0x2000, CRC(327b7a29) SHA1(4b8d57607c4a1e84c630c38eba3fa90b5496dcde) )
+ ROM_LOAD( "tvg10-16.101",0x2000, 0x2000, CRC(624ac061) SHA1(9d479a8a256a8ff37c00bc7449b11357f9fe6cdc) )
+ ROM_LOAD( "tvg9-16.100", 0x4000, 0x2000, CRC(c477e74c) SHA1(864eddcd9c817aeecb09423071f87d3b39eb5fc4) )
+
+ ROM_REGION( 0x0700, "proms", 0 ) /* color PROMs */
+ ROM_LOAD( "16-3.66", 0x0000, 0x0100, CRC(dbcd3bec) SHA1(1baeec277b16c82b67e10da9d4c84cf383ef4a82) ) /* R Prom type 24s10 */
+ ROM_LOAD( "16-4.67", 0x0100, 0x0100, CRC(9eb7b6cf) SHA1(86451e8a510f8cfbc0be7d4e7bb1ee7dfd67f1f4) ) /* G Prom type 24s10 */
+ ROM_LOAD( "16-5.68", 0x0200, 0x0100, CRC(9b30a7f3) SHA1(a0aefc2c8325b95ea227e404583d14622b04a3b9) ) /* B Prom type 24s10 */
+ ROM_LOAD( "16-1.148", 0x0300, 0x0200, CRC(777e2770) SHA1(7f4ef42ab4e0546c2932d498cf573bd4f4296db7) ) /* sprite Prom type mb7124h */
+ ROM_LOAD( "16-2.97", 0x0500, 0x0200, CRC(7f95d4b2) SHA1(68dc311739a4d5d72f4cfbace27f3a82f05316ff) ) /* bg Prom type mb7124h */
+
+ ROM_REGION( 0x0100, "scroll_prom", 0 ) /* scroll control PROM */
+ ROM_LOAD( "16-6.59", 0x0000, 0x0100, CRC(ec4faf5b) SHA1(7ebbf50807d04105ebadec91bded069408e399ba) ) /* Prom type 24s10 */
+
+ ROM_REGION( 0x1000, "prot_data", 0 ) /* protection data used with Fujitsu MB8841 4-Bit MCU */
+ ROM_LOAD( "tvg12-16.2", 0x0000, 0x1000, CRC(3abc6ba8) SHA1(15e0b0f9d068f6094e2be4f4f1dea0ff6e85686b) )
+
+ ROM_REGION(0x800, "mcu", 0) /* Fujitsu MB8841 4-Bit MCU internal ROM */
+ ROM_LOAD("sun-8212.ic3", 0x000, 0x800, NO_DUMP)
+ROM_END
+
+void markham_state::init_banbam()
+{
+ /* Fujitsu MB8841 4-Bit MCU comms */
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0xd806, 0xd806, read8_delegate(FUNC(markham_state::banbam_protection_r), this));
+ m_maincpu->space(AS_PROGRAM).install_write_handler(0xd80d, 0xd80d, write8_delegate(FUNC(markham_state::protection_w), this));
+}
+
+void markham_state::init_pettanp()
+{
+// AM_RANGE(0xd80c, 0xd80c) AM_WRITENOP /* protection reset? */
+// AM_RANGE(0xd80d, 0xd80d) AM_WRITE(protection_w) /* protection data write (pettanp) */
+// AM_RANGE(0xd806, 0xd806) AM_READ(protection_r) /* protection data read (pettanp) */
+
+ /* Fujitsu MB8841 4-Bit MCU comms */
+ m_maincpu->space(AS_PROGRAM).install_read_handler(0xd806, 0xd806, read8_delegate(FUNC(markham_state::pettanp_protection_r),this));
+ m_maincpu->space(AS_PROGRAM).install_write_handler(0xd80d, 0xd80d, write8_delegate(FUNC(markham_state::protection_w),this));
+}
+
+/* Markham hardware */
+GAME( 1983, markham, 0, markham, markham, markham_state, empty_init, ROT0, "Sun Electronics", "Markham", MACHINE_SUPPORTS_SAVE )
-GAME( 1983, markham, 0, markham, markham, markham_state, empty_init, ROT0, "Sun Electronics", "Markham", MACHINE_SUPPORTS_SAVE )
+/* Strength & Skill hardware */
+GAME( 1984, strnskil, 0, strnskil, strnskil, markham_state, empty_init, ROT0, "Sun Electronics", "Strength & Skill", MACHINE_SUPPORTS_SAVE)
+GAME( 1984, guiness, strnskil, strnskil, strnskil, markham_state, empty_init, ROT0, "Sun Electronics", "The Guiness (Japan)", MACHINE_SUPPORTS_SAVE)
+GAME( 1984, banbam, 0, banbam, banbam, markham_state, init_banbam, ROT0, "Sun Electronics", "BanBam", MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE)
+GAME( 1984, pettanp, banbam, strnskil, banbam, markham_state, init_pettanp, ROT0, "Sun Electronics", "Pettan Pyuu (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE)
diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp
index 6fa1208cbd9..ca8e0a0de00 100644
--- a/src/mame/drivers/topspeed.cpp
+++ b/src/mame/drivers/topspeed.cpp
@@ -1,7 +1,7 @@
// license:BSD-3-Clause
// copyright-holders:David Graves
// thanks-to:Richard Bush
-/***************+************************************************************
+/****************************************************************************
Top Speed / Full Throttle (c) Taito 1987
-------------------------
diff --git a/src/mame/includes/markham.h b/src/mame/includes/markham.h
index ca78dec440e..c3e5e5e53dd 100644
--- a/src/mame/includes/markham.h
+++ b/src/mame/includes/markham.h
@@ -2,41 +2,114 @@
// copyright-holders:Uki
/*************************************************************************
- Markham
+ Markham (c) 1983 Sun Electronics
+ Strength & Skill (c) 1984 Sun Electronics
*************************************************************************/
+#ifndef MAME_INCLUDES_MARKHAM_H
+#define MAME_INCLUDES_MARKHAM_H
+
+#pragma once
+
+#include "machine/timer.h"
+
+#include "cpu/z80/z80.h"
+#include "cpu/mb88xx/mb88xx.h"
+#include "sound/sn76496.h"
+#include "screen.h"
+#include "speaker.h"
+
class markham_state : public driver_device
{
public:
+ // construction/destruction
markham_state(const machine_config &mconfig, device_type type, const char *tag)
- : driver_device(mconfig, type, tag),
- m_spriteram(*this, "spriteram"),
- m_videoram(*this, "videoram"),
- m_xscroll(*this, "xscroll"),
- m_maincpu(*this, "maincpu"),
- m_gfxdecode(*this, "gfxdecode"),
- m_palette(*this, "palette") { }
+ : driver_device(mconfig, type, tag)
+ , m_maincpu(*this, "maincpu")
+ , m_subcpu(*this, "subcpu")
+ , m_mcu(*this, "mcu")
+ , m_sn(*this, "sn%u", 1U)
+ , m_screen(*this, "screen")
+ , m_gfxdecode(*this, "gfxdecode")
+ , m_palette(*this, "palette")
+ , m_spriteram(*this, "spriteram")
+ , m_videoram(*this, "videoram")
+ , m_xscroll(*this, "xscroll")
+ , m_scroll_ctrl(0)
+ , m_irq_source(0)
+ , m_irq_scanline_start(0)
+ , m_irq_scanline_end(0)
+ , m_coin_unlock(false)
+ {
+ }
- /* memory pointers */
- required_shared_ptr<uint8_t> m_spriteram;
- required_shared_ptr<uint8_t> m_videoram;
- required_shared_ptr<uint8_t> m_xscroll;
+ void init_banbam();
+ void init_pettanp();
- /* video-related */
- tilemap_t *m_bg_tilemap;
+ void markham(machine_config &config);
+ void strnskil(machine_config &config);
+ void banbam(machine_config &config);
+
+ void base_master_map(address_map &map);
+ void markham_master_map(address_map &map);
+ void strnskil_master_map(address_map &map);
+ void markham_slave_map(address_map &map);
+ void strnskil_slave_map(address_map &map);
+
+protected:
+ DECLARE_WRITE8_MEMBER(coin_output_w);
+ template<int Bit> DECLARE_WRITE8_MEMBER(flipscreen_w);
+ DECLARE_WRITE8_MEMBER(videoram_w);
+
+ // markham specific
DECLARE_READ8_MEMBER(markham_e004_r);
- DECLARE_WRITE8_MEMBER(markham_videoram_w);
- DECLARE_WRITE8_MEMBER(markham_flipscreen_w);
- TILE_GET_INFO_MEMBER(get_bg_tile_info);
+
+ // strnskil specific
+ DECLARE_READ8_MEMBER(strnskil_d800_r);
+
+ // protection comms for banbam/pettanp
+ DECLARE_READ8_MEMBER(pettanp_protection_r);
+ DECLARE_READ8_MEMBER(banbam_protection_r);
+ DECLARE_WRITE8_MEMBER(protection_w);
+
virtual void video_start() override;
- DECLARE_PALETTE_INIT(markham);
+
uint32_t screen_update_markham(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
+ uint32_t screen_update_strnskil(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ TILE_GET_INFO_MEMBER(get_bg_tile_info);
+
+ DECLARE_PALETTE_INIT(markham);
+ DECLARE_VIDEO_START(strnskil);
+
+ void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
+
+ TIMER_DEVICE_CALLBACK_MEMBER(strnskil_scanline);
+
+private:
required_device<cpu_device> m_maincpu;
+ required_device<cpu_device> m_subcpu;
+ optional_device<cpu_device> m_mcu;
+ required_device_array<sn76496_device, 2> m_sn;
+ required_device<screen_device> m_screen;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
- void markham(machine_config &config);
- void markham_master_map(address_map &map);
- void markham_slave_map(address_map &map);
+
+ /* memory pointers */
+ required_shared_ptr<uint8_t> m_spriteram;
+ required_shared_ptr<uint8_t> m_videoram;
+ required_shared_ptr<uint8_t> m_xscroll;
+
+ /* video-related */
+ tilemap_t *m_bg_tilemap;
+
+ uint8_t m_scroll_ctrl;
+ uint8_t m_irq_source;
+ uint8_t m_irq_scanline_start;
+ uint8_t m_irq_scanline_end;
+
+ bool m_coin_unlock;
};
+
+#endif // MAME_INCLUDES_MARKHAM_H \ No newline at end of file
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index 0cf711fcfa6..2e1fc878102 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -18556,6 +18556,10 @@ masao // bootleg
@source:markham.cpp
markham // TVG14 (c) 1983 Sun Electronics
+banbam // TVG16 (c) 1984 Sun Electronics
+guiness // TVG15 (c) 1984 Sun Electronics
+pettanp // TVG16 (c) 1984 Sun Electronics (Japan)
+strnskil // TVG15 (c) 1984 Sun Electronics
@source:marywu.cpp
marywu //
@@ -35619,12 +35623,6 @@ stratos // Kasparov Stratos Chess Computer
@source:strkzn.cpp
strkzn // (c) 1994 Purple Star
-@source:strnskil.cpp
-banbam // TVG16 (c) 1984 Sun Electronics
-guiness // TVG15 (c) 1984 Sun Electronics
-pettanp // TVG16 (c) 1984 Sun Electronics (Japan)
-strnskil // TVG15 (c) 1984 Sun Electronics
-
@source:studio2.cpp
apollo80 //
cm1200 //
diff --git a/src/mame/video/markham.cpp b/src/mame/video/markham.cpp
index 4d943c57bcd..4cb7505cd1e 100644
--- a/src/mame/video/markham.cpp
+++ b/src/mame/video/markham.cpp
@@ -3,11 +3,10 @@
/******************************************************************************
Markham (c) 1983 Sun Electronics
+ Strength & Skill (c) 1984 Sun Electronics
Video hardware driver by Uki
- 17/Jun/2001 -
-
******************************************************************************/
#include "emu.h"
@@ -39,21 +38,12 @@ PALETTE_INIT_MEMBER(markham_state, markham)
}
}
-WRITE8_MEMBER(markham_state::markham_videoram_w)
+WRITE8_MEMBER(markham_state::videoram_w)
{
m_videoram[offset] = data;
m_bg_tilemap->mark_tile_dirty(offset / 2);
}
-WRITE8_MEMBER(markham_state::markham_flipscreen_w)
-{
- if (flip_screen() != (data & 0x01))
- {
- flip_screen_set(data & 0x01);
- machine().tilemap().mark_all_dirty();
- }
-}
-
TILE_GET_INFO_MEMBER(markham_state::get_bg_tile_info)
{
int attr = m_videoram[tile_index * 2];
@@ -70,6 +60,19 @@ void markham_state::video_start()
m_bg_tilemap->set_scroll_rows(32);
}
+VIDEO_START_MEMBER(markham_state, strnskil)
+{
+ video_start();
+
+ m_bg_tilemap->set_scroll_rows(32);
+ m_irq_scanline_start = 96;
+ m_irq_scanline_end = 240;
+
+ save_item(NAME(m_irq_source));
+ save_item(NAME(m_irq_scanline_start));
+ save_item(NAME(m_irq_scanline_end));
+}
+
void markham_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect )
{
uint8_t *spriteram = m_spriteram;
@@ -86,7 +89,7 @@ void markham_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprec
int x = spriteram[offs + 3];
int y = spriteram[offs + 0];
int px, py;
- col &= 0x3f ;
+ col &= 0x3f;
if (flip_screen() == 0)
{
@@ -115,14 +118,40 @@ void markham_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprec
uint32_t markham_state::screen_update_markham(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- int i;
+ int row;
- for (i = 0; i < 32; i++)
+ for (row = 0; row < 32; row++)
{
- if ((i > 3) && (i < 16))
- m_bg_tilemap->set_scrollx(i, m_xscroll[0]);
- if (i >= 16)
- m_bg_tilemap->set_scrollx(i, m_xscroll[1]);
+ if ((row > 3) && (row < 16))
+ m_bg_tilemap->set_scrollx(row, m_xscroll[0]);
+ if (row >= 16)
+ m_bg_tilemap->set_scrollx(row, m_xscroll[1]);
+ }
+
+ m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
+ draw_sprites(bitmap, cliprect);
+ return 0;
+}
+
+uint32_t markham_state::screen_update_strnskil(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ const uint8_t *scroll_data = memregion("scroll_prom")->base();
+
+ int row;
+
+ for (row = 0; row < 32; row++)
+ {
+ if (m_scroll_ctrl != 0x07)
+ {
+ switch (scroll_data[m_scroll_ctrl * 32 + row])
+ {
+ case 2:
+ m_bg_tilemap->set_scrollx(row, -~m_xscroll[1]);
+ case 4:
+ m_bg_tilemap->set_scrollx(row, -~m_xscroll[0]);
+ break;
+ }
+ }
}
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);