Previous 15994 Revisions Next

r15627 Thursday 19th July, 2012 at 11:05:37 UTC by Jonathan Gevaryahu
vk100: miscellaneous progress, slight cleanup to keyboard, stubbed and implemented a bunch of vector generator addresses [Lord Nightmare]
[src/mess/drivers]vk100.c

src/mess/drivers/vk100.c
r15626r15627
77
88        Todo: attach hd46505sp CRTC
99              hook up vram
10              - vram space is now present but not hooked to anything
1011              emulate vector generator hardware
12              - stubbing registers:
13                done: X, Y, Err, Pattern, WOPS
1114
1215 Tony DiCenzo, now the director of standards and architecture at Oracle, was on the team that developed the VK100
1316 see http://startup.nmnaturalhistory.org/visitorstories/view.php?ii=79
r15626r15627
117120   required_device<device_t> m_speaker;
118121   //required_device<device_t> m_uart;
119122
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   
121139   DECLARE_WRITE8_MEMBER(KBDW);
122140   DECLARE_READ8_MEMBER(vk100_keyboard_column_r);
123141};
124142
143/*
144void 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 */
150WRITE8_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 */
158WRITE8_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 */
166WRITE8_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 */
173WRITE8_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 */
185WRITE8_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) */
193WRITE8_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
125200/* port 0x68: "KBDW" d7 is beeper, d6 is keyclick, d5-d0 are keyboard LEDS */
126201WRITE8_MEMBER(vk100_state::KBDW)
127202{
r15626r15627
135210   if (BIT(data, 6)) logerror("kb keyclick bit 6 set: not emulated yet (multivibrator)!\n");
136211   beep_set_state( m_speaker, BIT(data, 7));
137212   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);
141213}
142214
143215READ8_MEMBER(vk100_state::vk100_keyboard_column_r)
r15626r15627
145217   UINT8 code;
146218   char kbdcol[8];
147219   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();
150221   logerror("Keyboard column %X read, returning %02X\n", offset&0xF, code);
151222   return code;
152223}
r15626r15627
164235   //AM_RANGE(0x00, 0x00) AM_WRITE(crtc_addr_w)
165236   //AM_RANGE(0x01, 0x01) AM_READWRITE(crtc_data_r, crtc_data_w)
166237   // 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)
172241   //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)
174243   //AM_RANGE (0x47, 0x47) AM_READWRITE(pmul)   //LD PMUL (pattern multiplier) (should this be write only?)
175244   //AM_RANGE (0x60, 0x60) AM_WRITE(du)     //LD DU
176245   //AM_RANGE (0x61, 0x61) AM_WRITE(dvm)    //LD DVM
177246   //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)
179248   //AM_RANGE (0x64, 0x64) AM_WRITE(mov)    //EX MOV
180249   //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
182251   //AM_RANGE (0x67, 0x67) AM_WRITE(er)     //EX ER
183252   AM_RANGE (0x68, 0x68) AM_WRITE(KBDW)   //KBDW
184253   //AM_RANGE (0x6C, 0x6C) AM_WRITE(baud)   //LD BAUD (baud rate clock divider setting for i8251 tx and rx clocks)
r15626r15627
200269
201270/* Input ports */
202271static 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
204273      PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_UNUSED)
205274      PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps lock") PORT_CODE(KEYCODE_CAPSLOCK)
206275      PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT)
207276   PORT_START("COL0")
208277      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
211280   PORT_START("COL1")
212281      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Set Up") PORT_CODE(KEYCODE_F5)
213282      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC)
r15626r15627
215284      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED)
216285      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num Enter") PORT_CODE(KEYCODE_ENTER_PAD)
217286      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)
219288   PORT_START("COL2")
220289      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1)
221290      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q)
r15626r15627
223292      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("No scroll") PORT_CODE(KEYCODE_LALT)
224293      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 1") PORT_CODE(KEYCODE_1_PAD)
225294      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)
227296   PORT_START("COL3")
228297      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2)
229298      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W)
r15626r15627
231300      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z)
232301      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 2") PORT_CODE(KEYCODE_2_PAD)
233302      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)
235304   PORT_START("COL4")
236305      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3)
237306      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E)
r15626r15627
239308      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X)
240309      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 3") PORT_CODE(KEYCODE_3_PAD)
241310      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)
243312   PORT_START("COL5")
244313      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4)
245314      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R)
r15626r15627
247316      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C)
248317      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 4") PORT_CODE(KEYCODE_4_PAD)
249318      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)
251320   PORT_START("COL6")
252321      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5)
253322      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T)
r15626r15627
255324      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V)
256325      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 5") PORT_CODE(KEYCODE_5_PAD)
257326      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)
259328   PORT_START("COL7")
260329      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6)
261330      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_Y)
r15626r15627
263332      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B)
264333      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 6") PORT_CODE(KEYCODE_6_PAD)
265334      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)
267336   PORT_START("COL8")
268337      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7)
269338      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U)
r15626r15627
271340      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE)
272341      PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Num 7") PORT_CODE(KEYCODE_7_PAD)
273342      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)
275344   PORT_START("COL9")
276345      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8)
277346      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I)
278347      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K)
279348      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N)
280349      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)
282352   PORT_START("COLA")
283353      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9)
284354      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O)
285355      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L)
286356      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M)
287357      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)
289360   PORT_START("COLB")
290361      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0)
291362      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P)
292363      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(";") PORT_CODE(KEYCODE_COLON)
293364      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(",") PORT_CODE(KEYCODE_COMMA)
294365      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)
296368   PORT_START("COLC")
297369      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("-") PORT_CODE(KEYCODE_MINUS)
298370      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE)
299371      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("'") PORT_CODE(KEYCODE_QUOTE)
300372      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP)
301373      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)
303376   PORT_START("COLD")
304377      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("=") PORT_CODE(KEYCODE_EQUALS)
305378      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE)
306379      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
307380      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/") PORT_CODE(KEYCODE_SLASH)
308381      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)
310384   PORT_START("COLE")
311385      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("~") PORT_CODE(KEYCODE_TILDE)
312386      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Delete") PORT_CODE(KEYCODE_DEL)
313387      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH)
314388      PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line feed") PORT_CODE(KEYCODE_RALT)
315389      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)
317392   PORT_START("COLF")
318393      PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Backspace") PORT_CODE(KEYCODE_BACKSPACE)
319394      PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_F6)
320395      PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER)
321396      PORT_BIT(0x18, IP_ACTIVE_LOW, IPT_UNUSED)
322397      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)
324399INPUT_PORTS_END
325400
326401
r15626r15627
335410   output_set_value("hardcopy_led", 1);
336411   output_set_value("l1_led", 1);
337412   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;
338418}
339419
420static 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
340427static VIDEO_START( vk100 )
341428{
342429}
r15626r15627
363450
364451   /* video hardware */
365452   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)
366456   MCFG_SCREEN_REFRESH_RATE(50)
367457   MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
368458   MCFG_SCREEN_SIZE(640, 480)
369459   MCFG_SCREEN_VISIBLE_AREA(0, 640-1, 0, 480-1)
370460   MCFG_VIDEO_START(vk100)
371461   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)
374464
375465
376466   MCFG_DEFAULT_LAYOUT( layout_vk100 )
r15626r15627
391481   ROM_LOAD( "23-018e4-00.rom3.ic53", 0x4000, 0x2000, CRC(b3e7903b) SHA1(8ad6ed25cd9b04a9968aa09ab69ba526d35ca550))
392482   ROM_LOAD( "23-190e2-00.rom4.ic54", 0x6000, 0x1000, CRC(ad596fa5) SHA1(b30a24155640d32c1b47a3a16ea33cd8df2624f6))
393483
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   
394496   ROM_REGION( 0x10000, "proms", ROMREGION_ERASEFF )
395497   // this is either the "SYNC ROM" or the "VECTOR ROM" which handles timing related stuff. (256*4, 82s129)
396498   ROM_LOAD( "wb8151_573a2.6301.pr3.ic44", 0x0000, 0x0100, CRC(75885a9f) SHA1(c721dad6a69c291dd86dad102ed3a8ddd620ecc4)) // label verified from nigwil's and andy's board
r15626r15627
398500   ROM_LOAD( "wb8146_058b1.6309.pr1.ic99", 0x0100, 0x0100, CRC(71b01864) SHA1(e552f5b0bc3f443299282b1da7e9dbfec60e12bf))  // label verified from nigwil's and andy's board
399501   // this is definitely the "TRANSLATOR ROM" described in figure 5-17 on page 5-27 (256*8, 82s135)
400502   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
403503   // 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
405505   // 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
407507ROM_END
408508
409509/* Driver */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team