summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/hh_sm510.cpp
diff options
context:
space:
mode:
author algestam <henrik@algestam.se>2019-10-03 21:52:59 +0200
committer hap <happppp@users.noreply.github.com>2019-10-03 21:52:59 +0200
commitc55de2f8dfe5eade18dfb4c905285006f994d533 (patch)
treee5b64e005c477f837469e23ddc41e1067e484b0d /src/mame/drivers/hh_sm510.cpp
parent563a00e0e4ae9ebc6f15f6840c68b6f3300e5af1 (diff)
New working machine added (#5705)
---------- Game & Watch: Lion [algestam, Mr. Do, Sean Riddle]
Diffstat (limited to 'src/mame/drivers/hh_sm510.cpp')
-rw-r--r--src/mame/drivers/hh_sm510.cpp88
1 files changed, 87 insertions, 1 deletions
diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp
index c0607ca665a..05fbbe03f0e 100644
--- a/src/mame/drivers/hh_sm510.cpp
+++ b/src/mame/drivers/hh_sm510.cpp
@@ -53,7 +53,7 @@ RC-04 s SM5A Fire (aka Fireman Fireman)
IP-05 s SM5A Judge
MN-06* g SM5A? Manhole
CN-07 g SM5A Helmet (aka Headache)
-LN-08* g SM5A? Lion
+LN-08 g SM5A Lion
PR-21 ws SM5A Parachute
OC-22 ws SM5A Octopus
PP-23 ws SM5A Popeye
@@ -850,6 +850,91 @@ ROM_END
/***************************************************************************
+ Nintendo Game & Watch: Lion (model LN-08)
+ * PCB label LN-08
+ * Sharp SM5A label LN-08 519A (no decap)
+ * lcd screen with custom segments, 1-bit sound
+
+***************************************************************************/
+
+class gnw_lion_state : public hh_sm510_state
+{
+public:
+ gnw_lion_state(const machine_config &mconfig, device_type type, const char *tag) :
+ hh_sm510_state(mconfig, type, tag)
+ { }
+
+ void gnw_lion(machine_config &config);
+};
+
+// config
+
+static INPUT_PORTS_START( gnw_lion )
+ PORT_START("IN.0") // R2
+ PORT_CONFNAME( 0x01, 0x00, "Increase Speed (Cheat)") // factory test, unpopulated on PCB -- disable after boot
+ PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
+ PORT_CONFSETTING( 0x01, DEF_STR( On ) )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) // same as 0x01?
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) // "
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) // "
+
+ PORT_START("IN.1") // R3
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_DOWN ) PORT_CHANGED_CB(input_changed) PORT_16WAY
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICKRIGHT_UP ) PORT_CHANGED_CB(input_changed) PORT_16WAY
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_CHANGED_CB(input_changed) PORT_16WAY
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_UP ) PORT_CHANGED_CB(input_changed) PORT_16WAY
+
+ PORT_START("IN.2") // R4
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_CB(input_changed) PORT_NAME("Time")
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game B")
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game A")
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Alarm")
+
+ PORT_START("B")
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) // display test?
+
+ PORT_START("ACL")
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_CB(acl_button) PORT_NAME("ACL")
+INPUT_PORTS_END
+
+void gnw_lion_state::gnw_lion(machine_config &config)
+{
+ /* basic machine hardware */
+ SM5A(config, m_maincpu);
+ m_maincpu->set_r_mask_option(sm510_base_device::RMASK_DIRECT); // confirmed
+ m_maincpu->write_segs().set(FUNC(hh_sm510_state::sm500_lcd_segment_w));
+ m_maincpu->read_k().set(FUNC(hh_sm510_state::input_r));
+ m_maincpu->write_r().set(FUNC(hh_sm510_state::piezo_input_w));
+ m_maincpu->read_b().set_ioport("B");
+
+ /* video hardware */
+ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));
+ screen.set_refresh_hz(60);
+ screen.set_size(1646, 1080);
+ screen.set_visarea_full();
+
+ /* sound hardware */
+ SPEAKER(config, "mono").front_center();
+ SPEAKER_SOUND(config, m_speaker);
+ m_speaker->add_route(ALL_OUTPUTS, "mono", 0.25);
+}
+
+// roms
+
+ROM_START( gnw_lion )
+ ROM_REGION( 0x1000, "maincpu", 0 )
+ ROM_LOAD( "ln-08", 0x0000, 0x0740, CRC(9677681d) SHA1(6f7c960e04b63f1b7d926b598413f4c818b8fe53) )
+
+ ROM_REGION( 155699, "screen", 0)
+ ROM_LOAD( "gnw_lion.svg", 0, 155699, CRC(32b28c6f) SHA1(95aa397ed39408c80957f0f850e36dfe73e337fd) )
+ROM_END
+
+
+
+
+
+/***************************************************************************
+
Nintendo Game & Watch: Parachute (model PR-21)
* PCB label PR-21Y
* Sharp SM5A label PR-21 52XC (no decap)
@@ -10283,6 +10368,7 @@ CONS( 1980, gnw_vermin, 0, 0, gnw_vermin, gnw_vermin, gnw_vermin_sta
CONS( 1980, gnw_fires, 0, 0, gnw_fires, gnw_fires, gnw_fires_state, empty_init, "Nintendo", "Game & Watch: Fire (silver)", MACHINE_SUPPORTS_SAVE )
CONS( 1980, gnw_judge, 0, 0, gnw_judge, gnw_judge, gnw_judge_state, empty_init, "Nintendo", "Game & Watch: Judge (green)", MACHINE_SUPPORTS_SAVE )
CONS( 1981, gnw_helmet, 0, 0, gnw_helmet, gnw_helmet, gnw_helmet_state, empty_init, "Nintendo", "Game & Watch: Helmet (Rev. 2)", MACHINE_SUPPORTS_SAVE )
+CONS( 1981, gnw_lion, 0, 0, gnw_lion, gnw_lion, gnw_lion_state, empty_init, "Nintendo", "Game & Watch: Lion", MACHINE_SUPPORTS_SAVE )
// Nintendo G&W: wide screen
CONS( 1981, gnw_pchute, 0, 0, gnw_pchute, gnw_pchute, gnw_pchute_state, empty_init, "Nintendo", "Game & Watch: Parachute", MACHINE_SUPPORTS_SAVE )