src/mess/drivers/zx.c
| r2179 | r2180 | |
| 19 | 19 | hi-res and hi-res modes. |
| 20 | 20 | Some memory packs are unemulated. |
| 21 | 21 | |
| 22 | Current issues: 4th and tree4th need their address maps worked out (eg, the stack is set to FD80) |
| 23 | All drivers: Broken screen |
| 24 | |
| 25 | |
| 22 | 26 | ****************************************************************************/ |
| 23 | 27 | |
| 24 | 28 | #include "driver.h" |
| r2179 | r2180 | |
| 334 | 338 | |
| 335 | 339 | /* Palette Initialization */ |
| 336 | 340 | |
| 337 | | static const unsigned char zx80_palette[] = |
| 338 | | { |
| 339 | | 255,255,255, /* white */ |
| 340 | | 0, 0, 0, /* black */ |
| 341 | | }; |
| 342 | 341 | |
| 343 | | static const unsigned char zx81_palette[] = |
| 344 | | { |
| 345 | | 255,255,255, /* white */ |
| 346 | | 0, 0, 0, /* black */ |
| 347 | | }; |
| 348 | | |
| 349 | | static const unsigned char ts1000_palette[] = |
| 350 | | { |
| 351 | | 64,244,244, /* cyan */ |
| 352 | | 0, 0, 0, /* black */ |
| 353 | | }; |
| 354 | | |
| 355 | 342 | static PALETTE_INIT( zx80 ) |
| 356 | 343 | { |
| 357 | | int i; |
| 358 | | |
| 359 | | for ( i = 0; i < sizeof(zx80_palette) / 3; i++ ) { |
| 360 | | palette_set_color_rgb(machine, i, zx80_palette[i*3], zx80_palette[i*3+1], zx80_palette[i*3+2]); |
| 361 | | } |
| 344 | palette_set_color(machine,0,RGB_WHITE); /* white */ |
| 345 | palette_set_color(machine,1,RGB_BLACK); /* black */ |
| 346 | palette_set_color(machine,2,RGB_BLACK); /* black */ |
| 347 | palette_set_color(machine,3,RGB_WHITE); /* white */ |
| 362 | 348 | } |
| 363 | 349 | |
| 364 | | static PALETTE_INIT( zx81 ) |
| 365 | | { |
| 366 | | int i; |
| 367 | | |
| 368 | | for ( i = 0; i < sizeof(zx81_palette) / 3; i++ ) { |
| 369 | | palette_set_color_rgb(machine, i, zx81_palette[i*3], zx81_palette[i*3+1], zx81_palette[i*3+2]); |
| 370 | | } |
| 371 | | } |
| 372 | | |
| 373 | 350 | static PALETTE_INIT( ts1000 ) |
| 374 | 351 | { |
| 375 | | int i; |
| 376 | | |
| 377 | | for ( i = 0; i < sizeof(ts1000_palette) / 3; i++ ) { |
| 378 | | palette_set_color_rgb(machine, i, ts1000_palette[i*3], ts1000_palette[i*3+1], ts1000_palette[i*3+2]); |
| 379 | | } |
| 352 | palette_set_color(machine,0,MAKE_RGB(64, 244, 244)); /* cyan */ |
| 353 | palette_set_color(machine,1,RGB_BLACK); /* black */ |
| 354 | palette_set_color(machine,2,RGB_BLACK); /* black */ |
| 355 | palette_set_color(machine,3,MAKE_RGB(64, 244, 244)); /* cyan */ |
| 380 | 356 | } |
| 381 | 357 | |
| 382 | 358 | |
| 383 | | |
| 384 | 359 | #define ZX81_CPU_CLOCK 3250000 |
| 385 | 360 | #define ZX81_CYCLES_PER_SCANLINE 207 |
| 386 | 361 | #define ZX81_PIXELS_PER_SCANLINE 256 |
| r2179 | r2180 | |
| 434 | 409 | MDRV_MACHINE_RESET(zx81) |
| 435 | 410 | |
| 436 | 411 | MDRV_GFXDECODE(zx81) |
| 437 | | MDRV_PALETTE_INIT(zx81) |
| 438 | 412 | MACHINE_DRIVER_END |
| 439 | 413 | |
| 440 | 414 | static MACHINE_DRIVER_START( ts1000 ) |
| r2179 | r2180 | |
| 456 | 430 | |
| 457 | 431 | MDRV_MACHINE_RESET(pc8300) |
| 458 | 432 | MDRV_GFXDECODE(pc8300) |
| 459 | | MDRV_PALETTE_INIT(zx81) |
| 433 | MDRV_PALETTE_INIT(zx80) |
| 460 | 434 | MACHINE_DRIVER_END |
| 461 | 435 | |
| 462 | 436 | static MACHINE_DRIVER_START( pow3000 ) |
| r2179 | r2180 | |
| 467 | 441 | |
| 468 | 442 | MDRV_MACHINE_RESET(pc8300) |
| 469 | 443 | MDRV_GFXDECODE(pow3000) |
| 470 | | MDRV_PALETTE_INIT(zx81) |
| 444 | MDRV_PALETTE_INIT(zx80) |
| 471 | 445 | MACHINE_DRIVER_END |
| 472 | 446 | |
| 473 | 447 | /* ROMs */ |
| r2179 | r2180 | |
| 597 | 571 | /* Game Drivers */ |
| 598 | 572 | |
| 599 | 573 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ |
| 600 | | COMP( 1980, zx80, 0, 0, zx80, zx80, zx, zx80, "Sinclair Research", "ZX-80", 0 ) |
| 601 | | COMP( 1981, aszmic, zx80, 0, zx80, zx80, zx, zx80, "Sinclair Research", "ZX.Aszmic", 0 ) |
| 602 | | COMP( 1981, zx81, 0, 0, zx81, zx81, zx, zx81, "Sinclair Research", "ZX-81", 0 ) |
| 574 | COMP( 1980, zx80, 0, 0, zx80, zx80, zx, zx80, "Sinclair Research", "ZX-80", GAME_NOT_WORKING ) |
| 575 | COMP( 1981, aszmic, zx80, 0, zx80, zx80, zx, zx80, "Sinclair Research", "ZX.Aszmic", GAME_NOT_WORKING ) |
| 576 | COMP( 1981, zx81, 0, 0, zx81, zx81, zx, zx81, "Sinclair Research", "ZX-81", GAME_NOT_WORKING ) |
| 603 | 577 | COMP( 198?, h4th, zx81, 0, zx81, zx81, zx, zx81, "Sinclair Research", "Sinclair ZX-81 Forth by David Husband", GAME_NOT_WORKING ) |
| 604 | 578 | COMP( 198?, tree4th, zx81, 0, zx81, zx81, zx, zx81, "Sinclair Research", "Sinclair ZX-81 Tree-Forth by Tree Systems", GAME_NOT_WORKING ) |
| 605 | | COMP( 1982, ts1000, zx81, 0, ts1000, zx81, zx, zx81, "Timex Sinclair", "Timex Sinclair 1000", 0 ) |
| 606 | | COMP( 1984, pc8300, zx81, 0, pc8300, pow3000, zx, pc8300, "Your Computer", "PC8300", 0 ) |
| 607 | | COMP( 1983, pow3000, zx81, 0, pow3000, pow3000, zx, pc8300, "Creon Enterprises", "Power 3000", 0 ) |
| 608 | | COMP( 1982, lambda, zx81, 0, pc8300, pow3000, zx, zx81, "Lambda Electronics Ltd", "Lambda 8300", 0 ) |
| 579 | COMP( 1982, ts1000, zx81, 0, ts1000, zx81, zx, zx81, "Timex Sinclair", "Timex Sinclair 1000", GAME_NOT_WORKING ) |
| 580 | COMP( 1984, pc8300, zx81, 0, pc8300, pow3000, zx, pc8300, "Your Computer", "PC8300", GAME_NOT_WORKING ) |
| 581 | COMP( 1983, pow3000, zx81, 0, pow3000, pow3000, zx, pc8300, "Creon Enterprises", "Power 3000", GAME_NOT_WORKING ) |
| 582 | COMP( 1982, lambda, zx81, 0, pc8300, pow3000, zx, zx81, "Lambda Electronics Ltd", "Lambda 8300", GAME_NOT_WORKING ) |