mirror of
https://github.com/holub/mame
synced 2025-10-07 09:25:34 +03:00
megazone: Eliminate machine().device (nw)
This commit is contained in:
parent
5ba14be3b9
commit
8190d3b13e
@ -72,7 +72,6 @@ REAR BOARD 1C026 N/U (CUSTOM ON ORIGINAL)
|
|||||||
#include "machine/watchdog.h"
|
#include "machine/watchdog.h"
|
||||||
#include "sound/ay8910.h"
|
#include "sound/ay8910.h"
|
||||||
#include "sound/dac.h"
|
#include "sound/dac.h"
|
||||||
#include "sound/flt_rc.h"
|
|
||||||
#include "sound/volt_reg.h"
|
#include "sound/volt_reg.h"
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "speaker.h"
|
#include "speaker.h"
|
||||||
@ -99,10 +98,7 @@ READ8_MEMBER(megazone_state::megazone_port_a_r)
|
|||||||
|
|
||||||
WRITE8_MEMBER(megazone_state::megazone_port_b_w)
|
WRITE8_MEMBER(megazone_state::megazone_port_b_w)
|
||||||
{
|
{
|
||||||
static const char *const fltname[] = { "filter.0.0", "filter.0.1", "filter.0.2" };
|
for (int i = 0; i < 3; i++)
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
|
||||||
{
|
{
|
||||||
int C = 0;
|
int C = 0;
|
||||||
if (data & 1)
|
if (data & 1)
|
||||||
@ -111,7 +107,7 @@ WRITE8_MEMBER(megazone_state::megazone_port_b_w)
|
|||||||
C += 220000; /* 220000pF = 0.22uF */
|
C += 220000; /* 220000pF = 0.22uF */
|
||||||
|
|
||||||
data >>= 2;
|
data >>= 2;
|
||||||
downcast<filter_rc_device*>(machine().device(fltname[i]))->filter_rc_set_RC(filter_rc_device::LOWPASS, 1000, 2200, 200, CAP_P(C));
|
m_filter[i]->filter_rc_set_RC(filter_rc_device::LOWPASS, 1000, 2200, 200, CAP_P(C));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
#include "sound/flt_rc.h"
|
||||||
#include "emupal.h"
|
#include "emupal.h"
|
||||||
|
|
||||||
class megazone_state : public driver_device
|
class megazone_state : public driver_device
|
||||||
@ -24,7 +25,9 @@ public:
|
|||||||
m_audiocpu(*this, "audiocpu"),
|
m_audiocpu(*this, "audiocpu"),
|
||||||
m_daccpu(*this, "daccpu"),
|
m_daccpu(*this, "daccpu"),
|
||||||
m_gfxdecode(*this, "gfxdecode"),
|
m_gfxdecode(*this, "gfxdecode"),
|
||||||
m_palette(*this, "palette") { }
|
m_palette(*this, "palette"),
|
||||||
|
m_filter(*this, "filter.0.%u", 0U)
|
||||||
|
{ }
|
||||||
|
|
||||||
void megazone(machine_config &config);
|
void megazone(machine_config &config);
|
||||||
|
|
||||||
@ -51,6 +54,7 @@ private:
|
|||||||
required_device<cpu_device> m_daccpu;
|
required_device<cpu_device> m_daccpu;
|
||||||
required_device<gfxdecode_device> m_gfxdecode;
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
|
required_device_array<filter_rc_device, 3> m_filter;
|
||||||
|
|
||||||
uint8_t m_irq_mask;
|
uint8_t m_irq_mask;
|
||||||
DECLARE_WRITE8_MEMBER(megazone_i8039_irq_w);
|
DECLARE_WRITE8_MEMBER(megazone_i8039_irq_w);
|
||||||
|
Loading…
Reference in New Issue
Block a user