summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2018-06-30 23:51:41 +0200
committer Michael Zapf <Michael.Zapf@mizapf.de>2018-06-30 23:53:28 +0200
commitaba1bf84863a272c81641dd323167547ce1786fc (patch)
tree6e0ffe9d0e11e42b09f277d3e22bae0c4ca0df0d /src/devices/machine
parenta91979e2043eec8eea554e3a6f94928ffd305e47 (diff)
ti99: Removed deprecated function calls, simplified GROM access, added logmacro. (nw)
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/tmc0430.cpp20
-rw-r--r--src/devices/machine/tmc0430.h13
2 files changed, 10 insertions, 23 deletions
diff --git a/src/devices/machine/tmc0430.cpp b/src/devices/machine/tmc0430.cpp
index d4aabfc8bfd..34400cdfe8b 100644
--- a/src/devices/machine/tmc0430.cpp
+++ b/src/devices/machine/tmc0430.cpp
@@ -166,25 +166,19 @@ WRITE_LINE_MEMBER( tmc0430_device::gsq_line )
/*
Combined select lines. Avoids separate calls to the chip.
- Address:
- 0 -> MO=0, M=0
- 1 -> MO=0, M=1
- 2 -> MO=1, M=0
- 3 -> MO=1, M=1
- Data: gsq line (ASSERT, CLEAR)
*/
-WRITE8_MEMBER( tmc0430_device::set_lines )
+void tmc0430_device::set_lines(line_state mline, line_state moline, line_state gsq)
{
- m_read_mode = ((offset & GROM_M_LINE)!=0);
- m_address_mode = ((offset & GROM_MO_LINE)!=0);
+ m_read_mode = (mline==ASSERT_LINE);
+ m_address_mode = (moline==ASSERT_LINE);
- if (data!=CLEAR_LINE && !m_selected) // check for edge
+ if (gsq!=CLEAR_LINE && !m_selected) // check for edge
{
LOGMASKED(LOG_READY, "GROM %d selected, pulling down READY\n", m_ident>>13);
m_gromready(CLEAR_LINE);
m_phase = 4; // set for three full GROM clock ticks (and a fraction at the start)
}
- m_selected = (data!=CLEAR_LINE);
+ m_selected = (gsq!=CLEAR_LINE);
}
/*
@@ -273,7 +267,7 @@ WRITE_LINE_MEMBER( tmc0430_device::gclock_in )
Read operation. For MO=Address, delivers the address register (and destroys its contents).
For MO=Data, delivers the byte inside the buffer and prefetches the next one.
*/
-READ8Z_MEMBER( tmc0430_device::readz )
+void tmc0430_device::readz(uint8_t *value)
{
if (!m_selected) return;
@@ -310,7 +304,7 @@ READ8Z_MEMBER( tmc0430_device::readz )
This operation occurs in parallel to phase 4. The real GROM will pick up
the value from the data bus some phases later.
*/
-WRITE8_MEMBER( tmc0430_device::write )
+void tmc0430_device::write(uint8_t data)
{
if (!m_selected) return;
diff --git a/src/devices/machine/tmc0430.h b/src/devices/machine/tmc0430.h
index e7288c8f7bc..a0f49747b88 100644
--- a/src/devices/machine/tmc0430.h
+++ b/src/devices/machine/tmc0430.h
@@ -17,11 +17,6 @@
DECLARE_DEVICE_TYPE(TMC0430, tmc0430_device)
-#ifndef READ8Z_MEMBER
-#define DECLARE_READ8Z_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t *value, ATTR_UNUSED uint8_t mem_mask = 0xff)
-#define READ8Z_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED uint8_t *value, ATTR_UNUSED uint8_t mem_mask)
-#endif
-
enum
{
GROM_M_LINE = 1,
@@ -35,17 +30,15 @@ public:
template <class Object> devcb_base &set_ready_wr_callback(Object &&cb) { return m_gromready.set_callback(std::forward<Object>(cb)); }
- DECLARE_READ8Z_MEMBER(readz);
- DECLARE_WRITE8_MEMBER(write);
+ void readz(uint8_t *value);
+ void write(uint8_t data);
+ void set_lines(line_state mline, line_state moline, line_state gsq);
DECLARE_WRITE_LINE_MEMBER(m_line);
DECLARE_WRITE_LINE_MEMBER(mo_line);
DECLARE_WRITE_LINE_MEMBER(gsq_line);
-
DECLARE_WRITE_LINE_MEMBER(gclock_in);
- DECLARE_WRITE8_MEMBER( set_lines );
-
void set_region_and_ident(const char *regionname, int offset, int ident)
{
m_regionname = regionname;