mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
(MESS) sbc6510: Reduce tagmap lookups (nw)
This commit is contained in:
parent
77b5c79c89
commit
6b0fc57095
@ -72,7 +72,11 @@ public:
|
|||||||
UINT8 m_key_row;
|
UINT8 m_key_row;
|
||||||
UINT8 m_2;
|
UINT8 m_2;
|
||||||
required_device<generic_terminal_device> m_terminal;
|
required_device<generic_terminal_device> m_terminal;
|
||||||
|
virtual void machine_start();
|
||||||
virtual void machine_reset();
|
virtual void machine_reset();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
ioport_port *m_io_port[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -194,6 +198,17 @@ static GENERIC_TERMINAL_INTERFACE( terminal_intf )
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void sbc6510_state::machine_start()
|
||||||
|
{
|
||||||
|
char kbdrow[6];
|
||||||
|
for ( int i = 0; i < 8; i++ )
|
||||||
|
{
|
||||||
|
sprintf(kbdrow,"X%X",i);
|
||||||
|
m_io_port[i] = ioport(kbdrow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void sbc6510_state::machine_reset()
|
void sbc6510_state::machine_reset()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -221,14 +236,14 @@ static const ay8910_interface sbc6510_ay_interface =
|
|||||||
|
|
||||||
READ8_MEMBER( sbc6510_state::key_r )
|
READ8_MEMBER( sbc6510_state::key_r )
|
||||||
{
|
{
|
||||||
UINT8 i,data=0;
|
UINT8 data=0;
|
||||||
char kbdrow[6];
|
|
||||||
|
|
||||||
for (i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
if (!BIT(m_key_row, i))
|
|
||||||
{
|
{
|
||||||
sprintf(kbdrow,"X%X",i);
|
if (!BIT(m_key_row, i))
|
||||||
data |= ioport(kbdrow)->read();
|
{
|
||||||
|
data |= m_io_port[i]->read();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ~data;
|
return ~data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user