starwars.cpp: Replace machine().device with finders (nw)

This commit is contained in:
AJR 2018-05-31 19:22:35 -04:00
parent b4ef226b83
commit a7230f387b
4 changed files with 13 additions and 13 deletions

View File

@ -10,7 +10,6 @@
***************************************************************************/
#include "emu.h"
#include "sound/tms5220.h"
#include "includes/starwars.h"
@ -35,18 +34,16 @@ READ8_MEMBER(starwars_state::r6532_porta_r)
/* Note: bit 4 is always set to avoid sound self test */
uint8_t olddata = m_riot->porta_in_get();
tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
return (olddata & 0xc0) | 0x10 | (tms5220->readyq_r() << 2);
return (olddata & 0xc0) | 0x10 | (m_tms->readyq_r() << 2);
}
WRITE8_MEMBER(starwars_state::r6532_porta_w)
{
tms5220_device *tms5220 = machine().device<tms5220_device>("tms");
/* handle 5220 read */
tms5220->rsq_w((data & 2)>>1);
m_tms->rsq_w((data & 2)>>1);
/* handle 5220 write */
tms5220->wsq_w((data & 1)>>0);
m_tms->wsq_w((data & 1)>>0);
}

View File

@ -34,8 +34,6 @@
#include "machine/watchdog.h"
#include "video/vector.h"
#include "video/avgdvg.h"
#include "sound/tms5220.h"
#include "machine/x2212.h"
#include "screen.h"
#include "speaker.h"

View File

@ -8,7 +8,9 @@
#include "machine/6532riot.h"
#include "machine/gen_latch.h"
#include "machine/x2212.h"
#include "sound/pokey.h"
#include "sound/tms5220.h"
#include "includes/slapstic.h"
@ -24,6 +26,8 @@ public:
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
m_pokey(*this, "pokey%u", 1U),
m_tms(*this, "tms"),
m_novram(*this, "x2212"),
m_slapstic_device(*this, "slapstic")
{ }
@ -34,6 +38,8 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
required_device_array<pokey_device, 4> m_pokey;
required_device<tms5220_device> m_tms;
required_device<x2212_device> m_novram;
optional_device<atari_slapstic_device> m_slapstic_device;
uint8_t *m_slapstic_source;

View File

@ -11,7 +11,6 @@
#include "emu.h"
#include "includes/starwars.h"
#include "machine/x2212.h"
/* Constants for matrix processor operations */
@ -45,14 +44,14 @@ TIMER_CALLBACK_MEMBER(starwars_state::math_run_clear)
WRITE8_MEMBER(starwars_state::starwars_nstore_w)
{
machine().device<x2212_device>("x2212")->store(0);
machine().device<x2212_device>("x2212")->store(1);
machine().device<x2212_device>("x2212")->store(0);
m_novram->store(0);
m_novram->store(1);
m_novram->store(0);
}
WRITE_LINE_MEMBER(starwars_state::recall_w)
{
machine().device<x2212_device>("x2212")->recall(!state);
m_novram->recall(!state);
}
/*************************************