summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Wilbert Pol <wilbert@jdg.info>2013-02-10 19:22:42 +0000
committerGravatarGravatar Wilbert Pol <wilbert@jdg.info>2013-02-10 19:22:42 +0000
commite40e0da8c1bef88a341423100bcaa4271ef41858 (patch) (github)
tree81a123aa0310df1886fa7d44c54c7f8a75586f29
parent6b72c6d3de107cfd5ffb8317cef84e3c73d4a99b (diff)
downloadmame-e40e0da8c1bef88a341423100bcaa4271ef41858.tar.bz2
mame-e40e0da8c1bef88a341423100bcaa4271ef41858.zip
(MESS) galaxy.c: Reduce tagmap lookups (nw)
-rw-r--r--src/mess/includes/galaxy.h2
-rw-r--r--src/mess/video/galaxy.c2
2 files changed, 3 insertions, 1 deletions
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<cpu_device> m_maincpu;
required_device<cassette_image_device> m_cassette;
required_device<ram_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
{