diff --git a/src/mess/drivers/gba.c b/src/mess/drivers/gba.c index 390023eb56a..e4d96f5526b 100644 --- a/src/mess/drivers/gba.c +++ b/src/mess/drivers/gba.c @@ -916,7 +916,7 @@ READ32_MEMBER(gba_state::gba_io_r) case 0x0130/4: if( (mem_mask) & 0x0000ffff ) // KEYINPUT { - retval = ioport("IN0")->read(); + retval = m_io_in0->read(); } else if( (mem_mask) & 0xffff0000 ) { diff --git a/src/mess/includes/gba.h b/src/mess/includes/gba.h index e76da8260a9..31d0e7ce45b 100644 --- a/src/mess/includes/gba.h +++ b/src/mess/includes/gba.h @@ -147,7 +147,9 @@ public: m_radac(*this, "direct_a_right"), m_lbdac(*this, "direct_b_left"), m_rbdac(*this, "direct_b_right"), - m_gbsound(*this, "custom"){ } + m_gbsound(*this, "custom"), + m_io_in0(*this, "IN0") + { } required_device m_maincpu; required_shared_ptr m_gba_pram; @@ -279,6 +281,9 @@ public: TIMER_CALLBACK_MEMBER(perform_scan); void gba_machine_stop(); DECLARE_DEVICE_IMAGE_LOAD_MEMBER(gba_cart); + +protected: + required_ioport m_io_in0; }; /*----------- defined in video/gba.c -----------*/