summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/s7.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/s7.cpp')
-rw-r--r--src/mame/drivers/s7.cpp41
1 files changed, 25 insertions, 16 deletions
diff --git a/src/mame/drivers/s7.cpp b/src/mame/drivers/s7.cpp
index 6979d378779..e7b170d533c 100644
--- a/src/mame/drivers/s7.cpp
+++ b/src/mame/drivers/s7.cpp
@@ -29,6 +29,8 @@ Note that T is also a tilt, but it may take 3 hits to activate it.
A number of games are multiball therefore they either cannot start or the outhole
is ineffective/unknown. All games can coin up.
+Note: fpwr2_l2 can be started by holding down D (left ball ramp) and F (ball shooter trough) when pressing start.
+
Game Outhole Tilt Notes
----------------------------------------------------------------------------------
@@ -84,6 +86,7 @@ public:
, m_pia28(*this, "pia28")
, m_pia30(*this, "pia30")
, m_digits(*this, "digit%u", 0U)
+ , m_swarray(*this, "SW.%u", 0U)
{ }
void s7(machine_config &config);
@@ -127,7 +130,7 @@ private:
uint8_t m_sound_data;
uint8_t m_strobe;
- uint8_t m_kbdrow;
+ uint8_t m_switch_col;
uint8_t m_nvram[0x100];
bool m_data_ok;
bool m_memprotect;
@@ -145,6 +148,7 @@ private:
required_device<pia6821_device> m_pia28;
required_device<pia6821_device> m_pia30;
output_finder<61> m_digits;
+ required_ioport_array<8> m_swarray;
};
void s7_state::s7_main_map(address_map &map)
@@ -170,20 +174,18 @@ void s7_state::s7_audio_map(address_map &map)
}
static INPUT_PORTS_START( s7 )
- PORT_START("X0")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("X1")
+ PORT_START("SW.0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT ) // pendulum tilt
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 ) // 2-player start
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START ) // 1-player start
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) // slam tilt
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) // slam tilt
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) // high score reset
- PORT_START("X2")
+ PORT_START("SW.1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D)
@@ -193,7 +195,7 @@ static INPUT_PORTS_START( s7 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K)
- PORT_START("X4")
+ PORT_START("SW.2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C)
@@ -203,7 +205,7 @@ static INPUT_PORTS_START( s7 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COMMA)
- PORT_START("X8")
+ PORT_START("SW.3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_STOP)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SLASH)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_COLON)
@@ -213,7 +215,7 @@ static INPUT_PORTS_START( s7 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_EQUALS)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSPACE)
- PORT_START("X10")
+ PORT_START("SW.4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_OPENBRACE)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_CLOSEBRACE)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_BACKSLASH)
@@ -223,7 +225,7 @@ static INPUT_PORTS_START( s7 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_UP)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_DOWN)
- PORT_START("X20")
+ PORT_START("SW.5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E)
@@ -233,14 +235,14 @@ static INPUT_PORTS_START( s7 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_O)
- PORT_START("X40")
+ PORT_START("SW.6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_RSHIFT)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_SPACE)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LALT)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_LSHIFT)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("X80")
+ PORT_START("SW.7")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SND")
@@ -350,14 +352,21 @@ uint8_t s7_state::dips_r()
uint8_t s7_state::switch_r()
{
- char kbdrow[8];
- sprintf(kbdrow,"X%X",m_kbdrow);
- return ioport(kbdrow)->read() ^ 0xff; // comes in through inverter buffers
+ char retval = 0xff;
+ // scan all 8 input columns, since multiple can be selected at once
+ for (int i = 0; i < 7; i++)
+ {
+ if (m_switch_col & (1<<i))
+ retval &= m_swarray[i]->read();
+ }
+ return ~retval;
}
void s7_state::switch_w(uint8_t data)
{
- m_kbdrow = data;
+ // this drives the pulldown 7406 quad open collector inverters at IC17 and IC18, each inverter drives one column of the switch matrix low
+ // it is possible for multiple columns to be enabled at once, this is handled in switch_r above.
+ m_switch_col = data;
}
uint8_t s7_state::nvram_r(offs_t offset)