diff options
| author | 2016-08-03 18:01:49 -0400 | |
|---|---|---|
| committer | 2016-08-05 19:05:01 -0400 | |
| commit | da754c80782425a4c63d2da0a2635ca4fbaf16a5 (patch) | |
| tree | 22e55dc4ec81a097a24346d2d735ad8348315933 /src/devices/machine/pckeybrd.cpp | |
| parent | 1317019974231191a0a42d732ef9b603dcd00896 (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/devices/machine/pckeybrd.cpp')
| -rw-r--r-- | src/devices/machine/pckeybrd.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp index 0650fc8cea3..b6aa0a1f8b9 100644 --- a/src/devices/machine/pckeybrd.cpp +++ b/src/devices/machine/pckeybrd.cpp @@ -528,39 +528,39 @@ UINT32 pc_keyboard_device::readport(int port) switch(port) { case 0: - if(m_ioport_0) + if (m_ioport_0.found()) result = m_ioport_0->read(); break; case 1: - if(m_ioport_1) + if (m_ioport_1.found()) result = m_ioport_1->read(); break; case 2: - if(m_ioport_2) + if (m_ioport_2.found()) result = m_ioport_2->read(); break; case 3: - if(m_ioport_3) + if (m_ioport_3.found()) result = m_ioport_3->read(); break; case 4: - if(m_ioport_4) + if (m_ioport_4.found()) result = m_ioport_4->read(); break; case 5: - if(m_ioport_5) + if (m_ioport_5.found()) result = m_ioport_5->read(); break; case 6: - if(m_ioport_6) + if (m_ioport_6.found()) result = m_ioport_6->read(); break; case 7: - if(m_ioport_7) + if (m_ioport_7.found()) result = m_ioport_7->read(); break; } - return result; + return 0; } void pc_keyboard_device::polling(void) |
