src/mess/drivers/vk100.c
| r15626 | r15627 | |
| 7 | 7 | |
| 8 | 8 | Todo: attach hd46505sp CRTC |
| 9 | 9 | hook up vram |
| 10 | - vram space is now present but not hooked to anything |
| 10 | 11 | emulate vector generator hardware |
| 12 | - stubbing registers: |
| 13 | done: X, Y, Err, Pattern, WOPS |
| 11 | 14 | |
| 12 | 15 | Tony DiCenzo, now the director of standards and architecture at Oracle, was on the team that developed the VK100 |
| 13 | 16 | see http://startup.nmnaturalhistory.org/visitorstories/view.php?ii=79 |
| r15626 | r15627 | |
| 117 | 120 | required_device<device_t> m_speaker; |
| 118 | 121 | //required_device<device_t> m_uart; |
| 119 | 122 | |
| 120 | | //UINT8 m_statusLED; |
| 123 | UINT16 m_vgX; |
| 124 | UINT16 m_vgY; |
| 125 | UINT8 m_vgErr; |
| 126 | UINT8 m_vgPat; |
| 127 | UINT8 m_vgWOPS; |
| 128 | |
| 129 | DECLARE_WRITE8_MEMBER(vgLD_X); |
| 130 | DECLARE_WRITE8_MEMBER(vgLD_Y); |
| 131 | DECLARE_WRITE8_MEMBER(vgErr); |
| 132 | |
| 133 | DECLARE_WRITE8_MEMBER(vgPat); |
| 134 | |
| 135 | DECLARE_WRITE8_MEMBER(vgWOPS); |
| 136 | |
| 137 | DECLARE_WRITE8_MEMBER(vgEX_VEC); |
| 138 | |
| 121 | 139 | DECLARE_WRITE8_MEMBER(KBDW); |
| 122 | 140 | DECLARE_READ8_MEMBER(vk100_keyboard_column_r); |
| 123 | 141 | }; |
| 124 | 142 | |
| 143 | /* |
| 144 | void drawVector(UINT16 px, UINT16 py, UINT16 x, UINT16 y, int pattern) |
| 145 | { |
| 146 | UINT8 *gfx = machine.root_device().memregion("vram")->base(); |
| 147 | }*/ |
| 148 | |
| 149 | /* ports 0x40 and 0x41: load low and high bytes of vector gen X register */ |
| 150 | WRITE8_MEMBER(vk100_state::vgLD_X) |
| 151 | { |
| 152 | m_vgX &= 0xFF << ((1-offset)*8); |
| 153 | m_vgX |= ((UINT16)data) << (offset*8); |
| 154 | logerror("VG: X Reg 0x%02X loaded with %04X, new X value is %04X\n", 0x40+offset, ((UINT16)data) << (offset*8), m_vgX); |
| 155 | } |
| 156 | |
| 157 | /* ports 0x42 and 0x43: load low and high bytes of vector gen Y register */ |
| 158 | WRITE8_MEMBER(vk100_state::vgLD_Y) |
| 159 | { |
| 160 | m_vgY &= 0xFF << ((1-offset)*8); |
| 161 | m_vgY |= ((UINT16)data) << (offset*8); |
| 162 | logerror("VG: Y Reg 0x%02X loaded with %04X, new Y value is %04X\n", 0x42+offset, ((UINT16)data) << (offset*8), m_vgY); |
| 163 | } |
| 164 | |
| 165 | /* port 0x44: "ERR" load bresenham line algorithm 'error' count */ |
| 166 | WRITE8_MEMBER(vk100_state::vgErr) |
| 167 | { |
| 168 | m_vgErr = data; |
| 169 | logerror("VG: Err Reg 0x44 loaded with %02X\n", m_vgErr); |
| 170 | } |
| 171 | |
| 172 | /* port 0x46: "Pat" load vg Pattern register */ |
| 173 | WRITE8_MEMBER(vk100_state::vgPat) |
| 174 | { |
| 175 | m_vgPat = data; |
| 176 | logerror("VG: Pattern Reg 0x46 loaded with %02X\n", m_vgPat); |
| 177 | } |
| 178 | |
| 179 | /* port 0x63: "WOPS" vector 'pixel' write options |
| 180 | * --Attributes to change -- Enable -- Functions -- |
| 181 | * Blink Green Red Blue Attrib F1 F0 FN |
| 182 | * Change |
| 183 | * d7 d6 d5 d4 d3 d2 d1 d0 |
| 184 | */ |
| 185 | WRITE8_MEMBER(vk100_state::vgWOPS) |
| 186 | { |
| 187 | static const char *const functions[] = { "Overlay", "Replace", "Complement", "Erase" }; |
| 188 | m_vgWOPS = data; |
| 189 | logerror("VG: WOPS loaded with %02X: KGRB %d%d%d%d, AttrChange %d, Function %s, Negate %d\n", data, (m_vgWOPS>>7)&1, (m_vgWOPS>>6)&1, (m_vgWOPS>>5)&1, (m_vgWOPS>>4)&1, (m_vgWOPS>>3)&1, functions[(m_vgWOPS>>1)&3], m_vgWOPS&1); |
| 190 | } |
| 191 | |
| 192 | /* port 0x66: "EX VEC" execute a vector (start the state machine) */ |
| 193 | WRITE8_MEMBER(vk100_state::vgEX_VEC) |
| 194 | { |
| 195 | logerror("VG Execute Vector 0x66 written: stub!\n"); |
| 196 | // TODO: short term: do some calculations here and print the expected starting ram address etc |
| 197 | // TODO: long term: fire a timer and actually draw the vector to ram with correct timing |
| 198 | } |
| 199 | |
| 125 | 200 | /* port 0x68: "KBDW" d7 is beeper, d6 is keyclick, d5-d0 are keyboard LEDS */ |
| 126 | 201 | WRITE8_MEMBER(vk100_state::KBDW) |
| 127 | 202 | { |
| r15626 | r15627 | |
| 135 | 210 | if (BIT(data, 6)) logerror("kb keyclick bit 6 set: not emulated yet (multivibrator)!\n"); |
| 136 | 211 | beep_set_state( m_speaker, BIT(data, 7)); |
| 137 | 212 | 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 "); |
| 138 | | //popmessage("LED write: %02X\n", data&0xFF); |
| 139 | | //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 "); |
| 140 | | //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); |
| 141 | 213 | } |
| 142 | 214 | |
| 143 | 215 | READ8_MEMBER(vk100_state::vk100_keyboard_column_r) |
| r15626 | r15627 | |
| 145 | 217 | UINT8 code; |
| 146 | 218 | char kbdcol[8]; |
| 147 | 219 | sprintf(kbdcol,"COL%X", (offset&0xF)); |
| 148 | | code = ioport(kbdcol)->read()&0x3F; |
| 149 | | code |= ioport("CAPSSHIFT")->read(); |
| 220 | code = ioport(kbdcol)->read() | ioport("CAPSSHIFT")->read(); |
| 150 | 221 | logerror("Keyboard column %X read, returning %02X\n", offset&0xF, code); |
| 151 | 222 | return code; |
| 152 | 223 | } |
| r15626 | r15627 | |
| 164 | 235 | //AM_RANGE(0x00, 0x00) AM_WRITE(crtc_addr_w) |
| 165 | 236 | //AM_RANGE(0x01, 0x01) AM_READWRITE(crtc_data_r, crtc_data_w) |
| 166 | 237 | // 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 |
| 167 | | //AM_RANGE (0x40, 0x40) AM_WRITE(X_low) //LD X LO \_ 12 bits |
| 168 | | //AM_RANGE (0x41, 0x41) AM_WRITE(X_high) //LD X HI / |
| 169 | | //AM_RANGE (0x42, 0x42) AM_WRITE(Y_low) //LD Y LO \_ 12 bits |
| 170 | | //AM_RANGE (0x43, 0x43) AM_WRITE(Y_high) //LD Y HI / |
| 171 | | //AM_RANGE (0x44, 0x44) AM_WRITE(err) //LD ERR |
| 238 | AM_RANGE (0x40, 0x41) AM_WRITE(vgLD_X) //LD X LO + HI 12 bits |
| 239 | AM_RANGE (0x42, 0x43) AM_WRITE(vgLD_Y) //LD Y LO + HI 12 bits |
| 240 | AM_RANGE (0x44, 0x44) AM_WRITE(vgErr) //LD ERR ('error' in bresenham algorithm) |
| 172 | 241 | //AM_RANGE (0x45, 0x45) AM_WRITE(sops) //LD SOPS (screen options) |
| 173 | | //AM_RANGE (0x46, 0x46) AM_WRITE(pat) //LD PAT (pattern register) |
| 242 | AM_RANGE (0x46, 0x46) AM_WRITE(vgPat) //LD PAT (pattern register) |
| 174 | 243 | //AM_RANGE (0x47, 0x47) AM_READWRITE(pmul) //LD PMUL (pattern multiplier) (should this be write only?) |
| 175 | 244 | //AM_RANGE (0x60, 0x60) AM_WRITE(du) //LD DU |
| 176 | 245 | //AM_RANGE (0x61, 0x61) AM_WRITE(dvm) //LD DVM |
| 177 | 246 | //AM_RANGE (0x62, 0x62) AM_WRITE(dir) //LD DIR (direction) |
| 178 | | //AM_RANGE (0x63, 0x63) AM_WRITE(wops) //LD WOPS (write options) |
| 247 | AM_RANGE (0x63, 0x63) AM_WRITE(vgWOPS) //LD WOPS (write options) |
| 179 | 248 | //AM_RANGE (0x64, 0x64) AM_WRITE(mov) //EX MOV |
| 180 | 249 | //AM_RANGE (0x65, 0x65) AM_WRITE(dot) //EX DOT |
| 181 | | //AM_RANGE (0x66, 0x66) AM_WRITE(vec) //EX VEC |
| 250 | AM_RANGE (0x66, 0x66) AM_WRITE(vgEX_VEC) //EX VEC |
| 182 | 251 | //AM_RANGE (0x67, 0x67) AM_WRITE(er) //EX ER |
| 183 | 252 | AM_RANGE (0x68, 0x68) AM_WRITE(KBDW) //KBDW |
| 184 | 253 | //AM_RANGE (0x6C, 0x6C) AM_WRITE(baud) //LD BAUD (baud rate clock divider setting for i8251 tx and rx clocks) |
| r15626 | r15627 | |
| 200 | 269 | |
| 201 | 270 | /* Input ports */ |
| 202 | 271 | static INPUT_PORTS_START( vk100 ) |
| 203 | | PORT_START("CAPSSHIFT") |
| 272 | PORT_START("CAPSSHIFT") // CAPS LOCK and SHIFT appear as the high 2 bits on all rows |
| 204 | 273 | PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 205 | 274 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps lock") PORT_CODE(KEYCODE_CAPSLOCK) |
| 206 | 275 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) |
| 207 | 276 | PORT_START("COL0") |
| 208 | 277 | PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_UNUSED) |
| 209 | | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 210 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 278 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) // row 0 bit 6 is always low, checked by keyboard test |
| 279 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) // all rows have these bits left low to save a mask op later |
| 211 | 280 | PORT_START("COL1") |
| 212 | 281 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Set Up") PORT_CODE(KEYCODE_F5) |
| 213 | 282 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) |
| r15626 | r15627 | |
| 215 | 284 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 216 | 285 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num Enter") PORT_CODE(KEYCODE_ENTER_PAD) |
| 217 | 286 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF1") PORT_CODE(KEYCODE_F1) |
| 218 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 287 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 219 | 288 | PORT_START("COL2") |
| 220 | 289 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) |
| 221 | 290 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) |
| r15626 | r15627 | |
| 223 | 292 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("No scroll") PORT_CODE(KEYCODE_LALT) |
| 224 | 293 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 1") PORT_CODE(KEYCODE_1_PAD) |
| 225 | 294 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF2") PORT_CODE(KEYCODE_F2) |
| 226 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 295 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 227 | 296 | PORT_START("COL3") |
| 228 | 297 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) |
| 229 | 298 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) |
| r15626 | r15627 | |
| 231 | 300 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) |
| 232 | 301 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 2") PORT_CODE(KEYCODE_2_PAD) |
| 233 | 302 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF3") PORT_CODE(KEYCODE_F3) |
| 234 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 303 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 235 | 304 | PORT_START("COL4") |
| 236 | 305 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) |
| 237 | 306 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) |
| r15626 | r15627 | |
| 239 | 308 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) |
| 240 | 309 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 3") PORT_CODE(KEYCODE_3_PAD) |
| 241 | 310 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("PF4") PORT_CODE(KEYCODE_F4) |
| 242 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 311 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 243 | 312 | PORT_START("COL5") |
| 244 | 313 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) |
| 245 | 314 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) |
| r15626 | r15627 | |
| 247 | 316 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) |
| 248 | 317 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 4") PORT_CODE(KEYCODE_4_PAD) |
| 249 | 318 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 250 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 319 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 251 | 320 | PORT_START("COL6") |
| 252 | 321 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) |
| 253 | 322 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) |
| r15626 | r15627 | |
| 255 | 324 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) |
| 256 | 325 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 5") PORT_CODE(KEYCODE_5_PAD) |
| 257 | 326 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 258 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 327 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 259 | 328 | PORT_START("COL7") |
| 260 | 329 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) |
| 261 | 330 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_Y) |
| r15626 | r15627 | |
| 263 | 332 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) |
| 264 | 333 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 6") PORT_CODE(KEYCODE_6_PAD) |
| 265 | 334 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 266 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 335 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 267 | 336 | PORT_START("COL8") |
| 268 | 337 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) |
| 269 | 338 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| r15626 | r15627 | |
| 271 | 340 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) |
| 272 | 341 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 7") PORT_CODE(KEYCODE_7_PAD) |
| 273 | 342 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 274 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 343 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 275 | 344 | PORT_START("COL9") |
| 276 | 345 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) |
| 277 | 346 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) |
| 278 | 347 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) |
| 279 | 348 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) |
| 280 | 349 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 8") PORT_CODE(KEYCODE_8_PAD) |
| 281 | | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 350 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 351 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 282 | 352 | PORT_START("COLA") |
| 283 | 353 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) |
| 284 | 354 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) |
| 285 | 355 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) |
| 286 | 356 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) |
| 287 | 357 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 9") PORT_CODE(KEYCODE_9_PAD) |
| 288 | | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 358 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 359 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 289 | 360 | PORT_START("COLB") |
| 290 | 361 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) |
| 291 | 362 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) |
| 292 | 363 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON) |
| 293 | 364 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA) |
| 294 | 365 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 0") PORT_CODE(KEYCODE_0_PAD) |
| 295 | | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 366 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 367 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 296 | 368 | PORT_START("COLC") |
| 297 | 369 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS) |
| 298 | 370 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) |
| 299 | 371 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE) |
| 300 | 372 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) |
| 301 | 373 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num -") PORT_CODE(KEYCODE_MINUS_PAD) |
| 302 | | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 374 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 375 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 303 | 376 | PORT_START("COLD") |
| 304 | 377 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS) |
| 305 | 378 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) |
| 306 | 379 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) |
| 307 | 380 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH) |
| 308 | 381 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num ,") PORT_CODE(KEYCODE_PLUS_PAD) |
| 309 | | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 382 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 383 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 310 | 384 | PORT_START("COLE") |
| 311 | 385 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE) |
| 312 | 386 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_DEL) |
| 313 | 387 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) |
| 314 | 388 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line feed") PORT_CODE(KEYCODE_RALT) |
| 315 | 389 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num .") PORT_CODE(KEYCODE_DEL_PAD) |
| 316 | | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 390 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 391 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 317 | 392 | PORT_START("COLF") |
| 318 | 393 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE) |
| 319 | 394 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_F6) |
| 320 | 395 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) |
| 321 | 396 | PORT_BIT(0x18, IP_ACTIVE_LOW, IPT_UNUSED) |
| 322 | 397 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) |
| 323 | | PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 398 | PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) |
| 324 | 399 | INPUT_PORTS_END |
| 325 | 400 | |
| 326 | 401 | |
| r15626 | r15627 | |
| 335 | 410 | output_set_value("hardcopy_led", 1); |
| 336 | 411 | output_set_value("l1_led", 1); |
| 337 | 412 | output_set_value("l2_led", 1); |
| 413 | state->m_vgX = 0; |
| 414 | state->m_vgY = 0; |
| 415 | state->m_vgErr = 0; |
| 416 | state->m_vgPat = 0; |
| 417 | state->m_vgWOPS = 0; |
| 338 | 418 | } |
| 339 | 419 | |
| 420 | static PALETTE_INIT( vk100 ) |
| 421 | { |
| 422 | int i; |
| 423 | for (i = 0; i < 8; i++) |
| 424 | palette_set_color_rgb( machine, i, (i&4)?0xFF:0x00, (i&2)?0xFF:0x00, (i&1)?0xFF:0x00); |
| 425 | } |
| 426 | |
| 340 | 427 | static VIDEO_START( vk100 ) |
| 341 | 428 | { |
| 342 | 429 | } |
| r15626 | r15627 | |
| 363 | 450 | |
| 364 | 451 | /* video hardware */ |
| 365 | 452 | MCFG_SCREEN_ADD("screen", RASTER) |
| 453 | //MCFG_SCREEN_RAW_PARAMS(XTAL_45_6192Mhz/3, 882, 0, 720, 370, 0, 350 ) |
| 454 | //MCFG_SCREEN_UPDATE_DEVICE( MDA_MC6845_NAME, mc6845_device, screen_update ) |
| 455 | //MCFG_MC6845_ADD( "crtc", H46505, XTAL_45_6192Mhz/3/16, mc6845_mda_intf) |
| 366 | 456 | MCFG_SCREEN_REFRESH_RATE(50) |
| 367 | 457 | MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| 368 | 458 | MCFG_SCREEN_SIZE(640, 480) |
| 369 | 459 | MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1) |
| 370 | 460 | MCFG_VIDEO_START(vk100) |
| 371 | 461 | MCFG_SCREEN_UPDATE_STATIC(vk100) |
| 372 | | MCFG_PALETTE_LENGTH(2) |
| 373 | | MCFG_PALETTE_INIT(black_and_white) |
| 462 | MCFG_PALETTE_LENGTH(8) |
| 463 | MCFG_PALETTE_INIT(vk100) |
| 374 | 464 | |
| 375 | 465 | |
| 376 | 466 | MCFG_DEFAULT_LAYOUT( layout_vk100 ) |
| r15626 | r15627 | |
| 391 | 481 | ROM_LOAD( "23-018e4-00.rom3.ic53", 0x4000, 0x2000, CRC(b3e7903b) SHA1(8ad6ed25cd9b04a9968aa09ab69ba526d35ca550)) |
| 392 | 482 | ROM_LOAD( "23-190e2-00.rom4.ic54", 0x6000, 0x1000, CRC(ad596fa5) SHA1(b30a24155640d32c1b47a3a16ea33cd8df2624f6)) |
| 393 | 483 | |
| 484 | ROM_REGION( 0x8000, "vram", ROMREGION_ERASEFF ) // 32k of vram |
| 485 | |
| 486 | ROM_REGION( 0x400, "pattern", ROMREGION_ERASEFF ) |
| 487 | /* This is the "PATTERN ROM", (1k*4, 82s137) |
| 488 | * it contains a table of 4 output bits based on input of: (from figure 5-18): |
| 489 | * 4 input bits bank-selected from RAM (a0, a1, a2, a3) |
| 490 | * 2 select bits to choose one of the 4 bits, sourced from the X reg LSBs (a4, a5) |
| 491 | * 3 pattern function bits from WOPS, |
| 492 | * and one enable bit from the pattern register shifter |
| 493 | */ |
| 494 | ROM_LOAD( "wb8201_656f1.m1-7643-5.pr4.ic17", 0x0000, 0x0400, CRC(e8ecf59f) SHA1(49e9d109dad3d203d45471a3f4ca4985d556161f)) // label verified from nigwil's board |
| 495 | |
| 394 | 496 | ROM_REGION( 0x10000, "proms", ROMREGION_ERASEFF ) |
| 395 | 497 | // this is either the "SYNC ROM" or the "VECTOR ROM" which handles timing related stuff. (256*4, 82s129) |
| 396 | 498 | ROM_LOAD( "wb8151_573a2.6301.pr3.ic44", 0x0000, 0x0100, CRC(75885a9f) SHA1(c721dad6a69c291dd86dad102ed3a8ddd620ecc4)) // label verified from nigwil's and andy's board |
| r15626 | r15627 | |
| 398 | 500 | ROM_LOAD( "wb8146_058b1.6309.pr1.ic99", 0x0100, 0x0100, CRC(71b01864) SHA1(e552f5b0bc3f443299282b1da7e9dbfec60e12bf)) // label verified from nigwil's and andy's board |
| 399 | 501 | // this is definitely the "TRANSLATOR ROM" described in figure 5-17 on page 5-27 (256*8, 82s135) |
| 400 | 502 | ROM_LOAD( "wb---0_060b1.6309.pr2.ic77", 0x0200, 0x0100, CRC(198317fc) SHA1(00e97104952b3fbe03a4f18d800d608b837d10ae)) // label verified from nigwil's board |
| 401 | | // this is definitely the "PATTERN ROM", (1k*4, 82s137) |
| 402 | | ROM_LOAD( "wb8201_656f1.m1-7643-5.pr4.ic17", 0x0300, 0x0400, CRC(e8ecf59f) SHA1(49e9d109dad3d203d45471a3f4ca4985d556161f)) // label verified from nigwil's board |
| 403 | 503 | // the following == mb6309 (256x8, 82s135) |
| 404 | | ROM_LOAD( "wb8141_059b1.tbp18s22n.pr5.ic108", 0x0700, 0x0100, NO_DUMP) // label verified from andy's board |
| 504 | ROM_LOAD( "wb8141_059b1.tbp18s22n.pr5.ic108", 0x0300, 0x0100, NO_DUMP) // label verified from andy's board |
| 405 | 505 | // the following = mb6331 (32x8, 82s123) |
| 406 | | ROM_LOAD( "wb8214_297a1.74s288.pr6.ic89", 0x0800, 0x0100, NO_DUMP) // label verified from nigwil's and andy's board |
| 506 | ROM_LOAD( "wb8214_297a1.74s288.pr6.ic89", 0x0400, 0x0100, NO_DUMP) // label verified from nigwil's and andy's board |
| 407 | 507 | ROM_END |
| 408 | 508 | |
| 409 | 509 | /* Driver */ |