(MESS) kim1: Tagmap cleanups (nw)

This commit is contained in:
Wilbert Pol 2013-01-26 20:28:42 +00:00
parent db398d6f0e
commit 06d376a731

View File

@ -106,11 +106,17 @@ class kim1_state : public driver_device
{ {
public: public:
kim1_state(const machine_config &mconfig, device_type type, const char *tag) kim1_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag), : driver_device(mconfig, type, tag)
m_riot2(*this, "miot_u2"), , m_maincpu(*this, "maincpu")
m_cass(*this, CASSETTE_TAG) , m_riot2(*this, "miot_u2")
, m_cass(*this, CASSETTE_TAG)
, m_line0(*this, "LINE0")
, m_line1(*this, "LINE1")
, m_line2(*this, "LINE2")
, m_line3(*this, "LINE3")
{ } { }
required_device<cpu_device> m_maincpu;
required_device<mos6530_device> m_riot2; required_device<mos6530_device> m_riot2;
required_device<cassette_image_device> m_cass; required_device<cassette_image_device> m_cass;
DECLARE_READ8_MEMBER(kim1_u2_read_a); DECLARE_READ8_MEMBER(kim1_u2_read_a);
@ -126,6 +132,12 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(kim1_reset); DECLARE_INPUT_CHANGED_MEMBER(kim1_reset);
TIMER_DEVICE_CALLBACK_MEMBER(kim1_cassette_input); TIMER_DEVICE_CALLBACK_MEMBER(kim1_cassette_input);
TIMER_DEVICE_CALLBACK_MEMBER(kim1_update_leds); TIMER_DEVICE_CALLBACK_MEMBER(kim1_update_leds);
protected:
required_ioport m_line0;
required_ioport m_line1;
required_ioport m_line2;
required_ioport m_line3;
}; };
@ -146,7 +158,7 @@ ADDRESS_MAP_END
INPUT_CHANGED_MEMBER(kim1_state::kim1_reset) INPUT_CHANGED_MEMBER(kim1_state::kim1_reset)
{ {
if (newval == 0) if (newval == 0)
machine().firstcpu->reset(); m_maincpu->reset();
} }
@ -202,13 +214,13 @@ READ8_MEMBER( kim1_state::kim1_u2_read_a )
switch( ( m_u2_port_b >> 1 ) & 0x0f ) switch( ( m_u2_port_b >> 1 ) & 0x0f )
{ {
case 0: case 0:
data = ioport("LINE0")->read(); data = m_line0->read();
break; break;
case 1: case 1:
data = ioport("LINE1")->read(); data = m_line1->read();
break; break;
case 2: case 2:
data = ioport("LINE2")->read(); data = m_line2->read();
break; break;
} }
return data; return data;