summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/includes/tmc1800.h
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-08-03 18:01:49 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-08-05 19:05:01 -0400
commitda754c80782425a4c63d2da0a2635ca4fbaf16a5 (patch)
tree22e55dc4ec81a097a24346d2d735ad8348315933 /src/mame/includes/tmc1800.h
parent1317019974231191a0a42d732ef9b603dcd00896 (diff)
Devfind revision phase 2 (nw)
- Eliminate read_safe as a global function and make it a method of optional_ioport (and required_ioport, for which it makes less sense). - New constructor for optional_ioport_array and required_ioport_array using std::initializer_list to specify tag list - Remove pointer/reference conversion operators for required_ioport and optional_ioport. Explicit getters like found() and target() are now required when dereferencing isn't wanted. Many drivers have been changed to use required_ioport_array and optional_ioport_array to make this cleaner. - Update numerous drivers that were using read_safe to use I/O port finders generally. Port names have been kept the same as far as possible to avoid breaking saves.(Some of the optional finders should probably be required.) - Give edfbl and monkelf their own memory maps so hacky input reading routines can be removed. - Clean up some legacy static handlers in amiga.cpp and cubo.cpp.
Diffstat (limited to 'src/mame/includes/tmc1800.h')
-rw-r--r--src/mame/includes/tmc1800.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/mame/includes/tmc1800.h b/src/mame/includes/tmc1800.h
index 6e7c80c1c03..f34b0e8fe1a 100644
--- a/src/mame/includes/tmc1800.h
+++ b/src/mame/includes/tmc1800.h
@@ -111,26 +111,12 @@ public:
: tmc1800_base_state(mconfig, type, tag),
m_cti(*this, CDP1864_TAG),
m_colorram(*this, "color_ram"),
- m_y0(*this, "Y0"),
- m_y1(*this, "Y1"),
- m_y2(*this, "Y2"),
- m_y3(*this, "Y3"),
- m_y4(*this, "Y4"),
- m_y5(*this, "Y5"),
- m_y6(*this, "Y6"),
- m_y7(*this, "Y7")
+ m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7"})
{ }
required_device<cdp1864_device> m_cti;
optional_shared_ptr<UINT8> m_colorram;
- required_ioport m_y0;
- required_ioport m_y1;
- required_ioport m_y2;
- required_ioport m_y3;
- required_ioport m_y4;
- required_ioport m_y5;
- required_ioport m_y6;
- required_ioport m_y7;
+ required_ioport_array<8> m_key_row;
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -157,7 +143,6 @@ public:
UINT8 m_color;
/* keyboard state */
- ioport_port* m_key_row[8];
int m_keylatch;
};