From 28eeb49676eb5550180d481b87f5a6ca86564828 Mon Sep 17 00:00:00 2001 From: David Haywood Date: Mon, 2 May 2016 20:39:46 +0100 Subject: [PATCH] runtime tag lookup reduction (nw) --- src/mame/includes/deco_mlc.h | 4 +++- src/mame/video/deco_mlc.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mame/includes/deco_mlc.h b/src/mame/includes/deco_mlc.h index e9bde7e7bb7..481734e2f2c 100644 --- a/src/mame/includes/deco_mlc.h +++ b/src/mame/includes/deco_mlc.h @@ -21,7 +21,8 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_generic_paletteram_32(*this, "paletteram") + m_generic_paletteram_32(*this, "paletteram"), + m_gfx2(*this,"gfx2") { } optional_device m_deco146; @@ -77,6 +78,7 @@ public: required_device m_screen; required_device m_palette; required_shared_ptr m_generic_paletteram_32; + required_region_ptr m_gfx2; DECLARE_READ16_MEMBER( sh96_protection_region_0_146_r ); DECLARE_WRITE16_MEMBER( sh96_protection_region_0_146_w ); diff --git a/src/mame/video/deco_mlc.cpp b/src/mame/video/deco_mlc.cpp index a419d2c9846..e7fc22fbfe1 100644 --- a/src/mame/video/deco_mlc.cpp +++ b/src/mame/video/deco_mlc.cpp @@ -140,8 +140,8 @@ void deco_mlc_state::draw_sprites( const rectangle &cliprect, int scanline, UINT UINT32 *index_ptr=nullptr; int offs,fx=0,fy=0,x,y,color,colorOffset,sprite,indx,h,w,bx,by,fx1,fy1; int xoffs,yoffs; - UINT8 *rom = memregion("gfx2")->base() + 0x20000, *index_ptr8; - UINT8 *rawrom = memregion("gfx2")->base(); + UINT8 *rom = m_gfx2 + 0x20000, *index_ptr8; + UINT8 *rawrom = m_gfx2; int blockIsTilemapIndex=0; int sprite2=0,indx2=0,use8bppMode=0; int yscale,xscale;