summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author DavidHaywood <hazemamewip@hotmail.com>2017-05-17 15:44:48 +0100
committer Olivier Galibert <galibert@pobox.com>2017-05-17 16:44:48 +0200
commit8cb689e7ac2001636fca54f98d7c7e02fda3007b (patch)
treedb41299cfd01c6c252b8fc10e5b04f8e99a06f8a
parentfc0a2a32e00f74575934e0fb728312cdf0489dee (diff)
fix mitchell.cpp nvram saving [D. Haywood]
-rw-r--r--src/mame/drivers/mitchell.cpp12
-rw-r--r--src/mame/includes/mitchell.h2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp
index 6189495485d..000f478c043 100644
--- a/src/mame/drivers/mitchell.cpp
+++ b/src/mame/drivers/mitchell.cpp
@@ -2303,27 +2303,27 @@ DRIVER_INIT_MEMBER(mitchell_state,hatena)
DRIVER_INIT_MEMBER(mitchell_state,spang)
{
m_input_type = 3;
- m_nvram->set_base(&memregion("maincpu")->base()[0xe000], 0x80); /* NVRAM */
+ m_nvram->set_base(m_mainram, m_mainram.bytes());
configure_banks(spang_decode);
}
DRIVER_INIT_MEMBER(mitchell_state,spangbl)
{
m_input_type = 3;
- m_nvram->set_base(&memregion("maincpu")->base()[0xe000], 0x80); /* NVRAM */
+ m_nvram->set_base(m_mainram, m_mainram.bytes());
bootleg_decode();
}
DRIVER_INIT_MEMBER(mitchell_state,spangj)
{
m_input_type = 3;
- m_nvram->set_base(&memregion("maincpu")->base()[0xe000], 0x80); /* NVRAM */
+ m_nvram->set_base(m_mainram, m_mainram.bytes());
configure_banks(spangj_decode);
}
DRIVER_INIT_MEMBER(mitchell_state,sbbros)
{
m_input_type = 3;
- m_nvram->set_base(&memregion("maincpu")->base()[0xe000], 0x80); /* NVRAM */
+ m_nvram->set_base(m_mainram, m_mainram.bytes());
configure_banks(sbbros_decode);
}
DRIVER_INIT_MEMBER(mitchell_state,qtono1)
@@ -2367,13 +2367,13 @@ DRIVER_INIT_MEMBER(mitchell_state,marukin)
DRIVER_INIT_MEMBER(mitchell_state,block)
{
m_input_type = 2;
- m_nvram->set_base(&memregion("maincpu")->base()[0xff80], 0x80); /* NVRAM */
+ m_nvram->set_base(m_mainram, m_mainram.bytes());
configure_banks(block_decode);
}
DRIVER_INIT_MEMBER(mitchell_state,blockbl)
{
m_input_type = 2;
- m_nvram->set_base(&memregion("maincpu")->base()[0xff80], 0x80); /* NVRAM */
+ m_nvram->set_base(m_mainram, m_mainram.bytes());
bootleg_decode();
}
diff --git a/src/mame/includes/mitchell.h b/src/mame/includes/mitchell.h
index 01ccf76b793..7b85ad26240 100644
--- a/src/mame/includes/mitchell.h
+++ b/src/mame/includes/mitchell.h
@@ -30,6 +30,7 @@ public:
m_soundlatch(*this, "soundlatch"),
m_colorram(*this, "colorram"),
m_videoram(*this, "videoram"),
+ m_mainram(*this, "ram"),
m_bank1(*this, "bank1"),
m_bank0d(*this, "bank0d"),
m_bank1d(*this, "bank1d"),
@@ -50,6 +51,7 @@ public:
/* memory pointers */
required_shared_ptr<uint8_t> m_colorram;
required_shared_ptr<uint8_t> m_videoram;
+ optional_shared_ptr<uint8_t> m_mainram;
required_memory_bank m_bank1;
optional_memory_bank m_bank0d;
optional_memory_bank m_bank1d;