diff options
author | 2016-08-25 21:34:42 +1000 | |
---|---|---|
committer | 2016-08-25 21:34:42 +1000 | |
commit | 1c98b515c5a10728d3d679ac7215440e55158f38 (patch) | |
tree | 0083c3d073488fa7d40e14c7fb4624bb19bff41a /src/devices/machine/rp5h01.cpp | |
parent | cf8060d762ffddd8dbb923e5db9d2e6f7eed49e0 (diff) |
* Doxyfy a significant chunk of devfind.h
* Eliminate a lot of boilerplate code from devfind.h
* Keep instantiation of templates in one place to improve build time
* Remove some dangerous accessors
Diffstat (limited to 'src/devices/machine/rp5h01.cpp')
-rw-r--r-- | src/devices/machine/rp5h01.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/devices/machine/rp5h01.cpp b/src/devices/machine/rp5h01.cpp index 009757b6acf..033e2b18f4c 100644 --- a/src/devices/machine/rp5h01.cpp +++ b/src/devices/machine/rp5h01.cpp @@ -20,7 +20,7 @@ #include "machine/rp5h01.h" // this is the contents of an unprogrammed PROM -UINT8 rp5h01_device::s_initial_data[0x10] = +UINT8 const rp5h01_device::s_initial_data[0x10] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 @@ -34,7 +34,8 @@ const device_type RP5H01 = &device_creator<rp5h01_device>; rp5h01_device::rp5h01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, RP5H01, "RP5H01 6/7-bit Counter", tag, owner, clock, "rp5h01", __FILE__) - , m_data(*this, DEVICE_SELF, 0x10) + , m_data(nullptr) + , m_rom(*this, DEVICE_SELF, 0x10) { } @@ -54,8 +55,10 @@ void rp5h01_device::device_config_complete() void rp5h01_device::device_start() { - if (!m_data.found()) - m_data.set_target(s_initial_data, 0x10); + if (m_rom.found()) + m_data = m_rom; + else + m_data = s_initial_data; /* register for state saving */ save_item(NAME(m_counter)); |