From 440e660181556a6d377ba538c4a8b9fb8b8716d9 Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 13 Feb 2017 02:22:35 +0100 Subject: [PATCH] New working machine added ----------- Atari Touch Me [hap, Sean Riddle] --- src/mame/drivers/hh_cop400.cpp | 3 +- src/mame/drivers/hh_pic16.cpp | 36 +++++--- src/mame/layout/maniac.lay | 3 +- src/mame/layout/touchme.lay | 155 +++++++++++++++++++++++++++++++++ 4 files changed, 179 insertions(+), 18 deletions(-) create mode 100644 src/mame/layout/touchme.lay diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index 7f2dd2cb105..db326f0230e 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -869,7 +869,6 @@ public: DECLARE_WRITE8_MEMBER(write_d); DECLARE_WRITE8_MEMBER(write_l); DECLARE_WRITE8_MEMBER(write_g); - DECLARE_READ8_MEMBER(read_l_tristate) { return 0xff; } DECLARE_INPUT_CHANGED_MEMBER(reset_button); }; @@ -926,7 +925,7 @@ static MACHINE_CONFIG_START( funrlgl, funrlgl_state ) MCFG_COP400_CONFIG(COP400_CKI_DIVISOR_8, COP400_CKO_OSCILLATOR_OUTPUT, false) // guessed MCFG_COP400_WRITE_D_CB(WRITE8(funrlgl_state, write_d)) MCFG_COP400_WRITE_L_CB(WRITE8(funrlgl_state, write_l)) - MCFG_COP400_READ_L_TRISTATE_CB(READ8(funrlgl_state, read_l_tristate)) + MCFG_COP400_READ_L_TRISTATE_CB(CONSTANT(0xff)) MCFG_COP400_WRITE_G_CB(WRITE8(funrlgl_state, write_g)) MCFG_COP400_READ_G_CB(IOPORT("IN.0")) diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp index 96dd9e77af4..8b5d16eead8 100644 --- a/src/mame/drivers/hh_pic16.cpp +++ b/src/mame/drivers/hh_pic16.cpp @@ -28,7 +28,8 @@ #include "machine/clock.h" #include "sound/speaker.h" -#include "maniac.lh" +#include "maniac.lh" // clickable +#include "touchme.lh" // clickable //#include "hh_pic16_test.lh" // common test-layout - use external artwork @@ -254,6 +255,12 @@ u16 hh_pic16_state::read_inputs(int columns) * PIC1655A-053 * 2 7seg LEDs + 4 other LEDs, 1-bit sound + This is the handheld version of the 1974 arcade game. + + Known revisions: + - Model BH-100 GI C013233 Rev 2 Atari W 1979: PIC1655A-053 + - Model BH-100 C013150 Rev 6 Atari 1979: AMI C10745 (custom ASIC) + ***************************************************************************/ class touchme_state : public hh_pic16_state @@ -267,7 +274,6 @@ public: void update_speaker(); DECLARE_READ8_MEMBER(read_a); DECLARE_WRITE8_MEMBER(write_b); - DECLARE_READ8_MEMBER(read_c) { return 0xff; } DECLARE_WRITE8_MEMBER(write_c); }; @@ -275,6 +281,8 @@ public: void touchme_state::prepare_display() { + set_display_segmask(3, 0x7f); + display_matrix(7, 7, m_c, ~m_b & 0x7b); } void touchme_state::update_speaker() @@ -318,15 +326,15 @@ WRITE8_MEMBER(touchme_state::write_c) static INPUT_PORTS_START( touchme ) PORT_START("IN.0") // B0 port A PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON7 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Last") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("High") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Skill") PORT_START("IN.1") // B1 port A - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Blue Button") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Yellow Button") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Red Button") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Green Button") PORT_START("IN.2") // B2 port A PORT_CONFNAME( 0x07, 0x01^0x07, "Game Select") @@ -341,17 +349,17 @@ static const s16 touchme_speaker_levels[] = { 0, 0x7fff, -0x8000, 0 }; static MACHINE_CONFIG_START( touchme, touchme_state ) /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", PIC1655, 1000000) // approximation - RC osc. R=100K, C=47pF + MCFG_CPU_ADD("maincpu", PIC1655, 300000) // approximation - RC osc. R=100K, C=47pF MCFG_PIC16C5x_READ_A_CB(READ8(touchme_state, read_a)) MCFG_PIC16C5x_WRITE_B_CB(WRITE8(touchme_state, write_b)) - MCFG_PIC16C5x_READ_C_CB(READ8(touchme_state, read_c)) + MCFG_PIC16C5x_READ_C_CB(CONSTANT(0xff)) MCFG_PIC16C5x_WRITE_C_CB(WRITE8(touchme_state, write_c)) - MCFG_DEVICE_ADD("clock", CLOCK, 1000000/4) // PIC CLKOUT, tied to RTCC + MCFG_DEVICE_ADD("clock", CLOCK, 300000/4) // PIC CLKOUT, tied to RTCC MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("maincpu", pic1655_device, write_rtcc)) MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_pic16_state, display_decay_tick, attotime::from_msec(1)) - //MCFG_DEFAULT_LAYOUT(layout_touchme) + MCFG_DEFAULT_LAYOUT(layout_touchme) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -596,7 +604,7 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1978, touchme, 0, 0, touchme, touchme, driver_device, 0, "Atari", "Touch Me (handheld)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +CONS( 1978, touchme, 0, 0, touchme, touchme, driver_device, 0, "Atari", "Touch Me (handheld, PIC1655A version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1979, maniac, 0, 0, maniac, maniac, driver_device, 0, "Ideal", "Maniac", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/layout/maniac.lay b/src/mame/layout/maniac.lay index 669986dd630..1cce2b94a55 100644 --- a/src/mame/layout/maniac.lay +++ b/src/mame/layout/maniac.lay @@ -20,11 +20,10 @@ - + - diff --git a/src/mame/layout/touchme.lay b/src/mame/layout/touchme.lay new file mode 100644 index 00000000000..00745eaa252 --- /dev/null +++ b/src/mame/layout/touchme.lay @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +