src/mess/video/epnick.c
| r1702 | r1703 | |
| 18 | 18 | |
| 19 | 19 | /* TODO: Remove dependency on this */ |
| 20 | 20 | #include "deprecat.h" |
| 21 | | #include "mslegacy.h" |
| 22 | 21 | |
| 23 | 22 | |
| 24 | 23 | /*************************************************************/ |
| r1702 | r1703 | |
| 48 | 47 | /* Enterprise has 256 colours, all may be on the screen at once! |
| 49 | 48 | the NICK_GET_RED8, NICK_GET_GREEN8, NICK_GET_BLUE8 macros |
| 50 | 49 | return a 8-bit colour value for the index specified. */ |
| 51 | | static unsigned char nick_colour_palette[256*3]; |
| 52 | 50 | |
| 53 | | /* the mapping doesn't change - EP uses 0..256 index's for |
| 54 | | colour specification - don't know if I require this for the |
| 55 | | driver or not. */ |
| 56 | | static const unsigned short nick_colour_table[256]= |
| 57 | | { |
| 58 | | 0,1,2,3,4,5,6,7,8, |
| 59 | | 9,10,11,12,13,14,15,16, |
| 60 | | 17,18,19,20,21,22,23,24, |
| 61 | | 25,26,27,28,29,30,31,32, |
| 62 | | 33,34,35,36,37,38,39,40, |
| 63 | | 41,42,43,44,45,46,47,48, |
| 64 | | 49,50,51,52,53,54,55,56, |
| 65 | | 57,58,59,60,61,62,63,64, |
| 66 | | 65,66,67,68,69,70,71,72, |
| 67 | | 73,74,75,76,77,78,79,80, |
| 68 | | 81,82,83,84,85,86,87,88, |
| 69 | | 89,90,91,92,93,94,95,96, |
| 70 | | 97,98,99,100,101,102,103,104, |
| 71 | | 105,106,107,108,109,110,111, |
| 72 | | 112,113,114,115,116,117,118, |
| 73 | | 119,120,121,122,123,124,125, |
| 74 | | 126,127,128,129,130,131,132, |
| 75 | | 133,134,135,136,137,138,139, |
| 76 | | 140,141,142,143,144,145,146, |
| 77 | | 147,148,149,150,151,152,153, |
| 78 | | 154,155,156,157,158,159,160, |
| 79 | | 161,162,163,164,165,166,167, |
| 80 | | 168,169,170,171,172,173,174, |
| 81 | | 175,176,177,178,179,180,181, |
| 82 | | 182,183,184,185,186,187,188, |
| 83 | | 189,190,191,192,193,194,195, |
| 84 | | 196,197,198,199,200,201,202, |
| 85 | | 203,204,205,206,207,208,209, |
| 86 | | 210,211,212,213,214,215,216, |
| 87 | | 217,218,219,220,221,222,223, |
| 88 | | 224,225,226,227,228,229,230, |
| 89 | | 231,232,233,234,235,236,237, |
| 90 | | 238,239,240,241,242,243,244, |
| 91 | | 245,246,247,248,249,250,251, |
| 92 | | 252,253,254,255 |
| 93 | | }; |
| 94 | | |
| 95 | | |
| 96 | 51 | /* initial the palette */ |
| 97 | 52 | PALETTE_INIT( nick ) |
| 98 | 53 | { |
| r1702 | r1703 | |
| 100 | 55 | |
| 101 | 56 | for (i=0; i<256; i++) |
| 102 | 57 | { |
| 103 | | nick_colour_palette[(i*3)] = NICK_GET_RED8(i); |
| 104 | | nick_colour_palette[(i*3)+1] = NICK_GET_GREEN8(i); |
| 105 | | nick_colour_palette[(i*3)+2] = NICK_GET_BLUE8(i); |
| 58 | palette_set_color_rgb( machine, i, NICK_GET_RED8(i), NICK_GET_GREEN8(i), NICK_GET_BLUE8(i) ); |
| 106 | 59 | } |
| 107 | | |
| 108 | | palette_set_colors_rgb(machine, 0, nick_colour_palette, sizeof(nick_colour_palette) / 3); |
| 109 | | memcpy(colortable, nick_colour_table, sizeof(nick_colour_table)); |
| 110 | | //color_prom=malloc(0*sizeof(char)); |
| 111 | 60 | } |
| 112 | 61 | |
| 113 | 62 | /* first clock visible on left hand side */ |
| r1702 | r1703 | |
| 958 | 907 | |
| 959 | 908 | /* set write address for line */ |
| 960 | 909 | Nick.dest = BITMAP_ADDR16(bm, line, 0); |
| 910 | Nick.dest_pos = 0; |
| 911 | Nick.dest_max_pos = bm->width; |
| 961 | 912 | |
| 962 | 913 | /* write line */ |
| 963 | 914 | Nick_DoLine(); |