summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2017-11-25 13:16:57 +0100
committer Dirk Best <mail@dirk-best.de>2017-11-25 13:17:23 +0100
commit43f8824dd09448cec6cc60a5d97075745ce87068 (patch)
tree433a90146878813bbb4b01bf2074c03bd44de5d4
parenta636fabf6b0048d83cf132856c0b73a2e78a375b (diff)
headon2: Fix colors, clean up
-rw-r--r--src/mame/drivers/vicdual.cpp85
-rw-r--r--src/mame/includes/vicdual.h1
2 files changed, 43 insertions, 43 deletions
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index a0acf953a31..a002346bdd1 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -810,28 +810,22 @@ MACHINE_CONFIG_END
*
*************************************/
-READ8_MEMBER(vicdual_state::headon2_io_r)
+READ8_MEMBER( vicdual_state::headon2_io_r )
{
- uint8_t ret = 0;
+ uint8_t data = 0xff;
- if (offset & 0x01) ret = m_in0->read();
- if (offset & 0x02) { /* schematics show this as in input port, but never read from */ }
- if (offset & 0x04) ret = m_in1->read();
- if (offset & 0x08) ret = m_in2->read();
- if (offset & 0x12) logerror("********* Read from port %x\n", offset);
+ if (offset & 0x01) data &= m_in0->read(); // schematics IN1
+ if (offset & 0x02) data &= 0xff; // schematics IN2 (not read)
+ if (offset & 0x04) data &= m_in1->read(); // schematics IN4
+ if (offset & 0x08) data &= m_in2->read();
- return ret;
+ return data;
}
-
WRITE8_MEMBER(vicdual_state::headon2_io_w)
{
- if (offset & 0x01) assert_coin_status();
- if (offset & 0x02) headon_audio_w(space, 0, data);
- if (offset & 0x04) palette_bank_w(space, 0, data);
- if (offset & 0x08) { /* schematics show this as going into a shifter circuit, but never written to */ }
- if (offset & 0x10) { /* schematics show this as going to an edge connector, but never written to */ }
- if (offset & 0x18) logerror("********* Write to port %x\n", offset);
+ if (offset & 0x01) assert_coin_status();
+ if (offset & 0x02) headon_audio_w(space, 0, data);
}
@@ -862,9 +856,6 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( headon2_io_map, AS_IO, 8, vicdual_state )
ADDRESS_MAP_GLOBAL_MASK(0x1f)
-
- /* no decoder, just logic gates, so in theory the
- game can read/write from multiple locations at once */
AM_RANGE(0x00, 0x1f) AM_READWRITE(headon2_io_r, headon2_io_w)
ADDRESS_MAP_END
@@ -880,31 +871,31 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( headon2 )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START1)
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_START2)
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_BUTTON1)
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_4WAY
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_4WAY
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_4WAY
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY
PORT_START("IN1")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) )
- PORT_DIPSETTING( 0x18, "4" )
- PORT_DIPSETTING( 0x10, "5" )
- PORT_DIPSETTING( 0x00, "6" )
- /*PORT_DIPSETTING( 0x08, "5" )*/
- PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
+ PORT_BIT(0x07, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_DIPNAME(0x18, 0x08, DEF_STR( Lives ))
+ PORT_DIPSETTING( 0x08, "4" )
+ PORT_DIPSETTING( 0x10, "5" )
+ PORT_DIPSETTING( 0x18, "5" )
+ PORT_DIPSETTING( 0x00, "6" )
+ PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
- PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) )
- PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
- PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_DIPNAME(0x02, 0x02, DEF_STR( Demo_Sounds ))
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ))
+ PORT_DIPSETTING( 0x02, DEF_STR( On ))
+ PORT_BIT(0x7c, IP_ACTIVE_LOW, IPT_UNUSED)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -985,6 +976,12 @@ static INPUT_PORTS_START( digger )
INPUT_PORTS_END
+MACHINE_RESET_MEMBER( vicdual_state, headon2 )
+{
+ m_palette_bank = 3;
+}
+
+
static MACHINE_CONFIG_DERIVED( headon2, vicdual_root )
/* basic machine hardware */
@@ -992,6 +989,8 @@ static MACHINE_CONFIG_DERIVED( headon2, vicdual_root )
MCFG_CPU_PROGRAM_MAP(headon2_map)
MCFG_CPU_IO_MAP(headon2_io_map)
+ MCFG_MACHINE_RESET_OVERRIDE(vicdual_state, headon2)
+
/* video hardware */
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(vicdual_state, screen_update_color)
@@ -1170,10 +1169,10 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( invho2_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")
+ 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 */
diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h
index ac35c95e0eb..29767683b96 100644
--- a/src/mame/includes/vicdual.h
+++ b/src/mame/includes/vicdual.h
@@ -86,6 +86,7 @@ public:
DECLARE_READ8_MEMBER(headon_io_r);
DECLARE_READ8_MEMBER(sspaceat_io_r);
DECLARE_WRITE8_MEMBER(headon_io_w);
+ DECLARE_MACHINE_RESET(headon2);
DECLARE_READ8_MEMBER(headon2_io_r);
DECLARE_WRITE8_MEMBER(headon2_io_w);
DECLARE_WRITE8_MEMBER(digger_io_w);