Previous 199869 Revisions Next

r20435 Thursday 24th January, 2013 at 15:13:20 UTC by Curt Coder
(MESS) Reduced tagmap abuse. (nw)
[src/mess/drivers]atom.c beta.c bullet.c bw12.c bw2.c c128.c c64.c c80.c cbm2.c comx35.c mikromik.c mpz80.c sage2.c studio2.c vip.c
[src/mess/includes]atom.h beta.h bw12.h bw2.h c128.h c64.h c80.h cbm2.h comx35.h mikromik.h mpz80.h sage2.h studio2.h vip.h
[src/mess/machine]abc77.c abc77.h abc800kb.c abc800kb.h abc99.c abc99.h adam_kb.c adam_kb.h tandy2kb.c tandy2kb.h trs80m2kb.c trs80m2kb.h v1050kb.c v1050kb.h victor9kb.c victor9kb.h

trunk/src/mess/machine/abc77.c
r20434r20435
448448   : device_t(mconfig, ABC77, "Luxor ABC 77", tag, owner, clock),
449449      m_maincpu(*this, I8035_TAG),
450450      m_discrete(*this, DISCRETE_TAG),
451      m_x0(*this, "X0"),
452      m_x1(*this, "X1"),
453      m_x2(*this, "X2"),
454      m_x3(*this, "X3"),
455      m_x4(*this, "X4"),
456      m_x5(*this, "X5"),
457      m_x6(*this, "X6"),
458      m_x7(*this, "X7"),
459      m_x8(*this, "X8"),
460      m_x9(*this, "X9"),
461      m_x10(*this, "X10"),
462      m_x11(*this, "X11"),
451463      m_txd(1),
452464      m_keydown(1),
453465      m_clock(0),
r20434r20435
459471   : device_t(mconfig, type, name, tag, owner, clock),
460472      m_maincpu(*this, I8035_TAG),
461473      m_discrete(*this, DISCRETE_TAG),
474      m_x0(*this, "X0"),
475      m_x1(*this, "X1"),
476      m_x2(*this, "X2"),
477      m_x3(*this, "X3"),
478      m_x4(*this, "X4"),
479      m_x5(*this, "X5"),
480      m_x6(*this, "X6"),
481      m_x7(*this, "X7"),
482      m_x8(*this, "X8"),
483      m_x9(*this, "X9"),
484      m_x10(*this, "X10"),
485      m_x11(*this, "X11"),
462486      m_txd(1),
463487      m_keydown(1),
464488      m_clock(0),
r20434r20435
545569
546570   */
547571
548   static const char *const keynames[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10", "X11" };
549572   UINT8 data = 0xff;
550573
551   if (m_stb && m_keylatch < 12)
574   if (m_stb)
552575   {
553      data = ioport(keynames[m_keylatch])->read();
576      switch (m_keylatch)
577      {
578      case 0: data = m_x0->read(); break;
579      case 1: data = m_x1->read(); break;
580      case 2: data = m_x2->read(); break;
581      case 3: data = m_x3->read(); break;
582      case 4: data = m_x4->read(); break;
583      case 5: data = m_x5->read(); break;
584      case 6: data = m_x6->read(); break;
585      case 7: data = m_x7->read(); break;
586      case 8: data = m_x8->read(); break;
587      case 9: data = m_x9->read(); break;
588      case 10: data = m_x10->read(); break;
589      case 11: data = m_x11->read(); break;
590      }
554591   }
555592
556593   return data;
trunk/src/mess/machine/abc77.h
r20434r20435
106106
107107   required_device<cpu_device> m_maincpu;
108108   required_device<discrete_sound_device> m_discrete;
109   required_ioport m_x0;
110   required_ioport m_x1;
111   required_ioport m_x2;
112   required_ioport m_x3;
113   required_ioport m_x4;
114   required_ioport m_x5;
115   required_ioport m_x6;
116   required_ioport m_x7;
117   required_ioport m_x8;
118   required_ioport m_x9;
119   required_ioport m_x10;
120   required_ioport m_x11;
109121
110122   int m_txd;                      // transmit data
111123   int m_keylatch;                 // keyboard row latch
trunk/src/mess/machine/adam_kb.c
r20434r20435
227227   : device_t(mconfig, ADAM_KB, "Adam keyboard", tag, owner, clock),
228228      device_adamnet_card_interface(mconfig, *this),
229229      m_maincpu(*this, M6801_TAG),
230      m_y0(*this, "Y0"),
231      m_y1(*this, "Y1"),
232      m_y2(*this, "Y2"),
233      m_y3(*this, "Y3"),
234      m_y4(*this, "Y4"),
235      m_y5(*this, "Y5"),
236      m_y6(*this, "Y6"),
237      m_y7(*this, "Y7"),
238      m_y8(*this, "Y8"),
239      m_y9(*this, "Y9"),
240      m_y10(*this, "Y10"),
241      m_y11(*this, "Y11"),
242      m_y12(*this, "Y12"),
230243      m_key_y(0x1ff)
231244{
232245}
r20434r20435
276289
277290   UINT8 data = 0xff;
278291
279   if (!BIT(m_key_y, 0)) data &= ioport("Y0")->read();
280   if (!BIT(m_key_y, 1)) data &= ioport("Y1")->read();
281   if (!BIT(m_key_y, 2)) data &= ioport("Y2")->read();
282   if (!BIT(m_key_y, 3)) data &= ioport("Y3")->read();
283   if (!BIT(m_key_y, 4)) data &= ioport("Y4")->read();
284   if (!BIT(m_key_y, 5)) data &= ioport("Y5")->read();
285   if (!BIT(m_key_y, 6)) data &= ioport("Y6")->read();
286   if (!BIT(m_key_y, 7)) data &= ioport("Y7")->read();
287   if (!BIT(m_key_y, 8)) data &= ioport("Y8")->read();
288   if (!BIT(m_key_y, 9)) data &= ioport("Y9")->read();
289   if (!BIT(m_key_y, 10)) data &= ioport("Y10")->read();
290   if (!BIT(m_key_y, 11)) data &= ioport("Y11")->read();
291   if (!BIT(m_key_y, 12)) data &= ioport("Y12")->read();
292   if (!BIT(m_key_y, 0)) data &= m_y0->read();
293   if (!BIT(m_key_y, 1)) data &= m_y1->read();
294   if (!BIT(m_key_y, 2)) data &= m_y2->read();
295   if (!BIT(m_key_y, 3)) data &= m_y3->read();
296   if (!BIT(m_key_y, 4)) data &= m_y4->read();
297   if (!BIT(m_key_y, 5)) data &= m_y5->read();
298   if (!BIT(m_key_y, 6)) data &= m_y6->read();
299   if (!BIT(m_key_y, 7)) data &= m_y7->read();
300   if (!BIT(m_key_y, 8)) data &= m_y8->read();
301   if (!BIT(m_key_y, 9)) data &= m_y9->read();
302   if (!BIT(m_key_y, 10)) data &= m_y10->read();
303   if (!BIT(m_key_y, 11)) data &= m_y11->read();
304   if (!BIT(m_key_y, 12)) data &= m_y12->read();
292305
293306   return data;
294307}
trunk/src/mess/machine/adam_kb.h
r20434r20435
5454   virtual void adamnet_reset_w(int state);
5555
5656   required_device<cpu_device> m_maincpu;
57   required_ioport m_y0;
58   required_ioport m_y1;
59   required_ioport m_y2;
60   required_ioport m_y3;
61   required_ioport m_y4;
62   required_ioport m_y5;
63   required_ioport m_y6;
64   required_ioport m_y7;
65   required_ioport m_y8;
66   required_ioport m_y9;
67   required_ioport m_y10;
68   required_ioport m_y11;
69   required_ioport m_y12;
5770
5871   UINT16 m_key_y;
5972};
trunk/src/mess/machine/v1050kb.c
r20434r20435
110110//-------------------------------------------------
111111
112112INPUT_PORTS_START( v1050_keyboard )
113   PORT_START("X0")
113   PORT_START("Y0")
114114   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
115115   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
116116   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Caps Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
r20434r20435
120120   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
121121   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("No Scrl")
122122
123   PORT_START("X1")
123   PORT_START("Y1")
124124   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad Enter DelCh") PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD))
125125   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6 Pg Dn") PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
126126   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3 \xE2\x86\x92") PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
r20434r20435
130130   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad , DelWd")
131131   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad . Wd\xE2\x86\x92") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
132132
133   PORT_START("X2")
133   PORT_START("Y2")
134134   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F14 OnSer")
135135   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F16 Print")
136136   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F12 Copy") PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12))
r20434r20435
140140   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F17 Block")
141141   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F13 Hide")
142142
143   PORT_START("X3")
143   PORT_START("Y3")
144144   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Line Feed")
145145   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('|') PORT_CHAR('\\')
146146   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Retn") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
r20434r20435
150150   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Del") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL))
151151   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0 Wd\xE2\x86\x90") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
152152
153   PORT_START("X4")
153   PORT_START("Y4")
154154   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
155155   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5 \xE2\x86\x91") PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
156156   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1 \xE2\x86\x90") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
r20434r20435
160160   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4 PgUp") PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
161161   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2 \xE2\x86\x93") PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
162162
163   PORT_START("X5")
163   PORT_START("Y5")
164164   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
165165   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
166166   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
r20434r20435
170170   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
171171   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
172172
173   PORT_START("X6")
173   PORT_START("Y6")
174174   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
175175   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^')
176176   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
r20434r20435
180180   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
181181   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
182182
183   PORT_START("X7")
183   PORT_START("Y7")
184184   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F8 Insert") PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
185185   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
186186   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F6 InsCr") PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
r20434r20435
190190   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F4 Again") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
191191   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7 Refs") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
192192
193   PORT_START("X8")
193   PORT_START("Y8")
194194   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
195195   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
196196   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
r20434r20435
200200   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
201201   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
202202
203   PORT_START("X9")
203   PORT_START("Y9")
204204   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
205205   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
206206   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
r20434r20435
210210   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
211211   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
212212
213   PORT_START("XA")
213   PORT_START("YA")
214214   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('~') PORT_CHAR('\'')
215215   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('0') PORT_CHAR(')')
216216   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('9') PORT_CHAR('(')
r20434r20435
220220   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
221221   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
222222
223   PORT_START("XB")
223   PORT_START("YB")
224224   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
225225   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
226226   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
r20434r20435
307307   : device_t(mconfig, V1050_KEYBOARD, "Visual 1050 Keyboard", tag, owner, clock),
308308      m_maincpu(*this, I8049_TAG),
309309      m_discrete(*this, DISCRETE_TAG),
310      m_y0(*this, "Y0"),
311      m_y1(*this, "Y1"),
312      m_y2(*this, "Y2"),
313      m_y3(*this, "Y3"),
314      m_y4(*this, "Y4"),
315      m_y5(*this, "Y5"),
316      m_y6(*this, "Y6"),
317      m_y7(*this, "Y7"),
318      m_y8(*this, "Y8"),
319      m_y9(*this, "Y9"),
320      m_ya(*this, "YA"),
321      m_yb(*this, "YB"),
310322      m_y(0),
311323      m_so(1)
312324{
r20434r20435
364376
365377   switch (m_y)
366378   {
367      case 0: data &= ioport("X0")->read(); break;
368      case 1: data &= ioport("X1")->read(); break;
369      case 2: data &= ioport("X2")->read(); break;
370      case 3: data &= ioport("X3")->read(); break;
371      case 4: data &= ioport("X4")->read(); break;
372      case 5: data &= ioport("X5")->read(); break;
373      case 6: data &= ioport("X6")->read(); break;
374      case 7: data &= ioport("X7")->read(); break;
375      case 8: data &= ioport("X8")->read(); break;
376      case 9: data &= ioport("X9")->read(); break;
377      case 0xa: data &= ioport("XA")->read(); break;
378      case 0xb: data &= ioport("XB")->read(); break;
379      case 0: data &= m_y0->read(); break;
380      case 1: data &= m_y1->read(); break;
381      case 2: data &= m_y2->read(); break;
382      case 3: data &= m_y3->read(); break;
383      case 4: data &= m_y4->read(); break;
384      case 5: data &= m_y5->read(); break;
385      case 6: data &= m_y6->read(); break;
386      case 7: data &= m_y7->read(); break;
387      case 8: data &= m_y8->read(); break;
388      case 9: data &= m_y9->read(); break;
389      case 0xa: data &= m_ya->read(); break;
390      case 0xb: data &= m_yb->read(); break;
379391   }
380392
381393   return data;
trunk/src/mess/machine/v1050kb.h
r20434r20435
7474private:
7575   required_device<cpu_device> m_maincpu;
7676   required_device<discrete_sound_device> m_discrete;
77   required_ioport m_y0;
78   required_ioport m_y1;
79   required_ioport m_y2;
80   required_ioport m_y3;
81   required_ioport m_y4;
82   required_ioport m_y5;
83   required_ioport m_y6;
84   required_ioport m_y7;
85   required_ioport m_y8;
86   required_ioport m_y9;
87   required_ioport m_ya;
88   required_ioport m_yb;
7789
7890   UINT8 m_y;
7991   int m_so;
trunk/src/mess/machine/abc99.c
r20434r20435
527527      m_maincpu(*this, I8035_Z2_TAG),
528528      m_mousecpu(*this, I8035_Z5_TAG),
529529      m_speaker(*this, SPEAKER_TAG),
530      m_z14(*this, "Z14"),
531      m_mouseb(*this, "MOUSEB"),
530532      m_si(1),
531533      m_si_en(1),
532534      m_so(1),
r20434r20435
691693
692694   */
693695
694   UINT8 data = ioport("Z14")->read() << 5;
696   UINT8 data = m_z14->read() << 5;
695697
696698   return data;
697699}
r20434r20435
741743   UINT8 data = 0;
742744
743745   // mouse buttons
744   data |= (ioport("MOUSEB")->read() & 0x07) << 4;
746   data |= (m_mouseb->read() & 0x07) << 4;
745747
746748   // serial input
747749   data |= m_si << 7;
trunk/src/mess/machine/abc99.h
r20434r20435
108108   required_device<cpu_device> m_maincpu;
109109   required_device<cpu_device> m_mousecpu;
110110   required_device<speaker_sound_device> m_speaker;
111   required_ioport m_z14;
112   required_ioport m_mouseb;
111113
112114   int m_si;
113115   int m_si_en;
trunk/src/mess/machine/tandy2kb.c
r20434r20435
234234tandy2k_keyboard_device::tandy2k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
235235   : device_t(mconfig, TANDY2K_KEYBOARD, "Tandy 2000 Keyboard", tag, owner, clock),
236236      m_maincpu(*this, I8048_TAG),
237      m_y0(*this, "Y0"),
238      m_y1(*this, "Y1"),
239      m_y2(*this, "Y2"),
240      m_y3(*this, "Y3"),
241      m_y4(*this, "Y4"),
242      m_y5(*this, "Y5"),
243      m_y6(*this, "Y6"),
244      m_y7(*this, "Y7"),
245      m_y8(*this, "Y8"),
246      m_y9(*this, "Y9"),
247      m_y10(*this, "Y10"),
248      m_y11(*this, "Y11"),
237249      m_keylatch(0xffff),
238250      m_clock(0),
239251      m_data(0)
r20434r20435
331343
332344   UINT8 data = 0xff;
333345
334   if (!BIT(m_keylatch, 0)) data &= ioport("Y0")->read();
335   if (!BIT(m_keylatch, 1)) data &= ioport("Y1")->read();
336   if (!BIT(m_keylatch, 2)) data &= ioport("Y2")->read();
337   if (!BIT(m_keylatch, 3)) data &= ioport("Y3")->read();
338   if (!BIT(m_keylatch, 4)) data &= ioport("Y4")->read();
339   if (!BIT(m_keylatch, 5)) data &= ioport("Y5")->read();
340   if (!BIT(m_keylatch, 6)) data &= ioport("Y6")->read();
341   if (!BIT(m_keylatch, 7)) data &= ioport("Y7")->read();
342   if (!BIT(m_keylatch, 8)) data &= ioport("Y8")->read();
343   if (!BIT(m_keylatch, 9)) data &= ioport("Y9")->read();
344   if (!BIT(m_keylatch, 10)) data &= ioport("Y10")->read();
345   if (!BIT(m_keylatch, 11)) data &= ioport("Y11")->read();
346   if (!BIT(m_keylatch, 0)) data &= m_y0->read();
347   if (!BIT(m_keylatch, 1)) data &= m_y1->read();
348   if (!BIT(m_keylatch, 2)) data &= m_y2->read();
349   if (!BIT(m_keylatch, 3)) data &= m_y3->read();
350   if (!BIT(m_keylatch, 4)) data &= m_y4->read();
351   if (!BIT(m_keylatch, 5)) data &= m_y5->read();
352   if (!BIT(m_keylatch, 6)) data &= m_y6->read();
353   if (!BIT(m_keylatch, 7)) data &= m_y7->read();
354   if (!BIT(m_keylatch, 8)) data &= m_y8->read();
355   if (!BIT(m_keylatch, 9)) data &= m_y9->read();
356   if (!BIT(m_keylatch, 10)) data &= m_y10->read();
357   if (!BIT(m_keylatch, 11)) data &= m_y11->read();
346358
347359   return ~data;
348360}
trunk/src/mess/machine/tandy2kb.h
r20434r20435
8888   devcb_resolved_write_line   m_out_data_func;
8989
9090   required_device<cpu_device> m_maincpu;
91   required_ioport m_y0;
92   required_ioport m_y1;
93   required_ioport m_y2;
94   required_ioport m_y3;
95   required_ioport m_y4;
96   required_ioport m_y5;
97   required_ioport m_y6;
98   required_ioport m_y7;
99   required_ioport m_y8;
100   required_ioport m_y9;
101   required_ioport m_y10;
102   required_ioport m_y11;
91103
92104   UINT16 m_keylatch;
93105
trunk/src/mess/machine/victor9kb.c
r20434r20435
238238victor9k_keyboard_device::victor9k_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
239239   : device_t(mconfig, VICTOR9K_KEYBOARD, "Victor 9000 Keyboard", tag, owner, clock),
240240      m_maincpu(*this, I8021_TAG),
241      m_y0(*this, "Y0"),
242      m_y1(*this, "Y1"),
243      m_y2(*this, "Y2"),
244      m_y3(*this, "Y3"),
245      m_y4(*this, "Y4"),
246      m_y5(*this, "Y5"),
247      m_y6(*this, "Y6"),
248      m_y7(*this, "Y7"),
249      m_y8(*this, "Y8"),
250      m_y9(*this, "Y9"),
251      m_ya(*this, "YA"),
252      m_yb(*this, "YB"),
253      m_yc(*this, "YC"),
241254      m_y(0),
242255      m_kbrdy(1),
243256      m_kbdata(1),
r20434r20435
312325
313326   switch (m_y)
314327   {
315      case 0: data &= ioport("Y0")->read(); break;
316      case 1: data &= ioport("Y1")->read(); break;
317      case 2: data &= ioport("Y2")->read(); break;
318      case 3: data &= ioport("Y3")->read(); break;
319      case 4: data &= ioport("Y4")->read(); break;
320      case 5: data &= ioport("Y5")->read(); break;
321      case 6: data &= ioport("Y6")->read(); break;
322      case 7: data &= ioport("Y7")->read(); break;
323      case 8: data &= ioport("Y8")->read(); break;
324      case 9: data &= ioport("Y9")->read(); break;
325      case 0xa: data &= ioport("YA")->read(); break;
326      case 0xb: data &= ioport("YB")->read(); break;
327      case 0xc: data &= ioport("YC")->read(); break;
328      case 0: data &= m_y0->read(); break;
329      case 1: data &= m_y1->read(); break;
330      case 2: data &= m_y2->read(); break;
331      case 3: data &= m_y3->read(); break;
332      case 4: data &= m_y4->read(); break;
333      case 5: data &= m_y5->read(); break;
334      case 6: data &= m_y6->read(); break;
335      case 7: data &= m_y7->read(); break;
336      case 8: data &= m_y8->read(); break;
337      case 9: data &= m_y9->read(); break;
338      case 0xa: data &= m_ya->read(); break;
339      case 0xb: data &= m_yb->read(); break;
340      case 0xc: data &= m_yc->read(); break;
328341   }
329342
330343   return data;
trunk/src/mess/machine/victor9kb.h
r20434r20435
8686   devcb_resolved_write_line   m_out_kbrdy_func;
8787
8888   required_device<cpu_device> m_maincpu;
89   required_ioport m_y0;
90   required_ioport m_y1;
91   required_ioport m_y2;
92   required_ioport m_y3;
93   required_ioport m_y4;
94   required_ioport m_y5;
95   required_ioport m_y6;
96   required_ioport m_y7;
97   required_ioport m_y8;
98   required_ioport m_y9;
99   required_ioport m_ya;
100   required_ioport m_yb;
101   required_ioport m_yc;
89102
90103   UINT8 m_y;
91104   int m_kbrdy;
trunk/src/mess/machine/trs80m2kb.c
r20434r20435
9393//-------------------------------------------------
9494
9595INPUT_PORTS_START( trs80m2_keyboard )
96/*
97    PORT_START("X0")
96    PORT_START("Y0")
9897    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
9998    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
10099    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
r20434r20435
104103    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
105104    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
106105
107    PORT_START("X1")
106    PORT_START("Y1")
108107    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
109108    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
110109    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
r20434r20435
114113    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
115114    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
116115
117    PORT_START("X2")
116    PORT_START("Y2")
118117    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("REPEAT")
119118    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Right SHIFT") PORT_CODE(KEYCODE_RSHIFT)
120119    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK))
r20434r20435
124123    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL))
125124    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
126125
127    PORT_START("X3")
126    PORT_START("Y3")
128127    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("cannot read label")
129128    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
130129    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
r20434r20435
134133    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD)
135134    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
136135
137    PORT_START("X4")
136    PORT_START("Y4")
138137    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
139138    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
140139    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
r20434r20435
144143    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD)
145144    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
146145
147    PORT_START("X5")
146    PORT_START("Y5")
148147    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HOLD")
149148    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}')
150149    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
r20434r20435
154153    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD)
155154    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
156155
157    PORT_START("X6")
156    PORT_START("Y6")
158157    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
159158    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
160159    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
r20434r20435
164163    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD)
165164    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD)
166165
167    PORT_START("X7")
166    PORT_START("Y7")
168167    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
169168    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
170169    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
r20434r20435
174173    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD)
175174    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD)
176175
177    PORT_START("X8")
176    PORT_START("Y8")
178177    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
179178    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
180179    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
r20434r20435
184183    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD)
185184    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD)
186185
187    PORT_START("X9")
186    PORT_START("Y9")
188187    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
189188    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{')
190189    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
r20434r20435
194193    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
195194    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
196195
197    PORT_START("XA")
196    PORT_START("YA")
198197    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
199198    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
200199    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
r20434r20435
204203    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
205204    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
206205
207    PORT_START("XB")
206    PORT_START("YB")
208207    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
209208    PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
210209    PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
r20434r20435
213212    PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
214213    PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("TAB") PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t')
215214    PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
216*/
217215INPUT_PORTS_END
218216
219217
r20434r20435
239237trs80m2_keyboard_device::trs80m2_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
240238   : device_t(mconfig, TRS80M2_KEYBOARD, "TRS-80 Model II Keyboard", tag, owner, clock),
241239      m_maincpu(*this, I8021_TAG),
240      m_y0(*this, "Y0"),
241      m_y1(*this, "Y1"),
242      m_y2(*this, "Y2"),
243      m_y3(*this, "Y3"),
244      m_y4(*this, "Y4"),
245      m_y5(*this, "Y5"),
246      m_y6(*this, "Y6"),
247      m_y7(*this, "Y7"),
248      m_y8(*this, "Y8"),
249      m_y9(*this, "Y9"),
250      m_ya(*this, "YA"),
251      m_yb(*this, "YB"),
242252      m_busy(1),
243253      m_data(1),
244254      m_clk(0)
r20434r20435
311321
312322   switch (m_y)
313323   {
314      case 0: data &= ioport("X0")->read(); break;
315      case 1: data &= ioport("X1")->read(); break;
316      case 2: data &= ioport("X2")->read(); break;
317      case 3: data &= ioport("X3")->read(); break;
318      case 4: data &= ioport("X4")->read(); break;
319      case 5: data &= ioport("X5")->read(); break;
320      case 6: data &= ioport("X6")->read(); break;
321      case 7: data &= ioport("X7")->read(); break;
322      case 8: data &= ioport("X8")->read(); break;
323      case 9: data &= ioport("X9")->read(); break;
324      case 0xa: data &= ioport("XA")->read(); break;
325      case 0xb: data &= ioport("XB")->read(); break;
324        case 0: data &= m_y0->read(); break;
325        case 1: data &= m_y1->read(); break;
326        case 2: data &= m_y2->read(); break;
327        case 3: data &= m_y3->read(); break;
328        case 4: data &= m_y4->read(); break;
329        case 5: data &= m_y5->read(); break;
330        case 6: data &= m_y6->read(); break;
331        case 7: data &= m_y7->read(); break;
332        case 8: data &= m_y8->read(); break;
333        case 9: data &= m_y9->read(); break;
334        case 0xa: data &= m_ya->read(); break;
335        case 0xb: data &= m_yb->read(); break;
326336   }
327337
328338   return data;
trunk/src/mess/machine/trs80m2kb.h
r20434r20435
8686   devcb_resolved_write_line   m_out_clock_func;
8787
8888   required_device<cpu_device> m_maincpu;
89   required_ioport m_y0;
90   required_ioport m_y1;
91   required_ioport m_y2;
92   required_ioport m_y3;
93   required_ioport m_y4;
94   required_ioport m_y5;
95   required_ioport m_y6;
96   required_ioport m_y7;
97   required_ioport m_y8;
98   required_ioport m_y9;
99   required_ioport m_ya;
100   required_ioport m_yb;
89101
90102   int m_busy;
91103   int m_data;
trunk/src/mess/machine/abc800kb.c
r20434r20435
358358abc800_keyboard_device::abc800_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
359359   : device_t(mconfig, ABC800_KEYBOARD, "ABC-800 Keyboard", tag, owner, clock),
360360      m_maincpu(*this, I8048_TAG),
361      m_x0(*this, "X0"),
362      m_x1(*this, "X1"),
363      m_x2(*this, "X2"),
364      m_x3(*this, "X3"),
365      m_x4(*this, "X4"),
366      m_x5(*this, "X5"),
367      m_x6(*this, "X6"),
368      m_x7(*this, "X7"),
369      m_x8(*this, "X8"),
370      m_x9(*this, "X9"),
371      m_x10(*this, "X10"),
372      m_x11(*this, "X11"),
361373      m_row(0),
362374      m_txd(1),
363375      m_clk(0),
r20434r20435
435447
436448READ8_MEMBER( abc800_keyboard_device::kb_p1_r )
437449{
438   static const char *const ABC800_KEY_ROW[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10", "X11" };
439450   UINT8 data = 0xff;
440451
441   if (m_stb && m_row < 12)
452   if (m_stb)
442453   {
443      data = ioport(ABC800_KEY_ROW[m_row])->read();
454      switch (m_row)
455      {
456      case 0: data = m_x0->read(); break;
457      case 1: data = m_x1->read(); break;
458      case 2: data = m_x2->read(); break;
459      case 3: data = m_x3->read(); break;
460      case 4: data = m_x4->read(); break;
461      case 5: data = m_x5->read(); break;
462      case 6: data = m_x6->read(); break;
463      case 7: data = m_x7->read(); break;
464      case 8: data = m_x8->read(); break;
465      case 9: data = m_x9->read(); break;
466      case 10: data = m_x10->read(); break;
467      case 11: data = m_x11->read(); break;
468      }
444469   }
445470
446471   return data;
trunk/src/mess/machine/abc800kb.h
r20434r20435
9393   inline void key_down(int state);
9494
9595   required_device<cpu_device> m_maincpu;
96   required_ioport m_x0;
97   required_ioport m_x1;
98   required_ioport m_x2;
99   required_ioport m_x3;
100   required_ioport m_x4;
101   required_ioport m_x5;
102   required_ioport m_x6;
103   required_ioport m_x7;
104   required_ioport m_x8;
105   required_ioport m_x9;
106   required_ioport m_x10;
107   required_ioport m_x11;
96108
97109   int m_row;
98110   int m_txd;
trunk/src/mess/includes/c64.h
r20434r20435
4949         m_user(*this, C64_USER_PORT_TAG),
5050         m_ram(*this, RAM_TAG),
5151         m_cassette(*this, PET_DATASSETTE_PORT_TAG),
52         m_special(*this, "SPECIAL"),
5253         m_loram(1),
5354         m_hiram(1),
5455         m_charen(1),
r20434r20435
7778   required_device<c64_user_port_device> m_user;
7879   required_device<ram_device> m_ram;
7980   optional_device<pet_datassette_port_device> m_cassette;
81   required_ioport m_special;
8082
8183   virtual void machine_start();
8284   virtual void machine_reset();
trunk/src/mess/includes/studio2.h
r20434r20435
2525      : driver_device(mconfig, type, tag),
2626         m_maincpu(*this, CDP1802_TAG),
2727         m_speaker(*this, BEEPER_TAG),
28         m_vdc(*this, CDP1861_TAG)
28         m_vdc(*this, CDP1861_TAG),
29         m_clear(*this, "CLEAR"),
30         m_a(*this, "A"),
31         m_b(*this, "B")
2932   { }
3033
3134   required_device<cosmac_device> m_maincpu;
3235   required_device<beep_device> m_speaker;
3336   optional_device<cdp1861_device> m_vdc;
37   required_ioport m_clear;
38   required_ioport m_a;
39   required_ioport m_b;
3440
3541   virtual void machine_start();
3642   virtual void machine_reset();
trunk/src/mess/includes/vip.h
r20434r20435
3131         m_byteio(*this, VIP_BYTEIO_PORT_TAG),
3232         m_exp(*this, VIP_EXPANSION_SLOT_TAG),
3333         m_ram(*this, RAM_TAG),
34         m_run(*this, "RUN"),
35         m_keypad(*this, "KEYPAD"),
3436         m_8000(1),
3537         m_vdc_int(CLEAR_LINE),
3638         m_vdc_dma_out(CLEAR_LINE),
r20434r20435
5254   required_device<vip_byteio_port_device> m_byteio;
5355   required_device<vip_expansion_slot_device> m_exp;
5456   required_device<ram_device> m_ram;
57   required_ioport m_run;
58   required_ioport m_keypad;
5559
5660   virtual void machine_start();
5761   virtual void machine_reset();
trunk/src/mess/includes/mpz80.h
r20434r20435
2828         m_terminal(*this, TERMINAL_TAG),
2929         m_s100(*this, S100_TAG),
3030         m_map_ram(*this, "map_ram"),
31         m_16c(*this, "16C"),
3132         m_nmi(1),
3233         m_pint(1),
3334         m_int_pend(0),
r20434r20435
4647   required_device<generic_terminal_device> m_terminal;
4748   required_device<s100_device> m_s100;
4849   optional_shared_ptr<UINT8> m_map_ram;
50   required_ioport m_16c;
4951
5052   virtual void machine_start();
5153   virtual void machine_reset();
trunk/src/mess/includes/mikromik.h
r20434r20435
4444         m_floppy1(*this, UPD765_TAG ":1:525qd"),
4545         m_ram(*this, RAM_TAG),
4646         m_video_ram(*this, "video_ram"),
47         m_y0(*this, "Y0"),
48         m_y1(*this, "Y1"),
49         m_y2(*this, "Y2"),
50         m_y3(*this, "Y3"),
51         m_y4(*this, "Y4"),
52         m_y5(*this, "Y5"),
53         m_y6(*this, "Y6"),
54         m_y7(*this, "Y7"),
55         m_y8(*this, "Y8"),
56         m_y9(*this, "Y9"),
57         m_special(*this, "SPECIAL"),
4758         m_a8(0),
4859         m_recall(0),
4960         m_dack3(1),
r20434r20435
6475   required_device<floppy_image_device> m_floppy1;
6576   required_device<ram_device> m_ram;
6677   required_shared_ptr<UINT8> m_video_ram;
78   required_ioport m_y0;
79   required_ioport m_y1;
80   required_ioport m_y2;
81   required_ioport m_y3;
82   required_ioport m_y4;
83   required_ioport m_y5;
84   required_ioport m_y6;
85   required_ioport m_y7;
86   required_ioport m_y8;
87   required_ioport m_y9;
88   required_ioport m_special;
6789
6890   virtual void machine_start();
6991   virtual void machine_reset();
trunk/src/mess/includes/cbm2.h
r20434r20435
7070         m_ram(*this, RAM_TAG),
7171         m_cassette(*this, PET_DATASSETTE_PORT_TAG),
7272         m_ieee(*this, IEEE488_TAG),
73         m_pa0(*this, "PA0"),
74         m_pa1(*this, "PA1"),
75         m_pa2(*this, "PA2"),
76         m_pa3(*this, "PA3"),
77         m_pa4(*this, "PA4"),
78         m_pa5(*this, "PA5"),
79         m_pa6(*this, "PA6"),
80         m_pa7(*this, "PA7"),
81         m_pb0(*this, "PB0"),
82         m_pb1(*this, "PB1"),
83         m_pb2(*this, "PB2"),
84         m_pb3(*this, "PB3"),
85         m_pb4(*this, "PB4"),
86         m_pb5(*this, "PB5"),
87         m_pb6(*this, "PB6"),
88         m_pb7(*this, "PB7"),
89         m_lock(*this, "LOCK"),
7390         m_ext_cpu(*this, EXT_I8088_TAG),
7491         m_ext_pic(*this, EXT_I8259A_TAG),
7592         m_ext_cia(*this, EXT_MOS6526_TAG),
r20434r20435
105122   required_device<ram_device> m_ram;
106123   required_device<pet_datassette_port_device> m_cassette;
107124   required_device<ieee488_device> m_ieee;
125   required_ioport m_pa0;
126   required_ioport m_pa1;
127   required_ioport m_pa2;
128   required_ioport m_pa3;
129   required_ioport m_pa4;
130   required_ioport m_pa5;
131   required_ioport m_pa6;
132   required_ioport m_pa7;
133   required_ioport m_pb0;
134   required_ioport m_pb1;
135   required_ioport m_pb2;
136   required_ioport m_pb3;
137   required_ioport m_pb4;
138   required_ioport m_pb5;
139   required_ioport m_pb6;
140   required_ioport m_pb7;
141   required_ioport m_lock;
108142
109143   optional_device<cpu_device> m_ext_cpu;
110144   optional_device<pic8259_device> m_ext_pic;
trunk/src/mess/includes/sage2.h
r20434r20435
3434         m_usart1(*this, I8251_1_TAG),
3535         m_fdc(*this, UPD765_TAG),
3636         m_ram(*this, RAM_TAG),
37         m_floppy0(*this, UPD765_TAG ":0:525dd"),
38         m_floppy1(*this, UPD765_TAG ":1:525dd"),
37         m_floppy0(*this, UPD765_TAG ":0"),
38         m_floppy1(*this, UPD765_TAG ":1"),
39         m_floppy(NULL),
3940         m_centronics(*this, CENTRONICS_TAG),
4041         m_ieee488(*this, IEEE488_TAG),
4142         m_terminal(*this, TERMINAL_TAG),
4243         m_reset(1),
4344         m_fdc_int(0),
44         m_fdie(0),
45         m_sl0(1),
46         m_sl1(1)
45         m_fdie(0)
4746   { }
4847
4948   required_device<cpu_device> m_maincpu;
r20434r20435
5251   required_device<i8251_device> m_usart1;
5352   required_device<upd765a_device> m_fdc;
5453   required_device<ram_device> m_ram;
55   required_device<floppy_image_device> m_floppy0;
56   required_device<floppy_image_device> m_floppy1;
54   required_device<floppy_connector> m_floppy0;
55   required_device<floppy_connector> m_floppy1;
56   floppy_image_device *m_floppy;
5757   required_device<centronics_device> m_centronics;
5858   required_device<ieee488_device> m_ieee488;
5959   required_device<generic_terminal_device> m_terminal;
r20434r20435
6363
6464   void update_fdc_int();
6565
66   DECLARE_READ8_MEMBER( mmu_r );
67   DECLARE_WRITE8_MEMBER( mmu_w );
66   DECLARE_READ8_MEMBER( read );
67   DECLARE_WRITE8_MEMBER( write );
6868   DECLARE_WRITE_LINE_MEMBER( br1_w );
6969   DECLARE_WRITE_LINE_MEMBER( br2_w );
7070   DECLARE_WRITE8_MEMBER( ppi0_pc_w );
r20434r20435
7878
7979   void fdc_irq(bool state);
8080
81   const UINT8 *m_rom;
8182   int m_reset;
8283
8384   // floppy state
8485   int m_fdc_int;
8586   int m_fdie;
86   int m_sl0;
87   int m_sl1;
8887   DECLARE_DRIVER_INIT(sage2);
8988};
trunk/src/mess/includes/comx35.h
r20434r20435
4848         m_cassette(*this, CASSETTE_TAG),
4949         m_ram(*this, RAM_TAG),
5050         m_exp(*this, EXPANSION_TAG),
51         m_modifiers(*this, "MODIFIERS"),
5152         m_char_ram(*this, "char_ram")
5253   { }
5354
r20434r20435
5758   required_device<cassette_image_device> m_cassette;
5859   required_device<ram_device> m_ram;
5960   required_device<comx_expansion_slot_device> m_exp;
61   required_ioport m_modifiers;
6062   optional_shared_ptr<UINT8> m_char_ram;
6163
6264   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
trunk/src/mess/includes/bw12.h
r20434r20435
4747         m_floppy0(*this, UPD765_TAG ":1:525dd"),
4848         m_floppy1(*this, UPD765_TAG ":2:525dd"),
4949         m_floppy_timer(*this, FLOPPY_TIMER_TAG),
50         m_modifiers(*this, "MODIFIERS"),
5051         m_video_ram(*this, "video_ram")
5152   { }
5253
r20434r20435
6162   required_device<floppy_image_device> m_floppy0;
6263   required_device<floppy_image_device> m_floppy1;
6364   required_device<timer_device> m_floppy_timer;
65   required_ioport m_modifiers;
6466
6567   virtual void machine_start();
6668   virtual void machine_reset();
trunk/src/mess/includes/bw2.h
r20434r20435
4242         m_floppy0(*this, WD2797_TAG":0"),
4343         m_floppy1(*this, WD2797_TAG":1"),
4444         m_floppy(NULL),
45         m_y0(*this, "Y0"),
46         m_y1(*this, "Y1"),
47         m_y2(*this, "Y2"),
48         m_y3(*this, "Y3"),
49         m_y4(*this, "Y4"),
50         m_y5(*this, "Y5"),
51         m_y6(*this, "Y6"),
52         m_y7(*this, "Y7"),
53         m_y8(*this, "Y8"),
54         m_y9(*this, "Y9"),
4555         m_video_ram(*this, "videoram")
4656   { }
4757
r20434r20435
5565   required_device<floppy_connector> m_floppy0;
5666   required_device<floppy_connector> m_floppy1;
5767   floppy_image_device *m_floppy;
68   required_ioport m_y0;
69   required_ioport m_y1;
70   required_ioport m_y2;
71   required_ioport m_y3;
72   required_ioport m_y4;
73   required_ioport m_y5;
74   required_ioport m_y6;
75   required_ioport m_y7;
76   required_ioport m_y8;
77   required_ioport m_y9;
5878
5979   virtual void machine_start();
6080
trunk/src/mess/includes/beta.h
r20434r20435
2323   beta_state(const machine_config &mconfig, device_type type, const char *tag)
2424      : driver_device(mconfig, type, tag),
2525         m_maincpu(*this, M6502_TAG),
26         m_speaker(*this, SPEAKER_TAG)
26         m_speaker(*this, SPEAKER_TAG),
27         m_q6(*this, "Q6"),
28         m_q7(*this, "Q7"),
29         m_q8(*this, "Q8"),
30         m_q9(*this, "Q9")
2731   { }
2832
2933   required_device<cpu_device> m_maincpu;
3034   required_device<speaker_sound_device> m_speaker;
35   required_ioport m_q6;
36   required_ioport m_q7;
37   required_ioport m_q8;
38   required_ioport m_q9;
3139
3240   virtual void machine_start();
3341
r20434r20435
3846   DECLARE_INPUT_CHANGED_MEMBER( trigger_reset );
3947
4048   /* EPROM state */
49   UINT8 *m_eprom;
4150   int m_eprom_oe;
4251   int m_eprom_ce;
4352   UINT16 m_eprom_addr;
trunk/src/mess/includes/c128.h
r20434r20435
5858         m_user(*this, C64_USER_PORT_TAG),
5959         m_ram(*this, RAM_TAG),
6060         m_cassette(*this, PET_DATASSETTE_PORT_TAG),
61         m_special(*this, "SPECIAL"),
62         m_k0(*this, "K0"),
63         m_k1(*this, "K1"),
64         m_k2(*this, "K2"),
6165         m_z80en(0),
6266         m_loram(1),
6367         m_hiram(1),
r20434r20435
104108   required_device<c64_user_port_device> m_user;
105109   required_device<ram_device> m_ram;
106110   required_device<pet_datassette_port_device> m_cassette;
111   required_ioport m_special;
112   required_ioport m_k0;
113   required_ioport m_k1;
114   required_ioport m_k2;
107115
108116   virtual void machine_start();
109117   virtual void machine_reset();
trunk/src/mess/includes/c80.h
r20434r20435
2121      : driver_device(mconfig, type, tag),
2222         m_maincpu(*this, Z80_TAG),
2323         m_pio1(*this, Z80PIO1_TAG),
24         m_cassette(*this, CASSETTE_TAG)
24         m_cassette(*this, CASSETTE_TAG),
25         m_row0(*this, "ROW0"),
26         m_row1(*this, "ROW1"),
27         m_row2(*this, "ROW2")
2528   { }
2629
2730   required_device<cpu_device> m_maincpu;
2831   required_device<z80pio_device> m_pio1;
2932   required_device<cassette_image_device> m_cassette;
33   required_ioport m_row0;
34   required_ioport m_row1;
35   required_ioport m_row2;
3036
3137   virtual void machine_start();
3238
trunk/src/mess/includes/atom.h
r20434r20435
4747         m_vdg(*this, MC6847_TAG),
4848         m_cassette(*this, CASSETTE_TAG),
4949         m_centronics(*this, CENTRONICS_TAG),
50         m_speaker(*this, SPEAKER_TAG)
51   ,
52      m_video_ram(*this, "video_ram"){ }
50         m_speaker(*this, SPEAKER_TAG),
51         m_y0(*this, "Y0"),
52         m_y1(*this, "Y1"),
53         m_y2(*this, "Y2"),
54         m_y3(*this, "Y3"),
55         m_y4(*this, "Y4"),
56         m_y5(*this, "Y5"),
57         m_y6(*this, "Y6"),
58         m_y7(*this, "Y7"),
59         m_y8(*this, "Y8"),
60         m_y9(*this, "Y9"),
61         m_y10(*this, "Y10"),
62         m_rpt(*this, "RPT"),
63         m_video_ram(*this, "video_ram")
64   { }
5365
5466   required_device<cpu_device> m_maincpu;
5567   required_device<mc6847_base_device> m_vdg;
5668   required_device<cassette_image_device> m_cassette;
5769   required_device<centronics_device> m_centronics;
5870   required_device<speaker_sound_device> m_speaker;
71   required_ioport m_y0;
72   required_ioport m_y1;
73   required_ioport m_y2;
74   required_ioport m_y3;
75   required_ioport m_y4;
76   required_ioport m_y5;
77   required_ioport m_y6;
78   required_ioport m_y7;
79   required_ioport m_y8;
80   required_ioport m_y9;
81   required_ioport m_y10;
82   required_ioport m_rpt;
5983
6084   virtual void machine_start();
6185   UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
trunk/src/mess/drivers/mikromik.c
r20434r20435
263263
264264void mm1_state::scan_keyboard()
265265{
266   static const char *const keynames[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8", "ROW9" };
266   UINT8 data = 0xff;
267267
268   UINT8 data = ioport(keynames[m_drive])->read();
269   UINT8 special = ioport("SPECIAL")->read();
268   switch (m_drive)
269   {
270   case 0: data = m_y0->read(); break;
271   case 1: data = m_y1->read(); break;
272   case 2: data = m_y2->read(); break;
273   case 3: data = m_y3->read(); break;
274   case 4: data = m_y4->read(); break;
275   case 5: data = m_y5->read(); break;
276   case 6: data = m_y6->read(); break;
277   case 7: data = m_y7->read(); break;
278   case 8: data = m_y8->read(); break;
279   case 9: data = m_y9->read(); break;
280   }
281
282   UINT8 special = m_special->read();
270283   int ctrl = BIT(special, 0);
271284   int shift = BIT(special, 2) & BIT(special, 1);
272285   UINT8 keydata = 0xff;
r20434r20435
344357//-------------------------------------------------
345358
346359static INPUT_PORTS_START( mm1 )
347   PORT_START("ROW0")
360   PORT_START("Y0")
348361   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
349362   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"')
350363   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
r20434r20435
354367   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
355368   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
356369
357   PORT_START("ROW1")
370   PORT_START("Y1")
358371   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
359372   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
360373   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
r20434r20435
364377   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
365378   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
366379
367   PORT_START("ROW2")
380   PORT_START("Y2")
368381   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
369382   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
370383   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
r20434r20435
374387   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
375388   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
376389
377   PORT_START("ROW3")
390   PORT_START("Y3")
378391   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/')
379392   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(')
380393   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
r20434r20435
384397   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
385398   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
386399
387   PORT_START("ROW4")
400   PORT_START("Y4")
388401   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
389402   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&')
390403   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
r20434r20435
394407   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
395408   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
396409
397   PORT_START("ROW5")
410   PORT_START("Y5")
398411   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('+') PORT_CHAR('?')
399412   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC2\xB4 '") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(0x00B4) PORT_CHAR('`')
400413   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x86\x96")
r20434r20435
404417   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_')
405418   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(a_RING " " A_RING) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0x00E5) PORT_CHAR(0x00C5)
406419
407   PORT_START("ROW6")
420   PORT_START("Y6")
408421   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('<') PORT_CHAR('>')
409422   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad .") PORT_CODE(KEYCODE_DEL_PAD)
410423   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
r20434r20435
414427   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LF")
415428   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('@') PORT_CHAR('*')
416429
417   PORT_START("ROW7")
430   PORT_START("Y7")
418431   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD)
419432   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD)
420433   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT))
r20434r20435
424437   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD)
425438   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD)
426439
427   PORT_START("ROW8")
440   PORT_START("Y8")
428441   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK)
429442   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD)
430443   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP))
r20434r20435
434447   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD)
435448   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD)
436449
437   PORT_START("ROW9")
450   PORT_START("Y9")
438451   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')')
439452   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=')
440453   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
trunk/src/mess/drivers/cbm2.c
r20434r20435
13761376{
13771377   UINT8 data = 0xff;
13781378
1379   if (!BIT(m_tpi2_pa, 0)) data &= ioport("PA0")->read();
1380   if (!BIT(m_tpi2_pa, 1)) data &= ioport("PA1")->read();
1381   if (!BIT(m_tpi2_pa, 2)) data &= ioport("PA2")->read();
1382   if (!BIT(m_tpi2_pa, 3)) data &= ioport("PA3")->read();
1383   if (!BIT(m_tpi2_pa, 4)) data &= ioport("PA4")->read();
1384   if (!BIT(m_tpi2_pa, 5)) data &= ioport("PA5")->read();
1385   if (!BIT(m_tpi2_pa, 6)) data &= ioport("PA6")->read();
1386   if (!BIT(m_tpi2_pa, 7)) data &= ioport("PA7")->read();
1387   if (!BIT(m_tpi2_pb, 0)) data &= ioport("PB0")->read() & ioport("LOCK")->read();
1388   if (!BIT(m_tpi2_pb, 1)) data &= ioport("PB1")->read();
1389   if (!BIT(m_tpi2_pb, 2)) data &= ioport("PB2")->read();
1390   if (!BIT(m_tpi2_pb, 3)) data &= ioport("PB3")->read();
1391   if (!BIT(m_tpi2_pb, 4)) data &= ioport("PB4")->read();
1392   if (!BIT(m_tpi2_pb, 5)) data &= ioport("PB5")->read();
1393   if (!BIT(m_tpi2_pb, 6)) data &= ioport("PB6")->read();
1394   if (!BIT(m_tpi2_pb, 7)) data &= ioport("PB7")->read();
1379   if (!BIT(m_tpi2_pa, 0)) data &= m_pa0->read();
1380   if (!BIT(m_tpi2_pa, 1)) data &= m_pa1->read();
1381   if (!BIT(m_tpi2_pa, 2)) data &= m_pa2->read();
1382   if (!BIT(m_tpi2_pa, 3)) data &= m_pa3->read();
1383   if (!BIT(m_tpi2_pa, 4)) data &= m_pa4->read();
1384   if (!BIT(m_tpi2_pa, 5)) data &= m_pa5->read();
1385   if (!BIT(m_tpi2_pa, 6)) data &= m_pa6->read();
1386   if (!BIT(m_tpi2_pa, 7)) data &= m_pa7->read();
1387   if (!BIT(m_tpi2_pb, 0)) data &= m_pb0->read() & m_lock->read();
1388   if (!BIT(m_tpi2_pb, 1)) data &= m_pb1->read();
1389   if (!BIT(m_tpi2_pb, 2)) data &= m_pb2->read();
1390   if (!BIT(m_tpi2_pb, 3)) data &= m_pb3->read();
1391   if (!BIT(m_tpi2_pb, 4)) data &= m_pb4->read();
1392   if (!BIT(m_tpi2_pb, 5)) data &= m_pb5->read();
1393   if (!BIT(m_tpi2_pb, 6)) data &= m_pb6->read();
1394   if (!BIT(m_tpi2_pb, 7)) data &= m_pb7->read();
13951395
13961396   return data;
13971397}
trunk/src/mess/drivers/bw2.c
r20434r20435
433433
434434   */
435435
436   static const char *const rownames[] = { "Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7", "Y8", "Y9" };
437
438436   UINT8 data = 0xff;
439437
440   if (m_kb <= 9)
438   switch (m_kb)
441439   {
442      data = ioport(rownames[m_kb])->read();
440   case 0: data = m_y0->read(); break;
441   case 1: data = m_y1->read(); break;
442   case 2: data = m_y2->read(); break;
443   case 3: data = m_y3->read(); break;
444   case 4: data = m_y4->read(); break;
445   case 5: data = m_y5->read(); break;
446   case 6: data = m_y6->read(); break;
447   case 7: data = m_y7->read(); break;
448   case 8: data = m_y8->read(); break;
449   case 9: data = m_y9->read(); break;
443450   }
444451
445452   return data;
trunk/src/mess/drivers/c80.c
r20434r20435
22
33    C-80
44
5    12/05/2009 Skeleton driver.
6
75    Pasting:
86        0-F : as is
97        + (inc) : ^
r20434r20435
109107   {
110108      if (!BIT(m_keylatch, i))
111109      {
112         if (!BIT(ioport("ROW0")->read(), i)) data &= ~0x01;
113         if (!BIT(ioport("ROW1")->read(), i)) data &= ~0x02;
114         if (!BIT(ioport("ROW2")->read(), i)) data &= ~0x04;
110         if (!BIT(m_row0->read(), i)) data &= ~0x01;
111         if (!BIT(m_row1->read(), i)) data &= ~0x02;
112         if (!BIT(m_row2->read(), i)) data &= ~0x04;
115113      }
116114   }
117115
trunk/src/mess/drivers/sage2.c
r20434r20435
3838//**************************************************************************
3939
4040//-------------------------------------------------
41//  mmu_r -
41//  read -
4242//-------------------------------------------------
4343
44READ8_MEMBER( sage2_state::mmu_r )
44READ8_MEMBER( sage2_state::read )
4545{
4646   UINT8 data = 0xff;
4747
4848   if (m_reset || (offset >= 0xfe0000))
4949   {
50      data = memregion(M68000_TAG)->base()[offset & 0x1fff];
50      data = m_rom[offset & 0x1fff];
5151   }
5252   else if (offset < 0x080000)
5353   {
r20434r20435
5959
6060
6161//-------------------------------------------------
62//  mmu_w -
62//  write -
6363//-------------------------------------------------
6464
65WRITE8_MEMBER( sage2_state::mmu_w )
65WRITE8_MEMBER( sage2_state::write )
6666{
6767   if (offset < 0x080000)
6868   {
r20434r20435
8282
8383static ADDRESS_MAP_START( sage2_mem, AS_PROGRAM, 16, sage2_state )
8484   ADDRESS_MAP_UNMAP_HIGH
85   AM_RANGE(0x000000, 0xfeffff) AM_READWRITE8(mmu_r, mmu_w, 0xffff)
85   AM_RANGE(0x000000, 0xfeffff) AM_READWRITE8(read, write, 0xffff)
8686   AM_RANGE(0xffc000, 0xffc007) AM_DEVREADWRITE8_LEGACY(I8253_1_TAG, pit8253_r, pit8253_w, 0x00ff)
87//  AM_RANGE(0xffc010, 0xffc01f) AM_DEVREADWRITE8(TMS9914_TAG, tms9914_device, read, write, 0x00ff)
87   AM_RANGE(0xffc010, 0xffc01f) AM_NOP //AM_DEVREADWRITE8(TMS9914_TAG, tms9914_device, read, write, 0x00ff)
8888   AM_RANGE(0xffc020, 0xffc027) AM_DEVREADWRITE8(I8255A_0_TAG, i8255_device, read, write, 0x00ff) // i8255, DIPs + Floppy ctrl port
8989   AM_RANGE(0xffc030, 0xffc031) AM_DEVREADWRITE8(I8251_1_TAG, i8251_device, data_r, data_w, 0x00ff)
9090   AM_RANGE(0xffc032, 0xffc033) AM_DEVREADWRITE8(I8251_1_TAG, i8251_device, status_r, control_w, 0x00ff)
r20434r20435
246246   update_fdc_int();
247247
248248   // drive select
249   m_sl0 = BIT(data, 3);
250   m_sl1 = BIT(data, 4);
249   m_floppy = NULL;
251250
252   if(m_sl0)
253      m_fdc->set_floppy(m_floppy0);
254   else if(m_sl1)
255      m_fdc->set_floppy(m_floppy1);
256   else
257      m_fdc->set_floppy(NULL);
251   if (BIT(data, 3)) m_floppy = m_floppy0->get_device();
252   if (BIT(data, 4)) m_floppy = m_floppy1->get_device();
258253
254   m_fdc->set_floppy(m_floppy);
255
259256   // floppy motor
260   m_floppy0->mon_w(BIT(data, 5));
261   m_floppy1->mon_w(BIT(data, 5));
262
257   if (m_floppy) m_floppy->mon_w(BIT(data, 5));
258   
263259   // FDC reset
264   if(BIT(data, 7))
265      m_fdc->reset();
260   if(BIT(data, 7)) m_fdc->reset();
266261}
267262
268263static I8255A_INTERFACE( ppi0_intf )
r20434r20435
303298   data = m_fdc->get_irq();
304299
305300   // floppy write protected
306   if (!m_sl0) data |= m_floppy0->wpt_r() << 1;
307   if (!m_sl1) data |= m_floppy1->wpt_r() << 1;
301   data = (m_floppy ? m_floppy->wpt_r() : 1) << 1;
308302
309303   // RS-232 ring indicator
310304
r20434r20435
477471//-------------------------------------------------
478472
479473static SLOT_INTERFACE_START( sage2_floppies )
480      SLOT_INTERFACE( "525dd", FLOPPY_525_DD )
474   SLOT_INTERFACE( "525qd", FLOPPY_525_QD ) // Mitsubishi M4859
481475SLOT_INTERFACE_END
482476
483477void sage2_state::update_fdc_int()
484478{
485   m_maincpu->set_input_line(M68K_IRQ_6, m_fdie & m_fdc_int);
479   m_maincpu->set_input_line(M68K_IRQ_6, m_fdie && m_fdc_int);
486480}
487481
488482void sage2_state::fdc_irq(bool state)
r20434r20435
491485   update_fdc_int();
492486}
493487
494void sage2_state::machine_start()
495{
496   m_fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(sage2_state::fdc_irq), this));
497}
498488
499489//-------------------------------------------------
500490//  centronics_interface centronics_intf
r20434r20435
554544//**************************************************************************
555545
556546//-------------------------------------------------
547//  MACHINE_START( sage2 )
548//-------------------------------------------------
549
550void sage2_state::machine_start()
551{
552   // find memory regions
553   m_rom = memregion(M68000_TAG)->base();
554
555   // setup floppy callbacks
556   m_fdc->setup_intrq_cb(upd765a_device::line_cb(FUNC(sage2_state::fdc_irq), this));
557}
558
559
560//-------------------------------------------------
557561//  MACHINE_RESET( sage2 )
558562//-------------------------------------------------
559563
r20434r20435
590594   MCFG_I8251_ADD(I8251_1_TAG, usart1_intf)
591595   MCFG_UPD765A_ADD(UPD765_TAG, false, false)
592596   MCFG_CENTRONICS_PRINTER_ADD(CENTRONICS_TAG, centronics_intf)
593   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", sage2_floppies, "525dd", 0, floppy_image_device::default_floppy_formats)
594   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", sage2_floppies, "525dd", 0, floppy_image_device::default_floppy_formats)
597   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":0", sage2_floppies, "525qd", 0, floppy_image_device::default_floppy_formats)
598   MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":1", sage2_floppies, "525qd", 0, floppy_image_device::default_floppy_formats)
595599   MCFG_IEEE488_BUS_ADD(ieee488_intf)
596600
597601   // internal ram
trunk/src/mess/drivers/c64.c
r20434r20435
4747
4848void c64_state::check_interrupts()
4949{
50   int restore = BIT(ioport("SPECIAL")->read(), 7);
50   int restore = BIT(m_special->read(), 7);
5151
5252   int irq = m_cia1_irq || m_vic_irq || m_exp_irq;
5353   int nmi = m_cia2_irq || restore || m_exp_nmi;
trunk/src/mess/drivers/vip.c
r20434r20435
447447
448448READ_LINE_MEMBER( vip_state::clear_r )
449449{
450   return BIT(ioport("RUN")->read(), 0);
450   return BIT(m_run->read(), 0);
451451}
452452
453453READ_LINE_MEMBER( vip_state::ef1_r )
r20434r20435
464464
465465READ_LINE_MEMBER( vip_state::ef3_r )
466466{
467   return !BIT(ioport("KEYPAD")->read(), m_keylatch) || m_byteio_ef3 || m_exp_ef3;
467   return !BIT(m_keypad->read(), m_keylatch) || m_byteio_ef3 || m_exp_ef3;
468468}
469469
470470READ_LINE_MEMBER( vip_state::ef4_r )
trunk/src/mess/drivers/mpz80.c
r20434r20435
468468   data |= m_int_pend << 1;
469469
470470   // boot address
471   data |= ioport("16C")->read() & 0xfc;
471   data |= m_16c->read() & 0xfc;
472472
473473   return data;
474474}
trunk/src/mess/drivers/c128.c
r20434r20435
3939
4040inline void c128_state::check_interrupts()
4141{
42   int restore = BIT(ioport("SPECIAL")->read(), 7);
42   int restore = BIT(m_special->read(), 7);
4343
4444   int irq = m_cia1_irq || m_vic_irq || m_exp_irq;
4545   int nmi = m_cia2_irq || restore || m_exp_nmi;
r20434r20435
767767
768768READ_LINE_MEMBER( c128_state::mmu_sense40_r )
769769{
770   return BIT(ioport("SPECIAL")->read(), 4);
770   return BIT(m_special->read(), 4);
771771}
772772
773773static MOS8722_INTERFACE( mmu_intf )
r20434r20435
933933
934934   data &= cbm_common_cia0_port_b_r(m_cia1, cia0porta);
935935
936   if (!BIT(m_vic_k, 0)) data &= ~ioport("K0")->read();
937   if (!BIT(m_vic_k, 1)) data &= ~ioport("K1")->read();
938   if (!BIT(m_vic_k, 2)) data &= ~ioport("K2")->read();
936   if (!BIT(m_vic_k, 0)) data &= ~m_k0->read();
937   if (!BIT(m_vic_k, 1)) data &= ~m_k1->read();
938   if (!BIT(m_vic_k, 2)) data &= ~m_k2->read();
939939
940940   return data;
941941}
trunk/src/mess/drivers/bw12.c
r20434r20435
515515
516516READ_LINE_MEMBER( bw12_state::ay3600_shift_r )
517517{
518   return BIT(ioport("MODIFIERS")->read(), 0);
518   return BIT(m_modifiers->read(), 0);
519519}
520520
521521READ_LINE_MEMBER( bw12_state::ay3600_control_r )
522522{
523   return BIT(ioport("MODIFIERS")->read(), 1);
523   return BIT(m_modifiers->read(), 1);
524524}
525525
526526WRITE_LINE_MEMBER( bw12_state::ay3600_data_ready_w )
trunk/src/mess/drivers/beta.c
r20434r20435
113113
114114   switch (m_ls145_p)
115115   {
116   case 6: data &= ioport("Q6")->read(); break;
117   case 7: data &= ioport("Q7")->read(); break;
118   case 8: data &= ioport("Q8")->read(); break;
119   case 9: data &= ioport("Q9")->read(); break;
116   case 6: data &= m_q6->read(); break;
117   case 7: data &= m_q7->read(); break;
118   case 8: data &= m_q8->read(); break;
119   case 9: data &= m_q9->read(); break;
120120   default:
121121      if (!m_eprom_oe && !m_eprom_ce)
122122      {
123         data = memregion(EPROM_TAG)->base()[m_eprom_addr & 0x7ff];
123         data = m_eprom[m_eprom_addr & 0x7ff];
124124         popmessage("EPROM read %04x = %02x\n", m_eprom_addr & 0x7ff, data);
125125      }
126126   }
r20434r20435
207207   if (BIT(data, 6) && (!BIT(m_old_data, 7) && BIT(data, 7)))
208208   {
209209      popmessage("EPROM write %04x = %02x\n", m_eprom_addr & 0x7ff, m_eprom_data);
210      memregion(EPROM_TAG)->base()[m_eprom_addr & 0x7ff] &= m_eprom_data;
210      m_eprom[m_eprom_addr & 0x7ff] &= m_eprom_data;
211211   }
212212
213213   m_old_data = data;
r20434r20435
237237{
238238   m_led_refresh_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(beta_state::led_refresh),this));
239239
240   /* register for state saving */
240   // find memory regions
241   m_eprom = memregion(EPROM_TAG)->base();
242
243   // state saving
241244   save_item(NAME(m_eprom_oe));
242245   save_item(NAME(m_eprom_ce));
243246   save_item(NAME(m_eprom_addr));
trunk/src/mess/drivers/bullet.c
r20434r20435
327327   UINT8 data = 0;
328328
329329   // DIP switches
330   data |= ioport("SW1")->read() & 0x0f;
330   data |= m_sw1->read() & 0x0f;
331331
332332   // floppy
333333   data |= m_fdc->hld_r() << 4;
r20434r20435
579579   data |= m_centronics->busy_r();
580580
581581   // DIP switches
582   data |= ioport("SW1")->read() & 0x06;
582   data |= m_sw1->read() & 0x06;
583583
584584   // floppy
585585   data |= (m_floppy ? m_floppy->twosid_r() : 1) << 3;
trunk/src/mess/drivers/atom.c
r20434r20435
218218-------------------------------------------------*/
219219
220220static INPUT_PORTS_START( atom )
221   PORT_START("KEY0")
221   PORT_START("Y0")
222222   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
223223   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_3)          PORT_CHAR('3') PORT_CHAR('#')
224224   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_MINUS)      PORT_CHAR('-') PORT_CHAR('=')
r20434r20435
228228   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
229229   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
230230
231   PORT_START("KEY1")
231   PORT_START("Y1")
232232   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
233233   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_2)          PORT_CHAR('2') PORT_CHAR('\"')
234234   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_COMMA)      PORT_CHAR(',') PORT_CHAR('<')
r20434r20435
238238   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
239239   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
240240
241   PORT_START("KEY2")
241   PORT_START("Y2")
242242   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x87\x95") PORT_CODE(KEYCODE_UP)         PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHAR(UCHAR_MAMEKEY(DOWN))
243243   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_1)          PORT_CHAR('1') PORT_CHAR('!')
244244   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_COLON)      PORT_CHAR(';') PORT_CHAR('+')
r20434r20435
248248   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
249249   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
250250
251   PORT_START("KEY3")
251   PORT_START("Y3")
252252   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xE2\x87\x94") PORT_CODE(KEYCODE_RIGHT)      PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHAR(UCHAR_MAMEKEY(LEFT))
253253   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_0)          PORT_CHAR('0')
254254   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_EQUALS)     PORT_CHAR(':') PORT_CHAR('*')
r20434r20435
258258   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
259259   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
260260
261   PORT_START("KEY4")
261   PORT_START("Y4")
262262   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("LOCK")         PORT_CODE(KEYCODE_CAPSLOCK)   PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_TOGGLE
263263   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("DELETE")       PORT_CODE(KEYCODE_DEL)        PORT_CHAR(8)
264264   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_9)          PORT_CHAR('9') PORT_CHAR(')')
r20434r20435
268268   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
269269   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
270270
271   PORT_START("KEY5")
271   PORT_START("Y5")
272272   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_BACKSPACE)  PORT_CHAR('^')
273273   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("COPY")         PORT_CODE(KEYCODE_TAB)        PORT_CHAR(UCHAR_MAMEKEY(TAB))
274274   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_8)          PORT_CHAR('8') PORT_CHAR('(')
r20434r20435
278278   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
279279   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
280280
281   PORT_START("KEY6")
281   PORT_START("Y6")
282282   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_BACKSLASH)  PORT_CHAR(']')
283283   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RETURN")       PORT_CODE(KEYCODE_ENTER)      PORT_CHAR(13)
284284   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_7)          PORT_CHAR('7') PORT_CHAR('\'')
r20434r20435
288288   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
289289   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
290290
291   PORT_START("KEY7")
291   PORT_START("Y7")
292292   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('\\')
293293   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
294294   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_6)          PORT_CHAR('6') PORT_CHAR('&')
r20434r20435
298298   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
299299   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
300300
301   PORT_START("KEY8")
301   PORT_START("Y8")
302302   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_QUOTE)      PORT_CHAR('[')
303303   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
304304   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_5)          PORT_CHAR('5') PORT_CHAR('%')
r20434r20435
308308   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
309309   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
310310
311   PORT_START("KEY9")
311   PORT_START("Y9")
312312   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SPACE")        PORT_CODE(KEYCODE_SPACE)      PORT_CHAR(32)
313313   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
314314   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD )                           PORT_CODE(KEYCODE_4)          PORT_CHAR('4') PORT_CHAR('$')
r20434r20435
318318   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
319319   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
320320
321   PORT_START("KEY10")
321   PORT_START("Y10")
322322   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
323323   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
324324   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
r20434r20435
394394
395395   switch (m_keylatch)
396396   {
397   case 0: data &= ioport("KEY0")->read(); break;
398   case 1: data &= ioport("KEY1")->read(); break;
399   case 2: data &= ioport("KEY2")->read(); break;
400   case 3: data &= ioport("KEY3")->read(); break;
401   case 4: data &= ioport("KEY4")->read(); break;
402   case 5: data &= ioport("KEY5")->read(); break;
403   case 6: data &= ioport("KEY6")->read(); break;
404   case 7: data &= ioport("KEY7")->read(); break;
405   case 8: data &= ioport("KEY8")->read(); break;
406   case 9: data &= ioport("KEY9")->read(); break;
397   case 0: data &= m_y0->read(); break;
398   case 1: data &= m_y1->read(); break;
399   case 2: data &= m_y2->read(); break;
400   case 3: data &= m_y3->read(); break;
401   case 4: data &= m_y4->read(); break;
402   case 5: data &= m_y5->read(); break;
403   case 6: data &= m_y6->read(); break;
404   case 7: data &= m_y7->read(); break;
405   case 8: data &= m_y8->read(); break;
406   case 9: data &= m_y9->read(); break;
407407   }
408408
409   data &= ioport("KEY10")->read();
409   data &= m_y10->read();
410410
411411   return data;
412412}
r20434r20435
437437   data |= (m_cassette->input() > 0.0) << 5;
438438
439439   /* keyboard RPT */
440   data |= BIT(ioport("RPT")->read(), 0) << 6;
440   data |= BIT(m_rpt->read(), 0) << 6;
441441
442442   /* MC6847 FS */
443443   data |= (m_vdg->fs_r() ? 1 : 0) << 7;
trunk/src/mess/drivers/comx35.c
r20434r20435
357357
358358READ_LINE_MEMBER( comx35_state::shift_r )
359359{
360   return BIT(ioport("MODIFIERS")->read(), 0);
360   return BIT(m_modifiers->read(), 0);
361361}
362362
363363READ_LINE_MEMBER( comx35_state::control_r )
364364{
365   return BIT(ioport("MODIFIERS")->read(), 1);
365   return BIT(m_modifiers->read(), 1);
366366}
367367
368368static CDP1871_INTERFACE( kbc_intf )
trunk/src/mess/drivers/studio2.c
r20434r20435
355355
356356READ_LINE_MEMBER( studio2_state::clear_r )
357357{
358   return BIT(ioport("CLEAR")->read(), 0);
358   return BIT(m_clear->read(), 0);
359359}
360360
361361READ_LINE_MEMBER( studio2_state::ef3_r )
362362{
363   return BIT(ioport("A")->read(), m_keylatch);
363   return BIT(m_a->read(), m_keylatch);
364364}
365365
366366READ_LINE_MEMBER( studio2_state::ef4_r )
367367{
368   return BIT(ioport("B")->read(), m_keylatch);
368   return BIT(m_b->read(), m_keylatch);
369369}
370370
371371WRITE_LINE_MEMBER( studio2_state::q_w )

Previous 199869 Revisions Next


© 1997-2024 The MAME Team