summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-12-03 09:36:02 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-12-03 09:36:02 -0500
commit911376bd24f70595bc66126692bdd4d3083cd2e5 (patch)
treed39f87872322a64e07eb382ae357f13802446a36
parent0910676c404f28719190844544356e2dd86bc186 (diff)
te7750: Default clock; update docs; add TE7752 type (nw)
-rw-r--r--src/devices/machine/te7750.cpp47
-rw-r--r--src/devices/machine/te7750.h15
-rw-r--r--src/mame/drivers/bingowav.cpp4
-rw-r--r--src/mame/drivers/capr1.cpp2
-rw-r--r--src/mame/drivers/cpzodiac.cpp2
-rw-r--r--src/mame/drivers/gokidetor.cpp2
-rw-r--r--src/mame/drivers/taito_f2.cpp4
7 files changed, 57 insertions, 19 deletions
diff --git a/src/devices/machine/te7750.cpp b/src/devices/machine/te7750.cpp
index 4476a187d23..a59c25ea8a1 100644
--- a/src/devices/machine/te7750.cpp
+++ b/src/devices/machine/te7750.cpp
@@ -26,13 +26,14 @@
RD becomes a Motorola-style R/W control signal (R = 1, W = 0),
and WR becomes an active-low "M Enable" input.
- TE7750, TE7751, TE7753 and TE7754 appear to be functionally
- almost identical, though only the last two are pin-compatible.
+ TE7750, TE7751, TE7752, TE7753 and TE7754 appear to be nearly
+ identical functionally, though they have three different pinouts
+ (TE7751/TE7752 appear to be pin-compatible, as are TE7753/TE7754).
One known difference is that TE7753 resets all output latches to
"H" and TE7754 resets them to "L" (the latches can be written in
- soft mode before the ports are set for output). TE7750 and TE7751
- probably do either one or the other, but available documentation
- is incomplete.
+ soft mode before the ports are set for output). TE7750, TE7751 and
+ TE7752 should do either one or the other, but available
+ documentation for these parts is incomplete.
***********************************************************************
@@ -54,6 +55,17 @@
* CR1-CR3 are only writable in soft mode.
+ IOS0 IOS1 IOS2 P1 P2 P3 P4 P5 P6 P7 P8 P9
+ ---- ---- ---- -- -- -- -- -- -- -- -- --
+ 0 0 0 CR1 CR1 CR1 CR2 CR2 CR2 CR3 CR0 CR3
+ 0 0 1 I O O O O O O CR0 O
+ 0 1 0 I I O O O O O CR0 O
+ 0 1 1 I I I O O O O CR0 O
+ 1 0 0 I I I I O O O CR0 O
+ 1 0 1 I I I I I O O CR0 O
+ 1 1 0 I I I I I I O CR0 O
+ 1 1 1 I I I I I I I CR0 O
+
***********************************************************************
Table of pin assignments
@@ -165,6 +177,7 @@
//**************************************************************************
DEFINE_DEVICE_TYPE(TE7750, te7750_device, "te7750", "TE7750 Super I/O Expander")
+DEFINE_DEVICE_TYPE(TE7752, te7752_device, "te7752", "TE7752 Super I/O Expander")
//**************************************************************************
// DEVICE DEFINITION
@@ -174,15 +187,29 @@ DEFINE_DEVICE_TYPE(TE7750, te7750_device, "te7750", "TE7750 Super I/O Expander")
// te7750_device - constructor
//-------------------------------------------------
-te7750_device::te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
- : device_t(mconfig, TE7750, tag, owner, clock),
- m_input_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}},
- m_output_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}},
- m_ios_cb(*this)
+te7750_device::te7750_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock)
+ : device_t(mconfig, type, tag, owner, clock)
+ , m_input_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}}
+ , m_output_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}}
+ , m_ios_cb(*this)
{
std::fill(std::begin(m_data_dir), std::end(m_data_dir), 0xff);
}
+te7750_device::te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : te7750_device(mconfig, TE7750, tag, owner, clock)
+{
+}
+
+//-------------------------------------------------
+// te7752_device - constructor
+//-------------------------------------------------
+
+te7752_device::te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : te7750_device(mconfig, TE7752, tag, owner, clock)
+{
+}
+
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
diff --git a/src/devices/machine/te7750.h b/src/devices/machine/te7750.h
index 8dc914817d1..4310a6e2bf5 100644
--- a/src/devices/machine/te7750.h
+++ b/src/devices/machine/te7750.h
@@ -22,7 +22,7 @@ class te7750_device : public device_t
{
public:
// construction/destruction
- te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+ te7750_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
// configuration
auto in_port1_cb() { return m_input_cb[0].bind(); }
@@ -50,6 +50,8 @@ public:
DECLARE_WRITE8_MEMBER(write);
protected:
+ te7750_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock);
+
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
@@ -71,7 +73,16 @@ private:
u8 m_data_dir[9];
};
-// device type definition
+// ======================> te7752_device
+
+class te7752_device : public te7750_device
+{
+public:
+ te7752_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0);
+};
+
+// device type definitions
DECLARE_DEVICE_TYPE(TE7750, te7750_device)
+DECLARE_DEVICE_TYPE(TE7752, te7752_device)
#endif // MAME_MACHINE_TE7750_H
diff --git a/src/mame/drivers/bingowav.cpp b/src/mame/drivers/bingowav.cpp
index 3b14bca7142..c9c5b4d963e 100644
--- a/src/mame/drivers/bingowav.cpp
+++ b/src/mame/drivers/bingowav.cpp
@@ -119,10 +119,10 @@ MACHINE_CONFIG_START(bingowav_state::bingowav)
tmp68301_device &tmp68301(TMP68301(config, "maintmp", 0)); // wrong
tmp68301.set_cputag(m_maincpu);
- te7750_device &mainioh(TE7750(config, "mainioh", 0));
+ te7750_device &mainioh(TE7750(config, "mainioh"));
mainioh.ios_cb().set_constant(5);
- te7750_device &mainiol(TE7750(config, "mainiol", 0));
+ te7750_device &mainiol(TE7750(config, "mainiol"));
mainiol.ios_cb().set_constant(4);
MCFG_DEVICE_ADD("audiocpu", Z80, 4000000)
diff --git a/src/mame/drivers/capr1.cpp b/src/mame/drivers/capr1.cpp
index 35dc0ed522c..820b951d612 100644
--- a/src/mame/drivers/capr1.cpp
+++ b/src/mame/drivers/capr1.cpp
@@ -205,7 +205,7 @@ void capr1_state::cspin2(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &capr1_state::cspin2_map);
//m_maincpu->set_periodic_int(FUNC(capr1_state::nmi_line_pulse), attotime::from_hz(20));
- te7750_device &te7750(TE7750(config, "te7750", 0)); // guess
+ te7750_device &te7750(TE7750(config, "te7750")); // guess
te7750.ios_cb().set_constant(7);
te7750.in_port1_cb().set_ioport("IN1");
te7750.in_port2_cb().set_ioport("IN2");
diff --git a/src/mame/drivers/cpzodiac.cpp b/src/mame/drivers/cpzodiac.cpp
index c3411be59f1..7af1fb829dd 100644
--- a/src/mame/drivers/cpzodiac.cpp
+++ b/src/mame/drivers/cpzodiac.cpp
@@ -168,7 +168,7 @@ void cpzodiac_state::cpzodiac(machine_config &config)
m_maincpu->set_addrmap(AS_IO, &cpzodiac_state::main_io_map);
m_maincpu->set_daisy_config(daisy_chain);
- te7750_device &io(TE7750(config, "io", 0));
+ te7750_device &io(TE7750(config, "io"));
io.ios_cb().set_constant(4);
io.in_port1_cb().set_ioport("IN1");
io.in_port2_cb().set_ioport("IN2");
diff --git a/src/mame/drivers/gokidetor.cpp b/src/mame/drivers/gokidetor.cpp
index 0a76a92b090..2ed9b01c8a9 100644
--- a/src/mame/drivers/gokidetor.cpp
+++ b/src/mame/drivers/gokidetor.cpp
@@ -127,7 +127,7 @@ MACHINE_CONFIG_START(gokidetor_state::gokidetor)
// IRQ from ???
// NMI related to E002 input and TE7750 port 7
- te7750_device &te7750(TE7750(config, "te7750", 0));
+ te7750_device &te7750(TE7750(config, "te7750"));
te7750.ios_cb().set_constant(3);
te7750.in_port1_cb().set_ioport("IN1");
te7750.in_port2_cb().set_ioport("IN2");
diff --git a/src/mame/drivers/taito_f2.cpp b/src/mame/drivers/taito_f2.cpp
index a85b1e3da3c..29e7a9c9942 100644
--- a/src/mame/drivers/taito_f2.cpp
+++ b/src/mame/drivers/taito_f2.cpp
@@ -2928,7 +2928,7 @@ void taitof2_state::taito_f2_te7750(machine_config &config)
{
taito_f2(config);
- te7750_device &te7750(TE7750(config, "te7750", 0));
+ te7750_device &te7750(TE7750(config, "te7750"));
te7750.in_port1_cb().set_ioport("DSWA");
te7750.in_port2_cb().set_ioport("DSWB");
te7750.in_port3_cb().set_ioport("IN2");
@@ -3372,7 +3372,7 @@ MACHINE_CONFIG_START(taitof2_state::ninjak)
MCFG_DEVICE_MODIFY("maincpu")
MCFG_DEVICE_PROGRAM_MAP(ninjak_map)
- te7750_device &te7750(TE7750(config, "te7750", 0));
+ te7750_device &te7750(TE7750(config, "te7750"));
te7750.in_port1_cb().set_ioport("DSWA");
te7750.in_port2_cb().set_ioport("DSWB");
te7750.in_port3_cb().set_ioport("IN0");