Previous 199869 Revisions Next

r40568 Tuesday 1st September, 2015 at 06:26:12 UTC by Sergey Svishchev
pc_kbd/iskr1030: WIP snapshot
[src/emu/bus/pc_kbd]iskr1030.c iskr1030.h

trunk/src/emu/bus/pc_kbd/iskr1030.c
r249079r249080
4242
4343ROM_START( iskr_1030_keyboard )
4444   ROM_REGION( 0x800, I8048_TAG, 0 )
45   // XXX add P/N etc
4645   ROM_LOAD( "i1030.bin", 0x000, 0x800, CRC(7cac9c4b) SHA1(03959d3350e012ebfe61cee9c062b6c1fdd8766e) )
4746ROM_END
4847
r249079r249080
6261//-------------------------------------------------
6362
6463static ADDRESS_MAP_START( iskr_1030_keyboard_io, AS_IO, 8, iskr_1030_keyboard_device )
65   AM_RANGE(0x00, 0xFF) AM_RAM
64   AM_RANGE(0x00, 0xFF) AM_READWRITE(ram_r, ram_w)
6665   AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(p1_r, p1_w)
6766   AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(p2_w)
68//  AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(t0_r)
6967   AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(t1_r)
7068ADDRESS_MAP_END
7169
r249079r249080
7573//-------------------------------------------------
7674
7775static MACHINE_CONFIG_FRAGMENT( iskr_1030_keyboard )
78   // XXX check
79   MCFG_CPU_ADD(I8048_TAG, I8048, MCS48_LC_CLOCK(IND_U(47), CAP_P(20.7)))
76   MCFG_CPU_ADD(I8048_TAG, I8048, XTAL_5MHz)
8077   MCFG_CPU_IO_MAP(iskr_1030_keyboard_io)
8178MACHINE_CONFIG_END
8279
r249079r249080
9895
9996INPUT_PORTS_START( iskr_1030_keyboard )
10097   PORT_START("MD00")
101   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
102   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TAB) PORT_CHAR(UCHAR_MAMEKEY(TAB))
103   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A')
104   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z')
105   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?59?") // 0x59 = Inf
106   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
107   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
108   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
98   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
99   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
100   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
101   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
109102
110103   PORT_START("MD01")
111   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC))
112   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q')
113   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S')
114   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X')
115   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ')
116   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7 Home") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD))
117   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
118   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
104   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
105   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
106   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
107   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
119108
120109   PORT_START("MD02")
121   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
122   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W')
123   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D')
124   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C')
125   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RCONTROL) // 0x5a = R/L (R)
126   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8 " UTF8_UP) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD))
127   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
128   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
110   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
111   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
112   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
113   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
129114
130115   PORT_START("MD03")
131   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@')
132   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E')
133   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F')
134   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V')
135   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) // 0x5b = Rus
136   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 9 PgUp") PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD))
137   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
138   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
116   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
117   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
118   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
119   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
139120
140121   PORT_START("MD04")
141   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
142   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R')
143   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G')
144   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B')
145   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1))
146   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4 " UTF8_LEFT) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD))
147   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
148   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
122   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
123   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
124   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
125   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
149126
150127   PORT_START("MD05")
151   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$')
152   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T')
153   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H')
154   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N')
155   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2))
156   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD))
157   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
158   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
128   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
129   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
130   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
131   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
159132
160133   PORT_START("MD06")
161   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
162   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y')
163   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J')
164   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M')
165   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3))
166   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6 " UTF8_RIGHT) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD))
167   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
168   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
134   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
135   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
136   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
137   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
169138
170139   PORT_START("MD07")
171   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^')
172   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U')
173   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K')
174   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~')
175   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4))
176   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1 End") PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD))
177   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
178   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
140   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
141   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
142   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
143   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
179144
180145   PORT_START("MD08")
181   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
182   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I')
183   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L')
184   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?2a?")
185   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5))
186   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2 " UTF8_DOWN) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD))
187   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
188   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
146   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
147   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
148   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
149   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
189150
190151   PORT_START("MD09")
191   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
192   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O')
193   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{')
194   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?5c?") // 0x5c = YO
195   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6))
196   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 3 PgDn") PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD))
197   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
198   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
152   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
153   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
154   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
155   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
199156
200157   PORT_START("MD10")
201   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
202   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P')
203   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}')
204   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<')
205   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7))
206   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0 Ins") PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD))
207   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
208   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
158   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
159   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
160   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
161   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
209162
210163   PORT_START("MD11")
211   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
212   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?36?")
213   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':')
214   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>')
215   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8))
216   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad . Del") PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD))
217   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
218   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
164   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
165   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
166   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
167   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
219168
220169   PORT_START("MD12")
221   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
222   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?3a?")
223   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"')
224   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // 0x55
225   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9))
226   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD))
227   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
228   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
170   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
171   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
172   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
173   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
229174
230175   PORT_START("MD13")
231   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
232   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?')
233   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13)
234   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) // 0x56
235   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10))
236   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
237   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
238   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
176   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
177   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
178   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
179   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
239180
240181   PORT_START("MD14")
241   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|')
242   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_PRTSCR)
243   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT))
244   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) // 0x57 = Lat
245   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_NUMLOCK) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK))
246   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
247   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
248   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
182   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
183   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
184   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
185   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
249186
250187   PORT_START("MD15")
251   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8)
252   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2)
253   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) // 0x54
254   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RALT) // 0x58 = R/L (L)
255   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Scroll Lock Break") PORT_CODE(KEYCODE_SCRLOCK) PORT_CHAR(UCHAR_MAMEKEY(SCRLOCK))
256   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
257   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
258   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
188   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
189   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
190   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
191   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
192
193   PORT_START("MD16")
194   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
195   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
196   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
197   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
198
199   PORT_START("MD17")
200   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
201   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
202   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
203   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
204
205   PORT_START("MD18")
206   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
207   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
208   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
209   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
210
211   PORT_START("MD19")
212   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
213   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
214   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
215   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
216
217   PORT_START("MD20")
218   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
219   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
220   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
221   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
222
223   PORT_START("MD21")
224   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
225   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
226   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
227   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
228
229   PORT_START("MD22")
230   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
231   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
232   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
233   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
234
235   PORT_START("MD23")
236   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD )
237   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD )
238   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD )
239   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD )
259240INPUT_PORTS_END
260241
261242
r249079r249080
298279      m_md13(*this, "MD13"),
299280      m_md14(*this, "MD14"),
300281      m_md15(*this, "MD15"),
282      m_md16(*this, "MD16"),
283      m_md17(*this, "MD17"),
284      m_md18(*this, "MD18"),
285      m_md19(*this, "MD19"),
286      m_md20(*this, "MD20"),
287      m_md21(*this, "MD21"),
288      m_md22(*this, "MD22"),
289      m_md23(*this, "MD23"),
301290      m_p1(0),
302291      m_p2(0),
303292      m_q(0)
r249079r249080
313302{
314303   set_pc_kbdc_device();
315304
316   // state saving
305   m_ram.resize(0x100);
306   save_item(NAME(m_ram));
307
308   save_item(NAME(m_bus));
317309   save_item(NAME(m_p1));
318310   save_item(NAME(m_p2));
319311   save_item(NAME(m_q));
r249079r249080
351343
352344
353345//-------------------------------------------------
354//  t0_r - XXX ENT0 CLK
346//  t1_r -
355347//-------------------------------------------------
356348
357READ8_MEMBER( iskr_1030_keyboard_device::t0_r )
349READ8_MEMBER( iskr_1030_keyboard_device::t1_r )
358350{
359   return 0;
360//  return clock_signal();
351   UINT8 data = data_signal();
352   UINT8 bias = m_p1 & 15;
353
354   if (!BIT(m_p1, 7)) {
355      DBG_LOG(2,0,( "%s: t1_r (l) %d\n", tag(), data));
356      return data;
357   }
358
359   if (bias) {
360      DBG_LOG(2,0,( "%s: t1_r (b) %d\n", tag(), bias));
361      return 1;
362   }
363
364   data = 0;
365   switch (m_bus >> 2)
366   {
367   case  0<<1: data = m_md00->read(); break;
368   case  1<<1: data = m_md01->read(); break;
369   case  2<<1: data = m_md02->read(); break;
370   case  3<<1: data = m_md03->read(); break;
371   case  4<<1: data = m_md04->read(); break;
372   case  5<<1: data = m_md05->read(); break;
373   case  6<<1: data = m_md06->read(); break;
374   case  7<<1: data = m_md07->read(); break;
375   case  8<<1: data = m_md08->read(); break;
376   case  9<<1: data = m_md09->read(); break;
377   case 10<<1: data = m_md10->read(); break;
378   case 11<<1: data = m_md11->read(); break;
379   case  (0<<1)+1: data = m_md12->read(); break;
380   case  (1<<1)+1: data = m_md13->read(); break;
381   case  (2<<1)+1: data = m_md14->read(); break;
382   case  (3<<1)+1: data = m_md15->read(); break;
383   case  (4<<1)+1: data = m_md16->read(); break;
384   case  (5<<1)+1: data = m_md17->read(); break;
385   case  (6<<1)+1: data = m_md18->read(); break;
386   case  (7<<1)+1: data = m_md19->read(); break;
387   case  (8<<1)+1: data = m_md20->read(); break;
388   case  (9<<1)+1: data = m_md21->read(); break;
389   case (10<<1)+1: data = m_md22->read(); break;
390   case (11<<1)+1: data = m_md23->read(); break;
391   }
392   data = BIT(data, m_bus&3);
393
394   DBG_LOG(2,0,( "%s: t1_r (k r%d c%d) %d\n", tag(), m_bus&3, m_bus>>2, data));
395   return data;
361396}
362397
363398
364399//-------------------------------------------------
365//  t1_r - OK
400//  ram_w -
366401//-------------------------------------------------
367402
368READ8_MEMBER( iskr_1030_keyboard_device::t1_r )
403WRITE8_MEMBER( iskr_1030_keyboard_device::ram_w )
369404{
370   UINT8 data = data_signal();
405   DBG_LOG(2,0,( "%s: ram_w[%02x] <- %02x\n", tag(), offset, data));
371406
372   DBG_LOG(2,0,( "%s: t1_r %d\n", tag(), data));
407   m_bus = offset;
408   m_ram[offset] = data;
409}
373410
374   return data;
411
412//-------------------------------------------------
413//  ram_r -
414//-------------------------------------------------
415
416READ8_MEMBER( iskr_1030_keyboard_device::ram_r )
417{
418   DBG_LOG(2,0,( "%s: ram_r[%02x] = %02x\n", tag(), offset, m_ram[offset]));
419   
420   return m_ram[offset];
375421}
376422
377423
r249079r249080
382428READ8_MEMBER( iskr_1030_keyboard_device::p1_r )
383429{
384430   /*
385
386431       bit     description
387432
388433       0       -REQ IN
r249079r249080
393438       5
394439       6
395440       7
396
397441   */
398442
399443   UINT8 data = 0;
r249079r249080
413457   /*
414458       bit     description
415459
416       0
417       1
418       2
419       3
420       4
421       5       LED XXX
422       6       LED XXX
423       7       LED XXX
460       0       ...
461       1       ...
462       2       ...
463       3       (not connected)
464       4       SPEAKER
465       5       LED RUS/LAT
466       6       LED NLK
467       7       LED CLK
424468   */
425469   DBG_LOG(1,0,( "%s: p2_w %02x\n", tag(), data));
426470
427   m_p1 = data;
471   m_p2 = data;
428472}
429473
430474
r249079r249080
442486       2       XXX
443487       3       XXX
444488       4       CLOCK out
445       5       DATA out (inverted!)
489       5       DATA out
446490       6       XXX
447       7       XXX
491       7       POLL GATE
448492   */
449   DBG_LOG(1,0,( "%s: p1_w %02x (clk %d data %d)\n", tag(), data, BIT(data, 4), BIT(data, 5)));
450493
494   m_p1 = data;
495
496   DBG_LOG(1,0,( "%s: p1_w %02x (c %d d %d bias %d)\n", tag(), data, BIT(data, 4), BIT(data, 5), data&15));
497
451498   m_pc_kbdc->data_write_from_kb(BIT(data, 5));
452499   m_pc_kbdc->clock_write_from_kb(BIT(data, 4));
453500}
trunk/src/emu/bus/pc_kbd/iskr1030.h
r249079r249080
3636   virtual machine_config_constructor device_mconfig_additions() const;
3737   virtual ioport_constructor device_input_ports() const;
3838
39   DECLARE_READ8_MEMBER( ram_r );
40   DECLARE_WRITE8_MEMBER( ram_w );
3941   DECLARE_READ8_MEMBER( p1_r );
4042   DECLARE_WRITE8_MEMBER( p1_w );
4143   DECLARE_WRITE8_MEMBER( p2_w );
42   DECLARE_READ8_MEMBER( t0_r );
4344   DECLARE_READ8_MEMBER( t1_r );
4445
4546protected:
r249079r249080
6970   required_ioport m_md13;
7071   required_ioport m_md14;
7172   required_ioport m_md15;
73   required_ioport m_md16;
74   required_ioport m_md17;
75   required_ioport m_md18;
76   required_ioport m_md19;
77   required_ioport m_md20;
78   required_ioport m_md21;
79   required_ioport m_md22;
80   required_ioport m_md23;
7281
82   dynamic_buffer m_ram;
83   UINT8 m_bus;
7384   UINT8 m_p1;
7485   UINT8 m_p2;
7586   int m_q;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team