mirror of
https://github.com/holub/mame
synced 2025-07-06 10:29:38 +03:00
mac128.cpp: Use ioport_array for keyboard (nw)
This commit is contained in:
parent
229c441d35
commit
225e324857
@ -152,13 +152,7 @@ public:
|
||||
m_mouse0(*this, "MOUSE0"),
|
||||
m_mouse1(*this, "MOUSE1"),
|
||||
m_mouse2(*this, "MOUSE2"),
|
||||
m_key0(*this, "KEY0"),
|
||||
m_key1(*this, "KEY1"),
|
||||
m_key2(*this, "KEY2"),
|
||||
m_key3(*this, "KEY3"),
|
||||
m_key4(*this, "KEY4"),
|
||||
m_key5(*this, "KEY5"),
|
||||
m_key6(*this, "KEY6"),
|
||||
m_key_port(*this, "KEY%u", 0),
|
||||
m_screen(*this, "screen"),
|
||||
m_dac(*this, DAC_TAG),
|
||||
m_scc(*this, SCC_TAG)
|
||||
@ -173,8 +167,7 @@ public:
|
||||
optional_device<rtc3430042_device> m_rtc;
|
||||
|
||||
required_ioport m_mouse0, m_mouse1, m_mouse2;
|
||||
required_ioport m_key0, m_key1, m_key2, m_key3, m_key4, m_key5;
|
||||
optional_ioport m_key6;
|
||||
optional_ioport_array<7> m_key_port;
|
||||
|
||||
virtual void machine_start() override;
|
||||
virtual void machine_reset() override;
|
||||
@ -815,7 +808,6 @@ int mac128_state::scan_keyboard()
|
||||
int i, j;
|
||||
int keybuf = 0;
|
||||
int keycode;
|
||||
ioport_port *ports[7] = { m_key0, m_key1, m_key2, m_key3, m_key4, m_key5, m_key6 };
|
||||
|
||||
if (m_keycode_buf_index)
|
||||
{
|
||||
@ -824,7 +816,7 @@ int mac128_state::scan_keyboard()
|
||||
|
||||
for (i=0; i<7; i++)
|
||||
{
|
||||
keybuf = ports[i]->read();
|
||||
keybuf = m_key_port[i]->read();
|
||||
|
||||
if (keybuf != m_key_matrix[i])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user