summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/midzeus.c
diff options
context:
space:
mode:
author Ivan Vangelista <mesgnet@yahoo.it>2014-09-29 17:03:32 +0000
committer Ivan Vangelista <mesgnet@yahoo.it>2014-09-29 17:03:32 +0000
commit116cfaedb3542df74ed489a1d3486d0120d39b68 (patch)
treea153a07fcbc1519e62319c0afc1f5e35ebff4a2a /src/mame/drivers/midzeus.c
parentcdc6d197ed5f2361e20e36698e60faad7d55c9ec (diff)
Moved misc functions into driver classes and small cleanups(nw)
Diffstat (limited to 'src/mame/drivers/midzeus.c')
-rw-r--r--src/mame/drivers/midzeus.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c
index 443c05b23b9..adfdc52aa46 100644
--- a/src/mame/drivers/midzeus.c
+++ b/src/mame/drivers/midzeus.c
@@ -472,14 +472,13 @@ WRITE32_MEMBER(midzeus_state::analog_w)
*
*************************************/
-static void update_gun_irq(running_machine &machine)
+void midzeus_state::update_gun_irq()
{
- midzeus_state *state = machine.driver_data<midzeus_state>();
/* low 2 bits of gun_control seem to enable IRQs */
if (gun_irq_state & gun_control & 0x03)
- state->m_maincpu->set_input_line(3, ASSERT_LINE);
+ m_maincpu->set_input_line(3, ASSERT_LINE);
else
- state->m_maincpu->set_input_line(3, CLEAR_LINE);
+ m_maincpu->set_input_line(3, CLEAR_LINE);
}
@@ -490,7 +489,7 @@ TIMER_CALLBACK_MEMBER(midzeus_state::invasn_gun_callback)
/* set the appropriate IRQ in the internal gun control and update */
gun_irq_state |= 0x01 << player;
- update_gun_irq(machine());
+ update_gun_irq();
/* generate another interrupt on the next scanline while we are within the BEAM_DY */
beamy++;
@@ -509,7 +508,7 @@ WRITE32_MEMBER(midzeus_state::invasn_gun_w)
/* bits 0-1 enable IRQs (?) */
/* bits 2-3 reset IRQ states */
gun_irq_state &= ~((gun_control >> 2) & 3);
- update_gun_irq(machine());
+ update_gun_irq();
for (player = 0; player < 2; player++)
{