summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Wilbert Pol <wilbert@jdg.info>2013-02-10 19:54:40 +0000
committerGravatarGravatar Wilbert Pol <wilbert@jdg.info>2013-02-10 19:54:40 +0000
commit11607bf28e9b2b7699eb586ffd9321021bd6620d (patch) (github)
treeb192fa5bfa62f42890d0276b476e335e99c8a56b
parente4fc128bd2493ea1bd97889f281118371cedc152 (diff)
downloadmame-11607bf28e9b2b7699eb586ffd9321021bd6620d.tar.bz2
mame-11607bf28e9b2b7699eb586ffd9321021bd6620d.zip
(MESS) trs80.c: Reduce tagmap lookups (nw)
-rw-r--r--src/mess/includes/trs80.h18
-rw-r--r--src/mess/machine/trs80.c18
2 files changed, 27 insertions, 9 deletions
diff --git a/src/mess/includes/trs80.h b/src/mess/includes/trs80.h
index 6a45f29c3f6..4749864a67a 100644
--- a/src/mess/includes/trs80.h
+++ b/src/mess/includes/trs80.h
@@ -35,6 +35,15 @@ public:
, m_cass(*this, CASSETTE_TAG)
, m_p_videoram(*this, "p_videoram")
, m_region_maincpu(*this, "maincpu")
+ , m_io_config(*this, "CONFIG")
+ , m_io_line0(*this, "LINE0")
+ , m_io_line1(*this, "LINE1")
+ , m_io_line2(*this, "LINE2")
+ , m_io_line3(*this, "LINE3")
+ , m_io_line4(*this, "LINE4")
+ , m_io_line5(*this, "LINE5")
+ , m_io_line6(*this, "LINE6")
+ , m_io_line7(*this, "LINE7")
, m_bank1(NULL)
, m_bank2(NULL)
, m_bank3(NULL)
@@ -148,6 +157,15 @@ public:
protected:
required_memory_region m_region_maincpu;
+ required_ioport m_io_config;
+ required_ioport m_io_line0;
+ required_ioport m_io_line1;
+ required_ioport m_io_line2;
+ required_ioport m_io_line3;
+ required_ioport m_io_line4;
+ required_ioport m_io_line5;
+ required_ioport m_io_line6;
+ required_ioport m_io_line7;
memory_bank *m_bank1;
memory_bank *m_bank2;
memory_bank *m_bank3;
diff --git a/src/mess/machine/trs80.c b/src/mess/machine/trs80.c
index e4bc78611b9..eebc064d62f 100644
--- a/src/mess/machine/trs80.c
+++ b/src/mess/machine/trs80.c
@@ -698,7 +698,7 @@ const wd17xx_interface trs80_wd17xx_interface =
READ8_MEMBER( trs80_state::trs80_wd179x_r )
{
UINT8 data = 0xff;
- if (BIT(ioport("CONFIG")->read(), 7))
+ if (BIT(m_io_config->read(), 7))
data = wd17xx_status_r(m_fdc, space, offset);
return data;
@@ -818,21 +818,21 @@ READ8_MEMBER( trs80_state::trs80_keyboard_r )
UINT8 result = 0;
if (offset & 1)
- result |= ioport("LINE0")->read();
+ result |= m_io_line0->read();
if (offset & 2)
- result |= ioport("LINE1")->read();
+ result |= m_io_line1->read();
if (offset & 4)
- result |= ioport("LINE2")->read();
+ result |= m_io_line2->read();
if (offset & 8)
- result |= ioport("LINE3")->read();
+ result |= m_io_line3->read();
if (offset & 16)
- result |= ioport("LINE4")->read();
+ result |= m_io_line4->read();
if (offset & 32)
- result |= ioport("LINE5")->read();
+ result |= m_io_line5->read();
if (offset & 64)
- result |= ioport("LINE6")->read();
+ result |= m_io_line6->read();
if (offset & 128)
- result |= ioport("LINE7")->read();
+ result |= m_io_line7->read();
return result;
}