Previous 15994 Revisions Next

r15612 Monday 16th July, 2012 at 13:49:55 UTC by Jonathan Gevaryahu
VK100: hook up vblank interrupt (critical selftest now passes);
add layout for LEDS, beginning of skeleton keyboard support.
[Lord Nightmare]
[src/mess]mess.mak
[src/mess/drivers]vk100.c
[src/mess/layout]vk100.lay*

src/mess/layout/vk100.lay
r0r15612
1<!-- Basic display of LEDs for the DEC VK100, based on VT100 layout -->
2
3<mamelayout version="2">
4
5   <element name="red_led">
6      <disk>
7         <color red="1.0" green="0.0" blue="0.0" />
8      </disk>
9   </element>
10
11   <element name="ON_LINE">
12      <text string="ON LINE">
13         <color red="1.0" green="1.0" blue="1.0" />
14      </text>
15   </element>
16   <element name="LOCAL">
17      <text string="LOCAL">
18         <color red="1.0" green="1.0" blue="1.0" />
19      </text>
20   </element>
21   <element name="NOSCROLL">
22      <text string="NO SCROLL">
23         <color red="1.0" green="1.0" blue="1.0" />
24      </text>
25   </element>
26   <element name="BASIC">
27      <text string="BASIC">
28         <color red="1.0" green="1.0" blue="1.0" />
29      </text>
30   </element>
31   <element name="HARDCOPY">
32      <text string="HARD COPY">
33         <color red="1.0" green="1.0" blue="1.0" />
34      </text>
35   </element>
36   <element name="L1">
37      <text string="L1">
38         <color red="1.0" green="1.0" blue="1.0" />
39      </text>
40   </element>
41   <element name="L2">
42      <text string="L2">
43         <color red="1.0" green="1.0" blue="1.0" />
44      </text>
45   </element>
46   <element name="background">
47      <rect>
48         <bounds left="0" top="0" right="1" bottom="1" />
49         <color red="0.0" green="0.0" blue="0.0" />
50      </rect>
51   </element>
52
53   <view name="Keyboard LEDs">
54      <bezel name="online_txt" element="ON_LINE">
55         <bounds left="0" right="100" top="800" bottom="820" />
56      </bezel>
57      <bezel name="online_led" element="red_led">
58         <bounds left="40" right="60" top="830" bottom="850" />
59      </bezel>
60
61      <bezel name="local_txt" element="LOCAL">
62         <bounds left="100" right="200" top="800" bottom="820" />
63      </bezel>
64      <bezel name="local_led" element="red_led">
65         <bounds left="140" right="160" top="830" bottom="850" />
66      </bezel>
67
68      <bezel name="noscroll_txt" element="NOSCROLL">
69         <bounds left="200" right="300" top="800" bottom="820" />
70      </bezel>
71      <bezel name="noscroll_led" element="red_led">
72         <bounds left="240" right="260" top="830" bottom="850" />
73      </bezel>
74
75      <bezel name="basic_txt" element="BASIC">
76         <bounds left="300" right="400" top="800" bottom="820" />
77      </bezel>
78      <bezel name="basic_led" element="red_led">
79         <bounds left="340" right="360" top="830" bottom="850" />
80      </bezel>
81
82      <bezel name="hardcopy_txt" element="HARDCOPY">
83         <bounds left="400" right="500" top="800" bottom="820" />
84      </bezel>
85      <bezel name="hardcopy_led" element="red_led">
86         <bounds left="440" right="460" top="830" bottom="850" />
87      </bezel>
88
89      <bezel name="l1_txt" element="L1">
90         <bounds left="500" right="600" top="800" bottom="820" />
91      </bezel>
92      <bezel name="l1_led" element="red_led">
93         <bounds left="540" right="560" top="830" bottom="850" />
94      </bezel>
95
96      <bezel name="l2_txt" element="L2">
97         <bounds left="600" right="700" top="800" bottom="820" />
98      </bezel>
99      <bezel name="l2_led" element="red_led">
100         <bounds left="640" right="660" top="830" bottom="850" />
101      </bezel>
102      <bezel element="background">
103         <bounds left="0" top="850" right="1024" bottom="870" />
104      </bezel>
105      <screen index="0">
106         <bounds x="0" y="0" width="1024" height="768" />
107      </screen>
108   </view>
109
110</mamelayout>
No newline at end of file
src/mess/drivers/vk100.c
r15611r15612
55        12/05/2009 Skeleton driver.
66        28/07/2009 added Guru-readme(TM)
77
8        Todo: attach vblank int
9              attach hd46505sp CRTC
8        Todo: attach hd46505sp CRTC
109              emulate vector generator hardware
1110              attach keyboard
12              calculate or measure the correct beeper frequency
1311****************************************************************************/
1412/*
1513DEC VK100
r15611r15612
1715
1816This is a VK100 terminal, otherwise known as a DEC Gigi graphics terminal.
1917There's a technical manual dated 1982 here:
20http://www.computer.museum.uq.edu.au/./pdf/EK-VK100-TM-001%20VK100%20Technical%20Manual.pdf
18http://web.archive.org/web/20091015205827/http://www.computer.museum.uq.edu.au/pdf/EK-VK100-TM-001%20VK100%20Technical%20Manual.pdf
19Installation and owner's manual is at:
20http://www.bitsavers.org/pdf/dec/terminal/gigi/EK-VK100-IN-002_GIGI_Terminal_Installation_and_Owners_Manual_Apr81.pdf
2121
2222PCB Layout
2323----------
2424
2525VK100 LOGICBOARD
2626    |-------|    |---------|  |---------|    |-| |-| |-|  |-|
27|---|-POWER-|----|---EIA---|--|HARD-COPY|----|B|-|G|-|R|--|-|----------|
27|---|-20 mA-|----|---EIA---|--|HARD-COPY|----|B|-|G|-|R|--|-|----------|
2828|                                                         BW   DSW(8)  |
2929|                                                             POWER    |
3030|                 PR2                                                  |
r15611r15612
7272
7373    - X 0 0 0 X X (0x1C) = CRT Controller error
7474    X - 0 X X X X (0x30) "
75This test writes 0xF to port 00 (crtc address reg) and writes a pattern to it
76via port 01 (crtc data reg) then reads it back and checks to be sure the data
77matches.
7578
7679    - X 0 0 X 0 0 (0x1B) = CRT Controller time-out
7780    X - 0 X X X X (0x30) "
81This 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.
7883
7984    - X 0 0 X 0 X (0x1A) = Vector time-out error
8085    X - 0 X X X X (0x30) "
r15611r15612
8792#include "sound/beep.h"
8893#include "video/mc6845.h"
8994#include "machine/i8251.h"
95#include "vk100.lh"
9096
9197class vk100_state : public driver_device
9298{
r15611r15612
94100   vk100_state(const machine_config &mconfig, device_type type, const char *tag)
95101      : driver_device(mconfig, type, tag),
96102      m_maincpu(*this, "maincpu"),
97      m_screen(*this, "screen")//,
103      m_screen(*this, "screen"),
98104      //m_crtc(*this, "hd46505sp"),
105      m_speaker(*this, BEEPER_TAG)//,
99106      //m_uart(*this, "i8251")
100107      { }
101108   required_device<cpu_device> m_maincpu;
102109   required_device<screen_device> m_screen;
103110   //required_device<mc6845_device> m_crtc;
111   required_device<device_t> m_speaker;
104112   //required_device<device_t> m_uart;
105113
106114   //UINT8 m_statusLED;
107   UINT8 m_key_scan;
108   DECLARE_WRITE8_MEMBER(led_beep_write);
115   DECLARE_WRITE8_MEMBER(KBDW);
109116};
110117
111WRITE8_MEMBER(vk100_state::led_beep_write)
118/* port 0x68: "KBDW" d7 is beeper, d6 is keyclick, d5-d0 are keyboard LEDS */
119WRITE8_MEMBER(vk100_state::KBDW)
112120{
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));
132130   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);
136134}
137135
138136static ADDRESS_MAP_START(vk100_mem, AS_PROGRAM, 8, vk100_state)
139137   ADDRESS_MAP_UNMAP_HIGH
140138   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)
142140   AM_RANGE( 0x8000, 0xbfff ) AM_RAM
143141ADDRESS_MAP_END
144142
145143static ADDRESS_MAP_START(vk100_io, AS_IO, 8, vk100_state)
146144   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
148146   //AM_RANGE(0x00, 0x00) AM_WRITE(crtc_addr_w)
149147   //AM_RANGE(0x01, 0x01) AM_READWRITE(crtc_data_r, crtc_data_w)
150148   // 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
r15611r15612
164162   //AM_RANGE (0x65, 0x65) AM_WRITE(dot)    //EX DOT
165163   //AM_RANGE (0x66, 0x66) AM_WRITE(vec)    //EX VEC
166164   //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
168166   //AM_RANGE (0x6C, 0x6C) AM_WRITE(baud)   //LD BAUD (baud rate clock divider setting for i8251 tx and rx clocks)
169167   //AM_RANGE (0x70, 0x70) AM_WRITE(comd)   //LD COMD (one of the i8251 regs)
170168   //AM_RANGE (0x71, 0x71) AM_WRITE(com)    //LD COM (the other i8251 reg)
171169   //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?)
173171   //AM_RANGE (0x7C, 0x7C) AM_WRITE(unknown_7C)
174172   //AM_RANGE (0x40, 0x40) AM_READ(systat_a) // SYSTAT A (dipswitches?)
175173   //AM_RANGE (0x48, 0x48) AM_READ(systat_b) // SYSTAT B (dipswitches?)
r15611r15612
184182
185183/* Input ports */
186184static 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
187299INPUT_PORTS_END
188300
189301
190302static MACHINE_RESET( vk100 )
191303{
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);
192313}
193314
194315static VIDEO_START( vk100 )
r15611r15612
200321   return 0;
201322}
202323
324static 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
203330static MACHINE_CONFIG_START( vk100, vk100_state )
204331   /* basic machine hardware */
205332   MCFG_CPU_ADD("maincpu", I8085A, XTAL_5_0688MHz)
206333   MCFG_CPU_PROGRAM_MAP(vk100_mem)
207334   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)
209336
210337   MCFG_MACHINE_RESET(vk100)
211338
r15611r15612
220347   MCFG_PALETTE_LENGTH(2)
221348   MCFG_PALETTE_INIT(black_and_white)
222349
350
351   MCFG_DEFAULT_LAYOUT( layout_vk100 )
352
223353   MCFG_SPEAKER_STANDARD_MONO( "mono" )
224354   MCFG_SOUND_ADD( BEEPER_TAG, BEEP, 0 )
225355   MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 0.25 )
src/mess/mess.mak
r15611r15612
21602160$(MESS_DRIVERS)/vidbrain.o:   $(MESS_LAYOUT)/vidbrain.lh
21612161$(MESS_DRIVERS)/votrpss.o:   $(MESS_LAYOUT)/votrpss.lh
21622162$(MESS_DRIVERS)/votrtnt.o:   $(MESS_LAYOUT)/votrtnt.lh
2163$(MESS_DRIVERS)/vk100.o:   $(MESS_LAYOUT)/vk100.lh
21632164$(MESS_DRIVERS)/vt100.o:   $(MESS_LAYOUT)/vt100.lh
21642165$(MESS_DRIVERS)/wswan.o:   $(MESS_LAYOUT)/wswan.lh
21652166$(MESS_DRIVERS)/x68k.o:      $(MESS_LAYOUT)/x68000.lh

Previous 15994 Revisions Next


© 1998-2018 The MESS Team