summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2017-11-23 23:57:17 +0100
committer Dirk Best <mail@dirk-best.de>2017-11-23 23:57:43 +0100
commit654700b283354371558f36effd815bb8ccc8819b (patch)
tree099637b134a8fcef070bb1d25e999a91f270be48
parent2f7413d00559175304bdb6240e106e63f63f7bb6 (diff)
Machine promoted to WORKING
--------------------------- Head On N [Dirk Best]
-rw-r--r--src/mame/drivers/vicdual.cpp85
-rw-r--r--src/mame/includes/vicdual.h1
2 files changed, 85 insertions, 1 deletions
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index e85e1453a59..913234b863c 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -1138,6 +1138,20 @@ WRITE8_MEMBER(vicdual_state::alphaho_io_w)
}
+WRITE8_MEMBER(vicdual_state::headonn_io_w)
+{
+ if (offset & 0x01) invho2_audio_w(space, 0, data);
+ if (offset & 0x02)
+ {
+ // 7654---- unused?
+ // ----32-- always 1
+ // ------1- 1 written after reset, then always 0
+ // -------0 always 0
+ }
+ if (offset & 0x08) assert_coin_status();
+}
+
+
static ADDRESS_MAP_START( vicdual_dualgame_map, AS_PROGRAM, 8, vicdual_state )
AM_RANGE(0x0000, 0x3fff) AM_MIRROR(0x4000) AM_ROM
AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x7000) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
@@ -1304,6 +1318,20 @@ static ADDRESS_MAP_START( alphaho_io_map, AS_IO, 8, vicdual_state )
ADDRESS_MAP_END
+static ADDRESS_MAP_START( headonn_io_map, AS_IO, 8, vicdual_state )
+ ADDRESS_MAP_GLOBAL_MASK(0x7f)
+
+ AM_RANGE(0x00, 0x00) AM_MIRROR(0x7c) AM_READ_PORT("IN0")
+ AM_RANGE(0x01, 0x01) AM_MIRROR(0x7c) AM_READ_PORT("IN1")
+ AM_RANGE(0x02, 0x02) AM_MIRROR(0x7c) AM_READ_PORT("IN2")
+ AM_RANGE(0x03, 0x03) AM_MIRROR(0x7c) AM_READ_PORT("IN3")
+
+ /* no decoder, just logic gates, so in theory the
+ game can write to multiple locations at once */
+ AM_RANGE(0x00, 0x7f) AM_WRITE(headonn_io_w)
+ADDRESS_MAP_END
+
+
/* several of the games' lives DIPs are spread across two input ports */
CUSTOM_INPUT_MEMBER(vicdual_state::fake_lives_r)
{
@@ -1968,6 +1996,50 @@ static INPUT_PORTS_START( alphaho )
INPUT_PORTS_END
+// there is a dip switch with 8 switches on the board, where do they map? only one seems to be used
+static INPUT_PORTS_START( headonn )
+ PORT_START("IN0")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_COCKTAIL
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_DIPNAME(0x08, 0x00, DEF_STR(Lives))
+ PORT_DIPSETTING( 0x00, "3")
+ PORT_DIPSETTING( 0x08, "4")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_4WAY
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY
+ PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("IN1")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_4WAY
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_4WAY
+ PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("IN2")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON1)
+ PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_START("IN3")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_4WAY PORT_COCKTAIL
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START2)
+ PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED)
+
+ PORT_COIN_DEFAULT
+INPUT_PORTS_END
+
+
static MACHINE_CONFIG_DERIVED( vicdual_dualgame_root, vicdual_root )
/* basic machine hardware */
@@ -2108,6 +2180,17 @@ static MACHINE_CONFIG_DERIVED( alphaho, vicdual_dualgame_root )
MACHINE_CONFIG_END
+static MACHINE_CONFIG_DERIVED( headonn, vicdual_dualgame_root )
+
+ /* basic machine hardware */
+ MCFG_CPU_MODIFY("maincpu")
+ MCFG_CPU_IO_MAP(headonn_io_map)
+
+ /* audio hardware */
+ MCFG_SPEAKER_STANDARD_MONO("mono")
+ MCFG_FRAGMENT_ADD(headon_audio)
+MACHINE_CONFIG_END
+
/*************************************
*
@@ -3694,7 +3777,7 @@ GAME( 1979, sspaceatc, sspaceat, sspaceat, sspaceat, vicdual_state, 0, ROT270
GAME( 1979, sspacaho, 0, sspacaho, sspacaho, vicdual_state, 0, ROT270, "Sega", "Space Attack / Head On", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, headon, 0, headon, headon, vicdual_state, 0, ROT0, "Gremlin", "Head On (2 players)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, headon1, headon, headon, headon, vicdual_state, 0, ROT0, "Gremlin", "Head On (1 player)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
-GAME( 1979, headonn, headon, headon, headon, vicdual_state, 0, ROT270, "Nintendo", "Head On N", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // won't coin up? different IO map
+GAME( 1979, headonn, headon, headonn, headonn, vicdual_state, 0, ROT270, "Nintendo", "Head On N", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, headons, headon, headons, headons, vicdual_state, 0, ROT0, "bootleg (Sidam)", "Head On (Sidam bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE )
GAME( 1979, headonsa, headon, headons, headons, vicdual_state, 0, ROT0, "bootleg (Sidam)", "Head On (Sidam bootleg, set 2)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // won't coin up?
GAME( 1979, headonmz, headon, headon, headonmz, vicdual_state, 0, ROT0, "bootleg", "Head On (bootleg, alt maze)", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h
index 5b86d14e8c5..ac35c95e0eb 100644
--- a/src/mame/includes/vicdual.h
+++ b/src/mame/includes/vicdual.h
@@ -93,6 +93,7 @@ public:
DECLARE_WRITE8_MEMBER(invds_io_w);
DECLARE_WRITE8_MEMBER(carhntds_io_w);
DECLARE_WRITE8_MEMBER(sspacaho_io_w);
+ DECLARE_WRITE8_MEMBER(headonn_io_w);
DECLARE_WRITE8_MEMBER(tranqgun_io_w);
DECLARE_WRITE8_MEMBER(spacetrk_io_w);
DECLARE_WRITE8_MEMBER(carnival_io_w);