diff options
author | 2016-02-09 14:47:55 +0100 | |
---|---|---|
committer | 2016-02-09 14:47:55 +0100 | |
commit | d2759d9bcd7facf77a2361a8c69ced95698bc7d5 (patch) | |
tree | 4a3f3de9b87ae98014d30fe0649f18ca70bf8465 | |
parent | a8c8ec182f5af929f5085b2cda1ca41be0f7c2be (diff) |
maygay1b.cpp: fixed MT06137 (nw)
-rw-r--r-- | src/mame/drivers/maygay1b.cpp | 4 | ||||
-rw-r--r-- | src/mame/includes/maygay1b.h | 4 |
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; |