diff options
author | 2015-08-14 13:50:22 +0200 | |
---|---|---|
committer | 2015-08-18 20:12:34 +0200 | |
commit | c9d255b26f295343ed577eda97f485959c9d2e06 (patch) | |
tree | 6bd932d7600809531327d00675b7465403b37734 /src | |
parent | 7834ef5485994cd2b682edd710ad209537083426 (diff) |
antic.c: reduce tagmap lookups (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/video/antic.c | 9 | ||||
-rw-r--r-- | src/mame/video/antic.h | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/mame/video/antic.c b/src/mame/video/antic.c index 0e7381c29e9..2979a86f92a 100644 --- a/src/mame/video/antic.c +++ b/src/mame/video/antic.c @@ -29,6 +29,9 @@ antic_device::antic_device(const machine_config &mconfig, const char *tag, devic device_t(mconfig, ATARI_ANTIC, "Atari ANTIC", tag, owner, clock, "antic", __FILE__), device_video_interface(mconfig, *this), m_gtia_tag(NULL), + m_maincpu(*this, ":maincpu"), + m_djoy_b(*this, ":djoy_b"), + m_artifacts(*this, ":artifacts"), m_tv_artifacts(0), m_render1(0), m_render2(0), @@ -1388,7 +1391,7 @@ void antic_device::render(address_space &space, int param1, int param2, int para ************************************************************************/ UINT32 antic_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - UINT32 new_tv_artifacts = screen.ioport("artifacts")->read_safe(0); + UINT32 new_tv_artifacts = m_artifacts ? m_artifacts->read() : 0; copybitmap(bitmap, *m_bitmap, 0, 0, 0, 0, cliprect); if (m_tv_artifacts != new_tv_artifacts) @@ -2081,7 +2084,7 @@ void antic_device::generic_interrupt(int button_count) if( m_scanline == VBL_START ) { /* specify buttons relevant to this Atari variant */ - m_gtia->button_interrupt(button_count, machine().root_device().ioport("djoy_b")->read_safe(0)); + m_gtia->button_interrupt(button_count, m_djoy_b ? m_djoy_b->read() : 0); /* do nothing new for the rest of the frame */ m_modelines = m_screen->height() - VBL_START; @@ -2095,7 +2098,7 @@ void antic_device::generic_interrupt(int button_count) LOG((" cause VBL NMI\n")); /* set the VBL NMI status bit */ m_r.nmist |= VBL_NMI; - machine().device("maincpu")->execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } diff --git a/src/mame/video/antic.h b/src/mame/video/antic.h index bb08a37361b..fba381887d6 100644 --- a/src/mame/video/antic.h +++ b/src/mame/video/antic.h @@ -389,6 +389,9 @@ private: const char *m_gtia_tag; gtia_device *m_gtia; + required_device<cpu_device> m_maincpu; + optional_ioport m_djoy_b; + optional_ioport m_artifacts; UINT32 m_tv_artifacts; int m_render1, m_render2, m_render3; |