summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/te7750.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/te7750.cpp')
-rw-r--r--src/devices/machine/te7750.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/devices/machine/te7750.cpp b/src/devices/machine/te7750.cpp
index a59c25ea8a1..94376c6dafb 100644
--- a/src/devices/machine/te7750.cpp
+++ b/src/devices/machine/te7750.cpp
@@ -170,13 +170,14 @@
**********************************************************************/
#include "emu.h"
-#include "machine/te7750.h"
+#include "te7750.h"
//**************************************************************************
// GLOBAL VARIABLES
//**************************************************************************
DEFINE_DEVICE_TYPE(TE7750, te7750_device, "te7750", "TE7750 Super I/O Expander")
+DEFINE_DEVICE_TYPE(TE7751, te7751_device, "te7751", "TE7751 Super I/O Expander")
DEFINE_DEVICE_TYPE(TE7752, te7752_device, "te7752", "TE7752 Super I/O Expander")
//**************************************************************************
@@ -189,9 +190,9 @@ DEFINE_DEVICE_TYPE(TE7752, te7752_device, "te7752", "TE7752 Super I/O Expander")
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)
+ , m_input_cb(*this, 0xff)
+ , m_output_cb(*this)
+ , m_ios_cb(*this, 0) // assume soft mode unless specified
{
std::fill(std::begin(m_data_dir), std::end(m_data_dir), 0xff);
}
@@ -202,6 +203,15 @@ te7750_device::te7750_device(const machine_config &mconfig, const char *tag, dev
}
//-------------------------------------------------
+// te7751_device - constructor
+//-------------------------------------------------
+
+te7751_device::te7751_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : te7750_device(mconfig, TE7751, tag, owner, clock)
+{
+}
+
+//-------------------------------------------------
// te7752_device - constructor
//-------------------------------------------------
@@ -216,15 +226,6 @@ te7752_device::te7752_device(const machine_config &mconfig, const char *tag, dev
void te7750_device::device_start()
{
- // resolve port callbacks
- for (auto &cb : m_input_cb)
- cb.resolve_safe(0xff);
- for (auto &cb : m_output_cb)
- cb.resolve_safe();
-
- // resolve IOS (assume soft mode unless specified)
- m_ios_cb.resolve_safe(0);
-
// save state
save_item(NAME(m_data_latch));
save_item(NAME(m_data_dir));
@@ -288,7 +289,7 @@ void te7750_device::set_ios()
// read - read input port and/or output latch
//-------------------------------------------------
-READ8_MEMBER(te7750_device::read)
+u8 te7750_device::read(offs_t offset)
{
if (offset < 9)
{
@@ -305,7 +306,7 @@ READ8_MEMBER(te7750_device::read)
}
logerror("Attempt to read from register with offset %X\n", offset);
- return space.unmap();
+ return 0xff;
}
//-------------------------------------------------
@@ -313,7 +314,7 @@ READ8_MEMBER(te7750_device::read)
// register
//-------------------------------------------------
-WRITE8_MEMBER(te7750_device::write)
+void te7750_device::write(offs_t offset, u8 data)
{
if (offset < 9)
{