summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/ti99_8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/ti99_8.cpp')
-rw-r--r--src/mame/drivers/ti99_8.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mame/drivers/ti99_8.cpp b/src/mame/drivers/ti99_8.cpp
index 8ad91d0895a..1b49497785f 100644
--- a/src/mame/drivers/ti99_8.cpp
+++ b/src/mame/drivers/ti99_8.cpp
@@ -222,7 +222,8 @@ public:
m_ioport(*this, TI99_IOPORT_TAG),
m_mainboard(*this, TI998_MAINBOARD_TAG),
m_joyport(*this, TI_JOYPORT_TAG),
- m_cassette(*this, "cassette")
+ m_cassette(*this, "cassette"),
+ m_keyboard(*this, "COL%u", 0U)
{
}
@@ -286,6 +287,8 @@ private:
required_device<bus::ti99::internal::mainboard8_device> m_mainboard;
required_device<bus::ti99::joyport::joyport_device> m_joyport;
required_device<cassette_image_device> m_cassette;
+
+ required_ioport_array<14> m_keyboard;
};
/*
@@ -448,11 +451,6 @@ WRITE8_MEMBER( ti99_8_state::cruwrite )
keyboard column selection.)
***************************************************************************/
-static const char *const column[] = {
- "COL0", "COL1", "COL2", "COL3", "COL4", "COL5", "COL6", "COL7",
- "COL8", "COL9", "COL10", "COL11", "COL12", "COL13"
-};
-
READ8_MEMBER( ti99_8_state::read_by_9901 )
{
int answer=0;
@@ -477,7 +475,7 @@ READ8_MEMBER( ti99_8_state::read_by_9901 )
}
else
{
- answer = ioport(column[m_keyboard_column])->read();
+ answer = m_keyboard[m_keyboard_column]->read();
}
answer = (answer << 6);
if (m_int1 == CLEAR_LINE) answer |= 0x02;
@@ -502,7 +500,7 @@ READ8_MEMBER( ti99_8_state::read_by_9901 )
}
else
{
- answer = ioport(column[m_keyboard_column])->read();
+ answer = m_keyboard[m_keyboard_column]->read();
}
answer = (answer >> 2) & 0x07;
break;