From 567f503aacb5c910238d304a234e07a0dea04e8d Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 11 Apr 2013 14:43:51 +0000 Subject: [PATCH] small clean (nw) --- src/mame/drivers/ddenlovr.c | 2 -- src/mame/drivers/playmark.c | 1 - src/mame/includes/dynax.h | 7 ++++--- src/mame/includes/playmark.h | 3 ++- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c index fb313577fca..daf02f7f4b6 100644 --- a/src/mame/drivers/ddenlovr.c +++ b/src/mame/drivers/ddenlovr.c @@ -9292,8 +9292,6 @@ INPUT_PORTS_END MACHINE_START_MEMBER(ddenlovr_state,ddenlovr) { - m_oki = machine().device("oki"); - save_item(NAME(m_input_sel)); save_item(NAME(m_dsw_sel)); save_item(NAME(m_keyb)); diff --git a/src/mame/drivers/playmark.c b/src/mame/drivers/playmark.c index bfee0eb3ffc..1964d186a78 100644 --- a/src/mame/drivers/playmark.c +++ b/src/mame/drivers/playmark.c @@ -1022,7 +1022,6 @@ GFXDECODE_END MACHINE_START_MEMBER(playmark_state,playmark) { - m_oki = machine().device("oki"); m_eeprom = machine().device("eeprom"); save_item(NAME(m_bgscrollx)); diff --git a/src/mame/includes/dynax.h b/src/mame/includes/dynax.h index 9cfb3005793..b54da654a76 100644 --- a/src/mame/includes/dynax.h +++ b/src/mame/includes/dynax.h @@ -13,9 +13,10 @@ public: : driver_device(mconfig, type, tag), m_dsw_sel16(*this, "dsw_sel16"), m_protection1(*this, "protection1"), - m_protection2(*this, "protection2"), + m_protection2(*this, "protection2"), m_maincpu(*this, "maincpu"), - m_soundcpu(*this, "soundcpu") + m_soundcpu(*this, "soundcpu"), + m_oki(*this, "oki") { } // up to 8 layers, 2 images per layer (interleaved on screen) @@ -160,7 +161,7 @@ public: optional_device m_soundcpu; device_t *m_rtc; device_t *m_ymsnd; - okim6295_device *m_oki; + optional_device m_oki; device_t *m_top_scr; device_t *m_bot_scr; DECLARE_WRITE8_MEMBER(dynax_vblank_ack_w); diff --git a/src/mame/includes/playmark.h b/src/mame/includes/playmark.h index 05ac077cc70..83102d37e7a 100644 --- a/src/mame/includes/playmark.h +++ b/src/mame/includes/playmark.h @@ -12,6 +12,7 @@ public: m_videoram3(*this, "videoram3"), m_spriteram(*this, "spriteram"), m_rowscroll(*this, "rowscroll"), + m_oki(*this, "oki"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu") { } @@ -50,7 +51,7 @@ public: int m_old_oki_bank; /* devices */ - okim6295_device *m_oki; + required_device m_oki; eeprom_device *m_eeprom; DECLARE_WRITE16_MEMBER(coinctrl_w); DECLARE_WRITE16_MEMBER(wbeachvl_coin_eeprom_w);