diff options
author | Wilbert Pol <wilbert@jdg.info> | 2013-02-10 21:10:37 +0000 |
---|---|---|
committer | Wilbert Pol <wilbert@jdg.info> | 2013-02-10 21:10:37 +0000 |
commit | 76700eceac71df1c339ed3a0d4c543b8f6bdc535 (patch) | |
tree | 25bdf764c236749942f8470ef28b5f0b43bf6874 /src | |
parent | cf0f8375f26b99ea9bd19390d4fe753b5e96e548 (diff) |
(MESS) intv.c: Reduce some tagmap lookups (nw)
Diffstat (limited to 'src')
-rw-r--r-- | src/mess/drivers/intv.c | 6 | ||||
-rw-r--r-- | src/mess/includes/intv.h | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/mess/drivers/intv.c b/src/mess/drivers/intv.c index 49bf246385f..c5635e2aa7a 100644 --- a/src/mess/drivers/intv.c +++ b/src/mess/drivers/intv.c @@ -798,13 +798,13 @@ ADDRESS_MAP_END TIMER_CALLBACK_MEMBER(intv_state::intv_interrupt2_complete) { - machine().device("keyboard")->execute().set_input_line(0, CLEAR_LINE); + m_keyboard->set_input_line(0, CLEAR_LINE); } INTERRUPT_GEN_MEMBER(intv_state::intv_interrupt2) { - machine().device("keyboard")->execute().set_input_line(0, ASSERT_LINE); - machine().scheduler().timer_set(machine().device<cpu_device>("keyboard")->cycles_to_attotime(100), timer_expired_delegate(FUNC(intv_state::intv_interrupt2_complete),this)); + m_keyboard->set_input_line(0, ASSERT_LINE); + machine().scheduler().timer_set(m_keyboard->cycles_to_attotime(100), timer_expired_delegate(FUNC(intv_state::intv_interrupt2_complete),this)); } static MACHINE_CONFIG_START( intv, intv_state ) diff --git a/src/mess/includes/intv.h b/src/mess/includes/intv.h index 6a0d7fbb38f..29abe49c61d 100644 --- a/src/mess/includes/intv.h +++ b/src/mess/includes/intv.h @@ -40,7 +40,8 @@ public: m_sound(*this, "ay8914.1"), m_ecs_sound(*this, "ay8914.2"), m_intvkbd_dualport_ram(*this, "dualport_ram"), - m_videoram(*this, "videoram") + m_videoram(*this, "videoram"), + m_keyboard(*this, "keyboard") { } required_device<cpu_device> m_maincpu; @@ -142,6 +143,9 @@ public: TIMER_CALLBACK_MEMBER(intv_btb_fill); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( intv_cart ); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( intvkbd_cart ); + +protected: + optional_device<cpu_device> m_keyboard; }; /*----------- defined in video/intv.c -----------*/ |