summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-06-05 12:20:25 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-06-05 12:20:25 -0400
commit89550d3b190abc72acf4d4363baf84ed7d4d53a3 (patch)
treea4a444d85c2c9db829306867fdd93d4f5b6237e1
parent92f5d2591b776f7e5572f425d03705af903707b0 (diff)
cc40.cpp: Eliminate machine().device (nw)
-rw-r--r--src/mame/drivers/cc40.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp
index 30c550e25d1..7aec9302296 100644
--- a/src/mame/drivers/cc40.cpp
+++ b/src/mame/drivers/cc40.cpp
@@ -97,6 +97,7 @@ public:
m_cart(*this, "cartslot"),
m_key_matrix(*this, "IN.%u", 0),
m_battery_inp(*this, "BATTERY"),
+ m_nvram(*this, "sysram.%u", 1U),
m_lamps(*this, "lamp%u", 0U)
{
m_sysram[0] = nullptr;
@@ -137,8 +138,7 @@ private:
required_device<generic_slot_device> m_cart;
required_ioport_array<8> m_key_matrix;
required_ioport m_battery_inp;
-
- nvram_device *m_nvram[2];
+ required_device_array<nvram_device, 2> m_nvram;
memory_region *m_cart_rom;
@@ -558,8 +558,6 @@ void cc40_state::machine_start()
else
membank("cartbank")->set_base(memregion("maincpu")->base() + 0x5000);
- m_nvram[0] = machine().device<nvram_device>("sysram.1");
- m_nvram[1] = machine().device<nvram_device>("sysram.2");
init_sysram(0, 0x800); // default to 6KB
init_sysram(1, 0x800); // "