diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2018-06-22 12:08:53 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2018-06-22 12:08:53 -0400 |
commit | 504129eff898dabd7e190c2195564881da0cfa53 (patch) | |
tree | dcae8af2486435fbaf600b4ad081a22cb0477abc | |
parent | 6c502e7fe76c03a4f7b1292bda71b58009c786f6 (diff) |
mystston.cpp: Eliminate machine().device (nw)
-rw-r--r-- | src/mame/drivers/mystston.cpp | 5 | ||||
-rw-r--r-- | src/mame/includes/mystston.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/mame/drivers/mystston.cpp b/src/mame/drivers/mystston.cpp index aa64298b2f0..31f4308c654 100644 --- a/src/mame/drivers/mystston.cpp +++ b/src/mame/drivers/mystston.cpp @@ -19,7 +19,6 @@ #include "includes/mystston.h" #include "cpu/m6502/m6502.h" -#include "sound/ay8910.h" #include "speaker.h" @@ -80,14 +79,14 @@ WRITE8_MEMBER(mystston_state::mystston_ay8910_select_w) if (((*m_ay8910_select & 0x20) == 0x20) && ((data & 0x20) == 0x00)) { /* bit 4 goes to the 8910 #0 BC1 pin */ - machine().device<ay8910_device>("ay1")->data_address_w(space, *m_ay8910_select >> 4, *m_ay8910_data); + m_ay8910[0]->data_address_w(space, *m_ay8910_select >> 4, *m_ay8910_data); } /* bit 7 goes to 8910 #1 BDIR pin */ if (((*m_ay8910_select & 0x80) == 0x80) && ((data & 0x80) == 0x00)) { /* bit 6 goes to the 8910 #1 BC1 pin */ - machine().device<ay8910_device>("ay2")->data_address_w(space, *m_ay8910_select >> 6, *m_ay8910_data); + m_ay8910[1]->data_address_w(space, *m_ay8910_select >> 6, *m_ay8910_data); } *m_ay8910_select = data; diff --git a/src/mame/includes/mystston.h b/src/mame/includes/mystston.h index 089d2946573..3b250f43981 100644 --- a/src/mame/includes/mystston.h +++ b/src/mame/includes/mystston.h @@ -8,6 +8,7 @@ ***************************************************************************/ +#include "sound/ay8910.h" #include "emupal.h" #include "screen.h" @@ -20,6 +21,7 @@ class mystston_state : public driver_device public: mystston_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), + m_ay8910(*this, "ay%u", 1U), m_ay8910_data(*this, "ay8910_data"), m_ay8910_select(*this, "ay8910_select"), m_bg_videoram(*this, "bg_videoram"), @@ -34,6 +36,7 @@ public: m_palette(*this, "palette") { } /* machine state */ + required_device_array<ay8910_device, 2> m_ay8910; required_shared_ptr<uint8_t> m_ay8910_data; required_shared_ptr<uint8_t> m_ay8910_select; |