Previous 15994 Revisions Next

r1703 Thursday 21st February, 2008 at 17:01:32 UTC by Wilbert Pol
[EP128] Fixed graphics display. (bug #1478)
[src/mess/video]epnick.c

src/mess/video/epnick.c
r1702r1703
1818
1919/* TODO: Remove dependency on this */
2020#include "deprecat.h"
21#include "mslegacy.h"
2221
2322
2423/*************************************************************/
r1702r1703
4847/* Enterprise has 256 colours, all may be on the screen at once!
4948the NICK_GET_RED8, NICK_GET_GREEN8, NICK_GET_BLUE8 macros
5049return a 8-bit colour value for the index specified.  */
51static unsigned char nick_colour_palette[256*3];
5250
53/* the mapping doesn't change - EP uses 0..256 index's for
54colour specification - don't know if I require this for the
55driver or not. */
56static 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
9651/* initial the palette */
9752PALETTE_INIT( nick )
9853{
r1702r1703
10055
10156   for (i=0; i<256; i++)
10257   {
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) );
10659   }
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));
11160}
11261
11362/* first clock visible on left hand side */
r1702r1703
958907
959908    /* set write address for line */
960909    Nick.dest = BITMAP_ADDR16(bm, line, 0);
910   Nick.dest_pos = 0;
911   Nick.dest_max_pos = bm->width;
961912
962913    /* write line */
963914    Nick_DoLine();

Previous 15994 Revisions Next


© 1998-2018 The MESS Team