diff options
Diffstat (limited to 'src/devices/machine/rp5h01.cpp')
-rw-r--r-- | src/devices/machine/rp5h01.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/devices/machine/rp5h01.cpp b/src/devices/machine/rp5h01.cpp index 4a3138225a7..009757b6acf 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 -static const UINT8 initial_data[0x10] = +UINT8 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,7 @@ 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_rom_ptr(*this, DEVICE_SELF) + , m_data(*this, DEVICE_SELF, 0x10) { } @@ -54,15 +54,8 @@ void rp5h01_device::device_config_complete() void rp5h01_device::device_start() { - if (m_rom_ptr == nullptr) - { - m_data = initial_data; - } - else - { - m_data = m_rom_ptr; - assert(region()->bytes() == 0x10); - } + if (!m_data.found()) + m_data.set_target(s_initial_data, 0x10); /* register for state saving */ save_item(NAME(m_counter)); |