summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2016-02-09 14:47:55 +0100
committer Ivan Vangelista <mesgnet@yahoo.it>2016-02-09 14:47:55 +0100
commitd2759d9bcd7facf77a2361a8c69ced95698bc7d5 (patch)
tree4a3f3de9b87ae98014d30fe0649f18ca70bf8465 /src
parenta8c8ec182f5af929f5085b2cda1ca41be0f7c2be (diff)
maygay1b.cpp: fixed MT06137 (nw)
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/maygay1b.cpp4
-rw-r--r--src/mame/includes/maygay1b.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/drivers/maygay1b.cpp b/src/mame/drivers/maygay1b.cpp
index 8d129794d27..220854829ee 100644
--- a/src/mame/drivers/maygay1b.cpp
+++ b/src/mame/drivers/maygay1b.cpp
@@ -709,9 +709,7 @@ DRIVER_INIT_MEMBER(maygay1b_state,m1)
//AM_RANGE(0x2420, 0x2421) AM_WRITE(latch_ch2_w ) // oki
// if there is no OKI region disable writes here, the rom might be missing, so alert user
- UINT8 *okirom = memregion( "msm6376" )->base();
-
- if (!okirom) {
+ if (m_oki_region == nullptr) {
m_maincpu->space(AS_PROGRAM).install_write_handler(0x2420, 0x2421, write8_delegate(FUNC(maygay1b_state::m1ab_no_oki_w), this));
}
}
diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h
index b76f3192a33..142c71ae407 100644
--- a/src/mame/includes/maygay1b.h
+++ b/src/mame/includes/maygay1b.h
@@ -53,7 +53,8 @@ public:
m_reel3(*this, "reel3"),
m_reel4(*this, "reel4"),
m_reel5(*this, "reel5"),
- m_meters(*this, "meters")
+ m_meters(*this, "meters"),
+ m_oki_region(*this, "msm6376")
{}
required_device<cpu_device> m_maincpu;
@@ -79,6 +80,7 @@ public:
required_device<stepper_device> m_reel4;
required_device<stepper_device> m_reel5;
required_device<meters_device> m_meters;
+ optional_region_ptr<UINT8> m_oki_region;
UINT8 m_lamppos;
int m_lamp_strobe;