Previous 15994 Revisions Next

r15645 Monday 23rd July, 2012 at 05:35:28 UTC by Jonathan Gevaryahu
VK100: Add more debugging defines, remove some unneeded code, and added more comments to TODO and to some registers. [Lord Nightmare]
[src/mess/drivers]vk100.c

src/mess/drivers/vk100.c
r15644r15645
77
88        Todo:
99              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
1113              * 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
1320
1421 Tony DiCenzo, now the director of standards and architecture at Oracle, was on the team that developed the VK100
1522 see http://startup.nmnaturalhistory.org/visitorstories/view.php?ii=79
r15644r15645
9198
9299    - X 0 0 X 0 X (0x1A) = Vector time-out error
93100    X - 0 X X X X (0x30) "
101Not sure exactly what this tests, likely tries firing the vector generator
102state machine and sees if the GO bit ever finishes and goes back to 0
103*/
94104
95*/
96105// show messages related to writes to the 0x4x VG registers
97106#undef VG40_VERBOSE
98107// show messages related to writes to the 0x6x VG registers
r15644r15645
103112#undef KBD_VERBOSE
104113// debug the pattern reg
105114#undef PAT_DEBUG
115// show reads from the two systat registers
116#undef SYSTAT_A_VERBOSE
117#undef SYSTAT_B_VERBOSE
106118
107119#include "emu.h"
108120#include "cpu/i8085/i8085.h"
r15644r15645
144156   UINT8 m_vgDIR;
145157   UINT8 m_vgWOPS;
146158   UINT8 m_BAUD;
147   UINT8 m_EX_TYPE;
159   UINT8 m_VG_MODE;
148160   UINT8 m_LASTVRAM;
149161   UINT8 m_GO;
150162   
r15644r15645
405417WRITE8_MEMBER(vk100_state::vgEX_MOV)
406418{
407419#ifdef VG60_VERBOSE
408   logerror("VG Execute Move 0x64 written: stub!\n");
420   logerror("VG Execute Move 0x64 written with %d\n", data);
409421#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
412423   m_vgPMUL_Count = m_vgPMUL; // load PMUL_Count
413424   m_vgPAT_Mask = 0x100;
414   m_EX_TYPE = 0;
425   m_VG_MODE = 0;
415426   m_GO = 1;
416427   machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg));
417428}
r15644r15645
420431WRITE8_MEMBER(vk100_state::vgEX_DOT)
421432{
422433#ifdef VG60_VERBOSE
423   logerror("VG: 0x65: Execute Dot written: stub!\n");
434   logerror("VG: 0x65: Execute Dot written with %d\n", data);
424435#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
427437   m_vgPMUL_Count = m_vgPMUL; // load PMUL_Count
428438   m_vgPAT_Mask = 0x100; // load vgPAT_Mask
429   m_EX_TYPE = 1;
439   m_VG_MODE = 1;
430440   m_GO = 1;
431441   machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg));
432442}
r15644r15645
435445WRITE8_MEMBER(vk100_state::vgEX_VEC)
436446{
437447#ifdef VG60_VERBOSE
438   logerror("VG: 0x66: Execute Vector written: stub!\n");
448   logerror("VG: 0x66: Execute Vector written with %d\n", data);
439449#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
442450   m_vgPMUL_Count = m_vgPMUL; // load PMUL_Count
443451   m_vgPAT_Mask = 0x100; // load vgPAT_Mask
444   m_EX_TYPE = 2;
452   m_VG_MODE = 2;
445453   m_GO = 1;
446454   machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg));
447455}
r15644r15645
450458WRITE8_MEMBER(vk100_state::vgEX_ER)
451459{
452460#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);
454462#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
457464   m_vgPMUL_Count = m_vgPMUL; // load PMUL_Count
458465   m_vgPAT_Mask = 0x100; // load vgPAT_Mask
459   m_EX_TYPE = 3;
466   m_VG_MODE = 3;
460467   m_GO = 1;
461468   machine().scheduler().timer_set(attotime::zero, FUNC(execute_vg));
462469}
r15644r15645
500507*/
501508READ8_MEMBER(vk100_state::SYSTAT_A)
502509{
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
503513   return ((m_GO?0:1)<<7)|(m_LASTVRAM<<3)|0x7;
504514}
505515
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 */
507524READ8_MEMBER(vk100_state::SYSTAT_B)
508525{
526#ifdef SYSTAT_B_VERBOSE
527   logerror("0x%04X: SYSTAT_B Read!\n", cpu_get_pc(m_maincpu));
528#endif
509529   return ioport("SWITCHES")->read();
510530}
511531
r15644r15645
748768   state->m_vgDIR = 0;
749769   state->m_vgWOPS = 0;
750770   state->m_BAUD = 0;
751   state->m_EX_TYPE = 0;
771   state->m_VG_MODE = 0;
752772   state->m_LASTVRAM = 0xF;
753773   state->m_GO = 0;
754774}
755775
756static 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
768776static PALETTE_INIT( vk100 )
769777{
770778   int i;
r15644r15645
919927   ROM_LOAD( "wb8201_656f1.m1-7643-5.pr4.ic17", 0x0000, 0x0400, CRC(e8ecf59f) SHA1(49e9d109dad3d203d45471a3f4ca4985d556161f)) // label verified from nigwil's board
920928
921929   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)
923931   // 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
924932   ROM_LOAD( "wb---0_060b1.6309.pr2.ic77", 0x0000, 0x0100, CRC(198317fc) SHA1(00e97104952b3fbe03a4f18d800d608b837d10ae)) // label verified from nigwil's board
925933
926934   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)
928936   ROM_LOAD( "wb8151_573a2.6301.pr3.ic44", 0x0000, 0x0100, CRC(75885a9f) SHA1(c721dad6a69c291dd86dad102ed3a8ddd620ecc4)) // label verified from nigwil's and andy's board
929937   // this is probably the "SYNC ROM" since only addresses 0-6 are used within every 8 byte chunk. (256*8, 82s135)
930938   ROM_LOAD( "wb8146_058b1.6309.pr1.ic99", 0x0100, 0x0100, CRC(71b01864) SHA1(e552f5b0bc3f443299282b1da7e9dbfec60e12bf))  // label verified from nigwil's and andy's board
r15644r15645
937945/* Driver */
938946
939947/*    YEAR  NAME    PARENT  COMPAT   MACHINE    INPUT    INIT    COMPANY                       FULLNAME       FLAGS */
940COMP( 1980, vk100,  0,      0,       vk100,     vk100,   vk100,  "Digital Equipment Corporation", "VK100 'GIGI'", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND)
948COMP( 1980, vk100,  0,      0,       vk100,     vk100,   0,  "Digital Equipment Corporation", "VK100 'GIGI'", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team