src/mess/drivers/vk100.c
| r15611 | r15612 | |
| 5 | 5 | 12/05/2009 Skeleton driver. |
| 6 | 6 | 28/07/2009 added Guru-readme(TM) |
| 7 | 7 | |
| 8 | | Todo: attach vblank int |
| 9 | | attach hd46505sp CRTC |
| 8 | Todo: attach hd46505sp CRTC |
| 10 | 9 | emulate vector generator hardware |
| 11 | 10 | attach keyboard |
| 12 | | calculate or measure the correct beeper frequency |
| 13 | 11 | ****************************************************************************/ |
| 14 | 12 | /* |
| 15 | 13 | DEC VK100 |
| r15611 | r15612 | |
| 17 | 15 | |
| 18 | 16 | This is a VK100 terminal, otherwise known as a DEC Gigi graphics terminal. |
| 19 | 17 | There's a technical manual dated 1982 here: |
| 20 | | http://www.computer.museum.uq.edu.au/./pdf/EK-VK100-TM-001%20VK100%20Technical%20Manual.pdf |
| 18 | http://web.archive.org/web/20091015205827/http://www.computer.museum.uq.edu.au/pdf/EK-VK100-TM-001%20VK100%20Technical%20Manual.pdf |
| 19 | Installation and owner's manual is at: |
| 20 | http://www.bitsavers.org/pdf/dec/terminal/gigi/EK-VK100-IN-002_GIGI_Terminal_Installation_and_Owners_Manual_Apr81.pdf |
| 21 | 21 | |
| 22 | 22 | PCB Layout |
| 23 | 23 | ---------- |
| 24 | 24 | |
| 25 | 25 | VK100 LOGICBOARD |
| 26 | 26 | |-------| |---------| |---------| |-| |-| |-| |-| |
| 27 | | |---|-POWER-|----|---EIA---|--|HARD-COPY|----|B|-|G|-|R|--|-|----------| |
| 27 | |---|-20 mA-|----|---EIA---|--|HARD-COPY|----|B|-|G|-|R|--|-|----------| |
| 28 | 28 | | BW DSW(8) | |
| 29 | 29 | | POWER | |
| 30 | 30 | | PR2 | |
| r15611 | r15612 | |
| 72 | 72 | |
| 73 | 73 | - X 0 0 0 X X (0x1C) = CRT Controller error |
| 74 | 74 | X - 0 X X X X (0x30) " |
| 75 | This test writes 0xF to port 00 (crtc address reg) and writes a pattern to it |
| 76 | via port 01 (crtc data reg) then reads it back and checks to be sure the data |
| 77 | matches. |
| 75 | 78 | |
| 76 | 79 | - X 0 0 X 0 0 (0x1B) = CRT Controller time-out |
| 77 | 80 | X - 0 X X X X (0x30) " |
| 81 | This test writes 00 to all the crtc registers and checks to be sure an rst7.5 |
| 82 | (vblank) interrupt fires on the 8085 within a certain time period. |
| 78 | 83 | |
| 79 | 84 | - X 0 0 X 0 X (0x1A) = Vector time-out error |
| 80 | 85 | X - 0 X X X X (0x30) " |
| r15611 | r15612 | |
| 87 | 92 | #include "sound/beep.h" |
| 88 | 93 | #include "video/mc6845.h" |
| 89 | 94 | #include "machine/i8251.h" |
| 95 | #include "vk100.lh" |
| 90 | 96 | |
| 91 | 97 | class vk100_state : public driver_device |
| 92 | 98 | { |
| r15611 | r15612 | |
| 94 | 100 | vk100_state(const machine_config &mconfig, device_type type, const char *tag) |
| 95 | 101 | : driver_device(mconfig, type, tag), |
| 96 | 102 | m_maincpu(*this, "maincpu"), |
| 97 | | m_screen(*this, "screen")//, |
| 103 | m_screen(*this, "screen"), |
| 98 | 104 | //m_crtc(*this, "hd46505sp"), |
| 105 | m_speaker(*this, BEEPER_TAG)//, |
| 99 | 106 | //m_uart(*this, "i8251") |
| 100 | 107 | { } |
| 101 | 108 | required_device<cpu_device> m_maincpu; |
| 102 | 109 | required_device<screen_device> m_screen; |
| 103 | 110 | //required_device<mc6845_device> m_crtc; |
| 111 | required_device<device_t> m_speaker; |
| 104 | 112 | //required_device<device_t> m_uart; |
| 105 | 113 | |
| 106 | 114 | //UINT8 m_statusLED; |
| 107 | | UINT8 m_key_scan; |
| 108 | | DECLARE_WRITE8_MEMBER(led_beep_write); |
| 115 | DECLARE_WRITE8_MEMBER(KBDW); |
| 109 | 116 | }; |
| 110 | 117 | |
| 111 | | WRITE8_MEMBER(vk100_state::led_beep_write) |
| 118 | /* port 0x68: "KBDW" d7 is beeper, d6 is keyclick, d5-d0 are keyboard LEDS */ |
| 119 | WRITE8_MEMBER(vk100_state::KBDW) |
| 112 | 120 | { |
| 113 | | device_t *speaker = machine().device(BEEPER_TAG); |
| 114 | | beep_set_frequency( speaker, 318 ); //318 hz is a guess based on vt100 |
| 115 | | /* The LEDS on the vk100 (there are 7) are set up above the keyboard as: |
| 116 | | * Label: ON LINE LOCAL NO SCROLL BASIC HARD-COPY L1 L2 |
| 117 | | * Bit: !d5 d5 !d4 !d3 !d2 !d1 !d0 |
| 118 | | * see header of file for information on error codes |
| 119 | | */ |
| 120 | | /* TODO: make this work. |
| 121 | | output_set_value("online_led",BIT(data, 5) ? 0 : 1); |
| 122 | | output_set_value("local_led", BIT(data, 5)); |
| 123 | | output_set_value("locked_led",BIT(data, 4) ? 0 : 1); |
| 124 | | output_set_value("noscroll_led", BIT(data, 3) ? 0 : 1); |
| 125 | | output_set_value("hardcopy_led", BIT(data, 2) ? 0 : 1); |
| 126 | | output_set_value("l1_led", BIT(data, 1) ? 0 : 1); |
| 127 | | output_set_value("l2_led", BIT(data, 0) ? 0 : 1); |
| 128 | | */ |
| 129 | | m_key_scan = BIT(data, 6); |
| 130 | | beep_set_state( speaker, BIT(data, 7)); |
| 131 | | //m_statusLED = data&0xFF; |
| 121 | output_set_value("online_led",BIT(data, 5) ? 1 : 0); |
| 122 | output_set_value("local_led", BIT(data, 5) ? 0 : 1); |
| 123 | output_set_value("noscroll_led",BIT(data, 4) ? 1 : 0); |
| 124 | output_set_value("basic_led", BIT(data, 3) ? 1 : 0); |
| 125 | output_set_value("hardcopy_led", BIT(data, 2) ? 1 : 0); |
| 126 | output_set_value("l1_led", BIT(data, 1) ? 1 : 0); |
| 127 | output_set_value("l2_led", BIT(data, 0) ? 1 : 0); |
| 128 | if (BIT(data, 6)) logerror("kb keyclick bit 6 set: not emulated yet (multivibrator)!\n"); |
| 129 | beep_set_state( m_speaker, BIT(data, 7)); |
| 132 | 130 | logerror("LED state: %02X: %s %s %s %s %s %s\n", data&0xFF, (data&0x20)?"------- LOCAL ":"ON LINE ----- ", (data&0x10)?"--------- ":"NO SCROLL ", (data&0x8)?"----- ":"BASIC ", (data&0x4)?"--------- ":"HARD-COPY ", (data&0x2)?"-- ":"L1 ", (data&0x1)?"-- ":"L2 "); |
| 133 | | //popmessage("LED write: %02X\n", data&0xFF); |
| 134 | | popmessage("LED state: %02X: %s %s %s %s %s %s\n", data&0xFF, (data&0x20)?"------- LOCAL ":"ON LINE ----- ", (data&0x10)?"--------- ":"NO SCROLL ", (data&0x8)?"----- ":"BASIC ", (data&0x4)?"--------- ":"HARD-COPY ", (data&0x2)?"-- ":"L1 ", (data&0x1)?"-- ":"L2 "); |
| 135 | | //popmessage("LED status: %x %x %x %x %x %x %x %x\n", (data&0x80), (data&0x40), (data&0x20), data&0x10, data&0x8, data&0x4, data&0x2, data&0x1); |
| 131 | //popmessage("LED write: %02X\n", data&0xFF); |
| 132 | //popmessage("LED state: %02X: %s %s %s %s %s %s\n", data&0xFF, (data&0x20)?"------- LOCAL ":"ON LINE ----- ", (data&0x10)?"--------- ":"NO SCROLL ", (data&0x8)?"----- ":"BASIC ", (data&0x4)?"--------- ":"HARD-COPY ", (data&0x2)?"-- ":"L1 ", (data&0x1)?"-- ":"L2 "); |
| 133 | //popmessage("LED status: %x %x %x %x %x %x %x %x\n", (data&0x80), (data&0x40), (data&0x20), data&0x10, data&0x8, data&0x4, data&0x2, data&0x1); |
| 136 | 134 | } |
| 137 | 135 | |
| 138 | 136 | static ADDRESS_MAP_START(vk100_mem, AS_PROGRAM, 8, vk100_state) |
| 139 | 137 | ADDRESS_MAP_UNMAP_HIGH |
| 140 | 138 | AM_RANGE( 0x0000, 0x6fff ) AM_ROM |
| 141 | | //AM_RANGE( 0x7000, 0x700f) AM_DEVREADWRITE(vk100_keyboard) AM_MIRROR(0x0ff0) |
| 139 | //AM_RANGE( 0x7000, 0x700f) AM_MIRROR(0x0ff0) AM_READ(vk100_keyboard_column_r) |
| 142 | 140 | AM_RANGE( 0x8000, 0xbfff ) AM_RAM |
| 143 | 141 | ADDRESS_MAP_END |
| 144 | 142 | |
| 145 | 143 | static ADDRESS_MAP_START(vk100_io, AS_IO, 8, vk100_state) |
| 146 | 144 | ADDRESS_MAP_UNMAP_HIGH |
| 147 | | AM_RANGE(0x01, 0x01) AM_RAM // hack to pass crtc test |
| 145 | AM_RANGE(0x01, 0x01) AM_RAM // hack to pass crtc test until crtc is attached |
| 148 | 146 | //AM_RANGE(0x00, 0x00) AM_WRITE(crtc_addr_w) |
| 149 | 147 | //AM_RANGE(0x01, 0x01) AM_READWRITE(crtc_data_r, crtc_data_w) |
| 150 | 148 | // Comments are from page 118 (5-14) of http://web.archive.org/web/20091015205827/http://www.computer.museum.uq.edu.au/pdf/EK-VK100-TM-001%20VK100%20Technical%20Manual.pdf |
| r15611 | r15612 | |
| 164 | 162 | //AM_RANGE (0x65, 0x65) AM_WRITE(dot) //EX DOT |
| 165 | 163 | //AM_RANGE (0x66, 0x66) AM_WRITE(vec) //EX VEC |
| 166 | 164 | //AM_RANGE (0x67, 0x67) AM_WRITE(er) //EX ER |
| 167 | | AM_RANGE (0x68, 0x68) AM_WRITE(led_beep_write) //keyboard LEDs and beeper |
| 165 | AM_RANGE (0x68, 0x68) AM_WRITE(KBDW) //KBDW |
| 168 | 166 | //AM_RANGE (0x6C, 0x6C) AM_WRITE(baud) //LD BAUD (baud rate clock divider setting for i8251 tx and rx clocks) |
| 169 | 167 | //AM_RANGE (0x70, 0x70) AM_WRITE(comd) //LD COMD (one of the i8251 regs) |
| 170 | 168 | //AM_RANGE (0x71, 0x71) AM_WRITE(com) //LD COM (the other i8251 reg) |
| 171 | 169 | //AM_RANGE (0x74, 0x74) AM_WRITE(unknown_74) |
| 172 | | //AM_RANGE (0x78, 0x78) AM_WRITE(kbdw) //KBDW |
| 170 | //AM_RANGE (0x78, 0x78) AM_WRITE(kbdw) //KBDW ?(mirror?) |
| 173 | 171 | //AM_RANGE (0x7C, 0x7C) AM_WRITE(unknown_7C) |
| 174 | 172 | //AM_RANGE (0x40, 0x40) AM_READ(systat_a) // SYSTAT A (dipswitches?) |
| 175 | 173 | //AM_RANGE (0x48, 0x48) AM_READ(systat_b) // SYSTAT B (dipswitches?) |
| r15611 | r15612 | |
| 184 | 182 | |
| 185 | 183 | /* Input ports */ |
| 186 | 184 | static INPUT_PORTS_START( vk100 ) |
| 185 | PORT_START("LINE0") |
| 186 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 187 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 188 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 189 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 190 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 7") PORT_CODE(KEYCODE_7_PAD) |
| 191 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 8") PORT_CODE(KEYCODE_8_PAD) |
| 192 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num .") PORT_CODE(KEYCODE_DEL_PAD) |
| 193 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 9") PORT_CODE(KEYCODE_9_PAD) |
| 194 | PORT_START("LINE1") |
| 195 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 196 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 197 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) |
| 198 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF3") PORT_CODE(KEYCODE_F3) |
| 199 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF4") PORT_CODE(KEYCODE_F4) |
| 200 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num Enter") PORT_CODE(KEYCODE_ENTER_PAD) |
| 201 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num ,") PORT_CODE(KEYCODE_PLUS_PAD) |
| 202 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 3") PORT_CODE(KEYCODE_3_PAD) |
| 203 | PORT_START("LINE2") |
| 204 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 205 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 206 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 207 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF1") PORT_CODE(KEYCODE_F1) |
| 208 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF2") PORT_CODE(KEYCODE_F2) |
| 209 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 2") PORT_CODE(KEYCODE_2_PAD) |
| 210 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 5") PORT_CODE(KEYCODE_5_PAD) |
| 211 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 6") PORT_CODE(KEYCODE_6_PAD) |
| 212 | PORT_START("LINE3") |
| 213 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_DEL) |
| 214 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 215 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_F6) |
| 216 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) |
| 217 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 0") PORT_CODE(KEYCODE_0_PAD) |
| 218 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 1") PORT_CODE(KEYCODE_1_PAD) |
| 219 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 4") PORT_CODE(KEYCODE_4_PAD) |
| 220 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num -") PORT_CODE(KEYCODE_MINUS_PAD) |
| 221 | PORT_START("LINE4") |
| 222 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num Return") PORT_CODE(KEYCODE_ENTER_PAD) |
| 223 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 224 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 225 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) |
| 226 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line feed") PORT_CODE(KEYCODE_RALT) |
| 227 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 228 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) |
| 229 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
| 230 | PORT_START("LINE5") |
| 231 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 232 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 233 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 234 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 235 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) |
| 236 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 237 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 238 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) |
| 239 | PORT_START("LINE6") |
| 240 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 241 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 242 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 243 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 244 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 245 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 246 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE) |
| 247 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 248 | PORT_START("LINE7") |
| 249 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_Y) |
| 250 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| 251 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 252 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 253 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 254 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) |
| 255 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 256 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 257 | PORT_START("LINE8") |
| 258 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| 259 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| 260 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 261 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 262 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) |
| 263 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) |
| 264 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 265 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 266 | PORT_START("LINE9") |
| 267 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| 268 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| 269 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 270 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 271 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) |
| 272 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) |
| 273 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 274 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 275 | PORT_START("LINEA") |
| 276 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| 277 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 278 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| 279 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) |
| 280 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) |
| 281 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) |
| 282 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("No scroll") PORT_CODE(KEYCODE_LALT) |
| 283 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 284 | PORT_START("LINEB") |
| 285 | PORT_BIT(0x7F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 286 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Setup") PORT_CODE(KEYCODE_F5) |
| 287 | PORT_START("LINEC") |
| 288 | PORT_BIT(0x7F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 289 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 290 | PORT_START("LINED") |
| 291 | PORT_BIT(0x7F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 292 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 293 | PORT_START("LINEE") |
| 294 | PORT_BIT(0x7F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 295 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps lock") PORT_CODE(KEYCODE_CAPSLOCK) |
| 296 | PORT_START("LINEF") |
| 297 | PORT_BIT(0x7F, IP_ACTIVE_LOW, IPT_UNUSED) |
| 298 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) // Always return 0x7f on last scan line |
| 187 | 299 | INPUT_PORTS_END |
| 188 | 300 | |
| 189 | 301 | |
| 190 | 302 | static MACHINE_RESET( vk100 ) |
| 191 | 303 | { |
| 304 | vk100_state *state = machine.driver_data<vk100_state>(); |
| 305 | beep_set_frequency( state->m_speaker, 116 ); //116 hz (page 172 of TM) |
| 306 | output_set_value("online_led",1); |
| 307 | output_set_value("local_led", 0); |
| 308 | output_set_value("noscroll_led",1); |
| 309 | output_set_value("basic_led", 1); |
| 310 | output_set_value("hardcopy_led", 1); |
| 311 | output_set_value("l1_led", 1); |
| 312 | output_set_value("l2_led", 1); |
| 192 | 313 | } |
| 193 | 314 | |
| 194 | 315 | static VIDEO_START( vk100 ) |
| r15611 | r15612 | |
| 200 | 321 | return 0; |
| 201 | 322 | } |
| 202 | 323 | |
| 324 | static INTERRUPT_GEN( vk100_vertical_interrupt ) |
| 325 | { |
| 326 | device_set_input_line(device, I8085_RST75_LINE, ASSERT_LINE); |
| 327 | device_set_input_line(device, I8085_RST75_LINE, CLEAR_LINE); |
| 328 | } |
| 329 | |
| 203 | 330 | static MACHINE_CONFIG_START( vk100, vk100_state ) |
| 204 | 331 | /* basic machine hardware */ |
| 205 | 332 | MCFG_CPU_ADD("maincpu", I8085A, XTAL_5_0688MHz) |
| 206 | 333 | MCFG_CPU_PROGRAM_MAP(vk100_mem) |
| 207 | 334 | MCFG_CPU_IO_MAP(vk100_io) |
| 208 | | //MCFG_CPU_VBLANK_INT("screen", vk100_vertical_interrupt) // hook me up please |
| 335 | MCFG_CPU_VBLANK_INT("screen", vk100_vertical_interrupt) |
| 209 | 336 | |
| 210 | 337 | MCFG_MACHINE_RESET(vk100) |
| 211 | 338 | |
| r15611 | r15612 | |
| 220 | 347 | MCFG_PALETTE_LENGTH(2) |
| 221 | 348 | MCFG_PALETTE_INIT(black_and_white) |
| 222 | 349 | |
| 350 | |
| 351 | MCFG_DEFAULT_LAYOUT( layout_vk100 ) |
| 352 | |
| 223 | 353 | MCFG_SPEAKER_STANDARD_MONO( "mono" ) |
| 224 | 354 | MCFG_SOUND_ADD( BEEPER_TAG, BEEP, 0 ) |
| 225 | 355 | MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 0.25 ) |