Previous 15994 Revisions Next

r2055 Saturday 22nd March, 2008 at 07:01:17 UTC by Robbbert
[POCKETC] Fixed palette in pc1251, pc1350, pc1401, pc1402, pc1403.
[src/mess/video]pc1251.c pc1350.c pc1401.c pc1403.c pocketc.c

src/mess/video/pc1401.c
r2054r2055
138138   int x, y, i, j;
139139   int color[2];
140140
141   bitmap_fill(bitmap, cliprect, 5);
141   bitmap_fill(bitmap, cliprect, 11);
142142
143143   /* HJB: we cannot initialize array with values from other arrays, thus... */
144    color[0] = screen->machine->pens[pocketc_colortable[CONTRAST][0]];
145   color[1] = screen->machine->pens[pocketc_colortable[CONTRAST][1]];
144   color[0] = pocketc_colortable[CONTRAST][0];
145   color[1] = pocketc_colortable[CONTRAST][1];
146146
147147    if (pc1401_portc&1) {
148148      for (x=RIGHT,y=DOWN,i=0; i<0x28;x+=2) {
src/mess/video/pc1350.c
r2054r2055
135135   int x, y, i, j, k, b;
136136   int color[2];
137137
138   bitmap_fill(bitmap, cliprect, 5);
138   bitmap_fill(bitmap, cliprect, 11);
139139
140140   /* HJB: we cannot initialize array with values from other arrays, thus... */
141    color[0] = screen->machine->pens[pocketc_colortable[PC1350_CONTRAST][0]];
142   color[1] = screen->machine->pens[pocketc_colortable[PC1350_CONTRAST][1]];
141   color[0] = pocketc_colortable[PC1350_CONTRAST][0];
142   color[1] = pocketc_colortable[PC1350_CONTRAST][1];
143143
144144   for (k=0, y=DOWN; k<4; y+=16,k++)
145145   {
r2054r2055
149149         {
150150            for (b = 0; b < 8; b++)
151151            {
152               plot_box(bitmap, x, y + b * 2, 2, 2,
153                  color[(pc1350_lcd.reg[j+i] >> b) & 1]);
152               plot_box(bitmap, x, y + b * 2, 2, 2, color[(pc1350_lcd.reg[j+i] >> b) & 1]<<3);
154153            }
155154         }
156155      }
src/mess/video/pocketc.c
r2054r2055
5858
5959void pocketc_draw_special(bitmap_t *bitmap, int x, int y, const POCKETC_FIGURE fig, int color)
6060{
61   UINT8 color_pen[] = { 8,8,8,8,7,7,7,7 };
6162   int i,j;
6263   for (i=0; fig[i]; i++, y++)
6364   {
r2054r2055
6667         switch(fig[i][j])
6768         {
6869         case '1':
69            *BITMAP_ADDR16(bitmap, y, x+j) = color<<2;
70            *BITMAP_ADDR16(bitmap, y, x+j) = color_pen[color];
7071            break;
7172         case 'e':
7273            return;
src/mess/video/pc1403.c
r2054r2055
158158   int x, y, i, j;
159159   int color[3];
160160
161   bitmap_fill(bitmap, cliprect, 5);
161   bitmap_fill(bitmap, cliprect, 11);
162162
163163   /* HJB: we cannot initialize array with values from other arrays, thus... */
164   color[0] = screen->machine->pens[pocketc_colortable[CONTRAST][0]];
165   color[2] = screen->machine->pens[pocketc_colortable[CONTRAST][1]];
164   color[0] = pocketc_colortable[CONTRAST][0];
165   color[2] = pocketc_colortable[CONTRAST][1];
166166   color[1] = (pc1403_portc&1) ? color[2] : color[0];
167167
168168   if (pc1403_portc&1) {
r2054r2055
203203            0, TRANSPARENCY_NONE,0);
204204      }
205205   }
206    /* if display is off, busy is always visible? it seems to behave like
207that. */
206    /* if display is off, busy is always visible? it seems to behave like that. */
208207    /* But if computer is off, busy is hidden. */
209208    if(!(pc1403_portc&8))
210209    {if (pc1403_portc&1) pocketc_draw_special(bitmap,RIGHT,DOWN-13,busy,
src/mess/video/pc1251.c
r2054r2055
121121   int x, y, i, j;
122122   int color[2];
123123
124   bitmap_fill(bitmap, cliprect, 5);
124   bitmap_fill(bitmap, cliprect, 11);
125125
126126   /* HJB: we cannot initialize array with values from other arrays, thus... */
127    color[0] = screen->machine->pens[pocketc_colortable[PC1251_CONTRAST][0]];
128   color[1] = screen->machine->pens[pocketc_colortable[PC1251_CONTRAST][1]];
127   color[0] = pocketc_colortable[PC1251_CONTRAST][0];
128   color[1] = pocketc_colortable[PC1251_CONTRAST][1];
129129
130130   for (x=RIGHT,y=DOWN,i=0; i<60;x+=3) {
131131      for (j=0; j<5;j++,i++,x+=3)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team