mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
alesis.c: Reduce tagmap lookups (nw)
This commit is contained in:
parent
c32e086c2c
commit
4d60a89a60
@ -27,17 +27,17 @@ READ8_MEMBER( alesis_state::kb_r )
|
||||
UINT8 data = 0xff;
|
||||
|
||||
if (!(m_kb_matrix & 0x01))
|
||||
data &= ioport("COL1")->read();
|
||||
data &= m_col1->read();
|
||||
if (!(m_kb_matrix & 0x02))
|
||||
data &= ioport("COL2")->read();
|
||||
data &= m_col2->read();
|
||||
if (!(m_kb_matrix & 0x04))
|
||||
data &= ioport("COL3")->read();
|
||||
data &= m_col3->read();
|
||||
if (!(m_kb_matrix & 0x08))
|
||||
data &= ioport("COL4")->read();
|
||||
data &= m_col4->read();
|
||||
if (!(m_kb_matrix & 0x10))
|
||||
data &= ioport("COL5")->read();
|
||||
data &= m_col5->read();
|
||||
if (!(m_kb_matrix & 0x20))
|
||||
data &= ioport("COL6")->read();
|
||||
data &= m_col6->read();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -65,7 +65,15 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_lcdc(*this, "hd44780"),
|
||||
m_cassette(*this, "cassette"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_col1(*this, "COL1"),
|
||||
m_col2(*this, "COL2"),
|
||||
m_col3(*this, "COL3"),
|
||||
m_col4(*this, "COL4"),
|
||||
m_col5(*this, "COL5"),
|
||||
m_col6(*this, "COL6"),
|
||||
m_select(*this, "SELECT")
|
||||
{ }
|
||||
|
||||
required_device<hd44780_device> m_lcdc;
|
||||
optional_device<cassette_image_device> m_cassette;
|
||||
@ -92,6 +100,13 @@ private:
|
||||
UINT8 m_leds;
|
||||
UINT8 m_lcd_digits[5];
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_ioport m_col1;
|
||||
required_ioport m_col2;
|
||||
required_ioport m_col3;
|
||||
required_ioport m_col4;
|
||||
required_ioport m_col5;
|
||||
required_ioport m_col6;
|
||||
optional_ioport m_select;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
|
Loading…
Reference in New Issue
Block a user