trunk/src/emu/bus/pc_kbd/iskr1030.c
| r249079 | r249080 | |
| 42 | 42 | |
| 43 | 43 | ROM_START( iskr_1030_keyboard ) |
| 44 | 44 | ROM_REGION( 0x800, I8048_TAG, 0 ) |
| 45 | | // XXX add P/N etc |
| 46 | 45 | ROM_LOAD( "i1030.bin", 0x000, 0x800, CRC(7cac9c4b) SHA1(03959d3350e012ebfe61cee9c062b6c1fdd8766e) ) |
| 47 | 46 | ROM_END |
| 48 | 47 | |
| r249079 | r249080 | |
| 62 | 61 | //------------------------------------------------- |
| 63 | 62 | |
| 64 | 63 | static 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) |
| 66 | 65 | AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(p1_r, p1_w) |
| 67 | 66 | 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) |
| 69 | 67 | AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(t1_r) |
| 70 | 68 | ADDRESS_MAP_END |
| 71 | 69 | |
| r249079 | r249080 | |
| 75 | 73 | //------------------------------------------------- |
| 76 | 74 | |
| 77 | 75 | static 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) |
| 80 | 77 | MCFG_CPU_IO_MAP(iskr_1030_keyboard_io) |
| 81 | 78 | MACHINE_CONFIG_END |
| 82 | 79 | |
| r249079 | r249080 | |
| 98 | 95 | |
| 99 | 96 | INPUT_PORTS_START( iskr_1030_keyboard ) |
| 100 | 97 | 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 ) |
| 109 | 102 | |
| 110 | 103 | 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 ) |
| 119 | 108 | |
| 120 | 109 | 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 ) |
| 129 | 114 | |
| 130 | 115 | 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 ) |
| 139 | 120 | |
| 140 | 121 | 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 ) |
| 149 | 126 | |
| 150 | 127 | 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 ) |
| 159 | 132 | |
| 160 | 133 | 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 ) |
| 169 | 138 | |
| 170 | 139 | 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 ) |
| 179 | 144 | |
| 180 | 145 | 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 ) |
| 189 | 150 | |
| 190 | 151 | 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 ) |
| 199 | 156 | |
| 200 | 157 | 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 ) |
| 209 | 162 | |
| 210 | 163 | 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 ) |
| 219 | 168 | |
| 220 | 169 | 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 ) |
| 229 | 174 | |
| 230 | 175 | 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 ) |
| 239 | 180 | |
| 240 | 181 | 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 ) |
| 249 | 186 | |
| 250 | 187 | 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 ) |
| 259 | 240 | INPUT_PORTS_END |
| 260 | 241 | |
| 261 | 242 | |
| r249079 | r249080 | |
| 298 | 279 | m_md13(*this, "MD13"), |
| 299 | 280 | m_md14(*this, "MD14"), |
| 300 | 281 | 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"), |
| 301 | 290 | m_p1(0), |
| 302 | 291 | m_p2(0), |
| 303 | 292 | m_q(0) |
| r249079 | r249080 | |
| 313 | 302 | { |
| 314 | 303 | set_pc_kbdc_device(); |
| 315 | 304 | |
| 316 | | // state saving |
| 305 | m_ram.resize(0x100); |
| 306 | save_item(NAME(m_ram)); |
| 307 | |
| 308 | save_item(NAME(m_bus)); |
| 317 | 309 | save_item(NAME(m_p1)); |
| 318 | 310 | save_item(NAME(m_p2)); |
| 319 | 311 | save_item(NAME(m_q)); |
| r249079 | r249080 | |
| 351 | 343 | |
| 352 | 344 | |
| 353 | 345 | //------------------------------------------------- |
| 354 | | // t0_r - XXX ENT0 CLK |
| 346 | // t1_r - |
| 355 | 347 | //------------------------------------------------- |
| 356 | 348 | |
| 357 | | READ8_MEMBER( iskr_1030_keyboard_device::t0_r ) |
| 349 | READ8_MEMBER( iskr_1030_keyboard_device::t1_r ) |
| 358 | 350 | { |
| 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; |
| 361 | 396 | } |
| 362 | 397 | |
| 363 | 398 | |
| 364 | 399 | //------------------------------------------------- |
| 365 | | // t1_r - OK |
| 400 | // ram_w - |
| 366 | 401 | //------------------------------------------------- |
| 367 | 402 | |
| 368 | | READ8_MEMBER( iskr_1030_keyboard_device::t1_r ) |
| 403 | WRITE8_MEMBER( iskr_1030_keyboard_device::ram_w ) |
| 369 | 404 | { |
| 370 | | UINT8 data = data_signal(); |
| 405 | DBG_LOG(2,0,( "%s: ram_w[%02x] <- %02x\n", tag(), offset, data)); |
| 371 | 406 | |
| 372 | | DBG_LOG(2,0,( "%s: t1_r %d\n", tag(), data)); |
| 407 | m_bus = offset; |
| 408 | m_ram[offset] = data; |
| 409 | } |
| 373 | 410 | |
| 374 | | return data; |
| 411 | |
| 412 | //------------------------------------------------- |
| 413 | // ram_r - |
| 414 | //------------------------------------------------- |
| 415 | |
| 416 | READ8_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]; |
| 375 | 421 | } |
| 376 | 422 | |
| 377 | 423 | |
| r249079 | r249080 | |
| 382 | 428 | READ8_MEMBER( iskr_1030_keyboard_device::p1_r ) |
| 383 | 429 | { |
| 384 | 430 | /* |
| 385 | | |
| 386 | 431 | bit description |
| 387 | 432 | |
| 388 | 433 | 0 -REQ IN |
| r249079 | r249080 | |
| 393 | 438 | 5 |
| 394 | 439 | 6 |
| 395 | 440 | 7 |
| 396 | | |
| 397 | 441 | */ |
| 398 | 442 | |
| 399 | 443 | UINT8 data = 0; |
| r249079 | r249080 | |
| 413 | 457 | /* |
| 414 | 458 | bit description |
| 415 | 459 | |
| 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 |
| 424 | 468 | */ |
| 425 | 469 | DBG_LOG(1,0,( "%s: p2_w %02x\n", tag(), data)); |
| 426 | 470 | |
| 427 | | m_p1 = data; |
| 471 | m_p2 = data; |
| 428 | 472 | } |
| 429 | 473 | |
| 430 | 474 | |
| r249079 | r249080 | |
| 442 | 486 | 2 XXX |
| 443 | 487 | 3 XXX |
| 444 | 488 | 4 CLOCK out |
| 445 | | 5 DATA out (inverted!) |
| 489 | 5 DATA out |
| 446 | 490 | 6 XXX |
| 447 | | 7 XXX |
| 491 | 7 POLL GATE |
| 448 | 492 | */ |
| 449 | | DBG_LOG(1,0,( "%s: p1_w %02x (clk %d data %d)\n", tag(), data, BIT(data, 4), BIT(data, 5))); |
| 450 | 493 | |
| 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 | |
| 451 | 498 | m_pc_kbdc->data_write_from_kb(BIT(data, 5)); |
| 452 | 499 | m_pc_kbdc->clock_write_from_kb(BIT(data, 4)); |
| 453 | 500 | } |