summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/statriv2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/statriv2.cpp')
-rw-r--r--src/mame/drivers/statriv2.cpp64
1 files changed, 60 insertions, 4 deletions
diff --git a/src/mame/drivers/statriv2.cpp b/src/mame/drivers/statriv2.cpp
index f798427b117..d887349ddc7 100644
--- a/src/mame/drivers/statriv2.cpp
+++ b/src/mame/drivers/statriv2.cpp
@@ -65,8 +65,7 @@ PROM use is unknown
Issues:
* statusbj - very glitchy, bad video, seems to spin
* hangman - keys are weird, spinner is busted
- *
-quaquiz2 - no inputs, needs NVRAM
+ * quaquiz2 - no inputs, needs NVRAM
*/
@@ -96,6 +95,7 @@ public:
void statriv2(machine_config &config);
void funcsino(machine_config &config);
+ void tripdraw(machine_config &config);
void statriv2v(machine_config &config);
void init_addr_xlh();
@@ -129,9 +129,11 @@ private:
TILE_GET_INFO_MEMBER(vertical_tile_info);
virtual void video_start() override;
void statriv2_palette(palette_device &palette) const;
+ void check_coin_status();
DECLARE_VIDEO_START(vertical);
uint32_t screen_update_statriv2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(statriv2_interrupt);
+ INTERRUPT_GEN_MEMBER(tripdraw_interrupt);
void statriv2_io_map(address_map &map);
void statriv2_map(address_map &map);
@@ -229,19 +231,30 @@ uint32_t statriv2_state::screen_update_statriv2(screen_device &screen, bitmap_in
*
*************************************/
-INTERRUPT_GEN_MEMBER(statriv2_state::statriv2_interrupt)
+void statriv2_state::check_coin_status()
{
uint8_t new_coin = ioport("COIN")->read();
/* check the coin inputs once per frame */
m_latched_coin |= new_coin & (new_coin ^ m_last_coin);
m_last_coin = new_coin;
+}
+
+INTERRUPT_GEN_MEMBER(statriv2_state::statriv2_interrupt)
+{
+ check_coin_status();
device.execute().set_input_line(I8085_RST75_LINE, ASSERT_LINE);
device.execute().set_input_line(I8085_RST75_LINE, CLEAR_LINE);
}
+INTERRUPT_GEN_MEMBER(statriv2_state::tripdraw_interrupt)
+{
+ check_coin_status();
+ device.execute().set_input_line(I8085_RST55_LINE, ASSERT_LINE);
+ device.execute().set_input_line(I8085_RST55_LINE, CLEAR_LINE);
+}
/*************************************
*
@@ -387,6 +400,42 @@ static INPUT_PORTS_START( funcsino )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
INPUT_PORTS_END
+static INPUT_PORTS_START( tripdraw )
+ PORT_START("IN0")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_BET )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Draw") PORT_CODE(KEYCODE_3)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1 / Lo")
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2")
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3 / Double")
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4")
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5 / Hi")
+
+ PORT_START("IN1")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_4)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state, latched_coin_r, "COIN")
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
+ PORT_DIPNAME( 0x10, 0x10, "DIP switch? 10" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x10, DEF_STR( On ) )
+ PORT_DIPNAME( 0x20, 0x20, "DIP switch? 20" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x20, DEF_STR( On ) )
+ PORT_DIPNAME( 0x40, 0x40, "DIP switch? 40" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x40, DEF_STR( On ) )
+ PORT_DIPNAME( 0x80, 0x80, "DIP switch? 80" )
+ PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
+ PORT_DIPSETTING( 0x80, DEF_STR( On ) )
+
+ PORT_START("IN2")
+ PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
+
+ PORT_START("COIN")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
+INPUT_PORTS_END
+
static INPUT_PORTS_START( bigcsino ) // flyer shows 8 buttons on the cabinet
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_NAME("Play")
@@ -663,6 +712,13 @@ void statriv2_state::funcsino(machine_config &config)
m_maincpu->set_clock(MASTER_CLOCK/2); /* 3 MHz?? seems accurate */
}
+void statriv2_state::tripdraw(machine_config &config)
+{
+ statriv2(config);
+
+ /* basic machine hardware */
+ m_maincpu->set_vblank_int("screen", FUNC(statriv2_state::tripdraw_interrupt));
+}
/*************************************
@@ -1625,7 +1681,7 @@ void statriv2_state::init_laserdisc()
GAME( 1981, statusbj, 0, statriv2, statusbj, statriv2_state, empty_init, ROT0, "Status Games", "Status Black Jack (V1.0c)", MACHINE_SUPPORTS_SAVE )
GAME( 1981, funcsino, 0, funcsino, funcsino, statriv2_state, empty_init, ROT0, "Status Games", "Status Fun Casino (V1.3s)", MACHINE_SUPPORTS_SAVE )
-GAME( 1981, tripdraw, 0, statriv2, funcsino, statriv2_state, empty_init, ROT0, "Status Games", "Tripple Draw (V3.1 s)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING )
+GAME( 1981, tripdraw, 0, tripdraw, tripdraw, statriv2_state, empty_init, ROT0, "Status Games", "Tripple Draw (V3.1 s)", MACHINE_SUPPORTS_SAVE )
GAME( 1984, bigcsino, 0, statriv2, bigcsino, statriv2_state, empty_init, ROT0, "Status Games", "Big Casino", MACHINE_SUPPORTS_SAVE )
GAME( 1984, hangman, 0, statriv2, hangman, statriv2_state, init_addr_lmh, ROT0, "Status Games", "Hangman", MACHINE_SUPPORTS_SAVE )
GAME( 1984, trivquiz, 0, statriv2, statriv2, statriv2_state, init_addr_lhx, ROT0, "Status Games", "Triv Quiz", MACHINE_SUPPORTS_SAVE )