Previous 15994 Revisions Next

r1771 Thursday 28th February, 2008 at 10:19:27 UTC by Justin Kerk
[MBEE] Fix colours broken by recent core changes. [Robbbert]
[src/mess/drivers]mbee.c
[src/mess/video]mbee.c

src/mess/video/mbee.c
r1770r1771
523523               if( y > crt.scan_lines )
524524                  break;
525525               for( x = 0; x < 8; x++ )
526                  *BITMAP_ADDR16(bitmap, sy+y, sx+x) = machine->pens[color];
526                  *BITMAP_ADDR16(bitmap, sy+y, sx+x) = machine->pens[5]; //[color];
527527            }
528528         }
529529        }
src/mess/drivers/mbee.c
r1770r1771
182182   GFXDECODE_ENTRY( REGION_CPU1, 0xf000, mbee_charlayout, 0, 256 )
183183GFXDECODE_END
184184
185static const UINT8 palette[] =
185static const UINT8 mbee_palette[] =
186186{
187187    0x00,0x00,0x00, /* black    */
188188    0xf0,0x00,0x00, /* red      */
r1770r1771
220220
221221static PALETTE_INIT( mbee )
222222{
223   palette_set_colors_rgb(machine, 0, palette, sizeof(palette) / 3);
223   int i;
224   UINT8 r, b, g;
225   machine->colortable = colortable_alloc(machine, 32);
226
227   for (i = 0; i < 32; i++)
228   {
229      r = mbee_palette[i*3];
230      g = mbee_palette[i*3+1];
231      b = mbee_palette[i*3+2];
232      colortable_palette_set_color(machine->colortable,i,MAKE_RGB(r, g, b));
233   }
234
235   for( i = 0; i < 256; i++ )
236   {
237      colortable_entry_set_value(machine->colortable, i*2, i>>5);
238      colortable_entry_set_value(machine->colortable, i*2+1, i&31);
239   }
224240}
225241
226242static const struct z80_irq_daisy_chain mbee_daisy_chain[] =
r1770r1771
250266   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
251267   MDRV_SCREEN_SIZE(70*8, 310)
252268   MDRV_SCREEN_VISIBLE_AREA(0*8, 70*8-1, 0, 19*16-1)
253   MDRV_PALETTE_LENGTH(sizeof(palette)/sizeof(palette[0])/3)
269   MDRV_PALETTE_LENGTH(256*2)
254270   MDRV_PALETTE_INIT(mbee)
255271
256272   MDRV_VIDEO_START(mbee)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team