summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorGravatarGravatar Robbbert <robbbert@users.noreply.github.com>2014-01-09 09:10:59 +0000
committerGravatarGravatar Robbbert <robbbert@users.noreply.github.com>2014-01-09 09:10:59 +0000
commit036426dd97c063d9f3815c90f8a71d0898f0c42f (patch)
treee9b1c9796897a959a868602d129aa9499c9532e6 /src
parentbe9c999c16210c2168a639142ff9e475db6c67cb (diff)
(MESS) sv8000 : connected up remaining keys, all games are playable
Diffstat (limited to 'src')
-rw-r--r--src/mess/drivers/sv8000.c86
1 files changed, 52 insertions, 34 deletions
diff --git a/src/mess/drivers/sv8000.c b/src/mess/drivers/sv8000.c
index e571cf34493..1aedae56f9c 100644
--- a/src/mess/drivers/sv8000.c
+++ b/src/mess/drivers/sv8000.c
@@ -45,9 +45,10 @@ public:
, m_maincpu(*this, "maincpu")
, m_s68047p(*this, "s68047p")
, m_videoram(*this, "videoram")
- , m_io_row0_left(*this, "ROW0_LEFT")
- , m_io_row1_left(*this, "ROW1_LEFT")
- , m_io_row2_left(*this, "ROW2_LEFT")
+ , m_io_row0(*this, "ROW0")
+ , m_io_row1(*this, "ROW1")
+ , m_io_row2(*this, "ROW2")
+ , m_io_joy(*this, "JOY")
{ }
DECLARE_DEVICE_IMAGE_LOAD_MEMBER( cart );
@@ -73,9 +74,10 @@ private:
required_device<cpu_device> m_maincpu;
required_device<mc6847_base_device> m_s68047p;
required_shared_ptr<const UINT8> m_videoram;
- required_ioport m_io_row0_left;
- required_ioport m_io_row1_left;
- required_ioport m_io_row2_left;
+ required_ioport m_io_row0;
+ required_ioport m_io_row1;
+ required_ioport m_io_row2;
+ required_ioport m_io_joy;
UINT8 m_column;
@@ -119,30 +121,45 @@ ADDRESS_MAP_END
// Button/dial? POWER RESET Button/dial?
//
static INPUT_PORTS_START( sv8000 )
- PORT_START("ROW0_LEFT")
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("Left 1")
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Left 4") // Guess
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("Left 7") // Guess
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Left *") // Guess
- PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
-
- PORT_START("ROW1_LEFT")
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("Left 2")
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("Left 5") // Guess
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("Left 8") // Guess
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("Left 0")
- PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
-
- PORT_START("ROW2_LEFT")
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("Left 3")
- PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("Left 6") // Guess
- PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("Left 9") // Guess
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("Left #") // Guess
- PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
-
-// PORT_START("ROW0_RIGHT")
-// PORT_START("ROW1_RIGHT")
-// PORT_START("ROW2_RIGHT")
+ PORT_START("ROW0")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_NAME("Left 1")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_NAME("Left 4") // Guess
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_NAME("Left 7") // Guess
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_NAME("Left *") // Guess
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Right 1")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Right 4") // Guess
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("Right 7") // Guess
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("Right *") // Guess
+
+ PORT_START("ROW1")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_NAME("Left 2")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_NAME("Left 5") // Guess
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_NAME("Left 8") // Guess
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_NAME("Left 0")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Right 2")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Right 5") // Guess
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("Right 8") // Guess
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("Right 0")
+
+ PORT_START("ROW2")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_NAME("Left 3")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_NAME("Left 6") // Guess
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_NAME("Left 9") // Guess
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_NAME("Left #") // Guess
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Right 3")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("Right 6") // Guess
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Right 9") // Guess
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Right #") // Guess
+
+ PORT_START("JOY")
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_NAME("Left Right")
+ PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_NAME("Left Left")
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_NAME("Left Down")
+ PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_NAME("Left Up")
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_NAME("Right Right")
+ PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_NAME("Right Left")
+ PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_NAME("Right Down")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_NAME("Right Up")
INPUT_PORTS_END
@@ -199,7 +216,7 @@ DEVICE_IMAGE_LOAD_MEMBER( sv8000_state, cart )
READ8_MEMBER( sv8000_state::i8255_porta_r )
{
logerror("i8255_porta_r\n");
- return 0xFF;
+ return m_io_joy->read();
}
@@ -217,15 +234,15 @@ READ8_MEMBER( sv8000_state::i8255_portb_r )
if ( ! ( m_column & 0x01 ) )
{
- data &= m_io_row0_left->read();
+ data &= m_io_row0->read();
}
if ( ! ( m_column & 0x02 ) )
{
- data &= m_io_row1_left->read();
+ data &= m_io_row1->read();
}
if ( ! ( m_column & 0x04 ) )
{
- data &= m_io_row2_left->read();
+ data &= m_io_row2->read();
}
return data;
}
@@ -394,6 +411,7 @@ static MACHINE_CONFIG_START( sv8000, sv8000_state )
MCFG_CPU_ADD("maincpu",Z80, XTAL_10_738635MHz/3) /* Not verified */
MCFG_CPU_PROGRAM_MAP(sv8000_mem)
MCFG_CPU_IO_MAP(sv8000_io)
+ MCFG_CPU_VBLANK_INT_DRIVER("screen", sv8000_state, irq0_line_hold)
MCFG_I8255_ADD( "i8255", sv8000_i8255_interface )