src/mess/drivers/arcadia.c
| r1248 | r1249 | |
| 13 | 13 | #include <assert.h> |
| 14 | 14 | #include "driver.h" |
| 15 | 15 | #include "image.h" |
| 16 | | #include "mslegacy.h" |
| 17 | 16 | #include "cpu/s2650/s2650.h" |
| 18 | 17 | #include "includes/arcadia.h" |
| 19 | 18 | #include "devices/cartslot.h" |
| r1248 | r1249 | |
| 311 | 310 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, arcadia_charlayout, 0, 128 ) |
| 312 | 311 | GFXDECODE_END |
| 313 | 312 | |
| 314 | | static unsigned char arcadia_palette[] = |
| 313 | static const rgb_t arcadia_palette[] = |
| 315 | 314 | { |
| 316 | | 255, 255, 255, // white |
| 317 | | 255, 255, 0, // yellow |
| 318 | | 0, 255, 255, // cyan |
| 319 | | 0, 255, 0, // green |
| 320 | | 255, 0, 255, // magenta |
| 321 | | 255, 0, 0, // red |
| 322 | | 0, 0, 255, // blue |
| 323 | | 0, 0, 0 // black |
| 315 | RGB_WHITE, /* white */ |
| 316 | MAKE_RGB(0xff, 0xff, 0x00), /* yellow */ |
| 317 | MAKE_RGB(0x00, 0xff, 0xff), /* cyan */ |
| 318 | MAKE_RGB(0x00, 0xff, 0x00), /* green */ |
| 319 | MAKE_RGB(0xff, 0x00, 0xff), /* magenta */ |
| 320 | MAKE_RGB(0xff, 0x00, 0x00), /* red */ |
| 321 | MAKE_RGB(0x00, 0x00, 0xff), /* blue */ |
| 322 | RGB_BLACK /* black */ |
| 324 | 323 | }; |
| 325 | 324 | |
| 326 | 325 | static unsigned short arcadia_colortable[2][2] = { |
| r1248 | r1249 | |
| 330 | 329 | |
| 331 | 330 | static PALETTE_INIT( arcadia ) |
| 332 | 331 | { |
| 333 | | palette_set_colors_rgb(machine, 0, arcadia_palette, sizeof (arcadia_palette)/3); |
| 332 | palette_set_colors(machine, 0, arcadia_palette, ARRAY_LENGTH(arcadia_palette)); |
| 334 | 333 | memcpy(colortable, arcadia_colortable,sizeof(arcadia_colortable)); |
| 335 | 334 | } |
| 336 | 335 | |
| r1248 | r1249 | |
| 350 | 349 | MDRV_SCREEN_SIZE(128+2*XPOS, 262) |
| 351 | 350 | MDRV_SCREEN_VISIBLE_AREA(0, 2*XPOS+128-1, 0, 262-1) |
| 352 | 351 | MDRV_GFXDECODE( arcadia_gfxdecodeinfo ) |
| 353 | | MDRV_PALETTE_LENGTH(sizeof (arcadia_palette) / sizeof (arcadia_palette[0]) / 3) |
| 352 | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(arcadia_palette)) |
| 354 | 353 | MDRV_COLORTABLE_LENGTH(sizeof (arcadia_colortable) / sizeof(arcadia_colortable[0][0])) |
| 355 | 354 | MDRV_PALETTE_INIT( arcadia ) |
| 356 | 355 | |
src/mess/drivers/aquarius.c
| r1248 | r1249 | |
| 25 | 25 | ************************************************************************/ |
| 26 | 26 | |
| 27 | 27 | #include "driver.h" |
| 28 | | #include "mslegacy.h" |
| 29 | 28 | #include "cpu/z80/z80.h" |
| 30 | 29 | #include "video/generic.h" |
| 31 | 30 | #include "includes/aquarius.h" |
| r1248 | r1249 | |
| 70 | 69 | GFXDECODE_ENTRY( REGION_GFX1, 0x0000, aquarius_charlayout, 0, 256 ) |
| 71 | 70 | GFXDECODE_END |
| 72 | 71 | |
| 73 | | static unsigned char aquarius_palette[] = |
| 72 | static const rgb_t aquarius_palette[] = |
| 74 | 73 | { |
| 75 | | 0x00, 0x00, 0x00, /* Black */ |
| 76 | | 0xff, 0x00, 0x00, /* Red */ |
| 77 | | 0x00, 0xff, 0x00, /* Green */ |
| 78 | | 0xff, 0xff, 0x00, /* Yellow */ |
| 79 | | 0x00, 0x00, 0xff, /* Blue */ |
| 80 | | 0x7f, 0x00, 0x7f, /* Violet */ |
| 81 | | 0x7f, 0xff, 0xff, /* Light Blue-Green */ |
| 82 | | 0xff, 0xff, 0xff, /* White */ |
| 83 | | 0xc0, 0xc0, 0xc0, /* Light Gray */ |
| 84 | | 0x00, 0xff, 0xff, /* Blue-Green */ |
| 85 | | 0xff, 0x00, 0xff, /* Magenta */ |
| 86 | | 0x00, 0x00, 0x7f, /* Dark Blue */ |
| 87 | | 0xff, 0xff, 0x7f, /* Light Yellow */ |
| 88 | | 0x7f, 0xff, 0x7f, /* Light Green */ |
| 89 | | 0xff, 0x7f, 0x00, /* Orange */ |
| 90 | | 0x7f, 0x7f, 0x7f, /* Dark Gray */ |
| 74 | RGB_BLACK, /* Black */ |
| 75 | MAKE_RGB(0xff, 0x00, 0x00), /* Red */ |
| 76 | MAKE_RGB(0x00, 0xff, 0x00), /* Green */ |
| 77 | MAKE_RGB(0xff, 0xff, 0x00), /* Yellow */ |
| 78 | MAKE_RGB(0x00, 0x00, 0xff), /* Blue */ |
| 79 | MAKE_RGB(0x7f, 0x00, 0x7f), /* Violet */ |
| 80 | MAKE_RGB(0x7f, 0xff, 0xff), /* Light Blue-Green */ |
| 81 | RGB_WHITE, /* White */ |
| 82 | MAKE_RGB(0xc0, 0xc0, 0xc0), /* Light Gray */ |
| 83 | MAKE_RGB(0x00, 0xff, 0xff), /* Blue-Green */ |
| 84 | MAKE_RGB(0xff, 0x00, 0xff), /* Magenta */ |
| 85 | MAKE_RGB(0x00, 0x00, 0x7f), /* Dark Blue */ |
| 86 | MAKE_RGB(0xff, 0xff, 0x7f), /* Light Yellow */ |
| 87 | MAKE_RGB(0x7f, 0xff, 0x7f), /* Light Green */ |
| 88 | MAKE_RGB(0xff, 0x7f, 0x00), /* Orange */ |
| 89 | MAKE_RGB(0x7f, 0x7f, 0x7f) /* Dark Gray */ |
| 91 | 90 | }; |
| 92 | 91 | |
| 93 | 92 | static unsigned short aquarius_colortable[] = |
| r1248 | r1249 | |
| 112 | 111 | |
| 113 | 112 | static PALETTE_INIT( aquarius ) |
| 114 | 113 | { |
| 115 | | palette_set_colors_rgb(machine, 0, aquarius_palette, sizeof(aquarius_palette) / 3); |
| 114 | palette_set_colors(machine, 0, aquarius_palette, ARRAY_LENGTH(aquarius_palette)); |
| 116 | 115 | memcpy(colortable, aquarius_colortable, sizeof (aquarius_colortable)); |
| 117 | 116 | } |
| 118 | 117 | |
| r1248 | r1249 | |
| 224 | 223 | MDRV_SCREEN_SIZE(40 * 8, 24 * 8) |
| 225 | 224 | MDRV_SCREEN_VISIBLE_AREA(0, 40 * 8 - 1, 0, 24 * 8 - 1) |
| 226 | 225 | MDRV_GFXDECODE( aquarius_gfxdecodeinfo ) |
| 227 | | MDRV_PALETTE_LENGTH(sizeof (aquarius_palette) / 3) |
| 226 | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(aquarius_palette)) |
| 228 | 227 | MDRV_COLORTABLE_LENGTH(sizeof (aquarius_colortable)) |
| 229 | 228 | MDRV_PALETTE_INIT( aquarius ) |
| 230 | 229 | |
src/mess/drivers/apexc.c
| r1248 | r1249 | |
| 9 | 9 | #include "driver.h" |
| 10 | 10 | #include "cpu/apexc/apexc.h" |
| 11 | 11 | #include "video/generic.h" |
| 12 | | #include "mslegacy.h" |
| 13 | 12 | |
| 13 | |
| 14 | 14 | static void apexc_teletyper_init(void); |
| 15 | 15 | static void apexc_teletyper_putchar(int character); |
| 16 | 16 | |
| r1248 | r1249 | |
| 427 | 427 | Additionnally, We display one page of teletyper output. |
| 428 | 428 | */ |
| 429 | 429 | |
| 430 | | static unsigned char apexc_palette[] = |
| 430 | static const rgb_t apexc_palette[] = |
| 431 | 431 | { |
| 432 | | 255, 255, 255, |
| 433 | | 0, 0, 0, |
| 434 | | 255, 0, 0, |
| 435 | | 50, 0, 0 |
| 432 | RGB_WHITE, |
| 433 | RGB_BLACK, |
| 434 | MAKE_RGB(255, 0, 0), |
| 435 | MAKE_RGB(50, 0, 0) |
| 436 | 436 | }; |
| 437 | 437 | |
| 438 | 438 | static unsigned short apexc_colortable[] = |
| r1248 | r1249 | |
| 440 | 440 | 0, 1 |
| 441 | 441 | }; |
| 442 | 442 | |
| 443 | | #define APEXC_PALETTE_SIZE sizeof(apexc_palette)/3 |
| 443 | #define APEXC_PALETTE_SIZE ARRAY_LENGTH(apexc_palette) |
| 444 | 444 | #define APEXC_COLORTABLE_SIZE sizeof(apexc_colortable)/2 |
| 445 | 445 | |
| 446 | 446 | static mame_bitmap *apexc_bitmap; |
| r1248 | r1249 | |
| 482 | 482 | |
| 483 | 483 | static PALETTE_INIT( apexc ) |
| 484 | 484 | { |
| 485 | | palette_set_colors_rgb(machine, 0, apexc_palette, APEXC_PALETTE_SIZE); |
| 485 | palette_set_colors(machine, 0, apexc_palette, APEXC_PALETTE_SIZE); |
| 486 | 486 | |
| 487 | 487 | memcpy(colortable, & apexc_colortable, sizeof(apexc_colortable)); |
| 488 | 488 | } |
src/mess/drivers/apple1.c
| r1248 | r1249 | |
| 75 | 75 | #include "devices/snapquik.h" |
| 76 | 76 | #include "devices/cassette.h" |
| 77 | 77 | #include "inputx.h" |
| 78 | | #include "mslegacy.h" |
| 79 | 78 | |
| 79 | |
| 80 | 80 | /* port i/o functions */ |
| 81 | 81 | |
| 82 | 82 | /* memory w/r functions */ |
| r1248 | r1249 | |
| 134 | 134 | modulator. Thus white seems like a more accurate foreground color |
| 135 | 135 | than green. */ |
| 136 | 136 | |
| 137 | | static unsigned char apple1_palette[] = |
| 137 | static const rgb_t apple1_palette[] = |
| 138 | 138 | { |
| 139 | | 0x00, 0x00, 0x00, /* Black */ |
| 140 | | 0xff, 0xff, 0xff /* White */ |
| 139 | RGB_BLACK, |
| 140 | RGB_WHITE |
| 141 | 141 | }; |
| 142 | 142 | |
| 143 | 143 | static unsigned short apple1_colortable[] = |
| r1248 | r1249 | |
| 147 | 147 | |
| 148 | 148 | static PALETTE_INIT( apple1 ) |
| 149 | 149 | { |
| 150 | | palette_set_colors_rgb(machine, 0, apple1_palette, sizeof(apple1_palette) / 3); |
| 150 | palette_set_colors(machine, 0, apple1_palette, ARRAY_LENGTH(apple1_palette)); |
| 151 | 151 | memcpy(colortable, apple1_colortable, sizeof (apple1_colortable)); |
| 152 | 152 | } |
| 153 | 153 | |
| r1248 | r1249 | |
| 245 | 245 | MDRV_SCREEN_SIZE(40 * 7, 24 * 8) |
| 246 | 246 | MDRV_SCREEN_VISIBLE_AREA(0, 40 * 7 - 1, 0, 24 * 8 - 1) |
| 247 | 247 | MDRV_GFXDECODE(apple1_gfxdecodeinfo) |
| 248 | | MDRV_PALETTE_LENGTH(sizeof (apple1_palette) / 3) |
| 248 | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(apple1_palette)) |
| 249 | 249 | MDRV_COLORTABLE_LENGTH(sizeof(apple1_colortable)/sizeof(unsigned short)) |
| 250 | 250 | MDRV_PALETTE_INIT(apple1) |
| 251 | 251 | |
src/mess/drivers/apple2.c
| r1248 | r1249 | |
| 191 | 191 | #include "devices/mflopimg.h" |
| 192 | 192 | #include "formats/ap2_dsk.h" |
| 193 | 193 | #include "sound/ay8910.h" |
| 194 | | #include "mslegacy.h" |
| 195 | 194 | |
| 195 | |
| 196 | 196 | static ADDRESS_MAP_START( apple2_map, ADDRESS_SPACE_PROGRAM, 8 ) |
| 197 | 197 | ADDRESS_MAP_END |
| 198 | 198 | |
| r1248 | r1249 | |
| 508 | 508 | * have been more appropriate for an Apple IIgs. So we've substituted in the |
| 509 | 509 | * Robert Munafo palette instead, which is more accurate on 8-bit Apples |
| 510 | 510 | */ |
| 511 | | static const unsigned char apple2_palette[] = |
| 511 | static const rgb_t apple2_palette[] = |
| 512 | 512 | { |
| 513 | | 0x00, 0x00, 0x00, /* Black */ |
| 514 | | 0xE3, 0x1E, 0x60, /* Dark Red */ |
| 515 | | 0x60, 0x4E, 0xBD, /* Dark Blue */ |
| 516 | | 0xFF, 0x44, 0xFD, /* Purple */ |
| 517 | | 0x00, 0xA3, 0x60, /* Dark Green */ |
| 518 | | 0x9C, 0x9C, 0x9C, /* Dark Gray */ |
| 519 | | 0x14, 0xCF, 0xFD, /* Medium Blue */ |
| 520 | | 0xD0, 0xC3, 0xFF, /* Light Blue */ |
| 521 | | 0x60, 0x72, 0x03, /* Brown */ |
| 522 | | 0xFF, 0x6A, 0x3C, /* Orange */ |
| 523 | | 0x9C, 0x9C, 0x9C, /* Light Grey */ |
| 524 | | 0xFF, 0xA0, 0xD0, /* Pink */ |
| 525 | | 0x14, 0xF5, 0x3C, /* Light Green */ |
| 526 | | 0xD0, 0xDD, 0x8D, /* Yellow */ |
| 527 | | 0x72, 0xFF, 0xD0, /* Aquamarine */ |
| 528 | | 0xFF, 0xFF, 0xFF /* White */ |
| 513 | RGB_BLACK, |
| 514 | MAKE_RGB(0xE3, 0x1E, 0x60), /* Dark Red */ |
| 515 | MAKE_RGB(0x60, 0x4E, 0xBD), /* Dark Blue */ |
| 516 | MAKE_RGB(0xFF, 0x44, 0xFD), /* Purple */ |
| 517 | MAKE_RGB(0x00, 0xA3, 0x60), /* Dark Green */ |
| 518 | MAKE_RGB(0x9C, 0x9C, 0x9C), /* Dark Gray */ |
| 519 | MAKE_RGB(0x14, 0xCF, 0xFD), /* Medium Blue */ |
| 520 | MAKE_RGB(0xD0, 0xC3, 0xFF), /* Light Blue */ |
| 521 | MAKE_RGB(0x60, 0x72, 0x03), /* Brown */ |
| 522 | MAKE_RGB(0xFF, 0x6A, 0x3C), /* Orange */ |
| 523 | MAKE_RGB(0x9C, 0x9C, 0x9C), /* Light Grey */ |
| 524 | MAKE_RGB(0xFF, 0xA0, 0xD0), /* Pink */ |
| 525 | MAKE_RGB(0x14, 0xF5, 0x3C), /* Light Green */ |
| 526 | MAKE_RGB(0xD0, 0xDD, 0x8D), /* Yellow */ |
| 527 | MAKE_RGB(0x72, 0xFF, 0xD0), /* Aquamarine */ |
| 528 | RGB_WHITE |
| 529 | 529 | }; |
| 530 | 530 | |
| 531 | 531 | static const gfx_layout apple2_text_layout = |
| r1248 | r1249 | |
| 622 | 622 | /* Initialize the palette */ |
| 623 | 623 | PALETTE_INIT( apple2 ) |
| 624 | 624 | { |
| 625 | | palette_set_colors_rgb(machine, 0, apple2_palette, sizeof(apple2_palette) / 3); |
| 625 | palette_set_colors(machine, 0, apple2_palette, ARRAY_LENGTH(apple2_palette)); |
| 626 | 626 | memcpy(colortable, apple2_colortable, sizeof(apple2_colortable)); |
| 627 | 627 | } |
| 628 | 628 | |
| r1248 | r1249 | |
| 646 | 646 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) |
| 647 | 647 | MDRV_SCREEN_SIZE(280*2, 192) |
| 648 | 648 | MDRV_SCREEN_VISIBLE_AREA(0, (280*2)-1,0,192-1) |
| 649 | | MDRV_PALETTE_LENGTH(sizeof(apple2_palette)/3) |
| 649 | MDRV_PALETTE_LENGTH(ARRAY_LENGTH(apple2_palette)) |
| 650 | 650 | MDRV_COLORTABLE_LENGTH(sizeof(apple2_colortable)/sizeof(unsigned short)) |
| 651 | 651 | MDRV_PALETTE_INIT(apple2) |
| 652 | 652 | |