diff options
author | 2008-05-22 03:23:28 +0000 | |
---|---|---|
committer | 2008-05-22 03:23:28 +0000 | |
commit | a300da217858eca134d8123bc40de809128b7bff (patch) | |
tree | ad4b51c652e9073b4422f7537a355b2e5fa014fa /src/emu/machine/6821pia.c | |
parent | 98a8e739479b1339c5de45a1b1c9da3b8060ee15 (diff) |
From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] More Machine->machine changes, add machine to irq
callbacks
Hi mamedev,
Here are two more patches to eliminate Machine globals. The first
patch was autogenerated by the attached fixup script. That script has
been updated to catch additional cases which it previously missed
(when Machine is the last parameter to a function or Machine is used
in an assignment). This makes ~50 more files deprecat.h free.
A sizable chunk (~20%) of the remaining uses of the Machine global in
the drivers are due to irq callbacks for sound and machine updates.
Typically such callbacks need to call cpunum_set_input_line, which
requires a machine parameter, so if the callbacks don't pass the
machine parameter, these routines have no choice but to reference the
global variable.
The second patch attempts to address most cases of this by adding the
machine parameter to the callback interfaces. This allows us to
remove #include "deprecat.h" from ~150 files, at the cost of having to
fix up hundreds of callbacks.
In total, these patches reduced the number of files with deprecat.h
from 783 to 575.
~aa
Diffstat (limited to 'src/emu/machine/6821pia.c')
-rw-r--r-- | src/emu/machine/6821pia.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/machine/6821pia.c b/src/emu/machine/6821pia.c index 3009bd2c114..4e751c5dd81 100644 --- a/src/emu/machine/6821pia.c +++ b/src/emu/machine/6821pia.c @@ -195,8 +195,8 @@ void pia_reset(void) pias[i].in_ca2 = TRUE; /* clear the IRQs */ - if (intf->irq_a_func) (*intf->irq_a_func)(FALSE); - if (intf->irq_b_func) (*intf->irq_b_func)(FALSE); + if (intf->irq_a_func) (*intf->irq_a_func)(Machine, FALSE); + if (intf->irq_b_func) (*intf->irq_b_func)(Machine, FALSE); } } @@ -219,7 +219,7 @@ static void update_interrupts(pia6821 *p) { p->irq_a_state = new_state; - if (p->intf->irq_a_func) (p->intf->irq_a_func)(p->irq_a_state); + if (p->intf->irq_a_func) (p->intf->irq_a_func)(Machine, p->irq_a_state); } /* then do IRQ B */ @@ -229,7 +229,7 @@ static void update_interrupts(pia6821 *p) { p->irq_b_state = new_state; - if (p->intf->irq_b_func) (p->intf->irq_b_func)(p->irq_b_state); + if (p->intf->irq_b_func) (p->intf->irq_b_func)(Machine, p->irq_b_state); } } |