Previous 199869 Revisions Next

r20510 Saturday 26th January, 2013 at 20:28:42 UTC by Wilbert Pol
(MESS) kim1: Tagmap cleanups (nw)
[src/mess/drivers]kim1.c

trunk/src/mess/drivers/kim1.c
r20509r20510
106106{
107107public:
108108   kim1_state(const machine_config &mconfig, device_type type, const char *tag)
109      : driver_device(mconfig, type, tag),
110   m_riot2(*this, "miot_u2"),
111   m_cass(*this, CASSETTE_TAG)
109      : driver_device(mconfig, type, tag)
110      , m_maincpu(*this, "maincpu")
111      , m_riot2(*this, "miot_u2")
112      , m_cass(*this, CASSETTE_TAG)
113      , m_line0(*this, "LINE0")
114      , m_line1(*this, "LINE1")
115      , m_line2(*this, "LINE2")
116      , m_line3(*this, "LINE3")
112117   { }
113118
119   required_device<cpu_device> m_maincpu;
114120   required_device<mos6530_device> m_riot2;
115121   required_device<cassette_image_device> m_cass;
116122   DECLARE_READ8_MEMBER(kim1_u2_read_a);
r20509r20510
126132   DECLARE_INPUT_CHANGED_MEMBER(kim1_reset);
127133   TIMER_DEVICE_CALLBACK_MEMBER(kim1_cassette_input);
128134   TIMER_DEVICE_CALLBACK_MEMBER(kim1_update_leds);
135
136protected:
137   required_ioport m_line0;
138   required_ioport m_line1;
139   required_ioport m_line2;
140   required_ioport m_line3;
129141};
130142
131143
r20509r20510
146158INPUT_CHANGED_MEMBER(kim1_state::kim1_reset)
147159{
148160   if (newval == 0)
149      machine().firstcpu->reset();
161      m_maincpu->reset();
150162}
151163
152164
r20509r20510
202214   switch( ( m_u2_port_b >> 1 ) & 0x0f )
203215   {
204216   case 0:
205      data = ioport("LINE0")->read();
217      data = m_line0->read();
206218      break;
207219   case 1:
208      data = ioport("LINE1")->read();
220      data = m_line1->read();
209221      break;
210222   case 2:
211      data = ioport("LINE2")->read();
223      data = m_line2->read();
212224      break;
213225   }
214226   return data;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team