From e40e0da8c1bef88a341423100bcaa4271ef41858 Mon Sep 17 00:00:00 2001 From: Wilbert Pol Date: Sun, 10 Feb 2013 19:22:42 +0000 Subject: (MESS) galaxy.c: Reduce tagmap lookups (nw) --- src/mess/includes/galaxy.h | 2 ++ src/mess/video/galaxy.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mess/includes/galaxy.h b/src/mess/includes/galaxy.h index b7b99be9ebc..41c596c866f 100644 --- a/src/mess/includes/galaxy.h +++ b/src/mess/includes/galaxy.h @@ -20,6 +20,7 @@ public: , m_maincpu(*this, "maincpu") , m_cassette(*this, CASSETTE_TAG) , m_ram(*this, RAM_TAG) + , m_region_gfx1(*this, "gfx1") { } int m_interrupts_enabled; @@ -45,6 +46,7 @@ protected: required_device m_maincpu; required_device m_cassette; required_device m_ram; + required_memory_region m_region_gfx1; ioport_port *m_io_ports[8]; }; diff --git a/src/mess/video/galaxy.c b/src/mess/video/galaxy.c index 6b291eb170b..96853d23cd0 100644 --- a/src/mess/video/galaxy.c +++ b/src/mess/video/galaxy.c @@ -19,7 +19,7 @@ TIMER_CALLBACK_MEMBER(galaxy_state::gal_video) int y, x; if (m_interrupts_enabled == TRUE) { - UINT8 *gfx = memregion("gfx1")->base(); + UINT8 *gfx = m_region_gfx1->base(); UINT8 dat = (m_latch_value & 0x3c) >> 2; if ((m_gal_cnt >= 48 * 2) && (m_gal_cnt < 48 * 210)) // display on screen just m_first 208 lines { -- cgit v1.2.3