summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/hh_cop400.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/hh_cop400.cpp')
-rw-r--r--src/mame/drivers/hh_cop400.cpp164
1 files changed, 143 insertions, 21 deletions
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 292c60dff99..a5868547101 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -30,7 +30,8 @@
#include "ctstein.lh" // clickable
#include "einvaderc.lh"
#include "funjacks.lh" // clickable
-#include "funrlgl.lh"
+#include "funrlgl.lh" // clickable
+#include "funtag.lh" // clickable
#include "h2hbaskbc.lh"
#include "h2hhockeyc.lh"
#include "h2hsoccerc.lh"
@@ -814,7 +815,7 @@ ROM_END
/***************************************************************************
- Mattel Funtronics: Jacks
+ Mattel Funtronics: Jacks (model 1603)
* COP410L MCU bonded directly to PCB (die label COP410L/B NGS)
* 8 LEDs, 1-bit sound
@@ -881,32 +882,32 @@ u8 funjacks_state::read_g()
// config
static INPUT_PORTS_START( funjacks )
- PORT_START("IN.0") // D0 port G
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_START("IN.0") // D0 port L
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 )
- PORT_START("IN.1") // D1 port G
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON5 )
+ PORT_START("IN.1") // D1 port L
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 )
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 )
- PORT_START("IN.2") // D2 port G
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON6 )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // positioned at 1 o'clock on panel, increment clockwise
+ PORT_START("IN.2") // D2 port L
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // positioned at 1 o'clock on panel, increment clockwise
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 )
PORT_START("IN.3") // port G
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) // speaker
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START )
- PORT_CONFNAME( 0x08, 0x00, DEF_STR( Players ) )
- PORT_CONFSETTING( 0x00, "1" )
- PORT_CONFSETTING( 0x08, "2" )
+ PORT_CONFNAME( 0x08, 0x08, DEF_STR( Difficulty ) )
+ PORT_CONFSETTING( 0x08, "1" )
+ PORT_CONFSETTING( 0x00, "2" )
INPUT_PORTS_END
void funjacks_state::funjacks(machine_config &config)
{
/* basic machine hardware */
- COP410(config, m_maincpu, 750000); // approximation - RC osc. R=47K, C=56pF
- m_maincpu->set_config(COP400_CKI_DIVISOR_8, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
+ COP410(config, m_maincpu, 850000); // approximation - RC osc. R=47K, C=56pF
+ m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
m_maincpu->write_d().set(FUNC(funjacks_state::write_d));
m_maincpu->write_l().set(FUNC(funjacks_state::write_l));
m_maincpu->write_g().set(FUNC(funjacks_state::write_g));
@@ -935,7 +936,7 @@ ROM_END
/***************************************************************************
- Mattel Funtronics: Red Light Green Light
+ Mattel Funtronics: Red Light Green Light (model 1604)
* COP410L MCU bonded directly to PCB (die label COP410L/B NHZ)
* 14 LEDs, 1-bit sound
@@ -1005,8 +1006,8 @@ INPUT_PORTS_END
void funrlgl_state::funrlgl(machine_config &config)
{
/* basic machine hardware */
- COP410(config, m_maincpu, 750000); // approximation - RC osc. R=51K, C=91pF
- m_maincpu->set_config(COP400_CKI_DIVISOR_8, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
+ COP410(config, m_maincpu, 800000); // approximation - RC osc. R=51K, C=91pF
+ m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
m_maincpu->write_d().set(FUNC(funrlgl_state::write_d));
m_maincpu->write_l().set(FUNC(funrlgl_state::write_l));
m_maincpu->read_l_tristate().set_constant(0xff);
@@ -1015,7 +1016,7 @@ void funrlgl_state::funrlgl(machine_config &config)
/* video hardware */
PWM_DISPLAY(config, m_display).set_size(4, 4);
- m_display->set_bri_levels(0.01, 0.1); // top led is brighter
+ m_display->set_bri_levels(0.005, 0.1); // top led is brighter
config.set_default_layout(layout_funrlgl);
/* sound hardware */
@@ -1036,6 +1037,126 @@ ROM_END
/***************************************************************************
+ Mattel Funtronics: Tag (model 1497)
+ * COP410L MCU bonded directly to PCB (die label COP410L/B GTJ)
+ * 7 LEDs, 7 buttons, 1-bit sound
+
+***************************************************************************/
+
+class funtag_state : public hh_cop400_state
+{
+public:
+ funtag_state(const machine_config &mconfig, device_type type, const char *tag) :
+ hh_cop400_state(mconfig, type, tag)
+ { }
+
+ void update_display();
+ void write_d(u8 data);
+ void write_l(u8 data);
+ void write_g(u8 data);
+ u8 read_l();
+ u8 read_g();
+ void funtag(machine_config &config);
+};
+
+// handlers
+
+void funtag_state::update_display()
+{
+ m_display->matrix(m_d, m_l);
+}
+
+void funtag_state::write_d(u8 data)
+{
+ // D: led grid + input mux
+ m_inp_mux = data;
+ m_d = ~data & 0xf;
+ update_display();
+}
+
+void funtag_state::write_l(u8 data)
+{
+ // L0,L1: led state
+ m_l = data & 3;
+ update_display();
+}
+
+void funtag_state::write_g(u8 data)
+{
+ // G2: speaker out
+ m_speaker->level_w(data >> 2 & 1);
+}
+
+u8 funtag_state::read_l()
+{
+ // L2: difficulty switch
+ return m_inputs[4]->read() | 8;
+}
+
+u8 funtag_state::read_g()
+{
+ // G0,G1: multiplexed inputs
+ // G3: start button
+ return read_inputs(3, 3) | m_inputs[3]->read() | 4;
+}
+
+// config
+
+static INPUT_PORTS_START( funtag )
+ PORT_START("IN.0") // D0 port G
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 )
+
+ PORT_START("IN.1") // D1 port G
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 )
+
+ PORT_START("IN.2") // D2 port G
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 )
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 )
+
+ PORT_START("IN.3") // port G
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START )
+
+ PORT_START("IN.4") // port L
+ PORT_CONFNAME( 0x04, 0x04, DEF_STR( Difficulty ) )
+ PORT_CONFSETTING( 0x04, "1" )
+ PORT_CONFSETTING( 0x00, "2" )
+INPUT_PORTS_END
+
+void funtag_state::funtag(machine_config &config)
+{
+ /* basic machine hardware */
+ COP410(config, m_maincpu, 1000000); // approximation - RC osc. R=47K, C=91pF
+ m_maincpu->set_config(COP400_CKI_DIVISOR_16, COP400_CKO_OSCILLATOR_OUTPUT, false); // guessed
+ m_maincpu->write_d().set(FUNC(funtag_state::write_d));
+ m_maincpu->write_l().set(FUNC(funtag_state::write_l));
+ m_maincpu->write_g().set(FUNC(funtag_state::write_g));
+ m_maincpu->read_l().set(FUNC(funtag_state::read_l));
+ m_maincpu->read_g().set(FUNC(funtag_state::read_g));
+
+ /* video hardware */
+ PWM_DISPLAY(config, m_display).set_size(4, 2);
+ config.set_default_layout(layout_funtag);
+
+ /* sound hardware */
+ SPEAKER(config, "mono").front_center();
+ SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25);
+}
+
+// roms
+
+ROM_START( funtag )
+ ROM_REGION( 0x0200, "maincpu", 0 )
+ ROM_LOAD( "cop410l_b_gtj", 0x0000, 0x0200, CRC(ce565da6) SHA1(34e5f39e32f220007d353c93787c1a6d117592c1) )
+ROM_END
+
+
+
+
+
+/***************************************************************************
+
Mattel Dalla$ (J.R. handheld)
* COP444 MCU label COP444L-HYN/N
* 8-digit 7seg display, 1-bit sound
@@ -1819,7 +1940,8 @@ CONS( 1980, unkeinv, 0, 0, unkeinv, unkeinv, unkeinv_state, e
CONS( 1980, lchicken, 0, 0, lchicken, lchicken, lchicken_state, empty_init, "LJN", "I Took a Lickin' From a Chicken", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_MECHANICAL )
CONS( 1979, funjacks, 0, 0, funjacks, funjacks, funjacks_state, empty_init, "Mattel", "Funtronics: Jacks", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
-CONS( 1979, funrlgl, 0, 0, funrlgl, funrlgl, funrlgl_state, empty_init, "Mattel", "Funtronics: Red Light Green Light", MACHINE_SUPPORTS_SAVE )
+CONS( 1979, funrlgl, 0, 0, funrlgl, funrlgl, funrlgl_state, empty_init, "Mattel", "Funtronics: Red Light Green Light", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
+CONS( 1980, funtag, 0, 0, funtag, funtag, funtag_state, empty_init, "Mattel", "Funtronics: Tag", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
CONS( 1981, mdallas, 0, 0, mdallas, mdallas, mdallas_state, empty_init, "Mattel", "Dalla$ (J.R. handheld)", MACHINE_SUPPORTS_SAVE ) // ***
CONS( 1980, plus1, 0, 0, plus1, plus1, plus1_state, empty_init, "Milton Bradley", "Plus One", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_CONTROLS ) // ***