src/mess/drivers/vk100.c
| r15644 | r15645 | |
| 7 | 7 | |
| 8 | 8 | Todo: |
| 9 | 9 | handle blink attribute in the vram display renderer |
| 10 | | fix vector generator hardware enough to write stuff to vram LEGIBLY |
| 10 | * figure out the timing for this, framewise |
| 11 | guessing its some power of 2 vblanks clocking a j/k flipflop |
| 12 | * fix vector generator hardware enough to pass the startup self test |
| 11 | 13 | * note that since two proms aren't dumped yet some stuff will have to be HLE'd for now |
| 12 | | hook up baud generator to i8251 rx and tx clocks |
| 14 | btw, dump those two proms from andy's board |
| 15 | * figure out the remaining 3 bits in the SOPS register. |
| 16 | two control the 8251 serial hookup, but what does the third do? |
| 17 | * figure out the correct meaning of systat b register |
| 18 | * figure out how the dipswitches get read, they're hooked up wrong |
| 19 | * hook up baud generator to i8251 rx and tx clocks |
| 13 | 20 | |
| 14 | 21 | Tony DiCenzo, now the director of standards and architecture at Oracle, was on the team that developed the VK100 |
| 15 | 22 | see http://startup.nmnaturalhistory.org/visitorstories/view.php?ii=79 |
| r15644 | r15645 | |
| 91 | 98 | |
| 92 | 99 | - X 0 0 X 0 X (0x1A) = Vector time-out error |
| 93 | 100 | X - 0 X X X X (0x30) " |
| 101 | Not sure exactly what this tests, likely tries firing the vector generator |
| 102 | state machine and sees if the GO bit ever finishes and goes back to 0 |
| 103 | */ |
| 94 | 104 | |
| 95 | | */ |
| 96 | 105 | // show messages related to writes to the 0x4x VG registers |
| 97 | 106 | #undef VG40_VERBOSE |
| 98 | 107 | // show messages related to writes to the 0x6x VG registers |
| r15644 | r15645 | |
| 103 | 112 | #undef KBD_VERBOSE |
| 104 | 113 | // debug the pattern reg |
| 105 | 114 | #undef PAT_DEBUG |
| 115 | // show reads from the two systat registers |
| 116 | #undef SYSTAT_A_VERBOSE |
| 117 | #undef SYSTAT_B_VERBOSE |
| 106 | 118 | |
| 107 | 119 | #include "emu.h" |
| 108 | 120 | #include "cpu/i8085/i8085.h" |
| r15644 | r15645 | |
| 144 | 156 | UINT8 m_vgDIR; |
| 145 | 157 | UINT8 m_vgWOPS; |
| 146 | 158 | UINT8 m_BAUD; |
| 147 | | UINT8 m_EX_TYPE; |
| 159 | UINT8 m_VG_MODE; |
| 148 | 160 | UINT8 m_LASTVRAM; |
| 149 | 161 | UINT8 m_GO; |
| 150 | 162 | |
| r15644 | r15645 | |
| 405 | 417 | WRITE8_MEMBER(vk100_state::vgEX_MOV) |
| 406 | 418 | { |
| 407 | 419 | #ifdef VG60_VERBOSE |
| 408 | | logerror("VG Execute Move 0x64 written: stub!\n"); |
| 420 | logerror("VG Execute Move 0x64 written with %d\n", data); |
| 409 | 421 | #endif |
| 410 | | // TODO: short term: do some calculations here and print the expected starting ram address etc |
| 411 | | // TODO: long term: fire a timer and actually move the ram with correct timing |
| 422 | // TODO: what the heck does this DO? dump vector prom |
| 412 | 423 | m_vgPMUL_Count = m_vgPMUL; // load PMUL_Count |
| 413 | 424 | m_vgPAT_Mask = 0x100; |
| 414 | | m_EX_TYPE = 0; |
| 425 | m_VG_MODE = 0; |
| 415 | 426 | m_GO = 1; |
| 416 | 427 | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 417 | 428 | } |
| r15644 | r15645 | |
| 420 | 431 | WRITE8_MEMBER(vk100_state::vgEX_DOT) |
| 421 | 432 | { |
| 422 | 433 | #ifdef VG60_VERBOSE |
| 423 | | logerror("VG: 0x65: Execute Dot written: stub!\n"); |
| 434 | logerror("VG: 0x65: Execute Dot written with %d\n", data); |
| 424 | 435 | #endif |
| 425 | | // TODO: short term: do some calculations here and print the expected starting ram address etc |
| 426 | | // TODO: long term: fire a timer and actually draw the dot to ram with correct timing |
| 436 | // TODO: what the heck does this DO? dump vector prom |
| 427 | 437 | m_vgPMUL_Count = m_vgPMUL; // load PMUL_Count |
| 428 | 438 | m_vgPAT_Mask = 0x100; // load vgPAT_Mask |
| 429 | | m_EX_TYPE = 1; |
| 439 | m_VG_MODE = 1; |
| 430 | 440 | m_GO = 1; |
| 431 | 441 | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 432 | 442 | } |
| r15644 | r15645 | |
| 435 | 445 | WRITE8_MEMBER(vk100_state::vgEX_VEC) |
| 436 | 446 | { |
| 437 | 447 | #ifdef VG60_VERBOSE |
| 438 | | logerror("VG: 0x66: Execute Vector written: stub!\n"); |
| 448 | logerror("VG: 0x66: Execute Vector written with %d\n", data); |
| 439 | 449 | #endif |
| 440 | | // TODO: short term: do some calculations here and print the expected starting ram address etc |
| 441 | | // TODO: long term: fire a timer and actually draw the vector to ram with correct timing |
| 442 | 450 | m_vgPMUL_Count = m_vgPMUL; // load PMUL_Count |
| 443 | 451 | m_vgPAT_Mask = 0x100; // load vgPAT_Mask |
| 444 | | m_EX_TYPE = 2; |
| 452 | m_VG_MODE = 2; |
| 445 | 453 | m_GO = 1; |
| 446 | 454 | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 447 | 455 | } |
| r15644 | r15645 | |
| 450 | 458 | WRITE8_MEMBER(vk100_state::vgEX_ER) |
| 451 | 459 | { |
| 452 | 460 | #ifdef VG60_VERBOSE |
| 453 | | logerror("VG: 0x67: Execute Arbitrary 'error' vector written: stub!\n"); |
| 461 | logerror("VG: 0x67: Execute Arbitrary 'error' vector written with %d\n", data); |
| 454 | 462 | #endif |
| 455 | | // TODO: short term: do some calculations here and print the expected starting ram address etc |
| 456 | | // TODO: long term: fire a timer and actually use the state machine to draw the vector to ram with correct timing |
| 463 | // TODO: what the heck does this DO? dump vector prom |
| 457 | 464 | m_vgPMUL_Count = m_vgPMUL; // load PMUL_Count |
| 458 | 465 | m_vgPAT_Mask = 0x100; // load vgPAT_Mask |
| 459 | | m_EX_TYPE = 3; |
| 466 | m_VG_MODE = 3; |
| 460 | 467 | m_GO = 1; |
| 461 | 468 | machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg)); |
| 462 | 469 | } |
| r15644 | r15645 | |
| 500 | 507 | */ |
| 501 | 508 | READ8_MEMBER(vk100_state::SYSTAT_A) |
| 502 | 509 | { |
| 510 | #ifdef SYSTAT_A_VERBOSE |
| 511 | if (cpu_get_pc(m_maincpu) != 0x31D) logerror("0x%04X: SYSTAT_A Read!\n", cpu_get_pc(m_maincpu)); |
| 512 | #endif |
| 503 | 513 | return ((m_GO?0:1)<<7)|(m_LASTVRAM<<3)|0x7; |
| 504 | 514 | } |
| 505 | 515 | |
| 506 | | /* port 0x48: "SYSTAT B"; NOT documented in the tech manual */ |
| 516 | /* port 0x48: "SYSTAT B"; NOT documented in the tech manual at all. |
| 517 | * ? ? ? ? ? ? ? ? |
| 518 | * d7 d6 d5 d4 d3 d2 d1 d0 |
| 519 | * according to the code at 606, the systat b register has something |
| 520 | * to do with the uart 8251, though what exactly is unclear. |
| 521 | * it XORs the read of systat_b with the E register (which holds 0x6) |
| 522 | * and checks the result |
| 523 | */ |
| 507 | 524 | READ8_MEMBER(vk100_state::SYSTAT_B) |
| 508 | 525 | { |
| 526 | #ifdef SYSTAT_B_VERBOSE |
| 527 | logerror("0x%04X: SYSTAT_B Read!\n", cpu_get_pc(m_maincpu)); |
| 528 | #endif |
| 509 | 529 | return ioport("SWITCHES")->read(); |
| 510 | 530 | } |
| 511 | 531 | |
| r15644 | r15645 | |
| 748 | 768 | state->m_vgDIR = 0; |
| 749 | 769 | state->m_vgWOPS = 0; |
| 750 | 770 | state->m_BAUD = 0; |
| 751 | | state->m_EX_TYPE = 0; |
| 771 | state->m_VG_MODE = 0; |
| 752 | 772 | state->m_LASTVRAM = 0xF; |
| 753 | 773 | state->m_GO = 0; |
| 754 | 774 | } |
| 755 | 775 | |
| 756 | | static DRIVER_INIT( vk100 ) |
| 757 | | { |
| 758 | | /*UINT8 *gfx = machine.root_device().memregion("vram")->base(); |
| 759 | | // for debug purposes, set the entire screen to a hash pattern |
| 760 | | for (int i = 0; i < 0x8000; i+=2) |
| 761 | | { |
| 762 | | gfx[i] = 0xFA; |
| 763 | | gfx[i+1] = 0xAA; |
| 764 | | //gfx[i] = (((i&0x1)?0x00:0xFF)^((i&0x100)?0x00:0xff)); |
| 765 | | }*/ |
| 766 | | } |
| 767 | | |
| 768 | 776 | static PALETTE_INIT( vk100 ) |
| 769 | 777 | { |
| 770 | 778 | int i; |
| r15644 | r15645 | |
| 919 | 927 | ROM_LOAD( "wb8201_656f1.m1-7643-5.pr4.ic17", 0x0000, 0x0400, CRC(e8ecf59f) SHA1(49e9d109dad3d203d45471a3f4ca4985d556161f)) // label verified from nigwil's board |
| 920 | 928 | |
| 921 | 929 | ROM_REGION(0x100, "trans", ROMREGION_ERASEFF ) |
| 922 | | // this is definitely the "TRANSLATOR ROM" described in figure 5-17 on page 5-27 (256*8, 82s135) |
| 930 | // this is the "TRANSLATOR ROM" described in figure 5-17 on page 5-27 (256*8, 82s135) |
| 923 | 931 | // it contains a table of 256 values which skips every fourth value so 00 01 02 04 05 06 08.. etc, wraps at the end |
| 924 | 932 | ROM_LOAD( "wb---0_060b1.6309.pr2.ic77", 0x0000, 0x0100, CRC(198317fc) SHA1(00e97104952b3fbe03a4f18d800d608b837d10ae)) // label verified from nigwil's board |
| 925 | 933 | |
| 926 | 934 | ROM_REGION( 0x400, "proms", ROMREGION_ERASEFF ) |
| 927 | | // not sure what this prom is, it may relate somehow to addressing or modifying vram. (256*4, 82s129) |
| 935 | // not sure what this prom is, it may relate somehow to addressing or modifying vram, or the systat b register and dipswitches. (256*4, 82s129) |
| 928 | 936 | ROM_LOAD( "wb8151_573a2.6301.pr3.ic44", 0x0000, 0x0100, CRC(75885a9f) SHA1(c721dad6a69c291dd86dad102ed3a8ddd620ecc4)) // label verified from nigwil's and andy's board |
| 929 | 937 | // this is probably the "SYNC ROM" since only addresses 0-6 are used within every 8 byte chunk. (256*8, 82s135) |
| 930 | 938 | ROM_LOAD( "wb8146_058b1.6309.pr1.ic99", 0x0100, 0x0100, CRC(71b01864) SHA1(e552f5b0bc3f443299282b1da7e9dbfec60e12bf)) // label verified from nigwil's and andy's board |
| r15644 | r15645 | |
| 937 | 945 | /* Driver */ |
| 938 | 946 | |
| 939 | 947 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 940 | | COMP( 1980, vk100, 0, 0, vk100, vk100, vk100, "Digital Equipment Corporation", "VK100 'GIGI'", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND) |
| 948 | COMP( 1980, vk100, 0, 0, vk100, vk100, 0, "Digital Equipment Corporation", "VK100 'GIGI'", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND) |