From 7cbc98fb7f129161b91582b8b201ca605121dce4 Mon Sep 17 00:00:00 2001 From: Wilbert Pol Date: Fri, 8 Feb 2013 22:30:00 +0000 Subject: [PATCH] (MESS) gba.c: Another small tagmap cleanup (nw) --- src/mess/drivers/gba.c | 2 +- src/mess/includes/gba.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c index e4d96f5526b..36581fc0297 100644 --- a/src/mess/drivers/gba.c +++ b/src/mess/drivers/gba.c @@ -1907,7 +1907,7 @@ WRITE32_MEMBER(gba_state::gba_oam_w) READ32_MEMBER(gba_state::gba_bios_r) { - UINT32 *rom = (UINT32 *)(*machine().root_device().memregion("maincpu")); + UINT32 *rom = (UINT32 *)(*m_region_maincpu); if (m_bios_protected != 0) { offset = (m_bios_last_address + 8) / 4; diff --git a/src/mess/includes/gba.h b/src/mess/includes/gba.h index 31d0e7ce45b..ab40f628ce8 100644 --- a/src/mess/includes/gba.h +++ b/src/mess/includes/gba.h @@ -148,6 +148,7 @@ public: m_lbdac(*this, "direct_b_left"), m_rbdac(*this, "direct_b_right"), m_gbsound(*this, "custom"), + m_region_maincpu(*this, "maincpu"), m_io_in0(*this, "IN0") { } @@ -283,6 +284,7 @@ public: DECLARE_DEVICE_IMAGE_LOAD_MEMBER(gba_cart); protected: + required_memory_region m_region_maincpu; required_ioport m_io_in0; };