summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/maygay1b.c11
-rw-r--r--src/mame/includes/maygay1b.h4
2 files changed, 7 insertions, 8 deletions
diff --git a/src/mame/drivers/maygay1b.c b/src/mame/drivers/maygay1b.c
index 53996ecba7a..74f965f2d4e 100644
--- a/src/mame/drivers/maygay1b.c
+++ b/src/mame/drivers/maygay1b.c
@@ -775,23 +775,20 @@ WRITE8_MEMBER(maygay1b_state::m1_latch_w)
WRITE8_MEMBER(maygay1b_state::latch_ch2_w)
{
- device_t *msm6376 = machine().device("msm6376");
- okim6376_w(msm6376, space, 0, data&0x7f);
- okim6376_ch2_w(msm6376,data&0x80);
+ okim6376_w(m_msm6376, space, 0, data&0x7f);
+ okim6376_ch2_w(m_msm6376,data&0x80);
}
//A strange setup this, the address lines are used to move st to the right level
READ8_MEMBER(maygay1b_state::latch_st_hi)
{
- device_t *msm6376 = machine().device("msm6376");
- okim6376_st_w(msm6376,1);
+ okim6376_st_w(m_msm6376,1);
return 0;
}
READ8_MEMBER(maygay1b_state::latch_st_lo)
{
- device_t *msm6376 = machine().device("msm6376");
- okim6376_st_w(msm6376,0);
+ okim6376_st_w(m_msm6376,0);
return 0;
}
diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h
index e94d959d71f..9094d097d15 100644
--- a/src/mame/includes/maygay1b.h
+++ b/src/mame/includes/maygay1b.h
@@ -42,7 +42,8 @@ public:
maygay1b_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_vfd(*this, "vfd"),
- m_maincpu(*this, "maincpu") {
+ m_maincpu(*this, "maincpu"),
+ m_msm6376(*this, "msm6376") {
m_NMIENABLE = 0;
}
@@ -84,4 +85,5 @@ public:
void update_outputs(i8279_state *chip, UINT16 which);
void m1_stepper_reset();
required_device<cpu_device> m_maincpu;
+ optional_device<okim6376_device> m_msm6376;
};