src/mess/machine/zx.c
| r4164 | r4165 | |
| 25 | 25 | static WRITE8_HANDLER( zx_ram_w ) |
| 26 | 26 | { |
| 27 | 27 | UINT8 *RAM = memory_region(space->machine, "main"); |
| 28 | | RAM[offset | 0x4000] = data; |
| 28 | RAM[offset + 0x4000] = data; |
| 29 | 29 | |
| 30 | | if ((offset > 0x29) && (offset < 0x300)) |
| 30 | if ((offset > 0x29) && (offset < 0x400)) |
| 31 | 31 | { |
| 32 | 32 | if (data & 0x40) |
| 33 | 33 | { |
| r4164 | r4165 | |
| 60 | 60 | |
| 61 | 61 | static DIRECT_UPDATE_HANDLER ( zx_setdirect ) |
| 62 | 62 | { |
| 63 | | if (address & 0x8000) |
| 63 | if (address & 0xc000) |
| 64 | 64 | zx_ula_r(space->machine, address, "main", 0); |
| 65 | 65 | return address; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | static DIRECT_UPDATE_HANDLER ( pc8300_setdirect ) |
| 69 | 69 | { |
| 70 | | if (address & 0x8000) |
| 70 | if (address & 0xc000) |
| 71 | 71 | zx_ula_r(space->machine, address, "gfx1", 0); |
| 72 | 72 | return address; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | static DIRECT_UPDATE_HANDLER ( lambda_setdirect ) |
| 76 | 76 | { |
| 77 | | if (address & 0x8000) |
| 77 | if (address & 0xc000) |
| 78 | 78 | zx_ula_r(space->machine, address, "gfx1", 1); |
| 79 | 79 | return address; |
| 80 | 80 | } |
| r4164 | r4165 | |
| 102 | 102 | zx_tape_bit = 0x80; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | | WRITE8_HANDLER ( zx_io_w ) |
| 105 | READ8_HANDLER ( zx80_io_r ) |
| 106 | 106 | { |
| 107 | | const device_config *screen = video_screen_first(space->machine->config); |
| 108 | | int height = video_screen_get_height(screen); |
| 107 | /* port FE = read keyboard, cass bit and NTSC/PAL diode |
| 108 | The upper 8 bits are used to select a keyboard scan line */ |
| 109 | 109 | |
| 110 | | if ((offset & 2) == 0) |
| 111 | | { |
| 112 | | timer_reset(ula_nmi, attotime_never); |
| 110 | UINT8 data = 0xff; |
| 111 | UINT8 offs = offset & 0xff; |
| 113 | 112 | |
| 114 | | LOG_ZX81_IOW("ULA NMIs off"); |
| 115 | | } |
| 116 | | else if ((offset & 1) == 0) |
| 113 | if (offs == 0xfe) |
| 117 | 114 | { |
| 118 | | timer_adjust_periodic(ula_nmi, attotime_zero, 0, cpu_clocks_to_attotime(space->machine->cpu[0], 207)); |
| 115 | UINT8 extra1 = input_port_read(space->machine, "SPC1"); |
| 116 | UINT8 extra2 = input_port_read(space->machine, "SPC2"); |
| 119 | 117 | |
| 120 | | LOG_ZX81_IOW("ULA NMIs on"); |
| 118 | if ((offset & 0x0100) == 0) |
| 119 | { |
| 120 | data &= input_port_read(space->machine, "ROW0"); |
| 121 | /* SHIFT for extra keys */ |
| 122 | if (extra1 != 0xff || extra2 != 0xff) |
| 123 | data &= ~0x01; |
| 124 | } |
| 125 | if ((offset & 0x0200) == 0) |
| 126 | data &= input_port_read(space->machine, "ROW1"); |
| 127 | if ((offset & 0x0400) == 0) |
| 128 | data &= input_port_read(space->machine, "ROW2"); |
| 129 | if ((offset & 0x0800) == 0) |
| 130 | data &= input_port_read(space->machine, "ROW3") & extra1; |
| 131 | if ((offset & 0x1000) == 0) |
| 132 | data &= input_port_read(space->machine, "ROW4") & extra2; |
| 133 | if ((offset & 0x2000) == 0) |
| 134 | data &= input_port_read(space->machine, "ROW5"); |
| 135 | if ((offset & 0x4000) == 0) |
| 136 | data &= input_port_read(space->machine, "ROW6"); |
| 137 | if ((offset & 0x8000) == 0) |
| 138 | data &= input_port_read(space->machine, "ROW7"); |
| 121 | 139 | |
| 122 | | /* remove the IRQ */ |
| 123 | | ula_irq_active = 0; |
| 124 | | } |
| 125 | | else |
| 126 | | { |
| 127 | | zx_ula_bkgnd(space->machine, 1); |
| 128 | | if (ula_frame_vsync == 2) |
| 140 | if (!input_port_read(space->machine, "CONFIG")) |
| 141 | data &= ~0x40; |
| 142 | |
| 143 | cassette_output(devtag_get_device(space->machine, CASSETTE, "cassette"), +0.75); |
| 144 | |
| 145 | if (ula_irq_active) |
| 129 | 146 | { |
| 130 | | cpu_spinuntil_time(space->cpu,video_screen_get_time_until_pos(space->machine->primary_screen, height - 1, 0)); |
| 131 | | ula_scanline_count = height - 1; |
| 132 | | logerror ("S: %d B: %d\n", video_screen_get_vpos(space->machine->primary_screen), video_screen_get_hpos(space->machine->primary_screen)); |
| 147 | zx_ula_bkgnd(space->machine, 0); |
| 148 | ula_irq_active = 0; |
| 149 | |
| 150 | // LOG_ZX81_IOR("ULA IRQs off"); |
| 133 | 151 | } |
| 152 | // else |
| 153 | // { |
| 154 | if ((cassette_input(devtag_get_device(space->machine, CASSETTE, "cassette")) < -0.75) && zx_tape_bit) |
| 155 | { |
| 156 | zx_tape_bit = 0x00; |
| 157 | timer_set(space->machine, ATTOTIME_IN_USEC(362), NULL, 0, zx_tape_pulse); |
| 158 | } |
| 134 | 159 | |
| 135 | | LOG_ZX81_IOW("ULA IRQs on"); |
| 160 | data &= ~zx_tape_bit; |
| 161 | |
| 162 | // LOG_ZX81_IOR("Tape"); |
| 163 | // } |
| 164 | if (ula_frame_vsync == 3) |
| 165 | { |
| 166 | ula_frame_vsync = 2; |
| 167 | // LOG_ZX81_VSYNC; |
| 168 | } |
| 136 | 169 | } |
| 170 | else |
| 171 | LOG_ZX81_IOR("Unmapped port"); |
| 172 | |
| 173 | return data; |
| 137 | 174 | } |
| 138 | 175 | |
| 139 | | READ8_HANDLER ( zx_io_r ) |
| 176 | READ8_HANDLER ( zx81_io_r ) |
| 140 | 177 | { |
| 141 | | const device_config *screen = video_screen_first(space->machine->config); |
| 142 | | int data = 0xff; |
| 178 | /* port FB = read printer status, not emulated |
| 179 | FE = read keyboard, cass bit and NTSC/PAL diode; turn off HSYNC generator if NMI is off |
| 180 | The upper 8 bits are used to select a keyboard scan line */ |
| 143 | 181 | |
| 144 | | if ((offset & 1) == 0) |
| 182 | UINT8 data = 0xff; |
| 183 | UINT8 offs = offset & 0xff; |
| 184 | |
| 185 | if (offs == 0xfe) |
| 145 | 186 | { |
| 146 | | int extra1 = input_port_read(space->machine, "SPC0"); |
| 147 | | int extra2 = input_port_read(space->machine, "SPC1"); |
| 187 | UINT8 extra1 = input_port_read(space->machine, "SPC1"); |
| 188 | UINT8 extra2 = input_port_read(space->machine, "SPC2"); |
| 148 | 189 | |
| 149 | | // ula_scancode_count = 0; |
| 150 | 190 | if ((offset & 0x0100) == 0) |
| 151 | 191 | { |
| 152 | 192 | data &= input_port_read(space->machine, "ROW0"); |
| r4164 | r4165 | |
| 168 | 208 | data &= input_port_read(space->machine, "ROW6"); |
| 169 | 209 | if ((offset & 0x8000) == 0) |
| 170 | 210 | data &= input_port_read(space->machine, "ROW7"); |
| 171 | | if (video_screen_get_refresh(screen) > 55) |
| 211 | |
| 212 | if (!input_port_read(space->machine, "CONFIG")) |
| 172 | 213 | data &= ~0x40; |
| 173 | 214 | |
| 215 | cassette_output(devtag_get_device(space->machine, CASSETTE, "cassette"), +0.75); |
| 216 | |
| 174 | 217 | if (ula_irq_active) |
| 175 | 218 | { |
| 176 | 219 | zx_ula_bkgnd(space->machine, 0); |
| 177 | 220 | ula_irq_active = 0; |
| 178 | 221 | |
| 179 | | LOG_ZX81_IOR("ULA IRQs off"); |
| 222 | // LOG_ZX81_IOR("ULA IRQs off"); |
| 180 | 223 | } |
| 181 | 224 | else |
| 182 | 225 | { |
| r4164 | r4165 | |
| 188 | 231 | |
| 189 | 232 | data &= ~zx_tape_bit; |
| 190 | 233 | |
| 191 | | LOG_ZX81_IOR("Tape"); |
| 234 | // LOG_ZX81_IOR("Tape"); |
| 192 | 235 | } |
| 193 | 236 | if (ula_frame_vsync == 3) |
| 194 | 237 | { |
| r4164 | r4165 | |
| 204 | 247 | |
| 205 | 248 | READ8_HANDLER ( pow3000_io_r ) |
| 206 | 249 | { |
| 250 | UINT8 data = 0xff; |
| 251 | UINT8 offs = offset & 0xff; |
| 252 | |
| 253 | if (offs == 0xfe) |
| 254 | { |
| 255 | UINT8 extra0 = input_port_read(space->machine, "SPC0"); |
| 256 | UINT8 extra1 = input_port_read(space->machine, "SPC1"); |
| 257 | UINT8 extra2 = input_port_read(space->machine, "SPC2"); |
| 258 | |
| 259 | if ((offset & 0x0100) == 0) |
| 260 | { |
| 261 | data &= input_port_read(space->machine, "ROW0") & extra0; |
| 262 | /* SHIFT for extra keys */ |
| 263 | if (extra0 != 0xff || extra1 != 0xff || extra2 != 0xff) |
| 264 | data &= ~0x01; |
| 265 | } |
| 266 | if ((offset & 0x0200) == 0) |
| 267 | data &= input_port_read(space->machine, "ROW1"); |
| 268 | if ((offset & 0x0400) == 0) |
| 269 | data &= input_port_read(space->machine, "ROW2"); |
| 270 | if ((offset & 0x0800) == 0) |
| 271 | data &= input_port_read(space->machine, "ROW3"); |
| 272 | if ((offset & 0x1000) == 0) |
| 273 | data &= input_port_read(space->machine, "ROW4"); |
| 274 | if ((offset & 0x2000) == 0) |
| 275 | data &= input_port_read(space->machine, "ROW5"); |
| 276 | if ((offset & 0x4000) == 0) |
| 277 | data &= input_port_read(space->machine, "ROW6") & extra1; |
| 278 | if ((offset & 0x8000) == 0) |
| 279 | data &= input_port_read(space->machine, "ROW7") & extra2; |
| 280 | |
| 281 | if (!input_port_read(space->machine, "CONFIG")) |
| 282 | data &= ~0x40; |
| 283 | |
| 284 | cassette_output(devtag_get_device(space->machine, CASSETTE, "cassette"), +0.75); |
| 285 | |
| 286 | if (ula_irq_active) |
| 287 | { |
| 288 | zx_ula_bkgnd(space->machine, 0); |
| 289 | ula_irq_active = 0; |
| 290 | LOG_ZX81_IOR("ULA IRQs off"); |
| 291 | } |
| 292 | else |
| 293 | { |
| 294 | if ((cassette_input(devtag_get_device(space->machine, CASSETTE, "cassette")) < -0.75) && zx_tape_bit) |
| 295 | { |
| 296 | zx_tape_bit = 0x00; |
| 297 | timer_set(space->machine, ATTOTIME_IN_USEC(362), NULL, 0, zx_tape_pulse); |
| 298 | } |
| 299 | |
| 300 | data &= ~zx_tape_bit; |
| 301 | |
| 302 | LOG_ZX81_IOR("Tape"); |
| 303 | } |
| 304 | if (ula_frame_vsync == 3) |
| 305 | { |
| 306 | ula_frame_vsync = 2; |
| 307 | // LOG_ZX81_VSYNC; |
| 308 | } |
| 309 | } |
| 310 | else |
| 311 | LOG_ZX81_IOR("Unknown port"); |
| 312 | |
| 313 | return data; |
| 314 | } |
| 315 | |
| 316 | WRITE8_HANDLER( zx80_io_w ) |
| 317 | { |
| 318 | /* port FF = write HSYNC and cass data */ |
| 319 | |
| 320 | UINT8 offs = offset & 0xff; |
| 321 | |
| 322 | if (offs == 0xff) |
| 323 | cassette_output(devtag_get_device(space->machine, CASSETTE, "cassette"), -0.75); |
| 324 | else |
| 325 | LOG_ZX81_IOR("Unmapped port"); |
| 326 | } |
| 327 | |
| 328 | WRITE8_HANDLER ( zx81_io_w ) |
| 329 | { |
| 330 | /* port FB = write data to printer |
| 331 | FD = turn off NMI generator |
| 332 | FE = turn on NMI generator |
| 333 | FF = write HSYNC and cass data */ |
| 334 | |
| 207 | 335 | const device_config *screen = video_screen_first(space->machine->config); |
| 336 | int height = video_screen_get_height(screen); |
| 337 | UINT8 offs = offset & 0xff; |
| 338 | |
| 339 | if (offs == 0xfd) |
| 340 | { |
| 341 | timer_reset(ula_nmi, attotime_never); |
| 342 | |
| 343 | LOG_ZX81_IOW("ULA NMIs off"); |
| 344 | } |
| 345 | else |
| 346 | if (offs == 0xfe) |
| 347 | { |
| 348 | timer_adjust_periodic(ula_nmi, attotime_zero, 0, cpu_clocks_to_attotime(space->machine->cpu[0], 207)); |
| 349 | |
| 350 | LOG_ZX81_IOW("ULA NMIs on"); |
| 351 | |
| 352 | /* remove the IRQ */ |
| 353 | ula_irq_active = 0; |
| 354 | } |
| 355 | else |
| 356 | if (offs == 0xff) |
| 357 | { |
| 358 | cassette_output(devtag_get_device(space->machine, CASSETTE, "cassette"), -0.75); |
| 359 | zx_ula_bkgnd(space->machine, 1); |
| 360 | if (ula_frame_vsync == 2) |
| 361 | { |
| 362 | cpu_spinuntil_time(space->cpu,video_screen_get_time_until_pos(space->machine->primary_screen, height - 1, 0)); |
| 363 | ula_scanline_count = height - 1; |
| 364 | logerror ("S: %d B: %d\n", video_screen_get_vpos(space->machine->primary_screen), video_screen_get_hpos(space->machine->primary_screen)); |
| 365 | } |
| 366 | |
| 367 | LOG_ZX81_IOW("ULA IRQs on"); |
| 368 | } |
| 369 | else |
| 370 | LOG_ZX81_IOR("Unmapped port"); |
| 371 | } |
| 372 | |
| 373 | READ8_HANDLER ( zx_io_r ) |
| 374 | { |
| 375 | const device_config *screen = video_screen_first(space->machine->config); |
| 208 | 376 | int data = 0xff; |
| 209 | 377 | |
| 210 | 378 | if ((offset & 1) == 0) |
| r4164 | r4165 | |
| 215 | 383 | // ula_scancode_count = 0; |
| 216 | 384 | if ((offset & 0x0100) == 0) |
| 217 | 385 | { |
| 218 | | data &= input_port_read(space->machine, "ROW0") & extra1; |
| 386 | data &= input_port_read(space->machine, "ROW0"); |
| 219 | 387 | /* SHIFT for extra keys */ |
| 220 | 388 | if (extra1 != 0xff || extra2 != 0xff) |
| 221 | 389 | data &= ~0x01; |
| 222 | 390 | } |
| 223 | 391 | if ((offset & 0x0200) == 0) |
| 224 | | data &= input_port_read(space->machine, "ROW1") & extra2; |
| 392 | data &= input_port_read(space->machine, "ROW1"); |
| 225 | 393 | if ((offset & 0x0400) == 0) |
| 226 | 394 | data &= input_port_read(space->machine, "ROW2"); |
| 227 | 395 | if ((offset & 0x0800) == 0) |
| 228 | | data &= input_port_read(space->machine, "ROW3"); |
| 396 | data &= input_port_read(space->machine, "ROW3") & extra1; |
| 229 | 397 | if ((offset & 0x1000) == 0) |
| 230 | | data &= input_port_read(space->machine, "ROW4"); |
| 398 | data &= input_port_read(space->machine, "ROW4") & extra2; |
| 231 | 399 | if ((offset & 0x2000) == 0) |
| 232 | 400 | data &= input_port_read(space->machine, "ROW5"); |
| 233 | 401 | if ((offset & 0x4000) == 0) |
| r4164 | r4165 | |
| 241 | 409 | { |
| 242 | 410 | zx_ula_bkgnd(space->machine, 0); |
| 243 | 411 | ula_irq_active = 0; |
| 412 | |
| 244 | 413 | LOG_ZX81_IOR("ULA IRQs off"); |
| 245 | 414 | } |
| 246 | 415 | else |
| r4164 | r4165 | |
| 262 | 431 | } |
| 263 | 432 | } |
| 264 | 433 | else |
| 265 | | LOG_ZX81_IOR("Unknown port"); |
| 434 | LOG_ZX81_IOR("Unmapped port"); |
| 266 | 435 | |
| 267 | 436 | return data; |
| 268 | 437 | } |
| 438 | |
| 439 | WRITE8_HANDLER ( zx_io_w ) |
| 440 | { |
| 441 | /* port FB = write data to printer |
| 442 | FD = turn off NMI generator |
| 443 | FE = turn on NMI generator |
| 444 | FF = write HSYNC and cass data */ |
| 445 | |
| 446 | const device_config *screen = video_screen_first(space->machine->config); |
| 447 | int height = video_screen_get_height(screen); |
| 448 | UINT8 offs = offset & 0xff; |
| 449 | |
| 450 | if (!(offs & 2)) |
| 451 | { |
| 452 | timer_reset(ula_nmi, attotime_never); |
| 453 | |
| 454 | LOG_ZX81_IOW("ULA NMIs off"); |
| 455 | } |
| 456 | else |
| 457 | if (!(offs & 1)) |
| 458 | { |
| 459 | timer_adjust_periodic(ula_nmi, attotime_zero, 0, cpu_clocks_to_attotime(space->machine->cpu[0], 207)); |
| 460 | |
| 461 | LOG_ZX81_IOW("ULA NMIs on"); |
| 462 | |
| 463 | /* remove the IRQ */ |
| 464 | ula_irq_active = 0; |
| 465 | } |
| 466 | else |
| 467 | // if (offs == 0xff) |
| 468 | { |
| 469 | zx_ula_bkgnd(space->machine, 1); |
| 470 | if (ula_frame_vsync == 2) |
| 471 | { |
| 472 | cpu_spinuntil_time(space->cpu,video_screen_get_time_until_pos(space->machine->primary_screen, height - 1, 0)); |
| 473 | ula_scanline_count = height - 1; |
| 474 | logerror ("S: %d B: %d\n", video_screen_get_vpos(space->machine->primary_screen), video_screen_get_hpos(space->machine->primary_screen)); |
| 475 | } |
| 476 | |
| 477 | LOG_ZX81_IOW("ULA IRQs on"); |
| 478 | } |
| 479 | // else |
| 480 | // LOG_ZX81_IOR("Unmapped port"); |
| 481 | } |
src/mess/drivers/zx.c
| r4164 | r4165 | |
| 36 | 36 | /* Memory Maps */ |
| 37 | 37 | |
| 38 | 38 | static ADDRESS_MAP_START( zx80_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 39 | | AM_RANGE(0x0000, 0x0fff) AM_ROM |
| 40 | | AM_RANGE(0xc000, 0xffff) AM_RAM AM_READWRITE(zx_ram_r,SMH_NOP) |
| 39 | AM_RANGE(0x0000, 0x3fff) AM_ROM |
| 40 | AM_RANGE(0xc000, 0xcfff) AM_RAM AM_READWRITE(zx_ram_r,SMH_NOP) |
| 41 | 41 | ADDRESS_MAP_END |
| 42 | 42 | |
| 43 | | static ADDRESS_MAP_START( zx81_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 44 | | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 45 | | AM_RANGE(0xc000, 0xffff) AM_RAM AM_READWRITE(zx_ram_r,SMH_NOP) |
| 43 | static ADDRESS_MAP_START( zx80_io_map, ADDRESS_SPACE_IO, 8 ) |
| 44 | AM_RANGE(0x0000, 0xffff) AM_READWRITE(zx80_io_r, zx80_io_w) |
| 46 | 45 | ADDRESS_MAP_END |
| 47 | 46 | |
| 48 | | static ADDRESS_MAP_START( pc8300_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 49 | | AM_RANGE(0x0000, 0x1fff) AM_ROM |
| 50 | | AM_RANGE(0xc000, 0xffff) AM_RAM AM_READWRITE(zx_ram_r,SMH_NOP) |
| 47 | static ADDRESS_MAP_START( zx81_io_map, ADDRESS_SPACE_IO, 8 ) |
| 48 | AM_RANGE(0x0000, 0xffff) AM_READWRITE(zx81_io_r, zx81_io_w) |
| 51 | 49 | ADDRESS_MAP_END |
| 52 | 50 | |
| 53 | | static ADDRESS_MAP_START( zx80_io_map, ADDRESS_SPACE_IO, 8 ) |
| 54 | | AM_RANGE(0x0000, 0xffff) AM_READWRITE(zx_io_r, zx_io_w) |
| 51 | static ADDRESS_MAP_START( pow3000_io_map, ADDRESS_SPACE_IO, 8 ) |
| 52 | AM_RANGE(0x0000, 0xffff) AM_READWRITE(pow3000_io_r, zx81_io_w) |
| 55 | 53 | ADDRESS_MAP_END |
| 56 | 54 | |
| 57 | 55 | /* Input Ports */ |
| r4164 | r4165 | |
| 123 | 121 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 124 | 122 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 125 | 123 | |
| 126 | | PORT_START("SPC0") /* special keys 1 */ |
| 127 | | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 124 | PORT_START("SPC1") /* special keys 1 */ |
| 128 | 125 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x90") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 129 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 126 | PORT_BIT( 0xef, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 130 | 127 | |
| 131 | | PORT_START("SPC1") /* special keys 2 */ |
| 128 | PORT_START("SPC2") /* special keys 2 */ |
| 132 | 129 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 133 | 130 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPHICS") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_SHIFT_2) |
| 134 | 131 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x92") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 135 | 132 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 136 | 133 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x93") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 137 | 134 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 135 | |
| 136 | PORT_START("CONFIG") /* config diode on main board */ |
| 137 | PORT_CONFNAME( 0x40, 0x40, "TV system") |
| 138 | PORT_CONFSETTING( 0x00, "NTSC") |
| 139 | PORT_CONFSETTING( 0x40, "PAL") |
| 138 | 140 | INPUT_PORTS_END |
| 139 | 141 | |
| 140 | 142 | static INPUT_PORTS_START( zx81 ) |
| 141 | | /* 2008-05 FP: I see no code reading this "RAM" port. Is it unused code? */ |
| 142 | | PORT_START("RAM") |
| 143 | | PORT_DIPNAME( 0x80, 0x00, "16K RAM module" ) |
| 144 | | PORT_DIPSETTING( 0x00, DEF_STR( No ) ) |
| 145 | | PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) |
| 146 | | PORT_BIT( 0x7e, 0x0f, IPT_UNUSED ) |
| 147 | | |
| 148 | 143 | PORT_START("ROW0") |
| 149 | 144 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 150 | 145 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z :") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR(':') |
| r4164 | r4165 | |
| 209 | 204 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B SCROLL *") PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 210 | 205 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 211 | 206 | |
| 212 | | PORT_START("SPC0") /* special keys 1 */ |
| 213 | | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 207 | PORT_START("SPC1") /* special keys 1 */ |
| 214 | 208 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x90") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 215 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 209 | PORT_BIT( 0xef, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 216 | 210 | |
| 217 | | PORT_START("SPC1") /* special keys 2 */ |
| 211 | PORT_START("SPC2") /* special keys 2 */ |
| 218 | 212 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 219 | 213 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPHICS") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_SHIFT_2) |
| 220 | 214 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x92") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 221 | 215 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 222 | 216 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x93") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 223 | 217 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 218 | |
| 219 | PORT_START("CONFIG") /* config diode on main board */ |
| 220 | PORT_CONFNAME( 0x40, 0x40, "TV system") |
| 221 | PORT_CONFSETTING( 0x00, "NTSC") |
| 222 | PORT_CONFSETTING( 0x40, "PAL") |
| 224 | 223 | INPUT_PORTS_END |
| 225 | 224 | |
| 226 | 225 | static INPUT_PORTS_START( pow3000 ) |
| 227 | | PORT_START("RAM") |
| 228 | | PORT_BIT( 0xfe, 0x0f, IPT_UNUSED ) |
| 229 | | |
| 230 | 226 | PORT_START("ROW0") |
| 231 | 227 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| 232 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') |
| 233 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| 234 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') |
| 235 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| 228 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Z PRINT") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') |
| 229 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("X AUTO") PORT_CODE(KEYCODE_X) PORT_CHAR('X') |
| 230 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C UP") PORT_CODE(KEYCODE_C) PORT_CHAR('C') |
| 231 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("V DOWN") PORT_CODE(KEYCODE_V) PORT_CHAR('V') |
| 236 | 232 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 237 | 233 | |
| 238 | 234 | PORT_START("ROW1") |
| 239 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 240 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') |
| 241 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 242 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 243 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 235 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A ASN") PORT_CODE(KEYCODE_A) PORT_CHAR('A') |
| 236 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("S ACS") PORT_CODE(KEYCODE_S) PORT_CHAR('S') |
| 237 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D ATN") PORT_CODE(KEYCODE_D) PORT_CHAR('D') |
| 238 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F EXP") PORT_CODE(KEYCODE_F) PORT_CHAR('F') |
| 239 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G ABS") PORT_CODE(KEYCODE_G) PORT_CHAR('G') |
| 244 | 240 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 245 | 241 | |
| 246 | 242 | PORT_START("ROW2") |
| 247 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| 248 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| 249 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') |
| 250 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| 251 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') |
| 243 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Q SIN") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') |
| 244 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("W COS") PORT_CODE(KEYCODE_W) PORT_CHAR('W') |
| 245 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E TAN") PORT_CODE(KEYCODE_E) PORT_CHAR('E') |
| 246 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R LOG") PORT_CODE(KEYCODE_R) PORT_CHAR('R') |
| 247 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("T SGN") PORT_CODE(KEYCODE_T) PORT_CHAR('T') |
| 252 | 248 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 253 | 249 | |
| 254 | 250 | PORT_START("ROW3") |
| 255 | 251 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') |
| 256 | 252 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') |
| 257 | 253 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') |
| 258 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| 259 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| 254 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("4 $") PORT_CODE(KEYCODE_4) PORT_CHAR('4') |
| 255 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("5 \"") PORT_CODE(KEYCODE_5) PORT_CHAR('5') |
| 260 | 256 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 261 | 257 | |
| 262 | 258 | PORT_START("ROW4") |
| 263 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 264 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 265 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| 266 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| 267 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 259 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0 =") PORT_CODE(KEYCODE_0) PORT_CHAR('0') |
| 260 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9 )") PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 261 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("8 (") PORT_CODE(KEYCODE_8) PORT_CHAR('8') |
| 262 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("7 ,") PORT_CODE(KEYCODE_7) PORT_CHAR('7') |
| 263 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("6 ;") PORT_CODE(KEYCODE_6) PORT_CHAR('6') |
| 268 | 264 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 269 | 265 | |
| 270 | 266 | PORT_START("ROW5") |
| 271 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| 272 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 273 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 274 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') |
| 275 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') |
| 267 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("P >") PORT_CODE(KEYCODE_P) PORT_CHAR('P') |
| 268 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("O <") PORT_CODE(KEYCODE_O) PORT_CHAR('O') |
| 269 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("I PI") PORT_CODE(KEYCODE_I) PORT_CHAR('I') |
| 270 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("U RND") PORT_CODE(KEYCODE_U) PORT_CHAR('U') |
| 271 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Y SQR") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') |
| 276 | 272 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 277 | 273 | |
| 278 | 274 | PORT_START("ROW6") |
| 279 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 280 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') |
| 281 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') |
| 282 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| 283 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 275 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENTER GRAPHICS") PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) |
| 276 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L +") PORT_CODE(KEYCODE_L) PORT_CHAR('L') |
| 277 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("K -") PORT_CODE(KEYCODE_K) PORT_CHAR('K') |
| 278 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("J *") PORT_CODE(KEYCODE_J) PORT_CHAR('J') |
| 279 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H /") PORT_CODE(KEYCODE_H) PORT_CHAR('H') |
| 284 | 280 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 285 | 281 | |
| 286 | 282 | PORT_START("ROW7") |
| 287 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 288 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(".") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') |
| 289 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') |
| 290 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 291 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 283 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SPACE BREAK") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') |
| 284 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME(". DELETE") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') |
| 285 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("M EDIT") PORT_CODE(KEYCODE_M) PORT_CHAR('M') |
| 286 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("N RIGHT") PORT_CODE(KEYCODE_N) PORT_CHAR('N') |
| 287 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B LEFT") PORT_CODE(KEYCODE_B) PORT_CHAR('B') |
| 292 | 288 | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 293 | 289 | |
| 294 | | PORT_START("SPC0") /* special keys 1 */ |
| 295 | | PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 290 | PORT_START("SPC0") /* special keys 0 */ |
| 291 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 292 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x93") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 293 | PORT_BIT( 0xe7, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 294 | |
| 295 | PORT_START("SPC1") /* special keys 1 */ |
| 296 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPHICS") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_SHIFT_2) |
| 297 | PORT_BIT( 0xfe, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 298 | |
| 299 | PORT_START("SPC2") /* special keys 2 */ |
| 300 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 301 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x92") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 296 | 302 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x90") PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) |
| 297 | | PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 303 | PORT_BIT( 0xe5, IP_ACTIVE_LOW, IPT_UNUSED) |
| 298 | 304 | |
| 299 | | PORT_START("SPC1") /* special keys 2 */ |
| 300 | | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x91") PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) |
| 301 | | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x93") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) |
| 302 | | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x86\x92") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) |
| 303 | | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("BACKSPACE") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 304 | | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPHICS") PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_SHIFT_2) |
| 305 | | PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED) |
| 305 | PORT_START("CONFIG") /* config diode on main board */ |
| 306 | PORT_CONFNAME( 0x40, 0x00, "TV system") |
| 307 | PORT_CONFSETTING( 0x00, "NTSC") |
| 308 | PORT_CONFSETTING( 0x40, "PAL") |
| 306 | 309 | INPUT_PORTS_END |
| 307 | 310 | |
| 308 | 311 | /* Graphics Layouts */ |
| r4164 | r4165 | |
| 430 | 433 | MDRV_IMPORT_FROM(zx80) |
| 431 | 434 | |
| 432 | 435 | MDRV_CPU_MODIFY("main") |
| 433 | | MDRV_CPU_PROGRAM_MAP(zx81_map, 0) |
| 436 | MDRV_CPU_IO_MAP(zx81_io_map, 0) |
| 434 | 437 | |
| 435 | 438 | MDRV_GFXDECODE(zx81) |
| 436 | 439 | |
| r4164 | r4165 | |
| 452 | 455 | MDRV_IMPORT_FROM(ts1000) |
| 453 | 456 | |
| 454 | 457 | MDRV_CPU_MODIFY("main") |
| 455 | | MDRV_CPU_PROGRAM_MAP(pc8300_map, 0) |
| 456 | 458 | |
| 457 | 459 | MDRV_MACHINE_RESET(pc8300) |
| 458 | 460 | MDRV_GFXDECODE(pc8300) |
| r4164 | r4165 | |
| 463 | 465 | MDRV_IMPORT_FROM(ts1000) |
| 464 | 466 | |
| 465 | 467 | MDRV_CPU_MODIFY("main") |
| 466 | | MDRV_CPU_PROGRAM_MAP(pc8300_map, 0) |
| 468 | MDRV_CPU_IO_MAP(pow3000_io_map, 0) |
| 467 | 469 | |
| 468 | 470 | MDRV_MACHINE_RESET(lambda) |
| 469 | 471 | MDRV_GFXDECODE(pow3000) |
| r4164 | r4165 | |
| 474 | 476 | MDRV_IMPORT_FROM(ts1000) |
| 475 | 477 | |
| 476 | 478 | MDRV_CPU_MODIFY("main") |
| 477 | | MDRV_CPU_PROGRAM_MAP(pc8300_map, 0) |
| 479 | MDRV_CPU_IO_MAP(pow3000_io_map, 0) |
| 478 | 480 | |
| 479 | 481 | MDRV_MACHINE_RESET(lambda) |
| 480 | 482 | MDRV_GFXDECODE(pc8300) |
| r4164 | r4165 | |
| 547 | 549 | SYSTEM_CONFIG_END |
| 548 | 550 | |
| 549 | 551 | static SYSTEM_CONFIG_START(pc8300) |
| 550 | | CONFIG_RAM_DEFAULT(16 * 1024) |
| 552 | CONFIG_RAM_DEFAULT(2 * 1024) |
| 553 | CONFIG_RAM(16 * 1024) |
| 554 | CONFIG_RAM(32 * 1024) |
| 551 | 555 | SYSTEM_CONFIG_END |
| 552 | 556 | |
| 553 | 557 | /* Game Drivers */ |
| r4164 | r4165 | |
| 556 | 560 | COMP( 1980, zx80, 0, 0, zx80, zx80, zx, zx80, "Sinclair Research", "ZX-80", 0 ) |
| 557 | 561 | COMP( 1981, zx81, 0, 0, zx81, zx81, zx, zx81, "Sinclair Research", "ZX-81", 0 ) |
| 558 | 562 | COMP( 1982, ts1000, zx81, 0, ts1000, zx81, zx, zx81, "Timex Sinclair", "Timex Sinclair 1000", 0 ) |
| 559 | | COMP( 1984, pc8300, zx81, 0, pc8300, pow3000, zx, pc8300, "Your Computer", "PC8300", 0 ) |
| 563 | COMP( 1984, pc8300, zx81, 0, pc8300, zx81, zx, pc8300, "Your Computer", "PC8300", 0 ) |
| 560 | 564 | COMP( 1983, pow3000, zx81, 0, pow3000, pow3000, zx, pc8300, "Creon Enterprises", "Power 3000", GAME_NOT_WORKING ) |
| 561 | | COMP( 1982, lambda, zx81, 0, lambda, pow3000, zx, zx81, "Lambda Electronics Ltd", "Lambda 8300", GAME_NOT_WORKING ) |
| 565 | COMP( 1982, lambda, zx81, 0, lambda, pow3000, zx, pc8300, "Lambda Electronics Ltd", "Lambda 8300", GAME_NOT_WORKING ) |