Merge pull request #4406 from algestam/gnw_squish

New working machine added
This commit is contained in:
MooglyGuy 2018-12-16 01:31:33 +01:00 committed by GitHub
commit ead56e514e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 94 additions and 0 deletions

View File

@ -1646,6 +1646,86 @@ MACHINE_CONFIG_END
/***************************************************************************
Nintendo Game & Watch: Squish (model MG-61)
* PCB label MG-61
* Sharp SM510 label MG-61 8841B (no decap)
* vertical dual lcd screens with custom segments, 1-bit sound
***************************************************************************/
class gnw_squish_state : public hh_sm510_state
{
public:
gnw_squish_state(const machine_config &mconfig, device_type type, const char *tag)
: hh_sm510_state(mconfig, type, tag)
{
m_inp_lines = 2;
}
void gnw_squish(machine_config &config);
};
// config
static INPUT_PORTS_START( gnw_squish )
PORT_START("IN.0") // S1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr)
PORT_START("IN.1") // S2
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Time")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Game A")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Game B")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, input_changed, nullptr) PORT_NAME("Alarm")
PORT_START("ACL")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, acl_button, nullptr) PORT_NAME("ACL")
PORT_START("B") // MCU B(beta) pin pulled to GND
PORT_CONFNAME( 0x01, 0x01, "Infinite Lives (Cheat)")
PORT_CONFSETTING( 0x01, DEF_STR( Off ) )
PORT_CONFSETTING( 0x00, DEF_STR( On ) )
INPUT_PORTS_END
MACHINE_CONFIG_START(gnw_squish_state::gnw_squish)
/* basic machine hardware */
SM510(config, m_maincpu);
m_maincpu->set_r_mask_option(2); // confirmed
m_maincpu->write_segs().set(FUNC(hh_sm510_state::sm510_lcd_segment_w));
m_maincpu->read_k().set(FUNC(hh_sm510_state::input_r));
m_maincpu->write_s().set(FUNC(hh_sm510_state::input_w));
m_maincpu->write_r().set(FUNC(hh_sm510_state::piezo_r1_w));
m_maincpu->read_b().set_ioport("B");
/* video hardware */
MCFG_SCREEN_SVG_ADD("screen_top", "svg_top")
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_SIZE(1920/2, 1285/2)
MCFG_SCREEN_VISIBLE_AREA(0, 1920/2-1, 0, 1285/2-1)
MCFG_SCREEN_SVG_ADD("screen_bottom", "svg_bottom")
MCFG_SCREEN_REFRESH_RATE(50)
MCFG_SCREEN_SIZE(1920/2, 1287/2)
MCFG_SCREEN_VISIBLE_AREA(0, 1920/2-1, 0, 1287/2-1)
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_sm510_state, display_decay_tick, attotime::from_msec(1))
config.set_default_layout(layout_gnw_dualv);
/* sound hardware */
SPEAKER(config, "mono").front_center();
MCFG_DEVICE_ADD("speaker", SPEAKER_SOUND)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MACHINE_CONFIG_END
/***************************************************************************
Nintendo Game & Watch: Donkey Kong Jr. (model DJ-101)
@ -7039,6 +7119,18 @@ ROM_START( gnw_mario )
ROM_END
ROM_START( gnw_squish )
ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD( "mg-61", 0x0000, 0x1000, CRC(79cd509c) SHA1(969e5425984ba9e5183c68b38b3588f53d1e8e5d) )
ROM_REGION( 70300, "svg_top", 0)
ROM_LOAD( "gnw_squish_top.svg", 0, 70300, CRC(f1358ba9) SHA1(414d29db64b83a50b20f31b857e4c3a77d19d3c8) )
ROM_REGION( 279606, "svg_bottom", 0)
ROM_LOAD( "gnw_squish_bottom.svg", 0, 279606, CRC(1d4ac23f) SHA1(d6eb78bae5ca18cc5fe5d8a300902766dd9601aa) )
ROM_END
ROM_START( gnw_dkjr )
ROM_REGION( 0x1000, "maincpu", 0 )
ROM_LOAD( "dj-101", 0x0000, 0x1000, CRC(8dcfb5d1) SHA1(e0ef578e9362eb9a3cab631376df3cf55978f2de) )
@ -7601,6 +7693,7 @@ CONS( 1982, gnw_mickdon, 0, 0, gnw_mickdon, gnw_mickdon, gnw_mickdon_st
CONS( 1982, gnw_ghouse, 0, 0, gnw_ghouse, gnw_ghouse, gnw_ghouse_state, empty_init, "Nintendo", "Game & Watch: Green House", MACHINE_SUPPORTS_SAVE )
CONS( 1983, gnw_dkong2, 0, 0, gnw_dkong2, gnw_dkong2, gnw_dkong2_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong II", MACHINE_SUPPORTS_SAVE )
CONS( 1983, gnw_mario, 0, 0, gnw_mario, gnw_mario, gnw_mario_state, empty_init, "Nintendo", "Game & Watch: Mario Bros.", MACHINE_SUPPORTS_SAVE )
CONS( 1986, gnw_squish, 0, 0, gnw_squish, gnw_squish, gnw_squish_state, empty_init, "Nintendo", "Game & Watch: Squish", MACHINE_SUPPORTS_SAVE )
// new wide screen
CONS( 1982, gnw_dkjr, 0, 0, gnw_dkjr, gnw_dkjr, gnw_dkjr_state, empty_init, "Nintendo", "Game & Watch: Donkey Kong Jr. (new wide screen)", MACHINE_SUPPORTS_SAVE )

View File

@ -15002,6 +15002,7 @@ gnw_mmouse // Nintendo
gnw_mickdon // Nintendo
gnw_opanic // Nintendo
gnw_smb // Nintendo
gnw_squish // Nintendo
gnw_tfish // Nintendo
kbilly // Konami
kblades // Konami