trunk/src/mess/drivers/spc1000.c
r241481 | r241482 | |
8 | 8 | 2014-02-16 Added cassette, many games are playable |
9 | 9 | |
10 | 10 | ToDo: |
11 | | - Some games have keyboard problems (e.g. Invaders, Panzerspitze) |
12 | | - Some games freeze at start (e.g. Super Xevious) |
13 | 11 | - Find out if any of the unconnected parts of 6000,4000,4001 are used |
14 | 12 | |
15 | 13 | |
r241481 | r241482 | |
24 | 22 | small ics. And of course, no schematic. |
25 | 23 | |
26 | 24 | |
27 | | 2014-10-11: Replaced above code with MESS-compliant code [Meso Kim] |
| 25 | 2014-10-11: Replaced above code with MESS-compliant code [Meeso Kim] |
28 | 26 | |
29 | 27 | ****************************************************************************/ |
30 | 28 | |
r241481 | r241482 | |
54 | 52 | , m_pio(*this, "d8255_master") |
55 | 53 | , m_ram(*this, RAM_TAG) |
56 | 54 | , m_cass(*this, "cassette") |
| 55 | , m_io_kb(*this, "LINE") |
57 | 56 | , m_io_joy(*this, "JOY") |
58 | 57 | {} |
59 | 58 | |
60 | | DECLARE_WRITE8_MEMBER(spc1000_iplk_w); |
61 | | DECLARE_READ8_MEMBER(spc1000_iplk_r); |
| 59 | DECLARE_WRITE8_MEMBER(iplk_w); |
| 60 | DECLARE_READ8_MEMBER(iplk_r); |
62 | 61 | DECLARE_WRITE_LINE_MEMBER(irq_w); |
63 | | DECLARE_WRITE8_MEMBER(spc1000_gmode_w); |
64 | | DECLARE_READ8_MEMBER(spc1000_gmode_r); |
| 62 | DECLARE_WRITE8_MEMBER(gmode_w); |
| 63 | DECLARE_READ8_MEMBER(gmode_r); |
65 | 64 | DECLARE_READ8_MEMBER(porta_r); |
66 | 65 | DECLARE_READ8_MEMBER(mc6847_videoram_r); |
67 | 66 | DECLARE_WRITE8_MEMBER(cass_w); |
68 | | DECLARE_WRITE8_MEMBER(spc1000_sd725_w); |
69 | | DECLARE_READ8_MEMBER(spc1000_sd725_r); |
| 67 | DECLARE_WRITE8_MEMBER(sd725_w); |
| 68 | DECLARE_READ8_MEMBER(sd725_r); |
70 | 69 | DECLARE_WRITE8_MEMBER(fdc_8255_b_w); |
71 | 70 | DECLARE_READ8_MEMBER(fdc_8255_c_r); |
72 | 71 | DECLARE_WRITE8_MEMBER(fdc_8255_c_w); |
73 | 72 | DECLARE_READ8_MEMBER(upd765_tc_r); |
74 | 73 | DECLARE_WRITE8_MEMBER(fdc_control_w); |
| 74 | DECLARE_READ8_MEMBER(keyboard_r); |
75 | 75 | MC6847_GET_CHARROM_MEMBER(get_char_rom) |
76 | 76 | { |
77 | 77 | return m_p_videoram[0x1000 + (ch & 0x7f) * 16 + line]; |
r241481 | r241482 | |
92 | 92 | required_device<i8255_device> m_pio; |
93 | 93 | required_device<ram_device> m_ram; |
94 | 94 | required_device<cassette_image_device> m_cass; |
| 95 | required_ioport_array<10> m_io_kb; |
95 | 96 | required_ioport m_io_joy; |
96 | 97 | |
97 | 98 | floppy_image_device *m_fd0; |
r241481 | r241482 | |
117 | 118 | AM_RANGE(0x8000, 0xffff) AM_READ_BANK("bank3") AM_WRITE_BANK("bank4") |
118 | 119 | ADDRESS_MAP_END |
119 | 120 | |
120 | | WRITE8_MEMBER(spc1000_state::spc1000_iplk_w) |
| 121 | WRITE8_MEMBER(spc1000_state::iplk_w) |
121 | 122 | { |
122 | 123 | m_IPLK = m_IPLK ? 0 : 1; |
123 | 124 | membank("bank1")->set_entry(m_IPLK); |
124 | 125 | membank("bank3")->set_entry(m_IPLK); |
125 | 126 | } |
126 | 127 | |
127 | | READ8_MEMBER(spc1000_state::spc1000_iplk_r) |
| 128 | READ8_MEMBER(spc1000_state::iplk_r) |
128 | 129 | { |
129 | 130 | m_IPLK = m_IPLK ? 0 : 1; |
130 | 131 | membank("bank1")->set_entry(m_IPLK); |
r241481 | r241482 | |
138 | 139 | m_cass->output(BIT(data, 0) ? -1.0 : 1.0); |
139 | 140 | } |
140 | 141 | |
141 | | WRITE8_MEMBER(spc1000_state::spc1000_gmode_w) |
| 142 | WRITE8_MEMBER(spc1000_state::gmode_w) |
142 | 143 | { |
143 | 144 | m_GMODE = data; |
144 | 145 | |
r241481 | r241482 | |
148 | 149 | m_vdg->gm0_w(BIT(data, 2)); |
149 | 150 | m_vdg->ag_w(BIT(data, 3)); |
150 | 151 | m_vdg->css_w(BIT(data, 7)); |
151 | | m_page = ( (BIT(data, 5) << 1) | BIT(data, 4) )*0x200; |
| 152 | m_page = ((BIT(data, 5) << 1) | BIT(data, 4)) * 0x200; |
152 | 153 | } |
153 | 154 | |
154 | | READ8_MEMBER(spc1000_state::spc1000_gmode_r) |
| 155 | READ8_MEMBER(spc1000_state::gmode_r) |
155 | 156 | { |
156 | 157 | return m_GMODE; |
157 | 158 | } |
158 | 159 | |
159 | | READ8_MEMBER(spc1000_state::spc1000_sd725_r) |
| 160 | READ8_MEMBER(spc1000_state::sd725_r) |
160 | 161 | { |
161 | 162 | UINT8 data = 0; |
162 | 163 | switch (offset) |
r241481 | r241482 | |
171 | 172 | return data; |
172 | 173 | } |
173 | 174 | |
174 | | WRITE8_MEMBER(spc1000_state::spc1000_sd725_w) |
| 175 | WRITE8_MEMBER(spc1000_state::sd725_w) |
175 | 176 | { |
176 | 177 | switch (offset) |
177 | 178 | { |
r241481 | r241482 | |
225 | 226 | m_fd1->mon_w(!BIT(data, 0)); |
226 | 227 | } |
227 | 228 | |
| 229 | READ8_MEMBER( spc1000_state::keyboard_r ) |
| 230 | { |
| 231 | // most games just read kb in $8000-$8009 but a few of them |
| 232 | // (e.g. Toiler Adventure II and Vela) use mirrored addr instead |
| 233 | offset &= 0xf; |
228 | 234 | |
| 235 | if (offset <= 9) |
| 236 | return m_io_kb[offset]->read(); |
| 237 | else |
| 238 | return 0xff; |
| 239 | } |
| 240 | |
| 241 | |
229 | 242 | static ADDRESS_MAP_START( spc1000_io , AS_IO, 8, spc1000_state ) |
230 | 243 | ADDRESS_MAP_UNMAP_HIGH |
231 | 244 | AM_RANGE(0x0000, 0x1fff) AM_RAM AM_SHARE("videoram") |
232 | | AM_RANGE(0x2000, 0x3fff) AM_READWRITE(spc1000_gmode_r, spc1000_gmode_w) |
| 245 | AM_RANGE(0x2000, 0x3fff) AM_READWRITE(gmode_r, gmode_w) |
233 | 246 | AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay8910", ay8910_device, address_w) |
234 | 247 | AM_RANGE(0x4001, 0x4001) AM_DEVREADWRITE("ay8910", ay8910_device, data_r, data_w) |
235 | 248 | AM_RANGE(0x6000, 0x6000) AM_WRITE(cass_w) |
236 | | AM_RANGE(0x8000, 0x8000) AM_READ_PORT("LINE0") |
237 | | AM_RANGE(0x8001, 0x8001) AM_READ_PORT("LINE1") |
238 | | AM_RANGE(0x8002, 0x8002) AM_READ_PORT("LINE2") |
239 | | AM_RANGE(0x8003, 0x8003) AM_READ_PORT("LINE3") |
240 | | AM_RANGE(0x8004, 0x8004) AM_READ_PORT("LINE4") |
241 | | AM_RANGE(0x8005, 0x8005) AM_READ_PORT("LINE5") |
242 | | AM_RANGE(0x8006, 0x8006) AM_READ_PORT("LINE6") |
243 | | AM_RANGE(0x8007, 0x8007) AM_READ_PORT("LINE7") |
244 | | AM_RANGE(0x8008, 0x8008) AM_READ_PORT("LINE8") |
245 | | AM_RANGE(0x8009, 0x8009) AM_READ_PORT("LINE9") |
246 | | AM_RANGE(0xA000, 0xA000) AM_READWRITE(spc1000_iplk_r, spc1000_iplk_w) |
247 | | AM_RANGE(0xC000, 0xC002) AM_READWRITE(spc1000_sd725_r, spc1000_sd725_w) |
248 | | // AM_RANGE(0xC000, 0xC003) AM_DEVREADWRITE("d8255_master", i8255_device, read, write) |
| 249 | AM_RANGE(0x8000, 0x9fff) AM_READ(keyboard_r) |
| 250 | AM_RANGE(0xa000, 0xa000) AM_READWRITE(iplk_r, iplk_w) |
| 251 | AM_RANGE(0xc000, 0xc002) AM_READWRITE(sd725_r, sd725_w) |
| 252 | // AM_RANGE(0xc000, 0xc003) AM_DEVREADWRITE("d8255_master", i8255_device, read, write) |
249 | 253 | ADDRESS_MAP_END |
250 | 254 | |
251 | 255 | /* Input ports */ |
252 | 256 | static INPUT_PORTS_START( spc1000 ) |
253 | | PORT_START("LINE0") |
254 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
255 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
256 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
257 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
258 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_PAUSE) |
259 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
260 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Graph") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) |
261 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
262 | | PORT_START("LINE1") |
263 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^ ~") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('^') PORT_CHAR('~') PORT_CHAR(0x1e) |
264 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
265 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
266 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
267 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR(0x03) |
268 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR(0x01) |
269 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(0x16) |
270 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
271 | | PORT_START("LINE2") |
272 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps") PORT_CODE(KEYCODE_CAPSLOCK) |
273 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
274 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) |
275 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("] }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_CHAR(0x1d) |
276 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR(0x16) |
277 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHAR(0x13) |
278 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR(0x17) |
279 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 \"") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') |
280 | | PORT_START("LINE3") |
281 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_CHAR(0x12) |
282 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
283 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1b) |
284 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[ {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHAR(0x1b) |
285 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR(0x02) |
286 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR(0x04) |
287 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(0x05) |
288 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
289 | | PORT_START("LINE4") |
290 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
291 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
292 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
293 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\ |") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1c) |
294 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(0x0e) |
295 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR(0x06) |
296 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(0x12) |
297 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
298 | | PORT_START("LINE5") |
299 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
300 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
301 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
302 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
303 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHAR(0x0d) |
304 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR(0x07) |
305 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(0x14) |
306 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 %") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
307 | | PORT_START("LINE6") |
308 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
309 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
310 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@ `") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('@') PORT_CHAR('`') |
311 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) |
312 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
313 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_CHAR(0x08) |
314 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(0x19) |
315 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 &") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
316 | | PORT_START("LINE7") |
317 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
318 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
319 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
320 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR(0x10) |
321 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
322 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHAR(0x0a) |
323 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(0x15) |
324 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 '") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
325 | | PORT_START("LINE8") |
326 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
327 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
328 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
329 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(": *") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
330 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
331 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_CHAR(0x0b) |
332 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(0x09) |
333 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 (") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
334 | | PORT_START("LINE9") |
335 | | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START) PORT_NAME("IPL") PORT_CODE(KEYCODE_END) |
336 | | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
337 | | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("- =") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
338 | | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
339 | | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
340 | | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHAR(0x0c) |
341 | | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(0x0e) |
342 | | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 257 | PORT_START("LINE.0") |
| 258 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 259 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_RSHIFT) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 260 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) |
| 261 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 262 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_PAUSE) |
| 263 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) |
| 264 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Graph") PORT_CODE(KEYCODE_LALT) PORT_CODE(KEYCODE_RALT) |
| 265 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) |
343 | 266 | |
| 267 | PORT_START("LINE.1") |
| 268 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("^ ~") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('^') PORT_CHAR('~') PORT_CHAR(0x1e) |
| 269 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Home") PORT_CODE(KEYCODE_HOME) |
| 270 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 271 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Return") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 272 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHAR(0x03) |
| 273 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHAR(0x01) |
| 274 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHAR(0x16) |
| 275 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1 !") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') |
| 276 | |
| 277 | PORT_START("LINE.2") |
| 278 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Caps") PORT_CODE(KEYCODE_CAPSLOCK) |
| 279 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 280 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') PORT_CHAR(0x1a) |
| 281 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("] }") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_CHAR(0x1d) |
| 282 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHAR(0x16) |
| 283 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHAR(0x13) |
| 284 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHAR(0x17) |
| 285 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2 \"") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('\"') |
| 286 | |
| 287 | PORT_START("LINE.3") |
| 288 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Del") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) PORT_CHAR(0x12) |
| 289 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 290 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) PORT_CHAR(0x1b) |
| 291 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[ {") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHAR(0x1b) |
| 292 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHAR(0x02) |
| 293 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHAR(0x04) |
| 294 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHAR(0x05) |
| 295 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3 #") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') |
| 296 | |
| 297 | PORT_START("LINE.4") |
| 298 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 299 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) |
| 300 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) |
| 301 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\\ |") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHAR(0x1c) |
| 302 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHAR(0x0e) |
| 303 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHAR(0x06) |
| 304 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHAR(0x12) |
| 305 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') |
| 306 | |
| 307 | PORT_START("LINE.5") |
| 308 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 309 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) |
| 310 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) |
| 311 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) |
| 312 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHAR(0x0d) |
| 313 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHAR(0x07) |
| 314 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHAR(0x14) |
| 315 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 %") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| 316 | |
| 317 | PORT_START("LINE.6") |
| 318 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 319 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) |
| 320 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("@ `") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('@') PORT_CHAR('`') |
| 321 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHAR(0x18) |
| 322 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 323 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_CHAR(0x08) |
| 324 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHAR(0x19) |
| 325 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 &") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| 326 | |
| 327 | PORT_START("LINE.7") |
| 328 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 329 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) |
| 330 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) |
| 331 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHAR(0x10) |
| 332 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 333 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHAR(0x0a) |
| 334 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHAR(0x15) |
| 335 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 '") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') |
| 336 | |
| 337 | PORT_START("LINE.8") |
| 338 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) |
| 339 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) |
| 340 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) |
| 341 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(": *") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') |
| 342 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 343 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') PORT_CHAR(0x0b) |
| 344 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHAR(0x09) |
| 345 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 (") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') |
| 346 | |
| 347 | PORT_START("LINE.9") |
| 348 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START) PORT_NAME("IPL") PORT_CODE(KEYCODE_END) |
| 349 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) |
| 350 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("- =") PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') |
| 351 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 352 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') |
| 353 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHAR(0x0c) |
| 354 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHAR(0x0e) |
| 355 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| 356 | |
344 | 357 | PORT_START("JOY") |
345 | 358 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) |
346 | 359 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1) |